diff --git a/.github/workflows/backtrace-commit-fix.yml b/.github/workflows/backtrace-commit-fix.yml new file mode 100644 index 0000000000..ee1923e885 --- /dev/null +++ b/.github/workflows/backtrace-commit-fix.yml @@ -0,0 +1,26 @@ +name: 'Backtrace issue commit correction' +on: + issues: + types: + - opened +jobs: + backtrace_commit_correction: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE: ${{ github.event.issue.html_url }} + if: | + contains(github.event.issue.labels.*.name, 'backtrace.io') + steps: + - name: Modify issue contents + env: + BODY: ${{ github.event.issue.body }} + id: fix + run: | + changed_body=$(echo "$BODY" | sed '/commit<\/strong>/,/<\/li>/ s/\([0-9a-f]\{7,\}\)<\/code>/\1/') + if [[ "$changed_body" == "$BODY" ]]; then + echo "Unable to match the Backtrace report format." + exit 1 + fi + echo "$changed_body" >> body.txt + gh issue edit $ISSUE --body-file body.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb8e30fe9a..265c620f91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: with: fetch-depth: 0 - name: Lint Commit Messages - uses: wagoid/commitlint-github-action@v3 + uses: wagoid/commitlint-github-action@v5 with: configFile: .commitlint.json check-code-formatting: @@ -65,11 +65,18 @@ jobs: strategy: fail-fast: false matrix: - platform: [win32, x64] + platform: [win32, x64, arm64] env: - CONFIGURATION: Release PLATFORM: ${{ matrix.platform }} steps: + - name: Setup environment + run: | + BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3) + if [[ $BRANCH == 'develop' || $BRANCH == 'master' ]]; then + echo "CONFIGURATION=ReleaseLTCG" >> "$GITHUB_ENV" + else + echo "CONFIGURATION=Release" >> "$GITHUB_ENV" + fi - name: Checkout uses: actions/checkout@v3 - name: Git describe for shallow checkout @@ -98,11 +105,13 @@ jobs: run: . scripts/setenv -q && run-tests - name: Upload artifacts (openrct2.org) run: | - . scripts/setenv -q + . scripts/setenv if [[ "$OPENRCT2_PUSH" == "true" ]]; then - upload-build artifacts/openrct2-portable-*.zip "windows-portable-$PLATFORM" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH - upload-build artifacts/openrct2-installer-*.exe "windows-installer-$PLATFORM" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH - upload-build artifacts/openrct2-symbols-*.zip "windows-symbols-$PLATFORM" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + # Temporarily disable build uploading so they can be signed locally. + # See https://github.com/OpenRCT2/OpenRCT2/issues/19748 + # upload-build artifacts/openrct2-portable-*.zip "windows-portable-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + # upload-build artifacts/openrct2-installer-*.exe "windows-installer-$PLATFORM.exe" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + # upload-build artifacts/openrct2-symbols-*.zip "windows-symbols-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH upload-backtrace-symbols artifacts/openrct2-symbols-*.zip else echo 'Not going to push build' @@ -173,7 +182,7 @@ jobs: uses: ammaraskar/gcc-problem-matcher@master - name: Build OpenRCT2 run: | - HOMEBREW_NO_ANALYTICS=1 brew install ninja + HOMEBREW_NO_ANALYTICS=1 brew install ninja pkg-config . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on ${{ matrix.build_flags }} - name: Run Tests if: ${{matrix.run_tests}} @@ -234,7 +243,7 @@ jobs: run: | . scripts/setenv if [[ "$OPENRCT2_PUSH" == "true" ]]; then - upload-build artifacts/openrct2-macos.zip macos $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + upload-build artifacts/openrct2-macos.zip macos-universal.zip $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH else echo 'Not going to push build' fi @@ -247,26 +256,28 @@ jobs: fail-fast: false matrix: include: + # Use `-fno-var-tracking-assignments` to reduce amount of produced debug information. This is necessary due to 100MiB limit of GitHub / openrct2.org API. + # For focal the debug information still takes too much space, so reduce amount of debug info to minimum using `-g1` (`-g` means `-g2`), which is enough for backtraces only. - platform: x86_64 distro: bionic image: openrct2/openrct2-build:4-bionic - build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz" -DWITH_TESTS=off -DDISABLE_FLAC=ON -DDISABLE_VORBIS=ON + build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments" -DWITH_TESTS=off -DDISABLE_FLAC=ON -DDISABLE_VORBIS=ON - platform: x86_64 distro: focal image: openrct2/openrct2-build:8-focal - build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz" + build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g1 -gz" - platform: x86_64 distro: jammy image: openrct2/openrct2-build:8-jammy - build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz" + build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments" - platform: x86_64 distro: bullseye image: openrct2/openrct2-build:8-bullseye - build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz" + build_flags: -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_CXX_FLAGS="-g -gz -fno-var-tracking-assignments" - platform: i686 distro: focal image: openrct2/openrct2-build:8-focal32 - build_flags: -DFORCE32=ON -DENABLE_SCRIPTING=OFF -DCMAKE_CXX_FLAGS="-m32 -g -gz" -DWITH_TESTS=off + build_flags: -DFORCE32=ON -DENABLE_SCRIPTING=OFF -DCMAKE_CXX_FLAGS="-m32 -g1 -gz" -DWITH_TESTS=off steps: - name: Checkout uses: actions/checkout@v3 @@ -295,12 +306,12 @@ jobs: # Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116 . scripts/setenv -q if [[ "$OPENRCT2_PUSH" == "true" ]]; then - upload-build artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }} $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + upload-build artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }}-${{ matrix.distro }}.tar.gz $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH else echo 'Not going to push build' fi linux-appimage: - name: Linux (x64, AppImage) + name: Linux (x86_64, AppImage) runs-on: ubuntu-latest needs: check-code-formatting container: openrct2/openrct2-build:8-focal @@ -323,6 +334,15 @@ jobs: name: OpenRCT2-AppImage path: artifacts if-no-files-found: error + - name: Upload artifacts (openrct2.org) + run: | + # Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116 + . scripts/setenv -q + if [[ "$OPENRCT2_PUSH" == "true" ]]; then + upload-build artifacts/OpenRCT2-x86_64.AppImage linux.AppImage $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + else + echo 'Not going to push build' + fi linux-docker: name: Linux (docker) needs: check-code-formatting @@ -396,7 +416,7 @@ jobs: run: | . scripts/setenv -q if [[ "$OPENRCT2_PUSH" == "true" ]]; then - upload-build artifacts/openrct2-arm.apk android-arm $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH + upload-build artifacts/openrct2-arm.apk android-arm.apk $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH else echo 'Not going to push build' fi diff --git a/.github/workflows/stale-backtrace-issues.yml b/.github/workflows/stale-backtrace-issues.yml new file mode 100644 index 0000000000..659ff8a118 --- /dev/null +++ b/.github/workflows/stale-backtrace-issues.yml @@ -0,0 +1,20 @@ +name: 'Manage stale backtrace reports' +on: + schedule: + - cron: '0 * * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v7 + with: + days-before-issue-stale: 60 + days-before-issue-close: 1 + days-before-pr-stale: -1 + days-before-pr-close: -1 + only-issue-labels: 'backtrace.io' + stale-issue-label: 'stale-backtrace' + stale-issue-message: 'This issue is stale and will be closed tomorrow if no action is taken. To keep it open, leave a comment or remove the `stale-backtrace` label.' + close-issue-message: 'This issue was closed due to inactivity.' + operations-per-run: 200 diff --git a/.github/workflows/stale-prs.yml b/.github/workflows/stale-prs.yml new file mode 100644 index 0000000000..e87d16ca3f --- /dev/null +++ b/.github/workflows/stale-prs.yml @@ -0,0 +1,18 @@ +name: 'Manage stale PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v7 + with: + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 14 + days-before-pr-close: 14 + stale-pr-label: 'stale-pr' + stale-pr-message: 'This pull request is stale and will be closed in 14 days if no action is taken. To keep it open, leave a comment or remove the `stale-pr` label. If you''re awaiting feedback from a developer, please send us a reminder (either here or on [Discord](https://discord.gg/ZXZd8D8)).' + close-pr-message: 'This pull request was closed due to inactivity.' diff --git a/CMakeLists.txt b/CMakeLists.txt index 76a17f2438..f2c43e8ca8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,21 +64,21 @@ set(TITLE_SEQUENCE_VERSION "0.4.0") set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v${TITLE_SEQUENCE_VERSION}/title-sequences.zip") set(TITLE_SEQUENCE_SHA1 "4ab0065e5a4d9f9c77d94718bbdfcfcd5a389da0") -set(OBJECTS_VERSION "1.3.7") +set(OBJECTS_VERSION "1.3.8") set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip") -set(OBJECTS_SHA1 "82930d549e0b3c3bce29718d5390c5cd474d0f28") +set(OBJECTS_SHA1 "2888092aab93df15bb78c4c910b13c33b1e318ef") -set(OPENSFX_VERSION "1.0.1") +set(OPENSFX_VERSION "1.0.2") set(OPENSFX_URL "https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v${OPENSFX_VERSION}/opensound.zip") -set(OPENSFX_SHA1 "8f04aea33f8034131c3069f6accacce0d94f80c1") +set(OPENSFX_SHA1 "64EF7E0B7785602C91AEC66F005C035B05A2133B") -set(OPENMSX_VERSION "1.0.1") +set(OPENMSX_VERSION "1.1.0") set(OPENMSX_URL "https://github.com/OpenRCT2/OpenMusic/releases/download/v${OPENMSX_VERSION}/openmusic.zip") -set(OPENMSX_SHA1 "8ff94490180e2fbfdd13a4130eb300da726ca406") +set(OPENMSX_SHA1 "8f0cf6b2fd4727e91b0d4062e7f199a43d15e777") -set(REPLAYS_VERSION "0.0.70") +set(REPLAYS_VERSION "0.0.77") set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip") -set(REPLAYS_SHA1 "09B339E86AAE81580C5AC3E23AC4BC9E030DA076") +set(REPLAYS_SHA1 "65CA6D830789C074F575F15E3F9E2C28691C24F8") option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") option(WITH_TESTS "Build tests") @@ -86,6 +86,8 @@ option(PORTABLE "Create a portable build (-rpath=$ORIGIN)" OFF) option(APPIMAGE "Create an appimage build (-rpath=$ORIGIN/../lib)" OFF) option(DOWNLOAD_TITLE_SEQUENCES "Download title sequences during installation." ON) option(DOWNLOAD_OBJECTS "Download objects during installation." ON) +option(DOWNLOAD_OPENSFX "Download OpenSoundEffects during installation." OFF) +option(DOWNLOAD_OPENMSX "Download OpenMusic during installation." OFF) CMAKE_DEPENDENT_OPTION(DOWNLOAD_REPLAYS "Download replays during installation." ON "WITH_TESTS" OFF) CMAKE_DEPENDENT_OPTION(MACOS_USE_DEPENDENCIES "Use OpenRCT2 dependencies instead of system libraries" ON @@ -158,6 +160,12 @@ if (MACOS_USE_DEPENDENCIES) endif () endif () +# If OS is Linux, import OpenSoundEffects and OpenMusic +if(UNIX AND NOT APPLE) + set(DOWNLOAD_OPENMSX ON) + set(DOWNLOAD_OPENSFX ON) +endif() + # LIST of supported flags, use SET_CHECK_CXX_FLAGS() to apply to target. # Use ADD_CHECK_CXX_COMPILER_FLAG() to add to list. set(SUPPORTED_CHECK_CXX_COMPILER_FLAGS "") @@ -449,6 +457,7 @@ if (NOT MACOS_BUNDLE OR (MACOS_BUNDLE AND WITH_TESTS)) include(${ROOT_DIR}/cmake/download.cmake) download_openrct2_zip( ZIP_VERSION ${OPENSFX_VERSION} + SKIP_IF_EXISTS ${CMAKE_SOURCE_DIR}/data/assetpack/openrct2.sound.parkap DOWNLOAD_DIR \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/ ZIP_URL ${OPENSFX_URL} SHA1 ${OPENSFX_SHA1} @@ -459,6 +468,7 @@ if (NOT MACOS_BUNDLE OR (MACOS_BUNDLE AND WITH_TESTS)) include(${ROOT_DIR}/cmake/download.cmake) download_openrct2_zip( ZIP_VERSION ${OPENMSX_VERSION} + SKIP_IF_EXISTS ${CMAKE_SOURCE_DIR}/data/assetpack/openrct2.music.alternative.parkap DOWNLOAD_DIR \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/ ZIP_URL ${OPENMSX_URL} SHA1 ${OPENMSX_SHA1} diff --git a/cmake/download.cmake b/cmake/download.cmake index de9d44b135..b129048a37 100644 --- a/cmake/download.cmake +++ b/cmake/download.cmake @@ -9,8 +9,8 @@ function(download_openrct2_zip) if (NOT EXISTS ${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}) set(DOWNLOAD_ZIP 1) else () - if (EXISTS "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/zipversion") - file(READ "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/zipversion" DOWNLOAD_OPENRCT2_CACHED_VERSION) + if (EXISTS "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}.zipversion") + file(READ "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}.zipversion" DOWNLOAD_OPENRCT2_CACHED_VERSION) if (NOT ${DOWNLOAD_OPENRCT2_CACHED_VERSION} STREQUAL ${DOWNLOAD_OPENRCT2_ZIP_VERSION}) message("Cache ${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR} not up to date") set(DOWNLOAD_ZIP 1) @@ -20,13 +20,13 @@ function(download_openrct2_zip) endif () endif () - foreach(check_exist_dir ${DOWNLOAD_OPENRCT2_SKIP_IF_EXISTS}) - if (EXISTS ${check_exist_dir}) - message("${check_exist_dir} exists, skipping download") + foreach(check_exist_file_or_dir ${DOWNLOAD_OPENRCT2_SKIP_IF_EXISTS}) + if (EXISTS ${check_exist_file_or_dir}) + message("${check_exist_file_or_dir} exists, skipping download") set(DOWNLOAD_ZIP 0) break() endif () - endforeach(check_exist_dir) + endforeach(check_exist_file_or_dir) if (DOWNLOAD_ZIP) message("Downloading ${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}") @@ -42,7 +42,7 @@ function(download_openrct2_zip) ) endif() file(WRITE - "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/zipversion" + "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}.zipversion" "${DOWNLOAD_OPENRCT2_ZIP_VERSION}" ) file(REMOVE "${DOWNLOAD_OPENRCT2_DOWNLOAD_DIR}/${ZIP_FILE_NAME}") diff --git a/cmake/platform.cmake b/cmake/platform.cmake index b7274fa827..d216e66e3c 100644 --- a/cmake/platform.cmake +++ b/cmake/platform.cmake @@ -3,7 +3,7 @@ function(target_link_platform_libraries target) if (APPLE) - target_link_libraries(${target} "-framework Cocoa") + target_link_libraries(${target} "-framework Cocoa -framework CoreServices") elseif(WIN32) target_link_libraries(${target} gdi32) endif () diff --git a/contributors.md b/contributors.md index 92818ab9b2..012819beb6 100644 --- a/contributors.md +++ b/contributors.md @@ -4,7 +4,6 @@ Includes all git commit authors. Aliases are GitHub user names. ## Development team * Ted John (IntelOrca) - Owner * Duncan Frost (duncanspumpkin) -* Michael Steenbeek (Gymnasiast) - translation management * Michał Janiszewski (janisozaur) * Hielke Morsink (Broxzier) * Tulio Paschoalin Leao (tupaschoal) @@ -18,6 +17,7 @@ Includes all git commit authors. Aliases are GitHub user names. * Richard Jenkins (rwjuk) * Aaron van Geffen (AaronVanGeffen) * Matthias Moninger (ZehMatt) +* Michael Steenbeek (Gymnasiast) ## Long term contributors The following people are not part of the development team, but have been contributing for a long time. @@ -101,6 +101,9 @@ The following people are not part of the development team, but have been contrib * Andrew Pratt (andrewpratt64) - Added api hook for vehicle crashes, api function to get entities on a tile * Karst van Galen Last (AuraSpecs) - Ride paint (bounding boxes, extra track pieces), soundtrack, sound effects, misc. * (8street) - Misc. +* Umar Ahmed (umar-ahmed) - MacOS file watcher +* Andrew Arnold (fidwell) - Added window support for more scenery groups. +* Josh Trzebiatowski (trzejos) - Ride and scenery filtering ## Bug fixes * (KirilAngelov) @@ -204,7 +207,13 @@ The following people are not part of the development team, but have been contrib * Xixiang Chen (jacknull1991) * (ReticulatingSplines) * Conrad Cash (HouseholdVTuber) - +* Michael Bickerton (mdbckrtn) +* Nehemiah Negussie (nehemiah-negussie) +* (zzril) +* Ernest Elgin (eaeiv) +* Ernest Wong (ErnWong) +* Joel H. (HtotheTML) +* John Mulcahy (jayjay300) ## Toolchain * (Balletie) - macOS @@ -252,7 +261,7 @@ The following people are not part of the development team, but have been contrib * Polish - Adrian Wielgosik (adrian17), (lopezloo), Michał Janiszewski (janisozaur) * Portuguese (BR) - (kaudy), (renansimoes), Tulio Paschoalin Leao (tupaschoal) * Russian - (Soosisya) -* Spanish - (mdtrooper), Josué Acevedo (Wirlie), Daniel Trujillo Viedma (gDanix); small fixes: (teapartycthulu) +* Spanish - Josué Acevedo (Wirlie), Diego Mateos (dimateos), (frenchiveruti), (mdtrooper), Daniel Trujillo Viedma (gDanix); small fixes: (teapartycthulu) * Swedish - (Jinxit), (mharrys), (Slimeyo), Matte Andersson (Nubbie) ## Graphics @@ -271,4 +280,4 @@ Representation by Jacqui Lyons at Marjacq Ltd. Thanks to: Peter James Adcock, Joe Booth, and John Wardley -Licensed to Infogrames Interactive Inc. \ No newline at end of file +Licensed to Infogrames Interactive Inc. diff --git a/data/language/ar-EG.txt b/data/language/ar-EG.txt index d766642676..0dbc8ebdc6 100644 --- a/data/language/ar-EG.txt +++ b/data/language/ar-EG.txt @@ -97,6 +97,7 @@ STR_0092 :LIM أفعوانية مُطلقة بواسطة STR_0093 :أفعوانية هجينة STR_0094 :أفعوانية سكة حديدية مفردة STR_0095 :أفعوانية جبال الألب +STR_0096 :أفعوانية خشبية كلاسيكية STR_0512 :أفعوانية دوارة مدمجة مع مرتفع حلزوني و إنخفاضات ملتفة ناعمة. STR_0513 :أفعوانية دوارة للأعلي حيث يبقي الركاب في مسار أفقي. STR_0514 :تتحرك القطارات المعلقة أسفل مسار الإفعوانية الدوارة إلى الجانب وحول الزوايا @@ -179,6 +180,7 @@ STR_0602 :Roller coaster trains are accelerated out of the station by linear STR_0603 :أفعوانية خشبية مع مسار فولاذي، تسمح بإنحدارت وإنعكاسات حادة. STR_0604 :يركب الراكبون سيارة صغيرة على مسار أحادي ضيق، حيث يتسابقون عبر طرق مُنعكسة وملفات حادة. STR_0605 :يتزلق الراكبون على مسار فولاذي متعرج، مع إستخدام المكابح للتحكم في السرعة +STR_0606 :أفعوانية خشبية قديمة الطراز تتميز بركوب سريع ووعر، مع الكثير من التعلق بالهواء، وقوة تسارع جانبية قوية مصممة لتشعر الراكب بإنه "خارج عن السيطرة" STR_0767 :زائر {INT32} STR_0768 :رجل مساعد {INT32} STR_0769 :ميكانيكي {INT32} @@ -1244,7 +1246,7 @@ STR_1863 :رجل مُساعد STR_1864 :ميكانيكي STR_1865 :رجل الأمن STR_1866 :مُرفه -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Can’t change number of rotations… STR_1869 :{WINDOW_COLOUR_2}Number of rotations: STR_1870 :Number of complete rotations @@ -1676,7 +1678,7 @@ STR_2314 :{WINDOW_COLOUR_2}Ride length: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Cost: {BLACK}around {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Space required: {BLACK}{COMMA16} × {COMMA16} blocks STR_2321 :{WINDOW_COLOUR_2}Number of rides/attractions: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Staff: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Staff: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}sq.ft. STR_2325 :Buy land to extend park @@ -2653,7 +2655,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :الأسم موجود بالفعل STR_5440 :Minimise fullscreen on focus loss -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behaviour) STR_5442 :Force park rating: STR_5447 :النوع {STRINGID} STR_5448 :رحلة / مركبة {STRINGID} @@ -2996,7 +2997,7 @@ STR_5832 :Show height as generic units instead of measurement format set unde STR_5833 :Changes what date format is used STR_5834 :Select which audio device OpenRCT2 will use STR_5835 :Mute the game if the window loses focus -STR_5836 :Select music to use on the main menu.{NEWLINE}Selecting RCT1 theme requires that you copy ‘data/css17.dat’ from your RCT1 game folder to ‘data/css50.dat’ in your RCT2 folder, or set the path to RCT1 in the Miscellaneous tab. +STR_5836 :حدد الموسيقى المستخدمة في القائمة الرئيسية.{NEWLINE}يتطلب تحديد سمة محاكي الافعوانيات 1 تعيين المسار إلى محاكي الافعوانيات 1 في تبويب الخيارات المتقدمة. STR_5837 :Create and manage custom UI themes STR_5838 :Show a separate button for the finance window in the toolbar STR_5839 :Show a separate button for the research and development window in the toolbar @@ -3424,7 +3425,7 @@ STR_6318 :{STRING} :ملف السجل {NEWLINE}.تم إكتشاف إنفصا STR_6319 :مكابح البلوك مغلقة STR_6320 :غير قابل للتدمير STR_6321 :الإضافة متضررة -STR_6322 :{WINDOW_COLOUR_2} {BLACK}{INT32} :رقم النقش المتحرك +STR_6322 :{WINDOW_COLOUR_2} {BLACK}{INT32} :معرف العنصر STR_6323 :يُحاكي STR_6324 :حاكي STR_6325 :حاكي الرحلة/المزار @@ -3592,7 +3593,9 @@ STR_6487 :تفعيل شاهد من خلال العاملون STR_6488 :{RED}يشكو الضيوف من طوابير الإنتظار الطويلة بحديقتك.{NEWLINE}قلل الطوابير الطويلة المسببة للمشكلة، أو زد عدد الرحلات. STR_6489 :خطأ: نسخة حديقة غير مدعومة STR_6490 :تحذير: نسخة حديقة شبه مدعومة +STR_6491 :حُفظت هذه الحديقة في نسخة أحدث من اللعبة. الحديقة نسخة {INT32} و تتطلب علي الأقل نسخة{INT32}. STR_6492 :حُفظت هذه الحديقة في نسخة قديمة من اللعبة، ولا يمكن فتحها في النسخة الحالية من اللعبة. نسخة الحديقة هي{INT32}. +STR_6493 :حُفظت هذه الحديقة في نسخة أحدث من اللعبة، ربما فُقدت بعض البيانات. نسخة الحديقة هي{INT32} وتتطلب علي الأقل نسخة{INT32}. STR_6494 :تجميع حسب نوع الرحلة STR_6495 :مجموعة الرحلات حسب نوع الرحلة بدلاً من عرض كل مركبة على حدة. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3601,7 +3604,31 @@ STR_6498 :غير قادر على إبقاء شكل الخريطة بهيئة STR_6499 :نوع السيارة غير مدعوم بتنسيق تصميم المسار STR_6500 :عناصر المسار غير مدعومة بتنسيق تصميم المسار STR_6501 :لون عشوائي +STR_6502 :أدخل قيمة بين {COMMA16} و {COMMA16} +STR_6503 :حدد على الأقل عنصر محطة واحد +STR_6504 :حدد على الأقل عنصر تربة واحد +STR_6505 :حدد على الأقل حد عنصر تربة واحد +STR_6506 :نصف لولبي كبير (شمال) +STR_6507 :نصف لولبي كبير (يمين) +STR_6508 :نصف حلقة متوسطة (شمال) +STR_6509 :نصف حلقة متوسطة (يمين) +STR_6510 :لفة انعدامية الوزن (شمال) +STR_6511 :لفة انعدامية الوزن (يمين) +STR_6512 :لفة كبيرة انعدامية الوزن (شمال) +STR_6513 :لفة كبيرة انعدامية الوزن (يمين) STR_6514 :ارتفاع غير صحيح! +STR_6520 :حزمة الملفات +STR_6521 :أولوية منخفضة +STR_6522 :أولوية مرتفعة +STR_6523 :تقليل أولوية حزمة الملفات المحددة. +STR_6524 :زيادة أولوية حزمة الملفات المحددة. +STR_6525 :أعد تحميل جميع الملفات في اللعبة بحزم الملفات الممكّنة. +STR_6526 :(الرسوميات القياسية، الموسيقي والمؤثرات الصوتية) +STR_6528 :معاملات مسار غير صحيحة! +STR_6529 :معلمة نظام الألوان غير صحيح! +STR_6530 :حزمة توسوعية منشئة بالمستخدم +STR_6531 :آلة السفر عبر الزمن +STR_6532 :عالم أحلام كاتي ############# # Scenarios # @@ -4024,8 +4051,8 @@ STR_DTLS :حاول أن تبني أصغر حديقة ملاهي ربحية ## Real Parks from RCT1 # None of them had details -STR_SCNR :ألتون تاورز -STR_PARK :ألتون تاورز +STR_SCNR :أبراج ألتون +STR_PARK :أبراج ألتون STR_DTLS : @@ -4041,10 +4068,12 @@ STR_DTLS : ## Misc parks from RCT1 # Had no details -STR_SCNR :حصن مفارقة تاريخية -STR_PARK :حصن مفارقة تاريخية +STR_SCNR :حصن المفارقة تاريخية +STR_PARK :حصن المفارقة تاريخية STR_DTLS : + + ########### # Scenery # ########### @@ -4124,8 +4153,8 @@ STR_PARK :الحقول الكهربائية STR_DTLS :لقد ورثت مزرعة صغيرة، والتحدي الذي تواجهه هو بناء حديقة صغيرة بين الحقول والمباني الزراعية -STR_SCNR :Extreme Heights -STR_PARK :Extreme Heights +STR_SCNR :الأرتفاعات القصوي +STR_PARK :الأرتفاعات القصوي STR_DTLS :Free of financial restrictions, your challenge is to expand this desert park to attract people seeking the ultimate thrills @@ -4184,9 +4213,9 @@ STR_PARK :Six Flags Magic Mountain STR_DTLS :Build the missing Six Flags rides, or create your own designs to improve the park! But don’t forget your ultimate aim: to repay your loan while keeping the park value up! -STR_SCNR :Six Flags over Texas -STR_PARK :Six Flags over Texas -STR_DTLS :Build the missing Six Flags rides, or create your own designs to improve the park! But don’t forget your ultimate aim: to attract more guests to the park! +STR_SCNR :ستة أعلام فوق تكساس +STR_PARK :ستة أعلام فوق تكساس +STR_DTLS :قم ببناء جولات الأعلام الستة المفقودة، أو قم بإنشاء تصميماتك الخاصة لتحسين الحديقة! لكن لا تنس هدفك النهائي: جذب المزيد من الضيوف إلى الحديقة! ############################################################################### ## Wacky Worlds Scenarios @@ -4356,3 +4385,106 @@ STR_DTLS :شهدت مدينة ملاهي القديمة هذه أيامًا STR_SCNR :عالم الباندا STR_PARK :عالم الباندا STR_DTLS :أضف رحلات أكثر وقم بجذب مزيد من الناس إلى الحديقة بطابع الباندا + + +STR_SCNR :حديقة تايكون +STR_PARK :حديقة تايكون +STR_DTLS : + +##### + +STR_SCNR :مقبرة التلال +STR_PARK :مقبرة التلال +STR_DTLS :هذا عيد الهالوين ،UCES هالوين، القرع يصرخ في جوف الليل! هذه المقبرة في ورطة والأمر متروك لك لإنقاذها مع ترك الموتى يرقدون بسلام! هل يمكنك إبقاء الأشباح في قبورهم وتجلب القشعريرة لعملائك؟{NEWLINE}المؤلف: Squid + +############################################################################### +## UCES: The Time Machine (2003) +############################################################################### + +STR_SCNR :منارة الأسكندرية +STR_PARK :منارة الأسكندرية +STR_DTLS :بنى الإسكندر هذه المدينة. ترك الإغريق والرومان والمصريون بصماتهم. ولكن كان التكريم الأكبر هو أعجوبة العالم القديم - المنارة. قم بزيارتها وإنشئ حديقة ترفيهية!{NEWLINE}المؤلف: Katatude + + +STR_SCNR :حديقة لونا، كليفلاند +STR_PARK :حديقة لونا +STR_DTLS :كما كانت في يوم أفتتاحها - 18 مايو 1905.{NEWLINE}المؤلف: Aetherwave + + +STR_SCNR :جبل فيزوف +STR_PARK :جبل فيزوف +STR_DTLS :بومبي وهيركولانيوم دفنهم جبل فيزوف في 79 قبل الميلاد. قم بزيارة الحفريات وقم ببناء حديقة!{NEWLINE}المؤلف: Katatude + + +STR_SCNR :صندوق التجارب +STR_PARK :صندوق التجارب +STR_DTLS :ما يريده الجميع - صندوق تجارب! لذا خذ سطلًا صغيرًا ومجرفة وأستعد لبناء الحديقة!{NEWLINE}المؤلف: Katatude + + +STR_SCNR :شلالات نياجرا والمضيق +STR_PARK :شلالات نياجرا +STR_DTLS :الشلالات الأمريكية، وشلالات برايدل، وشلالات حدوة الحصان الكندية على حدود نياجرا فرونتير، 1850.{NEWLINE}المؤلف: Katatude + + +STR_SCNR :منقبي الصخور الجبلية +STR_PARK :منقبي الصخور الجبلية +STR_DTLS :تسبب الانهيار الصخري في إتلاف السكك الحديدية الخاصة بك. لقد ذهب عمالك للتنقيب. هل يوجد ذهب في الأفوانيات?{NEWLINE}المؤلفون: Squid, Buckone, Fossil + + +STR_SCNR :آلة السفر عبر الزمن +STR_PARK :آلة السفر عبر الزمن +STR_DTLS :آلة السفر عبر الزمن. صمم لتذهب - عندما تريد، أينما تريد. الأبدية تنتظر. انها كلها نسبية.{NEWLINE}المؤلف: Katatude + + +STR_SCNR :برج بابل +STR_PARK :برج بابل +STR_DTLS :قف! انظر أين أخذتنا آلة الزمن الآن! أين ذهب الجميع?{NEWLINE}المؤلف: Fossil + + +STR_SCNR :التحول +STR_PARK :التحول +STR_DTLS :كنا نتوقع ظهورك…{NEWLINE}المؤلف: Fossil + + +STR_SCNR :المدينة المجهولة +STR_PARK :المدينة المجهولة +STR_DTLS :سئم الرومان من معارك المصارع المملة. امنحهم الإثارة الأفضل، وحوّل هذه المدينة الرومانية إلى أعظم مدينة ملاهي على الإطلاق!{NEWLINE}المؤلف: Kaffe + +############################################################################### +## UCES: Katy’s Dreamworld (2003) +############################################################################### + + +STR_SCNR :تحت شجرة عيد الميلاد +STR_PARK :أرض عجائب الشتاء +STR_DTLS :قامت أمي ببناء هذا المشهد تحت شجرتنا. الآن تريد إنشاء حديقة فيها! هل يمكنك المساعدة?{NEWLINE}المؤلف: Katatude + + +STR_SCNR :انفجار بيجروك +STR_PARK :انفجار بيجروك +STR_DTLS :بعد انفجار في شركة شركة بيجروك للتعدين، يتعين على سكان بيجروك بناء مدينة ملاهي للحفاظ على حياة بلدتهم.{NEWLINE}المؤلفان: rbarclay & buckone + + +STR_SCNR :معسكر الطائر المحاكي +STR_PARK :معسكر الطائر المحاكي +STR_DTLS :500 دولار فقط في الأسبوع لهذا المخيم الصيفي! أسترح وإفتح البنك الخاص بك ثم استمتع وقم ببناء حديقة.{NEWLINE}المؤلف: Katatude + + +STR_SCNR :مدينة تشو تشو +STR_PARK :مدينة تشو تشو +STR_DTLS :ماما! بابا! أريد الذهاب لمدينة تشو تشو!{NEWLINE}المؤلف: Fossil + + +STR_SCNR :جزر التنين +STR_PARK :جزر التنين +STR_DTLS :جزر التنين? لست متأكدًا من أنني أريد الذهاب إلى هناك…{NEWLINE}المؤلف: Fossil + + +STR_SCNR :كرنفال الأطفال 2 +STR_PARK :كرنفال الأطفال +STR_DTLS :يا أطفال! هيا نمرح!{NEWLINE}المؤلفان: Piehead & Fossil + + +STR_SCNR :الكثبان الرملية +STR_PARK :الكثبان الرملية +STR_DTLS :باعتبارك مالكًا لمتنزه صغير، فقد اشتريت قطعة أرض كبيرة على طول الشاطئ للتوسع وجذب المزيد من الضيوف لزيارة الكثبان الرملية الجميلة، ولكن احذر: لا يمكنك إزعاج تلك الكثبان الرملية الهشة بيئيًا.{NEWLINE}المؤلف: rbarclay \ No newline at end of file diff --git a/data/language/ca-ES.txt b/data/language/ca-ES.txt index fa383c0dda..e0f3a5dabe 100644 --- a/data/language/ca-ES.txt +++ b/data/language/ca-ES.txt @@ -1246,7 +1246,7 @@ STR_1863 :Encarregat de neteja STR_1864 :Mecànic STR_1865 :Guarda de seguretat STR_1866 :Animador -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :El nombre de voltes no es pot canviar… STR_1869 :{WINDOW_COLOUR_2}Nombre de voltes: STR_1870 :Nombre de voltes completes @@ -1533,7 +1533,7 @@ STR_2162 :Cartrons de beguda buits STR_2163 :Tasses de suc buides STR_2164 :Salsitxes rostides STR_2165 :Bols buits -STR_2169 :una galeta Pretzel +STR_2169 :una galeta pretzel STR_2170 :una xocolata calenta STR_2171 :un te gelat STR_2172 :un xurro @@ -1678,7 +1678,7 @@ STR_2314 :{WINDOW_COLOUR_2}Longitud del recorregut: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Cost: {BLACK}al voltant de {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Espai necessari: {BLACK}{COMMA16} × {COMMA16} blocs STR_2321 :{WINDOW_COLOUR_2}Nombre d’atraccions: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Empleats: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Empleats: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Extensió del parc: {BLACK}{COMMA32} m² STR_2324 :{WINDOW_COLOUR_2}Mida del parc: {BLACK}{COMMA32} ft² STR_2325 :Compreu terreny per a ampliar el parc. @@ -2209,7 +2209,7 @@ STR_3134 :{RED}(El disseny inclou algun decorat no disponible) STR_3135 :{RED}(Disseny de vehicle no disponible - Això pot afectar al rendiment de l’atracció) STR_3136 :Avís: Aquest disseny es construirà amb un tipus de vehicle alternatiu i potser no funcionarà com s’espera. STR_3137 :Trieu decorat proper -STR_3138 :Reestableix la selecció +STR_3138 :Restableix la selecció STR_3139 :El cable d’elevació no pot funcionar en aquest mode. STR_3140 :El cable d’elevació ha de començar immediatament després de l’andana. STR_3141 :No es pot establir un multicircuit si l’atracció té cable d’elevació. @@ -2655,7 +2655,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :El nom ja existeix. STR_5440 :Minimitza la pantalla completa si es perd el focus -STR_5441 :Identifica les atraccions per tipus de via.{NEWLINE}Així els vehicles després{NEWLINE}poden modificar-se (com al RCT1). STR_5442 :Força la valoració del parc: STR_5447 :Tipus {STRINGID} STR_5448 :Atracció/Vehicle {STRINGID} @@ -2998,7 +2997,7 @@ STR_5832 :Mostra les alçades com a unitats genèriques (-2, -1, 0, +1, +2… STR_5833 :Canvia el format de les dates. STR_5834 :Trieu quin dispositiu de so ha de fer servir l’OpenRCT2. STR_5835 :Silencia el joc si la finestra perd el focus. -STR_5836 :Seleccioneu la peça de música per al menú principal.{NEWLINE}Si seleccioneu el tema del RCT1, cal que establiu correctament la carpeta del RCT1 a la pestanya d’altres opcions. +STR_5836 :Seleccioneu la peça de música per al menú principal.{NEWLINE}Si seleccioneu el tema del RCT1, cal que establiu correctament la carpeta del RCT1 a la pestanya d’opcions avançades. STR_5837 :Crea i gestiona els temes de la interfície personalitzats. STR_5838 :Mostra el botó de la finestra de finances a la barra d’eines. STR_5839 :Mostra el botó de la finestra de recerques a la barra d’eines. @@ -3313,7 +3312,7 @@ STR_6162 :«Wild Mouse» giratori STR_6163 :Vagons amb forma de ratolí que es mouen a tota velocitat per giravolts i petits descensos, girant suaument que desorienten els passatgers. STR_6164 :{WHITE}❌ STR_6165 :Sincronització vertical -STR_6166 :Sincronitza cada fotograma anb la freqüència del monitor, evitant l’efecte de pantalla partida. +STR_6166 :Sincronitza cada fotograma amb la freqüència del monitor, evitant l’efecte de pantalla partida. STR_6167 :Avançat STR_6168 :Seqüència inicial STR_6169 :Selecció d’escenari @@ -3346,7 +3345,7 @@ STR_6221 :Establirà la casella actualment seleccionada com a entrada o sorti STR_6222 :No es pot situar aquest punt com a entrada dels visitants… STR_6223 :Ha d’estar fora dels límits del parc! STR_6224 :{STRING} ha situat un punt d’entrada dels visitants. -STR_6225 :Funció no soportada amb l’OpenGL com a renderitzador +STR_6225 :Funció no suportada amb l’OpenGL com a renderitzador STR_6226 :Activa la finalització avançada de l’escenari STR_6227 :Permet completar l’escenari abans de la data límit si es compleixen tots els objectius. STR_6228 :Opcions d’escenari @@ -3431,7 +3430,7 @@ STR_6318 :S’ha detectat una dessincronització amb la xarxa.{NEWLINE}Fitxer STR_6319 :Frens de bloc tancats STR_6320 :Indestructible STR_6321 :L’addició està trencada -STR_6322 :{WINDOW_COLOUR_2}ID de l’sprite: {BLACK}{INT32} +STR_6322 :{WINDOW_COLOUR_2}ID de l’entitat: {BLACK}{INT32} STR_6323 :Es simula STR_6324 :Simula STR_6325 :Simula l’atracció @@ -3455,8 +3454,8 @@ STR_6343 :Inspecció de casella: Augmenta la coordenada Y STR_6344 :Inspecció de casella: Redueix la coordenada Y STR_6345 :Inspecció de casella: Augmenta l’alçada de l’element STR_6346 :Inspecció de casella: Redueix l’alçada de l’element -STR_6347 :No es poden posar elements adicionals en camins en passos a nivell! -STR_6348 :Treieu el pas de nivell abans! +STR_6347 :No es poden posar elements addicionals en camins en passos a nivell! +STR_6348 :Traieu el pas de nivell abans! STR_6349 :Seqüència de títol aleatòria STR_6350 :Escampa STR_6351 :Eina d’escenari d’escampar @@ -3598,7 +3597,9 @@ STR_6487 :Alterna veure a través dels treballadors STR_6488 :{RED}Els visitants es queixen de les llargues cues del parc.{NEWLINE}Considereu escurçar les més problemàtiques o augmentar el rendiment de les atraccions. STR_6489 :Error: Versió de parc no compatible STR_6490 :Avís: Versió de parc parcialment compatible +STR_6491 :Aquest parc es va desar amb una versió de l’OpenRCT2 posterior. Es va desar amb la versió v{INT32} i es requereix almenys la versió v{INT32}. Ara mateix, feu servir la versió v{INT32}. STR_6492 :Aquest parc es va desar amb una versió antiga de l’OpenRCT2 i no es pot obrir amb aquesta versió. La versió del parc és v{INT32}. +STR_6493 :Aquest parc es va desar amb una versió de l’OpenRCT2 posterior i es poden perdre dades. La versió del parc és v{INT32}. Ara mateix, feu servir la versió v{INT32}. STR_6494 :Agrupa per tipus d’atracció STR_6495 :Agrupa les atraccions per tipus en lloc de mostrar els vehicles per separat. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3624,9 +3625,9 @@ STR_6511 :Volta de gravetat zero (a la dreta) STR_6512 :Volta de gravetat zero gran (a l’esquerra) STR_6513 :Volta de gravetat zero gran (a la dreta) STR_6514 :Altura no vàlida! -STR_6515 :{BLACK}No s’ha enllaçat el RCT1. S’empraran imatges alternatives. -STR_6516 :Un o més objectes que s’han afegit necessiten l’enllaç al RCT1 per a veure’ls correctament. Es faran servir imatges alternatives. -STR_6517 :Un o més objectes d’aquest parc necessiten l’enllaç al RCT1 per a veure’ls correctament. Es faran servir imatges alternatives. +STR_6515 :{BLACK}No s’ha enllaçat el RollerCoaster Tycoon 1. S’empraran imatges alternatives. +STR_6516 :Un o més objectes que s’han afegit necessiten l’enllaç al RollerCoaster Tycoon 1 per a veure’ls correctament. Es faran servir imatges alternatives. +STR_6517 :Un o més objectes d’aquest parc necessiten l’enllaç al RollerCoaster Tycoon 1 per a veure’ls correctament. Es faran servir imatges alternatives. STR_6518 :{BLACK}Situeu el ratolí damunt d’un escenari per a veure la seva descripció i els seus objectius. Feu clic per a començar a jugar. STR_6519 :Extres STR_6520 :Paquets de recursos @@ -3637,6 +3638,20 @@ STR_6524 :Augmenta la prioritat del paquet de recursos. STR_6525 :Recarrega tots els recursos del joc amb els paquets de recursos activats. STR_6526 :(gràfics base, música i efectes de so) STR_6527 :Competicions +STR_6528 :Paràmetres de via no vàlids! +STR_6529 :Paràmetre d’esquema de color no vàlid! +STR_6530 :Expansió creada pels usuaris +STR_6531 :La màquina del temps +STR_6532 :El món de fantasia de la Katy +STR_6533 :{WINDOW_COLOUR_2}Factor d’emoció: {BLACK}-{COMMA16} % +STR_6534 :{WINDOW_COLOUR_2}Factor d’intensitat: {BLACK}-{COMMA16} % +STR_6535 :{WINDOW_COLOUR_2}Factor de nàusea: {BLACK}-{COMMA16} % +STR_6536 :Aquest parc es va desar en una versió posterior de l’OpenRCT2. Es va desar amb la versió v{INT32} i ara mateix esteu fent servir la v{INT32}. +STR_6537 :Permet fer servir els camins normals per a fer cues +STR_6538 :Mostra els camins normals al menú desplegable de les cues de la finestra de construcció corresponent. +STR_6539 :Fre tancat +STR_6540 :{WINDOW_COLOUR_2}Donem les gràcies a les companyies següents per permetre fer servir les seves imatges: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG ############# # Scenarios # @@ -3679,8 +3694,8 @@ STR_PARK :Les illes Trinitat STR_DTLS :La base d’aquest parc la formen diverses illes. -STR_SCNR :El món dels somnis de la Katie -STR_PARK :El món dels somnis de la Katie +STR_SCNR :El món de fantasia de la Katie +STR_PARK :El món de fantasia de la Katie STR_DTLS :Un parc temàtic petit amb unes quantes atraccions i espai per a expandir-lo. El vostre objectiu és duplicar-ne el valor. @@ -4243,7 +4258,7 @@ STR_DTLS :S’ha construït una presa que ofereix energia hidroelèctrica bar STR_SCNR :Antàrtida - Rescat ecològic 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_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 @@ -4263,7 +4278,7 @@ STR_DTLS :El maharajà us ha destinat aquí per tal que proporcioneu entreten STR_SCNR :Austràlia - Uluru STR_PARK :L’aventura Uluru -STR_DTLS :Esteu ajudant els aborígens a construir un parc dins del programa de conciencació cultural. Necessiteu un gran nombre de visitants per a instruir-los en l’herència cultural única de la població indígena. +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 @@ -4356,7 +4371,7 @@ STR_DTLS :Us han assignat la tasca de construir un parc de l’era juràssica STR_SCNR :Prehistòric - L’edat de pedra 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 terrny és un poc inhòspit. +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ó @@ -4390,3 +4405,100 @@ STR_DTLS :Aquest parc temàtic ha vist millors dies. Ajudeu al propietari a d STR_SCNR :Món Panda STR_PARK :Món Panda STR_DTLS :Afegiu més atraccions i atraieu més visitants a aquest parc temàtic inspirat en els pandes. + + +STR_SCNR :La cresta del cementiri +STR_PARK :La cresta del cementiri +STR_DTLS :Aquest Halloween, el Halloween UCES, les carabasses cridaran durant les hores més fosques de la nit! Aquest cementiri té problemes i l’heu de salvar, al mateix temps que heu de permetre que els morts descansin en pau. Podeu deixar tranquils els fantasmes a les seves tombes i fer que els visitants s’estremeixin?{NEWLINE}Autor: Squid + +############################################################################### +## UCES: The Time Machine (2003) +############################################################################### + +STR_SCNR :El Far d’Alexandria +STR_PARK :El Far d’Alexandria +STR_DTLS :Alexandre el Gran construí la ciutat; els grecs, els romans i els egipcis hi van deixar la seva petjada. Però l’honor més gran és una meravella del món antic: el Far d’Alexandria. Visiteu-lo i construïu-hi un parc!{NEWLINE}Autor: Katatude + + +STR_SCNR :Luna Park, Cleveland +STR_PARK :Luna Park +STR_DTLS :Tal i com era el dia de la seva inauguració, el dia 18 de maig de 1.905.{NEWLINE}Autor: Aetherwave + + +STR_SCNR :El Mont Vesuvi +STR_PARK :El Mont Vesuvi +STR_DTLS :Pompeia i Herculà van quedar soterrades pel mont Vesuvi l’any 79 dC. Visiteu les excavacions i construïu-hi un parc!{NEWLINE}Autor: Katatude + + +STR_SCNR :The Sandbox +STR_PARK :The Sandbox +STR_DTLS :Tot el que tothom desitja: una caixa d’arena. Així que agafeu la vostra petita pala i a construir-hi un parc!{NEWLINE}Autor: Katatude + + +STR_SCNR :Niagara Falls & Gorge +STR_PARK :Niagara Falls +STR_DTLS :Les Cascades Americanes, les del Vel de la Núvia i les cataractes Horseshoe canadenques a la frontera del Niàgara, 1850.{NEWLINE}Autor: Katatude + + +STR_SCNR :Els miners de les Muntanyes Rocoses +STR_PARK :Els miners de les Muntanyes Rocoses +STR_DTLS :Un despreniment ha fet malbé el ferrocarril. Els treballadors ara mateix no hi són. Hi ha or a les muntanyes russes?{NEWLINE}Autors: Squid, Buckone, Fossil + + +STR_SCNR :La màquina del temps +STR_PARK :La màquina del temps +STR_DTLS :La màquina del temps. Construïda per a anar on vulgueu quan vulgueu. L’eternitat us espera. Tot és relatiu.{NEWLINE}Autor: Katatude + + +STR_SCNR :La Torre de Babel +STR_PARK :La Torre de Babel +STR_DTLS :Ua! Mireu on ens ha dut la màquina del temps! On ha anat tothom?{NEWLINE}Autor: Fossil + + +STR_SCNR :Transformació +STR_PARK :Transformació +STR_DTLS :Us estàvem esperant…{NEWLINE}Autor: Fossil + + +STR_SCNR :Urbis Incognitus +STR_PARK :Urbis Incognitus +STR_DTLS :Els romans estan cansats de lluites avorrides de gladiadors. Doneu-los altres entreteniments i convertiu la ciutat romana en el parc d’atraccions més gran de tots els temps!{NEWLINE}Autor: Kaffe + +############################################################################### +## UCES: Katy’s Dreamworld (2003) +############################################################################### + + +STR_SCNR :Sota l’arbre de Nadal +STR_PARK :El món de fantasia hivernal +STR_DTLS :La meva mare ha construït aquesta escena a sota de l’arbre de Nadal. Ara vol que hi construïm un parc a dins! Ens podeu ajudar?{NEWLINE}Autor: Katatude + + +STR_SCNR :Explosió a Rocagrossa +STR_PARK :Explosió a Rocagrossa +STR_DTLS :Després de l’explosió de la Companyia Minera Rocagrossa, la gent de Rocagrossa han de construir un parc d’atraccions per a mantenir el seu poble amb vida.{NEWLINE}Autors: rbarclay & buckone + + +STR_SCNR :Camp Rossinyol +STR_PARK :Camp Rossinyol +STR_DTLS :Només 500 $ per setmana per aquest campament d’estiu! Obriu el banc, divertiu-vos i construïu-hi un parc.{NEWLINE}Autor: Katatude + + +STR_SCNR :Poblet Xu-xu-xú +STR_PARK :Poblet Xu-xu-xú +STR_DTLS :Mamà! Papa! Vull anar al Poblet Xu-xu-xú!{NEWLINE}Autor: Fossil + + +STR_SCNR :Arxipèlag del Drac +STR_PARK :Arxipèlag del Drac +STR_DTLS :Illes del Drac? No estic segur que hi vulgui anar…{NEWLINE}Autor: Fossil + + +STR_SCNR :Carnaval infantil II +STR_PARK :Carnaval infantil +STR_DTLS :Ei, nens! Divertiu-vos!{NEWLINE}Autors: Piehead & Fossil + + +STR_SCNR :Les dunes d’arena +STR_PARK :Les dunes d’arena +STR_DTLS :Com a propietari d’un parc petit, heu comprat una parcel·la enorme al costat de la platja per a expandir i atraure més visitants a les dunes de sorra precioses. Però, aneu amb compte: no podeu pertorbar l’ecologia fràgil de les dunes d’arena.{NEWLINE}Autor: rbarclay diff --git a/data/language/cs-CZ.txt b/data/language/cs-CZ.txt index e0049f9da8..8af183805e 100644 --- a/data/language/cs-CZ.txt +++ b/data/language/cs-CZ.txt @@ -1248,7 +1248,7 @@ STR_1863 :údržbář STR_1864 :mechanik STR_1865 :hlídač STR_1866 :maskot -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Nelze změnit počet otoček… STR_1869 :{WINDOW_COLOUR_2}Počet otoček: STR_1870 :Počet celých otoček @@ -1680,7 +1680,7 @@ STR_2314 :{WINDOW_COLOUR_2}Délka jízdy: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Cena: {BLACK}okolo {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Vyžadovaný prostor: {BLACK}{COMMA16} × {COMMA16} dlaždic STR_2321 :{WINDOW_COLOUR_2}Celkem atrakcí: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Personál: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Personál: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Velikost parku: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Velikost parku: {BLACK}{COMMA32}čtverečních stop STR_2325 :Přikoupit k parku pozemky @@ -2655,7 +2655,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Název již existuje STR_5440 :Minimalizovat celoobrazovkový režim při přepnutí ze hry -STR_5441 :Identifikovat atrakce podle typu,{NEWLINE}aby šly měnit vozy (RCT1 chování) STR_5442 :Hodnocení parku: STR_5447 :Typ {STRINGID} STR_5448 :Atrakce/vůz {STRINGID} @@ -3596,7 +3595,9 @@ STR_6487 :Skrýt přepnutí zaměstnanců STR_6488 :{RED}Hosté si stěžují na dlouhé fronty v parku.{NEWLINE}Zvažte zkrácení front, nebo zvýšení kapacit atrakcí. STR_6489 :Chyba: Nekompatibilní verze parku STR_6490 :Varování: Částečne kompatibilní verze parku +STR_6491 :Tenhle park byl uložen v novější verzi OpenRCT2. Park je verze {INT32} a vyžaduje alespoň verzi {INT32}. STR_6492 :Tenhle park byl uložen v staré verzi OpenRCT2, a nemůže být otevřen touhle verzí. Park je verze {INT32}. +STR_6493 :Tenhle park byl uložen v novější verzi OpenRCT2, některá data mohou být stracena. Park je verze {INT32} a vyžaduje alespoň verzi {INT32}. STR_6494 :Zoskupit podle typu atrakce STR_6495 :Zoskupit atrakce podle druhu místo zobrazení každé odděleně. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} diff --git a/data/language/da-DK.txt b/data/language/da-DK.txt index 0f561fcb46..b1611cc631 100644 --- a/data/language/da-DK.txt +++ b/data/language/da-DK.txt @@ -1243,7 +1243,7 @@ STR_1863 :Handymand STR_1864 :Mekaniker STR_1865 :Sikkerhedsvagt STR_1866 :Entertainer -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Kan ikke ændre antallet af rotationer… STR_1869 :{WINDOW_COLOUR_2}Antal rotationer: STR_1870 :Komplet antal af rotationer @@ -1673,7 +1673,7 @@ STR_2314 :{WINDOW_COLOUR_2}Forlystelse længde: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Pris: {BLACK}omkring {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Krævet plads: {BLACK}{COMMA16} x {COMMA16} felter STR_2321 :{WINDOW_COLOUR_2}Antal forlystelser/attraktioner: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Personale: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Personale: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park størrelse: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Park størrelse: {BLACK}{COMMA32}sq.ft. STR_2325 :Køb land for at udvide parken @@ -2648,7 +2648,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Navn eksisterer allerede STR_5440 :Minimer fuldskærm ved tab af fokus -STR_5441 :Identificer forlystelser Efter skinne type{NEWLINE}Så køretøjer kan skiftes{NEWLINE}bagefter (RCT1 opførsel) STR_5442 :Tving parkvurdering: STR_5447 :Type {STRINGID} STR_5448 :Forlystelse / Vogn {STRINGID} @@ -3591,7 +3590,9 @@ STR_6487 :Skift gennemsigtig personale STR_6488 :{RED}Gæster klager over længden af køerne i din park.{NEWLINE}Overvej at forkorte problematiske køer eller øge forlystelsernes gennemstrømning. STR_6489 :Fejl: Inkompatibel Park Version STR_6490 :Advarsel: Semi-kompatibel Park Version +STR_6491 :Denne park blev gemt i en nyere version af OpenRCT2. Parken er v{INT32} og kræver mindst v{INT32}. STR_6492 :Denne park er gemt i en ældre version af OpenRCT2, og kan ikke åbnes med denne version af OpenRCT2. Parken er v{INT32}. +STR_6493 :Denne park blev gemt i en nyere version af OpenRCT2, nogle data kan gå tabt. Parken er v{INT32} og kræver mindst v{INT32}. STR_6497 :Klik på et felt for at vise dets felt elementer.{NEWLINE}Ctrl + Klik et felt element for at vælge det direkte. STR_6498 :Aktiver for at fastholde kvadratisk kortfacon. STR_6499 :Køretøjstype understøttes ikke af spor design formatet diff --git a/data/language/de-DE.txt b/data/language/de-DE.txt index aca7a1c337..87fb99fd14 100644 --- a/data/language/de-DE.txt +++ b/data/language/de-DE.txt @@ -1246,7 +1246,7 @@ STR_1863 :Parkpfleger STR_1864 :Mechaniker STR_1865 :Aufseher STR_1866 :Animateur -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Anzahl der Drehungen kann nicht geändert werden… STR_1869 :{WINDOW_COLOUR_2}Anzahl der Drehungen: STR_1870 :Anzahl kompletter Drehungen @@ -1676,7 +1676,7 @@ STR_2314 :{WINDOW_COLOUR_2}Fahrtlänge: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Kosten: {BLACK}ungefähr {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Erforderlicher Platz: {BLACK}{COMMA16} x {COMMA16} Blöcke STR_2321 :{WINDOW_COLOUR_2}Anzahl der Attraktionen: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Personal: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Personal: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Parkgröße: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Parkgröße: {BLACK}{COMMA32}Quadratfuß STR_2325 :Land für Parkvergrößerung kaufen @@ -2651,7 +2651,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Dieser Name existiert bereits STR_5440 :Vollbild minimieren, wenn Spiel nicht im Vordergrund -STR_5441 :Identifiziert Bahnen durch Streckentyp, sodass wie in RCT1 Fahrzeuge anschließend geändert werden können STR_5442 :Parkbewertung: STR_5447 :Typ {STRINGID} STR_5448 :Bahn / Fahrzeug {STRINGID} @@ -3278,8 +3277,8 @@ STR_6133 :Ermöglicht den Zugriff auf Attraktionen und Szenerie, die bisher n STR_6134 :Szenerie entfernen STR_6135 :Ungültige Anfrage durch den Client STR_6136 :Ungültige Anfrage durch den Server -STR_6137 :OpenRCT2, ein freier und quelloffener Klon von RollerCoaster Tycoon 2. -STR_6138 :OpenRCT2 ist das Werk vieler Autoren, eine vollständige Liste befindet sich in „contributors.md“. Für weitere Informationen, besuche http://github.com/OpenRCT2/OpenRCT2 +STR_6137 :OpenRCT2, eine freie und quelloffene Neuerschaffung von und Erweiterung zu RollerCoaster Tycoon 2. +STR_6138 :OpenRCT2 ist das Werk vieler Autoren, eine vollständige Liste kann mit dem „Mitwirkende“-Knopf gefunden werden. Für weitere Informationen besuchen Sie http://github.com/OpenRCT2/OpenRCT2 STR_6139 :Alle Produkt- und Firmennamen sind Eigentum ihrer jeweiligen Inhaber.{NEWLINE}Die Nutzung dieser stellt keine Zugehörigkeit oder Unterstützung dar. STR_6140 :Changelog… STR_6141 :Untere Symbolleiste im RCT1-Stil @@ -3590,7 +3589,9 @@ STR_6487 :Personal ausblenden STR_6488 :{RED}Die Gäste beschweren sich über die Länge der Warteschlangen in ihrem Park.{NEWLINE}Verkürzen Sie problematische Warteschlangen oder erhöhen Sie den Durchsatz der Fahrgeschäfte. STR_6489 :Fehler: Inkompatible Parkversion STR_6490 :Warnung: Teilkompatible Parkversion +STR_6491 :Dieser Park wurde in einer späteren Version von OpenRCT2 gespeichert. Der Park wurde in v{INT32} gespeichert und benötigt mindestens v{INT32}. Sie benutzen im Moment v{INT32}. STR_6492 :Dieser Park wurde in einer alten Version von OpenRCT2 gespeichert und kann nicht mit dieser Version von OpenRCT2 geöffnet werden. Park ist v{INT32}. +STR_6493 :Dieser Park wurde in einer späteren Version von OpenRCT2 gespeichert, einige Daten können verloren gehen. Der Park wurde in v{INT32} gespeichert. Sie benutzen im Moment v{INT32}. STR_6494 :Nach Fahrgeschäftstyp gruppieren STR_6495 :Fahrgeschäfte nach Fahrgeschäftstyp gruppieren, anstatt jedes Fahrzeug separat anzuzeigen. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3627,8 +3628,24 @@ STR_6526 :(Basisgrafiken, -musik und -toneffekte) STR_6527 :Wettbewerbe STR_6528 :Ungültige Streckenparameter! STR_6529 :Ungültiger Farbschemaparameter! +STR_6530 :User Created Expansion Set STR_6531 :Die Zeitmaschine STR_6532 :Katys Traumwelt +STR_6533 :{WINDOW_COLOUR_2}Nervenkitzelfaktor: {BLACK}-{COMMA16}% +STR_6534 :{WINDOW_COLOUR_2}Intensitätsfaktor: {BLACK}-{COMMA16}% +STR_6535 :{WINDOW_COLOUR_2}Übelkeitsfaktor: {BLACK}-{COMMA16}% +STR_6536 :Dieser Park wurde in einer späteren Version von OpenRCT2 gespeichert. Der Park wurde in v{INT32} gespeichert. Sie benutzen im Moment v{INT32}. +STR_6537 :Normale Fußwege als Warteschlangen erlauben +STR_6538 :Zeigt reguläre Pfade in der Warteschlangenliste im Fußwegfenster an +STR_6539 :Bremse geschlossen +STR_6540 :{WINDOW_COLOUR_2}Besonderen Dank an die folgenden Unternehmen für die Gestattung der Verwendung ihrer Abbilder: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Mitwirkende +STR_6543 :Mitwirkende … +STR_6544 :Darlehen kann nicht negativ sein! +STR_6545 :RCT1-Zinsberechnung benutzen +STR_6546 :Den Zinsberechnungsalgorithmus von RollerCoaster Tycoon 1 verwenden, welcher einen festen Prozentsatz von ca. 1,33% benutzt. +STR_6547 :Jede Szenerie ############# @@ -4385,6 +4402,11 @@ STR_SCNR :Pandawelt STR_PARK :Pandawelt STR_DTLS :Bauen Sie weitere Fahrgeschäfte und ziehen Sie neue Gäste in diesem Park im Pandastil an + +STR_SCNR :Tycoon Park +STR_PARK :Tycoon Park +STR_DTLS : + ### STR_SCNR :Cemetery Ridge diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 0ff09b543d..b42f73fc88 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -1245,7 +1245,7 @@ STR_1863 :Handyman STR_1864 :Mechanic STR_1865 :Security Guard STR_1866 :Entertainer -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Can’t change number of rotations… STR_1869 :{WINDOW_COLOUR_2}Number of rotations: STR_1870 :Number of complete rotations @@ -1675,7 +1675,7 @@ STR_2314 :{WINDOW_COLOUR_2}Ride length: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Cost: {BLACK}around {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Space required: {BLACK}{COMMA16} × {COMMA16} blocks STR_2321 :{WINDOW_COLOUR_2}Number of rides/attractions: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Staff: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Staff: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}sq.ft. STR_2325 :Buy land to extend park @@ -2650,7 +2650,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Name already exists STR_5440 :Minimise fullscreen on focus loss -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behaviour) STR_5442 :Force park rating: STR_5447 :Type {STRINGID} STR_5448 :Ride / Vehicle {STRINGID} @@ -3281,8 +3280,8 @@ STR_6133 :Access rides and scenery that have not yet been invented STR_6134 :Clear Scenery STR_6135 :Client sent invalid request STR_6136 :Server sent invalid request -STR_6137 :OpenRCT2, a free and open source clone of Roller Coaster Tycoon 2. -STR_6138 :OpenRCT2 is the work of many authors, a full list can be found in “contributors.md”. For more information, visit http://github.com/OpenRCT2/OpenRCT2 +STR_6137 :OpenRCT2, a free and open source recreation of and expansion to Roller Coaster Tycoon 2. +STR_6138 :OpenRCT2 is the work of many authors, a full list can be found under the “Contributors” button. For more information, visit http://github.com/OpenRCT2/OpenRCT2 STR_6139 :All product and company names belong to their respective holders. Use of them does not imply any affiliation with or endorsement by them. STR_6140 :Changelog… STR_6141 :RCT1 Bottom Toolbar @@ -3639,6 +3638,18 @@ STR_6533 :{WINDOW_COLOUR_2}Excitement Factor: {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Intensity Factor: {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Nausea Factor: {BLACK}-{COMMA16}% STR_6536 :This park was saved in a later version of OpenRCT2. The park was saved in v{INT32}, you are currently on v{INT32}. +STR_6537 :Allow using regular paths as queue +STR_6538 :Shows regular paths in the queues dropdown of the Footpaths window. +STR_6539 :Brake Closed +STR_6540 :{WINDOW_COLOUR_2}Special thanks to the following companies for allowing their likeness: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Contributors +STR_6543 :Contributors… +STR_6544 :Loan cannot be negative! +STR_6545 :Use RCT1 interest calculation +STR_6546 :Use the interest calculation algorithm of RollerCoaster Tycoon 1, which used a fixed percentage of approximately 1.33%. +STR_6547 :All Scenery +STR_6548 :Show railings at junction ############# # Scenarios # @@ -4395,6 +4406,11 @@ STR_SCNR :Panda World STR_PARK :Panda World STR_DTLS :Add more rides and attract more people to this panda-themed park + +STR_SCNR :Tycoon Park +STR_PARK :Tycoon Park +STR_DTLS : + ### STR_SCNR :Cemetery Ridge diff --git a/data/language/en-US.txt b/data/language/en-US.txt index 473d53fc6a..467c8cd1a8 100644 --- a/data/language/en-US.txt +++ b/data/language/en-US.txt @@ -210,7 +210,6 @@ STR_6274 :Can’t set color scheme… # Strings added by OpenRCT2. Only add strings that differ from UK English! STR_5440 :Minimize fullscreen on focus loss -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behavior) STR_5459 :Rotate counterclockwise STR_5460 :Rotate view counterclockwise STR_5515 :Stops guests from vandalizing your park when they’re angry diff --git a/data/language/eo-ZZ.txt b/data/language/eo-ZZ.txt index 725ee7d1bf..e3aa128c8a 100644 --- a/data/language/eo-ZZ.txt +++ b/data/language/eo-ZZ.txt @@ -1245,7 +1245,7 @@ STR_1863 :Faktoto STR_1864 :Mekanikisto STR_1865 :Gardisto STR_1866 :Amuzisto -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Ne eblas ŝanĝi nombron de turnadoj… STR_1869 :{WINDOW_COLOUR_2}Nombro de turnadoj: STR_1870 :Nombro de plenaj turnadoj @@ -1675,7 +1675,7 @@ STR_2314 :{WINDOW_COLOUR_2}Longeco de atrakcio: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Kosto: {BLACK}almenaŭ {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Spaco bezonata: {BLACK}{COMMA16} x {COMMA16} blokoj STR_2321 :{WINDOW_COLOUR_2}Nombro de atrakcioj: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Dungitaro: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Dungitaro: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Areo de parko: {BLACK}{COMMA32} kvadrataj metroj STR_2324 :{WINDOW_COLOUR_2}Areo de parko: {BLACK}{COMMA32} kvadrataj futoj STR_2325 :Aĉeti bienon por etendi parkon @@ -2650,7 +2650,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Nomo jam ekzistas STR_5440 :Minimumigi plenekranan reĝimon dum defokusigoj -STR_5441 :Identigas atrakciojn per siaj traktipoj{NEWLINE}do veturiloj fariĝas ŝanĝeblaj{NEWLINE}poste (RCT1-konduto) STR_5442 :Devigi pritakson de parko: STR_5447 :Tipo {STRINGID} STR_5448 :Atrakcio / Veturilo {STRINGID} @@ -3281,8 +3280,8 @@ STR_6133 :Atingi atrakciojn kaj pejzaĝon, kiuj ne estis jam inventitaj STR_6134 :Vakigi Pejzaĝon STR_6135 :Kliento sendis nevalidan peton STR_6136 :Servilo sendis nevalidan peton -STR_6137 :OpenRCT2 estas libera kaj malfermitkoda klono de Roller Coaster Tycoon 2. -STR_6138 :OpenRCT2 estas la verko de multaj aŭtoroj, kompleta listo troviĝas al “contributors.md”. Por pli da informaĵoj, vizitu http://github.com/OpenRCT2/OpenRCT2 +STR_6137 :OpenRCT2 estas libera kaj malfermitkoda aliformigo kaj kompletigo de Roller Coaster Tycoon 2. +STR_6138 :OpenRCT2 estas la verko de multaj aŭtoroj, kompleta listo troviĝas ene de la “Kontribuantoj” butono. Por pli da informaĵoj, vizitu http://github.com/OpenRCT2/OpenRCT2 STR_6139 :Ĉiuj produktonomoj kaj firmnomoj apartenas al siaj respektivaj posedantoj. Uzo de ili ne signifas iun ajn filion kun aŭ endosaĵon de ili. STR_6140 :Ŝanĝoprotokolo… STR_6141 :RCT1 Malsupra Ilobreto @@ -3593,7 +3592,9 @@ STR_6487 :Baskuligi nevideblan dungitaron STR_6488 :{RED}Gastoj plendas pri la longeco de la atendovicoj en via parko.{NEWLINE}Konsideru mallongigi problemajn atendovicojn, aŭ pliigi la flukvanton de la atrakcioj. STR_6489 :Eraro: Malkongrua Versio de Parko STR_6490 :Averto: Parte Kongrua Versio de Parko +STR_6491 :Ĉi tiu parko estis konservita en pli nova versio de OpenRCT2. La parko estis konservita en v{INT32} kaj bezonas almenaŭ v{INT32}. Vi nune estas en v{INT32}. STR_6492 :Ĉi tiu parko estis konservita en malnova versio de OpenRCT2, kaj ne povas esti malfermita per ĉi tiu versio de OpenRCT2. Parko estas v{INT32}. +STR_6493 :Ĉi tiu parko estis konservita en pli nova versio de OpenRCT2, kelkaj datumoj eble estas perditaj. La parko estis konservita en v{INT32}. Vi nune estas en v{INT32}. STR_6494 :Grupigi laŭ atrakciotipo STR_6495 :Grupigi atrakciojn laŭ akrakciotipoj anstataŭ montri ĉiun veturilon aparte. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3636,6 +3637,18 @@ STR_6532 :La Revomondo de Katia STR_6533 :{WINDOW_COLOUR_2}Faktoro de Eksciteco: {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Faktoro de Intenseco: {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Faktoro de Naŭzo: {BLACK}-{COMMA16}% +STR_6536 :Ĉi tiu parko estis konservita en pli nova versio de OpenRCT2. La parko estis konservita en v{INT32}, vi nune estas en v{INT32}. +STR_6537 :Permesi uzante regulajn trotuarojn kiel atendovico +STR_6538 :Montras regulajn trotuarojn en la atendovicoj-fallisto de la Trotuaroj-fenestro. +STR_6539 :Bremso Fermita +STR_6540 :{WINDOW_COLOUR_2}Specialan dankon al la sekvantaj firmaoj por permesi ilian similecon: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Kontribuantoj +STR_6543 :Kontribuantoj… +STR_6544 :Prunto ne povas esti negativa! +STR_6545 :Uzi interezan kalkulon de RCT1 +STR_6546 :Uzi la interezan kalkulan algoritmon de RollerCoaster Tycoon 1, kiu uzis fiksitan procenton de proksimume 1.33%. +STR_6547 :Ĉiuj Pejzaĝoj ############# # Scenarios # @@ -4390,6 +4403,11 @@ STR_SCNR :Pando-Mondo STR_PARK :Pando-Mondo STR_DTLS :Aldonu pli da atrakcioj kaj allogu pli da homoj al ĉi tiu pando-temita amuzparko + +STR_SCNR :Magnata Parko +STR_PARK :Magnata Parko +STR_DTLS : + ### STR_SCNR :Tombeja Kresto diff --git a/data/language/es-ES.txt b/data/language/es-ES.txt index 6b64e1b472..db331cd358 100644 --- a/data/language/es-ES.txt +++ b/data/language/es-ES.txt @@ -1246,7 +1246,7 @@ STR_1863 :manita STR_1864 :mecánico STR_1865 :guardia de seguridad STR_1866 :animador -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :No puedes cambiar el número de vueltas… STR_1869 :{WINDOW_COLOUR_2}Número de vueltas: STR_1870 :Número de vueltas completas @@ -1273,17 +1273,17 @@ STR_1891 :¡Ningún {STRINGID} en el parque todavía! STR_1894 :{WINDOW_COLOUR_2}{STRINGID} vendidos: {BLACK}{COMMA32} STR_1895 :Construir nueva atracción STR_1896 :{WINDOW_COLOUR_2}Gastos/Ingresos -STR_1897 :{WINDOW_COLOUR_2}Construcción -STR_1898 :{WINDOW_COLOUR_2}Operación de atracciones -STR_1899 :{WINDOW_COLOUR_2}Compra de terreno +STR_1897 :{WINDOW_COLOUR_2}Construcción atracc. +STR_1898 :{WINDOW_COLOUR_2}Operación de atracc. +STR_1899 :{WINDOW_COLOUR_2}Compra de terrenos STR_1900 :{WINDOW_COLOUR_2}Decorado STR_1901 :{WINDOW_COLOUR_2}Entradas al parque STR_1902 :{WINDOW_COLOUR_2}Entradas a atracciones STR_1903 :{WINDOW_COLOUR_2}Ventas de tiendas STR_1904 :{WINDOW_COLOUR_2}Gastos de tiendas -STR_1905 :{WINDOW_COLOUR_2}Ventas de comida y bebida -STR_1906 :{WINDOW_COLOUR_2}Gastos de comida y bebida -STR_1907 :{WINDOW_COLOUR_2}Salarios +STR_1905 :{WINDOW_COLOUR_2}Ventas comida/bebida +STR_1906 :{WINDOW_COLOUR_2}Gastos comida/bebida +STR_1907 :{WINDOW_COLOUR_2}Salarios del personal STR_1908 :{WINDOW_COLOUR_2}Marketing STR_1909 :{WINDOW_COLOUR_2}Investigación STR_1910 :{WINDOW_COLOUR_2}Intereses del crédito @@ -1676,7 +1676,7 @@ STR_2314 :{WINDOW_COLOUR_2}Longitud de vía: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Coste: {BLACK}alrededor de {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Espacio requerido: {BLACK}{COMMA16} × {COMMA16} bloques STR_2321 :{WINDOW_COLOUR_2}Número de atracciones: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Empleados: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Empleados: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Extensión del parque: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Extensión del parque: {BLACK}{COMMA32}sq.ft. STR_2325 :Comprar terreno para extender el parque. @@ -2653,7 +2653,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :El nombre ya existe STR_5440 :Minimizar desde pantalla completa al perder el foco -STR_5441 :Identifica atracciones por tipo de pista{NEWLINE}por lo que los vehículos pueden modificarse posteriormente.{NEWLINE}(Como en RCT1). STR_5442 :Forzar valoración: STR_5447 :Tipo {STRINGID} STR_5448 :Juego / Vehículo {STRINGID} @@ -3285,8 +3284,8 @@ STR_6133 :Acceder a atracciones y escenarios que aún no han sido inventados STR_6134 :Limpiar Escenario STR_6135 :El cliente envió una solicitud no válida STR_6136 :El servidor envió una solicitud no válida -STR_6137 :OpenRCT2, juego de código abierto basado en Roller Coaster Tycoon 2. -STR_6138 :OpenRCT2 es el trabajo de muchos autores, una lista completa se puede encontrar en “contributors.md”. Para más información visita: http://github.com/OpenRCT2/OpenRCT2 +STR_6137 :OpenRCT2, juego de código abierto que recrea y expande Roller Coaster Tycoon 2. +STR_6138 :OpenRCT2 es el trabajo de muchos autores, una lista completa se puede encontrar a través del botón de "Colaboradores". Para más información visita: http://github.com/OpenRCT2/OpenRCT2 STR_6139 :Todos los nombres de productos y empresas pertenecen a sus respectivos titulares. El uso de ellos no implica ninguna afiliación o respaldo por ellos. STR_6140 :Changelog… STR_6141 :Barra de herramientas inferior RCT1 @@ -3468,8 +3467,8 @@ STR_6357 :Quitar todos los patos del mapa STR_6358 :Página {UINT16} STR_6359 :{POP16}{POP16}Página {UINT16} STR_6360 :{BLACK}{COMMA32} -STR_6361 :Habilitar efectos de luz en atracciones (experimental) -STR_6362 :Si está activado, vehículos para las atracciones con vías estarán iluminados de noche. +STR_6361 :Efectos de luz en atracciones (experimental) +STR_6362 :Si está activado, los vehículos para las atracciones con vías estarán iluminados de noche. STR_6363 :Copiar texto al portapapeles STR_6364 :{RED}{COMMA16} persona ha muerto en un accidente a bordo de {STRINGID} STR_6365 :Fallecimientos en la atracción @@ -3597,7 +3596,9 @@ STR_6487 :Alternar empleados invisibles STR_6488 :{RED}Los visitantes se quejan de la longitud de las colas en tu parque.{NEWLINE}Considera acortar las colas problemáticas o aumentar el rendimiento de las atracciones. STR_6489 :{RED}ERROR: Versión de parque incompatible STR_6490 :{RED}ADVERTENCIA: Versión de parque no del todo compatible -STR_6492 :Este parque fue guardado en una versión más antigua de OpenRCT2 y no puede abrirse con esta versión de OpenRCT2. Este parque es la versión {INT32}. +STR_6491 :Este parque fue guardado en una versión más reciente de OpenRCT2. Este parque se guardó en la v{INT32} y requiere al menos la v{INT32}. Actualmente estás en la v{INT32}. +STR_6492 :Este parque fue guardado en una versión más antigua de OpenRCT2 y no puede abrirse con esta versión de OpenRCT2. Este parque es la versión v{INT32}. +STR_6493 :Este parque fue guardado en una versión más reciente de OpenRCT2, algunos datos podrían perderse. Este parque se guardó en la v{INT32}, actualmente estás en la v{INT32}. STR_6494 :Agrupar por tipo de atracción STR_6495 :Agrupar las atracciones por tipo en vez de mostrar cada vehículo por separado. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3640,6 +3641,18 @@ STR_6532 :Mundo de Katy 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_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 +STR_6542 :Colaboradores +STR_6543 :Colaboradores… +STR_6544 :¡El préstamo no puede ser negativo! +STR_6545 :Usar el cálculo de intereses de RCT1 +STR_6546 :Usar el algoritmo de cálculo de intereses de RollerCoaster Tycoon 1, que empleaba un porcentaje fijo de aproximadamente 1,33%. +STR_6547 :Todos los escenarios ############## # Escenarios # @@ -4398,6 +4411,11 @@ STR_SCNR :Mundo Panda STR_PARK :Mundo Panda STR_DTLS :Añade más atracciones y consigue más visitantes en este parque pandatemático. + +STR_SCNR :Parque Tycoon +STR_PARK :Parque Tycoon +STR_DTLS : + ### STR_SCNR :Loma del cementerio diff --git a/data/language/fi-FI.txt b/data/language/fi-FI.txt index 26aa2eb205..ada3ee5f4c 100644 --- a/data/language/fi-FI.txt +++ b/data/language/fi-FI.txt @@ -1247,7 +1247,7 @@ STR_1863 :yleismies STR_1864 :mekaanikko STR_1865 :vartija STR_1866 :viihdyttäjä -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Kierrosten määrää ei voi muuttaa… STR_1869 :{WINDOW_COLOUR_2}Kierrosten määrä: STR_1870 :Täysien kierrosten määrä @@ -1679,7 +1679,7 @@ STR_2314 :{WINDOW_COLOUR_2}Radan pituus: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Kustannus: {BLACK}noin {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Tilaa tarvitaan: {BLACK}{COMMA16} x {COMMA16} neliötä STR_2321 :{WINDOW_COLOUR_2}Laitteiden/kohteiden määrä: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Henkilöstö: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Henkilöstö: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Puiston koko: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Puiston koko: {BLACK}{COMMA32}ft² STR_2325 :Osta maata puiston laajennukseen @@ -2655,7 +2655,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Nimi on jo olemassa STR_5440 :Pienennä kokonäyttötila kohdistuksen poistuessa -STR_5441 :Tunnistaa laitteet ratatyypin perusteella, jotta vaunut voi vaihtaa jälkikäteen, kuten RCT1:ssä. STR_5442 :Pakota puiston taso: STR_5447 :Tyyppi {STRINGID} STR_5448 :Laite / Vaunu {STRINGID} @@ -3598,7 +3597,9 @@ STR_6487 :Läpinäkyvä henkilöstö -kytkin STR_6488 :{RED}Kävijät valittavat pitkistä jonoista puistosi laitteisiin.{NEWLINE}Lyhennä ongelmallisia jonotusalueita, tai korota laitteiden kapasiteettia. STR_6489 :Virhe: Yhteensopimaton puistoversio STR_6490 :Varoitus: Jokseenkin yhteensopiva puistoversio +STR_6491 :Tämä puisto on tallennettu uudemmalla OpenRCT2-versiolla. Puisto on v{INT32} ja vaatii vähintään v{INT32}. STR_6492 :Tämä puisto on tallennettu vanhemmalla OpenRCT2-versiolla, eikä sitä voi avata tällä peliversiolla. Puisto on v{INT32}. +STR_6493 :Tämä puisto on tallennettu uudemmalla OpenRCT2-versiolla, ja jotkin tiedot ovat saattaneet kadota. Puisto on v{INT32} ja vaatii vähintään v{INT32}. STR_6494 :Ryhmitä laitetyypittäin STR_6495 :Ryhmitä laitteet laitetyypin perusteella, yksittäisten kulkuneuvojen sijaan. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} diff --git a/data/language/fr-CA.txt b/data/language/fr-CA.txt new file mode 100644 index 0000000000..03bf2176f7 --- /dev/null +++ b/data/language/fr-CA.txt @@ -0,0 +1,13 @@ +# STR_XXXX part is read and XXXX becomes the string id number. +# Everything after the colon and before the new line will be saved as the string. +# Use # at the beginning of a line to leave a comment. +# Follow the translation guidelines here: +# https://github.com/OpenRCT2/Localisation/wiki/Translator-guidelines:-fr_FR + +STR_1526 :« Cette crème glacée de {STRINGID} est vraiment une bonne affaire » +STR_1560 :« Je ne paierai pas si cher pour une crème glacée de {STRINGID} » +STR_1968 :{WINDOW_COLOUR_2}Prix d’une crème glacée : +STR_1996 :Crème glacée +STR_2024 :Crème glacées +STR_2052 :une crème glacée +STR_2080 :Crème glacée diff --git a/data/language/fr-FR.txt b/data/language/fr-FR.txt index 018e0be8bd..2609a60147 100644 --- a/data/language/fr-FR.txt +++ b/data/language/fr-FR.txt @@ -1250,7 +1250,7 @@ STR_1863 :Agent d’entretien STR_1864 :Mécanicien STR_1865 :Garde de sécurité STR_1866 :Animateur -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Impossible de changer le nombre de rotations… STR_1869 :{WINDOW_COLOUR_2}Nombre de rotations : STR_1870 :Nombre de rotations complètes @@ -1682,7 +1682,7 @@ STR_2314 :{WINDOW_COLOUR_2}Long. attr. : {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Coût : {BLACK}{CURRENCY} environ STR_2316 :{WINDOW_COLOUR_2}Espace requis : {BLACK}{COMMA16} x {COMMA16} blocs STR_2321 :{WINDOW_COLOUR_2}Nombre d’attractions : {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Personnel : {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Personnel : {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Taille du parc : {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Taille du parc : {BLACK}{COMMA32}sq.ft. STR_2325 :Acheter du terrain pour agrandir le parc @@ -2659,7 +2659,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Le nom existe déjà STR_5440 :Minimiser le plein écran au passage en arrière-plan -STR_5441 :Identifie les attractions par type de voie, pour que les véhicules puissent être changés plus tard, comme dans RCT1. STR_5442 :Eval. du parc : STR_5447 :Type {STRINGID} STR_5448 :Attraction/véhicule {STRINGID} @@ -3290,8 +3289,8 @@ STR_6133 :Accéder au décor et aux attractions qui ne sont pas encore invent STR_6134 :Effacer le décor STR_6135 :Le client a envoyé une requête invalide STR_6136 :Le serveur a envoyé une requête invalide -STR_6137 :OpenRCT2, un clone gratuit et open source de RollerCoaster Tycoon 2. -STR_6138 :OpenRCT2 est le fruit du travail de nombreux auteurs, une liste complète est disponible dans le fichier {SMALLFONT}contributors.md{MEDIUMFONT}. Pour plus d’informations, visitez {SMALLFONT}http://github.com/OpenRCT2/OpenRCT2{MEDIUMFONT} +STR_6137 :OpenRCT2, une recréation et amélioration libre et open source de RollerCoaster Tycoon 2. +STR_6138 :OpenRCT2 est le fruit du travail de nombreuses personnes, une liste complète est disponible via le bouton {SMALLFONT}Contributions{MEDIUMFONT}. Pour plus d’informations, visitez {SMALLFONT}http://github.com/OpenRCT2/OpenRCT2{MEDIUMFONT} STR_6139 :Tous les noms des produits et entreprises appartiennent à leurs propriétaires respectifs. L’utilisation de ces derniers n’implique pas d’affiliation ou d’approbation par eux. STR_6140 :Journal des changements… STR_6141 :Barre d’outils RCT1 du bas @@ -3432,7 +3431,7 @@ STR_6315 :{WINDOW_COLOUR_2}Objectif recherche chemin : {BLACK}{INT32}, {INT3 STR_6316 :{WINDOW_COLOUR_2}Historique recherche chemin : STR_6317 :{BLACK}{INT32}, {INT32}, {INT32} dir {INT32} STR_6318 :Desynchronisation réseau détectée.{NEWLINE}Fichier journal : {STRING} -STR_6319 :Bloc de frein fermé +STR_6319 :Freins de bloc serrés STR_6320 :Indestructible STR_6321 :L’ajout est cassé STR_6322 :{WINDOW_COLOUR_2}ID de l’entité : {BLACK}{INT32} @@ -3648,6 +3647,17 @@ STR_6533 :{WINDOW_COLOUR_2}Indice d’excitation : {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Indice d’intensité : {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Indice de nausée : {BLACK}-{COMMA16}% STR_6536 :Ce parc a été sauvegardé dans une version plus récente d’OpenRCT2. Il a été sauvegardé avec la version {INT32}, vous utilisez la version {INT32}. +STR_6537 :Permettre l’utilisation d’allées normales{NEWLINE}dans les files d’attente +STR_6538 :Affiche les allées normales dans le menu déroulant des files d’attente de la fenêtre des allées +STR_6539 :Freins serrés +STR_6540 :{WINDOW_COLOUR_2}Remerciements particuliers aux entreprises suivantes pour l’autorisation d’utilisation de leur image : +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Contributions +STR_6543 :Contributions… +STR_6544 :Un emprunt ne peut pas être négatif ! +STR_6545 :Calcul des intérêts de RCT1 +STR_6546 :Utilise l’algorithme de calcul des intérêts de RollerCoaster Tycoon 1, qui comporte un pourcentage fixe d’environ 1,33% +STR_6547 :Tous les décors ############# # Scenarios # @@ -4393,6 +4403,11 @@ STR_SCNR :Monde de Panda STR_PARK :Monde de Panda STR_DTLS :Ajoutez davantage d’attractions et attirez plus de visiteurs avec ce parc autour du thème du panda + +STR_SCNR :Parc Tycoon +STR_PARK :Parc Tycoon +STR_DTLS : + ### STR_SCNR :Crête du cimetière diff --git a/data/language/hu-HU.txt b/data/language/hu-HU.txt index 25a10016e4..98bf5393ad 100644 --- a/data/language/hu-HU.txt +++ b/data/language/hu-HU.txt @@ -1240,7 +1240,7 @@ STR_1863 :mindenes STR_1864 :gépész STR_1865 :biztonsági őr STR_1866 :szórakoztató -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Nem változtatható meg a forgások száma… STR_1869 :{WINDOW_COLOUR_2}Forgások száma: STR_1870 :A teljes körforgások száma @@ -1670,7 +1670,7 @@ STR_2314 :{WINDOW_COLOUR_2}Pályahossz: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Ár: {BLACK}megközelítőleg {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Szükséges hely: {BLACK}{COMMA16} x {COMMA16} blokk STR_2321 :{WINDOW_COLOUR_2}Játékok/épületek száma: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Alkalmazottak: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Alkalmazottak: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park mérete: {BLACK}{COMMA32} m² STR_2324 :{WINDOW_COLOUR_2}Park mérete: {BLACK}{COMMA32} négyzetláb STR_2325 :A park bővítése új területek vásárlásával @@ -2643,7 +2643,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :A név már létezik STR_5440 :Teljes képernyőnél minimalizálás fókuszvesztéskor -STR_5441 :A játékok pályatípus szerinti azonosítása,{NEWLINE}hogy a járműveket később meg lehessen {NEWLINE}változatni (RCT1-beli viselkedés) STR_5442 :Értékelés legyen: STR_5447 :Típus {STRINGID} STR_5448 :Játék / Jármű {STRINGID} @@ -2817,7 +2816,7 @@ STR_5624 :Time Twister STR_5625 :„Igazi” parkok STR_5626 :Egyéb parkok STR_5627 :Pályák csoportosítása: -STR_5628 :Eredeti játék +STR_5628 :Forrásjáték STR_5629 :Nehézségi szint STR_5630 :Progresszív feloldás bekapcsolása STR_5631 :Eredeti DLC parkok @@ -3047,7 +3046,7 @@ STR_5899 :Festési hibakeresés ablak be/ki STR_5900 :Eredeti rajzolókód használata STR_5901 :Szegmensek magasságának mutatása STR_5902 :Határolókeretek mutatása -STR_5904 :Dátum visszaállítása +STR_5904 :Dátum vissza STR_5905 :Térképgeneráló eszköz, amely automatikusan létrehoz egy egyedi tájat STR_5906 :Nagyítás a mutató helyzetére STR_5907 :Ha be van kapcsolva, a nagyítás képernyő közepe helyett a mutatóra közelít @@ -3269,8 +3268,8 @@ STR_6133 :Hozzáférés a még fel nem fedezett játékokhoz és díszletekhe STR_6134 :Díszlet törlése STR_6135 :A kliens érvénytelen kérést küldött STR_6136 :A szerver érvénytelen kérést küldött -STR_6137 :OpenRCT2, egy ingyenes és nyílt forráskódú Roller Coaster Tycoon 2 klón. -STR_6138 :Az OpenRCT2 számos szerző munkája, a teljes lista a „contributors.md”-ben található. További információkért látogass el ide: http://github.com/OpenRCT2/OpenRCT2 +STR_6137 :OpenRCT2, a RollerCoaster Tycoon 2 ingyenes és nyílt forráskódú újraalkotása és kibővítése. +STR_6138 :Az OpenRCT2 számos szerző munkája, a teljes lista a „Közreműködők” gomb alatt található. További információkért látogass el ide: http://github.com/OpenRCT2/OpenRCT2 STR_6139 :Minden termék- és vállalatnév a vonatkozó tulajdonosok birtokában van. A használatuk nem jelent semmiféle kapcsolatot vagy jóváhagyást a részükről. STR_6140 :Változási napló… STR_6141 :RCT1 alsó eszköztár @@ -3579,7 +3578,9 @@ STR_6487 :Személyzet elrejtése be/ki STR_6488 :{RED}A vendégek panaszkodnak a parkban a sorok hosszára.{NEWLINE}Próbáld meg a problémás sorokat lerövidíteni, vagy növeld a játékok áteresztőképességét. STR_6489 :Hiba: Nem kompatibilis park verzió STR_6490 :Figyelmeztetés: Félig kompatibilis park verzió +STR_6491 :Ezt a parkot az OpenRCT2 egy későbbi verziójában mentették el. A park v{INT32}, és legalább v{INT32} kell hozzá. A jelenlegi verziód: {INT32}. STR_6492 :Ez a park az OpenRCT2 egy régi verziójában lett elmentve, és nem nyitható meg az OpenRCT2 ezen verziójával. A park v{INT32}. +STR_6493 :Ezt a parkot az OpenRCT2 egy későbbi verziójában mentették el, egyes adatok elveszhettek. A park v{INT32}, a jelenlegi verziód: {INT32}. STR_6494 :Játéktípus szerinti csoportosítás STR_6495 :Csoportosítsa a játékokat a játéktípusok szerint, ahelyett, hogy minden járművet külön-külön mutatna. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3621,6 +3622,18 @@ STR_6532 :Katy álomvilága STR_6533 :{WINDOW_COLOUR_2}Izgalmi faktor: {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Intenzitási faktor: {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Émelygési faktor: {BLACK}-{COMMA16}% +STR_6536 :Ezt a parkot az OpenRCT2 egy későbbi verziójában mentették el. A park v{INT32}, a jelenlegi verziód: {INT32}. +STR_6537 :Normál utak lehetnek várósorok +STR_6538 :Megjeleníti a normál utakat a várósorok legördülő menüjében az Utak ablakon belül. +STR_6539 :Fék zárva +STR_6540 :{WINDOW_COLOUR_2}Külön köszönet a következő vállalatoknak, hogy engedélyezték hasonlóságuk használatát: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Közreműködők +STR_6543 :Közreműködők… +STR_6544 :A kölcsön nem lehet negatív! +STR_6545 :RCT1 kamatszámítás használata +STR_6546 :A RollerCoaster Tycoon 1 kamatszámítási algoritmusának használata, amely egy rögzített százalékot használ, ami körülbelül 1,33%. +STR_6547 :Minden díszlet ############# # Scenarios # @@ -4224,6 +4237,11 @@ STR_SCNR :Panda Világ STR_PARK :Panda Világ STR_DTLS :Szerezz be további játékokat, hogy több ember látogasson el ebbe a panda-témájú parkba + +STR_SCNR :Tycoon Park +STR_PARK :Tycoon Park +STR_DTLS : + ### STR_SCNR :Temető-gerinc @@ -4274,8 +4292,8 @@ STR_PARK :Bábel tornya STR_DTLS :Hűű! Nézd csak, hova vitt minket az időgép! Hová tűnt mindenki?{NEWLINE}Szerző: Fossil -STR_SCNR :Átalakítás -STR_PARK :Átalakítás +STR_SCNR :Transzformáció +STR_PARK :Transzformáció STR_DTLS :Vártunk téged…{NEWLINE}Szerző: Fossil diff --git a/data/language/it-IT.txt b/data/language/it-IT.txt index 95df200b5b..87fe99f9cf 100644 --- a/data/language/it-IT.txt +++ b/data/language/it-IT.txt @@ -1246,7 +1246,7 @@ STR_1863 :Tuttofare STR_1864 :Meccanico STR_1865 :Vigilante STR_1866 :Intrattenitore -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Impossibile modificare il numero di rotazioni… STR_1869 :{WINDOW_COLOUR_2}Numero rotazioni: STR_1870 :Numero di rotazioni complete @@ -1678,7 +1678,7 @@ STR_2314 :{WINDOW_COLOUR_2}Lunghezza: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Costo: {BLACK}circa {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Spazio richiesto: {BLACK}{COMMA16} x {COMMA16} blocchi STR_2321 :{WINDOW_COLOUR_2}Numero di attrazioni: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Personale: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Personale: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Dimensioni del parco: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Dimensioni del parco: {BLACK}{COMMA32}sq.ft. STR_2325 :Compra del terreno per estendere il parco @@ -2656,7 +2656,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Il nome è già utilizzato STR_5440 :Riduci schermo intero se il gioco perde il focus -STR_5441 :Identifica le attrazioni in base al percorso{NEWLINE}in modo che si possano sostituirne successivamente{NEWLINE}i veicoli (come in RCT1) STR_5442 :Forza valutazione parco: STR_5447 :Tipo {STRINGID} STR_5448 :Corsa / Veicolo {STRINGID} @@ -3600,7 +3599,9 @@ STR_6487 :Mostra/nascondi personale STR_6488 :{RED}I visitatori si lamentano per la lunghezza delle code nel tuo parco.{NEWLINE}Prendi in considerazione di accorciare quelle problematiche o di aumentare il flusso di visitatori delle attrazioni. STR_6489 :Errore: versione parco non compatibile STR_6490 :Avviso: versione parco semi-compatibile +STR_6491 :Questo parco è stato salvato in una versione più recente di OpenRCT2. Il parco è v{INT32} e richiede almeno v{INT32}. STR_6492 :Questo parco è stato salvato in una versione più vecchia di OpenRCT2 e non può essere aperto con questa versione. Il parco è v{INT32}. +STR_6493 :Questo parco è stato salvato in una versione più recente di OpenRCT2, alcuni dati potrebbero essere persi. Il parco è v{INT32} e richiede almeno v{INT32}. STR_6494 :Raggruppa per tipo attrazione STR_6495 :Raggruppa le attrazioni in base al loro tipo anziché mostrare ogni veicolo separatamente. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} diff --git a/data/language/ja-JP.txt b/data/language/ja-JP.txt index d2f71dd630..26f21aa88c 100644 --- a/data/language/ja-JP.txt +++ b/data/language/ja-JP.txt @@ -1237,7 +1237,7 @@ STR_1863 :清掃員 STR_1864 :整備士 STR_1865 :警備員 STR_1866 :エンターテイナー -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :回転数が変更できない… STR_1869 :{WINDOW_COLOUR_2}回転数: STR_1870 :ライドの回転の数です。 @@ -1667,7 +1667,7 @@ STR_2314 :{WINDOW_COLOUR_2}レール長: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}コスト: {BLACK} {CURRENCY}くらい STR_2316 :{WINDOW_COLOUR_2}必要なスペース: {BLACK}{COMMA16} x {COMMA16} ブロック STR_2321 :{WINDOW_COLOUR_2}ライド/アトラクションの数: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}スタッフ: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}スタッフ: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}パークサイズ: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}パークサイズ: {BLACK}{COMMA32}sq.ft. STR_2325 :パーク敷地を購入する @@ -2642,7 +2642,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Name already exists STR_5440 :フォーカス損失時に全画面を最小化 -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behaviour) STR_5442 :Force park rating: STR_5447 :タイプ {STRINGID} STR_5448 :ライド/乗り物 {STRINGID} diff --git a/data/language/ko-KR.txt b/data/language/ko-KR.txt index 788a98719b..e07ab5b322 100644 --- a/data/language/ko-KR.txt +++ b/data/language/ko-KR.txt @@ -1247,7 +1247,7 @@ STR_1863 :미화원 STR_1864 :정비기술자 STR_1865 :경비원 STR_1866 :엔터테이너 -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :회전 수를 변경할 수 없습니다… STR_1869 :{WINDOW_COLOUR_2}회전 수: STR_1870 :회전 수를 설정합니다 @@ -1679,7 +1679,7 @@ 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}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}직원: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}공원 크기: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}공원 크기: {BLACK}{COMMA32}평방피트 STR_2325 :공원을 확장하기 위해 땅을 구입합니다 @@ -2654,7 +2654,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :이미 존재하는 이름입니다 STR_5440 :커서가 게임 밖으로 나가면 전체 화면을 최소화 -STR_5441 :놀이기구를 RCT1처럼 종류별로 구분합니다 STR_5442 :공원 등급 고정: STR_5447 :종류 {STRINGID} STR_5448 :놀이기구 / 차량 {STRINGID} @@ -3284,8 +3283,8 @@ STR_6133 :아직 개발되지 않은 놀이기구와 풍경을 사용할 수 STR_6134 :조형물 제거 STR_6135 :클라이언트에서 잘못된 요청을 보냈습니다 STR_6136 :서버에서 잘못된 요청을 보냈습니다 -STR_6137 :OpenRCT2 - 롤러코스터 타이쿤 2의 자유 공개 소스 복제품 -STR_6138 :OpenRCT2는 많은 분들이 참여한 작품입니다. 모든 참여자의 목록은 “contributors.md” 파일을 참고하세요. 더 많은 정보를 원하시면 http://github.com/OpenRCT2/OpenRCT2 를 방문해주세요. +STR_6137 :OpenRCT2 - 롤러코스터 타이쿤 2의 자유 오픈 소스 재생산 및 확장판 +STR_6138 :OpenRCT2는 많은 분들이 참여한 작품입니다. 모든 참여자의 목록은 “기여자” 버튼에서 참고할 수 있습니다. 더 많은 정보를 원하시면 http://github.com/OpenRCT2/OpenRCT2 를 방문해주세요. STR_6139 :모든 제품과 회사 이름은 해당 소유자의 것입니다. 이러한 제품이나 이름의 사용은 그러한 것들에 대한 제휴나 지지를 뜻하지 않습니다. STR_6140 :변경 기록… STR_6141 :RCT1 하단 툴바 @@ -3596,7 +3595,9 @@ STR_6487 :직원를 감추거나 보여줍니다 STR_6488 :{RED}손님들이 공원 대기줄 길이에 대해 불평하고 있습니다{NEWLINE}문제가 있는 대기줄을 줄이거나 놀이기구의 순환율을 높이세요 STR_6489 :오류: 호환 불가능한 공원 버전 STR_6490 :경고: 일부만 호환 가능한 공원 버전 +STR_6491 :이 공원은 더 최신 버전의 OpenRCT2에서 저장되었습니다. 이 공원은 v{INT32} 버전에서 저장되었고 v{INT32} 버전 이상이 필요합니다. 현재 버전은 v{INT32} 입니다. STR_6492 :이 공원은 오래된 버전의 OpenRCT2에서 저장되었고 현재 OpenRCT2 버전에서 열 수 없습니다. 이 공원의 버전은 v{INT32} 입니다. +STR_6493 :이 공원은 더 최신 버전의 OpenRCT2에서 저장되었고, 일부 데이터가 손실될 수 있습니다. 이 공원은 v{INT32} 버전에서 저장되었고 v{INT32} 버전 이상이 필요합니다. 현재 버전은 v{INT32} 입니다. STR_6494 :놀이기구 종류 별로 묶기 STR_6495 :놀이기구를 각 차량 별로 보여주는 대신 놀이기구 종류 별로 묶어서 보여줍니다 STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3639,6 +3640,18 @@ 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_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_6544 :대출은 음수일 수 없습니다! +STR_6545 :RCT1의 금리 사용 +STR_6546 :RollerCoaster Tycoon 1의 이자 계산 알고리즘(약 1.33%의 고정 백분율)을 사용합니다. +STR_6547 :모든 풍경 ############# # Scenarios # @@ -4392,6 +4405,10 @@ STR_SCNR :판다 월드 STR_PARK :판다 월드 STR_DTLS :이 판다 테마의 공원에 놀이기구를 더 지어서 손님들을 더 끌어모으세요. + +STR_SCNR :Tycoon Park +STR_PARK :타이쿤 공원 +STR_DTLS : ### diff --git a/data/language/nb-NO.txt b/data/language/nb-NO.txt index 71d5b67e0f..6414da029b 100644 --- a/data/language/nb-NO.txt +++ b/data/language/nb-NO.txt @@ -1248,7 +1248,7 @@ STR_1863 :Handyman STR_1864 :Mechanic STR_1865 :Security Guard STR_1866 :Entertainer -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Can’t change number of rotations… STR_1869 :{WINDOW_COLOUR_2}Number of rotations: STR_1870 :Number of complete rotations @@ -1680,7 +1680,7 @@ STR_2314 :{WINDOW_COLOUR_2}Ride length: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Cost: {BLACK}around {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Space required: {BLACK}{COMMA16} × {COMMA16} blocks STR_2321 :{WINDOW_COLOUR_2}Number of rides/attractions: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Staff: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Staff: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}sq.ft. STR_2325 :Buy land to extend park @@ -2659,7 +2659,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Name already exists STR_5440 :Minimise fullscreen on focus loss -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behaviour) STR_5442 :Force park rating: STR_5447 :Type {STRINGID} STR_5448 :Ride / Vehicle {STRINGID} @@ -3605,7 +3604,9 @@ STR_6487 :Skru av/på usynlige ansatte STR_6488 :{RED}Gjestene klager på lange køer i parken.{NEWLINE}Prøv å gjøre køer kortere, eller øk kapasiteten til påvirkede attraksjoner. STR_6489 :Feil: Inkompatibel parkversjon STR_6490 :Advarsel delvis inkompatibel parkversjon +STR_6491 :Denne parken ble lagret i en nyere versjon av OpenRCT2. Parken er lagret med v{INT32} og krever minst v{INT32} for å lastes inn. STR_6492 :Denne parken ble lagret i en eldre versjon av OpenRCT2 og kan ikke åpnes i denne versjonen av OpenRCT2. Parken er lagret med v{INT32}. +STR_6493 :Denne parken ble lagret i en nyere versjon av OpenRCT2. Noe data kan mangle ved innlasting. Parken er lagret med v{INT32} og krever minst v{INT32} for å lastes inn. STR_6494 :Grupper etter attraksjonstype STR_6495 :Grupper attraksjoner etter type heller enn å vise hver vogn separat STR_6496 :{WINDOW_COLOUR_2}{STRINGID} diff --git a/data/language/nl-NL.txt b/data/language/nl-NL.txt index 801bfbcb4a..8224ea7bec 100644 --- a/data/language/nl-NL.txt +++ b/data/language/nl-NL.txt @@ -1244,7 +1244,7 @@ STR_1863 :klusjesman STR_1864 :monteur STR_1865 :bewaker STR_1866 :entertainer -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Kan het aantal rotaties niet aanpassen… STR_1869 :{WINDOW_COLOUR_2}Aantal rotaties: STR_1870 :Aantal complete rotaties @@ -1676,7 +1676,7 @@ STR_2314 :{WINDOW_COLOUR_2}Lengte: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Kosten: {BLACK}ongeveer {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Vereiste ruimte: {BLACK}{COMMA16} × {COMMA16} blokken STR_2321 :{WINDOW_COLOUR_2}Aantal attracties: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Werknemers: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Werknemers: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Parkgrootte: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Parkgrootte: {BLACK}{COMMA32}sq.ft. STR_2325 :Land kopen om het park uit te breiden @@ -2651,7 +2651,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Naam bestaat al STR_5440 :Volledig scherm minimaliseren bij focusverlies -STR_5441 :Sorteert attracties per baantype,{NEWLINE}zodat achteraf wisselen van treintypes mogelijk{NEWLINE}wordt, zoals in RCT1. STR_5442 :Parkwaardering forc.: STR_5447 :Type {STRINGID} STR_5448 :Attractie/voertuig {STRINGID} @@ -3281,7 +3280,7 @@ STR_6134 :Decor verwijderen STR_6135 :Ongeldig verzoek van de client STR_6136 :Ongeldig verzoek van de server STR_6137 :OpenRCT2, een gratis en open source remake van Roller Coaster Tycoon 2. -STR_6138 :OpenRCT2 is het werk van velen, een volledige lijst is te vinden in ‘contributors.md’. Ga naar http://github.com/OpenRCT2/OpenRCT2 voor meer informatie. +STR_6138 :OpenRCT2 is het werk van velen, een volledige lijst door op de knop ‘Deelnemers’ te klikken. Ga naar http://github.com/OpenRCT2/OpenRCT2 voor meer informatie. STR_6139 :Alle product- en bedrijfsnamen zijn eigendom van hun respectieve eigenaren. Het gebruik ervan impliceert geen overeenkomst of goedkeuring. STR_6140 :Wijzigingsoverzicht… STR_6141 :Onderste werkbalk in RCT1-stijl @@ -3638,6 +3637,17 @@ STR_6533 :{WINDOW_COLOUR_2}Plezierfactor: {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Intensiteitsfactor: {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Misselijkheidsfactor: {BLACK}-{COMMA16}% STR_6536 :Dit park is opgeslagen in een latere versie van OpenRCT2. Het park is opgeslagen in v{INT32}, je huidige versie is v{INT32}. +STR_6537 :Gewone paden als wachtrij bruikbaar maken +STR_6538 :Zorgt ervoor dat je wachtrijen kunt bouwen met paden die daar niet voor bedoeld zijn. +STR_6539 :Rem is gesloten +STR_6540 :{WINDOW_COLOUR_2}Onze dank gaat uit naar de volgende bedrijven voor hun toestemming om voertuigen op hun ontwerpen te baseren: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Deelnemers +STR_6543 :Deelnemers… +STR_6544 :Lening kan niet negatief zijn! +STR_6545 :Renteberekening van RCT1 gebruiken +STR_6546 :Gebruik de renteberekening van RollerCoaster Tycoon 1, dat een vast rentepercentage van ongeveer 1,33% hanteerde. +STR_6547 :Alle decorobjecten ############# # Scenarios # @@ -4375,6 +4385,11 @@ STR_SCNR :Panda World STR_PARK :Panda World STR_DTLS :Voeg meer attracties toe aan dit park met pandathema, en trek meer bezoekers aan. + +STR_SCNR :Tycoon Park +STR_PARK :Tycoon Park +STR_DTLS : + ### STR_SCNR :Cemetery Ridge diff --git a/data/language/pl-PL.txt b/data/language/pl-PL.txt index 1bed6a7e0c..9e227f8709 100644 --- a/data/language/pl-PL.txt +++ b/data/language/pl-PL.txt @@ -1243,7 +1243,7 @@ STR_1863 :dozorca STR_1864 :mechanik STR_1865 :strażnik STR_1866 :komik -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Nie można zmienić liczby obrotów… STR_1869 :{WINDOW_COLOUR_2}Liczba obrotów: STR_1870 :Liczba pełnych obrotów @@ -1673,7 +1673,7 @@ STR_2314 :{WINDOW_COLOUR_2}Długość trasy: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Koszt: {BLACK}około {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Zajmowany teren: {BLACK}{COMMA16} × {COMMA16} pól STR_2321 :{WINDOW_COLOUR_2}Liczba atrakcji: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Liczba pracowników: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Liczba pracowników: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Rozmiar parku: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Rozmiar parku: {BLACK}{COMMA32} stóp kw. STR_2325 :Kup ziemię by powiększyć park @@ -2648,7 +2648,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Nazwa już istnieje STR_5440 :Zmniejsz utratę ostrości przy pełnym ekranie -STR_5441 :Identyfikuj rodzaj przejażdżki po trasie{NEWLINE}dzięki czemu mogą zostać zmienione wagoniki{NEWLINE} (zaszłość z RCT1) STR_5442 :Wymuś ocenę parku: STR_5447 :Typ {STRINGID} STR_5448 :Atrakcja {STRINGID} @@ -2997,11 +2996,11 @@ STR_5838 :Pokaż osobny przycisk dla okienka Finansów w pasku narzędzi STR_5839 :Pokaż osobny przycisk dla okienka Badań i Rozwoju w pasku narzędzi STR_5840 :Pokaż osobny przycisk dla okienka kodów w pasku narzędzi STR_5841 :Pokaż osobny przycisk dla okienka komunikatów w pasku narzędzi -STR_5842 :Posortuj scenariusze w zakładkach według trudności (zaszłość RCT2) lub ich źródła (zaszłośćRCT1) +STR_5842 :Posortuj scenariusze w zakładkach według trudności (zaszłość RCT2) lub ich źródła (zaszłość RCT1) STR_5843 :Włącz odblokowywanie scenariuszy (zaszłość RCT1) STR_5844 :Pozostań podłączony do gry wieloosobowej{NEWLINE}nawet w przypadku desynchronizacji i błędów połączenia STR_5845 :Dodaje przełącznik trybu debugowania{NEWLINE}do paska narzędzi.{NEWLINE}Włącza skrót klawiaturowy do konsoli developerskiej -STR_5846 :Ustaw częstotliwość zapisy gry OpenRCT2 +STR_5846 :Ustaw częstotliwość zapisu gry OpenRCT2 STR_5847 :Wybierz sekwencje parków na ekran tytułowy.{NEWLINE}Sekwencje tytułowe z RCT1/2 wymagają zaimportowanych odpowiednich scenariuszy STR_5849 :Automatycznie rozlokuj{NEWLINE}nowo zatrudniony personel STR_5851 :Ustaw domyślną częstotliwość inspekcji{NEWLINE}na nowych atrakcjach @@ -3189,7 +3188,7 @@ STR_6034 :{BLACK}{STRING} STR_6035 :Proszę wybrać katalog z RCT1 STR_6036 :Wyczyść STR_6037 :Proszę wybrać prawidłowy katalog RCT1 -STR_6038 :Jeżeli masz zainstalowane RCT1, ustaw tę opcję na ścieżkę z której załadowane będą scenariusze, muzyka, etc. +STR_6038 :Jeżeli masz zainstalowane RCT1, ustaw tę opcję na ścieżkę do owej gry, aby załadować scenariusze, muzykę, etc. z pierwszej części STR_6039 :Szybkie niszczenie atrakcji STR_6040 :Edytuj Opcje Scenariusza STR_6041 :{BLACK}Nie masz zatrudnionych mechaników! @@ -3305,7 +3304,7 @@ STR_6161 :Przełącz widok siatki STR_6162 :Spinning Wild Mouse STR_6163 :Pojazdy wyglądające jak myszki, szybko jeżdżą po ciasnych zakrętach i krótkich zjazdach, dodatkowo łagodnie się kręcą przez co dezorientują gości STR_6164 :{WHITE}❌ -STR_6165 :Użyj synchronizacji pionowej +STR_6165 :Synchronizacja pionowa STR_6166 :Synchronizuje każdą wyświetlaną klatkę z częstotliwością odświeżania monitora, zapobiegając rozrywaniu ekranu. STR_6167 :Zaawansowane STR_6168 :Sekwencja tytułowa @@ -3497,7 +3496,7 @@ STR_6392 :Nie można znaleźć {STRING} w tej ścieżce STR_6393 :Wybór celu STR_6394 :Cel STR_6395 :Utrzymanie -STR_6396 :Wyłącz wygaszacz ekranu i oszczędzanie energii monitora +STR_6396 :Wyłącz oszczędzanie energii monitora STR_6397 :Jeśli zaznaczone, wygaszacz ekranu i inne funkcje oszczędzania ekranu zostaną wyłączone gdy OpenRCT2 jest uruchomione. STR_6398 :Plik zawiera niewspierane typy kolejek. Zaktualizuj do nowszej wersji OpenRCT2.. STR_6399 :OpenRCT2 wmymaga do działania plików z orginalnego Roller Coaster Tycoon 2. Ustaw wartość “game_path” w config.ini na folder w którym zostało zainstalowane RollerCoaster Tycoon 2, następnie zrestartuj OpenRCT2. @@ -3591,7 +3590,9 @@ STR_6487 :Przełącznik przezroczystości pracowników STR_6488 :{RED}Goście skarżą się na dłogość kolejek w Twoim parku.{NEWLINE}Rozważ skrócenie problematycznych kolejek lub zwiększenie przepustowości przejażdżek. STR_6489 :Błąd: Niekompatybilna wersja parku STR_6490 :Ostrzeżenie: Częściowo kompatybilna wersja parku +STR_6491 :Ten park został zapisany w późniejszej wersji OpenRCT2. Park jest v{INT32} i wymaga co najmniej v{INT32}. STR_6492 :Ten park został zapisany w starej wersji OpenRCT2 i nie można go otworzyć za pomocą tej wersji programu OpenRCT2. Park ma jest w v{INT32}. +STR_6493 :Ten park został zapisany w późniejszej wersji OpenRCT2, niektóre dane mogą zostać utracone. Park jest w v{INT32} i wymaga co najmniej v{INT32}. STR_6494 :Grupuj po typie atrakcji STR_6495 :Grupuj po typie atrakcji zamiast wyświetlić każdą osobno. STR_6496 :{WINDOW_COLOUR_2}{STRINGID} diff --git a/data/language/pt-BR.txt b/data/language/pt-BR.txt index ed9af485c6..98c761862f 100644 --- a/data/language/pt-BR.txt +++ b/data/language/pt-BR.txt @@ -1245,7 +1245,7 @@ STR_1863 :Faxineiro STR_1864 :Mecânico STR_1865 :Segurança STR_1866 :Animador -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Impossível alterar o número de rotações… STR_1869 :{WINDOW_COLOUR_2}Número de rotações: STR_1870 :Número de rotações completas @@ -1675,7 +1675,7 @@ STR_2314 :{WINDOW_COLOUR_2}Comprimento da atração: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Custo aproximado: {BLACK}{CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Espaço necessário: {BLACK}{COMMA16} x {COMMA16} blocos STR_2321 :{WINDOW_COLOUR_2}Número de atrações: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Funcionário: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Funcionário: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Tamanho do parque: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Tamanho do parque: {BLACK}{COMMA32}pés². STR_2325 :Comprar terreno para aumentar o tamanho do parque @@ -2650,7 +2650,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Este nome já existe STR_5440 :Minimizar tela inteira quando perder o foco -STR_5441 :Identifica as atrações por tipo de pista,{NEWLINE}assim os veículos podem ser alterados {NEWLINE}depois (como no RCT1) STR_5442 :Forçar a classifi-{NEWLINE}cação do parque: STR_5447 :Tipo {STRINGID} STR_5448 :Atração / Veículo {STRINGID} @@ -3281,8 +3280,8 @@ STR_6133 :Acessa atrações e cenários que ainda não foram inventados STR_6134 :Limpar Cenário STR_6135 :Cliente enviou um pedido inválido STR_6136 :Servidor enviou um pedido inválido -STR_6137 :OpenRCT2, um clone grátis e com código aberto do Roller Coaster Tycoon 2 -STR_6138 :OpenRCT2 é o trabalho de vários autores, a lista completa pode ser encontrada em “contributors.md”. Para mais informações, visite http://github.com/OpenRCT2/OpenRCT2 +STR_6137 :OpenRCT2, uma recriação e expansão grátis e com código aberto do Roller Coaster Tycoon 2 +STR_6138 :OpenRCT2 é o trabalho de vários autores, a lista completa pode ser encontrada no botão “Contribuidores”. Para mais informações, visite http://github.com/OpenRCT2/OpenRCT2 STR_6139 :Todos os nomes de produtos e de empresas pertencem aos seus respectivos proprietários. O uso deles não implica qualquer afiliação ou aprovação por eles. STR_6140 :Relatório de alterações… STR_6141 :Barra de ferramentas Inferior do RCT1 @@ -3639,6 +3638,17 @@ STR_6533 :{WINDOW_COLOUR_2}Fator de emoção: {BLACK}-{COMMA16}% STR_6534 :{WINDOW_COLOUR_2}Fator de intensidade: {BLACK}-{COMMA16}% STR_6535 :{WINDOW_COLOUR_2}Fator de Náusea: {BLACK}-{COMMA16}% STR_6536 :Esse park foi salvo em uma versão posterior do OpenRCT2. O Park foi salvo na v{INT32}. Você atualmente está na v{INT32}. +STR_6537 :Permitir o uso de caminhos normais como filas de espera +STR_6538 :Mostra caminhos normais na lista da janela de Caminhos. +STR_6539 :Freio Travado +STR_6540 :{WINDOW_COLOUR_2}Agradecimento especial às seguintes empresas por permitirem semelhança com elas: +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6542 :Contribuidores +STR_6543 :Contribuidores… +STR_6544 :Empréstimo não pode ser negativo! +STR_6545 :Usar cálculo de juros do RCT1 +STR_6546 :Usar algoritmo de cálculo de juros do RollerCoaster Tycoon 1, que utilizava uma porcentagem fixa de aproximadamente 1,33%. +STR_6547 :Todos os Cenários ############# # Scenarios # @@ -4393,6 +4403,11 @@ STR_SCNR :Mundo Panda STR_PARK :Mundo Panda STR_DTLS :Adicione mais atrações e atraia mais pessoas a esse parque com temática panda + +STR_SCNR :Parque Tycoon +STR_PARK :Parque Tycoon +STR_DTLS : + ### STR_SCNR :Cemetery Ridge diff --git a/data/language/ru-RU.txt b/data/language/ru-RU.txt index 2c2ae2f125..7e1e95f367 100644 --- a/data/language/ru-RU.txt +++ b/data/language/ru-RU.txt @@ -94,6 +94,10 @@ STR_0089 :Мини-горки STR_0090 :Шахтёрская поездка STR_0091 :Неизвестный аттракцион (59) STR_0092 :Горки с запуском ЛИМ +STR_0093 :Гибридные горки +STR_0094 :Горки с одним рельсом +STR_0095 :Альпийские горки +STR_0096 :Классические деревянные горки STR_0512 :Компактные горки со спиральными подъёмом и плавными, кручёными выпадами. STR_0513 :Петляющие горки, на которых люди едут в стоячем положении. STR_0514 :Дно вагонеток раскачивается по пути, прижимаясь к сторонам на поворотах. @@ -150,8 +154,8 @@ STR_0567 :Сидящие в креслах либо подвешены под STR_0569 :Закреплённые специальными ремнями, посетители испытывают чувство свободного полёта, когда они проносятся по воздуху STR_0571 :Круглые вагончики вращаются вокруг своей оси в процессе движения вдоль извилистой деревянной трассы STR_0572 :Лодки большой вместимости движутся по каналу с водой, поднимаются на склоны на конвейерной ленте, ускоряясь при спуске, обдавая пассажиров огромным брызгами -STR_0573 :Вагончики в виде вертолётов движутся по стальному трэку, управляемые вращением педалей -STR_0574 :Пассажиры в специальной упряжи в лежачем положении, движутся по закрученному трэку, оказываясь то лицом, то спиной к земле +STR_0573 :Вагончики в виде вертолётов движутся по стальному треку, управляемые вращением педалей +STR_0574 :Пассажиры в специальной упряжи в лежачем положении, движутся по закрученному треку, оказываясь то лицом, то спиной к земле STR_0575 :Поезда, подвешенные на рельсе, перевозят людей по парку STR_0577 :Вагончики движутся на деревянных рельсах, разворачиваясь на специальных поворотных секциях STR_0578 :Вагончики следуют по рельсам, замкнутым по кругу с перепадами и захватывающими вращениями @@ -164,21 +168,25 @@ STR_0584 :Специальные велосипеды движутся по STR_0585 :Пассажиры сидят в парных креслах, подвешенных под путями, петляя и переворачиваясь во время движения вдоль резких поворотов STR_0586 :Вагончики в виде лодок едут по рельсам с невероятными поворотами и перепадами, плюхаются в секции с водой и плывут. STR_0587 :После бодрого запуска силой сжатого воздуха, поезд устремляется вертикально вверх, через вершину и вертикально вниз с другой стороны, затем возвращаясь на станцию -STR_0588 :Отдельные вагончики движутся под извилистым трэком с разворотами на 180 градусов и крутыми спусками +STR_0588 :Отдельные вагончики движутся под извилистым треком с разворотами на 180 градусов и крутыми спусками STR_0589 :Большая кабина в виде ковра-самолёта движется по окружности на конце четырёх креплений STR_0590 :Посетители плывут в погрузившейся подводной лодке -STR_0591 :Лодки в виде рафтов неспешно курсируют по трэку на реке +STR_0591 :Лодки в виде рафтов неспешно курсируют по треку на реке STR_0593 :Вращающееся колесо с подвешенными кабинками, которое начинает крутиться, а затем наклоняется с помощью поддерживающего рычага STR_0598 :Инвертированные поезда американских горок разгоняются со станции, устремляясь на вертикальный отрезок путей, затем скатываются обратно через станцию, чтобы забраться задним ходом на другой вертикальный отрезок STR_0599 :Небольшие горки с отдельными вагончиками и плавными спусками STR_0600 :Шахтёрский поезд с двигателем движется по плавным извитым путям STR_0602 :Поезда американских горок разгоняются со станции при помощи моторов линейной индукции, следуя по извивающимся и переворачивающимся путям +STR_0603 :Стилизованные под деревянные американские горки со стальным треком, позволяющие строить крутые спуски и перевороты +STR_0604 :По одному в вагончике, пассажиры двигаются по узкому монорельсовому треку, переворачиваясь и проходя резкие повороты +STR_0605 :Посетители съезжают на специальных санях по извилистому стальному треку, притормаживая, чтобы контролировать скорость +STR_0606 :Деревянные американские горки в старом стиле с быстрыми и жёстким поездками, достаточным временем в свободном падении, горизонтальными перегрузками, спроектированные так, чтобы внушать чувство ‘выхода из-под контроля’ STR_0767 :Гость {INT32} STR_0768 :Дворник {INT32} STR_0769 :Механик {INT32} STR_0770 :Охранник {INT32} STR_0771 :Артист {INT32} -STR_0777 :Unnamed park{POP16}{POP16} +STR_0777 :Парк без имени{POP16}{POP16} STR_0778 :Знак STR_0779 :1е STR_0780 :2е @@ -435,7 +443,7 @@ STR_1052 :Невидимые люди STR_1053 :Аттракционы в парке STR_1054 :Назвать аттракцион STR_1055 :Переименовать -STR_1056 :Переименовать +STR_1056 :Переименовать работника STR_1057 :Название аттракциона STR_1058 :Введите новое название этого аттракциона: STR_1059 :Невозможно переименовать аттракцион… @@ -474,7 +482,7 @@ STR_1091 :Режим цирка STR_1092 :Запуск вниз STR_1093 :Обычный режим STR_1094 :Режим свободного падения -STR_1095 :Несколько составов +STR_1095 :Режим секционных блоков STR_1096 :Запуск STR_1097 :Режим запуска секционных блоков STR_1098 :Движется к {POP16}{STRINGID} @@ -847,7 +855,7 @@ STR_1464 :Спираль вверх (мал) STR_1465 :Спираль вверх (больш) STR_1466 :Спираль вниз (мал) STR_1467 :Спираль вниз (больш) -STR_1468 :Штат +STR_1468 :Работники STR_1469 :Аттракцион должен начинаться и кончаться станцией STR_1470 :Станция недостаточно длинная STR_1471 :{WINDOW_COLOUR_2}Скорость: @@ -1071,7 +1079,7 @@ 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 :Невозможно поместить в зону очереди @@ -1081,10 +1089,10 @@ 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 :Да @@ -1237,7 +1245,7 @@ STR_1863 :Дворник STR_1864 :Механик STR_1865 :Охранник STR_1866 :Артист -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Нельзя изменить число оборотов… STR_1869 :{WINDOW_COLOUR_2}Число оборотов: STR_1870 :Число полных оборотов @@ -1274,7 +1282,7 @@ STR_1903 :{WINDOW_COLOUR_2}Магазины STR_1904 :{WINDOW_COLOUR_2}Запасы в магазинах STR_1905 :{WINDOW_COLOUR_2}Продажи пищи/воды STR_1906 :{WINDOW_COLOUR_2}Запасы пищи/воды -STR_1907 :{WINDOW_COLOUR_2}Зарплата +STR_1907 :{WINDOW_COLOUR_2}Зарплата работников STR_1908 :{WINDOW_COLOUR_2}Маркетинг STR_1909 :{WINDOW_COLOUR_2}Разработки STR_1910 :{WINDOW_COLOUR_2}Проценты по займу @@ -1283,7 +1291,7 @@ STR_1912 :{MONTH} STR_1913 :{BLACK}+{CURRENCY2DP} STR_1914 :{BLACK}{CURRENCY2DP} STR_1915 :{RED}{CURRENCY2DP} -STR_1916 :{WINDOW_COLOUR_2}Заем: +STR_1916 :{WINDOW_COLOUR_2}Заём: STR_1917 :{POP16}{POP16}{POP16}{CURRENCY} STR_1918 :Нельзя больше занимать! STR_1919 :Мало денег! @@ -1304,15 +1312,15 @@ STR_1935 :{STRINGID} покинул парк STR_1936 :{STRINGID} купил {STRINGID} STR_1937 :Показать информацию о субъекте сообщения STR_1938 :Показать вид гостя -STR_1939 :Показать вид сотрудника +STR_1939 :Показать вид работника STR_1940 :Показать счастье, энергию, голод и т.д. для этого гостя STR_1941 :Показать, на каких аттр. был этот гость STR_1942 :Показать финансовую инфо по этому гостю STR_1943 :Показать последние мысли гостя STR_1944 :Показать, что несёт гость -STR_1945 :Показать указания и опции для этого сотрудника +STR_1945 :Показать указания и опции для этого работника STR_1946 :Выберите костюм для этого артиста -STR_1947 :Показать патрулируемые зоны и найти ближайшего сотрудника +STR_1947 :Показать патрулируемые зоны и найти ближайшего работника STR_1948 :Нанять нового работника STR_1949 :Обзор финансов STR_1950 :Финансовый график @@ -1659,7 +1667,7 @@ STR_2306 :Сохр. дизайн трека STR_2307 :Выбрать {STRINGID} дизайн STR_2308 :{STRINGID} Дизайн Трека STR_2309 :Установить новый дизайн -STR_2310 :Построить дизайн +STR_2310 :Создать собственный дизайн STR_2311 :{WINDOW_COLOUR_2}Рейтинг волнения: {BLACK}{COMMA2DP32} (прим.) STR_2312 :{WINDOW_COLOUR_2}Рейтинг напряжённости: {BLACK}{COMMA2DP32} (прим.) STR_2313 :{WINDOW_COLOUR_2}Рейтинг тошноты: {BLACK}{COMMA2DP32} (прим.) @@ -1667,7 +1675,7 @@ STR_2314 :{WINDOW_COLOUR_2}Длина аттр.: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Цена: {BLACK}прим. {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Нужно места: {BLACK}{COMMA16} x {COMMA16} блоков STR_2321 :{WINDOW_COLOUR_2}Число аттракционов: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Штат: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Работники: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Размер парка: {BLACK}{COMMA16}m² STR_2324 :{WINDOW_COLOUR_2}Размер парка: {BLACK}{COMMA16}кв.фт. STR_2325 :Купить землю для расширения @@ -1852,7 +1860,7 @@ STR_2517 :Информация по разработкам STR_2518 :Список аттракционов STR_2519 :Информация о парке STR_2520 :Список гостей -STR_2521 :Показать штат +STR_2521 :Показать работников STR_2522 :Последние сообщения STR_2523 :Карта STR_2524 :Скриншот @@ -1925,7 +1933,6 @@ STR_2709 :Перезаписать STR_2710 :Укажите имя файла. STR_2718 :Вверх STR_2719 :Новый файл -# Peeked at source code, where these strings are used — it’s unapplicable to Russian language. Using reductions STR_2720 :{UINT16} сек. STR_2721 :{UINT16} сек. STR_2722 :{UINT16} мин. {UINT16} сек. @@ -1952,13 +1959,13 @@ STR_2749 :Мой новый сценарий # New strings used in the cheats window previously these were ??? STR_2750 :Все элементы наверх STR_2751 :Все элементы вниз -STR_2752 :Чистая трава -STR_2753 :Стриженная трава +STR_2752 :Очистить траву +STR_2753 :Подстричь траву STR_2754 :Полить растения STR_2755 :Исправить вандализм STR_2756 :Убрать мусор STR_2763 :??? -STR_2765 :Большой вагон +STR_2765 :Группа гостей STR_2766 :Выиграть сценарий STR_2767 :Заблок. климат STR_2769 :Открыть парк @@ -1988,14 +1995,14 @@ STR_2793 :(Завершено {STRINGID}) STR_2794 :{WINDOW_COLOUR_2}Завершено: {BLACK}{STRINGID}{NEWLINE}{WINDOW_COLOUR_2} Стоимость компании: {BLACK}{CURRENCY} STR_2795 :Сорт. STR_2796 :Сортировать список аттракционов по типу -STR_2797 :Двигать камеру, когда указатель у границы. +STR_2797 :Двигать камеру, когда указатель у границы STR_2798 :Выбрать, нужно ли двигать камеру, когда указатель у границы экрана STR_2799 :Смотреть или изменить назначение клавиш STR_2800 :{WINDOW_COLOUR_2}Посещений: {BLACK}{COMMA16} STR_2801 :{WINDOW_COLOUR_2}Доход от входной платы: {BLACK}{CURRENCY2DP} STR_2802 :Карта STR_2803 :Показать этих гостей подсвеченными на карте -STR_2804 :Показать этих сотрудников подсвеченными +STR_2804 :Показать этих работников подсвеченными STR_2805 :Показать карту парка STR_2806 :{RED}Гости жалуются на отвратительное состояние дорожек в вашем парке{NEWLINE}Проверьте, где ваши дворники STR_2807 :{RED}Гости жалуются на большое количество мусора в парке{NEWLINE}Проверьте, где ваши дворники @@ -2029,7 +2036,7 @@ STR_2834 :{TOPAZ}Ваш парк получил награду как ‘Лу STR_2835 :{TOPAZ}Ваш парк получил награду как ‘Самый красивый парк в стране’! STR_2836 :{TOPAZ}Ваш парк получил награду как ‘Самый худший парк в стране’! STR_2837 :{TOPAZ}Ваш парк получил награду как ‘Самый безопасный парк в стране’! -STR_2838 :{TOPAZ}Ваш парк получил награду как ‘Парк с лучшими сотрудниками’! +STR_2838 :{TOPAZ}Ваш парк получил награду как ‘Парк с лучшими работниками’! STR_2839 :{TOPAZ}Ваш парк получил награду как ‘Парк с лучшей пищей в стране’! STR_2840 :{TOPAZ}Ваш парк получил награду как ‘Парк с худшей пищей в стране’! STR_2841 :{TOPAZ}Ваш парк получил награду как ‘Парк с лучшими объектами отдыха в стране’! @@ -2055,9 +2062,9 @@ STR_2973 :Альт. схема 2 STR_2974 :Альт. схема 3 STR_2975 :Выберите, какую схему изменить или применить STR_2976 :Раскрасить отдельную часть аттракциона, используя выбранную схему. -STR_2977 :Имя сотрудника -STR_2978 :Введите новое имя этого сотрудника: -STR_2979 :Невозможно назвать сотрудника… +STR_2977 :Имя работника +STR_2978 :Введите новое имя этого работника: +STR_2979 :Невозможно назвать работника… STR_2980 :Слишком много баннеров STR_2981 :{RED}Нет входа - - STR_2982 :Текст баннера @@ -2171,7 +2178,7 @@ STR_3106 :Лист инфо-киосков и других объектов STR_3107 :Закрыто STR_3108 :Тест STR_3109 :Открыто -STR_3110 :{WINDOW_COLOUR_2}Блок. Секции: {BLACK}{COMMA16} +STR_3110 :{WINDOW_COLOUR_2}Секционных блоки: {BLACK}{COMMA16} STR_3111 :Кликните на дизайне, чтобы построить его STR_3112 :Кликните на дизайне, чтобы переименовать STR_3113 :Выбрать другой дизайн @@ -2439,10 +2446,12 @@ STR_5128 :Размер выделения STR_5129 :Введите размер выделения в диапазоне от {COMMA16} до {COMMA16} STR_5130 :Размер карты STR_5131 :Введите размер карты в диапазоне от {COMMA16} до {COMMA16} -STR_5132 :Потремонтировать все аттракционы +STR_5132 :Отремонтировать все аттракционы +STR_5133 :Изменить малую площадь прав на землю +STR_5134 :Изменить большую площадь прав на землю STR_5135 :Купить права на землю и строительство STR_5136 :Права собственности на землю -STR_5137 :Оотключить операционные пределы +STR_5137 :Отключить операционные ограничения STR_5138 :{WINDOW_COLOUR_2}{STRINGID} STR_5139 :{WHITE}{STRINGID} STR_5140 :Отключить поломку тормозов @@ -2456,12 +2465,12 @@ STR_5147 :Читы STR_5148 :Изменить скорость игры STR_5149 :Показать опции читов STR_5150 :Активировать инструменты отладки -# Thousands separator STR_5151 :. -# Decimal separator STR_5152 :, STR_5153 :Редактировать темы… +STR_5154 :Аппартное отображение STR_5155 :Разрешить тестирование незавершённых треков +STR_5156 :Позволяет тестировать большинство аттракционов, даже если трек не завершён; неприменимо для режима секционных блоков STR_5158 :Выйти в меню STR_5159 :Выйти из OpenRCT2 STR_5160 :{POP16}{MONTH} {PUSH16}{PUSH16}{STRINGID}, Год {POP16}{COMMA16} @@ -2482,30 +2491,205 @@ STR_5187 :Финансы STR_5188 :Новая кампания STR_5189 :Исследовать STR_5190 :Карта +STR_5191 :Область просмотра STR_5192 :Последние новости STR_5193 :Земля STR_5194 :Вода +STR_5195 :Очистить декорации STR_5196 :Права собственности на землю +STR_5197 :Декорации STR_5198 :Тропинка STR_5199 :Создание аттракционов +STR_5200 :Расположить дизайн треков STR_5201 :Новый аттракцион +STR_5202 :Выбор дизайна треков STR_5203 :Аттракцион STR_5204 :Список аттракционов STR_5205 :Гость STR_5206 :Список гостей -STR_5207 :Персонал -STR_5208 :Список сотрудников +STR_5207 :Работники +STR_5208 :Список работников STR_5209 :Баннер STR_5210 :Выбор объекта STR_5211 :Список изобретений +STR_5212 :Опции сценария +STR_5213 :Опции целей +STR_5214 :Генерация карты +STR_5215 :Менеджер проектирования треков +STR_5216 :Список менеджера проектирования треков STR_5217 :Читы STR_5218 :Темы STR_5219 :Опции STR_5220 :Горячие клавиши STR_5221 :Изменить горячие клавиши STR_5222 :Загрузка/сохранение +STR_5223 :Подсказка сохранения +STR_5224 :Подсказка сноса аттракциона +STR_5225 :Подсказка увольнения работников +STR_5226 :Подсказка удаления трека +STR_5227 :Подсказка перезаписи файла сохранения +STR_5228 :Главный интерфейс +STR_5229 :Парк +STR_5230 :Инструменты +STR_5231 :Аттракционы и гости +STR_5232 :Редакторы +STR_5233 :Разное +STR_5234 :Подсказки +STR_5235 :Настройки +STR_5236 :Окно +STR_5237 :Палитра +STR_5238 :Текущая схема: +STR_5239 :Создать копию +STR_5240 :Введите имя темы парка +STR_5241 :Невозможно изменить эту схему +STR_5242 :Такое имя парка уже существует +STR_5243 :Использованы некорректные символы +STR_5244 :Темы +STR_5245 :Верхняя панель инструментов +STR_5246 :Нижняя панель инструментов +STR_5247 :Нижняя панель редактора треков +STR_5248 :Нижняя панель редактора сценариев +STR_5249 :Кнопки меню на главном экране +STR_5250 :Кнопка выхода на главном экране +STR_5251 :Кнопка опций на главном экране +STR_5252 :Выбор сценария на главном экране +STR_5253 :Информация о парке +STR_5256 :Создать новую тему для внесения изменений +STR_5257 :Создать новую тему на основании текущей +STR_5258 :Удалить текущую тему +STR_5259 :Переименовать текущую тему +STR_5260 :Гигантский скриншот +STR_5261 :Фильтр +STR_5262 :Wacky Worlds +STR_5263 :Time Twister +STR_5264 :Пользовательский +STR_5265 :Выбор видимых источников контента +STR_5266 :Отображение +STR_5267 :Язык и единицы измерения +STR_5268 :Звук +STR_5269 :Управление и интерфейс +STR_5270 :Разное +STR_5272 :Малые элементы пейзажа +STR_5273 :Большие элементы пейзажа +STR_5274 :Тропинка +STR_5275 :Поиск объектов +STR_5276 :Введите имя объекта для поиска +STR_5277 :Очистить +STR_5278 :Режим песочницы +STR_5279 :Режим песочницы отключён +STR_5280 :Позволяет редактировать настройки владения землёй из окна карты, а так же другие настройки, которые обычно доступны только в редакторе сценариев +STR_5281 :Особенности +STR_5282 :Переключатель откр./закр. аттракционов в стиле RCT1 +STR_5283 :Переключатель откр./закр. парка в стиле RCT1 +STR_5284 :Шрифт выбора сценариев в стиле RCT1 +STR_5287 :Аттракцион уже сломан +STR_5288 :Аттракцион закрыт +STR_5289 :Для этого аттракциона не предусмотрены поломки +STR_5290 :Починить аттракцион +STR_5291 :Невозможно сломать +STR_5292 :Сломать принудительно +STR_5293 :Закрыть аттракцион +STR_5294 :Протестировать аттракцион +STR_5295 :Открыть аттракцион +STR_5296 :Закрыть парк +STR_5297 :Открыть парк +STR_5298 :{RED}{STRINGID} +STR_5299 :{LIGHTPINK}{STRINGID} +STR_5300 :Быстрое увольнение работников +STR_5301 :Сбросить ваш заём +STR_5302 :Сбросить заём +STR_5303 :Разрешить строительсво в режиме паузы +STR_5304 :Заставка главного экрана: +STR_5305 :RollerCoaster Tycoon 1 +STR_5306 :RollerCoaster Tycoon 1 (AA) +STR_5307 :RollerCoaster Tycoon 1 (AA + LL) +STR_5308 :RollerCoaster Tycoon 2 +STR_5309 :OpenRCT2 +STR_5310 :Случайно +STR_5311 :Инструменты отладки +STR_5312 :Показать консоль +STR_5313 :Показать инспектор тайлов +STR_5314 :Инспектор тайлов +STR_5335 :Вход аттракциона +STR_5336 :Выход аттракциона +STR_5337 :Вход в парк +STR_5338 :Тип элемента +STR_5339 :Базовая высота +STR_5340 :Допустимая высота +STR_5343 :Автоматически расставлять персонал +STR_5344 :Список изменений +STR_5345 :Финансовые читы +STR_5346 :Читы гостей +STR_5347 :Читы парка +STR_5348 :Читы аттракционов +STR_5349 :Все аттракционы +STR_5350 :Макс +STR_5351 :Мин +STR_5352 :{BLACK}Счастье: +STR_5353 :{BLACK}Энергия: +STR_5354 :{BLACK}Голод: +STR_5355 :{BLACK}Жажда: +STR_5356 :{BLACK}Тошнота: +STR_5357 :{BLACK}Толерантность к тошноте: +STR_5358 :{BLACK}Туалет: +STR_5359 :Удалить гостей +STR_5360 :Убирать с карты всех гостей +STR_5361 :Раздать всем гостям: +STR_5362 :{BLACK}Устанавливает всем гостям предпочитаемый уровень интенсивности аттракционов: +STR_5363 :Более 1 +STR_5364 :Менее 15 +STR_5365 :{BLACK}Скорость работников: +STR_5366 :Нормальная +STR_5367 :Быстрая +STR_5368 :Сбросить историю аварий +STR_5371 :Выбор объекта +STR_5372 :Инвертировать направление перетаскивания правой кнопкой мыши +STR_5373 :Имя {STRINGID} +STR_5374 :Дата {STRINGID} +STR_5375 :▲ +STR_5376 :▼ +STR_5404 :Такое имя уже существует +STR_5440 :Сворачивать окно при потере фокуса + +STR_5442 :Принудительно установить рейтинг парка: +STR_5447 :Тип {STRINGID} +STR_5448 :Аттракцион / траспорт {STRINGID} +STR_5449 :Уменьшить скорость игры +STR_5450 :Увеличить скорость игры +STR_5451 :Открыть меню читов +STR_5452 :Переключить видимость панелей инструментов +STR_5453 :Выбрать другой аттракцион +STR_5454 :Снять ограничение FPS +STR_5455 :Включить режим песочницы +STR_5456 :Отключить проверку коллизий +STR_5457 :Отключить ограничения поддержек +STR_5458 :Повернуть по часовой стрелке +STR_5459 :Повернуть против часовой стрелке +STR_5460 :Повернуть вид против часовой стрелке +STR_5461 :Установить параметры гостя STR_5462 :{CURRENCY} +STR_5463 :Goal: Веселитесь! +STR_5464 :Общие +STR_5465 :Погода +STR_5466 :Персонал STR_5467 :ALT + +STR_5468 :Недавние сообщения +STR_5469 :Прокрутка карты вверх +STR_5470 :Прокрутка карты влево +STR_5471 :Прокрутка карты вниз +STR_5472 :Прокрутка карты вправо +STR_5473 :Цикл день / ночь +STR_5474 :Показывать текст на баннерах в верхнем регистре +STR_5475 :{COMMA16} недель +STR_5476 :Аппаратное +STR_5477 :Отрисовка карты +STR_5478 :Управление +STR_5479 :Панель инструментов +STR_5480 :Показывать кнопки на панели инструментов для: +STR_5481 :Темы +STR_5482 :{WINDOW_COLOUR_2}Время с последней проверки: {BLACK}1 минута +STR_5483 :{BLACK}({COMMA16} недель осталось) +STR_5484 :{BLACK}({COMMA16} неделя осталось) STR_5485 :{STRING} STR_5486 :{BLACK}{COMMA16} STR_5918 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} diff --git a/data/language/sv-SE.txt b/data/language/sv-SE.txt index d9c07b4a2b..213edee9e9 100644 --- a/data/language/sv-SE.txt +++ b/data/language/sv-SE.txt @@ -1242,7 +1242,7 @@ STR_1863 :Vaktmästare STR_1864 :Mekaniker STR_1865 :Säkerhetsvakt STR_1866 :Underhållare -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Kan inte ändra antal rotationer… STR_1869 :{WINDOW_COLOUR_2}Antal rotationer: STR_1870 :Antal hela rotationer @@ -1672,7 +1672,7 @@ STR_2314 :{WINDOW_COLOUR_2}Åktur längd: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Kostnad: {BLACK}omkring {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Storlek: {BLACK}{COMMA16} × {COMMA16} block STR_2321 :{WINDOW_COLOUR_2}Antal åkturer och attraktioner: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Personal: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Personal: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Parkstorlek: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Parkstorlek: {BLACK}{COMMA32}fot² STR_2325 :Köp land för att utöka parken @@ -2651,7 +2651,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Namnet finns redan STR_5440 :Minimera fullskärm vid tappad fokus -STR_5441 :Identifiera åkturer via spårtyp,{NEWLINE}så att vagnar kan bli ändrade{NEWLINE}efteråt (som i RCT1) STR_5442 :Tvinga parkbetyg: STR_5447 :Typ {STRINGID} STR_5448 :Åktur eller fordon {STRINGID} @@ -3595,7 +3594,9 @@ STR_6487 :Växla genomskinlig personal STR_6488 :{RED}Gästerna klagar på kölängderna i din park. {NEWLINE}Överväg att förkorta problematiska köer, eller öka åkturernas genomströmning. STR_6489 :Fel: Inkompatibel parkversion STR_6490 :Varning: Halvkompatibel parkversion +STR_6491 :Denna park sparades i en nyare version av OpenRCT2. Parken är v{INT32} och kräver åtminstone v{INT32}. STR_6492 :Denna park sparades i en äldre version av OpenRCT2, och kan inte öppnas med denna version av OpenRCT2. Parken är v{INT32}. +STR_6493 :Denna park sparades i en nyare version av OpenRCT2, viss data kan gå förlorad. Parken är v{INT32} och kräver åtminstone v{INT32}. ############# # Scenarion # diff --git a/data/language/tr-TR.txt b/data/language/tr-TR.txt index f2f66f31ff..d5542d2333 100644 --- a/data/language/tr-TR.txt +++ b/data/language/tr-TR.txt @@ -1239,7 +1239,7 @@ STR_1863 :Temizlikci STR_1864 :Tamirci STR_1865 :Güvenlik STR_1866 :Animatör -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Çevirme miktarı değiştirilemiyor… STR_1869 :{WINDOW_COLOUR_2}Çevirme miktarı: STR_1870 :Aletin kaç defa çevirme yapacağını seçiniz @@ -1669,7 +1669,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}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Işci: {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 @@ -2644,7 +2644,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Bu isim kullanılmakda STR_5440 :Oyun ön planda değilse oyunu simge durumuna getir -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behaviour) STR_5442 :Park değerlendirmesini: STR_5447 :Alet {STRINGID} STR_5448 :Tür {STRINGID} diff --git a/data/language/vi-VN.txt b/data/language/vi-VN.txt index 9b4e8df41d..00fa777411 100644 --- a/data/language/vi-VN.txt +++ b/data/language/vi-VN.txt @@ -1241,7 +1241,7 @@ STR_1863 :Handyman STR_1864 :Mechanic STR_1865 :Security Guard STR_1866 :Entertainer -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :Can’t change number of rotations… STR_1869 :{WINDOW_COLOUR_2}Number of rotations: STR_1870 :Number of complete rotations @@ -1672,7 +1672,7 @@ STR_2314 :{WINDOW_COLOUR_2}Độ dài: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}Tốn: {BLACK}around {CURRENCY} STR_2316 :{WINDOW_COLOUR_2}Diện tích: {BLACK}{COMMA16} x {COMMA16} blocks STR_2321 :{WINDOW_COLOUR_2}Number of rides/attractions: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}Nhân viên: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}Nhân viên: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}Park size: {BLACK}{COMMA32}sq.ft. STR_2325 :Buy land to extend park @@ -2648,7 +2648,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :Name already exists STR_5440 :Minimise fullscreen on focus loss -STR_5441 :Identifies rides by track type{NEWLINE}so vehicles can be changed{NEWLINE}afterwards (RCT1 behaviour) STR_5442 :Force park rating: STR_5447 :Type {STRINGID} STR_5448 :Ride / Vehicle {STRINGID} diff --git a/data/language/zh-CN.txt b/data/language/zh-CN.txt index 26c02f6b63..cf6b9e8c16 100644 --- a/data/language/zh-CN.txt +++ b/data/language/zh-CN.txt @@ -1,4 +1,4 @@ -# STR_XXXX part is read and XXXX becomes the string id number. +# STR_XXXX part is read and XXXX becomes the string id number. # Everything after the colon and before the new line will be saved as the string. # Use # at the beginning of a line to leave a comment. STR_0000 : @@ -120,7 +120,7 @@ STR_0530 :列车悬挂在钢缆下并不断于车站与车站之间游走 STR_0531 :一款列车会穿过螺旋及回环的较小型过山车 STR_0532 :游客在动力车辆中沿着基于轨道的路线缓慢行驶 STR_0533 :自由落体汽车先被气动发射到高高的钢塔上再自由落体 -STR_0534 :自驾式,并以气油驱动的小型赛车(卡丁车) +STR_0534 :自驾式,并以气油驱动的小型赛车(卡丁车) STR_0535 :以运木为形状的小船穿梭于有水的轨道,并会于下滑时溅湿游客 STR_0536 :圆形的小船穿梭于比较广阔的水道,于水道中被瀑布溅湿,并有激流使乘客的紧张感大增 STR_0537 :游客在电动躲避车中相互碰撞 @@ -146,8 +146,8 @@ STR_0559 :大型主题建筑,包含可怕的走廊和诡异的房间 STR_0560 :生病的客人可以更快康复的地方 STR_0561 :大帐篷内的马戏团动物表演 STR_0562 :有动力的车辆将会穿梭于有著恐怖景物及特效的多层轨道中 -STR_0563 :乘客坐在舒适并只有简单安全装备的列车上享受巨大而顺滑的下滑,扭曲的轨道和充足的‘空中’时间 -STR_0564 :一款在木製轨道运行的过山车,这个过山车会嘈吵地飞驰过高低不平的轨道, 给乘客充足的‘空中时间’之馀,同时会给人一种‘失去控制’的乘坐体验 +STR_0563 :乘客坐在舒适并只有简单安全装备的列车上享受巨大而顺滑的下滑,扭曲的轨道和充足的“空中”时间 +STR_0564 :一款在木製轨道运行的过山车,这个过山车会嘈吵地飞驰过高低不平的轨道,给乘客充足的“空中时间”之馀,同时会给人一种“失去控制”的乘坐体验 STR_0565 :一款只能使用普通下坡及弯道的简单木製过山车,车辆只靠产生轨道阻力的车轮及重力滑翔于轨道上 STR_0566 :每辆单独的过山车都会游走在附有急弯及急短下坡的Z型轨道上 STR_0567 :乘客坐在悬挂在轨道的不同位置下,衝下陡下坡及各种倒转轨道时,会被翻腾得四脚朝天 @@ -181,11 +181,11 @@ STR_0603 :带有钢轨的木制过山车,允许陡峭的下降和倒置 STR_0604 :游客在狭窄的单轨轨道上单排骑行,就像他们在激烈的倒转和方向变化中进行比赛 STR_0605 :游客在蜿蜒的钢制赛道上滑行,以控制他们的速度 STR_0606 :一个拥有老式风格的木质过山车,它拥有快速且粗糙质感的车厢、大量的失重感以及侧向加速度,这些设计使得乘客感到“失去控制”般的刺激。 -STR_0767 :游客 {INT32} -STR_0768 :清洁工人 {INT32} -STR_0769 :维修人员 {INT32} -STR_0770 :安全警卫 {INT32} -STR_0771 :表演人员 {INT32} +STR_0767 :游客{INT32} +STR_0768 :清洁工人{INT32} +STR_0769 :维修人员{INT32} +STR_0770 :安全警卫{INT32} +STR_0771 :表演人员{INT32} STR_0777 :未命名游乐园{POP16}{POP16} STR_0778 :指示牌 STR_0779 :1日 @@ -236,9 +236,9 @@ STR_0823 :数据文件丢失或不可访问 STR_0824 :{BLACK}❌ STR_0825 :该名称已被使用 STR_0826 :过多名称被定义 -STR_0827 :现金不足 - 需要 {CURRENCY2DP} +STR_0827 :现金不足——需要{CURRENCY2DP} STR_0828 :关闭窗口 -STR_0829 :窗口标题 - 拖拽来移动窗口 +STR_0829 :窗口标题——拖拽来移动窗口 STR_0830 :放大 STR_0831 :缩小 STR_0832 :顺时针旋转90° @@ -246,15 +246,15 @@ STR_0833 :暂停游戏 STR_0834 :磁盘和游戏选项 STR_0839 :{UINT16} × {UINT16} STR_0840 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{UINT16} × {UINT16} -STR_0847 :关于‘OpenRCT2’ -STR_0850 :{WINDOW_COLOUR_2}Copyright © 2002 Chris Sawyer, 版权所有 +STR_0847 :关于“OpenRCT2” +STR_0850 :{WINDOW_COLOUR_2}Copyright © 2002 Chris Sawyer,版权所有 STR_0851 :{WINDOW_COLOUR_2}设计及程序:Chris Sawyer STR_0852 :{WINDOW_COLOUR_2}美术:Simon Foster STR_0853 :{WINDOW_COLOUR_2}音效及音乐:Allister Brimble STR_0854 :{WINDOW_COLOUR_2}其他音效录制:David Ellis -STR_0855 :{WINDOW_COLOUR_2}Representation by Jacqui Lyons at Marjacq Ltd. -STR_0856 :{WINDOW_COLOUR_2}鸣谢: -STR_0857 :{WINDOW_COLOUR_2}Peter James Adcock,Joe Booth,和 John Wardley +STR_0855 :{WINDOW_COLOUR_2}由 Jacqui Lyons 代表 Marjacq 有限责任公司 +STR_0856 :{WINDOW_COLOUR_2}鸣谢: +STR_0857 :{WINDOW_COLOUR_2}Peter James Adcock、Joe Booth 和 John Wardley STR_0865 :{STRINGID} STR_0866 :{POP16}{STRINGID} STR_0867 :{POP16}{POP16}{STRINGID} @@ -267,11 +267,11 @@ STR_0873 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{STRINGID} STR_0874 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{STRINGID} STR_0875 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{STRINGID} STR_0876 :{BLACK}▼ -STR_0877 :太低! -STR_0878 :太高! +STR_0877 :太低了! +STR_0878 :太高了! STR_0879 :不能在这里降低土地… STR_0880 :不能在这里抬升土地… -STR_0881 :有物体挡住去路 +STR_0881 :被物体挡住了 STR_0882 :加载游戏 STR_0883 :保存游戏 STR_0884 :加载地形 @@ -280,16 +280,16 @@ STR_0887 :退出场景编辑器 STR_0888 :退出轨道设计工具 STR_0889 :退出轨道设计管理工具 STR_0891 :截图 -STR_0892 :截图 ‘{STRINGID}’ 已保存 -STR_0893 :截图失败! -STR_0894 :Landscape data area full ! +STR_0892 :截图 “{STRINGID}” 已保存 +STR_0893 :截图失败! +STR_0894 :地形数据已满! STR_0895 :无法在一半地上一半地下的地形中建造 -STR_0896 :{POP16}{POP16}{STRINGID} 建造 +STR_0896 :{POP16}{POP16}{STRINGID}建造 STR_0897 :方向 STR_0898 :左转 STR_0899 :右转 -STR_0900 :左转 (小弧度) -STR_0901 :右转 (小弧度) +STR_0900 :左转(小弧度) +STR_0901 :右转(小弧度) STR_0902 :左转(很小的弧度) STR_0903 :右转(很小的弧度) STR_0904 :左转(大弧度) @@ -317,14 +317,14 @@ STR_0925 :向上螺旋 STR_0926 :不能移除此物… STR_0927 :不能在此建造… STR_0928 :提升坡将会把车厢拉上坡 -STR_0929 :‘S’型弯道 (向左) -STR_0930 :‘S’型弯道 (向右) -STR_0931 :垂直回环 (向左) -STR_0932 :垂直回环 (向右) +STR_0929 :“S”型弯道(向左) +STR_0930 :“S”型弯道(向右) +STR_0931 :垂直回环(向左) +STR_0932 :垂直回环(向右) STR_0933 :请先将地面抬升或降低 -STR_0934 :游乐设施入口挡在此处 -STR_0935 :游乐设施出口挡在此处 -STR_0936 :游乐场的入口挡在此处 +STR_0934 :被游乐设施入口挡住了 +STR_0935 :被游乐设施出口挡住了 +STR_0936 :被游乐园入口挡住了 STR_0937 :查看选项 STR_0938 :调整地势高低及陡峭程度 STR_0939 :地下/内部 视图模式 @@ -335,9 +335,9 @@ STR_0943 :半透明景观 STR_0944 :保存 STR_0945 :不保存 STR_0946 :取消 -STR_0947 :是否在加载其他存档之前保存游戏 ? -STR_0948 :是否在退出之前保存游戏 ? -STR_0949 :是否在退出之前保存游戏 ? +STR_0947 :是否在加载其他存档之前保存游戏? +STR_0948 :是否在退出之前保存游戏? +STR_0949 :是否在退出之前保存游戏? STR_0950 :加载游戏 STR_0951 :退出游戏 STR_0952 :退出游戏 @@ -364,15 +364,15 @@ STR_0973 :确定 STR_0974 :游乐设施 STR_0975 :商店及摊贩 STR_0976 :洗手间及信息亭 -STR_0977 :建造新的运输类游乐设施 -STR_0978 :建造新的温和类游乐设施 -STR_0979 :建造新的过山车 -STR_0980 :建造新的刺激类游乐设施 -STR_0981 :建造新的水上游乐设施 -STR_0982 :建造新的商店及摊贩 +STR_0977 :新的运输类游乐设施 +STR_0978 :新的温和类游乐设施 +STR_0979 :新的过山车类游乐设施 +STR_0980 :新的刺激类游乐设施 +STR_0981 :新的水上游乐设施 +STR_0982 :新的商店及摊贩 STR_0983 :研究及开发 -STR_0984 :{WINDOW_COLOUR_2}▲{BLACK} {CURRENCY2DP} -STR_0985 :{WINDOW_COLOUR_2}▼{BLACK} {CURRENCY2DP} +STR_0984 :{WINDOW_COLOUR_2}▲{BLACK} {CURRENCY2DP} +STR_0985 :{WINDOW_COLOUR_2}▼{BLACK} {CURRENCY2DP} STR_0986 :{BLACK}{CURRENCY2DP} STR_0987 :太多游乐设施/店铺 STR_0988 :不能新建游乐设施/店铺… @@ -382,20 +382,20 @@ STR_0991 :车站站台 STR_0992 :拆除整个游乐设施/店铺 STR_0993 :拆除游乐设施/店铺 STR_0994 :拆除 -STR_0995 :{WINDOW_COLOUR_1}确定要完全拆除{STRINGID}? +STR_0995 :{WINDOW_COLOUR_1}确定要完全拆除{STRINGID}? STR_0996 :整体外观 STR_0997 :视角选择 STR_0998 :此游乐设施的车站数量已达到上限 STR_0999 :需要一个车站站台 STR_1000 :轨道没有连接完整 -STR_1001 :轨道不适合此类型的车 -STR_1002 :不能开启 {STRINGID}… -STR_1003 :不能测试 {STRINGID}… -STR_1004 :不能关闭 {STRINGID}… -STR_1005 :不能开始建造 {STRINGID}… +STR_1001 :轨道不适合此类型的列车 +STR_1002 :不能开启{STRINGID}… +STR_1003 :不能测试{STRINGID}… +STR_1004 :不能关闭{STRINGID}… +STR_1005 :不能开始建造{STRINGID}… STR_1006 :必须先关闭 STR_1007 :不能创建足够的车辆 -STR_1008 :开放,关闭或测试游乐设施/店铺 +STR_1008 :开放、关闭或测试游乐设施/店铺 STR_1009 :开放或关闭所有游乐设施/店铺 STR_1010 :开放或关闭游乐园 STR_1011 :关闭所有游乐设施 @@ -409,20 +409,20 @@ 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_1022 :{POP16}{POP16}{POP16}{COMMA16}车/列车 +STR_1023 :{POP16}{POP16}{POP16}{COMMA16}车/列车 +STR_1024 :{COMMA16}车/列车 +STR_1025 :{COMMA16}车/列车 +STR_1026 :车站站台太长! STR_1027 :将主视定位到此 -STR_1028 :离开地图边缘! +STR_1028 :离开地图边缘! STR_1029 :不能在半水上半水下地形上建造! STR_1030 :只能建造在水下! STR_1031 :不能建造在水下! STR_1032 :只能建造在水上! -STR_1033 :只能建造在地上! +STR_1033 :只能建造在地面以上! STR_1034 :只能建造在地面! -STR_1035 :当地权威不允许建筑物高度超过树的高度 +STR_1035 :当地政府不允许建筑物高度超过树的高度 STR_1036 :加载游戏 STR_1037 :加载地形 STR_1038 :将存档转换为关卡 @@ -434,24 +434,24 @@ 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_1053 :游乐园内的游乐设施/店铺 STR_1054 :命名游乐设施/店铺 STR_1055 :命名游客 STR_1056 :命名职员 -STR_1057 :游乐设施/店铺命名 +STR_1057 :游乐设施/店铺名称 STR_1058 :请输入这个游乐设施/店铺的新名字: -STR_1059 :重命名 设施/店铺 失败… +STR_1059 :重命名设施/店铺失败… STR_1060 :无效的设施/店铺名字 STR_1061 :正常模式 STR_1062 :连续循环模式 STR_1063 :反向倾斜循环发车模式 -STR_1064 :动力发车 (通过车站) +STR_1064 :动力发车(通过车站) STR_1065 :循环模式 STR_1066 :出租小船模式 STR_1067 :向上发车 @@ -467,35 +467,35 @@ STR_1076 :商店摆摊模式 STR_1077 :旋转模式 STR_1078 :向前旋转 STR_1079 :向后旋转 -STR_1080 :电影: ”飞行员复仇记” -STR_1081 :3D电影: ”鼠尾” +STR_1080 :电影:“飞行员复仇记” +STR_1081 :3D电影:“鼠尾” STR_1082 :太空转轮模式 STR_1083 :菜鸟模式 STR_1084 :LIM动力模式 -STR_1085 :电影: ”尖叫乘客” -STR_1086 :3D电影: ”暴风猎人” -STR_1087 :3D电影: ”太空海盗” +STR_1085 :电影:“尖叫乘客” +STR_1086 :3D电影:“暴风猎人” +STR_1087 :3D电影:“太空海盗” STR_1088 :刺激模式 STR_1089 :惊悚模式 STR_1090 :鬼屋模式 STR_1091 :马戏团表演模式 STR_1092 :向下发车 STR_1093 :古怪小屋模式 -STR_1094 :自由落体式下降模式 +STR_1094 :自由落体模式 STR_1095 :区域刹车连续循环模式 -STR_1096 :动力发车(不通过车站) +STR_1096 :动力发车(不通过车站) STR_1097 :动力发车区域刹车模式 -STR_1098 :移动到 {POP16}{STRINGID} 尾端 -STR_1099 :等待乘客 {POP16}{STRINGID} -STR_1100 :等待离站 {POP16}{STRINGID} -STR_1101 :离站 {POP16}{STRINGID} -STR_1102 :以 {VELOCITY} 行驶 -STR_1103 :到达 {POP16}{STRINGID} -STR_1104 :乘客在 {POP16}{STRINGID} 下车 -STR_1105 :以 {VELOCITY} 行驶 -STR_1106 :毁坏中! -STR_1107 :已毁坏! -STR_1108 :以 {VELOCITY} 行驶 +STR_1098 :移动到{POP16}{STRINGID}尾端 +STR_1099 :等待乘客{POP16}{STRINGID} +STR_1100 :等待离开{POP16}{STRINGID} +STR_1101 :离站{POP16}{STRINGID} +STR_1102 :以{VELOCITY}行驶 +STR_1103 :到达{POP16}{STRINGID} +STR_1104 :卸客{POP16}{STRINGID} +STR_1105 :以{VELOCITY}行驶 +STR_1106 :毁坏中! +STR_1107 :已毁坏! +STR_1108 :以{VELOCITY}行驶 STR_1109 :摇摆中 STR_1110 :旋转中 STR_1111 :旋转中 @@ -506,8 +506,8 @@ STR_1115 :运行中 STR_1116 :运行中 STR_1117 :马戏表演中 STR_1118 :运行中 -STR_1119 :等待锁链拉升中 -STR_1120 :以 {VELOCITY} 行驶 +STR_1119 :等待线缆拉升中 +STR_1120 :以{VELOCITY}行驶 STR_1121 :停止中 STR_1122 :等待乘客 STR_1123 :等待开始 @@ -519,8 +519,8 @@ STR_1128 :被区域刹车刹停 STR_1129 :全部车辆使用相同颜色 STR_1130 :不同{STRINGID}使用不同颜色 STR_1131 :不同车辆使用不同颜色 -STR_1132 :车辆 {POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1133 :车辆 {POP16}{COMMA16} +STR_1132 :车辆{POP16}{POP16}{POP16}{POP16}{POP16}{POP16} {COMMA16} +STR_1133 :车辆{POP16}{COMMA16} STR_1134 :{POP16}{POP16}{POP16}{POP16}{POP16}{STRINGID} {COMMA16} STR_1135 :{STRINGID} {COMMA16} STR_1136 :选择主要配色 @@ -540,33 +540,33 @@ STR_1149 :二分之一载客量 STR_1150 :四分之三载客量 STR_1151 :满载 STR_1152 :随意载客 -STR_1153 :设施轨道高度标记 +STR_1153 :轨道高度标记 STR_1154 :土地高度标记 STR_1155 :道路高度标记 STR_1156 :{MOVE_X}{10}{STRINGID} STR_1157 :✓{MOVE_X}{10}{STRINGID} STR_1158 :不能移除此物… STR_1159 :放置景观,花园和其他美化物 -STR_1160 :创建/调整湖泊和水塘 +STR_1160 :创建/调整湖泊和水体 STR_1161 :不能放置于此… STR_1162 :{OUTLINE}{TOPAZ}{STRINGID} -STR_1163 :{STRINGID}{NEWLINE}(按右键修改) -STR_1164 :{STRINGID}{NEWLINE}(按右键移除) -STR_1165 :{STRINGID} - {STRINGID} {COMMA16} +STR_1163 :{STRINGID}{NEWLINE}(按右键修改) +STR_1164 :{STRINGID}{NEWLINE}(按右键移除) +STR_1165 :{STRINGID}——{STRINGID} {COMMA16} STR_1166 :无法降低此处水位… STR_1167 :无法升高此处水位… STR_1168 :选项 -STR_1169 :(无) +STR_1169 :(无) STR_1170 :{STRING} -STR_1171 :{RED}已关闭 - - -STR_1172 :{YELLOW}{STRINGID} - - +STR_1171 :{RED}已关闭 +STR_1172 :{YELLOW}{STRINGID} STR_1173 :建造道路和队列线 -STR_1174 :横幅挡到了 +STR_1174 :被横幅挡住了 STR_1175 :不能在倾斜的小径上建造这个 STR_1176 :不能在此建造道路… STR_1177 :不能移除此处道路… STR_1178 :坡道坡度不合适 -STR_1179 :道路挡到了 +STR_1179 :被道路挡住了 STR_1180 :不能建造在水下! STR_1181 :道路 STR_1182 :类型 @@ -585,7 +585,7 @@ STR_1194 :已关闭 STR_1195 :测试运行 STR_1196 :开启 STR_1197 :故障了 -STR_1198 :已毁坏! +STR_1198 :已毁坏! STR_1199 :{COMMA16}名游客在游乐设施上 STR_1200 :{COMMA16}名游客在游乐设施上 STR_1201 :无人在排队 @@ -593,18 +593,18 @@ STR_1202 :1人在排队 STR_1203 :{COMMA16}人在排队 STR_1204 :{COMMA16}分钟等候时间 STR_1205 :{COMMA16}分钟等候时间 -STR_1206 :{WINDOW_COLOUR_2}等待: +STR_1206 :{WINDOW_COLOUR_2}等待: STR_1207 :{WINDOW_COLOUR_2}当其他列车进站后就发车 STR_1208 :{WINDOW_COLOUR_2}当其他船到站后就发车 STR_1209 :选择发车前是否等待乘客 STR_1210 :选择当其他车辆入站后,是否发车 -STR_1211 :{WINDOW_COLOUR_2}最短等待时间: -STR_1212 :{WINDOW_COLOUR_2}最长等待时间: +STR_1211 :{WINDOW_COLOUR_2}最短等待时间: +STR_1212 :{WINDOW_COLOUR_2}最长等待时间: STR_1213 :选择发车前最短等待时长 STR_1214 :选择发车前最长等待时长 STR_1215 :{WINDOW_COLOUR_2}与相邻站同步 STR_1216 :选择是否与所有相邻车站同步发车(为了“赛车”) -STR_1217 :{COMMA16} 秒 +STR_1217 :{COMMA16}秒 STR_1218 :{BLACK}➕ STR_1219 :{BLACK}➖ STR_1220 :出口 @@ -620,163 +620,163 @@ STR_1229 :列车 STR_1230 :列车 STR_1231 :列车 STR_1232 :列车 -STR_1233 :{COMMA16} 列车 -STR_1234 :{COMMA16} 列车 -STR_1235 :列车 {COMMA16} +STR_1233 :{COMMA16}列车 +STR_1234 :{COMMA16}列车 +STR_1235 :列车{COMMA16} STR_1236 :小船 STR_1237 :小船 STR_1238 :小船 STR_1239 :小船 -STR_1240 :{COMMA16} 小船 -STR_1241 :{COMMA16} 小船 -STR_1242 :船 {COMMA16} +STR_1240 :{COMMA16}小船 +STR_1241 :{COMMA16}小船 +STR_1242 :船{COMMA16} STR_1243 :轨道 STR_1244 :轨道 STR_1245 :轨道 STR_1246 :轨道 -STR_1247 :{COMMA16} 轨道 -STR_1248 :{COMMA16} 轨道 -STR_1249 :轨道 {COMMA16} +STR_1247 :{COMMA16}轨道 +STR_1248 :{COMMA16}轨道 +STR_1249 :轨道{COMMA16} STR_1250 :码头 STR_1251 :码头 STR_1252 :码头 STR_1253 :码头 -STR_1254 :{COMMA16} 码头 -STR_1255 :{COMMA16} 码头 -STR_1256 :码头 {COMMA16} +STR_1254 :{COMMA16}码头 +STR_1255 :{COMMA16}码头 +STR_1256 :码头{COMMA16} STR_1257 :车站 STR_1258 :车站 STR_1259 :车站 STR_1260 :车站 -STR_1261 :{COMMA16} 车站 -STR_1262 :{COMMA16} 车站 -STR_1263 :车站 {COMMA16} +STR_1261 :{COMMA16}车站 +STR_1262 :{COMMA16}车站 +STR_1263 :车站{COMMA16} STR_1264 :车辆 STR_1265 :车辆 STR_1266 :车辆 STR_1267 :车辆 -STR_1268 :{COMMA16} 车辆 -STR_1269 :{COMMA16} 车辆 -STR_1270 :车辆 {COMMA16} +STR_1268 :{COMMA16}车辆 +STR_1269 :{COMMA16}车辆 +STR_1270 :车辆{COMMA16} STR_1271 :建筑物 STR_1272 :建筑物 STR_1273 :建筑物 STR_1274 :建筑物 -STR_1275 :{COMMA16} 建筑物 -STR_1276 :{COMMA16} 建筑物 -STR_1277 :建筑物 {COMMA16} +STR_1275 :{COMMA16}建筑物 +STR_1276 :{COMMA16}建筑物 +STR_1277 :建筑物{COMMA16} STR_1278 :结构 STR_1279 :结构 STR_1280 :结构 STR_1281 :结构 -STR_1282 :{COMMA16} 结构 -STR_1283 :{COMMA16} 结构 -STR_1284 :结构 {COMMA16} +STR_1282 :{COMMA16}结构 +STR_1283 :{COMMA16}结构 +STR_1284 :结构{COMMA16} STR_1285 :船 STR_1286 :船 STR_1287 :船 STR_1288 :船 -STR_1289 :{COMMA16} 条船 -STR_1290 :{COMMA16} 条船 -STR_1291 :船 {COMMA16} +STR_1289 :{COMMA16}条船 +STR_1290 :{COMMA16}条船 +STR_1291 :船{COMMA16} STR_1292 :座舱 STR_1293 :座舱 STR_1294 :座舱 STR_1295 :座舱 -STR_1296 :{COMMA16} 个座舱 -STR_1297 :{COMMA16} 个座舱 -STR_1298 :座舱 {COMMA16} +STR_1296 :{COMMA16}个座舱 +STR_1297 :{COMMA16}个座舱 +STR_1298 :座舱{COMMA16} STR_1299 :摩天轮 STR_1300 :摩天轮 STR_1301 :摩天轮 STR_1302 :摩天轮 -STR_1303 :{COMMA16} 个摩天轮 -STR_1304 :{COMMA16} 个摩天轮 -STR_1305 :摩天轮 {COMMA16} +STR_1303 :{COMMA16}个摩天轮 +STR_1304 :{COMMA16}个摩天轮 +STR_1305 :摩天轮{COMMA16} STR_1306 :转轮 STR_1307 :转轮 STR_1308 :转轮 STR_1309 :转轮 -STR_1310 :{COMMA16} 个转轮 -STR_1311 :{COMMA16} 个转轮 -STR_1312 :转轮 {COMMA16} +STR_1310 :{COMMA16}个转轮 +STR_1311 :{COMMA16}个转轮 +STR_1312 :转轮{COMMA16} STR_1313 :玩家 STR_1314 :玩家 STR_1315 :玩家 STR_1316 :玩家 -STR_1317 :{COMMA16} 名玩家 -STR_1318 :{COMMA16} 名玩家 -STR_1319 :玩家 {COMMA16} +STR_1317 :{COMMA16}名玩家 +STR_1318 :{COMMA16}名玩家 +STR_1319 :玩家{COMMA16} STR_1320 :场地 STR_1321 :场地 STR_1322 :场地 STR_1323 :场地 -STR_1324 :{COMMA16} 个场地 -STR_1325 :{COMMA16} 个场地 -STR_1326 :场地 {COMMA16} +STR_1324 :{COMMA16}个场地 +STR_1325 :{COMMA16}个场地 +STR_1326 :场地{COMMA16} STR_1327 :旋转物体 90° STR_1328 :需要水平地面 -STR_1329 :{WINDOW_COLOUR_2}发车速度: +STR_1329 :{WINDOW_COLOUR_2}发车速度: STR_1330 :离站时最高速度 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} - 入口{POP16}{POP16} -STR_1336 :{STRINGID} - 车站 {POP16}{COMMA16} 入口 -STR_1337 :{STRINGID} - 出口{POP16}{POP16} -STR_1338 :{STRINGID} - 车站 {POP16}{COMMA16} 出口 +STR_1333 :{STRINGID}——{STRINGID}{POP16} +STR_1334 :{STRINGID}——{STRINGID}{COMMA16} +STR_1335 :{STRINGID}——入口{POP16}{POP16} +STR_1336 :{STRINGID}——车站{POP16}{COMMA16}入口 +STR_1337 :{STRINGID}——出口{POP16}{POP16} +STR_1338 :{STRINGID}——车站{POP16}{COMMA16}出口 STR_1339 :{BLACK}暂无测试结果… -STR_1340 :{WINDOW_COLOUR_2}最高速度: {BLACK}{VELOCITY} -STR_1341 :{WINDOW_COLOUR_2}乘坐时间: {BLACK}{STRINGID}{STRINGID}{STRINGID}{STRINGID} +STR_1340 :{WINDOW_COLOUR_2}最高速度:{BLACK}{VELOCITY} +STR_1341 :{WINDOW_COLOUR_2}乘坐时间:{BLACK}{STRINGID}{STRINGID}{STRINGID}{STRINGID} STR_1342 :{DURATION} STR_1343 :{DURATION} / -STR_1344 :{WINDOW_COLOUR_2}轨道长度: {BLACK}{STRINGID}{STRINGID}{STRINGID}{STRINGID} +STR_1344 :{WINDOW_COLOUR_2}轨道长度:{BLACK}{STRINGID}{STRINGID}{STRINGID}{STRINGID} STR_1345 :{LENGTH} STR_1346 :{LENGTH} / -STR_1347 :{WINDOW_COLOUR_2}平均速度: {BLACK}{VELOCITY} -STR_1348 :{WINDOW_COLOUR_2}最大正垂直重力: {BLACK}{COMMA2DP32}g -STR_1349 :{WINDOW_COLOUR_2}最大正垂直重力: {OUTLINE}{RED}{COMMA2DP32}g -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_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}secs -STR_1359 :{WINDOW_COLOUR_2}等待时间: {BLACK}{COMMA16} minute -STR_1360 :{WINDOW_COLOUR_2}等待时间: {BLACK}{COMMA16} minutes +STR_1347 :{WINDOW_COLOUR_2}平均速度:{BLACK}{VELOCITY} +STR_1348 :{WINDOW_COLOUR_2}最大正垂直加速度:{BLACK}{COMMA2DP32}g +STR_1349 :{WINDOW_COLOUR_2}最大正垂直加速度:{OUTLINE}{RED}{COMMA2DP32}g +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_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_1363 :高度过高无法支撑! -STR_1364 :无法再扩展轨道支撑! -STR_1365 :中心线翻滚 (向左转) -STR_1366 :中心线翻滚 (向右转) +STR_1363 :太高了!无法支撑! +STR_1364 :无法再扩展轨道支撑! +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_1388 :{OUTLINE}{GREEN}+ {CURRENCY} -STR_1389 :{OUTLINE}{RED}- {CURRENCY} +STR_1388 :{OUTLINE}{GREEN}+{CURRENCY} +STR_1389 :{OUTLINE}{RED}-{CURRENCY} STR_1390 :{CURRENCY2DP} STR_1391 :{RED}{CURRENCY2DP} STR_1392 :观看游乐设施/ 店铺 @@ -793,28 +793,28 @@ STR_1402 :建造或移动游乐设施入口 STR_1403 :建造或移动游乐设施出口 STR_1404 :旋转 90° STR_1405 :镜像 -STR_1406 :启用/弃用 景物 (如果设计附带景物) +STR_1406 :启用/弃用 景物(如果设计附带景物) STR_1407 :{WINDOW_COLOUR_2}建造此… -STR_1408 :{WINDOW_COLOUR_2}费用: {BLACK}{CURRENCY} -STR_1409 :出/入 口 +STR_1408 :{WINDOW_COLOUR_2}费用:{BLACK}{CURRENCY} +STR_1409 :出口/入口 STR_1410 :垂直高塔 -STR_1411 :{STRINGID}挡道 +STR_1411 :{STRINGID}挡住了 STR_1412 :{WINDOW_COLOUR_3}无该类型游乐设施数据记录 -STR_1413 :{WINDOW_COLOUR_3}数据将于下一个 {STRINGID} 离开 {STRINGID}后记录 +STR_1413 :{WINDOW_COLOUR_3}数据将于下一个{STRINGID}离开{STRINGID}后记录 STR_1414 :{BLACK}{DURATION} STR_1415 :{WINDOW_COLOUR_2}速度 STR_1416 :{WINDOW_COLOUR_2}高度 -STR_1417 :{WINDOW_COLOUR_2}垂直重力 -STR_1418 :{WINDOW_COLOUR_2}水平重力 +STR_1417 :{WINDOW_COLOUR_2}垂直加速度 +STR_1418 :{WINDOW_COLOUR_2}水平加速度 STR_1419 :{BLACK}{VELOCITY} STR_1420 :{BLACK}{LENGTH} STR_1421 :{BLACK}{COMMA16}G -STR_1422 :来自 {POP16}{STRINGID}的记录数据 -STR_1423 :队列线路 +STR_1422 :来自{POP16}{STRINGID}的记录数据 +STR_1423 :队列道路 STR_1424 :道路 STR_1425 :道路 -STR_1426 :队列线 -STR_1427 :{WINDOW_COLOUR_2}乘客: {BLACK}{COMMA32} /小时 +STR_1426 :队列 +STR_1427 :{WINDOW_COLOUR_2}乘客:{BLACK}每小时{COMMA32}人 STR_1428 :{WINDOW_COLOUR_2}门票价格: STR_1429 :{POP16}{POP16}{POP16}{CURRENCY2DP} STR_1430 :免费 @@ -826,7 +826,7 @@ STR_1435 :在{STRINGID}上 STR_1436 :在{STRINGID}中 STR_1437 :在{STRINGID} STR_1438 :坐下 -STR_1439 :(选择位置) +STR_1439 :(选择位置) STR_1440 :正在修剪草皮 STR_1441 :正在清扫道路 STR_1442 :正在清空垃圾桶 @@ -836,71 +836,71 @@ STR_1445 :正在观看{STRINGID}的建造 STR_1446 :正在欣赏景物 STR_1447 :正在离开游乐园 STR_1448 :正在观看新游乐设施的建造过程 -STR_1449 :{SPRITE} {STRINGID}{NEWLINE}({STRINGID}) -STR_1450 :{INLINE_SPRITE}{09}{20}{00}{00}{SPRITE} {STRINGID}{NEWLINE}({STRINGID}) -STR_1451 :{STRINGID}{NEWLINE}({STRINGID}) +STR_1449 :{SPRITE} {STRINGID}{NEWLINE}({STRINGID}) +STR_1450 :{INLINE_SPRITE}{09}{20}{00}{00}{SPRITE} {STRINGID}{NEWLINE}({STRINGID}) +STR_1451 :{STRINGID}{NEWLINE}({STRINGID}) STR_1452 :游客命名 STR_1453 :请输入这名游客的姓名: STR_1454 :不能命名该游客… STR_1455 :无效的游客名字 -STR_1456 :{WINDOW_COLOUR_2}花费金额: {BLACK}{CURRENCY2DP} -STR_1457 :{WINDOW_COLOUR_2}钱包中金额: {BLACK}{CURRENCY2DP} -STR_1458 :{WINDOW_COLOUR_2}逗留时间: {BLACK}{REALTIME} +STR_1456 :{WINDOW_COLOUR_2}花费金额:{BLACK}{CURRENCY2DP} +STR_1457 :{WINDOW_COLOUR_2}钱包中金额:{BLACK}{CURRENCY2DP} +STR_1458 :{WINDOW_COLOUR_2}逗留时间:{BLACK}{REALTIME} STR_1459 :轨道样式 -STR_1460 :U型开放式轨道 -STR_1461 :O型封闭式轨道 +STR_1460 :U 型开放式轨道 +STR_1461 :O 型封闭式轨道 STR_1462 :提升坡太陡了 STR_1463 :游客 -STR_1464 :螺旋向上 (小) -STR_1465 :螺旋向上 (大) -STR_1466 :螺旋向下 (小) -STR_1467 :螺旋向下 (大) +STR_1464 :螺旋向上(小) +STR_1465 :螺旋向上(大) +STR_1466 :螺旋向下(小) +STR_1467 :螺旋向下(大) STR_1468 :职员 STR_1469 :设施必须要开始和结束于车站 STR_1470 :车站长度过短 STR_1471 :{WINDOW_COLOUR_2}速度: STR_1472 :此车速度 -STR_1473 :{WINDOW_COLOUR_2}兴奋度: {BLACK}{COMMA2DP32} ({STRINGID}) -STR_1474 :{WINDOW_COLOUR_2}兴奋度: {BLACK}暂无 -STR_1475 :{WINDOW_COLOUR_2}刺激度: {BLACK}{COMMA2DP32} ({STRINGID}) -STR_1476 :{WINDOW_COLOUR_2}刺激度: {BLACK}暂无 -STR_1477 :{WINDOW_COLOUR_2}刺激度: {OUTLINE}{RED}{COMMA2DP32} ({STRINGID}) -STR_1478 :{WINDOW_COLOUR_2}恶心度: {BLACK}{COMMA2DP32} ({STRINGID}) -STR_1479 :{WINDOW_COLOUR_2}恶心度: {BLACK}暂无 +STR_1473 :{WINDOW_COLOUR_2}兴奋度:{BLACK}{COMMA2DP32}({STRINGID}) +STR_1474 :{WINDOW_COLOUR_2}兴奋度:{BLACK}暂无 +STR_1475 :{WINDOW_COLOUR_2}刺激度:{BLACK}{COMMA2DP32}({STRINGID}) +STR_1476 :{WINDOW_COLOUR_2}刺激度:{BLACK}暂无 +STR_1477 :{WINDOW_COLOUR_2}刺激度:{OUTLINE}{RED}{COMMA2DP32}({STRINGID}) +STR_1478 :{WINDOW_COLOUR_2}恶心度:{BLACK}{COMMA2DP32}({STRINGID}) +STR_1479 :{WINDOW_COLOUR_2}恶心度:{BLACK}暂无 STR_1480 :“我负担不起{STRINGID}” -STR_1481 :“这个月又要吃土了” +STR_1481 :“我把钱花光了” STR_1482 :“我感到不舒服” -STR_1483 :“香菇蓝瘦” +STR_1483 :“我好难受” STR_1484 :“我想试试比{STRINGID}更刺激的” -STR_1485 :“对我来说,{STRINGID}看起来太过刺激了” -STR_1486 :“等等,我还没试过{STRINGID}” -STR_1487 :“看看{STRINGID}就让我感到不适” -STR_1488 :“{STRINGID}太贵了吧,这个乐园真坑爹” +STR_1485 :“对我来说{STRINGID}看起来太过刺激了” +STR_1486 :“我还没玩过{STRINGID}呢” +STR_1487 :“光是看看{STRINGID}就让我觉得眩晕” +STR_1488 :“我才不要花这么多钱去{STRINGID}” STR_1489 :“我想回家” -STR_1490 :“{STRINGID}真是超值”” +STR_1490 :“{STRINGID}真是超值” STR_1491 :“我已经有{STRINGID}了” -STR_1492 :“我负担不起{STRINGID}” -STR_1493 :“我不饿” -STR_1494 :“我不渴” -STR_1495 :“救命! 我溺水了!” -STR_1496 :“我迷路了!” -STR_1497 :“{STRINGID}棒棒哒” -STR_1498 :“我等候在这{STRINGID}太久了,啥时才轮到我啊 ” +STR_1492 :“我买不起{STRINGID}” +STR_1493 :“我还不饿” +STR_1494 :“我还不渴” +STR_1495 :“救命! 我溺水了!” +STR_1496 :“我迷路了!” +STR_1497 :“{STRINGID}很棒!” +STR_1498 :“我等候在这{STRINGID}太久了,什么时候才轮到我啊 ” STR_1499 :“我累了” STR_1500 :“我饿了” STR_1501 :“我渴了” STR_1502 :“我需要去厕所” -STR_1503 :“我找不到 {STRINGID}” -STR_1504 :“我才没有那么多钱去 {STRINGID}” -STR_1505 :“我不想去 {STRINGID} 因为那里在下雨” +STR_1503 :“我找不到{STRINGID}” +STR_1504 :“我才没有那么多钱去{STRINGID}” +STR_1505 :“我不想去{STRINGID}因为那里在下雨” STR_1506 :“这里是垃圾场吗?” -STR_1507 :“哇塞!这个乐园的出口在哪?” -STR_1508 :“我想下车 {STRINGID}” -STR_1509 :“我想离开 {STRINGID}” +STR_1507 :“哎?这个乐园的出口在哪?” +STR_1508 :“我想现在就从{STRINGID}下去” +STR_1509 :“我想离开{STRINGID}” STR_1510 :“我不想去{STRINGID},感觉它随时都会出问题” -STR_1511 :“这路有点恶心啊!” -STR_1512 :“这里怎么这么挤啊!” -STR_1513 :“这里的损坏是非常糟糕的” +STR_1511 :“这路好恶心!” +STR_1512 :“这里怎么这么多人!” +STR_1513 :“这里有好多配破坏的东西” STR_1514 :“壮丽的景色!” STR_1515 :“这个公园真的很干净” STR_1516 :“跳跃喷泉太好了” @@ -937,34 +937,34 @@ STR_1546 : STR_1547 : STR_1548 : STR_1549 : -STR_1550 :“哇!” +STR_1550 :“哇!” STR_1551 :“我有种奇怪的感觉,像是有人在监视我” -STR_1552 :“{STRINGID}的气球里充的是仙气吧,怎么这么贵” -STR_1553 :“我相信{STRINGID}的毛绒公仔里面塞的不是棉花,是钱” -STR_1554 :“{STRINGID}的游乐园地图是都精确,居然卖的这么贵” -STR_1555 :“都什么年代了,{STRINGID}的即时照片还这么贵” -STR_1556 :“我宁可淋雨,也不会买{STRINGID}的天价雨伞” -STR_1557 :“{STRINGID}的饮料,可真是滴水寸金” -STR_1558 :“{STRINGID}的汉堡比上海迪斯尼的包子还贵” -STR_1559 :“{STRINGID}的薯条使用什么土豆做的?怎么这么贵” -STR_1560 :“{STRINGID}的冰淇淋贵的有点离谱” -STR_1561 :“{STRINGID}的棉花糖是真滴贵” +STR_1552 :“我才不会花那么多钱去{STRINGID}购买一个气球” +STR_1553 :“我才不会花那么多钱去{STRINGID}购买一个毛绒公仔” +STR_1554 :“我才不会花那么多钱去{STRINGID}购买一份公园地图” +STR_1555 :“我才不会花那么多钱去{STRINGID}购买一张即时照片” +STR_1556 :“我才不会花那么多钱去{STRINGID}购买一个雨伞” +STR_1557 :“我才不会花那么多钱去{STRINGID}购买一杯饮料” +STR_1558 :“我才不会花那么多钱去{STRINGID}购买一个汉堡” +STR_1559 :“我才不会花那么多钱去{STRINGID}购买一份薯条” +STR_1560 :“我才不会花那么多钱去{STRINGID}购买一份冰淇淋” +STR_1561 :“我才不会花那么多钱去{STRINGID}购买一份棉花糖” STR_1562 : STR_1563 : STR_1564 : -STR_1565 :“{STRINGID}的披萨真的贵” +STR_1565 :“我才不会花那么多钱去{STRINGID}购买一份披萨” STR_1566 : -STR_1567 :“我不会花那么多钱去{STRINGID}购买一份爆米花” -STR_1568 :“我不会花那么多钱去{STRINGID}购买一个热狗” -STR_1569 :“我不会花那么多钱去{STRINGID}购买一份触手” -STR_1570 :“我不会花那么多钱去{STRINGID}购买一个帽子” -STR_1571 :“我不会花那么多钱去{STRINGID}购买一个太妃糖苹果” -STR_1572 :“我不会花那么多钱去{STRINGID}购买一件T恤” -STR_1573 :“我不会花那么多钱去{STRINGID}购买一份甜甜圈” -STR_1574 :“我不会花那么多钱去{STRINGID}购买一杯咖啡” +STR_1567 :“我才不会花那么多钱去{STRINGID}购买一份爆米花” +STR_1568 :“我才不会花那么多钱去{STRINGID}购买一个热狗” +STR_1569 :“我才不会花那么多钱去{STRINGID}购买一份触手” +STR_1570 :“我才不会花那么多钱去{STRINGID}购买一个帽子” +STR_1571 :“我才不会花那么多钱去{STRINGID}购买一个太妃糖苹果” +STR_1572 :“我才不会花那么多钱去{STRINGID}购买一件T恤” +STR_1573 :“我才不会花那么多钱去{STRINGID}购买一份甜甜圈” +STR_1574 :“我才不会花那么多钱去{STRINGID}购买一杯咖啡” STR_1575 : -STR_1576 :“我不会花那么多钱去{STRINGID}购买一份炸鸡” -STR_1577 :“我不会花那么多钱去{STRINGID}购买一杯柠檬水” +STR_1576 :“我才不会花那么多钱去{STRINGID}购买一份炸鸡” +STR_1577 :“我才不会花那么多钱去{STRINGID}购买一杯柠檬水” STR_1578 : STR_1579 : STR_1580 : @@ -982,7 +982,7 @@ STR_1591 :“这副从{STRINGID}购买的太阳镜真是超值” STR_1592 :“这碗从{STRINGID}购买的牛肉面真是超值” STR_1593 :“这份从{STRINGID}购买的炒米粉真是超值” STR_1594 :“这份从{STRINGID}购买的上汤云吞真是超值” -STR_1595 :“这份从{STRINGID}购买的肉丸汤{真是超值” +STR_1595 :“这份从{STRINGID}购买的肉丸汤真是超值” STR_1596 :“这杯从{STRINGID}购买的果汁真是超值” STR_1597 :“这杯从{STRINGID}购买的豆浆真是超值” STR_1598 :“这份从{STRINGID}购买的水正果真是超值” @@ -1003,27 +1003,27 @@ STR_1612 : STR_1613 : STR_1614 : STR_1615 : -STR_1616 :“我不会花那么多钱去购买一张在{STRINGID}的即时照片” -STR_1617 :“我不会花那么多钱去购买一张在{STRINGID}的即时照片” -STR_1618 :“我不会花那么多钱去购买一张在{STRINGID}的即时照片” -STR_1619 :“我不会花那么多钱去{STRINGID}购买一张椒盐卷饼” -STR_1620 :“我不会花那么多钱去{STRINGID}购买一杯热巧克力” -STR_1621 :“我不会花那么多钱去{STRINGID}购买一杯冰红茶” -STR_1622 :“我不会花那么多钱去{STRINGID}购买一个漏斗蛋糕” -STR_1623 :“我不会花那么多钱去{STRINGID}购买一副太阳镜” -STR_1624 :“我不会花那么多钱去{STRINGID}购买一碗牛肉面” -STR_1625 :“我不会花那么多钱去{STRINGID}购买一份炒米粉” -STR_1626 :“我不会花那么多钱去{STRINGID}购买一份上汤云吞” -STR_1627 :“我不会花那么多钱去{STRINGID}购买一份肉丸汤” -STR_1628 :“我不会花那么多钱去{STRINGID}购买一杯果汁” -STR_1629 :“我不会花那么多钱去{STRINGID}购买一杯豆浆” -STR_1630 :“我不会花那么多钱去{STRINGID}购买一份水正果” -STR_1631 :“我不会花那么多钱去{STRINGID}购买一块潜艇三明治” -STR_1632 :“我不会花那么多钱去{STRINGID}购买一份曲奇饼干” +STR_1616 :“我才不会花那么多钱去购买一张在{STRINGID}拍摄的即时照片” +STR_1617 :“我才不会花那么多钱去购买一张在{STRINGID}拍摄的即时照片” +STR_1618 :“我才不会花那么多钱去购买一张在{STRINGID}拍摄的即时照片” +STR_1619 :“我才不会花那么多钱去{STRINGID}购买一张椒盐卷饼” +STR_1620 :“我才不会花那么多钱去{STRINGID}购买一杯热巧克力” +STR_1621 :“我才不会花那么多钱去{STRINGID}购买一杯冰红茶” +STR_1622 :“我才不会花那么多钱去{STRINGID}购买一个漏斗蛋糕” +STR_1623 :“我才不会花那么多钱去{STRINGID}购买一副太阳镜” +STR_1624 :“我才不会花那么多钱去{STRINGID}购买一碗牛肉面” +STR_1625 :“我才不会花那么多钱去{STRINGID}购买一份炒米粉” +STR_1626 :“我才不会花那么多钱去{STRINGID}购买一份上汤云吞” +STR_1627 :“我才不会花那么多钱去{STRINGID}购买一份肉丸汤” +STR_1628 :“我才不会花那么多钱去{STRINGID}购买一杯果汁” +STR_1629 :“我才不会花那么多钱去{STRINGID}购买一杯豆浆” +STR_1630 :“我才不会花那么多钱去{STRINGID}购买一份水正果” +STR_1631 :“我才不会花那么多钱去{STRINGID}购买一块潜艇三明治” +STR_1632 :“我才不会花那么多钱去{STRINGID}购买一份曲奇饼干” STR_1633 : STR_1634 : STR_1635 : -STR_1636 :“我不会花那么多钱去{STRINGID}购买一份烤香肠” +STR_1636 :“我才不会花那么多钱去{STRINGID}购买一根烤香肠” STR_1637 : STR_1638 : STR_1639 : @@ -1035,49 +1035,49 @@ STR_1644 : STR_1645 : STR_1646 : STR_1647 : -STR_1648 :“救命! 放我下来!” -STR_1649 :“我的现金不够了!” -STR_1650 :“喔!一个新的设施正在建造” -STR_1653 :“…现在我们已经在{STRINGID}上!” -STR_1654 :{WINDOW_COLOUR_2}最近的想法: +STR_1648 :“救命! 放我下来!” +STR_1649 :“我没有现金了!” +STR_1650 :“喔!一个新的设施正在建造中!” +STR_1653 :“…现在我们已经在{STRINGID}上!” +STR_1654 :{WINDOW_COLOUR_2}最近的想法: STR_1655 :在地上建造道路 -STR_1656 :建造桥梁或隧道 +STR_1656 :建造桥梁或隧道道路 STR_1657 :{WINDOW_COLOUR_2}游乐设施选项 -STR_1658 :{WINDOW_COLOUR_2}刺激度: {BLACK}少于{COMMA16} -STR_1659 :{WINDOW_COLOUR_2}刺激度: {BLACK}介于{COMMA16}和{COMMA16}之间 -STR_1660 :{WINDOW_COLOUR_2}刺激度: {BLACK}大于{COMMA16} -STR_1661 :{WINDOW_COLOUR_2}恶心忍受度: {BLACK}{STRINGID} -STR_1662 :{WINDOW_COLOUR_2}快乐度: -STR_1663 :{WINDOW_COLOUR_2}恶心度: -STR_1664 :{WINDOW_COLOUR_2}体力: -STR_1665 :{WINDOW_COLOUR_2}饥饿度: -STR_1666 :{WINDOW_COLOUR_2}口渴度: -STR_1667 :{WINDOW_COLOUR_2}如厕度: -STR_1668 :{WINDOW_COLOUR_2}满意度: {BLACK}未知 -STR_1669 :{WINDOW_COLOUR_2}满意度: {BLACK}{COMMA16}% -STR_1670 :{WINDOW_COLOUR_2}总乘客数: {BLACK}{COMMA32} -STR_1671 :{WINDOW_COLOUR_2}总利润: {BLACK}{CURRENCY2DP} +STR_1658 :{WINDOW_COLOUR_2}刺激度:{BLACK}少于{COMMA16} +STR_1659 :{WINDOW_COLOUR_2}刺激度:{BLACK}介于{COMMA16}和{COMMA16}之间 +STR_1660 :{WINDOW_COLOUR_2}刺激度:{BLACK}大于{COMMA16} +STR_1661 :{WINDOW_COLOUR_2}恶心忍受度:{BLACK}{STRINGID} +STR_1662 :{WINDOW_COLOUR_2}快乐度: +STR_1663 :{WINDOW_COLOUR_2}恶心度: +STR_1664 :{WINDOW_COLOUR_2}体力值: +STR_1665 :{WINDOW_COLOUR_2}饥饿度: +STR_1666 :{WINDOW_COLOUR_2}口渴度: +STR_1667 :{WINDOW_COLOUR_2}如厕度: +STR_1668 :{WINDOW_COLOUR_2}满意度:{BLACK}未知 +STR_1669 :{WINDOW_COLOUR_2}满意度:{BLACK}{COMMA16}% +STR_1670 :{WINDOW_COLOUR_2}总乘客数:{BLACK}{COMMA32} +STR_1671 :{WINDOW_COLOUR_2}总利润:{BLACK}{CURRENCY2DP} STR_1672 :刹车 STR_1673 :控制旋转开/关轨道 STR_1674 :刹车速度 STR_1675 :{POP16}{VELOCITY} STR_1676 :设置刹车速度限制 -STR_1677 :{WINDOW_COLOUR_2}受欢迎度: {BLACK}未知 -STR_1678 :{WINDOW_COLOUR_2}受欢迎度: {BLACK}{COMMA16}% -STR_1679 :向上盘旋 (向左) -STR_1680 :向上盘旋 (向右) -STR_1681 :向下盘旋 (向左) -STR_1682 :向下盘旋 (向右) -STR_1683 :2 × 2地基 -STR_1684 :4 × 4地基 -STR_1685 :2 × 4地基 -STR_1686 :5 × 1地基 -STR_1687 :水溅 -STR_1688 :4 × 1地基 +STR_1677 :{WINDOW_COLOUR_2}受欢迎度:{BLACK}未知 +STR_1678 :{WINDOW_COLOUR_2}受欢迎度:{BLACK}{COMMA16}% +STR_1679 :向上盘旋(向左) +STR_1680 :向上盘旋(向右) +STR_1681 :向下盘旋(向左) +STR_1682 :向下盘旋(向右) +STR_1683 :2 × 2 地基尺寸 +STR_1684 :4 × 4 地基尺寸 +STR_1685 :2 × 4 地基尺寸 +STR_1686 :5 × 1 地基尺寸 +STR_1687 :溅水区 +STR_1688 :4 × 1 地基尺寸 STR_1689 :刹车装置 STR_1690 :{WINDOW_COLOUR_2}{STRINGID}{NEWLINE}{BLACK}{STRINGID} -STR_1691 :{WINDOW_COLOUR_2} 费用: {BLACK}{CURRENCY} -STR_1692 :{WINDOW_COLOUR_2} 费用: {BLACK}from {CURRENCY} +STR_1691 :{WINDOW_COLOUR_2} 费用:{BLACK}{CURRENCY} +STR_1692 :{WINDOW_COLOUR_2} 费用:{BLACK}从{CURRENCY} STR_1693 :游客 STR_1694 :职员 STR_1695 :收入和支出 @@ -1096,7 +1096,7 @@ STR_1707 :游戏里员工太多了 STR_1708 :为该员工设置巡逻区域 STR_1709 :解雇员工 STR_1710 :确认 -STR_1711 :{WINDOW_COLOUR_1}你确定解雇{STRINGID}? +STR_1711 :{WINDOW_COLOUR_1}你确定解雇{STRINGID}? STR_1712 :{INLINE_SPRITE}{247}{19}{00}{00}{WINDOW_COLOUR_2}清扫道路 STR_1713 :{INLINE_SPRITE}{248}{19}{00}{00}{WINDOW_COLOUR_2}灌溉花园 STR_1714 :{INLINE_SPRITE}{249}{19}{00}{00}{WINDOW_COLOUR_2}清空垃圾桶 @@ -1104,33 +1104,33 @@ STR_1715 :{INLINE_SPRITE}{250}{19}{00}{00}{WINDOW_COLOUR_2}修剪草地 STR_1716 :无效的游乐园名称 STR_1717 :不能重命名乐园… STR_1718 :乐园命名 -STR_1719 :请输入乐园的名称: +STR_1719 :请输入乐园的名称: STR_1720 :命名乐园 STR_1721 :游乐园已关闭 STR_1722 :游乐园开放中 STR_1723 :不能开放乐园… STR_1724 :不能关闭乐园… STR_1725 :不能购买地块… -STR_1726 :地块不供购买! -STR_1727 :建筑权不供购买! +STR_1726 :地块不供购买! +STR_1727 :建筑权不供购买! STR_1728 :不能在此购买建权… -STR_1729 :非乐园所属地块! -STR_1730 :{RED}已关闭 - - -STR_1731 :{WHITE}{STRINGID} - - +STR_1729 :非乐园所属地块! +STR_1730 :{RED}已关闭 +STR_1731 :{WHITE}{STRINGID}——- STR_1732 :建造 STR_1733 :模式 -STR_1734 :{WINDOW_COLOUR_2}圈数: +STR_1734 :{WINDOW_COLOUR_2}圈数: STR_1735 :每次循环的圈数 STR_1736 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1738 :不能更改圈数… STR_1739 :游客{INT32}赢得本比赛 STR_1740 :{STRINGID}赢得本比赛 -STR_1741 :尚未建造 ! -STR_1742 :{WINDOW_COLOUR_2}设施最大载客量: +STR_1741 :尚未建造! +STR_1742 :{WINDOW_COLOUR_2}设施最大载客量: STR_1743 :该游乐设施同时最多可以乘坐的乘客数量、 STR_1744 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1746 :不能更改… -STR_1747 :{WINDOW_COLOUR_2}时间限制: +STR_1747 :{WINDOW_COLOUR_2}时间限制: STR_1748 :此游乐设施的游玩时间限制 STR_1749 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{DURATION} STR_1751 :不能更改此游乐设施的游玩时间限制… @@ -1138,8 +1138,8 @@ STR_1752 :显示公园内个人游客名单 STR_1753 :显示公园游客的汇总名单 STR_1754 :{BLACK}{COMMA32}名游客 STR_1755 :{BLACK}{COMMA32}名游客 -STR_1756 :{WINDOW_COLOUR_2}门票价格: -STR_1757 :{WINDOW_COLOUR_2}可靠性: {MOVE_X}{255}{BLACK}{COMMA16}% +STR_1756 :{WINDOW_COLOUR_2}门票价格: +STR_1757 :{WINDOW_COLOUR_2}可靠性:{MOVE_X}{255}{BLACK}{COMMA16}% STR_1758 :建造模式 STR_1759 :移动模式 STR_1760 :填补模式 @@ -1151,26 +1151,26 @@ STR_1765 :即时拍照区域 STR_1766 :反向转盘 STR_1767 :旋转隧道 STR_1768 :不能改变摇摆次数… -STR_1769 :{WINDOW_COLOUR_2}摇摆次数: +STR_1769 :{WINDOW_COLOUR_2}摇摆次数: STR_1770 :完全摇摆次数 STR_1771 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1773 :每个游乐设施只能建造一个照相区域 STR_1774 :每个游乐设施只能建造一个牵引轨道 STR_1777 :设施音乐 STR_1778 :{STRINGID} - - -STR_1779 :{INLINE_SPRITE}{254}{19}{00}{00} 熊猫服装 -STR_1780 :{INLINE_SPRITE}{255}{19}{00}{00} 老虎服装 -STR_1781 :{INLINE_SPRITE}{00}{20}{00}{00} 大象服装 -STR_1782 :{INLINE_SPRITE}{01}{20}{00}{00} 罗马人服装 -STR_1783 :{INLINE_SPRITE}{02}{20}{00}{00} 大猩猩服装 -STR_1784 :{INLINE_SPRITE}{03}{20}{00}{00} 雪人服装 -STR_1785 :{INLINE_SPRITE}{04}{20}{00}{00} 骑士服装 -STR_1786 :{INLINE_SPRITE}{05}{20}{00}{00} 宇航员服装 -STR_1787 :{INLINE_SPRITE}{06}{20}{00}{00} 土匪服装 -STR_1788 :{INLINE_SPRITE}{07}{20}{00}{00} 警长服装 -STR_1789 :{INLINE_SPRITE}{08}{20}{00}{00} 海盗服装 +STR_1779 :{INLINE_SPRITE}{254}{19}{00}{00}熊猫服装 +STR_1780 :{INLINE_SPRITE}{255}{19}{00}{00}老虎服装 +STR_1781 :{INLINE_SPRITE}{00}{20}{00}{00}大象服装 +STR_1782 :{INLINE_SPRITE}{01}{20}{00}{00}罗马服装 +STR_1783 :{INLINE_SPRITE}{02}{20}{00}{00}大猩猩服装 +STR_1784 :{INLINE_SPRITE}{03}{20}{00}{00}雪人服装 +STR_1785 :{INLINE_SPRITE}{04}{20}{00}{00}骑士服装 +STR_1786 :{INLINE_SPRITE}{05}{20}{00}{00}宇航员服装 +STR_1787 :{INLINE_SPRITE}{06}{20}{00}{00}土匪服装 +STR_1788 :{INLINE_SPRITE}{07}{20}{00}{00}警长服装 +STR_1789 :{INLINE_SPRITE}{08}{20}{00}{00}海盗服装 STR_1790 :选择这种员工的制服颜色 -STR_1791 :{WINDOW_COLOUR_2}制服的颜色: +STR_1791 :{WINDOW_COLOUR_2}制服的颜色: STR_1792 :回应{STRINGID}的故障呼叫中 STR_1793 :前往{STRINGID}检查中 STR_1794 :修理{STRINGID}中 @@ -1186,18 +1186,18 @@ 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_1808 :{WINDOW_COLOUR_2}上次故障原因:{BLACK}{STRINGID} +STR_1809 :{WINDOW_COLOUR_2}本次故障原因:{OUTLINE}{RED}{STRINGID} +STR_1810 :{WINDOW_COLOUR_2}搬运中: STR_1811 :不能建在这里… STR_1812 :{BLACK}{STRINGID} STR_1813 :其他物体 STR_1814 :动作 STR_1815 :想法 STR_1816 :选择游客列表中要显示的信息类别 -STR_1817 :({COMMA32}) +STR_1817 :({COMMA32}) STR_1818 :{WINDOW_COLOUR_2}所有游客 -STR_1819 :{WINDOW_COLOUR_2}所有游客(汇总) +STR_1819 :{WINDOW_COLOUR_2}所有游客(汇总) STR_1820 :{WINDOW_COLOUR_2}{STRINGID}的游客 STR_1821 :{WINDOW_COLOUR_2}在想{STRINGID}的游客 STR_1822 :{WINDOW_COLOUR_2}在想{POP16}{SMALLFONT}{STRINGID}{MEDIUMFONT}的游客 @@ -1213,13 +1213,13 @@ STR_1831 :等候时间 STR_1832 :可靠度 STR_1833 :故障度 STR_1834 :游客最爱的游乐设施 -STR_1835 :人气度: 未知 -STR_1836 :人气度: {COMMA16}% -STR_1837 :满意度: 未知 -STR_1838 :满意度: {COMMA16}% -STR_1839 :可靠度: {COMMA16}% -STR_1840 :故障度: {COMMA16}% -STR_1841 :利润: 每小时{CURRENCY2DP} +STR_1835 :人气度:未知 +STR_1836 :人气度:{COMMA16}% +STR_1837 :满意度:未知 +STR_1838 :满意度:{COMMA16}% +STR_1839 :可靠度:{COMMA16}% +STR_1840 :故障度:{COMMA16}% +STR_1841 :利润:每小时{CURRENCY2DP} STR_1842 :{COMMA16}游客最喜爱的游乐设施 STR_1843 :{COMMA16}游客最喜爱的游乐设施 STR_1844 :选择要在游乐设施/店面列表中显示的信息类别 @@ -1229,33 +1229,33 @@ STR_1847 :{INLINE_SPRITE}{11}{20}{00}{00}{COMMA32}游客 STR_1848 :{INLINE_SPRITE}{10}{20}{00}{00}{COMMA32}游客 STR_1849 :{WINDOW_COLOUR_2}播放音乐 STR_1850 :选择此游乐设施是否播放音乐 -STR_1851 :{WINDOW_COLOUR_2}运行成本: {BLACK}每小时{CURRENCY2DP} -STR_1852 :{WINDOW_COLOUR_2}运行成本: {BLACK}未知 -STR_1853 :{WINDOW_COLOUR_2}建造年份: {BLACK}今年 -STR_1854 :{WINDOW_COLOUR_2}建造年份: {BLACK}去年 -STR_1855 :{WINDOW_COLOUR_2}建造年份: {BLACK}{COMMA16}年前 -STR_1856 :{WINDOW_COLOUR_2}每件产品售出的利润: {BLACK}{CURRENCY2DP} -STR_1857 :{WINDOW_COLOUR_2}每件产品售出的亏损: {BLACK}{CURRENCY2DP} -STR_1858 :{WINDOW_COLOUR_2}成本: {BLACK}每个月{CURRENCY2DP} -STR_1859 :位环保工人 +STR_1851 :{WINDOW_COLOUR_2}运行成本:{BLACK}每小时{CURRENCY2DP} +STR_1852 :{WINDOW_COLOUR_2}运行成本:{BLACK}未知 +STR_1853 :{WINDOW_COLOUR_2}建造年份:{BLACK}今年 +STR_1854 :{WINDOW_COLOUR_2}建造年份:{BLACK}去年 +STR_1855 :{WINDOW_COLOUR_2}建造年份:{BLACK}{COMMA16}年前 +STR_1856 :{WINDOW_COLOUR_2}每件产品售出的利润:{BLACK}{CURRENCY2DP} +STR_1857 :{WINDOW_COLOUR_2}每件产品售出的亏损:{BLACK}{CURRENCY2DP} +STR_1858 :{WINDOW_COLOUR_2}成本:{BLACK}每个月{CURRENCY2DP} +STR_1859 :位清洁工人 STR_1860 :位维修人员 STR_1861 :位安保警卫 STR_1862 :位表演人员 -STR_1863 :位环保工人 +STR_1863 :位清洁工人 STR_1864 :位维修人员 STR_1865 :位安保警卫 STR_1866 :位表演人员 -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :不能改变旋转次数… -STR_1869 :{WINDOW_COLOUR_2}旋转次数: +STR_1869 :{WINDOW_COLOUR_2}旋转次数: STR_1870 :完整旋转次数 STR_1871 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} -STR_1873 :{WINDOW_COLOUR_2}收入: {BLACK}{CURRENCY2DP}/时 -STR_1874 :{WINDOW_COLOUR_2}盈利: {BLACK}{CURRENCY2DP}/时 +STR_1873 :{WINDOW_COLOUR_2}收入:{BLACK}每小时{CURRENCY2DP} +STR_1874 :{WINDOW_COLOUR_2}盈利:{BLACK}每小时{CURRENCY2DP} STR_1875 :{BLACK} {SPRITE}{BLACK} {STRINGID} STR_1876 :{WINDOW_COLOUR_2}{INLINE_SPRITE}{251}{19}{00}{00}检查游乐设施 STR_1877 :{WINDOW_COLOUR_2}{INLINE_SPRITE}{252}{19}{00}{00}维修游乐设施 -STR_1878 :{WINDOW_COLOUR_2}检查时间间隔: +STR_1878 :{WINDOW_COLOUR_2}检查间隔: STR_1879 :每10分钟 STR_1880 :每20分钟 STR_1881 :每30分钟 @@ -1263,13 +1263,13 @@ STR_1882 :每45分钟 STR_1883 :每小时 STR_1884 :每2小时 STR_1885 :从不 -STR_1886 :检查 {STRINGID} -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_1886 :检查{STRINGID} +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_1894 :{WINDOW_COLOUR_2}售出{STRINGID}: {BLACK}{COMMA32} +STR_1891 :在乐园里暂未有{STRINGID}! +STR_1894 :{WINDOW_COLOUR_2}售出{STRINGID}:{BLACK}{COMMA32} STR_1895 :建造新的游乐设施/店铺 STR_1896 :{WINDOW_COLOUR_2}支出/收入 STR_1897 :{WINDOW_COLOUR_2}建造游乐设施 @@ -1291,20 +1291,20 @@ STR_1912 :{MONTH} STR_1913 :{BLACK}+{CURRENCY2DP} STR_1914 :{BLACK}{CURRENCY2DP} STR_1915 :{RED}{CURRENCY2DP} -STR_1916 :{WINDOW_COLOUR_2}贷款: +STR_1916 :{WINDOW_COLOUR_2}贷款: STR_1917 :{POP16}{POP16}{POP16}{CURRENCY} -STR_1918 :不能再借贷更多钱! -STR_1919 :没有足够的现金! -STR_1920 :不能偿还贷款! +STR_1918 :不能再借更多贷款! +STR_1919 :没有足够的现金! +STR_1920 :不能偿还贷款! STR_1921 :开始新游戏 STR_1922 :从存档继续玩 STR_1924 :退出游戏 STR_1925 :不能放置人物于此… STR_1927 :{YELLOW}{STRINGID}发生故障了 -STR_1928 :{RED}{STRINGID}毁坏了! +STR_1928 :{RED}{STRINGID}毁坏了! STR_1929 :{RED}{STRINGID}依然未修复好{NEWLINE}请检查机械师位置所在,或考虑以更好的方法管理他们 -STR_1930 :开启/关闭这位游客的追踪信息 - (假若开启追踪,这位游客的行动将会报告于最近消息里) -STR_1931 :{STRINGID}已在轮候{STRINGID} +STR_1930 :开启/关闭这位游客的追踪信息——(假若开启追踪,这位游客的行动将会报告于最近消息里) +STR_1931 :{STRINGID}已在等候{STRINGID}的队列中 STR_1932 :{STRINGID}已在{STRINGID}上 STR_1933 :{STRINGID}已在{STRINGID}中 STR_1934 :{STRINGID}已离开{STRINGID} @@ -1313,7 +1313,7 @@ STR_1936 :{STRINGID}已购买{STRINGID} STR_1937 :显示关于这个消息标题的信息 STR_1938 :显示游客所视 STR_1939 :显示员工所视 -STR_1940 :显示这位游客的快乐度,体力,饥饿度等指标 +STR_1940 :显示这位游客的快乐度,体力值,饥饿度等指标 STR_1941 :显示这位游客乘坐了甚么游乐设施 STR_1942 :显示这位游客的财政状况 STR_1943 :显示这位游客的最近想法 @@ -1328,34 +1328,34 @@ STR_1951 :乐园价值图表 STR_1952 :营利图表 STR_1953 :营销计划 STR_1954 :研发资金 -STR_1955 :{WINDOW_COLOUR_2}圈数: +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_1960 :{WINDOW_COLOUR_2}气球价格: -STR_1961 :{WINDOW_COLOUR_2}毛绒公仔价格: -STR_1962 :{WINDOW_COLOUR_2}游乐园地图价格: -STR_1963 :{WINDOW_COLOUR_2}即时照片价格: -STR_1964 :{WINDOW_COLOUR_2}雨伞价格: -STR_1965 :{WINDOW_COLOUR_2}饮料价格: -STR_1966 :{WINDOW_COLOUR_2}汉堡价格: -STR_1967 :{WINDOW_COLOUR_2}薯条价格: -STR_1968 :{WINDOW_COLOUR_2}冰激淋价格: -STR_1969 :{WINDOW_COLOUR_2}棉花糖价格: +STR_1960 :{WINDOW_COLOUR_2}气球价格: +STR_1961 :{WINDOW_COLOUR_2}毛绒公仔价格: +STR_1962 :{WINDOW_COLOUR_2}游乐园地图价格: +STR_1963 :{WINDOW_COLOUR_2}即时照片价格: +STR_1964 :{WINDOW_COLOUR_2}雨伞价格: +STR_1965 :{WINDOW_COLOUR_2}饮料价格: +STR_1966 :{WINDOW_COLOUR_2}汉堡价格: +STR_1967 :{WINDOW_COLOUR_2}薯条价格: +STR_1968 :{WINDOW_COLOUR_2}冰激淋价格: +STR_1969 :{WINDOW_COLOUR_2}棉花糖价格: STR_1970 :{WINDOW_COLOUR_2} STR_1971 :{WINDOW_COLOUR_2} STR_1972 :{WINDOW_COLOUR_2} -STR_1973 :{WINDOW_COLOUR_2}披萨价格: +STR_1973 :{WINDOW_COLOUR_2}披萨价格: STR_1974 :{WINDOW_COLOUR_2} -STR_1975 :{WINDOW_COLOUR_2}爆米花价格: -STR_1976 :{WINDOW_COLOUR_2}热狗价格: -STR_1977 :{WINDOW_COLOUR_2}触手价格: -STR_1978 :{WINDOW_COLOUR_2}帽子价格: -STR_1979 :{WINDOW_COLOUR_2}太妃苹果糖价格: -STR_1980 :{WINDOW_COLOUR_2}T恤价格: -STR_1981 :{WINDOW_COLOUR_2}甜甜圈价格: -STR_1982 :{WINDOW_COLOUR_2}咖啡价格: +STR_1975 :{WINDOW_COLOUR_2}爆米花价格: +STR_1976 :{WINDOW_COLOUR_2}热狗价格: +STR_1977 :{WINDOW_COLOUR_2}触手价格: +STR_1978 :{WINDOW_COLOUR_2}帽子价格: +STR_1979 :{WINDOW_COLOUR_2}太妃苹果糖价格: +STR_1980 :{WINDOW_COLOUR_2}T恤价格: +STR_1981 :{WINDOW_COLOUR_2}甜甜圈价格: +STR_1982 :{WINDOW_COLOUR_2}咖啡价格: STR_1983 :{WINDOW_COLOUR_2} STR_1984 :{WINDOW_COLOUR_2}炸鸡价格 STR_1985 :{WINDOW_COLOUR_2}柠檬水价格 @@ -1426,7 +1426,7 @@ STR_2049 :一杯饮料 STR_2050 :一个汉堡 STR_2051 :一份薯条 STR_2052 :一个冰激淋 -STR_2053 :一球棉花糖 +STR_2053 :一份棉花糖 STR_2054 :一个空罐子 STR_2055 :一些垃圾 STR_2056 :一个空汉堡包装盒 @@ -1473,24 +1473,24 @@ STR_2096 :炸鸡 STR_2097 :柠檬水 STR_2098 :空盒子 STR_2099 :空瓶子 -STR_2103 :{WINDOW_COLOUR_2}椒盐卷饼价格: -STR_2104 :{WINDOW_COLOUR_2}热巧克力价格: -STR_2105 :{WINDOW_COLOUR_2}冰红茶价格: -STR_2106 :{WINDOW_COLOUR_2}漏斗蛋糕价格: -STR_2107 :{WINDOW_COLOUR_2}太阳镜价格: -STR_2108 :{WINDOW_COLOUR_2}牛肉面价格: -STR_2109 :{WINDOW_COLOUR_2}炒米粉价格: -STR_2110 :{WINDOW_COLOUR_2}上汤云吞价格: -STR_2111 :{WINDOW_COLOUR_2}肉丸汤价格: -STR_2112 :{WINDOW_COLOUR_2}果汁价格: -STR_2113 :{WINDOW_COLOUR_2}豆浆价格: -STR_2114 :{WINDOW_COLOUR_2}水正果价格: -STR_2115 :{WINDOW_COLOUR_2}潜艇三明治价格: -STR_2116 :{WINDOW_COLOUR_2}曲奇饼干价格: +STR_2103 :{WINDOW_COLOUR_2}椒盐卷饼价格: +STR_2104 :{WINDOW_COLOUR_2}热巧克力价格: +STR_2105 :{WINDOW_COLOUR_2}冰红茶价格: +STR_2106 :{WINDOW_COLOUR_2}漏斗蛋糕价格: +STR_2107 :{WINDOW_COLOUR_2}太阳镜价格: +STR_2108 :{WINDOW_COLOUR_2}牛肉面价格: +STR_2109 :{WINDOW_COLOUR_2}炒米粉价格: +STR_2110 :{WINDOW_COLOUR_2}上汤云吞价格: +STR_2111 :{WINDOW_COLOUR_2}肉丸汤价格: +STR_2112 :{WINDOW_COLOUR_2}果汁价格: +STR_2113 :{WINDOW_COLOUR_2}豆浆价格: +STR_2114 :{WINDOW_COLOUR_2}水正果价格: +STR_2115 :{WINDOW_COLOUR_2}潜艇三明治价格: +STR_2116 :{WINDOW_COLOUR_2}曲奇饼干价格: STR_2117 :{WINDOW_COLOUR_2} STR_2118 :{WINDOW_COLOUR_2} STR_2119 :{WINDOW_COLOUR_2} -STR_2120 :{WINDOW_COLOUR_2}烤香肠价格: +STR_2120 :{WINDOW_COLOUR_2}烤香肠价格: STR_2121 :{WINDOW_COLOUR_2} STR_2125 :椒盐卷饼 STR_2126 :热巧克力 @@ -1572,21 +1572,21 @@ STR_2210 :列出乐园内的清洁工人 STR_2211 :列出乐园内的维修人员 STR_2212 :列出乐园内的安全警卫 STR_2213 :列出乐园内的表演人员 -STR_2214 :你不能在游戏暂停时建造! -STR_2215 :{STRINGID}{NEWLINE}({STRINGID}) +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_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_2227 :{WINDOW_COLOUR_2}公司价值: {BLACK}{CURRENCY} -STR_2228 :{WINDOW_COLOUR_2}上个月来自食物/饮料以及{NEWLINE}其他商品的销售额: {BLACK}{CURRENCY} +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_2227 :{WINDOW_COLOUR_2}公司价值:{BLACK}{CURRENCY} +STR_2228 :{WINDOW_COLOUR_2}上个月来自食物/饮料以及{NEWLINE}其他商品的销售额:{BLACK}{CURRENCY} STR_2229 :上坡到垂直的过渡轨道 STR_2230 :垂直轨道 STR_2231 :下落刹车设备 @@ -1607,49 +1607,49 @@ STR_2245 :10月 STR_2246 :11月 STR_2247 :12月 STR_2248 :不能移除游乐设施/店铺… -STR_2249 :{BABYBLUE}全新游乐设施/店铺可供使用:{NEWLINE}{STRINGID} -STR_2250 :{BABYBLUE}全新景物/主题景物可供使用:{NEWLINE}{STRINGID} -STR_2251 :只可以在道路上建造! -STR_2252 :只可以横过道路建造! +STR_2249 :{BABYBLUE}全新游乐设施/店铺可供使用:{NEWLINE}{STRINGID} +STR_2250 :{BABYBLUE}全新景物/主题景物可供使用:{NEWLINE}{STRINGID} +STR_2251 :只可以在道路上建造! +STR_2252 :只可以横过道路建造! STR_2253 :运输类游乐设施 STR_2254 :温和类游乐设施 -STR_2255 :过山车 +STR_2255 :过山车类游乐设施 STR_2256 :剌激类游乐设施 STR_2257 :水上乐园设施 STR_2258 :商店及摊贩 STR_2259 :景物及主题景物 -STR_2260 :无资金 -STR_2261 :最少资金 -STR_2262 :普通资金 -STR_2263 :最多资金 +STR_2260 :无投资 +STR_2261 :最低投资 +STR_2262 :正常投资 +STR_2263 :最大投资 STR_2264 :研发资金分配 -STR_2265 :{WINDOW_COLOUR_2}费用: {BLACK}每个月{CURRENCY} +STR_2265 :{WINDOW_COLOUR_2}费用:{BLACK}每个月{CURRENCY} STR_2266 :研发优先项目 STR_2267 :目前研发项目 STR_2268 :上次研发项目 -STR_2269 :{WINDOW_COLOUR_2}类别: {BLACK}{STRINGID} -STR_2270 :{WINDOW_COLOUR_2}进度: {BLACK}{STRINGID} -STR_2271 :{WINDOW_COLOUR_2}预计完工日期: {BLACK}{STRINGID} -STR_2272 :{WINDOW_COLOUR_2}游乐设施/店铺:{NEWLINE}{BLACK}{STRINGID} -STR_2273 :{WINDOW_COLOUR_2}景物/主题景物:{NEWLINE}{BLACK}{STRINGID} +STR_2269 :{WINDOW_COLOUR_2}类别:{BLACK}{STRINGID} +STR_2270 :{WINDOW_COLOUR_2}进度:{BLACK}{STRINGID} +STR_2271 :{WINDOW_COLOUR_2}预计完工日期:{BLACK}{STRINGID} +STR_2272 :{WINDOW_COLOUR_2}游乐设施/店铺:{NEWLINE}{BLACK}{STRINGID} +STR_2273 :{WINDOW_COLOUR_2}景物/主题景物:{NEWLINE}{BLACK}{STRINGID} STR_2274 :显示此研发项目的详细数据 STR_2275 :显示研发的资金分配及选项 STR_2276 :显示研发项目进度 STR_2277 :未知 STR_2278 :运输类游乐设施 STR_2279 :温和类游乐设施 -STR_2280 :过山车 +STR_2280 :过山车类游乐设施 STR_2281 :剌激类游乐设施 STR_2282 :水上游乐设施 STR_2283 :商店及摊贩 STR_2284 :景物及主题景物 STR_2285 :初始研发 STR_2286 :设计中 -STR_2287 :完成设计中 +STR_2287 :完善设计中 STR_2288 :未知 STR_2289 :{STRINGID} {STRINGID} STR_2291 :选择新游戏的剧情 -STR_2292 :{WINDOW_COLOUR_2}乘坐过的游乐设施: +STR_2292 :{WINDOW_COLOUR_2}乘坐过的游乐设施: STR_2293 :{BLACK}无 STR_2294 :更改基础土地样式 STR_2295 :更改土地的垂直边界 @@ -1668,57 +1668,57 @@ 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_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}{COMMA16} -STR_2323 :{WINDOW_COLOUR_2}乐园大小: {BLACK}{COMMA32}m² -STR_2324 :{WINDOW_COLOUR_2}乐园大小: {BLACK}{COMMA32}平方英尺 +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_2327 :选项 -STR_2328 :{WINDOW_COLOUR_2}货币单位: -STR_2329 :{WINDOW_COLOUR_2}距离和速度单位: -STR_2330 :{WINDOW_COLOUR_2}温度单位: -STR_2331 :{WINDOW_COLOUR_2}高度标签单位: +STR_2328 :{WINDOW_COLOUR_2}货币单位: +STR_2329 :{WINDOW_COLOUR_2}距离和速度单位: +STR_2330 :{WINDOW_COLOUR_2}温度单位: +STR_2331 :{WINDOW_COLOUR_2}高度标签单位: STR_2332 :单位 STR_2333 :音效 -STR_2334 :英镑 (£) -STR_2335 :美元 ($) -STR_2336 :法郎 (F) -STR_2337 :德国马克 (DM) -STR_2338 :日元 (¥) -STR_2339 :比塞塔 (Pts) -STR_2340 :里拉 (L) -STR_2341 :荷兰盾 (ƒ) -STR_2342 :克朗 (kr) -STR_2343 :欧元 (€) +STR_2334 :英镑(£) +STR_2335 :美元($) +STR_2336 :法郎(F) +STR_2337 :德国马克(DM) +STR_2338 :日元(¥) +STR_2339 :比塞塔(Pts) +STR_2340 :里拉(L) +STR_2341 :荷兰盾(ƒ) +STR_2342 :克朗(kr) +STR_2343 :欧元(€) STR_2344 :英制 STR_2345 :公制 -STR_2347 :{RED}{STRINGID}已被溺死! +STR_2347 :{RED}{STRINGID}溺水而亡! STR_2348 :显示这位员工的统计数据 -STR_2349 :{WINDOW_COLOUR_2}工资: {BLACK}每个月{CURRENCY} -STR_2350 :{WINDOW_COLOUR_2}雇用日期: {BLACK}{MONTHYEAR} -STR_2351 :{WINDOW_COLOUR_2}除草次数: {BLACK}{COMMA32} -STR_2352 :{WINDOW_COLOUR_2}灌溉次数: {BLACK}{COMMA32} -STR_2353 :{WINDOW_COLOUR_2}扫地次数: {BLACK}{COMMA32} -STR_2354 :{WINDOW_COLOUR_2}清空垃圾桶次数: {BLACK}{COMMA32} -STR_2355 :{WINDOW_COLOUR_2}修理游乐设施次数: {BLACK}{COMMA32} -STR_2356 :{WINDOW_COLOUR_2}检验游乐设施次数: {BLACK}{COMMA32} +STR_2349 :{WINDOW_COLOUR_2}工资:{BLACK}每个月{CURRENCY} +STR_2350 :{WINDOW_COLOUR_2}雇用日期:{BLACK}{MONTHYEAR} +STR_2351 :{WINDOW_COLOUR_2}除草次数:{BLACK}{COMMA32} +STR_2352 :{WINDOW_COLOUR_2}灌溉次数:{BLACK}{COMMA32} +STR_2353 :{WINDOW_COLOUR_2}扫地次数:{BLACK}{COMMA32} +STR_2354 :{WINDOW_COLOUR_2}清空垃圾桶次数:{BLACK}{COMMA32} +STR_2355 :{WINDOW_COLOUR_2}修理游乐设施次数:{BLACK}{COMMA32} +STR_2356 :{WINDOW_COLOUR_2}检验游乐设施次数:{BLACK}{COMMA32} STR_2358 :单位 STR_2359 :真实数值 -STR_2360 :屏幕分辨率: +STR_2360 :屏幕分辨率: STR_2361 :地表边缘平滑 STR_2362 :开启/关闭地表边缘平滑 STR_2363 :地表网格 STR_2364 :开启/关闭地表网格显示 -STR_2365 :银行拒绝增加你的贷款额! -STR_2366 :摄氏 (°C) -STR_2367 :华氏 (°F) +STR_2365 :银行拒绝增加你的贷款额! +STR_2366 :摄氏度(°C) +STR_2367 :华氏度(°F) STR_2368 :无 STR_2369 :低 STR_2370 :普通 @@ -1737,13 +1737,13 @@ STR_2382 :土地 STR_2383 :水面 STR_2384 :{WINDOW_COLOUR_2}你的目标: STR_2385 :{BLACK}无 -STR_2386 :{BLACK}在{POP16}{MONTHYEAR}末乐园内至少有{PUSH16}{PUSH16}{COMMA16}游客,并且乐园评分不低于600 +STR_2386 :{BLACK}在{POP16}{MONTHYEAR}末乐园内至少有{NEWLINE}{PUSH16}{PUSH16}{COMMA16}游客,并且乐园评分不低于600 STR_2387 :{BLACK}在{POP16}{MONTHYEAR}末乐园价值不低于{CURRENCY} -STR_2388 :{BLACK}尽情玩吧! -STR_2389 :{BLACK}建造你的最佳{STRINGID}吧! +STR_2388 :{BLACK}尽情玩吧! +STR_2389 :{BLACK}建造你的最佳{STRINGID}吧! STR_2390 :{BLACK}在你的乐园中运营10种类型的过山车,并且每一个的兴奋度不低于6.00 -STR_2391 :{BLACK}乐园内至少有{COMMA16} 游客,并且在任何时候你都不能让公园评分低于700 ! -STR_2392 :{BLACK}每个月的门票收入至少{POP16}{POP16}{CURRENCY} +STR_2391 :{BLACK}乐园内至少有{COMMA16}游客,并且在任何时候你都不能让公园评分低于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} @@ -1764,11 +1764,11 @@ STR_2409 :{WINDOW_COLOUR_2}实行中的营销计划 STR_2410 :{BLACK}无 STR_2411 :{WINDOW_COLOUR_2}可以实行的营销计划 STR_2412 :开始实行这个营销计划 -STR_2413 :{BLACK}(每周{CURRENCY2DP}) -STR_2414 :(尚未选择) -STR_2415 :{WINDOW_COLOUR_2}游乐设施: -STR_2416 :{WINDOW_COLOUR_2}物品: -STR_2417 :{WINDOW_COLOUR_2}时长: +STR_2413 :{BLACK}(每周{CURRENCY2DP}) +STR_2414 :(尚未选择) +STR_2415 :{WINDOW_COLOUR_2}游乐设施: +STR_2416 :{WINDOW_COLOUR_2}物品: +STR_2417 :{WINDOW_COLOUR_2}时长: STR_2418 :免费进入{STRINGID} STR_2419 :免费乘坐{STRINGID} STR_2420 :半价进入{STRINGID} @@ -1785,49 +1785,49 @@ 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_2436 :1周 +STR_2443 :{WINDOW_COLOUR_2}每周费用:{BLACK} {CURRENCY2DP} +STR_2444 :{WINDOW_COLOUR_2}总费用:{BLACK} {CURRENCY2DP} STR_2445 :开始实行此营销计划 -STR_2446 :{YELLOW}你举行的行销计划 - 免费进入乐园营销计划现已结束 -STR_2447 :{YELLOW}你举行的行销计划 - 免费乘坐游乐设施{STRINGID}现已结束 -STR_2448 :{YELLOW}你举行的行销计划 - 半价进入乐园现已结束 -STR_2449 :{YELLOW}你举行的行销计划 - 免费{STRINGID}现已结束 +STR_2446 :{YELLOW}你举行的行销计划——免费进入乐园营销计划现已结束 +STR_2447 :{YELLOW}你举行的行销计划——免费乘坐游乐设施{STRINGID}现已结束 +STR_2448 :{YELLOW}你举行的行销计划——半价进入乐园现已结束 +STR_2449 :{YELLOW}你举行的行销计划——免费{STRINGID}现已结束 STR_2450 :{YELLOW}你针对乐园的推广计划现已结束 STR_2451 :{YELLOW}你针对{STRINGID}的推广计划现已结束 -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_2460 : {BLACK}以图表显示过往到现在的每周营利 -STR_2461 : {BLACK}显示营销计划详情 -STR_2462 : {BLACK}显示乐园入口的视点 -STR_2463 : {BLACK}以图表显示过往到现在的乐园评价 -STR_2464 : {BLACK}以图表显示过往到现在的游客人员 -STR_2465 : {BLACK}显示乐园门票价格以及其资讯 -STR_2466 : {BLACK}显示乐园的统计资料 -STR_2467 : {BLACK}显示是次游戏的目标 -STR_2468 : {BLACK}显示这个乐园最近获得的奖项 -STR_2469 : {BLACK}选择投放多少资金到研发当中 -STR_2470 : {BLACK}研发新的运输类游游设施 -STR_2471 : {BLACK}研发新的温和类游乐设施 -STR_2472 : {BLACK}研发新的过山车 -STR_2473 : {BLACK}研发新的刺激类游乐设施 -STR_2474 : {BLACK}研发新的水文类游乐设施 -STR_2475 : {BLACK}研发新的商店及摊贩 -STR_2476 : {BLACK}研发新的景物及主题景物 -STR_2477 : {BLACK}选择这个游乐设施的运作模式 -STR_2478 : {BLACK}以图表显示速度与运作时间的关系 -STR_2479 : {BLACK}以图表显示高度与运作时间的关系 -STR_2480 : {BLACK}以图表显示垂直加速与运作时间的关系 +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_2460 :{BLACK}以图表显示过往到现在的每周营利 +STR_2461 :{BLACK}显示营销计划详情 +STR_2462 :{BLACK}显示乐园入口的视点 +STR_2463 :{BLACK}以图表显示过往到现在的乐园评价 +STR_2464 :{BLACK}以图表显示过往到现在的游客人员 +STR_2465 :{BLACK}显示乐园门票价格以及其资讯 +STR_2466 :{BLACK}显示乐园的统计资料 +STR_2467 :{BLACK}显示是次游戏的目标 +STR_2468 :{BLACK}显示这个乐园最近获得的奖项 +STR_2469 :{BLACK}选择投放多少资金到研发当中 +STR_2470 :{BLACK}研发新的运输类游游设施 +STR_2471 :{BLACK}研发新的温和类游乐设施 +STR_2472 :{BLACK}研发新的过山车类游乐设施 +STR_2473 :{BLACK}研发新的刺激类游乐设施 +STR_2474 :{BLACK}研发新的水文类游乐设施 +STR_2475 :{BLACK}研发新的商店及摊贩 +STR_2476 :{BLACK}研发新的景物及主题景物 +STR_2477 :{BLACK}选择这个游乐设施的运作模式 +STR_2478 :{BLACK}以图表显示速度与运作时间的关系 +STR_2479 :{BLACK}以图表显示高度与运作时间的关系 +STR_2480 :{BLACK}以图表显示垂直加速与运作时间的关系 STR_2481 :以图表显示横向加速与运作时间的关系 -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_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_2490 :键盘快捷键 STR_2491 :重置快捷键 @@ -1841,15 +1841,15 @@ STR_2498 :放大视图范围 STR_2499 :顺时针旋转视图范围 STR_2500 :旋转要建造的对象 STR_2501 :开启/关闭地底视图模式 -STR_2502 :开启/关闭‘隐藏地表’选项 -STR_2503 :开启/关闭‘隐藏垂直地面’选项 -STR_2504 :开启/关闭‘半透明游乐设施’选项 -STR_2505 :开启/关闭‘半透明景观’选项 -STR_2506 :开启/关闭‘透明化支撑’选项 -STR_2507 :开启/关闭‘透明化游客’选项 -STR_2508 :开启/关闭‘在土地上标记高度’选项 -STR_2509 :开启/关闭‘在设施轨道上标记高度’选项 -STR_2510 :开启/关闭‘在道路上标记高度’选项 +STR_2502 :开启/关闭“隐藏地表”选项 +STR_2503 :开启/关闭“隐藏垂直地面”选项 +STR_2504 :开启/关闭“半透明游乐设施”选项 +STR_2505 :开启/关闭“半透明景观”选项 +STR_2506 :开启/关闭“透明化支撑”选项 +STR_2507 :开启/关闭“透明化游客”选项 +STR_2508 :开启/关闭“在土地上标记高度”选项 +STR_2509 :开启/关闭“在设施轨道上标记高度”选项 +STR_2510 :开启/关闭“在道路上标记高度”选项 STR_2511 :调整土地 STR_2512 :调整水面 STR_2513 :建造景观 @@ -1909,18 +1909,18 @@ STR_2670 :Scroll STR_2680 :所有项目已研发完毕 STR_2684 :一大批游客到访 STR_2685 :单形噪声参数 -STR_2686 :低值: -STR_2687 :高值: -STR_2688 :基础频率: -STR_2689 :八音度: +STR_2686 :低值: +STR_2687 :高值: +STR_2688 :基础频率: +STR_2689 :八音度: STR_2690 :生成地图 -STR_2691 :土地基础高度: -STR_2692 :水面高度: -STR_2693 :地形: +STR_2691 :土地基础高度: +STR_2692 :水面高度: +STR_2693 :地形: STR_2694 :生成 STR_2695 :随机地形 STR_2696 :放置树木 -STR_2700 :自动保存频率: +STR_2700 :自动保存频率: STR_2701 :每分钟 STR_2702 :每5分钟 STR_2703 :每15分钟 @@ -1928,7 +1928,7 @@ STR_2704 :每30分钟 STR_2705 :每小时 STR_2706 :从不 STR_2707 :使用系统的文件浏览器 -STR_2708 :{WINDOW_COLOUR_1}你确定要覆盖存档{STRINGID}? +STR_2708 :{WINDOW_COLOUR_1}你确定要覆盖存档{STRINGID}? STR_2709 :覆盖 STR_2710 :请输入存档名称: STR_2718 :向上一层 @@ -1945,16 +1945,16 @@ STR_2728 :{UINT16}小时:{UINT16}分 STR_2729 :{UINT16}小时:{UINT16}分 STR_2730 :{UINT16}小时:{UINT16}分 STR_2731 :{UINT16}小时:{UINT16}分 -STR_2732 :{COMMA32}ft -STR_2733 :{COMMA32}m -STR_2734 :{COMMA16}mph -STR_2735 :{COMMA16}km/h +STR_2732 :{COMMA32}英尺 +STR_2733 :{COMMA32}米 +STR_2734 :{COMMA16}英里每小时 +STR_2735 :{COMMA16}公里每小时 STR_2736 :第{POP16}{COMMA16}年{PUSH16}{PUSH16}{MONTH} -STR_2737 :{STRINGID} 第{POP16}{COMMA16}年{PUSH16}{PUSH16}{MONTH} -STR_2738 :主菜单音乐: +STR_2737 :{STRINGID}第{POP16}{COMMA16}年{PUSH16}{PUSH16}{MONTH} +STR_2738 :主菜单音乐: STR_2739 :无 -STR_2740 :过山车大亨1(RCT1) -STR_2741 :过山车大亨2(RCT2) +STR_2740 :过山车大亨1(RCT1) +STR_2741 :过山车大亨2(RCT2) STR_2749 :我的新剧情 # New strings used in the cheats window previously these were ??? STR_2750 :移动全部物品到顶部 @@ -1972,46 +1972,46 @@ STR_2769 :开放游乐园 STR_2770 :关闭游乐园 STR_2773 :窗口 STR_2774 :全屏幕 -STR_2775 :全屏幕 (无边框窗口) -STR_2776 :语言: +STR_2775 :全屏幕(无边框窗口) +STR_2776 :语言: STR_2777 :{MOVE_X}{10}{STRING} STR_2778 :»{MOVE_X}{10}{STRING} STR_2779 :查看窗口 #{COMMA16} STR_2780 :额外的查看窗口 # End of new strings -STR_2781 :{STRINGID}: +STR_2781 :{STRINGID}: STR_2782 :SHIFT + STR_2783 :CTRL + STR_2784 :变更快捷键 -STR_2785 :{WINDOW_COLOUR_2}按下{NEWLINE}的新快捷键:“{STRINGID}” +STR_2785 :{WINDOW_COLOUR_2}按下{NEWLINE}的新快捷键:“{STRINGID}” STR_2786 :点击快捷键描述来设置新的快捷键 -STR_2787 :{WINDOW_COLOUR_2}乐园价值: {BLACK}{CURRENCY} -STR_2788 :{WINDOW_COLOUR_2}恭喜您!{NEWLINE}{BLACK}你已经达到你的目标,并令公司价值增至 {CURRENCY} ! -STR_2789 :{WINDOW_COLOUR_2}你未达成目标 ! +STR_2787 :{WINDOW_COLOUR_2}乐园价值:{BLACK}{CURRENCY} +STR_2788 :{WINDOW_COLOUR_2}恭喜您!{NEWLINE}{BLACK}你已经达到你的目标,并令公司价值增至{CURRENCY}! +STR_2789 :{WINDOW_COLOUR_2}你未达成目标! STR_2790 :请输入你要在剧情列表显示的名字 STR_2791 :输入名字 -STR_2792 :请输入你要在剧情列表显示的名字: -STR_2793 :(由{STRINGID}达成) -STR_2794 :{WINDOW_COLOUR_2}完成者: {BLACK}{STRINGID}{NEWLINE}{WINDOW_COLOUR_2}公司价值: {BLACK}{CURRENCY} +STR_2792 :请输入你要在剧情列表显示的名字: +STR_2793 :(由{STRINGID}达成) +STR_2794 :{WINDOW_COLOUR_2}完成者:{BLACK}{STRINGID}{NEWLINE}{WINDOW_COLOUR_2}公司价值:{BLACK}{CURRENCY} STR_2795 :排序 STR_2796 :将游乐设施按照不同类别排列 STR_2797 :当鼠标位于屏幕边缘时滚动视图 STR_2798 :当鼠标位于屏幕边缘时滚动视图 STR_2799 :查看或改变控制按键分配 -STR_2800 :{WINDOW_COLOUR_2}总购票人数: {BLACK}{COMMA32} -STR_2801 :{WINDOW_COLOUR_2}门票收入: {BLACK}{CURRENCY2DP} +STR_2800 :{WINDOW_COLOUR_2}总购票人数:{BLACK}{COMMA32} +STR_2801 :{WINDOW_COLOUR_2}门票收入:{BLACK}{CURRENCY2DP} STR_2802 :地图 STR_2803 :高亮显示游客 -STR_2804 :高亮显示雇员 +STR_2804 :高亮显示员工 STR_2805 :显示游乐园地图 -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_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}拥有最棒过山车奖 @@ -2029,33 +2029,33 @@ 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_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_2853 :被当地政府禁止! +STR_2854 :{RED}游客都不能走到去{STRINGID}的入口!{NEWLINE}请建造道路连接入口 +STR_2855 :{RED}{STRINGID}的出口并没有道路连接!{NEWLINE}请建造道路连接出口 STR_2858 :不能开始实行营销计划… -STR_2861 :{WINDOW_COLOUR_2}Licensed to Infogrames Interactive Inc. +STR_2861 :{WINDOW_COLOUR_2}授权至 Infogrames Interactive Inc. STR_2971 :主要配色主题 STR_2972 :额外配色主题1 STR_2973 :额外配色主题2 @@ -2063,12 +2063,12 @@ STR_2974 :额外配色主题3 STR_2975 :选取游乐设施的配色选项来修改 STR_2976 :将指定区域使用目前选择的配色主题 STR_2977 :员工命名 -STR_2978 :请输入该员工的新名字: +STR_2978 :请输入该员工的新名字: STR_2979 :不能更改该员工姓名… STR_2980 :游戏中有过多的横幅 STR_2981 :{RED}-游客止步— STR_2982 :横幅内容 -STR_2983 :请输入新的内容: +STR_2983 :请输入新的内容: STR_2984 :不能设置新的横幅内容… STR_2985 :横幅 STR_2986 :修改横幅内容 @@ -2078,7 +2078,7 @@ STR_2989 :选择横幅配色 STR_2990 :选择文字配色 STR_2991 :标志 STR_2992 :标志内容 -STR_2993 :请输入新的标志内容: +STR_2993 :请输入新的标志内容: STR_2994 :修改标志的内容 STR_2995 :拆除该标志 STR_2996 :{BLACK}ABC @@ -2130,7 +2130,7 @@ STR_3041 :摩登风格 STR_3042 :海盗风格 STR_3043 :摇滚风格3 STR_3044 :糖果风格 -STR_3045 :选择要播放的音乐风格: +STR_3045 :选择要播放的音乐风格: STR_3047 :当地政府禁止拆除或修改此游乐设施 STR_3048 :当地政府禁止进行所有广告推广计划 STR_3049 :高尔夫球洞A @@ -2144,7 +2144,7 @@ STR_3059 :树篱 STR_3060 :冰砖墙 STR_3061 :木栅栏 STR_3062 :标准过山车轨道 -STR_3063 :水溅轨道 (轨道半浸于水中) +STR_3063 :水溅轨道(轨道半浸于水中) STR_3064 :新手级乐园 STR_3065 :挑战级乐园 STR_3066 :专家级乐园 @@ -2154,17 +2154,17 @@ 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_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 :你无法移动或修改这个游乐设施的车站! -STR_3093 :{WINDOW_COLOUR_2}最爱: {BLACK}{STRINGID} +STR_3091 :你无法删除此轨道! +STR_3092 :你无法移动或修改这个游乐设施的车站! +STR_3093 :{WINDOW_COLOUR_2}最爱:{BLACK}{STRINGID} STR_3094 :N/A -STR_3095 :{WINDOW_COLOUR_2}提升坡的上升速度: +STR_3095 :{WINDOW_COLOUR_2}提升坡的上升速度: STR_3096 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{VELOCITY} STR_3097 :选择提升坡的链条上拉速度 STR_3099 :选择颜色 @@ -2178,50 +2178,50 @@ STR_3106 :列出访客信息中心或其他游客设施 STR_3107 :关闭 STR_3108 :测试 STR_3109 :开启 -STR_3110 :{WINDOW_COLOUR_2}刹车区间: {BLACK}{COMMA16} +STR_3110 :{WINDOW_COLOUR_2}刹车区间:{BLACK}{COMMA16} STR_3111 :点击建造设计 STR_3112 :点击删除或重命名设计 STR_3113 :选择另一个设计 STR_3114 :返回选择设计窗口 STR_3115 :存储轨道设计 -STR_3116 :存储轨道设计 (在测试完结及测试数据生成完毕前不可用) +STR_3116 :存储轨道设计(在测试完结及测试数据生成完毕前不可用) STR_3117 :{BLACK}调用维修人员中… STR_3118 :{BLACK}{STRINGID}正在前往到这个游乐设施 STR_3119 :{BLACK}{STRINGID}正在修复这个游乐设施 STR_3120 :将最邻近,或在维修此游乐设施的维修人员定位 STR_3121 :无法定位维修人员,或者附近的维修人员都在工作中 -STR_3122 :{WINDOW_COLOUR_2}游客的最爱: {BLACK}{COMMA16}位游客 -STR_3123 :{WINDOW_COLOUR_2}游客的最爱: {BLACK}{COMMA16}位游客 +STR_3122 :{WINDOW_COLOUR_2}游客的最爱:{BLACK}{COMMA16}位游客 +STR_3123 :{WINDOW_COLOUR_2}游客的最爱:{BLACK}{COMMA16}位游客 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_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_3131 :取消 STR_3132 :{BLACK}点击选择景物,以便存储于轨道设计内… STR_3133 :无法于斜坡上建造此对象 -STR_3134 :{RED}(设计中含有不可用的景物) -STR_3135 :{RED}(车辆款式不可用 - 游乐设施的性能可能会有影响) -STR_3136 :警告: 此设计会使用另一款车辆,它的运作可能会跟预期有落差 +STR_3134 :{RED}(设计中含有不可用的景物) +STR_3135 :{RED}(车辆款式不可用——游乐设施的性能可能会有影响) +STR_3136 :警告:此设计会使用另一款车辆,它的运作可能会跟预期有落差 STR_3137 :选择邻近景物 STR_3138 :重新选择 STR_3139 :缆道坡道不能在这个运作模式运作 STR_3140 :缆道坡道需要连接至车站 STR_3141 :缆道坡道并不适合於单次多圈数的游乐设施 -STR_3142 :{WINDOW_COLOUR_2}载客量: {BLACK}{STRINGID} +STR_3142 :{WINDOW_COLOUR_2}载客量:{BLACK}{STRINGID} STR_3143 :在地图上显示所有人物 STR_3144 :在地图上显示所有游乐设施及店铺 STR_3160 :选择每次乘坐循环的次数 STR_3162 :无法分配足够的内存 -STR_3163 :安装新数据档中: -STR_3164 :{BLACK}已选择{COMMA16}项 (最多{COMMA16}项) -STR_3167 :{WINDOW_COLOUR_2}包含: {BLACK}{COMMA16}项对象 -STR_3169 :找不到以下对象的数据: +STR_3163 :安装新数据档中: +STR_3164 :{BLACK}已选择{COMMA16}项(最多{COMMA16}项) +STR_3167 :{WINDOW_COLOUR_2}包含:{BLACK}{COMMA16}项对象 +STR_3169 :找不到以下对象的数据: STR_3170 :没有空间绘制图像 STR_3171 :选择了太多此类型的对象 -STR_3172 :必需要先选择以下的对象: {STRING} +STR_3172 :必需要先选择以下的对象:{STRING} STR_3173 :这个对象目前被使用中 STR_3174 :其他对象需要这个对象 STR_3175 :这个对象是必需的 @@ -2229,7 +2229,7 @@ STR_3176 :无法选择这个对象 STR_3177 :无法取消选择这个对象 STR_3179 :至少需要选择一项游乐设施/店铺 STR_3180 :不合适的对象选择 -STR_3181 :对象选择 - {STRINGID} +STR_3181 :对象选择——{STRINGID} STR_3182 :必须选择乐园入口类别 STR_3183 :必须选择水塘类别 STR_3184 :游乐设施/其车辆 @@ -2243,9 +2243,9 @@ STR_3191 :景物组别 STR_3192 :乐园入口 STR_3193 :水塘 STR_3195 :研发列表 -STR_3196 :{WINDOW_COLOUR_2}研发组别: {BLACK}{STRINGID} -STR_3197 :{WINDOW_COLOUR_2}游戏开始时已研发好的项目: -STR_3198 :{WINDOW_COLOUR_2}需要在游戏中研发的项目: +STR_3196 :{WINDOW_COLOUR_2}研发组别:{BLACK}{STRINGID} +STR_3197 :{WINDOW_COLOUR_2}游戏开始时已研发好的项目: +STR_3198 :{WINDOW_COLOUR_2}需要在游戏中研发的项目: STR_3199 :随机分配 STR_3200 :将需要在游戏中研发的项目随机分配 STR_3201 :选取对象 @@ -2256,9 +2256,9 @@ STR_3205 :选取目标 STR_3206 :存储剧情 STR_3207 :轨道设计工具 STR_3208 :轨道设计管理工具 -STR_3209 :上一步: -STR_3210 :下一步: -STR_3211 :地图大小: +STR_3209 :上一步: +STR_3210 :下一步: +STR_3211 :地图大小: STR_3212 :{POP16}{COMMA16} STR_3213 :不能再缩小地图 STR_3214 :不能再扩大地图 @@ -2274,45 +2274,45 @@ STR_3223 :将土地设置成为可供乐园购买 STR_3224 :将土地的建造权设置成为可供乐园购买 STR_3225 :设置是否在选中的位置中随机建造一些对象 STR_3226 :建造乐园入口 -STR_3227 :太多乐园入口! +STR_3227 :太多乐园入口! STR_3228 :设置游客的开始步行位置 STR_3229 :区域煞车不能建造在车站之后 STR_3230 :区域煞车不能建造在另一个区域煞车之后 STR_3231 :区域煞车不能建造在这个提升坡的顶部之后 -STR_3232 :选项 - 财政 -STR_3233 :选项 - 游客 -STR_3234 :选项 - 乐园 +STR_3232 :选项——财政 +STR_3233 :选项——游客 +STR_3234 :选项——乐园 STR_3235 :显示财政选项 STR_3236 :显示游客选项 STR_3237 :显示乐园选项 STR_3238 :无金钱限制 STR_3239 :将这个乐园设置为无金钱限制的乐园 -STR_3240 :{WINDOW_COLOUR_2}初始现金: -STR_3241 :{WINDOW_COLOUR_2}初始贷款额: -STR_3242 :{WINDOW_COLOUR_2}最高贷款额: -STR_3243 :{WINDOW_COLOUR_2}贷款年利率: +STR_3240 :{WINDOW_COLOUR_2}初始现金: +STR_3241 :{WINDOW_COLOUR_2}初始贷款额: +STR_3242 :{WINDOW_COLOUR_2}最高贷款额: +STR_3243 :{WINDOW_COLOUR_2}贷款年利率: STR_3244 :禁止营销计划 STR_3245 :禁止推销,推广计划以及其他营销计划 STR_3246 :{WINDOW_COLOUR_2}{CURRENCY} STR_3247 :{WINDOW_COLOUR_2}{COMMA16}% -STR_3248 :不能再增加初始现金! -STR_3249 :不能再减少初始现金! -STR_3250 :不能再增加初始贷款额! -STR_3251 :不能再减少初始贷款额! -STR_3252 :不能再增加最高贷款额! -STR_3253 :不能再减少最高贷款额! -STR_3254 :不能再增加贷款利率! -STR_3255 :不能再减少贷款利率! +STR_3248 :不能再增加初始现金! +STR_3249 :不能再减少初始现金! +STR_3250 :不能再增加初始贷款额! +STR_3251 :不能再减少初始贷款额! +STR_3252 :不能再增加最高贷款额! +STR_3253 :不能再减少最高贷款额! +STR_3254 :不能再增加贷款利率! +STR_3255 :不能再减少贷款利率! STR_3256 :游客喜欢较温和的游乐设施 STR_3257 :选择普遍游客是否只喜欢较温和的游乐设施 STR_3258 :游客喜欢较刺激的游乐设施 STR_3259 :选择普遍游客是否只喜欢较刺激的游乐设施 -STR_3260 :{WINDOW_COLOUR_2}游客身上现金 (平均值): -STR_3261 :{WINDOW_COLOUR_2}游客初始快乐度: -STR_3262 :{WINDOW_COLOUR_2}游客初始饥饿度: -STR_3263 :{WINDOW_COLOUR_2}游客初始口渴度: -STR_3264 :不能再增加这个选项! -STR_3265 :不能再减少这个选项! +STR_3260 :{WINDOW_COLOUR_2}游客身上现金(平均值): +STR_3261 :{WINDOW_COLOUR_2}游客初始快乐度: +STR_3262 :{WINDOW_COLOUR_2}游客初始饥饿度: +STR_3263 :{WINDOW_COLOUR_2}游客初始口渴度: +STR_3264 :不能再增加这个选项! +STR_3265 :不能再减少这个选项! STR_3266 :选择这个乐园的收费策略 STR_3267 :禁止移除树木 STR_3268 :禁止移除高壮的树木 @@ -2324,19 +2324,19 @@ STR_3273 :较高难度的乐园评价公式 STR_3274 :使增加乐园评价更具挑战性 STR_3275 :较难生成游客 STR_3276 :使吸引游客更具挑战性 -STR_3277 :{WINDOW_COLOUR_2}购买土地的费用: -STR_3278 :{WINDOW_COLOUR_2}购买建造权利的费用: +STR_3277 :{WINDOW_COLOUR_2}购买土地的费用: +STR_3278 :{WINDOW_COLOUR_2}购买建造权利的费用: STR_3279 :免费进入乐园 / 需费乘搭游乐设施 STR_3280 :需费进入乐园 / 免费乘搭游乐设施 -STR_3281 :{WINDOW_COLOUR_2}乐园门票价格: +STR_3281 :{WINDOW_COLOUR_2}乐园门票价格: STR_3282 :选择目标及乐园名称 STR_3283 :选择要保留的游乐设施/店铺 STR_3284 :选取目标 STR_3285 :保留游乐设施/店铺 STR_3286 :选择此剧情的目标 -STR_3287 :{WINDOW_COLOUR_2}目标: +STR_3287 :{WINDOW_COLOUR_2}目标: STR_3288 :选择气候 -STR_3289 :{WINDOW_COLOUR_2}气候: +STR_3289 :{WINDOW_COLOUR_2}气候: STR_3290 :又冷又潮湿 STR_3291 :温暖 STR_3292 :又热又干燥 @@ -2345,45 +2345,45 @@ STR_3294 :更改… STR_3295 :更改乐园名称 STR_3296 :更改剧情名称 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_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_3305 :{WINDOW_COLOUR_2}每月收入: -STR_3306 :{WINDOW_COLOUR_2}每月利润: -STR_3307 :{WINDOW_COLOUR_2}最少长度: -STR_3308 :{WINDOW_COLOUR_2}兴奋度: +STR_3303 :{WINDOW_COLOUR_2}游客数量: +STR_3304 :{WINDOW_COLOUR_2}乐园评价: +STR_3305 :{WINDOW_COLOUR_2}每月收入: +STR_3306 :{WINDOW_COLOUR_2}每月利润: +STR_3307 :{WINDOW_COLOUR_2}最少长度: +STR_3308 :{WINDOW_COLOUR_2}兴奋度: STR_3309 :{WINDOW_COLOUR_2}{COMMA16} STR_3310 :{WINDOW_COLOUR_2}{LENGTH} STR_3311 :{WINDOW_COLOUR_2}{COMMA2DP32} -STR_3312 :{WINDOW_COLOUR_2}请选取要保留的游乐设施/店铺: +STR_3312 :{WINDOW_COLOUR_2}请选取要保留的游乐设施/店铺: STR_3313 :剧情命名 -STR_3314 :请输入这个剧情的名称: +STR_3314 :请输入这个剧情的名称: STR_3315 :乐园/剧情的简介 -STR_3316 :请输入这个乐园/剧情的简介: +STR_3316 :请输入这个乐园/剧情的简介: STR_3317 :暂无简介 STR_3318 :选择这个剧情要在哪个组别中显示 -STR_3319 :{WINDOW_COLOUR_2}剧情组别: +STR_3319 :{WINDOW_COLOUR_2}剧情组别: STR_3320 :无法存储剧情文件… STR_3321 :成功安装新对象 -STR_3322 :{WINDOW_COLOUR_2}目标: {BLACK}{STRINGID} -STR_3326 :{WINDOW_COLOUR_2}(暂无图片) +STR_3322 :{WINDOW_COLOUR_2}目标:{BLACK}{STRINGID} +STR_3326 :{WINDOW_COLOUR_2}(暂无图片) STR_3327 :尚未设置游客的开始步行位置 STR_3328 :不能进行下一步编辑… STR_3329 :尚未建造乐园入口 STR_3330 :乐园必需有一些己拥有的土地 -STR_3331 :由地图边缘到乐园入口的道路尚未连接好,或者太复杂 - 这些道路必需是一格宽度,并以越少交界及弯位越好 +STR_3331 :由地图边缘到乐园入口的道路尚未连接好,或者太复杂——这些道路必需是一格宽度,并以越少交界及弯位越好 STR_3332 :乐园入口倒转了,或没有道路连接至地图边缘 STR_3333 :在存档中导出附加物 STR_3334 :选择是否存储插件的储存文件,以便那些没有插件的玩家载入存档 -STR_3335 :轨道设计工具 - 选择游乐设施的类型及车辆种类 -STR_3336 :轨道设计管理工具 - 选择游乐设施的类型 -STR_3338 :{BLACK}自定义布局 -STR_3339 :{BLACK}{COMMA16} 预设设计 或者 自定布局 -STR_3340 :{BLACK}{COMMA16} 预设设计 或者 自定布局 +STR_3335 :轨道设计工具——选择游乐设施的类型及车辆种类 +STR_3336 :轨道设计管理工具——选择游乐设施的类型 +STR_3338 :{BLACK}自定义设计 +STR_3339 :{BLACK}{COMMA16}个预设设计,也可自定义设计 +STR_3340 :{BLACK}{COMMA16}个预设设计,也可自定义设计 STR_3341 :游戏工具 STR_3342 :剧情编辑器 STR_3343 :将游戏存档转换成剧情关 @@ -2394,17 +2394,17 @@ STR_3347 :游乐设施过于庞大,包含太多要素或者景物过于分 STR_3348 :重命名 STR_3349 :删除 STR_3350 :轨道设计命名 -STR_3351 :请输入此轨道设计的新名称: +STR_3351 :请输入此轨道设计的新名称: STR_3352 :不能重命名此轨道设计… STR_3353 :新名称包含不可用的字符 STR_3354 :已有相同名称的文件,或文件有写入保护 STR_3355 :文件有写入保护或被锁定 STR_3356 :删除文件 -STR_3357 :{WINDOW_COLOUR_2}你确定要永久删除{STRING} ? +STR_3357 :{WINDOW_COLOUR_2}你确定要永久删除{STRING}? STR_3358 :无法删除轨道设计… STR_3359 :{BLACK}该设施没有已设计好的轨道设计 -STR_3360 :警告! -STR_3361 :该设施有太多设计-列表不会完全列出 +STR_3360 :警告! +STR_3361 :该设施有太多设计——列表不会完全列出 STR_3364 :进阶 STR_3365 :在选择景物类别之外,允许选择单项景物 STR_3366 :{BLACK}= 游乐设施 @@ -2415,7 +2415,7 @@ STR_3370 :{BLACK}= 信息亭 STR_3371 :{BLACK}= 急救室 STR_3372 :{BLACK}= 取款机 STR_3373 :{BLACK}= 厕所 -STR_3374 :警告: 选取了太多对象! +STR_3374 :警告:选取了太多对象! STR_3375 :不是在此景观组别中的所有对象都能够选取 STR_3376 :安装新的… STR_3377 :安装新的轨道设计文件 @@ -2425,7 +2425,7 @@ STR_3380 :无法安装这个轨道设计 STR_3381 :不兼容的文件或含有非法数据 STR_3382 :复制文件失败 STR_3383 :输入这个轨道设计的新名称 -STR_3384 :已有相同名称的轨道设计 - 请输入这个轨道设计的新名称: +STR_3384 :已有相同名称的轨道设计——请输入这个轨道设计的新名称: STR_3389 :无法选择额外的景观对象… STR_3390 :选取了太多对象 STR_3437 :在地形中清理大范围内的景物 @@ -2434,10 +2434,10 @@ STR_3439 :移除景物 STR_3445 :设置巡逻范围 STR_3446 :取消巡逻范围 -# New strings,cleaner +# New strings, cleaner STR_5120 :财务 STR_5121 :研发 -STR_5122 :根据轨道类型选择游乐设施 (像RCT1一样) +STR_5122 :根据轨道类型选择游乐设施(像RCT1一样) STR_5123 :翻新游乐设施 STR_5125 :全可拆除 STR_5126 :随机主题音乐 @@ -2470,14 +2470,14 @@ STR_5152 :. STR_5153 :编辑配色主题… STR_5154 :使用硬件渲染 STR_5155 :允许测试未完成的轨道设计 -STR_5156 :允许测试大多数轨道设计,即使那些轨道未完成的设计. 但这不适用于区域刹车模式 +STR_5156 :允许测试大多数轨道设计,即使那些轨道未完成的设计。但这不适用于区域刹车模式。 STR_5158 :回到主菜单 STR_5159 :退出OpenRCT2 STR_5160 :{POP16}{MONTH} {PUSH16}{PUSH16}{STRINGID},{POP16}第{COMMA16}年 -STR_5161 :日期格式: +STR_5161 :日期格式: STR_5162 :日/月/年 STR_5163 :月/日/年 -STR_5177 :显示模式: +STR_5177 :显示模式: STR_5178 :显示财务秘籍 STR_5179 :显示游客秘籍 STR_5180 :显示乐园秘籍 @@ -2538,7 +2538,7 @@ STR_5234 :提示 STR_5235 :设置 STR_5236 :窗口 STR_5237 :调色板 -STR_5238 :当前主题: +STR_5238 :当前主题: STR_5239 :复制 STR_5240 :请输入该主题的名称 STR_5241 :不能更改主题 @@ -2599,11 +2599,11 @@ STR_5300 :快速解雇员工 STR_5301 :清除你的贷款 STR_5302 :清除贷款 STR_5303 :允许在暂停模式下继续建造 -STR_5304 :主菜单动画: -STR_5305 :过山车大亨1(RCT1) -STR_5306 :过山车大亨1 (+资料片1——AA) -STR_5307 :过山车大亨1 (+资料片1&2——AA+LL) -STR_5308 :过山车大亨2(RCT2) +STR_5304 :主菜单动画: +STR_5305 :过山车大亨1(RCT1) +STR_5306 :过山车大亨1(+资料片1——AA) +STR_5307 :过山车大亨1(+资料片1&2——AA+LL) +STR_5308 :过山车大亨2(RCT2) STR_5309 :OpenRCT2 STR_5310 :随机 STR_5311 :调试工具 @@ -2625,35 +2625,34 @@ STR_5348 :设施秘籍 STR_5349 :全部游乐设施 STR_5350 :最大 STR_5351 :最小 -STR_5352 :{BLACK}兴奋度: -STR_5353 :{BLACK}活力度: -STR_5354 :{BLACK}饥饿度: -STR_5355 :{BLACK}口渴度: -STR_5356 :{BLACK}恶心度: -STR_5357 :{BLACK}恶心耐受度: -STR_5358 :{BLACK}如厕度: +STR_5352 :{BLACK}快乐度: +STR_5353 :{BLACK}体力值: +STR_5354 :{BLACK}饥饿度: +STR_5355 :{BLACK}口渴度: +STR_5356 :{BLACK}恶心度: +STR_5357 :{BLACK}恶心耐受度: +STR_5358 :{BLACK}如厕度: STR_5359 :移除游客 STR_5360 :移除地图上的所有游客 -STR_5361 :给所有游客: -STR_5362 :{BLACK}设置所有客人的首选乘坐强度: +STR_5361 :给所有游客: +STR_5362 :{BLACK}设置所有客人的首选乘坐强度: STR_5363 :大于 1 STR_5364 :小于 15 -STR_5365 :{BLACK}雇员速度: +STR_5365 :{BLACK}员工速度: STR_5366 :正常 STR_5367 :快速 STR_5368 :复位故障状态 STR_5371 :选取对象 STR_5372 :拖拽时反转鼠标右键 -STR_5373 :名称 {STRINGID} -STR_5374 :日期 {STRINGID} +STR_5373 :名称{STRINGID} +STR_5374 :日期{STRINGID} STR_5375 :▲ STR_5376 :▼ STR_5404 :名称已被使用 STR_5440 :当焦点失去时最小化全屏幕的游戏 -STR_5441 :根据轨道类型区分游乐设施{NEWLINE}使得车辆类型可以在建造后更改{NEWLINE}(过山车大亨1行为). -STR_5442 :强制乐园评价: -STR_5447 :类型 {STRINGID} -STR_5448 :游乐设施/车辆 {STRINGID} +STR_5442 :强制乐园评价: +STR_5447 :类型{STRINGID} +STR_5448 :游乐设施/车辆{STRINGID} STR_5449 :减慢游戏速度 STR_5450 :加快游戏速度 STR_5451 :打开作弊窗口 @@ -2671,7 +2670,7 @@ STR_5462 :{CURRENCY} STR_5463 :目标:尽情玩吧! STR_5464 :一般 STR_5465 :天气 -STR_5466 :雇员 +STR_5466 :员工 STR_5467 :ALT + STR_5468 :最近消息 STR_5469 :向上滚动地图 @@ -2680,16 +2679,16 @@ STR_5471 :向下滚动地图 STR_5472 :向右滚动地图 STR_5473 :日夜循环 STR_5474 :横幅上显示全大写英文 -STR_5475 :{COMMA16} 周 +STR_5475 :{COMMA16}周 STR_5476 :硬件 STR_5477 :地图显示 STR_5478 :控制 STR_5479 :工具条 -STR_5480 :显示工具条按钮: +STR_5480 :显示工具条按钮: STR_5481 :主题 -STR_5482 :{WINDOW_COLOUR_2}上次检查时间: {BLACK} 1分钟前 -STR_5483 :{BLACK}(还剩{COMMA16}周结束) -STR_5484 :{BLACK}(还剩{COMMA16}周结束) +STR_5482 :{WINDOW_COLOUR_2}上次检查时间:{BLACK}1分钟前 +STR_5483 :{BLACK}(还剩{COMMA16}周结束) +STR_5484 :{BLACK}(还剩{COMMA16}周结束) STR_5485 :{STRING} STR_5486 :{BLACK}{COMMA16} STR_5487 :显示最近消息 @@ -2700,21 +2699,21 @@ STR_5492 :剧情选项 STR_5493 :发送信息 STR_5495 :玩家列表 STR_5496 :玩家 -STR_5497 :延迟值(Ping) +STR_5497 :延迟值(Ping) STR_5498 :服务器列表 -STR_5499 :玩家名称: +STR_5499 :玩家名称: STR_5500 :新增服务器 STR_5501 :开设服务器 STR_5502 :多人联机模式 -STR_5503 :请输入主机名称或IP地址: +STR_5503 :请输入主机名称或IP地址: STR_5504 :显示多人联机状态 -STR_5505 :无法连接至服务器. +STR_5505 :无法连接至服务器。 STR_5506 :游客忽略强烈程度 STR_5510 :默认音频设备 -STR_5511 :(UNKNOWN) -STR_5512 :另存游戏 -STR_5513 :(快速)保存游戏 -STR_5514 :禁止故意破坏 +STR_5511 :(UNKNOWN) +STR_5512 :游戏另存为 +STR_5513 :(快速)保存游戏 +STR_5514 :禁止蓄意毁坏 STR_5515 :游客愤怒时阻止其可以毁坏公物 STR_5516 :黑色 STR_5517 :灰色 @@ -2752,37 +2751,37 @@ STR_5548 :显示所有运行模式 STR_5549 :年/月/日 STR_5550 :{POP16}{POP16}第{COMMA16}年,{PUSH16}{PUSH16}{MONTH} {PUSH16}{PUSH16}{STRINGID} STR_5551 :年/日/月 -STR_5552 :{POP16}{POP16}第{COMMA16}年, {PUSH16}{PUSH16}{PUSH16}{STRINGID} {MONTH} +STR_5552 :{POP16}{POP16}第{COMMA16}年,{PUSH16}{PUSH16}{PUSH16}{STRINGID} {MONTH} STR_5553 :当Steam overlay打开时暂停游戏 STR_5554 :启用山丘工具 STR_5555 :显示来自其他类型轨道的车辆种类 STR_5556 :踢除玩家 STR_5557 :多人游戏不同步时依然保持联机 STR_5558 :此设定会于重启游戏后生效 -STR_5559 :检查时间间隔为10分钟 -STR_5560 :将所有游乐设施的检查时间间隔设定为‘每10分钟’ +STR_5559 :检查间隔为10分钟 +STR_5560 :将所有游乐设施的检查时间间隔设定为“每10分钟” STR_5561 :加载语言失败 STR_5562 :警告! -STR_5563 :此功能暂未稳定地使用,请多加留意. -STR_5566 :密码: -STR_5567 :广告 +STR_5563 :此功能暂未稳定地使用,请多加留意。 +STR_5566 :密码: +STR_5567 :对外广播 STR_5568 :需要密码 STR_5569 :此服务器需要密码 STR_5570 :获取服务器 STR_5571 :加入游戏 STR_5572 :添加至收藏 STR_5573 :从收藏中去除 -STR_5574 :服务器名称: -STR_5575 :最大人数: -STR_5576 :端口: -STR_5577 :韩元 (W) -STR_5578 :卢布 (₽) -STR_5579 :窗口缩放比例: -STR_5580 :捷克克朗 (Kč) +STR_5574 :服务器名称: +STR_5575 :最大人数: +STR_5576 :端口: +STR_5577 :韩元 (W) +STR_5578 :卢布 (₽) +STR_5579 :窗口缩放比例: +STR_5580 :捷克克朗 (Kč) STR_5581 :显示帧数 STR_5582 :限制鼠标指针仅在窗口内移动 -STR_5583 :{COMMA1DP16}m/s -STR_5584 :SI +STR_5583 :{COMMA1DP16}米每秒 +STR_5584 :国际单位制 STR_5585 :移除游乐设施的运行限制,例如允许链条上拉速度高达{VELOCITY} STR_5586 :自动开放商店和摊位 STR_5587 :商店和摊位将在建造好后自动开放 @@ -2807,24 +2806,24 @@ STR_5606 :游客已死亡 STR_5607 :强制移除选中的地图元素。 STR_5608 :BH STR_5609 :CH -STR_5610 :移除选中的地图元素. 使用时请注意. 因为强制移除地图元素并不会对游戏中的现金做成影响. +STR_5610 :移除选中的地图元素。使用时请注意,因为强制移除地图元素并不会对游戏中的现金做成影响。 STR_5611 :G STR_5612 :鬼旗 STR_5613 :B STR_5614 :损坏标记 STR_5615 :L STR_5616 :网格标记的最后一个元素 -STR_5617 :将选中的元素移至上方. -STR_5618 :将选中的元素移至下方. +STR_5617 :将选中的元素移至上方。 +STR_5618 :将选中的元素移至下方。 STR_5619 :过山车大亨 -STR_5620 :过山车大亨:快乐天地 -STR_5621 :过山车大亨:极限反转 +STR_5620 :过山车大亨:{NEWLINE}快乐天地 +STR_5621 :过山车大亨:{NEWLINE}极限反转 STR_5622 :过山车大亨2 -STR_5623 :过山车大亨2:异国风情 -STR_5624 :过山车大亨2:欢乐时光 +STR_5623 :过山车大亨2:{NEWLINE}异国风情 +STR_5624 :过山车大亨2:{NEWLINE}欢乐时光 STR_5625 :“真实的”游乐园 STR_5626 :其他游乐园 -STR_5627 :剧情列表排序方法: +STR_5627 :剧情列表排序方法: STR_5628 :游戏出处 STR_5629 :困难度 STR_5630 :允许逐步解锁 @@ -2832,13 +2831,13 @@ STR_5631 :原版DLC游乐园 STR_5632 :修建你自己的… STR_5633 :CMD + STR_5634 :OPTION + -STR_5635 :{WINDOW_COLOUR_2}花费: {BLACK}{CURRENCY2DP} -STR_5636 :{WINDOW_COLOUR_2}命令运行: {BLACK}{COMMA16} +STR_5635 :{WINDOW_COLOUR_2}花费:{BLACK}{CURRENCY2DP} +STR_5636 :{WINDOW_COLOUR_2}命令运行:{BLACK}{COMMA16} STR_5637 :不能做此行为… STR_5638 :权限不够 STR_5639 :显示玩家列表 STR_5640 :组管理 -STR_5641 :默认组: +STR_5641 :默认组: STR_5642 :组 STR_5643 :添加组 STR_5644 :删除组 @@ -2864,7 +2863,7 @@ STR_5663 :清除景物 STR_5664 :作弊 STR_5665 :切换风景群集 STR_5666 :无密码登录 -STR_5701 :{WINDOW_COLOUR_2}最近的行为: {BLACK}{STRINGID} +STR_5701 :{WINDOW_COLOUR_2}最近的行为:{BLACK}{STRINGID} STR_5702 :定位玩家最近的动作 STR_5703 :不能踢出创建者 STR_5704 :最近的行为 @@ -2874,53 +2873,53 @@ STR_5707 :不能修改此组 STR_5708 :不能改变创建者所在的组 STR_5709 :重命名组 STR_5710 :组名 -STR_5711 :请输入该组的新名称: +STR_5711 :请输入该组的新名称: STR_5712 :不能修改你没有的权限 STR_5713 :踢出玩家 STR_5714 :显示设置窗口 STR_5715 :新游戏 STR_5716 :不能在多人模式中使用 # For identifying client network version in server list window -STR_5717 :网络版本: {STRING} -STR_5718 :网络版本: {STRING} +STR_5717 :网络版本:{STRING} +STR_5718 :网络版本:{STRING} STR_5719 :晴天 STR_5720 :多云间晴 STR_5721 :多云 STR_5722 :下雨 STR_5723 :大雨 STR_5724 :大雷雨 -STR_5725 :{BLACK}强制设定天气为: +STR_5725 :{BLACK}强制设定天气为: STR_5726 :设定游乐园当前的天气 # tooltip for tab in options window STR_5734 :渲染 STR_5735 :网络状态 STR_5736 :玩家 -STR_5737 :已关闭,{COMMA16} 个游客仍在此游乐设施上 -STR_5738 :已关闭,{COMMA16} 个游客仍在此游乐设施上 -STR_5739 :{WINDOW_COLOUR_2}此游乐设施上的游客: {BLACK}{COMMA16} +STR_5737 :已关闭,{COMMA16}个游客仍在此游乐设施上 +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} +STR_5747 :已断线:{STRING} STR_5748 :已被踢出 -STR_5749 :请离开当前服务器! +STR_5749 :请离开当前服务器! STR_5750 :连接已关闭 STR_5751 :接收不到任何数据 -STR_5752 :{OUTLINE}{RED}{STRING} 已离开游戏 -STR_5753 :{OUTLINE}{RED}{STRING} 已离开游戏 ({STRING}) +STR_5752 :{OUTLINE}{RED}{STRING}已离开游戏 +STR_5753 :{OUTLINE}{RED}{STRING}已离开游戏({STRING}) STR_5754 :玩家命名错误 -STR_5755 :不正确的游戏版本 (服务器版本为 {STRING}) +STR_5755 :不正确的游戏版本(服务器版本为{STRING}) STR_5756 :密码错误 STR_5757 :服务器人数已满 -STR_5758 :{OUTLINE}{GREEN}{STRING} 已加入游戏 -STR_5759 :下载地图中 … ({INT32} / {INT32}) KB -STR_5760 :港币 (HK$) -STR_5761 :新台币 (NT$) -STR_5762 :人民币 (CN¥) +STR_5758 :{OUTLINE}{GREEN}{STRING}已加入游戏 +STR_5759 :下载地图中 …({INT32} / {INT32})KB +STR_5760 :港币(HK$) +STR_5761 :新台币(NT$) +STR_5762 :人民币(CN¥) STR_5763 :所有文件 STR_5764 :不正确的游乐设施类型 STR_5765 :无法修改类型不正确的游乐设施 @@ -2931,24 +2930,24 @@ STR_5769 :总利润 STR_5770 :每小时游客数 STR_5771 :运营成本 STR_5772 :年龄 -STR_5773 :总游客数: {COMMA32} -STR_5774 :总利润: {CURRENCY2DP} -STR_5775 :游客数: {COMMA32} 每小时 -STR_5776 :建成年份: 今年 -STR_5777 :建成年份: 去年 -STR_5778 :建成年份: {COMMA16} 年前 -STR_5779 :收入: {CURRENCY2DP} 每小时 -STR_5780 :运营成本: {CURRENCY2DP} 每小时 -STR_5781 :运营成本: 未知 -STR_5782 :你已经连接到服务器. 请按 ‘{STRING}’ 开始聊天. +STR_5773 :总游客数:{COMMA32} +STR_5774 :总利润:{CURRENCY2DP} +STR_5775 :游客数:{COMMA32}每小时 +STR_5776 :建成年份:今年 +STR_5777 :建成年份:去年 +STR_5778 :建成年份:{COMMA16}年前 +STR_5779 :收入:{CURRENCY2DP}每小时 +STR_5780 :运营成本:{CURRENCY2DP}每小时 +STR_5781 :运营成本:未知 +STR_5782 :你已经连接到服务器,请按“{STRING}”开始聊天。 STR_5783 :{WINDOW_COLOUR_2}剧情未解锁 -STR_5784 :{BLACK}完成稍早的剧情来解锁此剧情. +STR_5784 :{BLACK}完成稍早的剧情来解锁此剧情。 STR_5785 :不能重命名组… STR_5786 :不正确的组名称 -STR_5787 :{COMMA32} 玩家在线 -STR_5788 :默认检查的时间间隔: +STR_5787 :{COMMA32}玩家在线 +STR_5788 :默认检查的时间间隔: STR_5789 :禁用光影效果 -STR_5790 :切换RCT1式的收费{NEWLINE}(例如同时收取游乐设施及入园门票费用) +STR_5790 :切换RCT1式的收费{NEWLINE}(例如同时收取游乐设施及入园门票费用) STR_5791 :设定所有游乐设施的可靠度为100%{NEWLINE}并重设他们的落成年份为“今年” STR_5792 :修理所有已有故障的游乐设施 STR_5793 :重设指定游乐设施的故障记录,{NEWLINE}令游客不觉得该设施不安全 @@ -2965,9 +2964,9 @@ STR_5803 :旋转选中的地图元素 STR_5804 :静音 STR_5805 :若选中此选项,你的服务器将会添加至{NEWLINE}公共服务区列表,所有玩家均可以找到它 STR_5806 :切换窗口模式 -STR_5807 :{WINDOW_COLOUR_2}游乐设施数量: {BLACK}{COMMA16} -STR_5808 :{WINDOW_COLOUR_2}商店及摊贩数量: {BLACK}{COMMA16} -STR_5809 :{WINDOW_COLOUR_2}信息亭及其他设施数量: {BLACK}{COMMA16} +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_5812 :显示多人模式窗口 @@ -2976,35 +2975,35 @@ STR_5814 :{WINDOW_COLOUR_1}“{STRING}” #tooltips STR_5815 :游戏内显示FPS帧数 -STR_5816 :设置比例去缩放游戏.{NEWLINE}高分辨率时很有用 +STR_5816 :设置比例去缩放游戏。{NEWLINE}高分辨率时很有用 STR_5819 :[需要开启硬件渲染]{NEWLINE}暂停游戏当游戏内{NEWLINE}Steam overlay打开时 STR_5820 :全屏模式时若游戏失焦{NEWLINE}则最小化游戏 -STR_5822 :日夜循环.{NEWLINE}完成一个循环花费游戏内一个月时间 -STR_5823 :横幅上显示全大写英文(RCT1效果) +STR_5822 :日夜循环。{NEWLINE}完成一个循环花费游戏内一个月时间 +STR_5823 :横幅上显示全大写英文(RCT1效果) STR_5824 :当暴风雨来临时{NEWLINE}禁用闪电效果 STR_5825 :在窗口内保持鼠标指针 STR_5826 :拖拽视野时时反转鼠标右键 STR_5827 :设置游戏界面使用的配色主题 -STR_5828 :修改距离,速度等度量单位. -STR_5829 :修改游戏使用的货币. 只是纯视觉效果并没有根据汇率换算 +STR_5828 :修改距离,速度等度量单位。 +STR_5829 :修改游戏使用的货币。只是纯视觉效果并没有根据汇率换算 STR_5830 :修改游戏使用的语言 STR_5831 :修改温度显示的单位 STR_5832 :高度用通用单位替换“距离和速度单位”中设置的单位 STR_5833 :修改日期格式 STR_5834 :选择OpenRCT2使用的音频设备 STR_5835 :当游戏窗口失去焦点时静音 -STR_5836 :选择主菜单使用的音乐.{NEWLINE}若选择过山车大亨1的主题,则需要在杂项选项卡中设定过山车大亨1的路径. +STR_5836 :选择主菜单使用的音乐。{NEWLINE}若选择过山车大亨1的主题,则需要在高级选项卡中设定过山车大亨1的路径。 STR_5837 :创建并管理自定义游戏界面配色主题 STR_5838 :在工具栏上为财务窗口显示一个单独的按钮 STR_5839 :在工具栏上为研发窗口显示一个单独的按钮 STR_5840 :在工具栏上为作弊窗口显示一个单独的按钮 STR_5841 :在工具栏上为最近消息窗口显示一个单独的按钮 -STR_5842 :对剧情排序是根据困难度(过山车大亨2特色)还是游戏出处(过山车大亨1特色) -STR_5843 :允许剧情逐步解锁 (过山车大亨1特色) +STR_5842 :对剧情排序是根据困难度(过山车大亨2特色)还是游戏出处(过山车大亨1特色) +STR_5843 :允许剧情逐步解锁(过山车大亨1特色) STR_5844 :即使发生不同步或错误{NEWLINE}依然保持和多人服务器的连接 -STR_5845 :在工具栏上为调试工具增加一个按钮.{NEWLINE}允许在调试控制台使用快捷键 +STR_5845 :在工具栏上为调试工具增加一个按钮。{NEWLINE}允许在调试控制台使用快捷键 STR_5846 :设置自动保存的频率 -STR_5847 :选择主菜单界面使用的游乐园动画. 过山车大亨1/2的主菜单动画需要导入响应的文件 +STR_5847 :选择主菜单界面使用的游乐园动画。过山车大亨1/2的主菜单动画需要导入响应的文件 STR_5849 :自动放置新雇佣的员工 STR_5851 :设置新建游乐设施的默认检查的时间间隔 STR_5853 :开启/关闭音效 @@ -3012,35 +3011,35 @@ STR_5854 :开启/关闭游乐设施音乐 STR_5855 :设置全屏,窗口或无边框窗口显示 STR_5856 :全屏模式时设置游戏分辨率 STR_5857 :游戏选项 -STR_5858 :使用GPU代替CPU渲染画面. 提高截屏软件的兼容性. 可能会轻微降低游戏性能. -STR_5859 :启用补帧从而平滑游戏表现. {NEWLINE}当禁用时,{NEWLINE}游戏帧数会稳定在40 FPS. +STR_5858 :使用GPU代替CPU渲染画面。提高截屏软件的兼容性。可能会轻微降低游戏性能。 +STR_5859 :启用补帧从而平滑游戏表现。{NEWLINE}当禁用时,{NEWLINE}游戏帧数会稳定在40 FPS。 STR_5860 :开启原版/反编译版本的轨道绘图模式 -STR_5861 :密码验证失败. -STR_5862 :阻止未知玩家进入. -STR_5863 :只允许拥有已知密码的用户加入. -STR_5864 :本服务器只允许白名单用户连接. +STR_5861 :密码验证失败。 +STR_5862 :阻止未知玩家进入。 +STR_5863 :只允许拥有已知密码的用户加入。 +STR_5864 :本服务器只允许白名单用户连接。 STR_5865 :保存聊天记录 -STR_5866 :保存所有聊天记录到本地文件. -STR_5867 :{WINDOW_COLOUR_2}服务器提供者姓名: {BLACK}{STRING} -STR_5868 :{WINDOW_COLOUR_2}服务器提供者E-mail: {BLACK}{STRING} -STR_5869 :{WINDOW_COLOUR_2}服务器提供者网站: {BLACK}{STRING} +STR_5866 :保存所有聊天记录到本地文件。 +STR_5867 :{WINDOW_COLOUR_2}服务器提供者的姓名:{BLACK}{STRING} +STR_5868 :{WINDOW_COLOUR_2}服务器提供者的E-mail:{BLACK}{STRING} +STR_5869 :{WINDOW_COLOUR_2}服务器提供者的网站:{BLACK}{STRING} STR_5870 :显示服务器信息 -STR_5871 :植物不会枯萎. -STR_5872 :禁用植物随时间变化以便它们不会枯萎. +STR_5871 :植物不会枯萎。 +STR_5872 :禁用植物随时间变化以便它们不会枯萎 STR_5873 :允许在所有轨道配置中使用链式牵引 STR_5874 :允许将任何轨道变成链式牵引轨道 -STR_5875 :渲染引擎: -STR_5876 :渲染游戏图像的引擎. +STR_5875 :渲染引擎: +STR_5876 :渲染游戏图像的引擎。 STR_5877 :软件渲染 -STR_5878 :软件渲染(硬件显示) -STR_5879 :OpenGL(实验性质) +STR_5878 :软件渲染(硬件显示) +STR_5879 :OpenGL(实验性质) STR_5880 :只显示选中的物体 STR_5881 :只显示未被选中的物体 STR_5882 :自定义货币 STR_5883 :自定义货币选项 -STR_5884 :{WINDOW_COLOUR_2}汇率: -STR_5885 :{WINDOW_COLOUR_2}等价于英镑(£){COMMA32} -STR_5886 :{WINDOW_COLOUR_2}货币符号: +STR_5884 :{WINDOW_COLOUR_2}汇率: +STR_5885 :{WINDOW_COLOUR_2}等价于英镑(£){COMMA32} +STR_5886 :{WINDOW_COLOUR_2}货币符号: STR_5887 :前缀 STR_5888 :后缀 STR_5889 :自定义货币符号 @@ -3050,8 +3049,8 @@ STR_5892 :前往默认文件夹 STR_5893 :汇率 STR_5894 :请输入汇率 STR_5895 :保存轨道设计 -STR_5896 :保存轨道设计失败! -STR_5898 :{BLACK}无法加载轨道,文件可能{NEWLINE}损坏或丢失! +STR_5896 :保存轨道设计失败! +STR_5898 :{BLACK}无法加载轨道,文件可能{NEWLINE}损坏或丢失! STR_5899 :开启/关闭debug窗口 STR_5900 :使用原始的渲染代码 STR_5901 :显示分段高度 @@ -3060,12 +3059,12 @@ STR_5903 :显示debug窗口 STR_5904 :重置日期 STR_5905 :一个能自动创建自定义地形的地图生成工具 STR_5906 :放大到鼠标所在位置 -STR_5907 :启用时将会以鼠标所在位置为中心进行放大,而非屏幕中心. +STR_5907 :启用时将会以鼠标所在位置为中心进行放大,而非屏幕中心。 STR_5908 :允许任意切换游乐设施类型 -STR_5909 :允许自由切换游乐设施类型. 可能导致游戏崩溃. +STR_5909 :允许自由切换游乐设施类型,可能导致游戏崩溃。 STR_5910 :应用 STR_5911 :半透明道路 -STR_5912 :开启/关闭‘半透明道路’选项 +STR_5912 :开启/关闭“半透明道路”选项 STR_5913 :聊天 STR_5914 :未知的游乐设施 STR_5915 :玩家 @@ -3074,7 +3073,7 @@ STR_5917 :{COMMA16}位玩家 STR_5918 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_5919 :{COMMA16} STR_5920 :渲染天气效果 -STR_5921 :启用后,雷暴中的雨和灰雾的滤镜会被渲染在画面中. +STR_5921 :启用后,雷暴中的雨和灰雾的滤镜会被渲染在画面中。 STR_5922 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}最多{STRINGID} STR_5923 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}每列车最多为{COMMA16} {STRINGID} STR_5924 :地面详情 @@ -3087,57 +3086,57 @@ STR_5930 :巨型景物详情 STR_5931 :横幅详情 STR_5932 :已毁坏元素详情 STR_5933 :属性 -STR_5934 :地型素材:{BLACK}{STRINGID} -STR_5935 :地型边缘:{BLACK}{STRINGID} -STR_5936 :土地拥有权:{BLACK}{STRINGID} +STR_5934 :地型素材:{BLACK}{STRINGID} +STR_5935 :地型边缘:{BLACK}{STRINGID} +STR_5936 :土地拥有权:{BLACK}{STRINGID} STR_5937 :未拥有且不可购买 -STR_5938 :水位:{BLACK}{COMMA16} +STR_5938 :水位:{BLACK}{COMMA16} STR_5939 :移除乐园边界 STR_5940 :还原乐园边界 -STR_5941 :地面高度: -STR_5942 :道路名称:{BLACK}{STRINGID} -STR_5943 :附加物品:{BLACK}{STRINGID} -STR_5944 :附加物品:{BLACK}暂无 -STR_5945 :已连接的边缘: -STR_5946 :游乐设施种类:{BLACK}{STRINGID} -STR_5947 :游乐设施ID:{BLACK}{COMMA16} -STR_5948 :游乐设施名称:{BLACK}{STRINGID} +STR_5941 :地面高度: +STR_5942 :道路名称:{BLACK}{STRINGID} +STR_5943 :附加物品:{BLACK}{STRINGID} +STR_5944 :附加物品:{BLACK}暂无 +STR_5945 :已连接的边缘: +STR_5946 :游乐设施种类:{BLACK}{STRINGID} +STR_5947 :游乐设施ID:{BLACK}{COMMA16} +STR_5948 :游乐设施名称:{BLACK}{STRINGID} STR_5949 :提升坡 STR_5950 :将改变应用于整个轨道组件中 -STR_5951 :轨道组件ID:{BLACK}{COMMA16} -STR_5952 :编号:{BLACK}{COMMA16} +STR_5951 :轨道组件ID:{BLACK}{COMMA16} +STR_5952 :编号:{BLACK}{COMMA16} STR_5953 :以底部高度排序目前网格上的地图元素 -STR_5954 :景物年龄:{BLACK}{COMMA16} -STR_5955 :四角放置:{BLACK}{STRINGID} +STR_5954 :景物年龄:{BLACK}{COMMA16} +STR_5955 :四角放置:{BLACK}{STRINGID} STR_5956 :西南 STR_5957 :西北 STR_5958 :东北 STR_5959 :东南 -STR_5960 :四角放置: -STR_5961 :入口编号:{BLACK}{COMMA16} -STR_5962 :碰撞检测: -STR_5963 :已升起的角: +STR_5960 :四角放置: +STR_5961 :入口编号:{BLACK}{COMMA16} +STR_5962 :碰撞检测: +STR_5963 :已升起的角: STR_5964 :斜角 -STR_5965 :入口类型:{BLACK}{STRINGID} -STR_5966 :游乐园入口部份:{BLACK}{STRINGID} +STR_5965 :入口类型:{BLACK}{STRINGID} +STR_5966 :游乐园入口部份:{BLACK}{STRINGID} STR_5967 :中间 STR_5968 :左 STR_5969 :右 -STR_5970 :入口编号:{BLACK}{COMMA16} -STR_5971 :出口编号:{BLACK}{COMMA16} -STR_5972 :游乐设施编号:{BLACK}{COMMA16} +STR_5970 :入口编号:{BLACK}{COMMA16} +STR_5971 :出口编号:{BLACK}{COMMA16} +STR_5972 :游乐设施编号:{BLACK}{COMMA16} STR_5973 :与下一地图元素并列 -STR_5974 :将此元素的基准和净高度与下一元素调整一致. 这可以让在网格上建造变得更加容易. -STR_5975 :坡道: +STR_5974 :将此元素的基准和净高度与下一元素调整一致,这可以让在网格上建造变得更加容易。 +STR_5975 :坡道: STR_5976 :平坦 STR_5977 :右边向上 STR_5978 :左边向上 -STR_5979 :围栏类型:{BLACK}{COMMA16} -STR_5980 :横幅文字:{BLACK}{STRINGID} +STR_5979 :围栏类型:{BLACK}{COMMA16} +STR_5980 :横幅文字:{BLACK}{STRINGID} STR_5981 :不是横幅 -STR_5982 :巨型景物类型:{BLACK}{COMMA16} -STR_5983 :巨型景物组件编号:{BLACK}{COMMA16} -STR_5984 :被挡住的道路: +STR_5982 :巨型景物类型:{BLACK}{COMMA16} +STR_5983 :巨型景物组件编号:{BLACK}{COMMA16} +STR_5984 :被挡住的道路: STR_5985 :新建文件夹 STR_5986 :请输入新文件夹的名字 STR_5987 :无法建立新文件夹 @@ -3154,8 +3153,8 @@ STR_5997 :增加/设置金钱 STR_5998 :增加金钱 STR_5999 :设置金钱 STR_6000 :请输入一个新的值 -STR_6001 :启用光照效果(实验性质) -STR_6002 :夜晚时路灯和游乐设施将会被点亮.{NEWLINE}此功能需要先开启硬件渲染. +STR_6001 :启用光照效果(实验性质) +STR_6002 :夜晚时路灯和游乐设施将会被点亮。{NEWLINE}此功能需要先开启硬件渲染。 STR_6003 :剖视图 STR_6004 :剖视图 STR_6005 :启用剖视图 @@ -3166,35 +3165,35 @@ STR_6009 :选择切割高度 STR_6010 :{COMMA2DP32}米 STR_6011 :{COMMA1DP16}英尺 STR_6012 :{COMMA1DP16} -STR_6013 :游客仅需付费购买游乐园门票和服务.{NEWLINE}搭乘游乐设施免费. -STR_6014 :游客仅需付费购买游乐设施门票和服务.{NEWLINE}进入游乐园免费. +STR_6013 :游客仅需付费购买游乐园门票和服务。{NEWLINE}搭乘游乐设施免费。 +STR_6014 :游客仅需付费购买游乐设施门票和服务。{NEWLINE}进入游乐园免费。 STR_6015 :坡道 STR_6016 :修改网格 STR_6017 :请调低速度 -STR_6018 :游乐设施建造- 向左转 -STR_6019 :游乐设施建造- 向右转 -STR_6020 :游乐设施建造- 使用默认轨道 -STR_6021 :游乐设施建造- 降低坡度 -STR_6022 :游乐设施建造- 升高坡度 -STR_6023 :游乐设施建造- 牵引链条开关 -STR_6024 :游乐设施建造- 向左倾斜 -STR_6025 :游乐设施建造- 向右倾斜 -STR_6026 :游乐设施建造- 上一个轨道 -STR_6027 :游乐设施建造- 下一个轨道 -STR_6028 :游乐设施建造- 建造当前选中的 -STR_6029 :游乐设施建造- 拆除当前选中的 -STR_6030 :景物选择器. 点击地图上任意景物来建造相同的景物. -STR_6031 :服务器描述: -STR_6032 :服务器欢迎信息: -STR_6033 :过山车大亨1安装路径: +STR_6018 :游乐设施建造——向左转 +STR_6019 :游乐设施建造——向右转 +STR_6020 :游乐设施建造——使用默认轨道 +STR_6021 :游乐设施建造——降低坡度 +STR_6022 :游乐设施建造——升高坡度 +STR_6023 :游乐设施建造——牵引链条开关 +STR_6024 :游乐设施建造——向左倾斜 +STR_6025 :游乐设施建造——向右倾斜 +STR_6026 :游乐设施建造——上一个轨道 +STR_6027 :游乐设施建造——下一个轨道 +STR_6028 :游乐设施建造——建造当前选中的 +STR_6029 :游乐设施建造——拆除当前选中的 +STR_6030 :景物选择器。点击地图上任意景物来建造相同的景物。 +STR_6031 :服务器描述: +STR_6032 :服务器欢迎信息: +STR_6033 :过山车大亨1安装路径: STR_6034 :{BLACK}{STRING} STR_6035 :请选择你的过山车大亨1的目录 STR_6036 :清除 STR_6037 :请选择一个有效的过山车大亨1的目录 -STR_6038 :如果你安装了过山车大亨1,设置此选项到其路径以便读取剧情,音乐等. +STR_6038 :如果你安装了过山车大亨1,设置此选项到其路径以便读取剧情,音乐等。 STR_6039 :快速拆除游乐设施 STR_6040 :编辑剧情选项 -STR_6041 :{BLACK}没有雇佣机械师! +STR_6041 :{BLACK}没有雇佣机械师! STR_6042 :加载高度图 STR_6043 :选择高度图 STR_6044 :平滑高度图 @@ -3213,49 +3212,49 @@ STR_6057 :在工具栏为静音选项显示一个单独的按钮 STR_6058 :静音 STR_6059 :» STR_6060 :将游客的购买行为用动画表现 -STR_6061 :当游客购买时播放金钱动画效果{NEWLINE}. -STR_6062 :{OUTLINE}{GREEN}+ {CURRENCY2DP} -STR_6063 :{OUTLINE}{RED}- {CURRENCY2DP} +STR_6061 :当游客购买时播放金钱动画效果。 +STR_6062 :{OUTLINE}{GREEN}+{CURRENCY2DP} +STR_6063 :{OUTLINE}{RED}-{CURRENCY2DP} STR_6064 :拥有所有土地 STR_6065 :记录用户操作 -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_6076 :{STRING} 使用/开启作弊‘{STRING}’. +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_6076 :{STRING}使用/开启作弊“{STRING}”。 STR_6077 :增加金钱 -STR_6078 :{STRING} 建造游乐设施‘{STRING}’. -STR_6079 :{STRING} 拆除游乐设施‘{STRING}’. -STR_6080 :{STRING} 改变游乐设施‘{STRING}’的外观. -STR_6081 :{STRING} 将游乐设施‘{STRING}’的状态变为已关闭. -STR_6082 :{STRING} 将游乐设施‘{STRING}’的状态变为开放中. -STR_6083 :{STRING} 将游乐设施‘{STRING}’的状态变为测试中. -STR_6084 :{STRING} 改变游乐设施‘{STRING}’的车辆选项. -STR_6085 :{STRING} 改变游乐设施‘{STRING}’的设备选项. -STR_6086 :{STRING} 将游乐设施‘{STRING}’改名为‘{STRING}’. -STR_6087 :{STRING} 将游乐设施的价格从‘{STRING}’调整到{STRING} -STR_6088 :{STRING} 将游乐设施的第二价格从‘{STRING}’调整到{STRING} -STR_6089 :{STRING} 将游乐园名称从‘{STRING}’改名为‘{STRING}’. -STR_6090 :{STRING} 开放游乐园. -STR_6091 :{STRING} 关闭游乐园. -STR_6092 :{STRING} 将游乐园门票价格调整为{STRING} -STR_6093 :{STRING} 放置新景观. -STR_6094 :{STRING} 移除景观. -STR_6095 :{STRING} 编辑景观. -STR_6096 :{STRING} 将指示牌命名为‘{STRING}’. -STR_6097 :{STRING} 为游乐设施放置一条新轨道‘{STRING}’. -STR_6098 :{STRING} 移除游乐设施的一条轨道. -STR_6099 :你已连接到服务器. -STR_6100 :你已从服务器断开. +STR_6078 :{STRING}建造游乐设施“{STRING}”。 +STR_6079 :{STRING}拆除游乐设施“{STRING}”。 +STR_6080 :{STRING}改变游乐设施“{STRING}”的外观。 +STR_6081 :{STRING}将游乐设施“{STRING}”的状态变为已关闭。 +STR_6082 :{STRING}将游乐设施“{STRING}”的状态变为开放中。 +STR_6083 :{STRING}将游乐设施“{STRING}”的状态变为测试中。 +STR_6084 :{STRING}改变游乐设施“{STRING}”的车辆选项。 +STR_6085 :{STRING}改变游乐设施“{STRING}”的设备选项。 +STR_6086 :{STRING}将游乐设施“{STRING}”改名为“{STRING}”。 +STR_6087 :{STRING}将游乐设施的价格从“{STRING}”调整到{STRING} +STR_6088 :{STRING}将游乐设施的第二价格从“{STRING}”调整到{STRING} +STR_6089 :{STRING}将游乐园名称从“{STRING}”改名为“{STRING}”。 +STR_6090 :{STRING}开放游乐园。 +STR_6091 :{STRING}关闭游乐园。 +STR_6092 :{STRING}将游乐园门票价格调整为{STRING} +STR_6093 :{STRING}放置新景观。 +STR_6094 :{STRING}移除景观。 +STR_6095 :{STRING}编辑景观。 +STR_6096 :{STRING}将指示牌命名为“{STRING}”。 +STR_6097 :{STRING}为游乐设施放置一条新轨道“{STRING}”。 +STR_6098 :{STRING}移除游乐设施的一条轨道。 +STR_6099 :你已连接到服务器。 +STR_6100 :你已从服务器断开。 STR_6101 :游乐设施不会随时间流逝而贬值 -STR_6102 :游乐设施的价值不会随时间流逝而贬值,因此游客不会产生玩此游乐设施太贵的想法. -STR_6103 :此选项在联网模式下被禁用. +STR_6102 :游乐设施的价值不会随时间流逝而贬值,因此游客不会产生玩此游乐设施太贵的想法。 +STR_6103 :此选项在联网模式下被禁用。 STR_6105 :超级过山车 STR_6107 :怪兽卡车 STR_6109 :超旋转式 @@ -3264,15 +3263,15 @@ STR_6113 :一种高大的非翻转的过山车,拥有巨大降落,高速 STR_6115 :动力十足的4x4四驱卡车,可以攀爬陡峭的斜坡 STR_6116 :宽阔的过山车车厢沿着光滑的钢轨滑行,穿过各种倒置轨道 STR_6119 :一种廉价且方便建造的过山车,但是有高度限制 -STR_6120 :{BABYBLUE}新车辆可用于{STRINGID}:{NEWLINE}{STRINGID} +STR_6120 :{BABYBLUE}新车辆可用于{STRINGID}:{NEWLINE}{STRINGID} STR_6121 :将游乐园土地所有权扩展至地图边缘 -STR_6122 :此剧情中没有足够的过山车! +STR_6122 :此剧情中没有足够的过山车! STR_6123 :加载错误的游乐园对象 STR_6124 :对象名称 STR_6125 :对象类型 STR_6126 :未知类型 -STR_6127 :文件: {STRING} -STR_6128 :文件不能被加载,因为其中一部分引用的对象丢失或错误. 以下是这些对象的列表. +STR_6127 :文件:{STRING} +STR_6128 :文件不能被加载,因为其中一部分引用的对象丢失或错误。以下是这些对象的列表: STR_6129 :复制 STR_6130 :复制全部 STR_6131 :对象源 @@ -3281,41 +3280,41 @@ STR_6133 :使用还未被研究出的游乐设施和景观 STR_6134 :清除景物 STR_6135 :客户端发送了无效的请求 STR_6136 :服务器发送了无效的请求 -STR_6137 :OpenRCT2,一款免费且开源的过山车大亨2的复制游戏. -STR_6138 :OpenRCT2是一款由许多作者共同开发的作品,完整的列表可在“contributors.md”找到. 请访问http://github.com/OpenRCT2/OpenRCT2获取更多信息 -STR_6139 :所有的产品及公司名称均属其拥有者所有. 使用那些名称并不代表本项目与其有任何联系或认可. +STR_6137 :OpenRCT2,一款免费且开源的对于过山车大亨2再创作的重置扩展游戏。 +STR_6138 :OpenRCT2是一款由许多作者共同开发的作品,完整的列表可在上方“贡献者”按钮找到。请访问 http://github.com/OpenRCT2/OpenRCT2 获取更多信息 +STR_6139 :所有的产品及公司名称均属其拥有者所有。使用那些名称并不代表本项目与其有任何联系或认可。 STR_6140 :更新日志… -STR_6141 :RCT1式底部工具栏 -STR_6142 :{WINDOW_COLOUR_2}轨道名称: {BLACK}{STRING} -STR_6143 :{WINDOW_COLOUR_2}游乐设施类型: {BLACK}{STRINGID} +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_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库均没有安装. 请至少安装其一,或者在命令行配置它们. +STR_6154 :因为安全原因,不推荐提高权限来运行OpenRCT2。 +STR_6155 :KDialog和Zenity库均没有安装。请至少安装其一,或者在命令行配置它们。 STR_6156 :名称已被使用 STR_6157 :控制台 -STR_6160 :{WINDOW_COLOUR_2}可用车辆: {BLACK}{STRING} +STR_6160 :{WINDOW_COLOUR_2}可用车辆:{BLACK}{STRING} STR_6161 :网格显示切换 STR_6162 :旋转野鼠 STR_6163 :老鼠外形的车辆加速通过急弯和短下落,温柔地旋转使乘客迷失方向 STR_6164 :{WHITE}❌ STR_6165 :使用垂直同步 -STR_6166 :将每帧图像与显示器刷新率同步,以避免画面撕裂. +STR_6166 :将每帧图像与显示器刷新率同步,以避免画面撕裂。 STR_6167 :高级 STR_6168 :主菜单动画 STR_6169 :剧情选项 STR_6170 :界面设定 STR_6171 :查找 STR_6172 :查找 -STR_6173 :请输入名字来查找: +STR_6173 :请输入名字来查找: STR_6188 :呕吐物 STR_6189 :样子 STR_6191 :表面 @@ -3323,31 +3322,31 @@ STR_6192 :墙 STR_6193 :{COMMA16}位游客 STR_6194 :{INLINE_SPRITE}{11}{20}{00}{00}{COMMA16}位游客 STR_6195 :{INLINE_SPRITE}{10}{20}{00}{00}{COMMA16}位游客 -STR_6196 :{BLACK}年: -STR_6197 :{BLACK}月: -STR_6198 :{BLACK}日: +STR_6196 :{BLACK}年: +STR_6197 :{BLACK}月: +STR_6198 :{BLACK}日: STR_6199 :设置日期 STR_6200 :重置日期 STR_6201 :{MONTH} STR_6202 :虚拟楼层类型: -STR_6203 :启用后,当按住Ctrl或Shift键时将会绘制一层虚拟楼层以便轻松地垂直放置元素. +STR_6203 :启用后,当按住Ctrl或Shift键时将会绘制一层虚拟楼层以便轻松地垂直放置元素。 STR_6215 :建造 STR_6216 :运营 STR_6217 :游乐设施 / 轨道可用性 STR_6218 :OpenRCT2官方 STR_6219 :高亮道路相关物 STR_6220 :使之可用 -STR_6221 :每个站台只能有一个入口或出口可用. +STR_6221 :每个站台只能有一个入口或出口可用。 STR_6222 :无法在此放置游客入口… -STR_6223 :必须在游乐园边界外! -STR_6224 :{STRING}放置一个游客入口. +STR_6223 :必须在游乐园边界外! +STR_6224 :{STRING}放置一个游客入口。 STR_6225 :不支持OpenGL渲染 STR_6226 :允许剧情提前完成 -STR_6227 :当所有剧情目标在预定时间之前达成时将触发剧情完成. +STR_6227 :当所有剧情目标在预定时间之前达成时将触发剧情完成。 STR_6228 :剧情选项 -STR_6229 :{WINDOW_COLOUR_2}{STRINGID}: {STRINGID} -STR_6230 :{BLACK}{STRINGID}: -STR_6231 :{WINDOW_COLOUR_2}{STRINGID}: {MOVE_X}{185}{STRINGID} +STR_6229 :{WINDOW_COLOUR_2}{STRINGID}:{STRINGID} +STR_6230 :{BLACK}{STRINGID}: +STR_6231 :{WINDOW_COLOUR_2}{STRINGID}:{MOVE_X}{185}{STRINGID} STR_6232 :一动不动 STR_6233 :剖视图视角 STR_6234 :高亮道路相关物 @@ -3359,28 +3358,28 @@ STR_6239 :垂直切割 STR_6240 :纵横切割 STR_6241 :选择面积 STR_6242 :清空选项 -STR_6243 :翻新游乐设施,{NEWLINE}让其焕然一新 +STR_6243 :翻新游乐设施,{NEWLINE}让其焕然一新 STR_6244 :无法翻新游乐设施… STR_6245 :无需翻新游乐设施 STR_6246 :翻新 STR_6247 :翻新游乐设施/胜地 -STR_6248 :{WINDOW_COLOUR_1}你是否要翻新 {STRINGID} 以获得 {CURRENCY}? -STR_6249 :{WINDOW_COLOUR_1}你是否要翻新 {STRINGID}? -STR_6250 :{WINDOW_COLOUR_1}你是否确定要完全拆除 {STRINGID} 以获得 {CURRENCY}? +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_6261 :显示宽阔走道 STR_6262 :主音量 STR_6263 :切换所有声音开/关 STR_6264 :总是使用系统的文件浏览器 -STR_6265 :当启用后,操作系统自带的文件浏览器将代替OpenRCT2的. +STR_6265 :当启用后,操作系统自带的文件浏览器将代替OpenRCT2的。 STR_6266 :打开自定义内容文件夹 -STR_6267 :打开网格inspector +STR_6267 :打开网格检查器 STR_6268 :移至下一帧 STR_6269 :非法的气候ID STR_6270 :地表 @@ -3388,9 +3387,9 @@ STR_6271 :地表边缘 STR_6272 :站台 STR_6273 :音乐 STR_6274 :无法设置配色主题… -STR_6275 :{WINDOW_COLOUR_2}车站类型: -STR_6276 :{RED}{STRINGID} 有游客被困住了,这可能是因为无效的设施类型或者运行模式 -STR_6277 :车站编号: {BLACK}{STRINGID} +STR_6275 :{WINDOW_COLOUR_2}车站类型: +STR_6276 :{RED}{STRINGID}有游客被困住了,这可能是因为无效的设施类型或者运行模式 +STR_6277 :车站编号:{BLACK}{STRINGID} STR_6278 :自动保存数量 STR_6279 :应该保留的自动保存数量 STR_6280 :聊天室 @@ -3407,51 +3406,51 @@ STR_6299 :下载全部 STR_6300 :从网络上下载可下载缺失文件 STR_6301 :将所选文件名称复制到剪贴板 STR_6302 :将整个缺失文件列表复制到剪贴板 -STR_6303 :下载文件 ({COMMA16} / {COMMA16}): [{STRING}] +STR_6303 :下载文件({COMMA16} / {COMMA16}):[{STRING}] STR_6304 :打开景物选择器 STR_6305 :多线程 STR_6306 :使用多个线程进行渲染的实验选项可能会导致游戏不稳定 -STR_6307 :配色方案: {BLACK}{STRINGID} +STR_6307 :配色方案:{BLACK}{STRINGID} STR_6308 :{TOPAZ}“{STRINGID}{OUTLINE}{TOPAZ}”{NEWLINE}{STRINGID} STR_6309 :重新连接 -STR_6310 :{WINDOW_COLOUR_2}位置 {BLACK}{INT32} {INT32} {INT32} -STR_6311 :{WINDOW_COLOUR_2}下一个: {BLACK}{INT32} {INT32} {INT32} -STR_6312 :(surface) -STR_6313 :(slope {INT32}) -STR_6314 :{WINDOW_COLOUR_2}Dest: {BLACK}{INT32},{INT32} tolerance {INT32} -STR_6315 :{WINDOW_COLOUR_2}Pathfind Goal: {BLACK}{INT32},{INT32},{INT32} 目录为 {INT32} -STR_6316 :{WINDOW_COLOUR_2}Pathfind history: -STR_6317 :{BLACK}{INT32},{INT32},{INT32} 目录为 {INT32} -STR_6318 :Network desync detected.{NEWLINE} Log文件: {STRING} +STR_6310 :{WINDOW_COLOUR_2}位置{BLACK}{INT32} {INT32} {INT32} +STR_6311 :{WINDOW_COLOUR_2}下一个:{BLACK}{INT32} {INT32} {INT32} +STR_6312 :(表面) +STR_6313 :(斜坡 {INT32}) +STR_6314 :{WINDOW_COLOUR_2}目的地:{BLACK}{INT32},{INT32}耐力{INT32} +STR_6315 :{WINDOW_COLOUR_2}寻路目标:{BLACK}{INT32},{INT32},{INT32}目录为{INT32} +STR_6316 :{WINDOW_COLOUR_2}寻路地址: +STR_6317 :{BLACK}{INT32},{INT32},{INT32}目录为{INT32} +STR_6318 :检测到网络不同步。{NEWLINE}Log文件:{STRING} STR_6319 :块式制动器关闭 STR_6320 :坚不可摧 STR_6321 :附加内容损坏 -STR_6322 :{WINDOW_COLOUR_2}Sprite Id: {BLACK}{INT32} +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} -STR_6330 :下载中 [{STRING}] 来自 {STRING} ({COMMA16} / {COMMA16}) +STR_6330 :下载中 [{STRING}] 来自{STRING}({COMMA16} / {COMMA16}) 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_6347 :路径添加不能放置在平交道口上! -STR_6348 :请先移除平交道口! +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_6347 :路径添加不能放置在平交道口上! +STR_6348 :请先移除平交道口! STR_6349 :随机标题序列 STR_6350 :散布 STR_6351 :风景散布工具 @@ -3461,31 +3460,31 @@ STR_6354 :中等密度 STR_6355 :高密度 STR_6356 :如果公园中有水则生成鸭子 STR_6357 :从地图中无害化处理所有鸭子 -STR_6358 :{UINT16} 页 -STR_6359 :{POP16}{POP16} 页 {UINT16} +STR_6358 :{UINT16}页 +STR_6359 :{POP16}{POP16}页 {UINT16} STR_6360 :{BLACK}{COMMA32} STR_6361 :开启灯光效果(实验性) STR_6362 :如果开启,轨道载具将会被点亮 STR_6363 :拷贝文字到剪切板 -STR_6364 :在 {STRINGID} 的事故中有 {COMMA16} 人遇难 +STR_6364 :在{STRINGID}的事故中有{COMMA16}人遇难 STR_6365 :设施遇难者 STR_6366 :卡住或停滞的车辆 -STR_6367 :动画: -STR_6368 :为了更好的兼容性,不推荐在Wine中运行OpenRCT2。OpenRCT2对macOS,Linux,FreeBSD,OpenBSD,Windows均拥有原生版本 +STR_6367 :动画: +STR_6368 :为了更好的兼容性,不推荐在Wine中运行OpenRCT2。OpenRCT2对 macOS、Linux、FreeBSD、OpenBSD和Windows 均拥有原生版本。 STR_6369 :允许在无效高度建造轨道 STR_6370 :允许以任何高度间隔放置轨道件 -STR_6371 :在此路径下的过山车大亨1中 “csg1i.dat” 文件缺失. 此文件需要从Loopy Landscapes 或 RCT Deluxe CD 安装到您硬盘上的 RollerCoaster Tycoon 1 的“Data”文件夹中. -STR_6372 :此路径下包含 过山车大亨1 的安装,但是并不合适,OpenRCT2需要从Loopy Landscapes 或 RCT Deluxe 完成安装才能使用过山车大亨1的内容. +STR_6371 :在此路径下的过山车大亨1中 “csg1i.dat” 文件缺失。此文件需要从Loopy Landscapes 或 RCT Deluxe CD 安装到您硬盘上的 RollerCoaster Tycoon 1 的“Data”文件夹中。 +STR_6372 :此路径下包含 过山车大亨1 的安装,但是并不合适,OpenRCT2需要从Loopy Landscapes 或 RCT Deluxe 完成安装才能使用过山车大亨1的内容。 STR_6373 :切换检查 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_6376 :{WINDOW_COLOUR_2}设施载具:{NEWLINE}{BLACK}{STRINGID}给{STRINGID} +STR_6377 :{WINDOW_COLOUR_2}类型:{BLACK}{STRINGID}给{STRINGID} +STR_6378 :接收对象列表:{INT32} / {INT32} STR_6379 :接收到无效数据 STR_6380 :有更新! -STR_6381 :快来加入 OpenRCT2 的 Discord! -STR_6382 :最新的OpenRCT2正式版版可用: {STRING}! +STR_6381 :快来加入 OpenRCT2 的 Discord! +STR_6382 :最新的OpenRCT2正式版版可用:{STRING}! STR_6383 :打开下载页 STR_6384 :雪 STR_6385 :大雪 @@ -3495,14 +3494,14 @@ STR_6388 :不能更高了… STR_6389 :无效的许可 STR_6390 :OpenRCT2需要原版过山车大亨2的文件才能工作,请选择您的过山车大亨2安装目录 STR_6391 :请选择您的过山车大亨2安装目录 -STR_6392 :不能在此路径找到: {STRING} +STR_6392 :不能在此路径找到:{STRING} STR_6393 :选取目标 STR_6394 :目标 STR_6395 :维护 STR_6396 :关闭屏保和屏幕省电模式 STR_6397 :若勾选,当OpenRCT2运行时屏幕保护和其他屏幕省电模式将会被关闭 STR_6398 :文件包含不支持的设施类型,请更新到更新版本的OpenRCT2 -STR_6399 :OpenRCT2 需要原生版本的过山车大亨2才能运行. 请在 config.ini 文件中设置 “game_path” 为您过山车大亨2的安装目录,随后重新启动 OpenRCT2. +STR_6399 :OpenRCT2 需要原生版本的过山车大亨2才能运行。请在 config.ini 文件中设置 “game_path” 为您过山车大亨2的安装目录,随后重新启动 OpenRCT2。 STR_6400 :我有GOG版本的过山车大亨2离线安装包,但是尚未安装 STR_6401 :我已经安装了的过山车大亨2 STR_6402 :OpenRCT2 数据设置 @@ -3511,65 +3510,65 @@ STR_6404 :请选择GOG版过山车大亨2安装器 STR_6405 :选择GOG安装器 STR_6406 :GOG版过山车大亨2安装器 STR_6407 :这可能需要几分钟 -STR_6408 :请安装“innoextract”到额外的GOG安装器,随后重新启动 OpenRCT2. -STR_6409 :您选择的文件不是GOG版过山车大亨2 离线 安装器. 你可能下载的是GOG Galaxy下载器而不是游戏或选择了错误的文件. +STR_6408 :请安装“innoextract”到额外的GOG安装器,随后重新启动 OpenRCT2。 +STR_6409 :您选择的文件不是GOG版过山车大亨2 离线安装器。你可能下载的是GOG Galaxy下载器而不是游戏或选择了错误的文件。 STR_6410 :缩放 STR_6411 :在工具栏中显示缩放按钮 STR_6412 :数字小键盘 Enter STR_6413 :Shift -STR_6414 :左Shift -STR_6415 :右Shift +STR_6414 :左 Shift +STR_6415 :右 Shift STR_6416 :Ctrl -STR_6417 :左Ctrl -STR_6418 :右Ctrl +STR_6417 :左 Ctrl +STR_6418 :右 Ctrl STR_6419 :Alt -STR_6420 :左Alt -STR_6421 :右Alt +STR_6420 :左 Alt +STR_6421 :右 Alt STR_6422 :Cmd -STR_6423 :左Cmd -STR_6424 :右Cmd +STR_6423 :左 Cmd +STR_6424 :右 Cmd STR_6425 :控制杆向左 STR_6426 :控制杆向右 STR_6427 :控制杆向上 STR_6428 :控制杆向下 -STR_6429 :控制杆 {INT32} +STR_6429 :控制杆{INT32} STR_6430 :鼠标左键 STR_6431 :鼠标右键 -STR_6432 :鼠标 {INT32} +STR_6432 :鼠标{INT32} STR_6433 :移除 STR_6434 :在此截图中移除所有固定物 -STR_6435 :{WINDOW_COLOUR_2} 破坏被停止: {BLACK}{COMMA32} +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 :至少选择一个队列人行道表面样式 STR_6443 :至少选择一个人行道栏杆样式 STR_6444 :人行道表面 STR_6445 :人行道栏杆 -STR_6446 :{WINDOW_COLOUR_2}表面名称: {BLACK}{STRINGID} -STR_6447 :{WINDOW_COLOUR_2}栏杆名称: {BLACK}{STRINGID} +STR_6446 :{WINDOW_COLOUR_2}表面名称:{BLACK}{STRINGID} +STR_6447 :{WINDOW_COLOUR_2}栏杆名称:{BLACK}{STRINGID} STR_6448 :不支持的对象格式 -STR_6449 :{WINDOW_COLOUR_2}轨道: +STR_6449 :{WINDOW_COLOUR_2}轨道: STR_6450 :{BLACK}“{STRING}” -STR_6451 :{BLACK}“{STRING}” - {STRING} -STR_6452 :{WINDOW_COLOUR_2}销售: {BLACK}{STRING} +STR_6451 :{BLACK}“{STRING}”——{STRING} +STR_6452 :{WINDOW_COLOUR_2}销售:{BLACK}{STRING} STR_6453 :拷贝版本信息 STR_6454 :不能重命名横幅… STR_6455 :不能重命名标志… STR_6456 :大型截图 -STR_6457 :在GitHub上反馈BUG +STR_6457 :在GitHub上反馈BUG(英文) STR_6458 :在主屏幕跟随 STR_6460 :D STR_6461 :方向 STR_6462 :兴奋度 -STR_6463 :兴奋度: {COMMA2DP32} +STR_6463 :兴奋度:{COMMA2DP32} STR_6464 :刺激度 -STR_6465 :刺激度: {COMMA2DP32} +STR_6465 :刺激度:{COMMA2DP32} STR_6466 :恶心度 -STR_6467 :恶心度: {COMMA2DP32} +STR_6467 :恶心度:{COMMA2DP32} STR_6468 :未知 STR_6469 :设置更小的巡逻区域 STR_6470 :设置更大的巡逻区域 @@ -3577,7 +3576,7 @@ STR_6471 :半透明植被 STR_6472 :半透明载具 STR_6473 :半透明支撑 STR_6474 :隐藏游客 -STR_6475 :隐藏雇员 +STR_6475 :隐藏员工 STR_6476 :隐藏植被 STR_6477 :隐藏景物 STR_6478 :隐藏道路 @@ -3589,11 +3588,13 @@ STR_6483 :打开透明化选项 STR_6484 :半透明植被切换 STR_6485 :半透明载具切换 STR_6486 :隐藏游客切换 -STR_6487 :隐藏雇员切换 -STR_6488 :{RED}游客在抱怨排队区的长度.{NEWLINE}请考虑减少造成问题的队列长度或增加设施的游客接待量(试试增加列车数?) -STR_6489 :错误: 不兼容的公园版本 -STR_6490 :警告: 半兼容的公园版本 -STR_6492 :这个公园是较早版本的OpenRCT2保存的,无法在此版本的OpenRCT2中打开,版本号: v{INT32} . +STR_6487 :隐藏员工切换 +STR_6488 :{RED}游客在抱怨排队区的长度。{NEWLINE}请考虑减少造成问题的队列长度或增加设施的游客接待量(试试增加列车数?) +STR_6489 :错误:不兼容的公园版本 +STR_6490 :警告:半兼容的公园版本 +STR_6491 :这个公园是较新版本的OpenRCT2保存的,存档创建的版本:v{INT32},您至少需要将游戏更新至 v{INT32}才可以运行。您目前正在使用 v{INT32}。 +STR_6492 :这个公园是较早版本的OpenRCT2保存的,无法在此版本的OpenRCT2中打开,版本号:v{INT32}。 +STR_6493 :这个公园是较新版本的OpenRCT2保存的,一些数据或许已经丢失,版本号:v{INT32},您至少需要将游戏更新至 v{INT32}才可以运行。您目前正在使用 v{INT32}。 STR_6494 :按设施类型分类 STR_6495 :按设施的类型分类显示而不是直接显示各个载具 STR_6496 :{WINDOW_COLOUR_2}{STRINGID} @@ -3602,7 +3603,7 @@ STR_6498 :开启以保持正方形的地图形状 STR_6499 :此载具类型并不被此轨道设计支持 STR_6500 :此轨道元素并不被此轨道设计支持 STR_6501 :随机颜色 -STR_6502 :输入值在 {COMMA16} 和 {COMMA16} 之间 +STR_6502 :输入值在 {COMMA16}和 {COMMA16}之间 STR_6503 :至少需要选择一个车站项目 STR_6504 :至少需要选择一个地表 STR_6505 :至少需要选择一个地表边缘 @@ -3628,6 +3629,26 @@ STR_6524 :增加所选资产包的优先级 STR_6525 :使用已启用的资产包重新加载在游戏中的所有资产 STR_6526 :(基础图形、音乐及音效) STR_6527 :竞赛 +STR_6528 :无效的轨道参数! +STR_6529 :无效的配色参数! +STR_6530 :UCES{NEWLINE}用户创作扩展集 +STR_6531 :时间机器 +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_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_6544 :贷款不得为负! +STR_6545 :使用RCT1的贷款汇率 +STR_6546 :使用过山车大亨1的贷款利率算法,此算法使用固定的1.33%作为贷款利率。 +STR_6547 :全部景物 ############# # Scenarios # @@ -3645,14 +3666,14 @@ STR_PARK :炸药山丘 STR_DTLS :这个座立于沙漠中的乐园只有一座云霄飞车,但不缺乏可供扩充的空地 -STR_SCNR :绿叶湖 -STR_PARK :绿叶湖 +STR_SCNR :茂林湖 +STR_PARK :茂林湖 STR_DTLS :在一个大型湖泊的旁边,由零开始建造一个乐园 STR_SCNR :钻石高地 STR_PARK :钻石高地 -STR_DTLS :钻石高地已经是一个拥有极佳游乐设施,并且很发展得很成功的乐园-继续发展它让它的价值翻倍 +STR_DTLS :钻石高地已经是一个拥有极佳游乐设施,并且很发展得很成功的乐园——继续发展它让它的价值翻倍 STR_SCNR :常青花园 @@ -3670,13 +3691,13 @@ STR_PARK :三位一体群岛 STR_DTLS :几个邻近的岛屿组成了这个新乐园的基本地势 -STR_SCNR :凯蒂之梦 -STR_PARK :凯蒂之梦 -STR_DTLS :一个只有几个游乐设施但有扩展空间的小型乐园-你的目标是让它的价值翻倍 +STR_SCNR :凯蒂梦之境 +STR_PARK :凯蒂梦之境 +STR_DTLS :一个只有几个游乐设施但有扩展空间的小型乐园——你的目标是让它的价值翻倍 -STR_SCNR :波奇公园 -STR_PARK :波奇公园 +STR_SCNR :狭窄公园 +STR_PARK :狭窄公园 STR_DTLS :一个拥挤的小型乐园,它需要大扩张 @@ -3712,7 +3733,7 @@ STR_DTLS :将埃及遗址旅游景点改造成繁荣的主题公园 STR_SCNR :老废物乐园 STR_PARK :老废物乐园 -STR_DTLS :一个拥有精心设计但已经相当老旧的游乐设施的大型公园。 更换旧的游乐设施或添加新的游乐设施,使公园更受欢迎。 +STR_DTLS :一个拥有精心设计但已经相当老旧的游乐设施的大型公园。更换旧的游乐设施或添加新的游乐设施,使公园更受欢迎。 STR_SCNR :天堂码头 @@ -3722,7 +3743,7 @@ STR_DTLS :将这个沉睡小镇的码头变成一个繁荣的景点。 STR_SCNR :闪电峰 STR_PARK :闪电峰 -STR_DTLS :闪电峰美丽的山脉深受步行者和观光者的欢迎。 利用可用土地吸引新的寻求刺激的客户。 +STR_DTLS :闪电峰美丽的山脉深受步行者和观光者的欢迎。利用可用土地吸引新的寻求刺激的客户。 STR_SCNR :象牙塔 @@ -3737,7 +3758,7 @@ STR_DTLS :彩虹谷的地方当局不允许任何景观变化或大树砍伐 STR_SCNR :雷霆岩 STR_PARK :雷霆岩 -STR_DTLS :雷霆岩矗立在沙漠中央,吸引了众多游客。 利用可用空间建造游乐设施以吸引更多人。 +STR_DTLS :雷霆岩矗立在沙漠中央,吸引了众多游客。利用可用空间建造游乐设施以吸引更多人。 STR_SCNR :超级乐园 @@ -3887,7 +3908,7 @@ STR_DTLS :用有限的金钱和无限的时间把这个山脚下的地区变 STR_SCNR :城市公园 -STR_PARK :Urban Park +STR_PARK :城市公园 STR_DTLS :一个小公园与附近的城镇达成了一项协议,允许经过城镇上空向周边进行扩张 @@ -3928,8 +3949,8 @@ STR_PARK :头晕眼花 STR_DTLS :这个大型公园已经有一个非常好的超级过山车,但你的任务是大幅增加其利润 -STR_SCNR :天堂码头 2 -STR_PARK :天堂码头 2 +STR_SCNR :天堂码头2 +STR_PARK :天堂码头2 STR_DTLS :天堂码头已经在海上扩展了它的人行道网络,你的任务是扩大公园以利用额外的空间 @@ -4079,6 +4100,7 @@ STR_DTLS : [TTPIRF05] STR_NAME :屋顶 + ## End OpenRCT2 Official ############################################################################### @@ -4127,7 +4149,7 @@ STR_DTLS :从零开始,建造这个六旗游乐园的游乐设施 STR_SCNR :建造你自己的 六旗游乐园 STR_PARK :六旗游乐园 -STR_DTLS :建造你自己设计的六旗游乐园-你可以从其他六旗游乐园借鉴或者设计建造你自己的游乐设施 +STR_DTLS :建造你自己设计的六旗游乐园——你可以从其他六旗游乐园借鉴或者设计建造你自己的游乐设施 STR_SCNR :混乱集市 @@ -4137,7 +4159,7 @@ STR_DTLS :从一个小集市,你的挑战是增加商店利润,建设商 STR_SCNR :疯狂城堡 STR_PARK :疯狂城堡 -STR_DTLS :你继承了一个大的城堡-你的工作是把它转型成一个小型主题公园。 +STR_DTLS :你继承了一个大的城堡——你的工作是把它转型成一个小型主题公园。 STR_SCNR :沙尘绿地 @@ -4197,7 +4219,7 @@ STR_DTLS :尝试用你的手运营并改进这座六旗游乐园 STR_SCNR :六旗大冒险 STR_PARK :六旗大冒险 -STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善公园!但别忘了你的最终目标--吸引更多的客人到公园去! +STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善公园!但别忘了你的最终目标——吸引更多的客人到公园去! STR_SCNR :六旗荷兰 @@ -4207,12 +4229,12 @@ STR_DTLS :尝试用你的手运营并改进这座六旗游乐园 STR_SCNR :六旗魔术山 STR_PARK :六旗魔术山 -STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善公园!但别忘了你的最终目标--偿还贷款,同时保持公园价值! +STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善公园!但别忘了你的最终目标——偿还贷款,同时保持公园价值! STR_SCNR :六旗降临得克萨斯 STR_PARK :六旗降临得克萨斯 -STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善公园!但别忘了你的最终目标--吸引更多的客人到公园去! +STR_DTLS :建造遗失的六旗乐园游乐设施,或用自己的设计善公园!但别忘了你的最终目标——吸引更多的客人到公园去! ############################################################################### ## Wacky Worlds Scenarios @@ -4238,7 +4260,7 @@ STR_PARK :冰冷冒险 STR_DTLS :环境署已经把你碍眼的旧炼油厂改造成顶级生态的旅游胜地。土地便宜但贷款利息高。你可以卖掉旧建筑来赚钱。 -STR_SCNR :亚洲——中国长城旅游发展 +STR_SCNR :亚洲——中国长城旅游业发展 STR_PARK :中国长城 STR_DTLS :当局已决定在附近的土地上建造主题公园,以加强在长城周边的旅游业发展。 @@ -4280,7 +4302,7 @@ STR_DTLS :夏威夷的人们厌倦了冲浪,寻找更刺激的东西。你 STR_SCNR :北美洲——大峡谷 STR_PARK :峡谷浩劫 -STR_DTLS :你必须在有限的土地上建立一个游乐园,这里有自然财富--从美洲印第安人那里有机会购买邻近的土地。维持当地城镇的人口是你需要完成的目标。 +STR_DTLS :你必须在有限的土地上建立一个游乐园,这里有自然财富——从美洲印第安人那里有机会购买邻近的土地。维持当地城镇的人口是你需要完成的目标。 STR_SCNR :北美——过山车天堂 @@ -4295,7 +4317,7 @@ STR_DTLS :为了进一步促进当地的旅游业,你必须建设一个公 STR_SCNR :南美洲——雨林高原 STR_PARK :嬉闹雨林 -STR_DTLS :空间是有限的宝贵的热带雨林-你必须尽可能多地塞进现有的结算,以提供一个可行的替代当地木材业。 +STR_DTLS :空间是有限的宝贵的热带雨林——你必须尽可能多地塞进现有的结算,以提供一个可行的替代当地木材业。 STR_SCNR :南美洲——里约狂欢节 @@ -4323,7 +4345,7 @@ STR_DTLS :生命在一个遥远的星球上被发现,建造一个外星人 STR_SCNR :未来时代——未来世界 STR_PARK :双子城 -STR_DTLS :炫耀你的创造性的,乌托邦式的未来愿景-想出一个未来的公园设计,结合国家的最先进的景点。 +STR_DTLS :炫耀你的创造性的,乌托邦式的未来愿景——想出一个未来的公园设计,结合国家的最先进的景点。 STR_SCNR :神话时代——动画电影摄影棚 @@ -4338,7 +4360,7 @@ STR_DTLS :你拥有一个特定的考古价值的岛屿。你已经决定采 STR_SCNR :史前时代——小行星之后 STR_PARK :陨石坑大战 -STR_DTLS :你拥有一个布满灰尘的老流星陨石坑。在真正的创业精神,你已经决定建造一个小行星主题公园,并转换你的看似毫无价值的土地变成一个相当大的财富. +STR_DTLS :你拥有一个布满灰尘的老流星陨石坑。在真正的创业精神,你已经决定建造一个小行星主题公园,并转换你的看似毫无价值的土地变成一个相当大的财富。 STR_SCNR :史前时代——游历侏罗纪 @@ -4353,7 +4375,7 @@ STR_DTLS :为了阻止公路的开发和维护神秘的古老的石头圈, STR_SCNR :咆哮20年代——监狱岛 STR_PARK :恶魔岛 -STR_DTLS :臭名昭著的监狱岛的人口曾经充满了走私犯和诈骗犯-现在出售。你已经决定把它变成一个顶级的旅游景点,钱是没有对象 +STR_DTLS :臭名昭著的监狱岛的人口曾经充满了走私犯和诈骗犯——现在出售。你已经决定把它变成一个顶级的旅游景点,钱是没有对象 STR_SCNR :咆哮20年代——施耐德杯 @@ -4381,4 +4403,107 @@ STR_DTLS :这个老龄化的主题公园已经看到了更好的日子。帮 STR_SCNR :熊猫世界 STR_PARK :熊猫世界 -STR_DTLS :增加更多的设施来吸引更多的顾客来到这个熊猫主题的乐园 +STR_DTLS :增加更多的设施来吸引更多的顾客来到这个熊猫主题的乐园. + + +STR_SCNR :大亨公园 +STR_PARK :大亨公园 +STR_DTLS : + +### + +STR_SCNR :墓地飞车 +STR_PARK :墓地飞车 +STR_DTLS :万圣节到了,UCES万圣节,南瓜在夜深人静时尖叫!这个墓地有麻烦了,由你来拯救它,同时让死者安息!你能把鬼魂留在他们的坟墓里,给你的顾客带来寒意吗? + +############################################################################### +## UCES: The Time Machine (2003) +############################################################################### + +STR_SCNR :亚历山德里亚的灯塔 +STR_PARK :亚历山德里亚的灯塔 +STR_DTLS :亚历山大建造了这座城市;希腊人、罗马人、埃及人纷纷留下了他们的印记。但最大的荣耀是来自古代世界的奇迹——灯塔。建造一个公园!{NEWLINE}作者:Katatude + + +STR_SCNR :克利夫兰的月神公园 +STR_PARK :月神公园 +STR_DTLS :一切就像它开幕当天一样——1905年5月18日。{NEWLINE}作者:Aetherwave + + +STR_SCNR :维苏威火山 +STR_PARK :维苏威火山 +STR_DTLS :维苏威火山在公元79年喷发,庞贝古城和赫库兰尼姆被深埋地下。参观挖掘并建造公园!{NEWLINE}作者:Katatude + + +STR_SCNR :沙盒 +STR_PARK :沙盒 +STR_DTLS :每个人都想拥有的——沙盒!所以拿起你的桶和铲子,建造一个公园吧!{NEWLINE}作者:Katatude + + +STR_SCNR :尼亚加拉大瀑布和峡谷 +STR_PARK :尼亚加拉大瀑布 +STR_DTLS :美国的瀑布,婚纱样的瀑布,加拿大的瀑布,在尼亚加拉丛林旁,1850年。{NEWLINE}作者:Katatude + + +STR_SCNR :落石山矿工 +STR_PARK :落石山矿工 +STR_DTLS :泥石流摧毁了你的铁路。通过工人的勘探,过山车中貌似有黄金?{NEWLINE}作者:Squid,Buckone,Fossil + + +STR_SCNR :时间机器 +STR_PARK :时间机器 +STR_DTLS :时间机器。一个用来去往任何你想去的时间,任何你想去的地点。等待永恒。这都是相对的。{NEWLINE}作者:Katatude + + +STR_SCNR :吵闹之塔 +STR_PARK :吵闹之塔 +STR_DTLS :哇奥!看看这这个时间机器吧我们带到哪里去了!大家都去哪了?{NEWLINE}作者:Fossil + + +STR_SCNR :做出改变 +STR_PARK :做出改变 +STR_DTLS :我们会希望你可以…{NEWLINE}作者:Fossil + + +STR_SCNR :世外桃源 +STR_PARK :世外桃源 +STR_DTLS :罗马人厌倦了无聊的角斗士战斗。给他们更多的刺激,把神秘的罗马城市变成有史以来最伟大的游乐园!{NEWLINE}作者:Kaffe + +############################################################################### +## UCES: Katy's Dreamworld (2003) +############################################################################### + + +STR_SCNR :圣诞树下 +STR_PARK :冬季仙境 +STR_DTLS :妈妈在树下创造了这个场景,现在,她想要在这里创造一个游乐园!你能帮忙吗?{NEWLINE}作者:Katatude + + +STR_SCNR :巨石镇大爆炸 +STR_PARK :巨石镇大爆炸 +STR_DTLS :在巨石镇矿产公司发生爆炸后,巨石镇的人们不得不建造一个游乐园来维持他们的城镇活力。{NEWLINE}作者:rbarclay & buckone + + +STR_SCNR :嘲鸫夏令营 +STR_PARK :嘲鸫夏令营 +STR_DTLS :这个夏令营每个月只有500美元!找银行吧,玩的开心就好!建造一个游乐园。{NEWLINE}作者:Katatude + + +STR_SCNR :呜呜小镇 +STR_PARK :呜呜小镇 +STR_DTLS :妈咪!爸比!我想去呜呜小镇!{NEWLINE}作者:Fossil + + +STR_SCNR :龙之岛 +STR_PARK :龙之岛 +STR_DTLS :龙之岛?我可不确定我会想去那…{NEWLINE}作者:Fossil + + +STR_SCNR :基迪嘉年华2 +STR_PARK :基迪嘉年华 +STR_DTLS :嘿!孩子!玩的开心!{NEWLINE}作者:Piehead & Fossil + + +STR_SCNR :梦幻沙丘 +STR_PARK :梦幻沙丘 +STR_DTLS :你是一个小公园的拥有者,你买了一大块土地去扩展,希望可以吸引更多的游客来欣赏美丽的沙丘,但是别忘了:你可不能破坏沙丘的生态平衡。{NEWLINE}作者:rbarclay diff --git a/data/language/zh-TW.txt b/data/language/zh-TW.txt index a280e71b9a..5cef8844e4 100644 --- a/data/language/zh-TW.txt +++ b/data/language/zh-TW.txt @@ -96,6 +96,8 @@ STR_0091 :Unknown Ride (59) STR_0092 :直線電動機發車雲霄飛車 STR_0093 :混合式雲霄飛車 STR_0094 :單軌式雲霄飛車 +STR_0095 :高地式雲霄飛車 +STR_0096 :傳統木製雲霄飛車 STR_0512 :一款帶有螺旋式鏈條坡道, 以及順滑又彎曲的下坡的雲霄飛車 STR_0513 :一款乘客需要以站立乘坐的迴環式雲霄飛車 STR_0514 :列車懸吊在雲霄飛車的軌道下, 並會在拐彎的時候搖擺乘客到旁邊 @@ -177,6 +179,8 @@ STR_0600 :有動車的採礦列車遊走在順滑但又曲折的軌道配置 STR_0602 :雲霄飛車列車由直線發動機加速離開車站, 穿過盤繞的倒轉軌道後回到車站 STR_0603 :一款木製的列車配上鋼鐵軌道的雲霄飛車, 使它能擁有陡下坡及倒轉軌道. STR_0604 :遊客乘坐在單人形式的車輛中於狹窄的單軌上穿梭於緊密的倒轉軌道及方向轉變. +STR_0605 :乘客乘坐於長雪橇慢慢地滑下金屬軌道, 並以煞車控制速度. +STR_0606 :這個舊式木製雲霄飛車會飛馳過高低不平的軌道, 給乘客充足的‘空中時間’及一些橫向重力之餘, 同時會給人一種‘失去控制’的乘坐體驗 STR_0767 :遊客{INT32} STR_0768 :清潔工人{INT32} STR_0769 :維修人員{INT32} @@ -751,7 +755,7 @@ STR_1363 :高度過高無法支撐! STR_1364 :無法再擴展空中軌道的支撐! STR_1365 :直線滾翻 (向左) STR_1366 :直線滾翻 (向右) -STR_1367 :二分之一迴環 +STR_1367 :小型的二分之一迴環 STR_1368 :二分之一螺旋 (向左) STR_1369 :二分之一螺旋 (向右) STR_1370 :直線滾翻 (向左) @@ -1243,7 +1247,7 @@ STR_1863 :位清潔工人 STR_1864 :位維修人員 STR_1865 :位安全警衛 STR_1866 :位表演人員 -STR_1867 :{BLACK}{COMMA16} {STRINGID} +STR_1867 :{BLACK}{COMMA32} {STRINGID} STR_1868 :不能改變旋轉次數… STR_1869 :{WINDOW_COLOUR_2}旋轉次數: STR_1870 :完整旋轉次數 @@ -1675,7 +1679,7 @@ STR_2314 :{WINDOW_COLOUR_2}軌道長度: {BLACK}{STRINGID} STR_2315 :{WINDOW_COLOUR_2}建造費用: {BLACK}約{CURRENCY} STR_2316 :{WINDOW_COLOUR_2}需要空間: {BLACK}{COMMA16} x {COMMA16}格 STR_2321 :{WINDOW_COLOUR_2}遊樂設施/店鋪數目: {BLACK}{COMMA16} -STR_2322 :{WINDOW_COLOUR_2}員工數目: {BLACK}{COMMA16} +STR_2322 :{WINDOW_COLOUR_2}員工數目: {BLACK}{COMMA32} STR_2323 :{WINDOW_COLOUR_2}樂園大小: {BLACK}{COMMA32}m² STR_2324 :{WINDOW_COLOUR_2}樂園大小: {BLACK}{COMMA32}平方英尺 STR_2325 :購買土地來擴展樂園 @@ -2652,7 +2656,6 @@ STR_5375 :▲ STR_5376 :▼ STR_5404 :名稱已經存在 STR_5440 :當焦點失去時最小化全螢幕的遊戲 -STR_5441 :以軌道類別分別遊樂設施,{NEWLINE}就像夢幻遊樂園1(RCT1)一樣,{NEWLINE}令到車輔風格可以在建造後更改. STR_5442 :固定樂園評價: STR_5447 :類別 {STRINGID} STR_5448 :遊樂設施/車輛 {STRINGID} @@ -2994,7 +2997,7 @@ STR_5832 :將高度的單位顯示為一個通用單位, 而不使用在“ STR_5833 :改變日期格式 STR_5834 :選擇OpenRCT2會使用的音效設備 STR_5835 :當焦點失去時靜音 -STR_5836 :選擇主選單音樂.選擇夢幻遊樂園(RCT1)的主選單音樂{NEWLINE}需要複製夢幻遊樂園(RCT1)文件夾中的‘data/css17.dat’到模擬樂園(RCT2)的文件夾, 並重新命名為‘data/css50.dat’, 又或者於“其他”設置中設置夢幻遊樂園(RCT1)的安裝路徑. +STR_5836 :選擇主選單音樂.{NEWLINE}選擇夢幻遊樂園(RCT1)的主選單音樂需要於“其他”設置中設置夢幻遊樂園(RCT1)的安裝路徑. STR_5837 :建立或管理自訂的介面主題 STR_5838 :在工具列上顯示單獨的財政按鈕 STR_5839 :在工具列上顯示單獨的研發按鈕 @@ -3430,7 +3433,7 @@ STR_6318 :檢測到網絡不同步.{NEWLINE}記錄檔: {STRING} STR_6319 :關閉區域煞車 STR_6320 :永不損壞 STR_6321 :附加物品已損壞 -STR_6322 :{WINDOW_COLOUR_2}元素ID: {BLACK}{INT32} +STR_6322 :{WINDOW_COLOUR_2}個體ID: {BLACK}{INT32} STR_6323 :模擬運作中 STR_6324 :模擬 STR_6325 :模擬遊樂設施的運作 @@ -3580,8 +3583,8 @@ STR_6470 :選擇較大的巡邏區域 STR_6471 :略過植被 STR_6472 :略過車輛 STR_6473 :略過支撐 -STR_6474 :略過遊客 -STR_6475 :略過員工 +STR_6474 :透明化遊客 +STR_6475 :透明化員工 STR_6476 :透明化植被 STR_6477 :透明化景物 STR_6478 :透明化道路 @@ -3592,12 +3595,57 @@ STR_6482 :透明化選項 STR_6483 :開啟透明化選項 STR_6484 :開關‘略過植被’選項 STR_6485 :開關‘略過車輛’選項 -STR_6486 :開關‘略過遊客’選項 -STR_6487 :開關‘略過員工’選項 +STR_6486 :開關‘透明化遊客’選項 +STR_6487 :開關‘透明化員工’選項 STR_6488 :{RED}遊客都在投訴樂園裡的輪侯區長度過長{NEWLINE}請檢查樂園的輪侯區道路設計是否需要改善, 或增加遊樂設施的載客量. STR_6489 :錯誤: 不兼容的樂園文件版本 STR_6490 :警告: 部份兼容的樂園文件版本 -STR_6492 :此樂園從較舊的OpenRCT2中儲存, 而且不能於此版本中開啟. 樂園文件版本為v{INT32}. +STR_6491 :此樂園從較新的OpenRCT2中儲存. 儲存樂園文件版本為v{INT32}及需要至少v{INT32}. 你目前使用v{INT32}. +STR_6492 :此樂園從較舊的OpenRCT2中儲存, 而且不能於此版本中開啟. 儲存樂園文件版本為v{INT32}. +STR_6493 :此樂園從較新的OpenRCT2中儲存, 部份資料可能會被遺失. 儲存樂園文件版本為v{INT32}及需要至少v{INT32}. 你目前使用v{INT32}. +STR_6494 :以遊樂設施種類分類 +STR_6495 :以遊樂設施種類分類, 而不獨立地以列車分類. +STR_6496 :{WINDOW_COLOUR_2}{STRINGID} +STR_6497 :點擊方格顯示其方格元素.{NEWLINE}同時按下Ctrl及點擊方格元素即可直接選取. +STR_6498 :啟用後會維持產生正方形地圖. +STR_6499 :軌道設計格式不支持此車輛種類 +STR_6500 :軌道設計格式不支持此軌道配置 +STR_6501 :隨機顏色 +STR_6502 :請輸入介於{COMMA16}及{COMMA16}的數值 +STR_6503 :請選擇至少一個車站物件 +STR_6504 :請選擇至少一個地型表面 +STR_6505 :請選擇至少一個地型邊緣 +STR_6506 :巨型的二分之一螺旋 (向左) +STR_6507 :巨型的二分之一螺旋 (向右) +STR_6508 :小型的二分之一迴環 (向左) +STR_6509 :小型的二分之一迴環 (向右) +STR_6510 :無重力滾翻 (向左) +STR_6511 :無重力滾翻 (向右) +STR_6512 :巨型的無重力滾翻 (向左) +STR_6513 :巨型的無重力滾翻 (向右) +STR_6514 :不適合的高度! +STR_6515 :{BLACK}並未設置夢幻遊樂園(RCT1)的安裝路徑 - 將會使用替代圖片. +STR_6516 :添加的一個或更多的物件需要設置夢幻遊樂園(RCT1)的安裝路徑以正確顯示. 將會使用替代圖片. +STR_6517 :樂園中的一個或更多的物件需要設置夢幻遊樂園(RCT1)的安裝路徑以正確顯示. 將會使用替代圖片. +STR_6518 :{BLACK}將滑鼠指標放在劇情上以查看其簡介及目標. 點擊它即可開始遊玩. +STR_6519 :附加樂園 +STR_6520 :資料包 +STR_6521 :低優先次序 +STR_6522 :高優先次序 +STR_6523 :降低被選中的資料包優先次序. +STR_6524 :提升被選中的資料包優先次序. +STR_6525 :以選中的資料包重新載入遊戲內所有的物件資料. +STR_6526 :(基本圖像, 音樂及聲音效果) +STR_6527 :比賽 +STR_6528 :不適合的軌道參數! +STR_6529 :不適合的顏色調配參數! +STR_6530 :玩家創作的擴展地圖 +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_6537 :容許使用一般道路為輪候區 +STR_6538 :於“道路”視窗內的輪候區下拉選單中顯示一般道路. ############# # Scenarios # diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 5a0b25b5a2..aa1f740f76 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,3 +1,76 @@ +0.4.4 (in development) +------------------------------------------------------------------------ +- Feature: [#11269] Add properties for speed and length of vehicle animations. +- Feature: [#15849] Objectives can now be set for up to 50000 guests. +- Feature: [#18537] Add shift/control modifiers to window close buttons, closing all but the given window or all windows of the same type, respectively. +- Feature: [#18732] [Plugin] API to get the guests thoughts. +- Feature: [#18744] Cheat to allow using a regular path as a queue path. +- Feature: [#19023] Add Canadian French translation. +- Feature: [#19341] Add “All Scenery” tab to scenery window. +- Feature: [#19378] Add command to combine CSG1i.DAT and CSG1.DAT. +- Feature: [objects#226] Port RCT1 Corkscrew Coaster train. +- Feature: [objects#229] Port RCT1 go karts with helmets. +- Feature: [OpenMusic#20, OpenMusic#21] Added Blizzard and Extraterresterial ride music styles. +- Improved: [#11473] Hot reload for plug-ins now works on macOS. +- Improved: [#12466] RCT1 parks now use RCT1’s interest calculation algorithm. +- Improved: [#14635] Scenery window now shows up to 255 scenery groups. +- Improved: [#17288] Reorganise the order of shortcut keys in the Shortcut Keys window. +- Improved: [#18706] Ability to view the list of contributors in-game. +- Improved: [#18749] Ability to have 4 active awards for more than one month in a row. +- Improved: [#18826] [Plugin] Added all actions and their documentation to plugin API. +- Improved: [#18945] Languages can now fall back to other languages than English. +- Improved: [#18970] Trying to load a non-park save will now display a context error. +- Improved: [#18975] Add lift sprites for steep hills on the wooden roller coaster. +- Improved: [#19044] Added special thanks to RMC and Wiegand to the About page. +- Improved: [#19131] Track missing objects when selecting scenery groups in console. +- Improved: [#19253] Queue junctions drawn properly when using regular paths as queue. Note: Requires using tile inspector to indicate railings can be used at T or X junctions. +- Improved: [#19067] New Ride window now allows filtering similarly to Object Selection. +- Improved: [#19272] Scenery window now allows filtering similarly to Object Selection. +- Improved: [#19447] The control key now enables word jumping in text input fields. +- Improved: [#19463] Added ‘W’ and ‘Y’ with circumflex to sprite font (for Welsh). +- Improved: [#19549] Enable large address awareness for 32 bit Windows builds allowing to use 4 GiB of virtual memory. +- Improved: [#19668] Decreased the minimum map size from 13 to 3. +- Improved: [#19683] The delays for ride ratings to appear has been reduced drastically. +- Improved: [#19697] “Show guest purchases” will now work in multiplayer. +- Change: [#19018] Renamed actions to fit the naming scheme. +- Change: [#19091] [Plugin] Add game action information to callback arguments of custom actions. +- Change: [#19233] Reduce lift speed minimum and maximum values for “Classic Wooden Coaster”. +- Removed: [#19520] Support for Windows Vista systems. +- Fix: [#474] Mini golf window shows more players than there actually are (original bug). +- Fix: [#592] Window scrollbar not able to navigate to the end of large lists. +- Fix: [#7210] Land tile smoothing occurs with edge tiles (original bug). +- Fix: [#17996] Finances window not cleared when starting some .park scenarios. +- Fix: [#18260] Crash opening parks that have multiple tiles referencing the same banner entry. +- Fix: [#18467] “Selected only” Object Selection filter is active in Track Designs Manager, and cannot be toggled. +- Fix: [#18904] OpenRCT2 audio object accidentally exported in saves. +- Fix: [#18905] Ride Construction window theme is not applied correctly. +- Fix: [#18911] Mini Golf station does not draw correctly from all angles. +- Fix: [#18971] New Game does not prompt for save before quitting. +- Fix: [#18986] [Plugin] Sending remote scripts larger than 63KiB crashing all clients. +- Fix: [#18994] Title music doesn’t start after enabling master volume. +- Fix: [#19025] Park loan behaves inconsistently with non-round and out-of-bounds values. +- Fix: [#19026] Park loan is clamped to a 32-bit integer. +- Fix: [#19068] Guests may not join queues correctly. +- Fix: [#19091] [Plugin] Remote plugins in multiplayer servers do not unload properly. +- Fix: [#19112] Clearing the last character in the Object Selection filter does not properly reset it. +- Fix: [#19112] Text boxes not updated with empty strings in Track List, Server List, and Start Server windows. +- Fix: [#19114] [Plugin] ‘GameActionResult’ does not comply to API specification. +- Fix: [#19136] SV6 saves with experimental RCT1 paths not imported correctly. +- Fix: [#19243] .park scenarios don’t complete properly. +- Fix: [#19250] MusicObjects do not free their preview images. +- Fix: [#19292] Overflow in ‘totalRideValue’. +- Fix: [#19339] Incorrect import of crashed particles from SV4. +- Fix: [#19379] “No platforms” station style shows platforms on the Junior Roller Coaster. +- Fix: [#19380] Startup crash when no sequences are installed and random sequences are enabled. +- Fix: [#19391] String corruption caused by an improper buffer handling in ‘GfxWrapString’. +- Fix: [#19434, #19509] Object types added by OpenRCT2 do not get removed when executing ‘remove_unused_objects’. +- Fix: [#19475] Cannot increase loan when more than £1000 in debt. +- Fix: [#19493] SV4 saves not importing the correct vehicle colours. +- Fix: [#19517] Crash when peeps try to exit or enter hacked rides that have no waypoints specified. +- Fix: [#19524] Staff counter shows incorrect values if there are more than 32767 staff members. +- Fix: [#19574] Handle exits in null locations. +- Fix: [#19641, #19643] Missing water tile in Infernal Views’ and Six Flags Holland’s river. + 0.4.3 (2022-12-14) ------------------------------------------------------------------------ - Feature: [#17782] The Flying Coaster now has access to boosters and can draw outside loops. @@ -25,7 +98,7 @@ - Change: [#17998] Show cursor when using inverted mouse dragging. - Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats. - Change: [#18381] Convert custom invisible paths to the built-in ones. -- Change: [OpenSFX#11, OpenMusic#19] First implementation of official replacement asset packs for sound effects & music. +- Change: [OpenSFX#11, OpenMusic#19] First implementation of official replacement asset packs for sound effects & music. - Fix: [#1491] Clearance of the Cash Machine is too low (original bug). - Fix: [#1519] “See-through rides” doesn't affect all rides (original bug). - Fix: [#6341] “Unlock vehicle limits” does not allow setting fewer vehicles than the vehicle type requires. @@ -124,7 +197,7 @@ - Fix: [#17571] All researched tracked rides show up as new vehicles in .park scenarios. - Fix: [#17600] Notifications are not properly cleared when loading a park. - Fix: [#17605] Crash when opening parks which have had objects removed externally. -- Fix: [#17639, 17735] When building upside down, the special elements list contains many items twice (original bug). +- Fix: [#17639, #17735] When building upside down, the special elements list contains many items twice (original bug). - Fix: [#17664] Unable to save after an extended period of time due to inactive ride music data leaking. - Fix: [#17703] (undefined string) when building on invalid height. - Fix: [#17776] “Other Parks” tab uses separate lists for SC4/SC6 and .park scenarios. diff --git a/distribution/openrct2.d.ts b/distribution/openrct2.d.ts index 0c68e395a7..0b3f305d33 100644 --- a/distribution/openrct2.d.ts +++ b/distribution/openrct2.d.ts @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -137,7 +137,11 @@ declare global { type: PluginType; licence: string; minApiVersion?: number; - targetApiVersion?: number; + /** + * The Plug-in API version the current plug-in is designed for. This is used for backwards compatibility. + * E.g.: 66 + */ + targetApiVersion: number; main: () => void; } @@ -230,6 +234,8 @@ declare global { */ getTrackSegment(type: number): TrackSegment | null; + getAllTrackSegments(): TrackSegment[]; + /** * Gets the image number for the given icon. * @param iconName The name of the icon. @@ -261,10 +267,10 @@ declare global { * @param execute Logic for validating and executing the action. * @throws An error if the action has already been registered by this or another plugin. */ - registerAction( + registerAction( action: string, - query: (args: object) => GameActionResult, - execute: (args: object) => GameActionResult): void; + query: (args: GameActionEventArgs) => GameActionResult, + execute: (args: GameActionEventArgs) => GameActionResult): void; /** * Query the result of running a game action. This allows you to check the outcome and validity of @@ -273,8 +279,89 @@ declare global { * @param args The action parameters. * @param callback The function to be called with the result of the action. */ - queryAction(action: ActionType, args: object, callback?: (result: GameActionResult) => void): void; 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: "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; + queryAction(action: "bannersetstyle", args: BannerSetStyleArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "cheatset", args: CheatSetArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "clearscenery", args: ClearSceneryArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "climateset", args: ClimateSetArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "footpathadditionplace", args: FootpathAdditionPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "footpathadditionremove", args: FootpathAdditionRemoveArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "footpathplace", args: FootpathPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "footpathlayoutplace", args: FootpathLayoutPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "footpathremove", args: FootpathRemoveArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "guestsetflags", args: GuestSetFlagsArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "guestsetname", args: GuestSetNameArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "landbuyrights", args: LandBuyRightsArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "landlower", args: LandLowerArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "landraise", args: LandRaiseArgs, callback?: (result: GameActionResult) => void): void; + 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: "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; + queryAction(action: "mapchangesize", args: MapChangeSizeArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "mazeplacetrack", args: MazePlaceTrackArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "mazesettrack", args: MazeSetTrackArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "networkmodifygroup", args: NetworkModifyGroupArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parkentranceplace", args: ParkEntrancePlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parkentranceremove", args: ParkEntranceRemoveArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parkmarketing", args: ParkMarketingArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parksetdate", args: ParkSetDateArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parksetentrancefee", args: ParkSetEntranceFeeArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parksetloan", args: ParkSetLoanArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parksetname", args: ParkSetNameArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parksetparameter", args: ParkSetParameterArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "parksetresearchfunding", args: ParkSetResearchFundingArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "pausetoggle", args: PauseToggleArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "peeppickup", args: PeepPickupArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "peepspawnplace", args: PeepSpawnPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "playerkick", args: PlayerKickArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "playersetgroup", args: PlayerSetGroupArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridecreate", args: RideCreateArgs, callback?: (result: RideCreateActionResult) => void): void; + queryAction(action: "ridedemolish", args: RideDemolishArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "rideentranceexitplace", args: RideEntranceExitPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "rideentranceexitremove", args: RideEntranceExitRemoveArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridefreezerating", args: RideFreezeRatingArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetappearance", args: RideSetAppearanceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetcolourscheme", args: RideSetColourSchemeArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetname", args: RideSetNameArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetprice", args: RideSetPriceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetsetting", args: RideSetSettingArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetstatus", args: RideSetStatusArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "ridesetvehicle", args: RideSetVehicleArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "scenariosetsetting", args: ScenarioSetSettingArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "signsetname", args: SignSetNameArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "signsetstyle", args: SignSetStyleArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "smallsceneryplace", args: SmallSceneryPlaceArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "smallsceneryremove", args: SmallSceneryRemoveArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "smallscenerysetcolour", args: SmallScenerySetColourArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "stafffire", args: StaffFireArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "staffhire", args: StaffHireArgs, callback?: (result: StaffHireNewActionResult) => void): void; + queryAction(action: "staffsetcolour", args: StaffSetColourArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "staffsetcostume", args: StaffSetCostumeArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "staffsetname", args: StaffSetNameArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "staffsetorders", args: StaffSetOrdersArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "staffsetpatrolarea", args: StaffSetPatrolAreaArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "surfacesetstyle", args: SurfaceSetStyleArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "tilemodify", args: TileModifyArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "trackdesign", args: TrackDesignArgs, callback?: (result: GameActionResult) => void): void; + 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: "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; + queryAction(action: "waterraise", args: WaterRaiseArgs, callback?: (result: GameActionResult) => void): void; + queryAction(action: "watersetheight", args: WaterSetHeightArgs, callback?: (result: GameActionResult) => void): void; /** * Executes a game action. In a network game, this will send a request to the server and wait @@ -283,8 +370,89 @@ declare global { * @param args The action parameters. * @param callback The function to be called with the result of the action. */ - executeAction(action: ActionType, args: object, callback?: (result: GameActionResult) => void): void; 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: "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; + executeAction(action: "bannersetstyle", args: BannerSetStyleArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "cheatset", args: CheatSetArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "clearscenery", args: ClearSceneryArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "climateset", args: ClimateSetArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "footpathadditionplace", args: FootpathAdditionPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "footpathadditionremove", args: FootpathAdditionRemoveArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "footpathplace", args: FootpathPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "footpathlayoutplace", args: FootpathLayoutPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "footpathremove", args: FootpathRemoveArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "guestsetflags", args: GuestSetFlagsArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "guestsetname", args: GuestSetNameArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "landbuyrights", args: LandBuyRightsArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "landlower", args: LandLowerArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "landraise", args: LandRaiseArgs, callback?: (result: GameActionResult) => void): void; + 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: "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; + executeAction(action: "mapchangesize", args: MapChangeSizeArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "mazeplacetrack", args: MazePlaceTrackArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "mazesettrack", args: MazeSetTrackArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "networkmodifygroup", args: NetworkModifyGroupArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parkentranceplace", args: ParkEntrancePlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parkentranceremove", args: ParkEntranceRemoveArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parkmarketing", args: ParkMarketingArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parksetdate", args: ParkSetDateArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parksetentrancefee", args: ParkSetEntranceFeeArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parksetloan", args: ParkSetLoanArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parksetname", args: ParkSetNameArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parksetparameter", args: ParkSetParameterArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "parksetresearchfunding", args: ParkSetResearchFundingArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "pausetoggle", args: PauseToggleArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "peeppickup", args: PeepPickupArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "peepspawnplace", args: PeepSpawnPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "playerkick", args: PlayerKickArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "playersetgroup", args: PlayerSetGroupArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridecreate", args: RideCreateArgs, callback?: (result: RideCreateActionResult) => void): void; + executeAction(action: "ridedemolish", args: RideDemolishArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "rideentranceexitplace", args: RideEntranceExitPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "rideentranceexitremove", args: RideEntranceExitRemoveArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridefreezerating", args: RideFreezeRatingArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetappearance", args: RideSetAppearanceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetcolourscheme", args: RideSetColourSchemeArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetname", args: RideSetNameArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetprice", args: RideSetPriceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetsetting", args: RideSetSettingArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetstatus", args: RideSetStatusArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "ridesetvehicle", args: RideSetVehicleArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "scenariosetsetting", args: ScenarioSetSettingArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "signsetname", args: SignSetNameArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "signsetstyle", args: SignSetStyleArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "smallsceneryplace", args: SmallSceneryPlaceArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "smallsceneryremove", args: SmallSceneryRemoveArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "smallscenerysetcolour", args: SmallScenerySetColourArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "stafffire", args: StaffFireArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "staffhire", args: StaffHireArgs, callback?: (result: StaffHireNewActionResult) => void): void; + executeAction(action: "staffsetcolour", args: StaffSetColourArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "staffsetcostume", args: StaffSetCostumeArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "staffsetname", args: StaffSetNameArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "staffsetorders", args: StaffSetOrdersArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "staffsetpatrolarea", args: StaffSetPatrolAreaArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "surfacesetstyle", args: SurfaceSetStyleArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "tilemodify", args: TileModifyArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "trackdesign", args: TrackDesignArgs, callback?: (result: GameActionResult) => void): void; + 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: "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; + executeAction(action: "waterraise", args: WaterRaiseArgs, callback?: (result: GameActionResult) => void): void; + executeAction(action: "watersetheight", args: WaterSetHeightArgs, callback?: (result: GameActionResult) => void): void; /** * Subscribes to the given hook. @@ -443,14 +611,14 @@ declare global { "bannersetcolour" | "bannersetname" | "bannersetstyle" | - "changemapsize" | + "cheatset" | "clearscenery" | "climateset" | - "footpathplace" | - "footpathplacefromtrack" | - "footpathremove" | "footpathadditionplace" | "footpathadditionremove" | + "footpathplace" | + "footpathlayoutplace" | + "footpathremove" | "guestsetflags" | "guestsetname" | "landbuyrights" | @@ -458,44 +626,47 @@ declare global { "landraise" | "landsetheight" | "landsetrights" | - "landsmoothaction" | + "landsmooth" | "largesceneryplace" | "largesceneryremove" | "largescenerysetcolour" | "loadorquit" | + "mapchangesize" | "mazeplacetrack" | "mazesettrack" | "networkmodifygroup" | + "parkentranceplace" | "parkentranceremove" | "parkmarketing" | "parksetdate" | + "parksetentrancefee" | "parksetloan" | "parksetname" | "parksetparameter" | "parksetresearchfunding" | "pausetoggle" | "peeppickup" | - "placeparkentrance" | - "placepeepspawn" | + "peepspawnplace" | "playerkick" | "playersetgroup" | "ridecreate" | "ridedemolish" | "rideentranceexitplace" | "rideentranceexitremove" | + "ridefreezerating" | "ridesetappearance" | "ridesetcolourscheme" | "ridesetname" | "ridesetprice" | "ridesetsetting" | "ridesetstatus" | - "ridesetvehicles" | + "ridesetvehicle" | "scenariosetsetting" | - "setcheataction" | - "setparkentrancefee" | "signsetname" | + "signsetstyle" | "smallsceneryplace" | "smallsceneryremove" | + "smallscenerysetcolour" | "stafffire" | "staffhire" | "staffsetcolour" | @@ -516,12 +687,605 @@ declare global { "waterraise" | "watersetheight"; - interface GameActionEventArgs { + + interface GameActionArgs { + flags?: number; // see GAME_COMMAND in openrct2/Game.h + } + + interface BalloonPressArgs extends GameActionArgs { + id: number; + } + + interface BannerPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + object: number; + primaryColour: number; + } + + interface BannerRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + } + + interface BannerSetColourArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + primaryColour: number; + } + + interface BannerSetNameArgs extends GameActionArgs { + id: number; + name: string; + } + + interface BannerSetStyleArgs extends GameActionArgs { + id: number; + type: number; // 0: primary colour, 1: secondary colour: 2: no entry + parameter: number; // primary colour | secondary colour | 0: disable, 1: enable + } + + interface CheatSetArgs extends GameActionArgs { + type: number; // see CheatType in openrct2/Cheats.h + param1: number; // see openrct2/actions/CheatSetAction.cpp + param2: number; // see openrct2/actions/CheatSetAction.cpp + } + + interface ClearSceneryArgs extends GameActionArgs { + itemsToClear: number; // Bit mask. 1: small scenery and walls, 2: large scenery, 4: footpaths. + } + + interface ClimateSetArgs extends GameActionArgs { + climate: number; // 0: cool and wet, 1: warm, 2: hot and dry, 3: cold + } + + interface FootpathAdditionPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + object: number; + } + + interface FootpathAdditionRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + } + + interface FootpathPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; // direction or 0xFF + object: number; // surface object + railingsObject: number; + slope: number; // 0: flat, 4,5,6,7: slope direction + 4 + constructFlags: number; + } + + // see openrct2/actions/FootpathPlaceFromTrackAction + interface FootpathLayoutPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + edges: number; // bit mask + object: number; + railingsObject: number; + slope: number; // 0: flat, 4,5,6,7: slope direction + 4 + constructFlags: number; + } + + interface FootpathRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + } + + // recommendation: use Peep.setFlag instead of the GuestSetFlag action + interface GuestSetFlagsArgs extends GameActionArgs { + peep: number; + guestFlags: number; // see PEEP_FLAGS in openrct2/entity/Peep.h + } + + interface GuestSetNameArgs extends GameActionArgs { + peep: number; + name: string; + } + + interface LandBuyRightsArgs extends GameActionArgs { + x1: number; + y1: number; + x2: number; + y2: number; + setting: number; // 0: buy land, 1: buy construction rights + } + + // x, y specify the centre. Only used for GameActionResult and 3D audio position. + // x1, y1, x2, y2 specify a map range + interface LandLowerArgs extends GameActionArgs { + x: number; + y: number; + x1: number; + y1: number; + x2: number; + y2: number; + selectionType: number; // see MAP_SELECT_TYPE in openrct2/world/Map.h + } + + // x, y specify the centre. Only used for GameActionResult and 3D audio position. + // x1, y1, x2, y2 specify a map range + interface LandRaiseArgs extends GameActionArgs { + x: number; + y: number; + x1: number; + y1: number; + x2: number; + y2: number; + selectionType: number; // see MAP_SELECT_TYPE in openrct2/world/Map.h + } + + interface LandSetHeightArgs extends GameActionArgs { + x: number; + y: number; + height: number; + style: number; // see TILE_ELEMENT_SLOPE in openrct2/world/Surface.h + } + + interface LandSetRightsArgs extends GameActionArgs { + x1: number; + y1: number; + x2: number; + y2: number; + setting: number; // 0: unown land, 1: unown construction rights, 2: set for sale, 3: set construction rights for sale, 4: set ownership + ownership: number; // only used if setting = 4 (set ownership). See OWNERSHIP in openrct2/world/Surface.h + } + + // x, y specify the centre. Only used for GameActionResult and 3D audio position. + // x1, y1, x2, y2 specify a map range + interface LandSmoothArgs extends GameActionArgs { + x: number; + y: number; + x1: number; + y1: number; + x2: number; + y2: number; + selectionType: number; // see MAP_SELECT_TYPE in openrct2/world/Map.h + isLowering: boolean; + } + + interface LargeSceneryPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + object: number; + primaryColour: number; + secondaryColour: number; + tertiaryColour: number; + } + + interface LargeSceneryRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + tileIndex: number; + } + + interface LargeScenerySetColourArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + tileIndex: number; + primaryColour: number; + secondaryColour: number; + tertiaryColour: number; + } + + interface LoadOrQuitArgs extends GameActionArgs { + mode: number; // 0: open save prompt, 1: close save prompt + savePromptMode: number; // 0: save before load, 1: save before quit. Only used if mode = 0 (open save prompt). + } + + interface MapChangeSizeArgs extends GameActionArgs { + targetSizeX: number; + targetSizeY: number; + } + + interface MazePlaceTrackArgs extends GameActionArgs { + x: number; + y: number; + z: number; + ride: number; + mazeEntry: number; + } + + interface MazeSetTrackArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + ride: number; + mode: number; // 0: build, 1: move, 2: fill + isInitialPlacement: boolean; + } + + interface NetworkModifyGroupArgs extends GameActionArgs { + type: number; // 0: add group, 1: remove group, 2: set permissions, 3: set name, 4: set default + groupId: number; // ignored if type = 0 (add group) + name: string; // only used if type = 3 (set name) + permissionIndex: number; // only used if type = 2 (set permissions). See NetworkPermission in openrct2/network/NetworkAction.h + permissionState: number; // only used if type = 2 (set permissions). 0: toggle, 1: set all, 2: clear all + } + + interface ParkEntrancePlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + footpathSurfaceObject: number; + } + + interface ParkEntranceRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + } + + interface ParkMarketingArgs extends GameActionArgs { + type: number; // see ADVERTISING_CAMPAIGN in openrct2/management/Marketing.h + item: number; // ride id or shop item. See ShopItem in openrct2/ride/ShopItem.h + numweeks: number; + } + + interface ParkSetDateArgs extends GameActionArgs { + year: number; + month: number; + day: number; + } + + interface ParkSetEntranceFeeArgs extends GameActionArgs { + value: number; + } + + interface ParkSetLoanArgs extends GameActionArgs { + value: number; + } + + interface ParkSetNameArgs extends GameActionArgs { + name: string; + } + + interface ParkSetParameterArgs extends GameActionArgs { + parameter: number; // 0: close park, 1: open park, 2: set same price in park + value: number; // only used if parameter = 2 (set same price in park). Bit mask. See ShopItem in openrct2/ride/ShopItem.h + } + + interface ParkSetResearchFundingArgs extends GameActionArgs { + priorities: number; // bit mask. See ResearchCategory in openrct2/management/Research.h + fundingAmount: number; // 0: none, 1: minimal, 2: normal, 3: maximum + } + + interface PauseToggleArgs extends GameActionArgs { + } + + interface PeepPickupArgs extends GameActionArgs { + type: number; // 0: pickup, 1: cancel, 2: place + id: number; + x: number; // unused if type = 0. If type = 1 (cancel), this needs to be the peep's x position BEFORE pickup + y: number; // only used if type = 2 (place) + z: number; // only used if type = 2 (place) + playerId: number; // 0 in single player + } + + interface PeepSpawnPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + } + + interface PlayerKickArgs extends GameActionArgs { + playerId: number; + } + + interface PlayerSetGroupArgs extends GameActionArgs { + playerId: number; + groupId: number; + } + + interface RideCreateArgs extends GameActionArgs { + rideType: number; + rideObject: number; + entranceObject: number; + colour1: number; + colour2: number; + } + + interface RideDemolishArgs extends GameActionArgs { + ride: number; + modifyType: number; // 0: demolish, 1: renew + } + + interface RideEntranceExitPlaceArgs extends GameActionArgs { + x: number; + y: number; + direction: number; + ride: number; + station: number; + isExit: boolean; + } + + interface RideEntranceExitRemoveArgs extends GameActionArgs { + x: number; + y: number; + ride: number; + station: number; + isExit: boolean; + } + + interface RideFreezeRatingArgs extends GameActionArgs { + ride: number; + type: number; // 0: excitement, 1: intensity, 2: nausea + value: number; + } + + interface RideSetAppearanceArgs extends GameActionArgs { + ride: number; + type: number; // see RideSetAppearanceType in openrct2/actions/RideSetAppearanceAction.h + // value: + // - if type is one of the track or vehicle colours: colour + // - if type is VehicleColourScheme: 0: all same, 1: per train, 2: per car + // - if type is EntranceStyle: entrance style + // - if type is SellingItemColourIsRandom: 0: disabled, 1: enabled + value: number; + index: number; // colour scheme index, only used if type is one of the track or vehicle colours + } + + interface RideSetColourSchemeArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + trackType: number; + colourScheme: number; + } + + interface RideSetNameArgs extends GameActionArgs { + ride: number; + name: string; + } + + interface RideSetPriceArgs extends GameActionArgs { + ride: number; + price: number; + isPrimaryPrice: boolean; + } + + interface RideSetSettingArgs extends GameActionArgs { + ride: number; + setting: number; // see RideSetSetting in openrct2/actions/RideSetSettingAction.h + value: number; + } + + interface RideSetStatusArgs extends GameActionArgs { + ride: number; + status: number; // 0: closed, 1: open, 2: testing, 3: simulating + } + + interface RideSetVehicleArgs extends GameActionArgs { + ride: number; + type: number; // 0: number of trains, 1: number of cars per train, 2: ride entry + value: number; // number value or sub type + colour: number; // only used if type is ride entry + } + + interface ScenarioSetSettingArgs extends GameActionArgs { + setting: number; // see ScenarioSetSetting in openrct2/actions/ScenarioSetSettingAction.h + value: number; + } + + interface SignSetNameArgs extends GameActionArgs { + id: number; + name: string; + } + + interface SignSetStyleArgs extends GameActionArgs { + id: number; + mainColour: number; + textColour: number; + isLarge: boolean; + } + + interface SmallSceneryPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + object: number; + quadrant: number; + primaryColour: number; + secondaryColour: number; + } + + interface SmallSceneryRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + object: number; + quadrant: number; + } + + interface SmallScenerySetColourArgs extends GameActionArgs { + x: number; + y: number; + z: number; + quadrant: number; + sceneryType: number; + primaryColour: number; + secondaryColour: number; + tertiaryColour: number; + } + + interface StaffFireArgs extends GameActionArgs { + id: number; + } + + interface StaffHireArgs extends GameActionArgs { + autoPosition: boolean; + staffType: number; // 0: handyman, 1: mechanic, 2: security, 3: entertainer + entertainerType: number; // see EntertainerCostume in openrct2/entity/Staff.h + staffOrders: number; // bit mask. See STAFF_ORDERS in openrct2/entity/Staff.h + } + + interface StaffSetColourArgs extends GameActionArgs { + staffType: number; // 0: handyman, 1: mechanic, 2: security, 3: entertainer + colour: number; + } + + interface StaffSetCostumeArgs extends GameActionArgs { + id: number; + costume: number; // see EntertainerCostume in openrct2/entity/Staff.h + } + + interface StaffSetNameArgs extends GameActionArgs { + id: number; + name: string; + } + + interface StaffSetOrdersArgs extends GameActionArgs { + id: number; + staffOrders: number; // bit mask. See STAFF_ORDERS in openrct2/entity/Staff.h + } + + interface StaffSetPatrolAreaArgs extends GameActionArgs { + id: number; + x1: number; + y1: number; + x2: number; + y2: number; + mode: number; // 0: set, 1: unset, 2: clear all + } + + interface SurfaceSetStyleArgs extends GameActionArgs { + x1: number; + y1: number; + x2: number; + y2: number; + surfaceStyle: number; + edgeStyle: number; + } + + // does not support TileModifyType::AnyPaste + interface TileModifyArgs extends GameActionArgs { + x: number; + y: number; + setting: number; // see TileModifyType in openrct2/actions/TileModifyAction.h + value1: number; + value2: number; // see openrct2/actions/TileModifyAction.cpp + } + + // currently unsupported + interface TrackDesignArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + } + + interface TrackPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + ride: number; + trackType: number; + rideType: number; + brakeSpeed: number; + colour: number; + seatRotation: number; + trackPlaceFlags: number; + isFromTrackDesign: boolean; + } + + interface TrackRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + trackType: number; + sequence: number; + } + + interface TrackSetBrakeSpeedArgs extends GameActionArgs { + x: number; + y: number; + z: number; + trackType: number; + brakeSpeed: number; + } + + interface WallPlaceArgs extends GameActionArgs { + x: number; + y: number; + z: number; + object: number; + edge: number; // = direction + primaryColour: number; + secondaryColour: number; + tertiaryColour: number; + } + + interface WallRemoveArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + } + + interface WallSetColourArgs extends GameActionArgs { + x: number; + y: number; + z: number; + direction: number; + primaryColour: number; + secondaryColour: number; + tertiaryColour: number; + } + + interface WaterLowerArgs extends GameActionArgs { + x1: number; + y1: number; + x2: number; + y2: number; + } + + interface WaterRaiseArgs extends GameActionArgs { + x1: number; + y1: number; + x2: number; + y2: number; + } + + interface WaterSetHeightArgs extends GameActionArgs { + x: number; + y: number; + height: number; + } + + interface GameActionEventArgs { readonly player: number; readonly type: number; readonly action: string; readonly isClientOnly: boolean; - readonly args: object; + readonly args: T; result: GameActionResult; } @@ -534,8 +1298,12 @@ declare global { expenditureType?: ExpenditureType; } - interface RideCreateGameActionResult extends GameActionResult { - readonly ride: number; + interface RideCreateActionResult extends GameActionResult { + readonly ride?: number; + } + + interface StaffHireNewActionResult extends GameActionResult { + readonly peep?: number; } interface NetworkEventArgs { @@ -1187,62 +1955,58 @@ declare global { readonly description: string; /** - * The relative starting Z position. + * The relative starting Z position from the base of the first track sequence block. */ readonly beginZ: number; + /** + * The relative ending Z position from the base of the first track sequence block. + */ + readonly endZ: number; + + /** + * The relative ending X position. BeginX is always 0. + */ + readonly endX: number; + + /** + * The relative ending Y position. BeginY is always 0. + */ + readonly endY: number; + /** * The relative starting direction. Usually 0, but will be 4 * for diagonal segments. */ readonly beginDirection: Direction8; + /** + * The relative ending direction. + */ + readonly endDirection: Direction8; + /** * The slope angle the segment starts with. */ - readonly beginAngle: TrackSlope; + readonly beginSlope: TrackSlope; + + /** + * The slope angle the segment ends with. + */ + readonly endSlope: TrackSlope; /** * The kind of banking the segment starts with. */ readonly beginBank: TrackBanking; - /** - * The relative ending X position. - */ - readonly endX: number; - - /** - * The relative ending Y position. - */ - readonly endY: number; - - /** - * The relative ending Z position. Negative numbers indicate - * that the track ends upside down. - */ - readonly endZ: number; - - /** - * The relative ending direction. - */ - readonly endDirection: Direction8; - - - /** - * The slope angle the segment ends with. - */ - readonly endAngle: TrackSlope; - /** * The kind of banking the segment ends with. */ readonly endBank: TrackBanking; /** - * The length of the segment in RCT track length units. - * - * *1 metre = 1 / (2 ^ 16)* + * The rough length of the segment. */ readonly length: number; @@ -1251,6 +2015,97 @@ declare global { */ readonly elements: TrackSegmentElement[]; + /** + * The curve direction of the suggested following piece, or track segment if it is specified. + */ + readonly nextSuggestedSegment: TrackCurveType | number; + + /** + * The curve direction of the suggested preceding piece, or track segment if it is specified. + */ + readonly previousSuggestedSegment: TrackCurveType | number; + + /** + * The base price of the track segment. + */ + readonly priceModifier: number; + + /** + * Track segment representing the mirror image of the track segment. + */ + readonly mirrorSegment: number | null; + + /** + * Track segment representing the covered/flume variant of the track segment. + */ + readonly alternateTypeSegment: number | null; + + /** + * The group the track element belongs to. Ride types allow or disallow track groups to limit the + * buildable track segments. + */ + readonly trackGroup: number; + + /** + * Which direction the track curves towards. + */ + readonly turnDirection: TrackCurveType; + + /** + * Which direction the track slopes towards. + */ + readonly slopeDirection: TrackSlopeType; + + readonly onlyAllowedUnderwater: boolean; + readonly onlyAllowedAboveGround: boolean; + readonly allowsChainLift: boolean; + + /** + * The track segment counts as banked for vehicles with "no banked track" behaviour. + */ + readonly isBanked: boolean; + + /** + * The track segment counts as an inversion for vehicles with "no inversions" behaviour. + */ + readonly isInversion: boolean; + + /** + * Pevents steep forward chainlifts but allows steep reverse chainlifts for reverse incline + * shuttle mode for ride types which do not normally allow steep chainlifts. + */ + readonly isSteepUp: boolean; + + /** + * The track segment begins one height unit above normal track height units. + */ + readonly startsHalfHeightUp: boolean; + + /** + * The track segment adds to golf hole counter. + */ + readonly countsAsGolfHole: boolean; + + /** + * The track segment adds to banked turn counter. + */ + readonly isBankedTurn: boolean; + + /** + * The track segment adds to sloped turn counter. + */ + readonly isSlopedTurn: boolean; + + /** + * The track segment adds to helix counter. + */ + readonly isHelix: boolean; + + /** + * The track segment adds to inversion counter. Usually applied to the first half of inversions. + */ + readonly countsAsInversion: boolean; + /** * Gets a length of the subpositions list for this track segment. */ @@ -1280,6 +2135,9 @@ declare global { UpsideDown = 15 } + type TrackCurveType = "straight" | "left" | "right"; + type TrackSlopeType = "flat" | "up" | "down"; + interface TrackSegmentElement extends Readonly { } @@ -1731,8 +2589,173 @@ declare global { * Countdown between 0 and 255 that keeps track of how long the guest has been looking for its current destination. */ lostCountdown: number; + + /** + * The list of thoughts this guest has. + */ + readonly thoughts: Thought[]; } + /** + * Represents a guest's thought. This is a copy of a thought at a given time + * and its values will not update. + */ + interface Thought { + /** + * The type of thought. + */ + readonly type: ThoughtType; + + /** + * The thought argument. + */ + readonly item: number; + + /** + * The freshness of the thought - the larger the number, the less fresh + * the thought. + */ + readonly freshness: number; + + /** + * The freshness timeout. + */ + readonly freshTimeout: number; + + /** + * Get the string for this thought. + * The result contains Unicode quotes on either end, e.g. “I feel sick” + */ + toString(): string; + } + + type ThoughtType = + "cant_afford_ride" | + "spent_money" | + "sick" | + "very_sick" | + "more_thrilling" | + "intense" | + "havent_finished" | + "sickening" | + "bad_value" | + "go_home" | + "good_value" | + "already_got" | + "cant_afford_item" | + "not_hungry" | + "not_thirsty" | + "drowning" | + "lost" | + "was_great" | + "queuing_ages" | + "tired" | + "hungry" | + "thirsty" | + "toilet" | + "cant_find" | + "not_paying" | + "not_while_raining" | + "bad_litter" | + "cant_find_exit" | + "get_off" | + "get_out" | + "not_safe" | + "path_disgusting" | + "crowded" | + "vandalism" | + "scenery" | + "very_clean" | + "fountains" | + "music" | + "balloon" | + "toy" | + "map" | + "photo" | + "umbrella" | + "drink" | + "burger" | + "chips" | + "ice_cream" | + "candyfloss" | + "pizza" | + "popcorn" | + "hot_dog" | + "tentacle" | + "hat" | + "toffee_apple" | + "tshirt" | + "doughnut" | + "coffee" | + "chicken" | + "lemonade" | + "wow" | + "wow2" | + "watched" | + "balloon_much" | + "toy_much" | + "map_much" | + "photo_much" | + "umbrella_much" | + "drink_much" | + "burger_much" | + "chips_much" | + "ice_cream_much" | + "candyfloss_much" | + "pizza_much" | + "popcorn_much" | + "hot_dog_much" | + "tentacle_much" | + "hat_much" | + "toffee_apple_much" | + "tshirt_much" | + "doughnut_much" | + "coffee_much" | + "chicken_much" | + "lemonade_much" | + "photo2" | + "photo3" | + "photo4" | + "pretzel" | + "hot_chocolate" | + "iced_tea" | + "funnel_cake" | + "sunglasses" | + "beef_noodles" | + "fried_rice_noodles" | + "wonton_soup" | + "meatball_soup" | + "fruit_juice" | + "soybean_milk" | + "sujongkwa" | + "sub_sandwich" | + "cookie" | + "roast_sausage" | + "photo2_much" | + "photo3_much" | + "photo4_much" | + "pretzel_much" | + "hot_chocolate_much" | + "iced_tea_much" | + "funnel_cake_much" | + "sunglasses_much" | + "beef_noodles_much" | + "fried_rice_noodles_much" | + "wonton_soup_much" | + "meatball_soup_much" | + "fruit_juice_much" | + "soybean_milk_much" | + "sujongkwa_much" | + "sub_sandwich_much" | + "cookie_much" | + "roast_sausage_much" | + "help" | + "running_out" | + "new_ride" | + "nice_ride_deprecated" | + "excited_deprecated" | + "here_we_are"; + /** * Represents a staff member. */ @@ -2274,6 +3297,7 @@ declare global { sandboxMode: boolean; showAllOperatingModes: boolean; showVehiclesFromOtherTrackTypes: boolean; + allowRegularPathAsQueue: boolean; } /** @@ -2543,7 +3567,7 @@ declare global { type Widget = 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" | @@ -2553,7 +3577,7 @@ declare global { "mountain_tool_even" | "mountain_tool_odd" | "multiplayer" | "multiplayer_desync" | "multiplayer_sync" | "multiplayer_toolbar" | "multiplayer_toolbar_pressed" | "mute" | "mute_pressed" | "news_messages" | "normal_selection_6x6" | "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_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" | @@ -2645,14 +3669,16 @@ declare global { column: number; } + type ListViewItem = ListViewItemSeperator | string[] | string; + interface ListViewWidget extends WidgetBase { type: "listview"; scrollbars: ScrollbarType; isStriped: boolean; showColumnHeaders: boolean; columns: ListViewColumn[]; - items: string[]; - selectedCell: RowColumn; + items: ListViewItem[]; + selectedCell: RowColumn | null; readonly highlightedCell: RowColumn; canSelect: boolean; } @@ -2727,7 +3753,7 @@ declare global { * By default, text buttons have borders and image buttons do not but it can be overridden. */ border?: boolean; - image?: number; + image?: number | IconName; isPressed?: boolean; text?: string; onClick?: () => void; @@ -2774,8 +3800,6 @@ declare global { text?: string; } - type ListViewItem = ListViewItemSeperator | string[]; - interface RowColumn { row: number; column: number; @@ -2787,7 +3811,7 @@ declare global { isStriped?: boolean; showColumnHeaders?: boolean; columns?: Partial[]; - items?: string[] | ListViewItem[]; + items?: ListViewItem[]; selectedCell?: RowColumn; canSelect?: boolean; onHighlight?: (item: number, column: number) => void; diff --git a/distribution/readme.txt b/distribution/readme.txt index 5ecba52f65..36478a8a56 100644 --- a/distribution/readme.txt +++ b/distribution/readme.txt @@ -66,7 +66,7 @@ following information in your bug report: 3.0) Supported platforms ---- ------------------- -OpenRCT2 is currently supported on Windows Vista and above, many distributions of +OpenRCT2 is currently supported on Windows 7 and above, many distributions of Linux, macOS 10.13 or higher, Android, FreeBSD and OpenBSD. OpenRCT2 will only work on little-endian architectures. Further instructions can be found on GitHub. diff --git a/distribution/scripting.md b/distribution/scripting.md index 984748cfe9..a78ebc81f6 100644 --- a/distribution/scripting.md +++ b/distribution/scripting.md @@ -56,8 +56,9 @@ The hot reload feature can be enabled by editing your `config.ini` file and sett ## Breaking changes As of version 34 there are breaking Api changes. -> Version 34 -```Entity.type will now return "guest" or "staff" instead of "peep"``` +- **Version 34:** `Entity.type` will now return `"guest"` or `"staff"` instead of `"peep"`. +- **Version 63:** Accessing G2 sprites by id directly is now deprecated in favor of a future-proof implementation using `IconName` and/or `context.getIcon()`. +- **Version 68:** Custom game actions registered through `context.registerAction()` now wrap the callback arguments in a `GameActionEventArgs`, similar to `context.subscribe()` callbacks. ## Frequently Asked Questions diff --git a/distribution/windows/install.nsi b/distribution/windows/install.nsi index 04d6c2e51e..7f79863ffa 100644 --- a/distribution/windows/install.nsi +++ b/distribution/windows/install.nsi @@ -18,7 +18,7 @@ InstallDir "$PROGRAMFILES64\OpenRCT2\" !endif -!define SUPPORTED_OS "Windows Vista, 7, 8.1 and 10" +!define SUPPORTED_OS "Windows 7 and later" ; Define root variable relative to installer !define PATH_ROOT "..\..\" diff --git a/openrct2.common.props b/openrct2.common.props index 6afb7deebf..b32345eb7e 100644 --- a/openrct2.common.props +++ b/openrct2.common.props @@ -25,6 +25,10 @@ true + false + false + + false true @@ -54,7 +58,7 @@ C4549: 'operator': operator before comma has no effect; did you intend 'operator'? C4555: expression has no effect; expected expression with side-effect --> - OPENGL_NO_LINK;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + OPENGL_NO_LINK;_CRT_SECURE_NO_WARNINGS;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) __AVX2__;__SSE4_1__;%(PreprocessorDefinitions) ENABLE_SCRIPTING;%(PreprocessorDefinitions) MultiThreaded @@ -64,6 +68,7 @@ /utf-8 /std:c++17 /permissive- /Zc:externConstexpr + true wininet.lib;imm32.lib;version.lib;winmm.lib;crypt32.lib;wldap32.lib;shlwapi.lib;setupapi.lib;bcrypt.lib;winhttp.lib;%(AdditionalDependencies) fribidi.lib;%(AdditionalDependencies) /OPT:NOLBR /ignore:4099 %(AdditionalOptions) @@ -86,7 +91,7 @@ bz2d.lib;discord-rpc.lib;flac.lib;freetyped.lib;libpng16d.lib;ogg.lib;speexdsp.lib;SDL2d.lib;vorbis.lib;vorbisfile.lib;zip.lib;zlibd.lib;%(AdditionalDependencies) - + Full true @@ -107,7 +112,6 @@ bz2.lib;discord-rpc.lib;flac.lib;freetype.lib;libpng16.lib;ogg.lib;speexdsp.lib;SDL2.lib;vorbis.lib;vorbisfile.lib;zip.lib;zlib.lib;%(AdditionalDependencies) - diff --git a/openrct2.proj b/openrct2.proj index 87bae6926c..0abccd869e 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -45,14 +45,14 @@ f3a03c2e7b610fefa28d6962da10144f6324078d https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.0/title-sequences.zip 4ab0065e5a4d9f9c77d94718bbdfcfcd5a389da0 - https://github.com/OpenRCT2/objects/releases/download/v1.3.7/objects.zip - 82930d549e0b3c3bce29718d5390c5cd474d0f28 - https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.1/opensound.zip - 8f04aea33f8034131c3069f6accacce0d94f80c1 - https://github.com/OpenRCT2/OpenMusic/releases/download/v1.0.1/openmusic.zip - 8ff94490180e2fbfdd13a4130eb300da726ca406 - https://github.com/OpenRCT2/replays/releases/download/v0.0.70/replays.zip - 09B339E86AAE81580C5AC3E23AC4BC9E030DA076 + https://github.com/OpenRCT2/objects/releases/download/v1.3.8/objects.zip + 2888092aab93df15bb78c4c910b13c33b1e318ef + https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.2/opensound.zip + 64EF7E0B7785602C91AEC66F005C035B05A2133B + https://github.com/OpenRCT2/OpenMusic/releases/download/v1.1.0/openmusic.zip + 8f0cf6b2fd4727e91b0d4062e7f199a43d15e777 + https://github.com/OpenRCT2/replays/releases/download/v0.0.77/replays.zip + 65CA6D830789C074F575F15E3F9E2C28691C24F8 diff --git a/openrct2.sln b/openrct2.sln index 6d4ece018d..5556485514 100644 --- a/openrct2.sln +++ b/openrct2.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29411.138 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenrct2", "src\openrct2\libopenrct2.vcxproj", "{D24D94F6-2A74-480C-B512-629C306CE92F}" EndProject @@ -33,81 +33,114 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-cli", "src\openrct EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|arm64 = Debug|arm64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - Debug|arm64 = Debug|arm64 + Release|arm64 = Release|arm64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 - Release|arm64 = Release|arm64 + ReleaseLTCG|arm64 = ReleaseLTCG|arm64 + ReleaseLTCG|Win32 = ReleaseLTCG|Win32 + ReleaseLTCG|x64 = ReleaseLTCG|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.ActiveCfg = Debug|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.Build.0 = Debug|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.ActiveCfg = Debug|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.Build.0 = Debug|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|arm64.ActiveCfg = Debug|arm64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|arm64.Build.0 = Debug|arm64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.ActiveCfg = Release|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.Build.0 = Release|Win32 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.ActiveCfg = Release|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.Build.0 = Release|x64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|arm64.ActiveCfg = Release|arm64 - {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|arm64.Build.0 = Release|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|arm64.ActiveCfg = Debug|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|arm64.Build.0 = Debug|arm64 {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|Win32.ActiveCfg = Debug|Win32 {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|Win32.Build.0 = Debug|Win32 {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|x64.ActiveCfg = Debug|x64 {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|x64.Build.0 = Debug|x64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|arm64.ActiveCfg = Debug|arm64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Debug|arm64.Build.0 = Debug|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|arm64.ActiveCfg = Release|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|arm64.Build.0 = Release|arm64 {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.ActiveCfg = Release|Win32 {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|Win32.Build.0 = Release|Win32 {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|x64.ActiveCfg = Release|x64 {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|x64.Build.0 = Release|x64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|arm64.ActiveCfg = Release|arm64 - {D24D94F6-2A74-480C-B512-629C306CE92F}.Release|arm64.Build.0 = Release|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.ReleaseLTCG|arm64.ActiveCfg = ReleaseLTCG|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.ReleaseLTCG|arm64.Build.0 = ReleaseLTCG|arm64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.ReleaseLTCG|Win32.ActiveCfg = ReleaseLTCG|Win32 + {D24D94F6-2A74-480C-B512-629C306CE92F}.ReleaseLTCG|Win32.Build.0 = ReleaseLTCG|Win32 + {D24D94F6-2A74-480C-B512-629C306CE92F}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64 + {D24D94F6-2A74-480C-B512-629C306CE92F}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|arm64.ActiveCfg = Debug|arm64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|arm64.Build.0 = Debug|arm64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.ActiveCfg = Debug|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|Win32.Build.0 = Debug|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.ActiveCfg = Debug|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Debug|x64.Build.0 = Debug|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|arm64.ActiveCfg = Release|arm64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|arm64.Build.0 = Release|arm64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.ActiveCfg = Release|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|Win32.Build.0 = Release|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.ActiveCfg = Release|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.Release|x64.Build.0 = Release|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.ReleaseLTCG|arm64.ActiveCfg = ReleaseLTCG|arm64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.ReleaseLTCG|arm64.Build.0 = ReleaseLTCG|arm64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.ReleaseLTCG|Win32.ActiveCfg = ReleaseLTCG|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.ReleaseLTCG|Win32.Build.0 = ReleaseLTCG|Win32 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64 + {7A9A57D5-7006-4208-A290-5491BA3C8808}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|arm64.ActiveCfg = Debug|arm64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|arm64.Build.0 = Debug|arm64 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.ActiveCfg = Debug|Win32 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.Build.0 = Debug|Win32 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.ActiveCfg = Debug|x64 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.Build.0 = Debug|x64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|arm64.ActiveCfg = Debug|arm64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|arm64.Build.0 = Debug|arm64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|arm64.ActiveCfg = Release|arm64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|arm64.Build.0 = Release|arm64 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.ActiveCfg = Release|Win32 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.Build.0 = Release|Win32 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.ActiveCfg = Release|x64 {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.Build.0 = Release|x64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|arm64.ActiveCfg = Release|arm64 - {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|arm64.Build.0 = Release|arm64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.ReleaseLTCG|arm64.ActiveCfg = ReleaseLTCG|arm64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.ReleaseLTCG|arm64.Build.0 = ReleaseLTCG|arm64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.ReleaseLTCG|Win32.ActiveCfg = ReleaseLTCG|Win32 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.ReleaseLTCG|Win32.Build.0 = ReleaseLTCG|Win32 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64 + {62B020FA-E4FB-4C6E-B32A-DC999470F155}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|arm64.ActiveCfg = Debug|arm64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|arm64.Build.0 = Debug|arm64 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|Win32.ActiveCfg = Debug|Win32 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|Win32.Build.0 = Debug|Win32 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|x64.ActiveCfg = Debug|x64 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|x64.Build.0 = Debug|x64 - {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|arm64.ActiveCfg = Debug|arm64 - {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Debug|arm64.Build.0 = Debug|arm64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|arm64.ActiveCfg = Release|arm64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|arm64.Build.0 = Release|arm64 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|Win32.ActiveCfg = Release|Win32 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|Win32.Build.0 = Release|Win32 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|x64.ActiveCfg = Release|x64 {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|x64.Build.0 = Release|x64 - {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|arm64.ActiveCfg = Release|arm64 - {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.Release|arm64.Build.0 = Release|arm64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.ReleaseLTCG|arm64.ActiveCfg = ReleaseLTCG|arm64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.ReleaseLTCG|arm64.Build.0 = ReleaseLTCG|arm64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.ReleaseLTCG|Win32.ActiveCfg = ReleaseLTCG|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.ReleaseLTCG|Win32.Build.0 = ReleaseLTCG|Win32 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64 + {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|arm64.ActiveCfg = Debug|arm64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|arm64.Build.0 = Debug|arm64 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|Win32.ActiveCfg = Debug|Win32 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|Win32.Build.0 = Debug|Win32 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|x64.ActiveCfg = Debug|x64 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|x64.Build.0 = Debug|x64 - {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|arm64.ActiveCfg = Debug|arm64 - {B6808F71-30B4-4499-8FF6-0B1C86391842}.Debug|arm64.Build.0 = Debug|arm64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|arm64.ActiveCfg = Release|arm64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|arm64.Build.0 = Release|arm64 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|Win32.ActiveCfg = Release|Win32 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|Win32.Build.0 = Release|Win32 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|x64.ActiveCfg = Release|x64 {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|x64.Build.0 = Release|x64 - {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|arm64.ActiveCfg = Release|arm64 - {B6808F71-30B4-4499-8FF6-0B1C86391842}.Release|arm64.Build.0 = Release|arm64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|arm64.ActiveCfg = ReleaseLTCG|arm64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|arm64.Build.0 = ReleaseLTCG|arm64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|Win32.ActiveCfg = ReleaseLTCG|Win32 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|Win32.Build.0 = ReleaseLTCG|Win32 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64 + {B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {7A9A57D5-7006-4208-A290-5491BA3C8808} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} {D24D94F6-2A74-480C-B512-629C306CE92F} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} + {7A9A57D5-7006-4208-A290-5491BA3C8808} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} {62B020FA-E4FB-4C6E-B32A-DC999470F155} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0} {8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} {B6808F71-30B4-4499-8FF6-0B1C86391842} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB} diff --git a/readme.md b/readme.md index 334c59d6b4..27b26713dd 100644 --- a/readme.md +++ b/readme.md @@ -95,10 +95,47 @@ Some \*BSD operating systems offer native packages. These packages are usually t OpenRCT2 requires original files of RollerCoaster Tycoon 2 to play. It can be bought at either [Steam](https://store.steampowered.com/app/285330/) or [GOG.com](https://www.gog.com/game/rollercoaster_tycoon_2). -### Windows: -- Visual Studio 2022 (Enterprise / Professional / [Community (Free)](https://www.visualstudio.com/vs/community/)) - - Desktop development with C++ -- MSYS2 MinGW Toolchain. The toolchains with supported dependencies are `mingw-x86_64`, `mingw-xi686`, `ucrt-x86_64`, `clang-x86_64`, and `clang-xi686`, each of these require the `$MINGW_PACKAGE_PREFIX` and `msys` and `clangarm-64` are lacking packages for some dependencies +
+ Windows prerequisites + + - Visual Studio 2022 (Enterprise / Professional / [Community (Free)](https://www.visualstudio.com/vs/community/)) + - Desktop development with C++ + - MSYS2 MinGW Toolchain. The toolchains with supported dependencies are `mingw-x86_64`, `mingw-xi686`, `ucrt-x86_64`, `clang-x86_64`, and `clang-xi686`, each of these require the `$MINGW_PACKAGE_PREFIX` and `msys` and `clangarm-64` are lacking packages for some dependencies + - sdl2 (only for UI client) + - freetype (can be disabled) + - fontconfig (can be disabled) + - libzip (>= 1.0) + - libpng (>= 1.2) + - speexdsp (only for UI client) + - curl (only if building with http support) + - nlohmann-json (>= 3.6.0) + - openssl (>= 1.0; only if building with multiplayer support) + - icu (>= 59.0) + - zlib + - gl (commonly provided by Mesa or GPU vendors; only for UI client, can be disabled) + - cmake + - benchmark (optional) + - innoextract (optional runtime dependency; used for GOG installer extraction during setup) + - libogg + - libvorbis + - flac + + See the wiki for [the actual package names used in pacman](https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-MSYS2-MinGW). +
+ +
+ macOS prerequisites + + - Xcode Command Line Tools + - [Homebrew](https://brew.sh) + - CMake (available through Homebrew) + +
+ +
+ Linux prerequisites + + - gcc (>= 7.1) or clang (>= 8.0.0) (for C++17 support) - sdl2 (only for UI client) - freetype (can be disabled) - fontconfig (can be disabled) @@ -112,102 +149,88 @@ OpenRCT2 requires original files of RollerCoaster Tycoon 2 to play. It can be bo - zlib - gl (commonly provided by Mesa or GPU vendors; only for UI client, can be disabled) - cmake - - benchmark (optional) - innoextract (optional runtime dependency; used for GOG installer extraction during setup) - - libogg - - libvorbis - - flac - -See the wiki for [the actual package names used in pacman](https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-MSYS2-MinGW). -### macOS: -- Xcode Command Line Tools -- [Homebrew](https://brew.sh) -- CMake (available through Homebrew) + Refer to https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-Linux#required-packages-general for more information about installing the packages. -### Linux: -- gcc (>= 7.1) or clang (>= 8.0.0) (for C++17 support) -- sdl2 (only for UI client) -- freetype (can be disabled) -- fontconfig (can be disabled) -- libzip (>= 1.0) -- libpng (>= 1.2) -- speexdsp (only for UI client) -- curl (only if building with http support) -- nlohmann-json (>= 3.6.0) -- openssl (>= 1.0; only if building with multiplayer support) -- icu (>= 59.0) -- zlib -- gl (commonly provided by Mesa or GPU vendors; only for UI client, can be disabled) -- cmake -- innoextract (optional runtime dependency; used for GOG installer extraction during setup) - -Refer to https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-Linux#required-packages-general for more information about installing the packages. +
--- ## 3.2 Compiling and running ### Windows: -1. Check out the repository. This can be done using [GitHub Desktop](https://desktop.github.com) or [other tools](https://help.github.com/articles/which-remote-url-should-i-use). -2. Open a new Developer Command Prompt for VS 2022, then navigate to the repository (e.g. `cd C:\GitHub\OpenRCT2`). -3. To build the 64-bit version, use `msbuild openrct2.proj /t:build /p:platform=x64`. +
+ Show instructions - To build the 32-bit version, use `msbuild openrct2.proj /t:build /p:platform=Win32`. -4. Run the game, `bin\openrct2` + 1. Check out the repository, this can be done using [GitHub Desktop](https://desktop.github.com) or [other tools](https://help.github.com/articles/which-remote-url-should-i-use) + 2. Open a new Developer Command Prompt for VS 2022 + 3. Navigate to the repository (e.g. `cd C:\GitHub\OpenRCT2`) + 4. To build the 64-bit version, use `msbuild openrct2.proj /t:build /p:platform=x64` -Once you have ran msbuild once, further development can be done within Visual Studio by opening `openrct2.sln`. Make sure to select the correct target platform for which you ran the build in point #3 (`Win32` for the 32-bit version, `x64` for the 64-bit version), otherwise the build will fail in Visual Studio. + To build the 32-bit version, use `msbuild openrct2.proj /t:build /p:platform=Win32` + 5. Run the game, `bin\openrct2` -Other examples: -``` -set platform=x64 -msbuild openrct2.proj /t:clean -msbuild openrct2.proj /t:rebuild /p:configuration=release -msbuild openrct2.proj /t:g2 -msbuild openrct2.proj /t:PublishPortable -``` + Once you have ran msbuild once, further development can be done within Visual Studio by opening `openrct2.sln`. Make sure to select the correct target platform for which you ran the build in point #3 (`Win32` for the 32-bit version, `x64` for the 64-bit version), otherwise the build will fail in Visual Studio. + + Other examples: + ``` + set platform=x64 + msbuild openrct2.proj /t:clean + msbuild openrct2.proj /t:rebuild /p:configuration=release + msbuild openrct2.proj /t:g2 + msbuild openrct2.proj /t:PublishPortable + ``` +
### macOS: -#### CMake: -CMake can build either a self-contained application bundle, which includes all the necessary game files and dependencies, or it can build a command line version that links against system installed dependencies. CMake will retrieve the dependencies from [Dependencies](https://github.com/OpenRCT2/Dependencies/) automatically. You can build the macOS app using CMake using the following commands: -``` -cmake -S . -B build -cmake --build build --target install -``` -Then you can run the game by opening `OpenRCT2.app` +
+ Show instructions -To build the command line version, you'll need to disable the macOS app bundle: -``` + CMake can build either a self-contained application bundle, which includes all the necessary game files and dependencies, or it can build a command line version that links against system installed dependencies. CMake will retrieve the dependencies from [Dependencies](https://github.com/OpenRCT2/Dependencies/) automatically. You can build the macOS app using CMake using the following commands: + ``` + cmake -S . -B build + cmake --build build --target install + ``` + Then you can run the game by opening `OpenRCT2.app` -cmake -S . -B build -DMACOS_BUNDLE=off -cmake --build build -cmake --build build --target install -ln -s ../data data -``` -Then you can run the game by running `./openrct2`. + To build the command line version, you'll need to disable the macOS app bundle: + ``` -To link against system dependencies instead of letting CMake download the dependencies from [Dependencies](https://github.com/OpenRCT2/Dependencies), add `-DMACOS_USE_DEPENDENCIES=off` to your cmake args. + cmake -S . -B build -DMACOS_BUNDLE=off + cmake --build build + cmake --build build --target install + ln -s ../data data + ``` + Then you can run the game by running `./openrct2`. -Detailed instructions can be found on [Building OpenRCT2 on macOS using CMake](https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-macOS-using-CMake). + To link against system dependencies instead of letting CMake download the dependencies from [Dependencies](https://github.com/OpenRCT2/Dependencies), add `-DMACOS_USE_DEPENDENCIES=off` to your cmake args. + + Detailed instructions can be found on [Building OpenRCT2 on macOS using CMake](https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-macOS-using-CMake). +
### Linux: -The standard CMake build procedure is to install the [required libraries](https://github.com/OpenRCT2/OpenRCT2#linux), then: -``` -cmake -S . -B build -DCMAKE_INSTALL_PREFIX=. # set your standard cmake options, e.g. build type here - For example, -DCMAKE_BUILD_TYPE=RelWithDebInfo -cmake --build build # you can parallelise your build job with e.g. -j 8 or consider using ninja -cmake --build build --target install # the install target creates all the necessary files in places we expect them -``` +
+ Show instructions -You can also use Ninja in place of Make using `-G Ninja` in the first command, if you prefer, see Wiki for details. + The standard CMake build procedure is to install the [required libraries](https://github.com/OpenRCT2/OpenRCT2#linux), then: + ``` + cmake -S . -B build -DCMAKE_INSTALL_PREFIX=. # set your standard cmake options, e.g. build type here - For example, -DCMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build build # you can parallelise your build job with e.g. -j 8 or consider using ninja + cmake --build build --target install # the install target creates all the necessary files in places we expect them + ``` -Detailed instructions can be found on [Building OpenRCT2 on Linux](https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-Linux). + You can also use Ninja in place of Make using `-G Ninja` in the first command, if you prefer, see Wiki for details. -Note: the `cmake -S . -B build` syntax is available for CMake >= 3.14. For older versions use: -``` -mkdir build -cd build -cmake .. -DCMAKE_INSTALL_PREFIX=. # set your standard cmake options, e.g. build type here - For example, -DCMAKE_BUILD_TYPE=RelWithDebInfo -cmake --build . --target install -``` + Detailed instructions can be found on [Building OpenRCT2 on Linux](https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-Linux). + + Note: the `cmake -S . -B build` syntax is available for CMake >= 3.14. For older versions use: + ``` + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=. # set your standard cmake options, e.g. build type here - For example, -DCMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build . --target install + ``` +
--- diff --git a/resources/OpenRCT2.rc b/resources/OpenRCT2.rc index cf8d5d82ff..838db7349a 100644 --- a/resources/OpenRCT2.rc +++ b/resources/OpenRCT2.rc @@ -45,7 +45,7 @@ BEGIN VALUE "CompanyName", "OpenRCT2 Team" VALUE "FileDescription", "Main executable for OpenRCT2" VALUE "FileVersion", OPENRCT2_PRODUCT_VERSION - VALUE "LegalCopyright", "Copyright (c) 2014-2022 OpenRCT2 developers" + VALUE "LegalCopyright", "Copyright (c) 2014-2023 OpenRCT2 developers" VALUE "ProductName", "OpenRCT2" VALUE "ProductVersion", OPENRCT2_PRODUCT_VERSION END diff --git a/resources/g2/font/latin/w-circumflex-bold.png b/resources/g2/font/latin/w-circumflex-bold.png new file mode 100644 index 0000000000..3504255e72 Binary files /dev/null and b/resources/g2/font/latin/w-circumflex-bold.png differ diff --git a/resources/g2/font/latin/w-circumflex-small.png b/resources/g2/font/latin/w-circumflex-small.png new file mode 100644 index 0000000000..60e7c7963e Binary files /dev/null and b/resources/g2/font/latin/w-circumflex-small.png differ diff --git a/resources/g2/font/latin/w-circumflex-tiny.png b/resources/g2/font/latin/w-circumflex-tiny.png new file mode 100644 index 0000000000..ae11cd03b3 Binary files /dev/null and b/resources/g2/font/latin/w-circumflex-tiny.png differ diff --git a/resources/g2/font/latin/w-circumflex-uc-bold.png b/resources/g2/font/latin/w-circumflex-uc-bold.png new file mode 100644 index 0000000000..0d895b788c Binary files /dev/null and b/resources/g2/font/latin/w-circumflex-uc-bold.png differ diff --git a/resources/g2/font/latin/w-circumflex-uc-small.png b/resources/g2/font/latin/w-circumflex-uc-small.png new file mode 100644 index 0000000000..2d6382639b Binary files /dev/null and b/resources/g2/font/latin/w-circumflex-uc-small.png differ diff --git a/resources/g2/font/latin/w-circumflex-uc-tiny.png b/resources/g2/font/latin/w-circumflex-uc-tiny.png new file mode 100644 index 0000000000..254e6d977b Binary files /dev/null and b/resources/g2/font/latin/w-circumflex-uc-tiny.png differ diff --git a/resources/g2/font/latin/y-circumflex-bold.png b/resources/g2/font/latin/y-circumflex-bold.png new file mode 100644 index 0000000000..a4af07991e Binary files /dev/null and b/resources/g2/font/latin/y-circumflex-bold.png differ diff --git a/resources/g2/font/latin/y-circumflex-small.png b/resources/g2/font/latin/y-circumflex-small.png new file mode 100644 index 0000000000..05cd959b6b Binary files /dev/null and b/resources/g2/font/latin/y-circumflex-small.png differ diff --git a/resources/g2/font/latin/y-circumflex-tiny.png b/resources/g2/font/latin/y-circumflex-tiny.png new file mode 100644 index 0000000000..cdfbdcca52 Binary files /dev/null and b/resources/g2/font/latin/y-circumflex-tiny.png differ diff --git a/resources/g2/font/latin/y-circumflex-uc-bold.png b/resources/g2/font/latin/y-circumflex-uc-bold.png new file mode 100644 index 0000000000..30bbaf9ac0 Binary files /dev/null and b/resources/g2/font/latin/y-circumflex-uc-bold.png differ diff --git a/resources/g2/font/latin/y-circumflex-uc-small.png b/resources/g2/font/latin/y-circumflex-uc-small.png new file mode 100644 index 0000000000..8b067769ec Binary files /dev/null and b/resources/g2/font/latin/y-circumflex-uc-small.png differ diff --git a/resources/g2/font/latin/y-circumflex-uc-tiny.png b/resources/g2/font/latin/y-circumflex-uc-tiny.png new file mode 100644 index 0000000000..e6920a1d32 Binary files /dev/null and b/resources/g2/font/latin/y-circumflex-uc-tiny.png differ diff --git a/resources/g2/icons/infinity.png b/resources/g2/icons/infinity.png new file mode 100644 index 0000000000..6e7e99ef8d Binary files /dev/null and b/resources/g2/icons/infinity.png differ diff --git a/resources/g2/icons/legacy_path.png b/resources/g2/icons/legacy_paths.png similarity index 100% rename from resources/g2/icons/legacy_path.png rename to resources/g2/icons/legacy_paths.png diff --git a/resources/g2/icons/path_surface.png b/resources/g2/icons/path_surfaces.png similarity index 100% rename from resources/g2/icons/path_surface.png rename to resources/g2/icons/path_surfaces.png diff --git a/resources/g2/icons/ride_station.png b/resources/g2/icons/ride_stations.png similarity index 100% rename from resources/g2/icons/ride_station.png rename to resources/g2/icons/ride_stations.png diff --git a/resources/g2/icons/terrain_edge.png b/resources/g2/icons/terrain_edges.png similarity index 100% rename from resources/g2/icons/terrain_edge.png rename to resources/g2/icons/terrain_edges.png diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 6e5a160a26..cf6c84183d 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -197,6 +197,10 @@ { "path": "icons/rct1_simulate_on_pressed.png" }, + { + "path": "icons/infinity.png", + "palette": "keep" + }, { "path": "tool/normal_selection_6x6.png", "x_offset": 1, @@ -230,22 +234,22 @@ "y_offset": 1 }, { - "path": "icons/legacy_path.png", + "path": "icons/legacy_paths.png", "x_offset": 1, "y_offset": 1 }, { - "path": "icons/path_surface.png", + "path": "icons/path_surfaces.png", "x_offset": 1, "y_offset": 1 }, { - "path": "icons/ride_station.png", + "path": "icons/ride_stations.png", "x_offset": 5, "y_offset": 1 }, { - "path": "icons/terrain_edge.png", + "path": "icons/terrain_edges.png", "x_offset": 1, "y_offset": 1 }, @@ -801,6 +805,30 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/latin/w-circumflex-uc-small.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/w-circumflex-small.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/y-circumflex-uc-small.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/y-circumflex-small.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/z-caron-uc-small.png", "y_offset": -1, @@ -1406,6 +1434,31 @@ "palette": "keep", "forceBmp": true }, + + { + "path": "font/latin/w-circumflex-uc-bold.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/w-circumflex-bold.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/y-circumflex-uc-bold.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/y-circumflex-bold.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/z-caron-uc-bold.png", "y_offset": -1, @@ -2019,6 +2072,30 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/latin/w-circumflex-uc-tiny.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/w-circumflex-tiny.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/y-circumflex-uc-tiny.png", + "y_offset": -1, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/latin/y-circumflex-tiny.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/z-caron-uc-tiny.png", "y_offset": -1, @@ -2361,6 +2438,78 @@ "x_offset": 2, "y_offset": 1 }, + { + "path": "track/wooden/25_60_swne_chained.png", + "x_offset": -32, + "y_offset": -49, + "palette": "keep" + }, + { + "path": "track/wooden/25_60_senw_chained.png", + "x_offset": -32, + "y_offset": -49, + "palette": "keep" + }, + { + "path": "track/wooden/25_60_swne_chained_back.png", + "x_offset": -32, + "y_offset": -24, + "palette": "keep" + }, + { + "path": "track/wooden/25_60_senw_chained_back.png", + "x_offset": -32, + "y_offset": -24, + "palette": "keep" + }, + { + "path": "track/wooden/60_swne_chained.png", + "x_offset": -32, + "y_offset": -80, + "palette": "keep" + }, + { + "path": "track/wooden/60_senw_chained.png", + "x_offset": -32, + "y_offset": -80, + "palette": "keep" + }, + { + "path": "track/wooden/60_swne_chained_back.png", + "x_offset": -32, + "y_offset": -60, + "palette": "keep" + }, + { + "path": "track/wooden/60_senw_chained_back.png", + "x_offset": -32, + "y_offset": -59, + "palette": "keep" + }, + { + "path": "track/wooden/60_25_swne_chained.png", + "x_offset": -32, + "y_offset": -47, + "palette": "keep" + }, + { + "path": "track/wooden/60_25_senw_chained.png", + "x_offset": -32, + "y_offset": -47, + "palette": "keep" + }, + { + "path": "track/wooden/60_25_swne_chained_back.png", + "x_offset": 0, + "y_offset": -30, + "palette": "keep" + }, + { + "path": "track/wooden/60_25_senw_chained_back.png", + "x_offset": -32, + "y_offset": -30, + "palette": "keep" + }, { "path": "track/bm_invert/booster_1.png", "x_offset": -25, diff --git a/resources/g2/track/wooden/25_60_senw_chained.png b/resources/g2/track/wooden/25_60_senw_chained.png new file mode 100644 index 0000000000..6e0478a7bf Binary files /dev/null and b/resources/g2/track/wooden/25_60_senw_chained.png differ diff --git a/resources/g2/track/wooden/25_60_senw_chained_back.png b/resources/g2/track/wooden/25_60_senw_chained_back.png new file mode 100644 index 0000000000..ddf23bf44e Binary files /dev/null and b/resources/g2/track/wooden/25_60_senw_chained_back.png differ diff --git a/resources/g2/track/wooden/25_60_swne_chained.png b/resources/g2/track/wooden/25_60_swne_chained.png new file mode 100644 index 0000000000..0fbd1e326c Binary files /dev/null and b/resources/g2/track/wooden/25_60_swne_chained.png differ diff --git a/resources/g2/track/wooden/25_60_swne_chained_back.png b/resources/g2/track/wooden/25_60_swne_chained_back.png new file mode 100644 index 0000000000..2601dd4deb Binary files /dev/null and b/resources/g2/track/wooden/25_60_swne_chained_back.png differ diff --git a/resources/g2/track/wooden/60_25_senw_chained.png b/resources/g2/track/wooden/60_25_senw_chained.png new file mode 100644 index 0000000000..4d96c41259 Binary files /dev/null and b/resources/g2/track/wooden/60_25_senw_chained.png differ diff --git a/resources/g2/track/wooden/60_25_senw_chained_back.png b/resources/g2/track/wooden/60_25_senw_chained_back.png new file mode 100644 index 0000000000..9081b0d7aa Binary files /dev/null and b/resources/g2/track/wooden/60_25_senw_chained_back.png differ diff --git a/resources/g2/track/wooden/60_25_swne_chained.png b/resources/g2/track/wooden/60_25_swne_chained.png new file mode 100644 index 0000000000..2a9f988834 Binary files /dev/null and b/resources/g2/track/wooden/60_25_swne_chained.png differ diff --git a/resources/g2/track/wooden/60_25_swne_chained_back.png b/resources/g2/track/wooden/60_25_swne_chained_back.png new file mode 100644 index 0000000000..6a2b248dc2 Binary files /dev/null and b/resources/g2/track/wooden/60_25_swne_chained_back.png differ diff --git a/resources/g2/track/wooden/60_senw_chained.png b/resources/g2/track/wooden/60_senw_chained.png new file mode 100644 index 0000000000..d46d7135ae Binary files /dev/null and b/resources/g2/track/wooden/60_senw_chained.png differ diff --git a/resources/g2/track/wooden/60_senw_chained_back.png b/resources/g2/track/wooden/60_senw_chained_back.png new file mode 100644 index 0000000000..752ac909c8 Binary files /dev/null and b/resources/g2/track/wooden/60_senw_chained_back.png differ diff --git a/resources/g2/track/wooden/60_swne_chained.png b/resources/g2/track/wooden/60_swne_chained.png new file mode 100644 index 0000000000..25986b9c8e Binary files /dev/null and b/resources/g2/track/wooden/60_swne_chained.png differ diff --git a/resources/g2/track/wooden/60_swne_chained_back.png b/resources/g2/track/wooden/60_swne_chained_back.png new file mode 100644 index 0000000000..f3df725e00 Binary files /dev/null and b/resources/g2/track/wooden/60_swne_chained_back.png differ diff --git a/scripts/install-nsis b/scripts/install-nsis index 0c815cd867..06efa6b8be 100755 --- a/scripts/install-nsis +++ b/scripts/install-nsis @@ -13,9 +13,9 @@ fi if [[ "$1" == "-d" ]]; then echo -e "\033[0;36mDownloading prebuilt NSIS from GitHub...\033[0m" - curl -sSfLO "https://github.com/OpenRCT2/Dependencies/releases/download/v20/nsis.zip" - 7z -bd -y "-o$2" x nsis.zip - rm nsis.zip + curl -sSfLO "https://github.com/OpenRCT2/Dependencies/releases/download/v33/nsis-3.08.zip" + 7z -bd -y "-o$2" x nsis-3.08.zip + rm nsis-3.08.zip echo -e "\033[0;32mNSIS downloaded, add "$2/bin" to PATH\033[0m" exit 0 fi @@ -29,17 +29,17 @@ then fi echo -e "\033[0;36mDownloading NSIS from chocolatey...\033[0m" -cinst nsis.portable --version=3.01-beta1 +cinst nsis.portable --version=3.08 echo -e "\033[0;36mDownloading KillProcDLL for NSIS...\033[0m" curl -sSfLo nsisxtra.zip "http://nsis.sourceforge.net/mediawiki/images/5/53/KillProcDll%26FindProcDll.zip" 7z x nsisxtra.zip -cp FindProcDLL.dll "$nsisdir/tools/nsis-3.0b1/Plugins/x86-ansi" +cp FindProcDLL.dll "$nsisdir/tools/nsis-3.08/Plugins/x86-ansi" echo -e "\033[0;36mDownloading UAC plugin for NSIS...\033[0m" curl -sSfLO "http://nsis.sourceforge.net/mediawiki/images/8/8f/UAC.zip" 7z x UAC.zip -cp UAC.nsh "$nsisdir/tools/nsis-3.0b1/Include" -cp -r Plugins "$nsisdir/tools/nsis-3.0b1" +cp UAC.nsh "$nsisdir/tools/nsis-3.08/Include" +cp -r Plugins "$nsisdir/tools/nsis-3.08" echo -e "\033[0;32mNSIS installed!\033[0m" diff --git a/scripts/upload-build b/scripts/upload-build index 3bfda7edde..c929e2d6d8 100755 --- a/scripts/upload-build +++ b/scripts/upload-build @@ -23,56 +23,6 @@ version=$3 sha1=$4 branch=$5 -case "$flavour" in - windows-portable-win32) - flavour=windows-win32.zip - flavourid=1 - ;; - windows-portable-x64) - flavour=windows-x64.zip - flavourid=6 - ;; - windows-installer-win32) - flavour=windows-win32.exe - flavourid=2 - ;; - windows-installer-x64) - flavour=windows-x64.exe - flavourid=7 - ;; - windows-symbols-win32) - flavour=windows-win32-symbols.zip - flavourid=5 - ;; - windows-symbols-x64) - flavour=windows-x64-symbols.zip - flavourid=10 - ;; - macos) - flavour=macos.zip - flavourid=3 - ;; - linux-i686) - flavour=linux-i686.tar.gz - flavourid=4 - ;; - linux-x86_64) - flavour=linux-x86_64.tar.gz - flavourid=9 - ;; - android-arm) - flavour=android-arm.apk - flavourid=11 - ;; - android-x86) - flavour=android-x86.apk - flavourid=12 - ;; - *) - echo -e $"\033[0;31mUnknown flavour: $flavour" - exit 1 -esac - if [ -n "$branch" ]; then versionextra=-$branch-${sha1::7} fi @@ -83,12 +33,15 @@ if [ -z "$OPENRCT2_ORG_TOKEN" ]; then echo -e "\033[0;31mOPENRCT2_ORG_TOKEN not set" exit 1 fi -curl -m 300 --connect-timeout 5 -o - \ +# Use HTTP1.1 as a workaround for curl bug: +# https://github.com/actions/runner-images/issues/7329 +# https://github.com/curl/curl/issues/10591 +curl --include -m 300 --connect-timeout 5 -o - \ + --http1.1 \ --form "key=$OPENRCT2_ORG_TOKEN" \ --form "fileName=$filename" \ --form "version=$version" \ --form "gitHash=$sha1" \ --form "gitBranch=$branch" \ - --form "flavourId=$flavourid" \ --form "file=@$path" \ "https://openrct2.org/altapi/?command=push-build" diff --git a/shell.nix b/shell.nix index c74d360ca6..25c54be2a8 100644 --- a/shell.nix +++ b/shell.nix @@ -15,8 +15,8 @@ let objects-src = pkgs.fetchFromGitHub { owner = "OpenRCT2"; repo = "objects"; - rev = "v1.3.7"; - sha256 = "d6be9743c68f233674f5549204637b1f0304d7567a816d18e3f1576500a51d38"; + rev = "v1.3.8"; + sha256 = "84a95590d13a753b1d239f7f06c8d121e36fd28694b21f33646518e2012904ae"; }; title-sequences-src = pkgs.fetchFromGitHub { diff --git a/src/openrct2-cli/Cli.cpp b/src/openrct2-cli/Cli.cpp index 68a53c2c1c..c9deea36e2 100644 --- a/src/openrct2-cli/Cli.cpp +++ b/src/openrct2-cli/Cli.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,7 +9,7 @@ #include #include -#include +#include #include using namespace OpenRCT2; @@ -20,7 +20,7 @@ using namespace OpenRCT2; int main(int argc, const char** argv) { int32_t rc = EXIT_SUCCESS; - int runGame = cmdline_run(argv, argc); + int runGame = CommandLineRun(argv, argc); Platform::CoreInit(); if (runGame == EXITCODE_CONTINUE) { diff --git a/src/openrct2-cli/openrct2-cli.vcxproj b/src/openrct2-cli/openrct2-cli.vcxproj index a134619da0..3e9f97f517 100644 --- a/src/openrct2-cli/openrct2-cli.vcxproj +++ b/src/openrct2-cli/openrct2-cli.vcxproj @@ -16,6 +16,18 @@ Debug arm64 + + ReleaseLTCG + arm64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + Release Win32 @@ -64,4 +76,4 @@
- + \ No newline at end of file diff --git a/src/openrct2-ui/CMakeLists.txt b/src/openrct2-ui/CMakeLists.txt index 82cd535937..3e145f5053 100644 --- a/src/openrct2-ui/CMakeLists.txt +++ b/src/openrct2-ui/CMakeLists.txt @@ -182,6 +182,7 @@ if(MACOS_BUNDLE) target_sources(${PROJECT_NAME} PUBLIC ${ROOT_DIR}/distribution/readme.txt PUBLIC ${ROOT_DIR}/distribution/changelog.txt + PUBLIC ${ROOT_DIR}/contributors.md PUBLIC ${ROOT_DIR}/resources/mac/openrct2.icns ) @@ -189,6 +190,7 @@ if(MACOS_BUNDLE) set(BUNDLE_RESOURCES ${ROOT_DIR}/distribution/readme.txt ${ROOT_DIR}/distribution/changelog.txt + ${ROOT_DIR}/contributors.md ${ROOT_DIR}/resources/mac/openrct2.icns ) diff --git a/src/openrct2-ui/CursorData.cpp b/src/openrct2-ui/CursorData.cpp index 024a37a6da..3d047efe3b 100644 --- a/src/openrct2-ui/CursorData.cpp +++ b/src/openrct2-ui/CursorData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/CursorRepository.cpp b/src/openrct2-ui/CursorRepository.cpp index 201a5f253a..11d782c8a0 100644 --- a/src/openrct2-ui/CursorRepository.cpp +++ b/src/openrct2-ui/CursorRepository.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/CursorRepository.h b/src/openrct2-ui/CursorRepository.h index 376b29230d..4490e2694a 100644 --- a/src/openrct2-ui/CursorRepository.h +++ b/src/openrct2-ui/CursorRepository.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/SDLException.cpp b/src/openrct2-ui/SDLException.cpp index feac6cc0c5..cbaf6e8c09 100644 --- a/src/openrct2-ui/SDLException.cpp +++ b/src/openrct2-ui/SDLException.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/SDLException.h b/src/openrct2-ui/SDLException.h index 60a380fda2..80cc637235 100644 --- a/src/openrct2-ui/SDLException.h +++ b/src/openrct2-ui/SDLException.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/TextComposition.cpp b/src/openrct2-ui/TextComposition.cpp index 0811a31bad..8f76d37c4e 100644 --- a/src/openrct2-ui/TextComposition.cpp +++ b/src/openrct2-ui/TextComposition.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,19 +36,16 @@ bool TextComposition::IsActive() return SDL_IsTextInputActive() && _session.Buffer != nullptr; } -TextInputSession* TextComposition::Start(utf8* buffer, size_t bufferSize) +TextInputSession* TextComposition::Start(u8string& buffer, size_t maxLength) { - Guard::ArgumentNotNull(buffer); - // TODO This doesn't work, and position could be improved to where text entry is SDL_Rect rect = { 10, 10, 100, 100 }; SDL_SetTextInputRect(&rect); SDL_StartTextInput(); - _session.Buffer = buffer; - _session.BufferSize = bufferSize - 1; - _session.Size = strlen(buffer); - _session.SelectionStart = _session.Size; + _session.Buffer = &buffer; + _session.MaxLength = maxLength; + _session.SelectionStart = buffer.size(); _session.SelectionSize = 0; _session.ImeBuffer = _imeBuffer; RecalculateLength(); @@ -88,12 +85,10 @@ void TextComposition::HandleMessage(const SDL_Event* e) break; } - utf8* newText = String::Duplicate(e->text.text); - Insert(newText); - Memory::Free(newText); + Insert(e->text.text); console.RefreshCaret(_session.SelectionStart); - window_update_textbox(); + WindowUpdateTextbox(); } break; case SDL_KEYDOWN: @@ -121,14 +116,6 @@ void TextComposition::HandleMessage(const SDL_Event* e) break; } - // Clear the input on Backspace (Windows/Linux) or Backspace (macOS) - if (key == SDLK_BACKSPACE && (modifier & KEYBOARD_PRIMARY_MODIFIER)) - { - Clear(); - console.RefreshCaret(_session.SelectionStart); - window_update_textbox(); - } - switch (key) { case SDLK_BACKSPACE: @@ -136,48 +123,60 @@ void TextComposition::HandleMessage(const SDL_Event* e) if (_session.SelectionStart > 0) { size_t endOffset = _session.SelectionStart; - CursorLeft(); + if (modifier & KEYBOARD_PRIMARY_MODIFIER) + CaretMoveToLeftToken(); + else + CaretMoveLeft(); _session.SelectionSize = endOffset - _session.SelectionStart; Delete(); console.RefreshCaret(_session.SelectionStart); - window_update_textbox(); + WindowUpdateTextbox(); } break; case SDLK_HOME: - CursorHome(); + CaretMoveToStart(); console.RefreshCaret(_session.SelectionStart); break; case SDLK_END: - CursorEnd(); + CaretMoveToEnd(); console.RefreshCaret(_session.SelectionStart); break; case SDLK_DELETE: { size_t startOffset = _session.SelectionStart; - CursorRight(); + if (modifier & KEYBOARD_PRIMARY_MODIFIER) + CaretMoveToRightToken(); + else + CaretMoveRight(); _session.SelectionSize = _session.SelectionStart - startOffset; _session.SelectionStart = startOffset; Delete(); console.RefreshCaret(_session.SelectionStart); - window_update_textbox(); + WindowUpdateTextbox(); break; } case SDLK_RETURN: - window_cancel_textbox(); + WindowCancelTextbox(); break; case SDLK_LEFT: - CursorLeft(); + if (modifier & KEYBOARD_PRIMARY_MODIFIER) + CaretMoveToLeftToken(); + else + CaretMoveLeft(); console.RefreshCaret(_session.SelectionStart); break; case SDLK_RIGHT: - CursorRight(); + if (modifier & KEYBOARD_PRIMARY_MODIFIER) + CaretMoveToRightToken(); + else + CaretMoveRight(); console.RefreshCaret(_session.SelectionStart); break; case SDLK_c: if ((modifier & KEYBOARD_PRIMARY_MODIFIER) && _session.Length) { - SDL_SetClipboardText(_session.Buffer); + SDL_SetClipboardText(_session.Buffer->c_str()); ContextShowError(STR_COPY_INPUT_TO_CLIPBOARD, STR_NONE, {}); } break; @@ -187,7 +186,7 @@ void TextComposition::HandleMessage(const SDL_Event* e) utf8* text = SDL_GetClipboardText(); Insert(text); SDL_free(text); - window_update_textbox(); + WindowUpdateTextbox(); } break; } @@ -195,16 +194,16 @@ void TextComposition::HandleMessage(const SDL_Event* e) } } -void TextComposition::CursorHome() +void TextComposition::CaretMoveToStart() { _session.SelectionStart = 0; } -void TextComposition::CursorEnd() +void TextComposition::CaretMoveToEnd() { - size_t selectionOffset = _session.Size; - const utf8* ch = _session.Buffer + _session.SelectionStart; - while (!utf8_is_codepoint_start(ch) && selectionOffset > 0) + size_t selectionOffset = _session.Buffer->size(); + const utf8* ch = _session.Buffer->c_str() + _session.SelectionStart; + while (!UTF8IsCodepointStart(ch) && selectionOffset > 0) { ch--; selectionOffset--; @@ -213,45 +212,173 @@ void TextComposition::CursorEnd() _session.SelectionStart = selectionOffset; } -void TextComposition::CursorLeft() +void TextComposition::CaretMoveLeft() { size_t selectionOffset = _session.SelectionStart; - if (selectionOffset > 0) + if (selectionOffset == 0) + return; + + const utf8* ch = _session.Buffer->c_str() + selectionOffset; + do { - const utf8* ch = _session.Buffer + selectionOffset; - do + ch--; + selectionOffset--; + } while (!UTF8IsCodepointStart(ch) && selectionOffset > 0); + + _session.SelectionStart = selectionOffset; +} + +void TextComposition::CaretMoveRight() +{ + size_t selectionOffset = _session.SelectionStart; + size_t selectionMaxOffset = _session.Buffer->size(); + if (selectionOffset >= selectionMaxOffset) + return; + + const utf8* ch = _session.Buffer->c_str() + _session.SelectionStart; + do + { + ch++; + selectionOffset++; + } while (!UTF8IsCodepointStart(ch) && selectionOffset < selectionMaxOffset); + + _session.SelectionSize = std::max(0, _session.SelectionSize - (selectionOffset - _session.SelectionStart)); + _session.SelectionStart = selectionOffset; +} + +static bool isWhitespace(uint32_t cp) +{ + return cp == ' ' || cp == '\t'; +} + +void TextComposition::CaretMoveToLeftToken() +{ + if (_session.SelectionStart == 0) + return; + + size_t selectionOffset = _session.SelectionStart - 1; + size_t lastChar = selectionOffset; + + const utf8* ch = _session.Buffer->c_str() + selectionOffset; + + // Read until first non-whitespace. + while (selectionOffset > 0) + { + while (!UTF8IsCodepointStart(ch) && selectionOffset > 0) { ch--; selectionOffset--; - } while (!utf8_is_codepoint_start(ch) && selectionOffset > 0); + } - _session.SelectionStart = selectionOffset; + auto cp = UTF8GetNext(ch, nullptr); + if (!isWhitespace(cp)) + { + lastChar = selectionOffset; + break; + } + + ch--; + selectionOffset--; } + + // Skip white spaces. + while (selectionOffset > 0) + { + while (!UTF8IsCodepointStart(ch) && selectionOffset > 0) + { + ch--; + selectionOffset--; + } + + auto cp = UTF8GetNext(ch, nullptr); + if (isWhitespace(cp)) + break; + + lastChar = selectionOffset; + + ch--; + selectionOffset--; + } + + _session.SelectionSize = std::max(0, _session.SelectionSize - (selectionOffset - _session.SelectionStart)); + _session.SelectionStart = selectionOffset == 0 ? 0 : lastChar; } -void TextComposition::CursorRight() +void TextComposition::CaretMoveToRightToken() { size_t selectionOffset = _session.SelectionStart; - size_t selectionMaxOffset = _session.Size; - if (selectionOffset < selectionMaxOffset) - { - const utf8* ch = _session.Buffer + _session.SelectionStart; - do - { - ch++; - selectionOffset++; - } while (!utf8_is_codepoint_start(ch) && selectionOffset < selectionMaxOffset); + size_t selectionMaxOffset = _session.Buffer->size(); - _session.SelectionSize = std::max(0, _session.SelectionSize - (selectionOffset - _session.SelectionStart)); - _session.SelectionStart = selectionOffset; + if (selectionOffset >= selectionMaxOffset) + return; + + const utf8* ch = _session.Buffer->c_str() + selectionOffset; + + // Find a valid codepoint start. + while (!UTF8IsCodepointStart(ch) && selectionOffset < selectionMaxOffset) + { + ch++; + selectionOffset++; } + auto cp = UTF8GetNext(ch, nullptr); + + if (isWhitespace(cp)) + { + // Read until first non-whitespace. + while (selectionOffset < selectionMaxOffset) + { + do + { + ch++; + selectionOffset++; + } while (!UTF8IsCodepointStart(ch) && selectionOffset < selectionMaxOffset); + + cp = UTF8GetNext(ch, nullptr); + if (!isWhitespace(cp)) + break; + } + } + else + { + // Read until first non-whitespace. + while (selectionOffset < selectionMaxOffset) + { + do + { + ch++; + selectionOffset++; + } while (!UTF8IsCodepointStart(ch) && selectionOffset < selectionMaxOffset); + + cp = UTF8GetNext(ch, nullptr); + if (isWhitespace(cp)) + break; + } + + // Skip white spaces. + while (selectionOffset < selectionMaxOffset) + { + // Read until first non-whitespace. + do + { + ch++; + selectionOffset++; + } while (!UTF8IsCodepointStart(ch) && selectionOffset < selectionMaxOffset); + + cp = UTF8GetNext(ch, nullptr); + if (!isWhitespace(cp)) + break; + } + } + + _session.SelectionSize = std::max(0, _session.SelectionSize - (selectionOffset - _session.SelectionStart)); + _session.SelectionStart = selectionOffset; } void TextComposition::Insert(const utf8* text) { const utf8* ch = text; uint32_t codepoint; - while ((codepoint = utf8_get_next(ch, &ch)) != 0) + while ((codepoint = UTF8GetNext(ch, &ch)) != 0) { InsertCodepoint(codepoint); } @@ -259,37 +386,34 @@ void TextComposition::Insert(const utf8* text) void TextComposition::InsertCodepoint(codepoint_t codepoint) { - size_t codepointLength = utf8_get_codepoint_length(codepoint); - size_t remainingSize = _session.BufferSize - _session.Size; - if (codepointLength <= remainingSize) + size_t codepointLength = UTF8GetCodepointLength(codepoint); + size_t remainingSize = _session.MaxLength - _session.Length; + if (remainingSize > 0) { - utf8* buffer = _session.Buffer; + const auto bufSize = _session.Buffer->size(); + _session.Buffer->resize(_session.Buffer->size() + codepointLength); + + // FIXME: Just insert the codepoint into the string, don't use memmove + + utf8* buffer = _session.Buffer->data(); utf8* insertPtr = buffer + _session.SelectionStart; - if (_session.SelectionStart < _session.Size) + if (_session.SelectionStart < bufSize) { - // Shift bytes (including null terminator) right to make room for new codepoint + // Shift bytes to the right to make room for new codepoint utf8* targetShiftPtr = insertPtr + codepointLength; - size_t shiftSize = _session.Size - _session.SelectionStart + 1; + size_t shiftSize = bufSize - _session.SelectionStart; memmove(targetShiftPtr, insertPtr, shiftSize); } - else - { - // Character is appended onto the end, so set byte after it to null terminator - buffer[_session.Size + codepointLength] = 0; - } - utf8_write_codepoint(insertPtr, codepoint); + UTF8WriteCodepoint(insertPtr, codepoint); _session.SelectionStart += codepointLength; - _session.Size += codepointLength; _session.Length++; } } void TextComposition::Clear() { - utf8* buffer = _session.Buffer; - buffer[0] = 0; - _session.Size = 0; + _session.Buffer->clear(); _session.Length = 0; _session.SelectionStart = 0; _session.SelectionSize = 0; @@ -298,31 +422,33 @@ void TextComposition::Clear() void TextComposition::Delete() { size_t selectionOffset = _session.SelectionStart; - size_t selectionMaxOffset = _session.Size; + size_t selectionMaxOffset = std::min(_session.SelectionStart + _session.SelectionSize, _session.Buffer->size()); + if (selectionOffset >= selectionMaxOffset) + return; // Find out how many bytes to delete. - const utf8* ch = _session.Buffer + _session.SelectionStart; - do + const utf8* ch = _session.Buffer->c_str() + _session.SelectionStart; + while (selectionOffset < selectionMaxOffset) { - ch++; - selectionOffset++; - } while (!utf8_is_codepoint_start(ch) && selectionOffset < selectionMaxOffset); + do + { + ch++; + selectionOffset++; + } while (!UTF8IsCodepointStart(ch) && selectionOffset < selectionMaxOffset); + } - utf8* buffer = _session.Buffer; - utf8* targetShiftPtr = buffer + _session.SelectionStart; - utf8* sourceShiftPtr = targetShiftPtr + _session.SelectionSize; size_t bytesToSkip = selectionOffset - _session.SelectionStart; + if (bytesToSkip == 0) + return; - // std::min() is used to ensure that shiftSize doesn't underflow; it should be between 0 and _session.Size - size_t shiftSize = _session.Size - - std::min(_session.Size, (_session.SelectionStart - _session.SelectionSize + bytesToSkip)); - memmove(targetShiftPtr, sourceShiftPtr, shiftSize); + _session.Buffer->erase( + _session.Buffer->begin() + _session.SelectionStart, _session.Buffer->begin() + _session.SelectionStart + bytesToSkip); _session.SelectionSize = 0; + RecalculateLength(); } void TextComposition::RecalculateLength() { - _session.Size = String::SizeOf(_session.Buffer); - _session.Length = String::LengthOf(_session.Buffer); + _session.Length = String::LengthOf(_session.Buffer->c_str()); } diff --git a/src/openrct2-ui/TextComposition.h b/src/openrct2-ui/TextComposition.h index 9aadf8d41f..6645ed0fb3 100644 --- a/src/openrct2-ui/TextComposition.h +++ b/src/openrct2-ui/TextComposition.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,15 +32,17 @@ namespace OpenRCT2::Ui public: bool IsActive(); - TextInputSession* Start(utf8* buffer, size_t bufferSize); + TextInputSession* Start(u8string& buffer, size_t maxLength); void Stop(); void HandleMessage(const SDL_Event* e); private: - void CursorHome(); - void CursorEnd(); - void CursorLeft(); - void CursorRight(); + void CaretMoveToStart(); + void CaretMoveToEnd(); + void CaretMoveLeft(); + void CaretMoveRight(); + void CaretMoveToLeftToken(); + void CaretMoveToRightToken(); void Insert(const utf8* text); void InsertCodepoint(codepoint_t codepoint); void Clear(); diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp index 7c0ae6b8c3..eeda41160d 100644 --- a/src/openrct2-ui/Ui.cpp +++ b/src/openrct2-ui/Ui.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -43,7 +43,7 @@ int main(int argc, const char** argv) { std::unique_ptr context; int32_t rc = EXIT_SUCCESS; - int runGame = cmdline_run(argv, argc); + int runGame = CommandLineRun(argv, argc); Platform::CoreInit(); RegisterBitmapReader(); if (runGame == EXITCODE_CONTINUE) @@ -64,7 +64,7 @@ int main(int argc, const char** argv) } catch (const SDLException& e) { - log_warning("Failed to create audio context. Using dummy audio context. Error message was: %s", e.what()); + LOG_WARNING("Failed to create audio context. Using dummy audio context. Error message was: %s", e.what()); audioContext = ToShared(CreateDummyAudioContext()); } auto uiContext = ToShared(CreateUiContext(env)); diff --git a/src/openrct2-ui/Ui.h b/src/openrct2-ui/Ui.h index 2d96a922ac..caebc2cca1 100644 --- a/src/openrct2-ui/Ui.h +++ b/src/openrct2-ui/Ui.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/UiContext.Android.cpp b/src/openrct2-ui/UiContext.Android.cpp index 459c073c51..6c633de740 100644 --- a/src/openrct2-ui/UiContext.Android.cpp +++ b/src/openrct2-ui/UiContext.Android.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -53,7 +53,7 @@ namespace OpenRCT2::Ui void ShowMessageBox(SDL_Window* window, const std::string& message) override { - log_verbose(message.c_str()); + LOG_VERBOSE(message.c_str()); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "OpenRCT2", message.c_str(), window); } @@ -67,7 +67,7 @@ namespace OpenRCT2::Ui std::string ShowDirectoryDialog(SDL_Window* window, const std::string& title) override { - log_info(title.c_str()); + LOG_INFO(title.c_str()); STUB(); return "/sdcard/rct2"; diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 1671dd88e5..c1b3b85b58 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -90,7 +90,7 @@ namespace OpenRCT2::Ui void ShowMessageBox(SDL_Window* window, const std::string& message) override { - log_verbose(message.c_str()); + LOG_VERBOSE(message.c_str()); std::string executablePath; DIALOG_TYPE dtype = GetDialogApp(&executablePath); @@ -402,7 +402,7 @@ namespace OpenRCT2::Ui static void ThrowMissingDialogApp() { auto uiContext = GetContext()->GetUiContext(); - std::string dialogMissingWarning = language_get_string(STR_MISSING_DIALOG_APPLICATION_ERROR); + std::string dialogMissingWarning = LanguageGetString(STR_MISSING_DIALOG_APPLICATION_ERROR); uiContext->ShowMessageBox(dialogMissingWarning); throw std::runtime_error(dialogMissingWarning); } diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index 0738961ba3..90156d9378 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -221,7 +221,7 @@ namespace OpenRCT2::Ui SDL_VERSION(&wmInfo.version); if (SDL_GetWindowWMInfo(window, &wmInfo) != SDL_TRUE) { - log_error("SDL_GetWindowWMInfo failed %s", SDL_GetError()); + LOG_ERROR("SDL_GetWindowWMInfo failed %s", SDL_GetError()); exit(-1); } diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index cbdf6f57c0..8831e26987 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -142,10 +142,10 @@ public: _inGameConsole.Update(); } - void Draw(rct_drawpixelinfo* dpi) override + void Draw(DrawPixelInfo* dpi) override { auto bgColour = ThemeGetColour(WindowClass::Chat, 0); - chat_draw(dpi, bgColour); + ChatDraw(dpi, bgColour); _inGameConsole.Draw(dpi); } @@ -196,7 +196,7 @@ public: if (SDL_SetWindowFullscreen(_window, windowFlags)) { - log_fatal("SDL_SetWindowFullscreen %s", SDL_GetError()); + LOG_FATAL("SDL_SetWindowFullscreen %s", SDL_GetError()); exit(1); // TODO try another display mode rather than just exiting the game @@ -291,7 +291,7 @@ public: return std::make_shared(); } - void DrawWeatherAnimation(IWeatherDrawer* weatherDrawer, rct_drawpixelinfo* dpi, DrawWeatherFunc drawFunc) override + void DrawWeatherAnimation(IWeatherDrawer* weatherDrawer, DrawPixelInfo* dpi, DrawWeatherFunc drawFunc) override { int32_t left = dpi->x; int32_t right = left + dpi->width; @@ -310,9 +310,9 @@ public: return _textComposition.IsActive(); } - TextInputSession* StartTextInput(utf8* buffer, size_t bufferSize) override + TextInputSession* StartTextInput(u8string& buffer, size_t maxLength) override { - return _textComposition.Start(buffer, bufferSize); + return _textComposition.Start(buffer, maxLength); } void StopTextInput() override @@ -548,7 +548,7 @@ public: if (abs(gesturePixels) > tolerance) { _gestureRadius = 0; - main_window_zoom(gesturePixels > 0, true); + MainWindowZoom(gesturePixels > 0, true); } } break; @@ -616,7 +616,7 @@ public: void CloseWindow() override { - drawing_engine_dispose(); + DrawingEngineDispose(); if (_window != nullptr) { SDL_DestroyWindow(_window); @@ -725,7 +725,7 @@ private: { SDL_version version{}; SDL_GetVersion(&version); - log_verbose("SDL2 version: %d.%d.%d", version.major, version.minor, version.patch); + LOG_VERBOSE("SDL2 version: %d.%d.%d", version.major, version.minor, version.patch); } void CreateWindow(const ScreenCoordsXY& windowPos) @@ -758,7 +758,7 @@ private: _platformUiContext->SetWindowIcon(_window); // Initialise the surface, palette and draw buffer - drawing_engine_init(); + DrawingEngineInit(); OnResize(width, height); UpdateFullscreenResolutions(); @@ -778,16 +778,16 @@ private: _width = static_cast(width / gConfigGeneral.WindowScale); _height = static_cast(height / gConfigGeneral.WindowScale); - drawing_engine_resize(); + DrawingEngineResize(); uint32_t flags = SDL_GetWindowFlags(_window); if ((flags & SDL_WINDOW_MINIMIZED) == 0) { - window_resize_gui(_width, _height); - window_relocate_windows(_width, _height); + WindowResizeGui(_width, _height); + WindowRelocateWindows(_width, _height); } - gfx_invalidate_screen(); + GfxInvalidateScreen(); // Check if the window has been resized in windowed mode and update the config file accordingly int32_t nonWindowFlags = @@ -887,11 +887,11 @@ private: } static void DrawWeatherWindow( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, rct_window* original_w, int16_t left, int16_t right, int16_t top, + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, WindowBase* original_w, int16_t left, int16_t right, int16_t top, int16_t bottom, DrawWeatherFunc drawFunc) { - rct_window* w{}; - auto itStart = window_get_iterator(original_w); + WindowBase* w{}; + auto itStart = WindowGetIterator(original_w); for (auto it = std::next(itStart);; it++) { if (it == g_window_list.end()) diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index 884003ef6e..c0233972b6 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/UiContext.macOS.mm b/src/openrct2-ui/UiContext.macOS.mm index 193a556bc0..5e211f2fb6 100644 --- a/src/openrct2-ui/UiContext.macOS.mm +++ b/src/openrct2-ui/UiContext.macOS.mm @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -175,7 +175,7 @@ namespace OpenRCT2::Ui private: static int32_t Execute(const std::string& command, std::string* output = nullptr) { - log_verbose("executing \"%s\"...", command.c_str()); + LOG_VERBOSE("executing \"%s\"...", command.c_str()); FILE* fpipe = popen(command.c_str(), "r"); if (fpipe == nullptr) { diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index 3fcb5f44e8..3ede2e6698 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ public: WindowNewRideInitVars(); } - rct_window* OpenWindow(WindowClass wc) override + WindowBase* OpenWindow(WindowClass wc) override { switch (wc) { @@ -144,7 +144,7 @@ public: } } - rct_window* OpenView(uint8_t view) override + WindowBase* OpenView(uint8_t view) override { switch (view) { @@ -174,6 +174,8 @@ public: return WindowChangelogOpen(WV_CHANGELOG); case WV_NEW_VERSION_INFO: return WindowChangelogOpen(WV_NEW_VERSION_INFO); + case WV_CONTRIBUTORS: + return WindowChangelogOpen(WV_CONTRIBUTORS); case WV_FINANCE_MARKETING: return WindowFinancesMarketingOpen(); default: @@ -181,7 +183,7 @@ public: } } - rct_window* OpenDetails(uint8_t type, int32_t id) override + WindowBase* OpenDetails(uint8_t type, int32_t id) override { switch (type) { @@ -190,9 +192,9 @@ public: case WD_NEW_CAMPAIGN: return WindowNewCampaignOpen(id); case WD_DEMOLISH_RIDE: - return WindowRideDemolishPromptOpen(get_ride(RideId::FromUnderlying(id))); + return WindowRideDemolishPromptOpen(*GetRide(RideId::FromUnderlying(id))); case WD_REFURBISH_RIDE: - return WindowRideRefurbishPromptOpen(get_ride(RideId::FromUnderlying(id))); + return WindowRideRefurbishPromptOpen(*GetRide(RideId::FromUnderlying(id))); case WD_SIGN: return WindowSignOpen(id); case WD_SIGN_SMALL: @@ -205,17 +207,17 @@ public: } } - rct_window* ShowError(StringId title, StringId message, const Formatter& args) override + WindowBase* ShowError(StringId title, StringId message, const Formatter& args) override { return WindowErrorOpen(title, message, args); } - rct_window* ShowError(std::string_view title, std::string_view message) override + WindowBase* ShowError(std::string_view title, std::string_view message) override { return WindowErrorOpen(title, message); } - rct_window* OpenIntent(Intent* intent) override + WindowBase* OpenIntent(Intent* intent) override { switch (intent->GetWindowClass()) { @@ -268,8 +270,8 @@ public: case WindowClass::Ride: { const auto rideId = RideId::FromUnderlying(intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID)); - auto ride = get_ride(rideId); - return ride == nullptr ? nullptr : WindowRideMainOpen(ride); + auto ride = GetRide(rideId); + return ride == nullptr ? nullptr : WindowRideMainOpen(*ride); } case WindowClass::TrackDesignPlace: return WindowTrackPlaceOpen( @@ -312,16 +314,16 @@ public: case INTENT_ACTION_NEW_SCENERY: { // Check if window is already open - auto* window = window_bring_to_front_by_class(WindowClass::Scenery); + auto* window = WindowBringToFrontByClass(WindowClass::Scenery); if (window == nullptr) { - auto* tlbrWindow = window_find_by_class(WindowClass::TopToolbar); + auto* tlbrWindow = WindowFindByClass(WindowClass::TopToolbar); if (tlbrWindow != nullptr) { tlbrWindow->Invalidate(); - if (!tool_set(*tlbrWindow, WC_TOP_TOOLBAR__WIDX_SCENERY, Tool::Arrow)) + if (!ToolSet(*tlbrWindow, WC_TOP_TOOLBAR__WIDX_SCENERY, Tool::Arrow)) { - input_set_flag(INPUT_FLAG_6, true); + InputSetFlag(INPUT_FLAG_6, true); window = WindowSceneryOpen(); } } @@ -381,7 +383,7 @@ public: case INTENT_ACTION_REFRESH_RIDE_LIST: { - auto window = window_find_by_class(WindowClass::RideList); + auto window = WindowFindByClass(WindowClass::RideList); if (window != nullptr) { WindowRideListRefreshList(window); @@ -397,16 +399,16 @@ public: case INTENT_ACTION_RIDE_CONSTRUCTION_FOCUS: { auto rideIndex = intent.GetUIntExtra(INTENT_EXTRA_RIDE_ID); - auto w = window_find_by_class(WindowClass::RideConstruction); + auto w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || w->number != rideIndex) { - window_close_construction_windows(); + WindowCloseConstructionWindows(); _currentRideIndex = RideId::FromUnderlying(rideIndex); OpenWindow(WindowClass::RideConstruction); } else { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentRideIndex = RideId::FromUnderlying(rideIndex); } break; @@ -453,7 +455,7 @@ public: case INTENT_ACTION_INVALIDATE_VEHICLE_WINDOW: { auto vehicle = static_cast(intent.GetPointerExtra(INTENT_EXTRA_VEHICLE)); - auto* w = window_find_by_number(WindowClass::Ride, vehicle->ride.ToUnderlying()); + auto* w = WindowFindByNumber(WindowClass::Ride, vehicle->ride.ToUnderlying()); if (w == nullptr) return; @@ -462,7 +464,7 @@ public: if (ride == nullptr || viewVehicleIndex < 0 || viewVehicleIndex >= ride->NumTrains) return; - if (vehicle->sprite_index != ride->vehicles[viewVehicleIndex]) + if (vehicle->Id != ride->vehicles[viewVehicleIndex]) return; w->Invalidate(); @@ -472,7 +474,7 @@ public: case INTENT_ACTION_RIDE_PAINT_RESET_VEHICLE: { auto rideIndex = intent.GetUIntExtra(INTENT_EXTRA_RIDE_ID); - auto w = window_find_by_number(WindowClass::Ride, rideIndex); + auto w = WindowFindByNumber(WindowClass::Ride, rideIndex); if (w != nullptr) { if (w->page == 4) // WINDOW_RIDE_PAGE_COLOUR @@ -486,19 +488,19 @@ public: case INTENT_ACTION_UPDATE_CLIMATE: gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_CLIMATE; - window_invalidate_by_class(WindowClass::GuestList); + WindowInvalidateByClass(WindowClass::GuestList); break; case INTENT_ACTION_UPDATE_GUEST_COUNT: gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_PEEP_COUNT; - window_invalidate_by_class(WindowClass::GuestList); - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::GuestList); + WindowInvalidateByClass(WindowClass::ParkInformation); WindowGuestListRefreshList(); break; case INTENT_ACTION_UPDATE_PARK_RATING: gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_PARK_RATING; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); break; case INTENT_ACTION_UPDATE_DATE: @@ -506,7 +508,7 @@ public: break; case INTENT_ACTION_UPDATE_CASH: - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_MONEY; break; @@ -514,7 +516,7 @@ public: { uint8_t bannerIndex = static_cast(intent.GetUIntExtra(INTENT_EXTRA_BANNER_INDEX)); - rct_window* w = window_find_by_number(WindowClass::Banner, bannerIndex); + WindowBase* w = WindowFindByNumber(WindowClass::Banner, bannerIndex); if (w != nullptr) { w->Invalidate(); @@ -522,8 +524,8 @@ public: break; } case INTENT_ACTION_UPDATE_RESEARCH: - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::Research); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Research); break; case INTENT_ACTION_TRACK_DESIGN_REMOVE_PROVISIONAL: @@ -587,10 +589,10 @@ public: void SetMainView(const ScreenCoordsXY& viewPos, ZoomLevel zoom, int32_t rotation) override { - auto mainWindow = window_get_main(); + auto mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - auto viewport = window_get_viewport(mainWindow); + auto viewport = WindowGetViewport(mainWindow); auto zoomDifference = zoom - viewport->zoom; mainWindow->viewport_target_sprite = EntityId::GetNull(); @@ -607,7 +609,7 @@ public: mainWindow->savedViewPos.y -= viewport->view_height >> 1; // Make sure the viewport has correct coordinates set. - viewport_update_position(mainWindow); + ViewportUpdatePosition(mainWindow); mainWindow->Invalidate(); } @@ -618,7 +620,7 @@ public: WindowAllWheelInput(); } - rct_window* GetOwner(const rct_viewport* viewport) override + WindowBase* GetOwner(const Viewport* viewport) override { for (auto& w : g_window_list) { diff --git a/src/openrct2-ui/WindowManager.h b/src/openrct2-ui/WindowManager.h index ff0cec4051..4077064e6d 100644 --- a/src/openrct2-ui/WindowManager.h +++ b/src/openrct2-ui/WindowManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/AudioChannel.cpp b/src/openrct2-ui/audio/AudioChannel.cpp index ea1b68d3b3..a74ea88f29 100644 --- a/src/openrct2-ui/audio/AudioChannel.cpp +++ b/src/openrct2-ui/audio/AudioChannel.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp index 2444a1435a..65bcb0709f 100644 --- a/src/openrct2-ui/audio/AudioContext.cpp +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -90,7 +90,7 @@ namespace OpenRCT2::Audio } catch (const std::exception& e) { - log_verbose("Unable to create audio source: %s", e.what()); + LOG_VERBOSE("Unable to create audio source: %s", e.what()); return nullptr; } } @@ -119,7 +119,7 @@ namespace OpenRCT2::Audio } catch (const std::exception& e) { - log_verbose("Unable to create audio source: %s", e.what()); + LOG_VERBOSE("Unable to create audio source: %s", e.what()); return nullptr; } } diff --git a/src/openrct2-ui/audio/AudioContext.h b/src/openrct2-ui/audio/AudioContext.h index 2e7090498f..f7625c3ab0 100644 --- a/src/openrct2-ui/audio/AudioContext.h +++ b/src/openrct2-ui/audio/AudioContext.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,31 +23,6 @@ namespace OpenRCT2::Audio struct AudioFormat; struct IAudioContext; -#pragma pack(push, 1) - struct WaveFormat - { - uint16_t encoding; - uint16_t channels; - uint32_t frequency; - uint32_t byterate; - uint16_t blockalign; - uint16_t bitspersample; - }; - assert_struct_size(WaveFormat, 16); - - struct WaveFormatEx - { - uint16_t encoding; - uint16_t channels; - uint32_t frequency; - uint32_t byterate; - uint16_t blockalign; - uint16_t bitspersample; - uint16_t extrasize; - }; - assert_struct_size(WaveFormatEx, 18); -#pragma pack(pop) - struct ISDLAudioChannel : public IAudioChannel { [[nodiscard]] virtual AudioFormat GetFormat() const abstract; diff --git a/src/openrct2-ui/audio/AudioFormat.h b/src/openrct2-ui/audio/AudioFormat.h index b54b99c644..47e3a131c1 100644 --- a/src/openrct2-ui/audio/AudioFormat.h +++ b/src/openrct2-ui/audio/AudioFormat.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index 7d84f30f62..950a904161 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/AudioMixer.h b/src/openrct2-ui/audio/AudioMixer.h index 990d616c23..81757ecd76 100644 --- a/src/openrct2-ui/audio/AudioMixer.h +++ b/src/openrct2-ui/audio/AudioMixer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/FlacAudioSource.cpp b/src/openrct2-ui/audio/FlacAudioSource.cpp index f74863488b..2cb430d544 100644 --- a/src/openrct2-ui/audio/FlacAudioSource.cpp +++ b/src/openrct2-ui/audio/FlacAudioSource.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,7 +60,7 @@ namespace OpenRCT2::Audio _decoder = FLAC__stream_decoder_new(); if (_decoder == nullptr) { - log_verbose("Could not create FLAC stream decoder"); + LOG_VERBOSE("Could not create FLAC stream decoder"); return false; } @@ -69,13 +69,13 @@ namespace OpenRCT2::Audio FlacCallbackWrite, FlacCallbackMetadata, FlacCallbackError, this); if (status != FLAC__STREAM_DECODER_INIT_STATUS_OK) { - log_verbose("Could not initialise FLAC stream"); + LOG_VERBOSE("Could not initialise FLAC stream"); return false; } if (!FLAC__stream_decoder_process_until_end_of_metadata(_decoder)) { - log_verbose("Could not read FLAC metadata"); + LOG_VERBOSE("Could not read FLAC metadata"); return false; } diff --git a/src/openrct2-ui/audio/MemoryAudioSource.cpp b/src/openrct2-ui/audio/MemoryAudioSource.cpp index 9e25a61c50..0cf373aa56 100644 --- a/src/openrct2-ui/audio/MemoryAudioSource.cpp +++ b/src/openrct2-ui/audio/MemoryAudioSource.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/OggAudioSource.cpp b/src/openrct2-ui/audio/OggAudioSource.cpp index f5ae7c7d32..f23a10c79e 100644 --- a/src/openrct2-ui/audio/OggAudioSource.cpp +++ b/src/openrct2-ui/audio/OggAudioSource.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -63,14 +63,14 @@ namespace OpenRCT2::Audio _file.emplace(); if (ov_open_callbacks(_rw, &*_file, NULL, 0, callbacks) < 0) { - log_verbose("Could not open OGG/Vorbis stream"); + LOG_VERBOSE("Could not open OGG/Vorbis stream"); return false; } auto vi = ov_info(&*_file, -1); if (vi == nullptr) { - log_verbose("Failed to get OGG/Vorbis info"); + LOG_VERBOSE("Failed to get OGG/Vorbis info"); return false; } diff --git a/src/openrct2-ui/audio/SDLAudioSource.cpp b/src/openrct2-ui/audio/SDLAudioSource.cpp index babbd60f59..060bb66921 100644 --- a/src/openrct2-ui/audio/SDLAudioSource.cpp +++ b/src/openrct2-ui/audio/SDLAudioSource.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/SDLAudioSource.h b/src/openrct2-ui/audio/SDLAudioSource.h index fc51d8811d..e29b7333fe 100644 --- a/src/openrct2-ui/audio/SDLAudioSource.h +++ b/src/openrct2-ui/audio/SDLAudioSource.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/audio/WavAudioSource.cpp b/src/openrct2-ui/audio/WavAudioSource.cpp index 4379900338..63e8b98618 100644 --- a/src/openrct2-ui/audio/WavAudioSource.cpp +++ b/src/openrct2-ui/audio/WavAudioSource.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/BitmapReader.cpp b/src/openrct2-ui/drawing/BitmapReader.cpp index 0f00119cc4..78ee7e3150 100644 --- a/src/openrct2-ui/drawing/BitmapReader.cpp +++ b/src/openrct2-ui/drawing/BitmapReader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/BitmapReader.h b/src/openrct2-ui/drawing/BitmapReader.h index 4cb981e035..0d645c6542 100644 --- a/src/openrct2-ui/drawing/BitmapReader.h +++ b/src/openrct2-ui/drawing/BitmapReader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp b/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp index e9c3afbf01..f85cf64a51 100644 --- a/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp +++ b/src/openrct2-ui/drawing/engines/DrawingEngineFactory.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp index dad0a413d4..1441e5a095 100644 --- a/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/HardwareDisplayDrawingEngine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -100,7 +100,7 @@ public: int32_t result = SDL_GetRendererInfo(_sdlRenderer, &rendererInfo); if (result < 0) { - log_warning("HWDisplayDrawingEngine::Resize error: %s", SDL_GetError()); + LOG_WARNING("HWDisplayDrawingEngine::Resize error: %s", SDL_GetError()); return; } uint32_t pixelFormat = SDL_PIXELFORMAT_UNKNOWN; @@ -165,7 +165,7 @@ public: if (gConfigGeneral.EnableLightFx) { - auto& lightPalette = lightfx_get_palette(); + auto& lightPalette = LightFXGetPalette(); for (int32_t i = 0; i < 256; i++) { const auto& src = lightPalette[i]; @@ -210,7 +210,7 @@ private: int32_t pitch; if (SDL_LockTexture(_screenTexture, nullptr, &pixels, &pitch) == 0) { - lightfx_render_to_texture(pixels, pitch, _bits, _width, _height, _paletteHWMapped, _lightPaletteHWMapped); + LightFXRenderToTexture(pixels, pitch, _bits, _width, _height, _paletteHWMapped, _lightPaletteHWMapped); SDL_UnlockTexture(_screenTexture); } } @@ -390,12 +390,12 @@ private: _pausedBeforeOverlay = gGamePaused & GAME_PAUSED_NORMAL; if (!_pausedBeforeOverlay) { - pause_toggle(); + PauseToggle(); } } else if (_overlayActive && !newOverlayActive && !_pausedBeforeOverlay) { - pause_toggle(); + PauseToggle(); } _overlayActive = newOverlayActive; diff --git a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp index ed21018663..62f6cb6207 100644 --- a/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/SoftwareDrawingEngine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -64,13 +64,13 @@ public: if (_surface == nullptr || _palette == nullptr || _RGBASurface == nullptr) { - log_fatal("%p || %p || %p == nullptr %s", _surface, _palette, _RGBASurface, SDL_GetError()); + LOG_FATAL("%p || %p || %p == nullptr %s", _surface, _palette, _RGBASurface, SDL_GetError()); exit(-1); } if (SDL_SetSurfacePalette(_surface, _palette)) { - log_fatal("SDL_SetSurfacePalette failed %s", SDL_GetError()); + LOG_FATAL("SDL_SetSurfacePalette failed %s", SDL_GetError()); exit(-1); } @@ -107,7 +107,7 @@ private: { if (SDL_LockSurface(_surface) < 0) { - log_error("locking failed %s", SDL_GetError()); + LOG_ERROR("locking failed %s", SDL_GetError()); return; } } @@ -127,7 +127,7 @@ private: SDL_Surface* windowSurface = SDL_GetWindowSurface(_window); if (SDL_BlitSurface(_surface, nullptr, windowSurface, nullptr)) { - log_fatal("SDL_BlitSurface %s", SDL_GetError()); + LOG_FATAL("SDL_BlitSurface %s", SDL_GetError()); exit(1); } } @@ -136,7 +136,7 @@ private: // first blit to rgba surface to change the pixel format if (SDL_BlitSurface(_surface, nullptr, _RGBASurface, nullptr)) { - log_fatal("SDL_BlitSurface %s", SDL_GetError()); + LOG_FATAL("SDL_BlitSurface %s", SDL_GetError()); exit(1); } @@ -144,13 +144,13 @@ private: // about blit configurations being incompatible. if (SDL_BlitScaled(_RGBASurface, nullptr, SDL_GetWindowSurface(_window), nullptr)) { - log_fatal("SDL_BlitScaled %s", SDL_GetError()); + LOG_FATAL("SDL_BlitScaled %s", SDL_GetError()); exit(1); } } if (SDL_UpdateWindowSurface(_window)) { - log_fatal("SDL_UpdateWindowSurface %s", SDL_GetError()); + LOG_FATAL("SDL_UpdateWindowSurface %s", SDL_GetError()); exit(1); } } diff --git a/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.cpp b/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.cpp index 89246b2db2..8689f79432 100644 --- a/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.h b/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.h index a5569f500e..189cdab9f7 100644 --- a/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/ApplyPaletteShader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.cpp b/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.cpp index 1e18bc561a..6a06d3eeb6 100644 --- a/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.h b/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.h index d91442adcd..b655324f29 100644 --- a/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/ApplyTransparencyShader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h index f31588f57d..ee4802fcf8 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp index c12586090f..f2b7de2ff1 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h index 7de128b3ca..3c1e56e0b5 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawLineShader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp index 3fc0f6836a..55904a1ce1 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h index 8e187b804c..7821990790 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h b/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h index 88286794d9..061f159d4e 100644 --- a/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h +++ b/src/openrct2-ui/drawing/engines/opengl/GLSLTypes.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp index fc48b72e52..1607a28f09 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h index 61dd44aac6..0a727ed1ba 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPI.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -118,7 +118,7 @@ inline void CheckGLError() GLenum error = glGetError(); while (error != GL_NO_ERROR) { - log_error("OpenGL Error 0x%04X", error); + LOG_ERROR("OpenGL Error 0x%04X", error); error = glGetError(); } } diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPIProc.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPIProc.h index 867a18a489..5500fd3064 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLAPIProc.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLAPIProc.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index 8638dbe276..305561fa68 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -99,26 +99,25 @@ public: void ResetPalette(); void StartNewDraw(); - void Clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) override; - void FillRect(rct_drawpixelinfo* dpi, uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override; + void Clear(DrawPixelInfo* dpi, uint8_t paletteIndex) override; + void FillRect(DrawPixelInfo* dpi, uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override; void FilterRect( - rct_drawpixelinfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override; - void DrawLine(rct_drawpixelinfo* dpi, uint32_t colour, const ScreenLine& line) override; - void DrawSprite(rct_drawpixelinfo* dpi, const ImageId imageId, int32_t x, int32_t y) override; + DrawPixelInfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override; + void DrawLine(DrawPixelInfo* dpi, uint32_t colour, const ScreenLine& line) override; + void DrawSprite(DrawPixelInfo* dpi, const ImageId imageId, int32_t x, int32_t y) override; void DrawSpriteRawMasked( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) override; - void DrawSpriteSolid(rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) override; - void DrawGlyph(rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) override; + DrawPixelInfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) override; + void DrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) override; + void DrawGlyph(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) override; void DrawBitmap( - rct_drawpixelinfo* dpi, ImageIndex image, const void* pixels, int32_t width, int32_t height, int32_t x, - int32_t y) override; + DrawPixelInfo* dpi, ImageIndex image, const void* pixels, int32_t width, int32_t height, int32_t x, int32_t y) override; void FlushCommandBuffers(); void FlushLines(); void FlushRectangles(); void HandleTransparency(); - void CalculcateClipping(rct_drawpixelinfo* dpi); + void CalculcateClipping(DrawPixelInfo* dpi); }; class OpenGLWeatherDrawer final : public IWeatherDrawer @@ -132,7 +131,7 @@ public: } virtual void Draw( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, + DrawPixelInfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, const uint8_t* weatherpattern) override { const uint8_t* pattern = weatherpattern; @@ -185,7 +184,7 @@ private: size_t _bitsSize = 0; std::unique_ptr _bits; - rct_drawpixelinfo _bitsDPI = {}; + DrawPixelInfo _bitsDPI = {}; std::unique_ptr _drawingContext; @@ -206,7 +205,7 @@ public: { _window = static_cast(_uiContext->GetWindow()); _bitsDPI.DrawingEngine = this; - lightfx_set_available(false); + LightFXSetAvailable(false); } ~OpenGLDrawingEngine() override @@ -325,8 +324,8 @@ public: { _drawingContext->CalculcateClipping(&_bitsDPI); - window_update_all_viewports(); - window_draw_all(&_bitsDPI, 0, 0, _width, _height); + WindowUpdateAllViewports(); + WindowDrawAll(&_bitsDPI, 0, 0, _width, _height); } void PaintWeather() override @@ -341,7 +340,7 @@ public: const OpenGLFramebuffer& framebuffer = _drawingContext->GetFinalFramebuffer(); framebuffer.Bind(); framebuffer.GetPixels(_bitsDPI); - std::string result = screenshot_dump_png(&_bitsDPI); + std::string result = ScreenshotDumpPNG(&_bitsDPI); return result; } @@ -355,7 +354,7 @@ public: return _drawingContext.get(); } - rct_drawpixelinfo* GetDrawingPixelInfo() override + DrawPixelInfo* GetDrawingPixelInfo() override { return &_bitsDPI; } @@ -370,7 +369,7 @@ public: _drawingContext->GetTextureCache()->InvalidateImage(image); } - rct_drawpixelinfo* GetDPI() + DrawPixelInfo* GetDPI() { return &_bitsDPI; } @@ -430,7 +429,7 @@ private: _height = height; _pitch = pitch; - rct_drawpixelinfo* dpi = &_bitsDPI; + DrawPixelInfo* dpi = &_bitsDPI; dpi->bits = _bits.get(); dpi->x = 0; dpi->y = 0; @@ -509,7 +508,7 @@ void OpenGLDrawingContext::StartNewDraw() _swapFramebuffer->Clear(); } -void OpenGLDrawingContext::Clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) +void OpenGLDrawingContext::Clear(DrawPixelInfo* dpi, uint8_t paletteIndex) { CalculcateClipping(dpi); @@ -517,7 +516,7 @@ void OpenGLDrawingContext::Clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) } void OpenGLDrawingContext::FillRect( - rct_drawpixelinfo* dpi, uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) + DrawPixelInfo* dpi, uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) { CalculcateClipping(dpi); @@ -552,7 +551,7 @@ void OpenGLDrawingContext::FillRect( } void OpenGLDrawingContext::FilterRect( - rct_drawpixelinfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) + DrawPixelInfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) { CalculcateClipping(dpi); @@ -575,7 +574,7 @@ void OpenGLDrawingContext::FilterRect( command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawLine(rct_drawpixelinfo* dpi, uint32_t colour, const ScreenLine& line) +void OpenGLDrawingContext::DrawLine(DrawPixelInfo* dpi, uint32_t colour, const ScreenLine& line) { CalculcateClipping(dpi); @@ -587,11 +586,11 @@ void OpenGLDrawingContext::DrawLine(rct_drawpixelinfo* dpi, uint32_t colour, con command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawSprite(rct_drawpixelinfo* dpi, const ImageId imageId, int32_t x, int32_t y) +void OpenGLDrawingContext::DrawSprite(DrawPixelInfo* dpi, const ImageId imageId, int32_t x, int32_t y) { CalculcateClipping(dpi); - auto g1Element = gfx_get_g1_element(imageId); + auto g1Element = GfxGetG1Element(imageId); if (g1Element == nullptr) { return; @@ -601,7 +600,7 @@ void OpenGLDrawingContext::DrawSprite(rct_drawpixelinfo* dpi, const ImageId imag { if (g1Element->flags & G1_FLAG_HAS_ZOOM_SPRITE) { - rct_drawpixelinfo zoomedDPI; + DrawPixelInfo zoomedDPI; zoomedDPI.bits = dpi->bits; zoomedDPI.x = dpi->x >> 1; zoomedDPI.y = dpi->y >> 1; @@ -738,12 +737,12 @@ void OpenGLDrawingContext::DrawSprite(rct_drawpixelinfo* dpi, const ImageId imag } void OpenGLDrawingContext::DrawSpriteRawMasked( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) + DrawPixelInfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) { CalculcateClipping(dpi); - auto g1ElementMask = gfx_get_g1_element(maskImage); - auto g1ElementColour = gfx_get_g1_element(colourImage); + auto g1ElementMask = GfxGetG1Element(maskImage); + auto g1ElementColour = GfxGetG1Element(colourImage); if (g1ElementMask == nullptr || g1ElementColour == nullptr) { return; @@ -800,13 +799,13 @@ void OpenGLDrawingContext::DrawSpriteRawMasked( command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawSpriteSolid(rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) +void OpenGLDrawingContext::DrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) { CalculcateClipping(dpi); assert((colour & 0xFF) > 0u); - auto g1Element = gfx_get_g1_element(image); + auto g1Element = GfxGetG1Element(image); if (g1Element == nullptr) { return; @@ -852,12 +851,11 @@ void OpenGLDrawingContext::DrawSpriteSolid(rct_drawpixelinfo* dpi, const ImageId command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawGlyph( - rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) +void OpenGLDrawingContext::DrawGlyph(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) { CalculcateClipping(dpi); - auto g1Element = gfx_get_g1_element(image); + auto g1Element = GfxGetG1Element(image); if (g1Element == nullptr) { return; @@ -909,7 +907,7 @@ void OpenGLDrawingContext::DrawGlyph( } void OpenGLDrawingContext::DrawBitmap( - rct_drawpixelinfo* dpi, ImageIndex image, const void* pixels, int32_t width, int32_t height, int32_t x, int32_t y) + DrawPixelInfo* dpi, ImageIndex image, const void* pixels, int32_t width, int32_t height, int32_t x, int32_t y) { CalculcateClipping(dpi); @@ -1029,7 +1027,7 @@ void OpenGLDrawingContext::HandleTransparency() _commandBuffers.transparent.clear(); } -void OpenGLDrawingContext::CalculcateClipping(rct_drawpixelinfo* dpi) +void OpenGLDrawingContext::CalculcateClipping(DrawPixelInfo* dpi) { auto screenDPI = _engine.GetDPI(); auto bytesPerRow = screenDPI->GetBytesPerRow(); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp index 550c6ff470..6fb950c7df 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -85,7 +85,7 @@ void OpenGLFramebuffer::BindRead() const glBindFramebuffer(GL_READ_FRAMEBUFFER, _id); } -void OpenGLFramebuffer::GetPixels(rct_drawpixelinfo& dpi) const +void OpenGLFramebuffer::GetPixels(DrawPixelInfo& dpi) const { assert(dpi.width == _width && dpi.height == _height); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h index 51f0ad0571..7be132d526 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLFramebuffer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -54,7 +54,7 @@ public: void Bind() const; void BindDraw() const; void BindRead() const; - void GetPixels(rct_drawpixelinfo& dpi) const; + void GetPixels(DrawPixelInfo& dpi) const; void SwapColourBuffer(OpenGLFramebuffer& other); GLuint SwapDepthTexture(GLuint depth); diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp index 214c9d1b41..0238c94bb4 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h index f431bf0dd8..bfe6fdefda 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp index 10dcbdeff8..4a49bc6350 100644 --- a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h index f7a4c1c31f..db1e0f031a 100644 --- a/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h +++ b/src/openrct2-ui/drawing/engines/opengl/SwapFramebuffer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp index 7c5d19be7c..0c4e620f5a 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -204,7 +204,7 @@ void TextureCache::GeneratePaletteTexture() static_assert(PALETTE_TO_G1_OFFSET_COUNT + 5 < 256, "Height of palette too large!"); constexpr int32_t height = 256; constexpr int32_t width = height; - rct_drawpixelinfo dpi = CreateDPI(width, height); + DrawPixelInfo dpi = CreateDPI(width, height); // Init no-op palette for (int i = 0; i < width; ++i) @@ -219,8 +219,8 @@ void TextureCache::GeneratePaletteTexture() auto g1Index = GetPaletteG1Index(i); if (g1Index.has_value()) { - auto element = gfx_get_g1_element(g1Index.value()); - gfx_draw_sprite_software(&dpi, ImageId(g1Index.value()), { -element->x_offset, y - element->y_offset }); + auto element = GfxGetG1Element(g1Index.value()); + GfxDrawSpriteSoftware(&dpi, ImageId(g1Index.value()), { -element->x_offset, y - element->y_offset }); } } @@ -268,7 +268,7 @@ void TextureCache::EnlargeAtlasesTexture(GLuint newEntries) AtlasTextureInfo TextureCache::LoadImageTexture(const ImageId imageId) { - rct_drawpixelinfo dpi = GetImageAsDPI(ImageId(imageId.GetIndex())); + DrawPixelInfo dpi = GetImageAsDPI(ImageId(imageId.GetIndex())); auto cacheInfo = AllocateImage(dpi.width, dpi.height); cacheInfo.image = imageId.GetIndex(); @@ -285,7 +285,7 @@ AtlasTextureInfo TextureCache::LoadImageTexture(const ImageId imageId) AtlasTextureInfo TextureCache::LoadGlyphTexture(const ImageId imageId, const PaletteMap& paletteMap) { - rct_drawpixelinfo dpi = GetGlyphAsDPI(imageId, paletteMap); + DrawPixelInfo dpi = GetGlyphAsDPI(imageId, paletteMap); auto cacheInfo = AllocateImage(dpi.width, dpi.height); cacheInfo.image = imageId.GetIndex(); @@ -334,7 +334,7 @@ AtlasTextureInfo TextureCache::AllocateImage(int32_t imageWidth, int32_t imageHe int32_t atlasSize = powf(2, static_cast(Atlas::CalculateImageSizeOrder(imageWidth, imageHeight))); # ifdef DEBUG - log_verbose("new texture atlas #%d (size %d) allocated", atlasIndex, atlasSize); + LOG_VERBOSE("new texture atlas #%d (size %d) allocated", atlasIndex, atlasSize); # endif _atlases.emplace_back(atlasIndex, atlasSize); @@ -347,27 +347,27 @@ AtlasTextureInfo TextureCache::AllocateImage(int32_t imageWidth, int32_t imageHe return _atlases.back().Allocate(imageWidth, imageHeight); } -rct_drawpixelinfo TextureCache::GetImageAsDPI(const ImageId imageId) +DrawPixelInfo TextureCache::GetImageAsDPI(const ImageId imageId) { - auto g1Element = gfx_get_g1_element(imageId); + auto g1Element = GfxGetG1Element(imageId); int32_t width = g1Element->width; int32_t height = g1Element->height; - rct_drawpixelinfo dpi = CreateDPI(width, height); - gfx_draw_sprite_software(&dpi, imageId, { -g1Element->x_offset, -g1Element->y_offset }); + DrawPixelInfo dpi = CreateDPI(width, height); + GfxDrawSpriteSoftware(&dpi, imageId, { -g1Element->x_offset, -g1Element->y_offset }); return dpi; } -rct_drawpixelinfo TextureCache::GetGlyphAsDPI(const ImageId imageId, const PaletteMap& palette) +DrawPixelInfo TextureCache::GetGlyphAsDPI(const ImageId imageId, const PaletteMap& palette) { - auto g1Element = gfx_get_g1_element(imageId); + auto g1Element = GfxGetG1Element(imageId); int32_t width = g1Element->width; int32_t height = g1Element->height; - rct_drawpixelinfo dpi = CreateDPI(width, height); + DrawPixelInfo dpi = CreateDPI(width, height); const auto glyphCoords = ScreenCoordsXY{ -g1Element->x_offset, -g1Element->y_offset }; - gfx_draw_sprite_palette_set_software(&dpi, imageId, glyphCoords, palette); + GfxDrawSpritePaletteSetSoftware(&dpi, imageId, glyphCoords, palette); return dpi; } @@ -379,13 +379,13 @@ void TextureCache::FreeTextures() std::fill(_indexMap.begin(), _indexMap.end(), UNUSED_INDEX); } -rct_drawpixelinfo TextureCache::CreateDPI(int32_t width, int32_t height) +DrawPixelInfo TextureCache::CreateDPI(int32_t width, int32_t height) { size_t numPixels = width * height; auto pixels8 = new uint8_t[numPixels]; std::fill_n(pixels8, numPixels, 0); - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.bits = pixels8; dpi.pitch = 0; dpi.x = 0; @@ -396,7 +396,7 @@ rct_drawpixelinfo TextureCache::CreateDPI(int32_t width, int32_t height) return dpi; } -void TextureCache::DeleteDPI(rct_drawpixelinfo dpi) +void TextureCache::DeleteDPI(DrawPixelInfo dpi) { delete[] dpi.bits; } diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h index 6504a36194..a16a03b4fc 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,7 +25,7 @@ #include #include -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct PaletteMap; enum class FilterPaletteID : int32_t; @@ -237,10 +237,10 @@ private: AtlasTextureInfo LoadGlyphTexture(const ImageId image, const PaletteMap& paletteMap); AtlasTextureInfo AllocateImage(int32_t imageWidth, int32_t imageHeight); AtlasTextureInfo LoadBitmapTexture(ImageIndex image, const void* pixels, size_t width, size_t height); - static rct_drawpixelinfo GetImageAsDPI(const ImageId imageId); - static rct_drawpixelinfo GetGlyphAsDPI(const ImageId imageId, const PaletteMap& paletteMap); + static DrawPixelInfo GetImageAsDPI(const ImageId imageId); + static DrawPixelInfo GetGlyphAsDPI(const ImageId imageId, const PaletteMap& paletteMap); void FreeTextures(); - static rct_drawpixelinfo CreateDPI(int32_t width, int32_t height); - static void DeleteDPI(rct_drawpixelinfo dpi); + static DrawPixelInfo CreateDPI(int32_t width, int32_t height); + static void DeleteDPI(DrawPixelInfo dpi); }; diff --git a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp index cebbbe0484..e9fa4b1f0b 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h index f8699945b0..fa6d1d09cd 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h +++ b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/input/InputManager.cpp b/src/openrct2-ui/input/InputManager.cpp index 8a07a6af9d..fc45816786 100644 --- a/src/openrct2-ui/input/InputManager.cpp +++ b/src/openrct2-ui/input/InputManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -112,17 +112,17 @@ void InputManager::HandleViewScrolling() return; // Shortcut scrolling - auto mainWindow = window_get_main(); + auto mainWindow = WindowGetMain(); if (mainWindow != nullptr && (_viewScroll.x != 0 || _viewScroll.y != 0)) { - window_unfollow_sprite(*mainWindow); + WindowUnfollowSprite(*mainWindow); } InputScrollViewport(_viewScroll); // Mouse edge scrolling if (gConfigGeneral.EdgeScrolling) { - if (input_get_state() != InputState::Normal) + if (InputGetState() != InputState::Normal) return; if (gInputPlaceObjectModifier & (PLACE_OBJECT_MODIFIER_SHIFT_Z | PLACE_OBJECT_MODIFIER_COPY_Z)) @@ -197,7 +197,7 @@ void InputManager::Process(const InputEvent& e) if (e.DeviceKind == InputDeviceKind::Keyboard) { - auto w = window_find_by_class(WindowClass::Textinput); + auto w = WindowFindByClass(WindowClass::Textinput); if (w != nullptr) { if (e.State == InputEventState::Release) @@ -268,7 +268,7 @@ void InputManager::ProcessChat(const InputEvent& e) } if (input != ChatInput::None) { - chat_input(input); + ChatInput(input); } } } @@ -386,7 +386,7 @@ bool InputManager::HasTextInputFocus() const if (gUsingWidgetTextBox || gChatOpen) return true; - auto w = window_find_by_class(WindowClass::Textinput); + auto w = WindowFindByClass(WindowClass::Textinput); if (w != nullptr) return true; diff --git a/src/openrct2-ui/input/InputManager.h b/src/openrct2-ui/input/InputManager.h index 1ed91f874c..c9724916ee 100644 --- a/src/openrct2-ui/input/InputManager.h +++ b/src/openrct2-ui/input/InputManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index 17863f5595..1e6dfe700d 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -45,7 +45,7 @@ static uint8_t _mouseInputQueueReadIndex = 0; static uint8_t _mouseInputQueueWriteIndex = 0; static uint32_t _ticksSinceDragStart; -static widget_ref _dragWidget; +static WidgetRef _dragWidget; static uint8_t _dragScrollIndex; static int32_t _originalWindowWidth; static int32_t _originalWindowHeight; @@ -56,13 +56,13 @@ static uint8_t _currentScrollArea; ScreenCoordsXY gInputDragLast; uint16_t gTooltipTimeout; -widget_ref gTooltipWidget; +WidgetRef gTooltipWidget; ScreenCoordsXY gTooltipCursor; static int16_t _clickRepeatTicks; static MouseState GameGetNextInput(ScreenCoordsXY& screenCoords); -static void InputWidgetOver(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex); +static void InputWidgetOver(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex); static void InputWidgetOverChangeCheck(WindowClass windowClass, rct_windownumber windowNumber, WidgetIndex widgetIndex); static void InputWidgetOverFlatbuttonInvalidate(); void ProcessMouseOver(const ScreenCoordsXY& screenCoords); @@ -71,29 +71,29 @@ void InvalidateScroll(); static RCTMouseData* GetMouseInput(); void TileElementRightClick(int32_t type, TileElement* tileElement, const ScreenCoordsXY& screenCoords); static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState state); -static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex); +static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex); void InputStateWidgetPressed( - const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, rct_window* w, rct_widget* widget); + const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, WindowBase* w, Widget* widget); void SetCursor(CursorID cursor_id); static void InputWindowPositionContinue( - rct_window& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords); -static void InputWindowPositionEnd(rct_window& w, const ScreenCoordsXY& screenCoords); -static void InputWindowResizeBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void InputWindowResizeContinue(rct_window& w, const ScreenCoordsXY& screenCoords); + WindowBase& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords); +static void InputWindowPositionEnd(WindowBase& w, const ScreenCoordsXY& screenCoords); +static void InputWindowResizeBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void InputWindowResizeContinue(WindowBase& w, const ScreenCoordsXY& screenCoords); static void InputWindowResizeEnd(); -static void InputViewportDragBegin(rct_window& w); +static void InputViewportDragBegin(WindowBase& w); static void InputViewportDragContinue(); static void InputViewportDragEnd(); -static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void InputScrollContinue(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void InputScrollBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void InputScrollContinue(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); static void InputScrollEnd(); -static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id); -static void InputScrollPartUpdateHLeft(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id); -static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id); -static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id); -static void InputScrollPartUpdateVTop(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id); -static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id); -static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void InputScrollPartUpdateHThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id); +static void InputScrollPartUpdateHLeft(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id); +static void InputScrollPartUpdateHRight(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id); +static void InputScrollPartUpdateVThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id); +static void InputScrollPartUpdateVTop(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id); +static void InputScrollPartUpdateVBottom(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id); +static void InputUpdateTooltip(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); #pragma region Mouse input @@ -103,7 +103,7 @@ static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const Scr */ void GameHandleInput() { - window_visit_each([](rct_window* w) { window_event_periodic_update_call(w); }); + WindowVisitEach([](WindowBase* w) { WindowEventPeriodicUpdateCall(w); }); InvalidateAllWindowsAfterInput(); @@ -171,7 +171,7 @@ static RCTMouseData* GetMouseInput() * * rct2: 0x006E957F */ -static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex) +static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex) { _inputState = InputState::ScrollRight; gInputDragLast = screenCoords; @@ -180,7 +180,7 @@ static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, rct_window* _dragWidget.widget_index = widgetIndex; _ticksSinceDragStart = 0; - _dragScrollIndex = window_get_scroll_data_index(*w, widgetIndex); + _dragScrollIndex = WindowGetScrollDataIndex(*w, widgetIndex); ContextHideCursor(); } @@ -188,7 +188,7 @@ static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, rct_window* * Based on (heavily changed) * rct2: 0x006E9E0E, 0x006E9ED0 */ -static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, rct_window* w) +static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, WindowBase* w) { WidgetIndex widgetIndex = _dragWidget.widget_index; uint8_t scrollIndex = _dragScrollIndex; @@ -217,7 +217,7 @@ static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, rct_wind } WidgetScrollUpdateThumbs(*w, widgetIndex); - window_invalidate_by_number(w->classification, w->number); + WindowInvalidateByNumber(w->classification, w->number); ScreenCoordsXY fixedCursorPosition = { static_cast(std::ceil(gInputDragLast.x * gConfigGeneral.WindowScale)), static_cast(std::ceil(gInputDragLast.y * gConfigGeneral.WindowScale)) }; @@ -231,7 +231,7 @@ static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, rct_wind */ static void InputScrollRight(const ScreenCoordsXY& screenCoords, MouseState state) { - rct_window* w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); + WindowBase* w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number); if (w == nullptr) { ContextShowCursor(); @@ -267,13 +267,13 @@ static void InputScrollRight(const ScreenCoordsXY& screenCoords, MouseState stat */ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState state) { - rct_window* w; - rct_widget* widget; + WindowBase* w; + Widget* widget; WidgetIndex widgetIndex; // Get window and widget under cursor position - w = window_find_from_point(screenCoords); - widgetIndex = w == nullptr ? -1 : window_find_widget_from_point(*w, screenCoords); + w = WindowFindFromPoint(screenCoords); + widgetIndex = w == nullptr ? -1 : WindowFindWidgetFromPoint(*w, screenCoords); widget = widgetIndex == -1 ? nullptr : &w->widgets[widgetIndex]; switch (_inputState) @@ -291,11 +291,11 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState InputWidgetLeft(screenCoords, w, widgetIndex); break; case MouseState::RightPress: - window_close_by_class(WindowClass::Tooltip); + WindowCloseByClass(WindowClass::Tooltip); if (w != nullptr) { - w = window_bring_to_front(*w); + w = WindowBringToFront(*w); } if (widgetIndex != -1) @@ -326,7 +326,7 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState InputStateWidgetPressed(screenCoords, state, widgetIndex, w, widget); break; case InputState::PositioningWindow: - w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); + w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number); if (w == nullptr) { _inputState = InputState::Reset; @@ -359,7 +359,7 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState InputStateWidgetPressed(screenCoords, state, widgetIndex, w, widget); break; case InputState::ViewportLeft: - w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); + w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number); if (w == nullptr) { _inputState = InputState::Reset; @@ -375,7 +375,7 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState break; } - if (!input_test_flag(INPUT_FLAG_4)) + if (!InputTestFlag(INPUT_FLAG_4)) break; if (w->classification != _dragWidget.window_classification || w->number != _dragWidget.window_number @@ -384,13 +384,13 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState break; } - w = window_find_by_number(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); + w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (w == nullptr) { break; } - window_event_tool_drag_call(w, gCurrentToolWidget.widget_index, screenCoords); + WindowEventToolDragCall(w, gCurrentToolWidget.widget_index, screenCoords); break; case MouseState::LeftRelease: _inputState = InputState::Reset; @@ -398,11 +398,10 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState { if ((_inputFlags & INPUT_FLAG_TOOL_ACTIVE)) { - w = window_find_by_number( - gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); + w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (w != nullptr) { - window_event_tool_up_call(w, gCurrentToolWidget.widget_index, screenCoords); + WindowEventToolUpCall(w, gCurrentToolWidget.widget_index, screenCoords); } } else if (!(_inputFlags & INPUT_FLAG_4)) @@ -435,7 +434,7 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState } break; case InputState::Resizing: - w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); + w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number); if (w == nullptr) { _inputState = InputState::Reset; @@ -460,7 +459,7 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState #pragma region Window positioning / resizing -void InputWindowPositionBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +void InputWindowPositionBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { _inputState = InputState::PositioningWindow; gInputDragLast = screenCoords - w.windowPos; @@ -470,23 +469,23 @@ void InputWindowPositionBegin(rct_window& w, WidgetIndex widgetIndex, const Scre } static void InputWindowPositionContinue( - rct_window& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords) + WindowBase& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords) { int32_t snapProximity; snapProximity = (w.flags & WF_NO_SNAPPING) ? 0 : gConfigGeneral.WindowSnapProximity; - window_move_and_snap(w, newScreenCoords - lastScreenCoords, snapProximity); + WindowMoveAndSnap(w, newScreenCoords - lastScreenCoords, snapProximity); } -static void InputWindowPositionEnd(rct_window& w, const ScreenCoordsXY& screenCoords) +static void InputWindowPositionEnd(WindowBase& w, const ScreenCoordsXY& screenCoords) { _inputState = InputState::Normal; gTooltipTimeout = 0; gTooltipWidget = _dragWidget; - window_event_moved_call(&w, screenCoords); + WindowEventMovedCall(&w, screenCoords); } -static void InputWindowResizeBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void InputWindowResizeBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { _inputState = InputState::Resizing; gInputDragLast = screenCoords; @@ -497,7 +496,7 @@ static void InputWindowResizeBegin(rct_window& w, WidgetIndex widgetIndex, const _originalWindowHeight = w.height; } -static void InputWindowResizeContinue(rct_window& w, const ScreenCoordsXY& screenCoords) +static void InputWindowResizeContinue(WindowBase& w, const ScreenCoordsXY& screenCoords) { if (screenCoords.y < static_cast(ContextGetHeight()) - 2) { @@ -505,7 +504,7 @@ static void InputWindowResizeContinue(rct_window& w, const ScreenCoordsXY& scree int32_t targetWidth = _originalWindowWidth + differentialCoords.x - w.width; int32_t targetHeight = _originalWindowHeight + differentialCoords.y - w.height; - window_resize(w, targetWidth, targetHeight); + WindowResize(w, targetWidth, targetHeight); } } @@ -520,7 +519,7 @@ static void InputWindowResizeEnd() #pragma region Viewport dragging -static void InputViewportDragBegin(rct_window& w) +static void InputViewportDragBegin(WindowBase& w) { w.flags &= ~WF_SCROLLING_TO_LOCATION; _inputState = InputState::ViewportRight; @@ -534,20 +533,20 @@ static void InputViewportDragBegin(rct_window& w) ContextHideCursor(); } - window_unfollow_sprite(w); + WindowUnfollowSprite(w); // gInputFlags |= INPUT_FLAG_5; } static void InputViewportDragContinue() { - rct_window* w; - rct_viewport* viewport; + WindowBase* w; + Viewport* viewport; auto newDragCoords = ContextGetCursorPosition(); const CursorState* cursorState = ContextGetCursorState(); auto differentialCoords = newDragCoords - gInputDragLast; - w = window_find_by_number(_dragWidget.window_classification, _dragWidget.window_number); + w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number); // #3294: Window can be closed during a drag session, so just finish // the session if the window no longer exists @@ -607,7 +606,7 @@ static void InputViewportDragEnd() #pragma region Scroll bars -static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void InputScrollBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { const auto& widget = w.widgets[widgetIndex]; @@ -624,10 +623,10 @@ static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const Scree _currentScrollArea = scroll_area; _currentScrollIndex = scroll_id; - window_event_scroll_select_call(&w, scroll_id, scroll_area); + WindowEventScrollSelectCall(&w, scroll_id, scroll_area); if (scroll_area == SCROLL_PART_VIEW) { - window_event_scroll_mousedown_call(&w, scroll_id, scrollCoords); + WindowEventScrollMousedownCall(&w, scroll_id, scrollCoords); return; } @@ -674,10 +673,10 @@ static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const Scree break; } WidgetScrollUpdateThumbs(w, widgetIndex); - window_invalidate_by_number(w.classification, w.number); + WindowInvalidateByNumber(w.classification, w.number); } -static void InputScrollContinue(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void InputScrollContinue(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { int32_t scroll_part, scroll_id; @@ -717,7 +716,7 @@ static void InputScrollContinue(rct_window& w, WidgetIndex widgetIndex, const Sc switch (scroll_part) { case SCROLL_PART_VIEW: - window_event_scroll_mousedrag_call(&w, scroll_id, newScreenCoords); + WindowEventScrollMousedragCall(&w, scroll_id, newScreenCoords); break; case SCROLL_PART_HSCROLLBAR_LEFT: InputScrollPartUpdateHLeft(w, widgetIndex, scroll_id); @@ -744,12 +743,12 @@ static void InputScrollEnd() * * rct2: 0x006E98F2 */ -static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id) +static void InputScrollPartUpdateHThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id) { const auto& widget = w.widgets[widgetIndex]; auto& scroll = w.scrolls[scroll_id]; - if (window_find_by_number(w.classification, w.number) != nullptr) + if (WindowFindByNumber(w.classification, w.number) != nullptr) { int32_t newLeft; newLeft = scroll.h_right; @@ -775,7 +774,7 @@ static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex, newLeft = x; scroll.h_left = newLeft; WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate_by_number(w.classification, w.number, widgetIndex); + WidgetInvalidateByNumber(w.classification, w.number, widgetIndex); } } @@ -783,12 +782,12 @@ static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex, * * rct2: 0x006E99A9 */ -static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id) +static void InputScrollPartUpdateVThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id) { const auto& widget = w.widgets[widgetIndex]; auto& scroll = w.scrolls[scroll_id]; - if (window_find_by_number(w.classification, w.number) != nullptr) + if (WindowFindByNumber(w.classification, w.number) != nullptr) { int32_t newTop; newTop = scroll.v_bottom; @@ -814,7 +813,7 @@ static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex, newTop = y; scroll.v_top = newTop; WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate_by_number(w.classification, w.number, widgetIndex); + WidgetInvalidateByNumber(w.classification, w.number, widgetIndex); } } @@ -822,16 +821,16 @@ static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex, * * rct2: 0x006E9A60 */ -static void InputScrollPartUpdateHLeft(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id) +static void InputScrollPartUpdateHLeft(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id) { - if (window_find_by_number(w.classification, w.number) != nullptr) + if (WindowFindByNumber(w.classification, w.number) != nullptr) { auto& scroll = w.scrolls[scroll_id]; scroll.flags |= HSCROLLBAR_LEFT_PRESSED; if (scroll.h_left >= 3) scroll.h_left -= 3; WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate_by_number(w.classification, w.number, widgetIndex); + WidgetInvalidateByNumber(w.classification, w.number, widgetIndex); } } @@ -839,10 +838,10 @@ static void InputScrollPartUpdateHLeft(rct_window& w, WidgetIndex widgetIndex, i * * rct2: 0x006E9ABF */ -static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id) +static void InputScrollPartUpdateHRight(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id) { const auto& widget = w.widgets[widgetIndex]; - if (window_find_by_number(w.classification, w.number) != nullptr) + if (WindowFindByNumber(w.classification, w.number) != nullptr) { auto& scroll = w.scrolls[scroll_id]; scroll.flags |= HSCROLLBAR_RIGHT_PRESSED; @@ -857,7 +856,7 @@ static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex, if (scroll.h_left > newLeft) scroll.h_left = newLeft; WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate_by_number(w.classification, w.number, widgetIndex); + WidgetInvalidateByNumber(w.classification, w.number, widgetIndex); } } @@ -865,16 +864,16 @@ static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex, * * rct2: 0x006E9C37 */ -static void InputScrollPartUpdateVTop(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id) +static void InputScrollPartUpdateVTop(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id) { - if (window_find_by_number(w.classification, w.number) != nullptr) + if (WindowFindByNumber(w.classification, w.number) != nullptr) { auto& scroll = w.scrolls[scroll_id]; scroll.flags |= VSCROLLBAR_UP_PRESSED; if (scroll.v_top >= 3) scroll.v_top -= 3; WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate_by_number(w.classification, w.number, widgetIndex); + WidgetInvalidateByNumber(w.classification, w.number, widgetIndex); } } @@ -882,10 +881,10 @@ static void InputScrollPartUpdateVTop(rct_window& w, WidgetIndex widgetIndex, in * * rct2: 0x006E9C96 */ -static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id) +static void InputScrollPartUpdateVBottom(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id) { const auto& widget = w.widgets[widgetIndex]; - if (window_find_by_number(w.classification, w.number) != nullptr) + if (WindowFindByNumber(w.classification, w.number) != nullptr) { auto& scroll = w.scrolls[scroll_id]; scroll.flags |= VSCROLLBAR_DOWN_PRESSED; @@ -900,7 +899,7 @@ static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex, if (scroll.v_top > newTop) scroll.v_top = newTop; WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate_by_number(w.classification, w.number, widgetIndex); + WidgetInvalidateByNumber(w.classification, w.number, widgetIndex); } } @@ -912,11 +911,11 @@ static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex, * * rct2: 0x006E9253 */ -static void InputWidgetOver(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex) +static void InputWidgetOver(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex) { WindowClass windowClass = WindowClass::Null; rct_windownumber windowNumber = 0; - rct_widget* widget = nullptr; + Widget* widget = nullptr; if (w != nullptr) { @@ -937,7 +936,7 @@ static void InputWidgetOver(const ScreenCoordsXY& screenCoords, rct_window* w, W WindowTooltipClose(); else { - window_event_scroll_mouseover_call(w, scrollId, newScreenCoords); + WindowEventScrollMouseoverCall(w, scrollId, newScreenCoords); InputUpdateTooltip(w, widgetIndex, screenCoords); } } @@ -981,14 +980,13 @@ static void InputWidgetOverChangeCheck(WindowClass windowClass, rct_windownumber */ static void InputWidgetOverFlatbuttonInvalidate() { - rct_window* w = window_find_by_number(gHoverWidget.window_classification, gHoverWidget.window_number); + WindowBase* w = WindowFindByNumber(gHoverWidget.window_classification, gHoverWidget.window_number); if (w != nullptr) { - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); if (w->widgets[gHoverWidget.widget_index].type == WindowWidgetType::FlatBtn) { - widget_invalidate_by_number( - gHoverWidget.window_classification, gHoverWidget.window_number, gHoverWidget.widget_index); + WidgetInvalidateByNumber(gHoverWidget.window_classification, gHoverWidget.window_number, gHoverWidget.widget_index); } } } @@ -997,7 +995,7 @@ static void InputWidgetOverFlatbuttonInvalidate() * * rct2: 0x006E95F9 */ -static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex) +static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex) { WindowClass windowClass = WindowClass::Null; rct_windownumber windowNumber = 0; @@ -1008,22 +1006,22 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W windowNumber = w->number; } - window_close_by_class(WindowClass::Error); - window_close_by_class(WindowClass::Tooltip); + WindowCloseByClass(WindowClass::Error); + WindowCloseByClass(WindowClass::Tooltip); // Window might have changed position in the list, therefore find it again - w = window_find_by_number(windowClass, windowNumber); + w = WindowFindByNumber(windowClass, windowNumber); if (w == nullptr) return; - w = window_bring_to_front(*w); + w = WindowBringToFront(*w); if (widgetIndex == -1) return; if (windowClass != gCurrentTextBox.window.classification || windowNumber != gCurrentTextBox.window.number || widgetIndex != gCurrentTextBox.widget_index) { - window_cancel_textbox(); + WindowCancelTextbox(); } const auto& widget = w->widgets[widgetIndex]; @@ -1032,7 +1030,7 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W { case WindowWidgetType::Frame: case WindowWidgetType::Resize: - if (window_can_resize(*w) + if (WindowCanResize(*w) && (screenCoords.x >= w->windowPos.x + w->width - 19 && screenCoords.y >= w->windowPos.y + w->height - 19)) InputWindowResizeBegin(*w, widgetIndex, screenCoords); break; @@ -1043,11 +1041,11 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W _dragWidget.window_number = windowNumber; if (_inputFlags & INPUT_FLAG_TOOL_ACTIVE) { - w = window_find_by_number(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); + w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (w != nullptr) { - input_set_flag(INPUT_FLAG_4, true); - window_event_tool_down_call(w, gCurrentToolWidget.widget_index, screenCoords); + InputSetFlag(INPUT_FLAG_4, true); + WindowEventToolDownCall(w, gCurrentToolWidget.widget_index, screenCoords); } } break; @@ -1090,8 +1088,8 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W _inputState = InputState::WidgetPressed; _clickRepeatTicks = 1; - widget_invalidate_by_number(windowClass, windowNumber, widgetIndex); - window_event_mouse_down_call(w, widgetIndex); + WidgetInvalidateByNumber(windowClass, windowNumber, widgetIndex); + WindowEventMouseDownCall(w, widgetIndex); } break; } @@ -1105,17 +1103,17 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W */ void ProcessMouseOver(const ScreenCoordsXY& screenCoords) { - rct_window* window; + WindowBase* window; CursorID cursorId = CursorID::Arrow; auto ft = Formatter(); ft.Add(STR_NONE); SetMapTooltip(ft); - window = window_find_from_point(screenCoords); + window = WindowFindFromPoint(screenCoords); if (window != nullptr) { - WidgetIndex widgetId = window_find_widget_from_point(*window, screenCoords); + WidgetIndex widgetId = WindowFindWidgetFromPoint(*window, screenCoords); if (widgetId != -1) { switch (window->widgets[widgetId].type) @@ -1162,13 +1160,13 @@ void ProcessMouseOver(const ScreenCoordsXY& screenCoords) break; } // Same as default but with scroll_x/y - cursorId = window_event_cursor_call(window, widgetId, scrollCoords); + cursorId = WindowEventCursorCall(window, widgetId, scrollCoords); if (cursorId == CursorID::Undefined) cursorId = CursorID::Arrow; break; } default: - cursorId = window_event_cursor_call(window, widgetId, screenCoords); + cursorId = WindowEventCursorCall(window, widgetId, screenCoords); if (cursorId == CursorID::Undefined) cursorId = CursorID::Arrow; break; @@ -1188,12 +1186,12 @@ void ProcessMouseTool(const ScreenCoordsXY& screenCoords) { if (_inputFlags & INPUT_FLAG_TOOL_ACTIVE) { - rct_window* w = window_find_by_number(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); + WindowBase* w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (w == nullptr) - tool_cancel(); - else if (input_get_state() != InputState::ViewportRight) - window_event_tool_update_call(w, gCurrentToolWidget.widget_index, screenCoords); + ToolCancel(); + else if (InputGetState() != InputState::ViewportRight) + WindowEventToolUpdateCall(w, gCurrentToolWidget.widget_index, screenCoords); } } @@ -1202,7 +1200,7 @@ void ProcessMouseTool(const ScreenCoordsXY& screenCoords) * rct2: 0x006E8DA7 */ void InputStateWidgetPressed( - const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, rct_window* w, rct_widget* widget) + const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, WindowBase* w, Widget* widget) { WindowClass cursor_w_class; rct_windownumber cursor_w_number; @@ -1210,13 +1208,33 @@ void InputStateWidgetPressed( cursor_w_number = gPressedWidget.window_number; WidgetIndex cursor_widgetIndex = gPressedWidget.widget_index; - rct_window* cursor_w = window_find_by_number(cursor_w_class, cursor_w_number); + WindowBase* cursor_w = WindowFindByNumber(cursor_w_class, cursor_w_number); if (cursor_w == nullptr) { _inputState = InputState::Reset; return; } + if (w != nullptr && state == MouseState::LeftRelease) + { + if (w->widgets[widgetIndex].type == WindowWidgetType::CloseBox && cursor_w_class == w->classification + && cursor_w_number == w->number && widgetIndex == cursor_widgetIndex) + { + if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z) + { + gLastCloseModifier.window.number = w->number; + gLastCloseModifier.window.classification = w->classification; + gLastCloseModifier.modifier = CloseWindowModifier::Shift; + } + else if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_COPY_Z) + { + gLastCloseModifier.window.number = w->number; + gLastCloseModifier.window.classification = w->classification; + gLastCloseModifier.modifier = CloseWindowModifier::Control; + } + } + } + switch (state) { case MouseState::Released: @@ -1236,7 +1254,7 @@ void InputStateWidgetPressed( { if (WidgetIsHoldable(*w, widgetIndex)) { - window_event_mouse_down_call(w, widgetIndex); + WindowEventMouseDownCall(w, widgetIndex); } } } @@ -1246,13 +1264,13 @@ void InputStateWidgetPressed( if (_inputState == InputState::DropdownActive) { gDropdownHighlightedIndex = gDropdownDefaultIndex; - window_invalidate_by_class(WindowClass::Dropdown); + WindowInvalidateByClass(WindowClass::Dropdown); } return; } _inputFlags |= INPUT_FLAG_WIDGET_PRESSED; - widget_invalidate_by_number(cursor_w_class, cursor_w_number, widgetIndex); + WidgetInvalidateByNumber(cursor_w_class, cursor_w_number, widgetIndex); return; case MouseState::LeftRelease: case MouseState::RightPress: @@ -1294,20 +1312,20 @@ void InputStateWidgetPressed( } } - window_close_by_class(WindowClass::Dropdown); + WindowCloseByClass(WindowClass::Dropdown); if (dropdownCleanup) { // Update w as it will be invalid after closing the dropdown window - w = window_find_by_number(wClass, wNumber); + w = WindowFindByNumber(wClass, wNumber); } else { - cursor_w = window_find_by_number(cursor_w_class, cursor_w_number); + cursor_w = WindowFindByNumber(cursor_w_class, cursor_w_number); if (_inputFlags & INPUT_FLAG_WIDGET_PRESSED) { _inputFlags &= ~INPUT_FLAG_WIDGET_PRESSED; - widget_invalidate_by_number(cursor_w_class, cursor_w_number, cursor_widgetIndex); + WidgetInvalidateByNumber(cursor_w_class, cursor_w_number, cursor_widgetIndex); } _inputState = InputState::Normal; @@ -1323,7 +1341,7 @@ void InputStateWidgetPressed( dropdown_index = gDropdownDefaultIndex; } } - window_event_dropdown_call(cursor_w, cursor_widgetIndex, dropdown_index); + WindowEventDropdownCall(cursor_w, cursor_widgetIndex, dropdown_index); } } } @@ -1354,8 +1372,8 @@ void InputStateWidgetPressed( if (WidgetIsDisabled(*w, widgetIndex)) break; - widget_invalidate_by_number(cursor_w_class, cursor_w_number, widgetIndex); - window_event_mouse_up_call(w, widgetIndex); + WidgetInvalidateByNumber(cursor_w_class, cursor_w_number, widgetIndex); + WindowEventMouseUpCall(w, widgetIndex); return; default: @@ -1369,13 +1387,13 @@ void InputStateWidgetPressed( if (_inputFlags & INPUT_FLAG_WIDGET_PRESSED) { _inputFlags &= ~INPUT_FLAG_WIDGET_PRESSED; - widget_invalidate_by_number(cursor_w_class, cursor_w_number, cursor_widgetIndex); + WidgetInvalidateByNumber(cursor_w_class, cursor_w_number, cursor_widgetIndex); } return; } gDropdownHighlightedIndex = -1; - window_invalidate_by_class(WindowClass::Dropdown); + WindowInvalidateByClass(WindowClass::Dropdown); if (w == nullptr) { return; @@ -1442,7 +1460,7 @@ void InputStateWidgetPressed( } gDropdownHighlightedIndex = dropdown_index; - window_invalidate_by_class(WindowClass::Dropdown); + WindowInvalidateByClass(WindowClass::Dropdown); } else { @@ -1451,7 +1469,7 @@ void InputStateWidgetPressed( } } -static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void InputUpdateTooltip(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (gTooltipWidget.window_classification == WindowClass::Null) { @@ -1470,7 +1488,7 @@ static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const Scr } else { - reset_tooltip_not_shown(); + ResetTooltipNotShown(); if (w == nullptr || gTooltipWidget.window_classification != w->classification || gTooltipWidget.window_number != w->number || gTooltipWidget.widget_index != widgetIndex @@ -1482,7 +1500,7 @@ static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const Scr gTooltipTimeout += gCurrentDeltaTime; if (gTooltipTimeout >= 8000) { - window_close_by_class(WindowClass::Tooltip); + WindowCloseByClass(WindowClass::Tooltip); } } } @@ -1532,12 +1550,12 @@ void SetCursor(CursorID cursor_id) */ void InvalidateScroll() { - rct_window* w = window_find_by_number(gPressedWidget.window_classification, gPressedWidget.window_number); + WindowBase* w = WindowFindByNumber(gPressedWidget.window_classification, gPressedWidget.window_number); if (w != nullptr) { // Reset to basic scroll w->scrolls[_currentScrollIndex].flags &= 0xFF11; - window_invalidate_by_number(gPressedWidget.window_classification, gPressedWidget.window_number); + WindowInvalidateByNumber(gPressedWidget.window_classification, gPressedWidget.window_number); } } @@ -1563,10 +1581,10 @@ void StoreMouseInput(MouseState state, const ScreenCoordsXY& screenCoords) void GameHandleEdgeScroll() { - rct_window* mainWindow; + WindowBase* mainWindow; int32_t scrollX, scrollY; - mainWindow = window_get_main(); + mainWindow = WindowGetMain(); if (mainWindow == nullptr) return; if ((mainWindow->flags & WF_NO_SCROLLING) || (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO))) @@ -1602,8 +1620,8 @@ bool InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER modifier) void InputScrollViewport(const ScreenCoordsXY& scrollScreenCoords) { - rct_window* mainWindow = window_get_main(); - rct_viewport* viewport = mainWindow->viewport; + WindowBase* mainWindow = WindowGetMain(); + Viewport* viewport = mainWindow->viewport; const int32_t speed = gConfigGeneral.EdgeScrollingSpeed; @@ -1619,8 +1637,8 @@ void InputScrollViewport(const ScreenCoordsXY& scrollScreenCoords) int32_t y = mainWindow->savedViewPos.y + viewport->view_height / 2; int32_t y_dy = mainWindow->savedViewPos.y + viewport->view_height / 2 + dy; - auto mapCoord = viewport_coord_to_map_coord({ x, y }, 0); - auto mapCoord_dy = viewport_coord_to_map_coord({ x, y_dy }, 0); + auto mapCoord = ViewportPosToMapPos({ x, y }, 0); + auto mapCoord_dy = ViewportPosToMapPos({ x, y_dy }, 0); // Check if we're crossing the boundary // Clamp to the map minimum value diff --git a/src/openrct2-ui/input/ShortcutIds.h b/src/openrct2-ui/input/ShortcutIds.h index 8e778695f9..f1724efaef 100644 --- a/src/openrct2-ui/input/ShortcutIds.h +++ b/src/openrct2-ui/input/ShortcutIds.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,10 +29,10 @@ namespace OpenRCT2::Ui::ShortcutId constexpr std::string_view InterfaceMute = "interface.misc.mute"; constexpr std::string_view InterfaceSceneryPicker = "interface.misc.scenery_picker"; constexpr std::string_view InterfaceDisableClearance = "interface.misc.disable_clearance"; - constexpr std::string_view MultiplayerChat = "interface.misc.multiplayer_chat"; + constexpr std::string_view InterfaceMultiplayerChat = "interface.misc.multiplayer_chat"; // Interface / graphics - constexpr std::string_view ScaleToggleWindowMode = "interface.graphics.toggle_window_mode"; + constexpr std::string_view InterfaceScaleToggleWindowMode = "interface.graphics.toggle_window_mode"; constexpr std::string_view InterfaceScaleIncrease = "interface.graphics.increase"; constexpr std::string_view InterfaceScaleDecrease = "interface.graphics.decrease"; @@ -55,7 +55,7 @@ namespace OpenRCT2::Ui::ShortcutId constexpr std::string_view InterfaceOpenTransparencyOptions = "interface.open.transparency_options"; constexpr std::string_view InterfaceOpenCheats = "interface.open.cheats"; constexpr std::string_view InterfaceOpenTileInspector = "interface.open.tileinspector"; - constexpr std::string_view MultiplayerShow = "interface.open.multiplayer"; + constexpr std::string_view InterfaceMultiplayerShow = "interface.open.multiplayer"; // View / general constexpr std::string_view ViewGeneralZoomOut = "view.general.zoom_out"; diff --git a/src/openrct2-ui/input/ShortcutInput.cpp b/src/openrct2-ui/input/ShortcutInput.cpp index ecaed59132..dd147ee40d 100644 --- a/src/openrct2-ui/input/ShortcutInput.cpp +++ b/src/openrct2-ui/input/ShortcutInput.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -203,7 +203,7 @@ std::string_view ShortcutInput::GetModifierName(uint32_t key, bool localised) { if (localised && r->second.second != STR_NONE) { - return language_get_string(r->second.second); + return LanguageGetString(r->second.second); } return r->second.first; @@ -250,7 +250,7 @@ std::string_view ShortcutInput::GetLocalisedKeyName(uint32_t key) auto r = _keys.find(key); if (r != _keys.end()) { - return language_get_string(r->second); + return LanguageGetString(r->second); } return {}; @@ -301,31 +301,31 @@ std::string ShortcutInput::ToString(bool localised) const switch (Button) { case 0: - result += localised ? FormatStringId(STR_SHORTCUT_MOUSE_LEFT, Button + 1) : "LMB"; + result += localised ? FormatStringID(STR_SHORTCUT_MOUSE_LEFT, Button + 1) : "LMB"; break; case 1: - result += localised ? FormatStringId(STR_SHORTCUT_MOUSE_RIGHT, Button + 1) : "RMB"; + result += localised ? FormatStringID(STR_SHORTCUT_MOUSE_RIGHT, Button + 1) : "RMB"; break; default: - result += localised ? FormatStringId(STR_SHORTCUT_MOUSE_NUMBER, Button + 1) + result += localised ? FormatStringID(STR_SHORTCUT_MOUSE_NUMBER, Button + 1) : "MOUSE " + std::to_string(Button + 1); break; } } else if (Kind == InputDeviceKind::JoyButton) { - result += localised ? FormatStringId(STR_SHORTCUT_JOY_NUMBER, Button + 1) : "JOY " + std::to_string(Button + 1); + result += localised ? FormatStringID(STR_SHORTCUT_JOY_NUMBER, Button + 1) : "JOY " + std::to_string(Button + 1); } else if (Kind == InputDeviceKind::JoyHat) { if (Button & SDL_HAT_LEFT) - result += localised ? language_get_string(STR_SHORTCUT_JOY_LEFT) : "JOY LEFT"; + result += localised ? LanguageGetString(STR_SHORTCUT_JOY_LEFT) : "JOY LEFT"; else if (Button & SDL_HAT_RIGHT) - result += localised ? language_get_string(STR_SHORTCUT_JOY_RIGHT) : "JOY RIGHT"; + result += localised ? LanguageGetString(STR_SHORTCUT_JOY_RIGHT) : "JOY RIGHT"; else if (Button & SDL_HAT_UP) - result += localised ? language_get_string(STR_SHORTCUT_JOY_UP) : "JOY UP"; + result += localised ? LanguageGetString(STR_SHORTCUT_JOY_UP) : "JOY UP"; else if (Button & SDL_HAT_DOWN) - result += localised ? language_get_string(STR_SHORTCUT_JOY_DOWN) : "JOY DOWN"; + result += localised ? LanguageGetString(STR_SHORTCUT_JOY_DOWN) : "JOY DOWN"; else result += "JOY ?"; } diff --git a/src/openrct2-ui/input/ShortcutManager.cpp b/src/openrct2-ui/input/ShortcutManager.cpp index 1c845eaa0e..b059f49e2d 100644 --- a/src/openrct2-ui/input/ShortcutManager.cpp +++ b/src/openrct2-ui/input/ShortcutManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -122,6 +122,7 @@ void ShortcutManager::RegisterShortcut(RegisteredShortcut&& shortcut) auto id = std::make_unique(shortcut.Id); auto idView = std::string_view(*id); _ids.push_back(std::move(id)); + shortcut.OrderIndex = Shortcuts.size(); Shortcuts[idView] = shortcut; } } @@ -173,7 +174,7 @@ void ShortcutManager::ProcessEvent(const InputEvent& e) shortcut->Current.push_back(std::move(shortcutInput.value())); } _pendingShortcutChange.clear(); - window_close_by_class(WindowClass::ChangeKeyboardShortcut); + WindowCloseByClass(WindowClass::ChangeKeyboardShortcut); SaveUserBindings(); } } @@ -396,12 +397,12 @@ std::string_view ShortcutManager::GetLegacyShortcutId(size_t index) ShortcutId::ViewScrollLeft, ShortcutId::ViewScrollDown, ShortcutId::ViewScrollRight, - ShortcutId::MultiplayerChat, + ShortcutId::InterfaceMultiplayerChat, ShortcutId::InterfaceSaveGame, ShortcutId::InterfaceShowOptions, ShortcutId::InterfaceMute, - ShortcutId::ScaleToggleWindowMode, - ShortcutId::MultiplayerShow, + ShortcutId::InterfaceScaleToggleWindowMode, + ShortcutId::InterfaceMultiplayerShow, std::string_view(), ShortcutId::DebugTogglePaintDebugWindow, ShortcutId::ViewToggleFootpaths, diff --git a/src/openrct2-ui/input/ShortcutManager.h b/src/openrct2-ui/input/ShortcutManager.h index d1a5406728..45e4b14b18 100644 --- a/src/openrct2-ui/input/ShortcutManager.h +++ b/src/openrct2-ui/input/ShortcutManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -62,6 +62,7 @@ namespace OpenRCT2::Ui std::vector Default; std::vector Current; std::function Action; + size_t OrderIndex = static_cast(-1); RegisteredShortcut() = default; RegisteredShortcut(std::string_view id, std::string_view name, const std::function& action) diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index d66fd32273..19603af3d0 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,6 +10,7 @@ #include "ShortcutIds.h" #include "ShortcutManager.h" +#include #include #include #include @@ -21,8 +22,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -36,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -57,10 +58,10 @@ static void RotateCamera(int32_t direction) { if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { - auto window = window_get_main(); + auto window = WindowGetMain(); if (window != nullptr) { - window_rotate_camera(*window, direction); + WindowRotateCamera(*window, direction); } } } @@ -69,7 +70,7 @@ static void ToggleViewFlag(int32_t viewportFlag) { if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { - auto window = window_get_main(); + auto window = WindowGetMain(); if (window != nullptr) { window->viewport->flags ^= viewportFlag; @@ -84,60 +85,60 @@ static void ShortcutRotateConstructionObject() return; // Rotate scenery - rct_window* w = window_find_by_class(WindowClass::Scenery); + WindowBase* w = WindowFindByClass(WindowClass::Scenery); if (w != nullptr && !WidgetIsDisabled(*w, WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON) && w->widgets[WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type != WindowWidgetType::Empty) { - window_event_mouse_up_call(w, WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON); + WindowEventMouseUpCall(w, WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON); return; } // Rotate construction track piece - w = window_find_by_class(WindowClass::RideConstruction); + w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && !WidgetIsDisabled(*w, WC_RIDE_CONSTRUCTION__WIDX_ROTATE) && w->widgets[WC_RIDE_CONSTRUCTION__WIDX_ROTATE].type != WindowWidgetType::Empty) { // Check if building a maze... if (w->widgets[WC_RIDE_CONSTRUCTION__WIDX_ROTATE].tooltip != STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP) { - window_event_mouse_up_call(w, WC_RIDE_CONSTRUCTION__WIDX_ROTATE); + WindowEventMouseUpCall(w, WC_RIDE_CONSTRUCTION__WIDX_ROTATE); return; } } // Rotate track design preview - w = window_find_by_class(WindowClass::TrackDesignList); + w = WindowFindByClass(WindowClass::TrackDesignList); if (w != nullptr && !WidgetIsDisabled(*w, WC_TRACK_DESIGN_LIST__WIDX_ROTATE) && w->widgets[WC_TRACK_DESIGN_LIST__WIDX_ROTATE].type != WindowWidgetType::Empty) { - window_event_mouse_up_call(w, WC_TRACK_DESIGN_LIST__WIDX_ROTATE); + WindowEventMouseUpCall(w, WC_TRACK_DESIGN_LIST__WIDX_ROTATE); return; } // Rotate track design placement - w = window_find_by_class(WindowClass::TrackDesignPlace); + w = WindowFindByClass(WindowClass::TrackDesignPlace); if (w != nullptr && !WidgetIsDisabled(*w, WC_TRACK_DESIGN_PLACE__WIDX_ROTATE) && w->widgets[WC_TRACK_DESIGN_PLACE__WIDX_ROTATE].type != WindowWidgetType::Empty) { - window_event_mouse_up_call(w, WC_TRACK_DESIGN_PLACE__WIDX_ROTATE); + WindowEventMouseUpCall(w, WC_TRACK_DESIGN_PLACE__WIDX_ROTATE); return; } // Rotate park entrance - w = window_find_by_class(WindowClass::Map); + w = WindowFindByClass(WindowClass::Map); if (w != nullptr && !WidgetIsDisabled(*w, WC_MAP__WIDX_ROTATE_90) && w->widgets[WC_MAP__WIDX_ROTATE_90].type != WindowWidgetType::Empty) { - window_event_mouse_up_call(w, WC_MAP__WIDX_ROTATE_90); + WindowEventMouseUpCall(w, WC_MAP__WIDX_ROTATE_90); return; } // Rotate selected element in tile inspector - w = window_find_by_class(WindowClass::TileInspector); + w = WindowFindByClass(WindowClass::TileInspector); if (w != nullptr && !WidgetIsDisabled(*w, WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE) && w->widgets[WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE].type != WindowWidgetType::Empty) { - window_event_mouse_up_call(w, WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE); + WindowEventMouseUpCall(w, WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE); return; } } @@ -146,26 +147,26 @@ static void ShortcutRemoveTopBottomToolbarToggle() { if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) { - if (window_find_by_class(WindowClass::TitleLogo) != nullptr) + if (WindowFindByClass(WindowClass::TitleLogo) != nullptr) { - window_close(*window_find_by_class(WindowClass::TitleLogo)); - window_close(*window_find_by_class(WindowClass::TitleOptions)); - window_close(*window_find_by_class(WindowClass::TitleMenu)); - window_close(*window_find_by_class(WindowClass::TitleExit)); - title_set_hide_version_info(true); + WindowClose(*WindowFindByClass(WindowClass::TitleLogo)); + WindowClose(*WindowFindByClass(WindowClass::TitleOptions)); + WindowClose(*WindowFindByClass(WindowClass::TitleMenu)); + WindowClose(*WindowFindByClass(WindowClass::TitleExit)); + TitleSetHideVersionInfo(true); } else { - title_create_windows(); + TitleCreateWindows(); } } else { - if (window_find_by_class(WindowClass::TopToolbar) != nullptr) + if (WindowFindByClass(WindowClass::TopToolbar) != nullptr) { - window_close(*window_find_by_class(WindowClass::Dropdown)); - window_close(*window_find_by_class(WindowClass::TopToolbar)); - window_close(*window_find_by_class(WindowClass::BottomToolbar)); + WindowClose(*WindowFindByClass(WindowClass::Dropdown)); + WindowClose(*WindowFindByClass(WindowClass::TopToolbar)); + WindowClose(*WindowFindByClass(WindowClass::BottomToolbar)); } else { @@ -181,7 +182,7 @@ static void ShortcutRemoveTopBottomToolbarToggle() } } } - gfx_invalidate_screen(); + GfxInvalidateScreen(); } static void ShortcutAdjustLand() @@ -193,11 +194,11 @@ static void ShortcutAdjustLand() { if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - rct_window* window = window_find_by_class(WindowClass::TopToolbar); + WindowBase* window = WindowFindByClass(WindowClass::TopToolbar); if (window != nullptr) { window->Invalidate(); - window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_LAND); + WindowEventMouseUpCall(window, WC_TOP_TOOLBAR__WIDX_LAND); } } } @@ -212,11 +213,11 @@ static void ShortcutAdjustWater() { if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - rct_window* window = window_find_by_class(WindowClass::TopToolbar); + WindowBase* window = WindowFindByClass(WindowClass::TopToolbar); if (window != nullptr) { window->Invalidate(); - window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_WATER); + WindowEventMouseUpCall(window, WC_TOP_TOOLBAR__WIDX_WATER); } } } @@ -231,11 +232,11 @@ static void ShortcutBuildScenery() { if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - rct_window* window = window_find_by_class(WindowClass::TopToolbar); + WindowBase* window = WindowFindByClass(WindowClass::TopToolbar); if (window != nullptr) { window->Invalidate(); - window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_SCENERY); + WindowEventMouseUpCall(window, WC_TOP_TOOLBAR__WIDX_SCENERY); } } } @@ -250,11 +251,11 @@ static void ShortcutBuildPaths() { if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - rct_window* window = window_find_by_class(WindowClass::TopToolbar); + WindowBase* window = WindowFindByClass(WindowClass::TopToolbar); if (window != nullptr) { window->Invalidate(); - window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_PATH); + WindowEventMouseUpCall(window, WC_TOP_TOOLBAR__WIDX_PATH); } } } @@ -363,8 +364,8 @@ static void ShortcutReduceGameSpeed() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - if (network_get_mode() == NETWORK_MODE_NONE) - game_reduce_game_speed(); + if (NetworkGetMode() == NETWORK_MODE_NONE) + GameReduceGameSpeed(); } static void ShortcutIncreaseGameSpeed() @@ -372,8 +373,8 @@ static void ShortcutIncreaseGameSpeed() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - if (network_get_mode() == NETWORK_MODE_NONE) - game_increase_game_speed(); + if (NetworkGetMode() == NETWORK_MODE_NONE) + GameIncreaseGameSpeed(); } static void ShortcutOpenCheatWindow() @@ -382,10 +383,10 @@ static void ShortcutOpenCheatWindow() return; // Check if window is already open - rct_window* window = window_find_by_class(WindowClass::Cheats); + WindowBase* window = WindowFindByClass(WindowClass::Cheats); if (window != nullptr) { - window_close(*window); + WindowClose(*window); return; } ContextOpenWindow(WindowClass::Cheats); @@ -408,11 +409,11 @@ static void ShortcutClearScenery() { if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - rct_window* window = window_find_by_class(WindowClass::TopToolbar); + WindowBase* window = WindowFindByClass(WindowClass::TopToolbar); if (window != nullptr) { window->Invalidate(); - window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_CLEAR_SCENERY); + WindowEventMouseUpCall(window, WC_TOP_TOOLBAR__WIDX_CLEAR_SCENERY); } } } @@ -423,14 +424,14 @@ static void ShortcutQuickSaveGame() // Do a quick save in playing mode and a regular save in Scenario Editor mode. In other cases, don't do anything. if (gScreenFlags == SCREEN_FLAGS_PLAYING) { - tool_cancel(); - save_game(); + ToolCancel(); + SaveGame(); } else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); - intent.putExtra(INTENT_EXTRA_PATH, gScenarioName); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); + intent.PutExtra(INTENT_EXTRA_PATH, gScenarioName); ContextOpenIntent(&intent); } } @@ -450,23 +451,23 @@ static void ShortcutOpenSceneryPicker() || (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && gEditorStep != EditorStep::LandscapeEditor)) return; - rct_window* window_scenery = window_find_by_class(WindowClass::Scenery); + WindowBase* window_scenery = WindowFindByClass(WindowClass::Scenery); if (window_scenery == nullptr) { - rct_window* window_toolbar = window_find_by_class(WindowClass::TopToolbar); + WindowBase* window_toolbar = WindowFindByClass(WindowClass::TopToolbar); if (window_toolbar != nullptr) { window_toolbar->Invalidate(); - window_event_mouse_up_call(window_toolbar, WC_TOP_TOOLBAR__WIDX_SCENERY); + WindowEventMouseUpCall(window_toolbar, WC_TOP_TOOLBAR__WIDX_SCENERY); } } - window_scenery = window_find_by_class(WindowClass::Scenery); + window_scenery = WindowFindByClass(WindowClass::Scenery); if (window_scenery != nullptr && !WidgetIsDisabled(*window_scenery, WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON) && window_scenery->widgets[WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON].type != WindowWidgetType::Empty && !gWindowSceneryEyedropperEnabled) { - window_event_mouse_up_call(window_scenery, WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON); + WindowEventMouseUpCall(window_scenery, WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON); return; } } @@ -475,7 +476,7 @@ static void ShortcutScaleUp() { gConfigGeneral.WindowScale += 0.25f; ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); } @@ -485,7 +486,7 @@ static void ShortcutScaleDown() gConfigGeneral.WindowScale -= 0.25f; gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale); ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); } @@ -493,19 +494,19 @@ static void ShortcutScaleDown() // Tile inspector shortcuts static void TileInspectorMouseUp(WidgetIndex widgetIndex) { - auto w = window_find_by_class(WindowClass::TileInspector); + auto w = WindowFindByClass(WindowClass::TileInspector); if (w != nullptr && !WidgetIsDisabled(*w, widgetIndex) && w->widgets[widgetIndex].type != WindowWidgetType::Empty) { - window_event_mouse_up_call(w, widgetIndex); + WindowEventMouseUpCall(w, widgetIndex); } } static void TileInspectorMouseDown(WidgetIndex widgetIndex) { - auto w = window_find_by_class(WindowClass::TileInspector); + auto w = WindowFindByClass(WindowClass::TileInspector); if (w != nullptr && !WidgetIsDisabled(*w, widgetIndex) && w->widgets[widgetIndex].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, widgetIndex); + WindowEventMouseDownCall(w, widgetIndex); } } @@ -515,7 +516,7 @@ static void ShortcutToggleVisibility() if (windowTileInspectorSelectedIndex < 0) return; - rct_window* w = window_find_by_class(WindowClass::TileInspector); + WindowBase* w = WindowFindByClass(WindowClass::TileInspector); if (w == nullptr) return; @@ -530,7 +531,7 @@ static void ShortcutToggleVisibility() static void ShortcutIncreaseElementHeight() { - rct_window* w = window_find_by_class(WindowClass::TileInspector); + WindowBase* w = WindowFindByClass(WindowClass::TileInspector); if (w != nullptr) { int action = -1; @@ -564,14 +565,14 @@ static void ShortcutIncreaseElementHeight() break; } if (action != -1 && !WidgetIsDisabled(*w, action) && w->widgets[action].type != WindowWidgetType::Empty) - window_event_mouse_down_call(w, action); + WindowEventMouseDownCall(w, action); return; } } static void ShortcutDecreaseElementHeight() { - rct_window* w = window_find_by_class(WindowClass::TileInspector); + WindowBase* w = WindowFindByClass(WindowClass::TileInspector); if (w != nullptr) { int action = -1; @@ -605,15 +606,15 @@ static void ShortcutDecreaseElementHeight() break; } if (action != -1 && !WidgetIsDisabled(*w, action) && w->widgets[action].type != WindowWidgetType::Empty) - window_event_mouse_down_call(w, action); + WindowEventMouseDownCall(w, action); return; } } static void ShortcutToggleClearanceChecks() { - auto setCheatAction = SetCheatAction(CheatType::DisableClearanceChecks, gCheatsDisableClearanceChecks ? 0 : 1); - GameActions::Execute(&setCheatAction); + auto cheatSetAction = CheatSetAction(CheatType::DisableClearanceChecks, gCheatsDisableClearanceChecks ? 0 : 1); + GameActions::Execute(&cheatSetAction); } static void ShortcutToggleConsole() @@ -625,7 +626,7 @@ static void ShortcutToggleConsole() } else if (gConfigGeneral.DebuggingTools && !ContextIsInputActive()) { - window_cancel_textbox(); + WindowCancelTextbox(); console.Toggle(); } } @@ -635,14 +636,14 @@ static void ShortcutConstructionTurnLeft() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - rct_window* window = window_find_by_class(WindowClass::Footpath); + WindowBase* window = WindowFindByClass(WindowClass::Footpath); if (window != nullptr) { - window_footpath_keyboard_shortcut_turn_left(); + WindowFootpathKeyboardShortcutTurnLeft(); } else { - window_ride_construction_keyboard_shortcut_turn_left(); + WindowRideConstructionKeyboardShortcutTurnLeft(); } } @@ -650,14 +651,14 @@ static void ShortcutConstructionTurnRight() { if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - rct_window* window = window_find_by_class(WindowClass::Footpath); + WindowBase* window = WindowFindByClass(WindowClass::Footpath); if (window != nullptr) { - window_footpath_keyboard_shortcut_turn_right(); + WindowFootpathKeyboardShortcutTurnRight(); } else { - window_ride_construction_keyboard_shortcut_turn_right(); + WindowRideConstructionKeyboardShortcutTurnRight(); } } @@ -666,14 +667,14 @@ static void ShortcutConstructionSlopeUp() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - rct_window* window = window_find_by_class(WindowClass::Footpath); + WindowBase* window = WindowFindByClass(WindowClass::Footpath); if (window != nullptr) { - window_footpath_keyboard_shortcut_slope_up(); + WindowFootpathKeyboardShortcutSlopeUp(); } else { - window_ride_construction_keyboard_shortcut_slope_up(); + WindowRideConstructionKeyboardShortcutSlopeUp(); } } @@ -682,14 +683,14 @@ static void ShortcutConstructionBuildCurrent() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - rct_window* window = window_find_by_class(WindowClass::Footpath); + WindowBase* window = WindowFindByClass(WindowClass::Footpath); if (window != nullptr) { - window_footpath_keyboard_shortcut_build_current(); + WindowFootpathKeyboardShortcutBuildCurrent(); } else { - window_ride_construction_keyboard_shortcut_build_current(); + WindowRideConstructionKeyboardShortcutBuildCurrent(); } } @@ -698,14 +699,14 @@ static void ShortcutConstructionSlopeDown() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - rct_window* window = window_find_by_class(WindowClass::Footpath); + WindowBase* window = WindowFindByClass(WindowClass::Footpath); if (window != nullptr) { - window_footpath_keyboard_shortcut_slope_down(); + WindowFootpathKeyboardShortcutSlopeDown(); } else { - window_ride_construction_keyboard_shortcut_slope_down(); + WindowRideConstructionKeyboardShortcutSlopeDown(); } } @@ -714,14 +715,14 @@ static void ShortcutConstructionDemolishCurrent() if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) return; - rct_window* window = window_find_by_class(WindowClass::Footpath); + WindowBase* window = WindowFindByClass(WindowClass::Footpath); if (window != nullptr) { - window_footpath_keyboard_shortcut_demolish_current(); + WindowFootpathKeyboardShortcutDemolishCurrent(); } else { - window_ride_construction_keyboard_shortcut_demolish_current(); + WindowRideConstructionKeyboardShortcutDemolishCurrent(); } } @@ -732,7 +733,7 @@ static void ShortcutToggleTransparentWater() gConfigGeneral.TransparentWater ^= 1; ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } #pragma endregion @@ -742,161 +743,150 @@ using namespace OpenRCT2::Ui; void ShortcutManager::RegisterDefaultShortcuts() { // clang-format off - // Interface - RegisterShortcut(ShortcutId::InterfaceCloseTop, STR_SHORTCUT_CLOSE_TOP_MOST_WINDOW, "BACKSPACE", []() { window_close_top(); }); + RegisterShortcut(ShortcutId::InterfaceCloseTop, STR_SHORTCUT_CLOSE_TOP_MOST_WINDOW, "BACKSPACE", WindowCloseTop); RegisterShortcut(ShortcutId::InterfaceCloseAll, STR_SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS, "SHIFT+BACKSPACE", []() { if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)) { - window_close_all(); + WindowCloseAll(); } else if (gEditorStep == EditorStep::LandscapeEditor) { - window_close_top(); + WindowCloseTop(); } }); - RegisterShortcut(ShortcutId::InterfaceRotateConstruction, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT, "Z", []() { ShortcutRotateConstructionObject(); }); + RegisterShortcut(ShortcutId::InterfaceRotateConstruction, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT, "Z", ShortcutRotateConstructionObject); RegisterShortcut(ShortcutId::InterfaceCancelConstruction, STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE, "ESCAPE", []() { if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { - auto window = window_find_by_class(WindowClass::Error); + auto window = WindowFindByClass(WindowClass::Error); if (window != nullptr) { - window_close(*window); + WindowClose(*window); } - else if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + else if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { - tool_cancel(); + ToolCancel(); } } }); RegisterShortcut(ShortcutId::InterfacePause, STR_SHORTCUT_PAUSE_GAME, "PAUSE", []() { if (!(gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) { - auto window = window_find_by_class(WindowClass::TopToolbar); + auto window = WindowFindByClass(WindowClass::TopToolbar); if (window != nullptr) { window->Invalidate(); - window_event_mouse_up_call(window, WC_TOP_TOOLBAR__WIDX_PAUSE); + WindowEventMouseUpCall(window, WC_TOP_TOOLBAR__WIDX_PAUSE); } } }); - - RegisterShortcut(ShortcutId::ScaleToggleWindowMode, STR_SHORTCUT_WINDOWED_MODE_TOGGLE, "ALT+RETURN", []() { ToggleWindowedMode(); }); - RegisterShortcut(ShortcutId::InterfaceScaleIncrease, STR_SHORTCUT_SCALE_UP, []() { ShortcutScaleUp(); }); - RegisterShortcut(ShortcutId::InterfaceScaleDecrease, STR_SHORTCUT_SCALE_DOWN, []() { ShortcutScaleDown(); }); - - RegisterShortcut(ShortcutId::InterfaceToggleToolbars, STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS, "T", []() { - ShortcutRemoveTopBottomToolbarToggle(); - }); - RegisterShortcut(ShortcutId::InterfaceDecreaseSpeed, STR_SHORTCUT_REDUCE_GAME_SPEED , "-", []() { ShortcutReduceGameSpeed(); }); - RegisterShortcut(ShortcutId::InterfaceIncreaseSpeed, STR_SHORTCUT_INCREASE_GAME_SPEED , "=", []() { ShortcutIncreaseGameSpeed(); }); - RegisterShortcut(ShortcutId::InterfaceLoadGame, STR_LOAD_GAME, "CTRL+L", []() { ShortcutLoadGame(); }); - RegisterShortcut(ShortcutId::InterfaceSaveGame, STR_SAVE_GAME, "CTRL+F10", []() { ShortcutQuickSaveGame(); }); + RegisterShortcut(ShortcutId::InterfaceDecreaseSpeed, STR_SHORTCUT_REDUCE_GAME_SPEED, "-", ShortcutReduceGameSpeed); + RegisterShortcut(ShortcutId::InterfaceIncreaseSpeed, STR_SHORTCUT_INCREASE_GAME_SPEED, "=", ShortcutIncreaseGameSpeed); + RegisterShortcut(ShortcutId::InterfaceToggleToolbars, STR_SHORTCUT_TOGGLE_VISIBILITY_OF_TOOLBARS, "T", ShortcutRemoveTopBottomToolbarToggle); RegisterShortcut(ShortcutId::InterfaceScreenshot, STR_SHORTCUT_SCREENSHOT, "CTRL+S", []() { gScreenshotCountdown = 2; }); - RegisterShortcut(ShortcutId::InterfaceGiantScreenshot, STR_SHORTCUT_GIANT_SCREENSHOT, "CTRL+SHIFT+S", []() { screenshot_giant(); }); - RegisterShortcut(ShortcutId::InterfaceMute, STR_SHORTCUT_MUTE_SOUND, []() { OpenRCT2::Audio::ToggleAllSounds(); }); - RegisterShortcut(ShortcutId::InterfaceDisableClearance, STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS, []() { ShortcutToggleClearanceChecks(); }); - RegisterShortcut(ShortcutId::MultiplayerChat, STR_SEND_MESSAGE, "C", []() { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + RegisterShortcut(ShortcutId::InterfaceGiantScreenshot, STR_SHORTCUT_GIANT_SCREENSHOT, "CTRL+SHIFT+S", ScreenshotGiant); + RegisterShortcut(ShortcutId::InterfaceLoadGame, STR_LOAD_GAME, "CTRL+L", ShortcutLoadGame); + RegisterShortcut(ShortcutId::InterfaceSaveGame, STR_SAVE_GAME, "CTRL+F10", ShortcutQuickSaveGame); + RegisterShortcut(ShortcutId::InterfaceMute, STR_SHORTCUT_MUTE_SOUND, OpenRCT2::Audio::ToggleAllSounds); + 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", []() { + if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && ChatAvailable()) { - if (chat_available()) - { - chat_toggle(); - } - } - }); - RegisterShortcut(ShortcutId::InterfaceSceneryPicker, STR_SHORTCUT_OPEN_SCENERY_PICKER, []() { ShortcutOpenSceneryPicker(); }); - - RegisterShortcut(ShortcutId::InterfaceShowOptions, STR_SHORTCUT_SHOW_OPTIONS, []() { ContextOpenWindow(WindowClass::Options); }); - 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::InterfaceOpenMap, STR_SHORTCUT_SHOW_MAP, "TAB", []() { ShortcutShowMap(); }); - RegisterShortcut(ShortcutId::InterfaceClearScenery, STR_SHORTCUT_CLEAR_SCENERY, "B", []() { ShortcutClearScenery(); }); - RegisterShortcut(ShortcutId::InterfaceOpenLand, STR_SHORTCUT_ADJUST_LAND, "F1", []() { ShortcutAdjustLand(); }); - RegisterShortcut(ShortcutId::InterfaceOpenWater, STR_SHORTCUT_ADJUST_WATER, "F2", []() { ShortcutAdjustWater(); }); - RegisterShortcut(ShortcutId::InterfaceOpenScenery, STR_SHORTCUT_BUILD_SCENERY, "F3", []() { ShortcutBuildScenery(); }); - RegisterShortcut(ShortcutId::InterfaceOpenFootpaths, STR_SHORTCUT_BUILD_PATHS, "F4", []() { ShortcutBuildPaths(); }); - RegisterShortcut(ShortcutId::InterfaceOpenNewRide, STR_SHORTCUT_BUILD_NEW_RIDE, "F5", []() { ShortcutBuildNewRide(); }); - RegisterShortcut(ShortcutId::InterfaceOpenFinances, STR_SHORTCUT_SHOW_FINANCIAL_INFORMATION, "F", []() { ShortcutShowFinancialInformation(); }); - RegisterShortcut(ShortcutId::InterfaceOpenResearch, STR_SHORTCUT_SHOW_RESEARCH_INFORMATION, "D", []() { ShortcutShowResearchInformation(); }); - RegisterShortcut(ShortcutId::InterfaceOpenRides, STR_SHORTCUT_SHOW_RIDES_LIST, "R", []() { ShortcutShowRidesList(); }); - RegisterShortcut(ShortcutId::InterfaceOpenPark, STR_SHORTCUT_SHOW_PARK_INFORMATION, "P", []() { ShortcutShowParkInformation(); }); - RegisterShortcut(ShortcutId::InterfaceOpenGuests, STR_SHORTCUT_SHOW_GUEST_LIST, "G", []() { ShortcutShowGuestList(); }); - RegisterShortcut(ShortcutId::InterfaceOpenStaff, STR_SHORTCUT_SHOW_STAFF_LIST, "S", []() { ShortcutShowStaffList(); }); - RegisterShortcut(ShortcutId::InterfaceOpenMessages, STR_SHORTCUT_SHOW_RECENT_MESSAGES, "M", []() { ShortcutShowRecentMessages(); }); - RegisterShortcut(ShortcutId::MultiplayerShow, STR_SHORTCUT_SHOW_MULTIPLAYER, []() { - if (network_get_mode() != NETWORK_MODE_NONE) - { - OpenWindow(WindowClass::Multiplayer); + ChatToggle(); } }); + RegisterShortcut(ShortcutId::InterfaceScaleToggleWindowMode, STR_SHORTCUT_WINDOWED_MODE_TOGGLE, "ALT+RETURN", ToggleWindowedMode); + RegisterShortcut(ShortcutId::InterfaceScaleIncrease, STR_SHORTCUT_SCALE_UP, ShortcutScaleUp); + RegisterShortcut(ShortcutId::InterfaceScaleDecrease, STR_SHORTCUT_SCALE_DOWN, ShortcutScaleDown); + RegisterShortcut(ShortcutId::InterfaceOpenLand, STR_SHORTCUT_ADJUST_LAND, "F1", ShortcutAdjustLand); + RegisterShortcut(ShortcutId::InterfaceOpenWater, STR_SHORTCUT_ADJUST_WATER, "F2", ShortcutAdjustWater); + RegisterShortcut(ShortcutId::InterfaceClearScenery, STR_SHORTCUT_CLEAR_SCENERY, "B", ShortcutClearScenery); + RegisterShortcut(ShortcutId::InterfaceOpenScenery, STR_SHORTCUT_BUILD_SCENERY, "F3", ShortcutBuildScenery); + RegisterShortcut(ShortcutId::InterfaceOpenFootpaths, STR_SHORTCUT_BUILD_PATHS, "F4", ShortcutBuildPaths); + RegisterShortcut(ShortcutId::InterfaceOpenNewRide, STR_SHORTCUT_BUILD_NEW_RIDE, "F5", ShortcutBuildNewRide); + RegisterShortcut(ShortcutId::InterfaceOpenFinances, STR_SHORTCUT_SHOW_FINANCIAL_INFORMATION, "F", ShortcutShowFinancialInformation); + RegisterShortcut(ShortcutId::InterfaceOpenResearch, STR_SHORTCUT_SHOW_RESEARCH_INFORMATION, "D", ShortcutShowResearchInformation); + RegisterShortcut(ShortcutId::InterfaceOpenRides, STR_SHORTCUT_SHOW_RIDES_LIST, "R", ShortcutShowRidesList); + RegisterShortcut(ShortcutId::InterfaceOpenPark, STR_SHORTCUT_SHOW_PARK_INFORMATION, "P", ShortcutShowParkInformation); + RegisterShortcut(ShortcutId::InterfaceOpenGuests, STR_SHORTCUT_SHOW_GUEST_LIST, "G", ShortcutShowGuestList); + RegisterShortcut(ShortcutId::InterfaceOpenStaff, STR_SHORTCUT_SHOW_STAFF_LIST, "S", ShortcutShowStaffList); + RegisterShortcut(ShortcutId::InterfaceOpenMessages, STR_SHORTCUT_SHOW_RECENT_MESSAGES, "M", ShortcutShowRecentMessages); + RegisterShortcut(ShortcutId::InterfaceOpenMap, STR_SHORTCUT_SHOW_MAP, "TAB", ShortcutShowMap); + RegisterShortcut(ShortcutId::InterfaceShowOptions, STR_SHORTCUT_SHOW_OPTIONS, std::bind(ContextOpenWindow, WindowClass::Options)); + 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) { OpenWindow(WindowClass::TileInspector); } }); + RegisterShortcut(ShortcutId::InterfaceMultiplayerShow, STR_SHORTCUT_SHOW_MULTIPLAYER, []() { + if (NetworkGetMode() != NETWORK_MODE_NONE) + { + OpenWindow(WindowClass::Multiplayer); + } + }); // View - RegisterShortcut(ShortcutId::ViewGeneralZoomOut, STR_SHORTCUT_ZOOM_VIEW_OUT, "PAGEUP", []() { main_window_zoom(false, false); }); - RegisterShortcut(ShortcutId::ViewGeneralZoomIn, STR_SHORTCUT_ZOOM_VIEW_IN, "PAGEDOWN", []() { main_window_zoom(true, false); }); - RegisterShortcut(ShortcutId::ViewGeneralRotateClockwise, STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE, "RETURN", "MOUSE 6", []() { RotateCamera(1); }); - RegisterShortcut(ShortcutId::ViewGeneralRotateAnticlockwise, STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE, "SHIFT+RETURN", "MOUSE 5", []() { RotateCamera(-1); }); - - RegisterShortcut(ShortcutId::ViewScrollUp, STR_SHORTCUT_SCROLL_MAP_UP, "UP", []() { }); - RegisterShortcut(ShortcutId::ViewScrollLeft, STR_SHORTCUT_SCROLL_MAP_LEFT, "LEFT", []() { }); - RegisterShortcut(ShortcutId::ViewScrollRight, STR_SHORTCUT_SCROLL_MAP_RIGHT, "RIGHT", []() { }); - RegisterShortcut(ShortcutId::ViewScrollDown, STR_SHORTCUT_SCROLL_MAP_DOWN, "DOWN", []() { }); - - RegisterShortcut(ShortcutId::ViewToggleUnderground, STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE, "1", []() { ToggleViewFlag(VIEWPORT_FLAG_UNDERGROUND_INSIDE); }); - RegisterShortcut(ShortcutId::ViewToggleTransparentWater, STR_VIEWPORT_TRANSPARENT_WATER, "2", []() { ShortcutToggleTransparentWater(); }); - RegisterShortcut(ShortcutId::ViewToggleBaseLand, STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE, "H", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_BASE); }); - RegisterShortcut(ShortcutId::ViewToggleVerticalLand, STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE, "V", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_VERTICAL); }); - RegisterShortcut(ShortcutId::ViewToggleRides, STR_SHORTCUT_SEE_THROUGH_RIDES_TOGGLE, "3", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_RIDES); }); - RegisterShortcut(ShortcutId::ViewToggleVehicles, STR_SHORTCUT_SEE_THROUGH_VEHICLES_TOGGLE, []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_VEHICLES); }); - RegisterShortcut(ShortcutId::ViewToggleVegetation, STR_SHORTCUT_SEE_THROUGH_VEGETATION_TOGGLE, []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_VEGETATION); }); - RegisterShortcut(ShortcutId::ViewToggleScenery, STR_SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE, "4", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_SCENERY); }); - RegisterShortcut(ShortcutId::ViewToggleFootpaths, STR_SHORTCUT_SEE_THROUGH_PATHS_TOGGLE, []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_PATHS); }); - RegisterShortcut(ShortcutId::ViewToggleSupports, STR_SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE, "5", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_SUPPORTS); }); - RegisterShortcut(ShortcutId::ViewToggleGuests, STR_SHORTCUT_SEE_THROUGH_GUESTS_TOGGLE, "6", []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_GUESTS); }); - RegisterShortcut(ShortcutId::ViewToggleStaff, STR_SHORTCUT_SEE_THROUGH_STAFF_TOGGLE, []() { ToggleViewFlag(VIEWPORT_FLAG_HIDE_STAFF); }); - RegisterShortcut(ShortcutId::ViewToggleLandHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE, "8", []() { ToggleViewFlag(VIEWPORT_FLAG_LAND_HEIGHTS); }); - RegisterShortcut(ShortcutId::ViewToggleTrackHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE, "9", []() { ToggleViewFlag(VIEWPORT_FLAG_TRACK_HEIGHTS); }); - RegisterShortcut(ShortcutId::ViewToggleFootpathHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE, "0", []() { ToggleViewFlag(VIEWPORT_FLAG_PATH_HEIGHTS); }); - RegisterShortcut(ShortcutId::ViewToggleCutAway, STR_SHORTCUT_VIEW_CLIPPING, []() { OpenWindow(WindowClass::ViewClipping); }); - RegisterShortcut(ShortcutId::ViewToogleFootpathIssues, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, "I", []() { ToggleViewFlag(VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES); }); - RegisterShortcut(ShortcutId::ViewToggleGridlines, STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, "7", []() { ToggleViewFlag(VIEWPORT_FLAG_GRIDLINES); }); + RegisterShortcut(ShortcutId::ViewGeneralZoomOut, STR_SHORTCUT_ZOOM_VIEW_OUT, "PAGEUP", std::bind(MainWindowZoom, false, false)); + RegisterShortcut(ShortcutId::ViewGeneralZoomIn, STR_SHORTCUT_ZOOM_VIEW_IN, "PAGEDOWN", std::bind(MainWindowZoom, true, false)); + RegisterShortcut(ShortcutId::ViewGeneralRotateClockwise, STR_SHORTCUT_ROTATE_VIEW_CLOCKWISE, "RETURN", "MOUSE 6", std::bind(RotateCamera, 1)); + RegisterShortcut(ShortcutId::ViewGeneralRotateAnticlockwise, STR_SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE, "SHIFT+RETURN", "MOUSE 5", std::bind(RotateCamera, -1)); + RegisterShortcut(ShortcutId::ViewScrollUp, STR_SHORTCUT_SCROLL_MAP_UP, "UP", []() {}); + RegisterShortcut(ShortcutId::ViewScrollLeft, STR_SHORTCUT_SCROLL_MAP_LEFT, "LEFT", []() {}); + RegisterShortcut(ShortcutId::ViewScrollRight, STR_SHORTCUT_SCROLL_MAP_RIGHT, "RIGHT", []() {}); + RegisterShortcut(ShortcutId::ViewScrollDown, STR_SHORTCUT_SCROLL_MAP_DOWN, "DOWN", []() {}); + RegisterShortcut(ShortcutId::ViewToggleUnderground, STR_SHORTCUT_UNDERGROUND_VIEW_TOGGLE, "1", std::bind(ToggleViewFlag, VIEWPORT_FLAG_UNDERGROUND_INSIDE)); + RegisterShortcut(ShortcutId::ViewToggleTransparentWater, STR_VIEWPORT_TRANSPARENT_WATER, "2", ShortcutToggleTransparentWater); + RegisterShortcut(ShortcutId::ViewToggleBaseLand, STR_SHORTCUT_REMOVE_BASE_LAND_TOGGLE, "H", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_BASE)); + RegisterShortcut(ShortcutId::ViewToggleVerticalLand, STR_SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE, "V", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_VERTICAL)); + RegisterShortcut(ShortcutId::ViewToggleRides, STR_SHORTCUT_SEE_THROUGH_RIDES_TOGGLE, "3", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_RIDES)); + RegisterShortcut(ShortcutId::ViewToggleVehicles, STR_SHORTCUT_SEE_THROUGH_VEHICLES_TOGGLE, std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_VEHICLES)); + RegisterShortcut(ShortcutId::ViewToggleVegetation, STR_SHORTCUT_SEE_THROUGH_VEGETATION_TOGGLE, std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_VEGETATION)); + RegisterShortcut(ShortcutId::ViewToggleScenery, STR_SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE, "4", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_SCENERY)); + RegisterShortcut(ShortcutId::ViewToggleFootpaths, STR_SHORTCUT_SEE_THROUGH_PATHS_TOGGLE, std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_PATHS)); + RegisterShortcut(ShortcutId::ViewToggleSupports, STR_SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE, "5", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_SUPPORTS)); + RegisterShortcut(ShortcutId::ViewToggleGuests, STR_SHORTCUT_SEE_THROUGH_GUESTS_TOGGLE, "6", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_GUESTS)); + RegisterShortcut(ShortcutId::ViewToggleStaff, STR_SHORTCUT_SEE_THROUGH_STAFF_TOGGLE, std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIDE_STAFF)); + RegisterShortcut(ShortcutId::ViewToggleLandHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE, "8", std::bind(ToggleViewFlag, VIEWPORT_FLAG_LAND_HEIGHTS)); + RegisterShortcut(ShortcutId::ViewToggleTrackHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE, "9", std::bind(ToggleViewFlag, VIEWPORT_FLAG_TRACK_HEIGHTS)); + RegisterShortcut(ShortcutId::ViewToggleFootpathHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE, "0", std::bind(ToggleViewFlag, VIEWPORT_FLAG_PATH_HEIGHTS)); + RegisterShortcut(ShortcutId::ViewToggleGridlines, STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, "7", std::bind(ToggleViewFlag, VIEWPORT_FLAG_GRIDLINES)); + RegisterShortcut(ShortcutId::ViewToggleCutAway, STR_SHORTCUT_VIEW_CLIPPING, std::bind(OpenWindow, WindowClass::ViewClipping)); + RegisterShortcut(ShortcutId::ViewToogleFootpathIssues, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, "I", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)); // Window - RegisterShortcut(ShortcutId::WindowRideConstructionTurnLeft, STR_SHORTCUT_CONSTRUCTION_TURN_LEFT, "NUMPAD 4", []() { ShortcutConstructionTurnLeft(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionTurnRight, STR_SHORTCUT_CONSTRUCTION_TURN_RIGHT, "NUMPAD 6", []() { ShortcutConstructionTurnRight(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionDefault, STR_SHORTCUT_CONSTRUCTION_USE_TRACK_DEFAULT, "NUMPAD 5", []() { window_ride_construction_keyboard_shortcut_use_track_default(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionSlopeDown, STR_SHORTCUT_CONSTRUCTION_SLOPE_DOWN, "NUMPAD 2", []() { ShortcutConstructionSlopeDown(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionSlopeUp, STR_SHORTCUT_CONSTRUCTION_SLOPE_UP, "NUMPAD 8", []() { ShortcutConstructionSlopeUp(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionChainLift, STR_SHORTCUT_CONSTRUCTION_CHAIN_LIFT_TOGGLE, "NUMPAD +", []() { window_ride_construction_keyboard_shortcut_chain_lift_toggle(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionBankLeft, STR_SHORTCUT_CONSTRUCTION_BANK_LEFT, "NUMPAD 1", []() { window_ride_construction_keyboard_shortcut_bank_left(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionBankRight, STR_SHORTCUT_CONSTRUCTION_BANK_RIGHT, "NUMPAD 3", []() { window_ride_construction_keyboard_shortcut_bank_right(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionPrevious, STR_SHORTCUT_CONSTRUCTION_PREVIOUS_TRACK, "NUMPAD 7", []() { window_ride_construction_keyboard_shortcut_previous_track(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionNext, STR_SHORTCUT_CONSTRUCTION_NEXT_TRACK, "NUMPAD 9", []() { window_ride_construction_keyboard_shortcut_next_track(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionBuild, STR_SHORTCUT_CONSTRUCTION_BUILD_CURRENT, "NUMPAD 0", []() { ShortcutConstructionBuildCurrent(); }); - RegisterShortcut(ShortcutId::WindowRideConstructionDemolish, STR_SHORTCUT_CONSTRUCTION_DEMOLISH_CURRENT, "NUMPAD -", []() { ShortcutConstructionDemolishCurrent(); }); - - RegisterShortcut(ShortcutId::WindowTileInspectorToggleInvisibility, STR_SHORTCUT_TOGGLE_INVISIBILITY, []() { ShortcutToggleVisibility(); }); - RegisterShortcut(ShortcutId::WindowTileInspectorCopy, STR_SHORTCUT_COPY_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_COPY); }); - RegisterShortcut(ShortcutId::WindowTileInspectorPaste, STR_SHORTCUT_PASTE_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE); }); - RegisterShortcut(ShortcutId::WindowTileInspectorRemove, STR_SHORTCUT_REMOVE_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE); }); - RegisterShortcut(ShortcutId::WindowTileInspectorMoveUp, STR_SHORTCUT_MOVE_ELEMENT_UP, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP); }); - RegisterShortcut(ShortcutId::WindowTileInspectorMoveDown, STR_SHORTCUT_MOVE_ELEMENT_DOWN, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN); }); - RegisterShortcut(ShortcutId::WindowTileInspectorIncreaseX, STR_SHORTCUT_INCREASE_X_COORD, []() { TileInspectorMouseDown(WC_TILE_INSPECTOR__WIDX_SPINNER_X_INCREASE); }); - RegisterShortcut(ShortcutId::WindowTileInspectorDecreaseX, STR_SHORTCUT_DECREASE_X_COORD, []() { TileInspectorMouseDown(WC_TILE_INSPECTOR__WIDX_SPINNER_X_DECREASE); }); - RegisterShortcut(ShortcutId::WindowTileInspectorIncreaseY, STR_SHORTCUT_INCREASE_Y_COORD, []() { TileInspectorMouseDown(WC_TILE_INSPECTOR__WIDX_SPINNER_Y_INCREASE); }); - RegisterShortcut(ShortcutId::WindowTileInspectorDecreaseY, STR_SHORTCUT_DECREASE_Y_COORD, []() { TileInspectorMouseDown(WC_TILE_INSPECTOR__WIDX_SPINNER_Y_DECREASE); }); - RegisterShortcut(ShortcutId::WindowTileInspectorIncreaseHeight, STR_SHORTCUT_INCREASE_ELEM_HEIGHT, []() { ShortcutIncreaseElementHeight(); }); - RegisterShortcut(ShortcutId::WindowTileInspectorDecreaseHeight, STR_SHORTCUT_DECREASE_ELEM_HEIGHT, []() { ShortcutDecreaseElementHeight(); }); + RegisterShortcut(ShortcutId::WindowRideConstructionTurnLeft, STR_SHORTCUT_CONSTRUCTION_TURN_LEFT, "NUMPAD 4", ShortcutConstructionTurnLeft); + RegisterShortcut(ShortcutId::WindowRideConstructionTurnRight, STR_SHORTCUT_CONSTRUCTION_TURN_RIGHT, "NUMPAD 6", ShortcutConstructionTurnRight); + RegisterShortcut(ShortcutId::WindowRideConstructionDefault, STR_SHORTCUT_CONSTRUCTION_USE_TRACK_DEFAULT, "NUMPAD 5", WindowRideConstructionKeyboardShortcutUseTrackDefault); + RegisterShortcut(ShortcutId::WindowRideConstructionSlopeDown, STR_SHORTCUT_CONSTRUCTION_SLOPE_DOWN, "NUMPAD 2", ShortcutConstructionSlopeDown); + RegisterShortcut(ShortcutId::WindowRideConstructionSlopeUp, STR_SHORTCUT_CONSTRUCTION_SLOPE_UP, "NUMPAD 8", ShortcutConstructionSlopeUp); + RegisterShortcut(ShortcutId::WindowRideConstructionChainLift, STR_SHORTCUT_CONSTRUCTION_CHAIN_LIFT_TOGGLE, "NUMPAD +", WindowRideConstructionKeyboardShortcutChainLiftToggle); + RegisterShortcut(ShortcutId::WindowRideConstructionBankLeft, STR_SHORTCUT_CONSTRUCTION_BANK_LEFT, "NUMPAD 1", WindowRideConstructionKeyboardShortcutBankLeft); + RegisterShortcut(ShortcutId::WindowRideConstructionBankRight, STR_SHORTCUT_CONSTRUCTION_BANK_RIGHT, "NUMPAD 3", WindowRideConstructionKeyboardShortcutBankRight); + RegisterShortcut(ShortcutId::WindowRideConstructionPrevious, STR_SHORTCUT_CONSTRUCTION_PREVIOUS_TRACK, "NUMPAD 7", WindowRideConstructionKeyboardShortcutPreviousTrack); + RegisterShortcut(ShortcutId::WindowRideConstructionNext, STR_SHORTCUT_CONSTRUCTION_NEXT_TRACK, "NUMPAD 9", WindowRideConstructionKeyboardShortcutNextTrack); + RegisterShortcut(ShortcutId::WindowRideConstructionBuild, STR_SHORTCUT_CONSTRUCTION_BUILD_CURRENT, "NUMPAD 0", ShortcutConstructionBuildCurrent); + RegisterShortcut(ShortcutId::WindowRideConstructionDemolish, STR_SHORTCUT_CONSTRUCTION_DEMOLISH_CURRENT, "NUMPAD -", ShortcutConstructionDemolishCurrent); + RegisterShortcut(ShortcutId::WindowTileInspectorToggleInvisibility, STR_SHORTCUT_TOGGLE_INVISIBILITY, ShortcutToggleVisibility); + RegisterShortcut(ShortcutId::WindowTileInspectorCopy, STR_SHORTCUT_COPY_ELEMENT, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_COPY)); + RegisterShortcut(ShortcutId::WindowTileInspectorPaste, STR_SHORTCUT_PASTE_ELEMENT, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE)); + RegisterShortcut(ShortcutId::WindowTileInspectorRemove, STR_SHORTCUT_REMOVE_ELEMENT, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE)); + RegisterShortcut(ShortcutId::WindowTileInspectorMoveUp, STR_SHORTCUT_MOVE_ELEMENT_UP, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP)); + RegisterShortcut(ShortcutId::WindowTileInspectorMoveDown, STR_SHORTCUT_MOVE_ELEMENT_DOWN, std::bind(TileInspectorMouseUp, WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN)); + RegisterShortcut(ShortcutId::WindowTileInspectorIncreaseX, STR_SHORTCUT_INCREASE_X_COORD, std::bind(TileInspectorMouseDown, WC_TILE_INSPECTOR__WIDX_SPINNER_X_INCREASE)); + RegisterShortcut(ShortcutId::WindowTileInspectorDecreaseX, STR_SHORTCUT_DECREASE_X_COORD, std::bind(TileInspectorMouseDown, WC_TILE_INSPECTOR__WIDX_SPINNER_X_DECREASE)); + RegisterShortcut(ShortcutId::WindowTileInspectorIncreaseY, STR_SHORTCUT_INCREASE_Y_COORD, std::bind(TileInspectorMouseDown, WC_TILE_INSPECTOR__WIDX_SPINNER_Y_INCREASE)); + RegisterShortcut(ShortcutId::WindowTileInspectorDecreaseY, STR_SHORTCUT_DECREASE_Y_COORD, std::bind(TileInspectorMouseDown, WC_TILE_INSPECTOR__WIDX_SPINNER_Y_DECREASE)); + RegisterShortcut(ShortcutId::WindowTileInspectorIncreaseHeight, STR_SHORTCUT_INCREASE_ELEM_HEIGHT, ShortcutIncreaseElementHeight); + RegisterShortcut(ShortcutId::WindowTileInspectorDecreaseHeight, STR_SHORTCUT_DECREASE_ELEM_HEIGHT, ShortcutDecreaseElementHeight); // Debug - RegisterShortcut(ShortcutId::DebugToggleConsole, STR_CONSOLE, "`", []() { ShortcutToggleConsole(); }); + RegisterShortcut(ShortcutId::DebugToggleConsole, STR_CONSOLE, "`", ShortcutToggleConsole); RegisterShortcut(ShortcutId::DebugAdvanceTick, STR_ADVANCE_TO_NEXT_TICK, []() { if (!(gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) { @@ -906,10 +896,10 @@ void ShortcutManager::RegisterDefaultShortcuts() RegisterShortcut(ShortcutId::DebugTogglePaintDebugWindow, STR_SHORTCUT_DEBUG_PAINT_TOGGLE, []() { if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { - auto window = window_find_by_class(WindowClass::DebugPaint); + auto window = WindowFindByClass(WindowClass::DebugPaint); if (window != nullptr) { - window_close(*window); + WindowClose(*window); } else { diff --git a/src/openrct2-ui/interface/Dropdown.h b/src/openrct2-ui/interface/Dropdown.h index 4a19f7975b..174462d250 100644 --- a/src/openrct2-ui/interface/Dropdown.h +++ b/src/openrct2-ui/interface/Dropdown.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,6 +13,7 @@ #include #include #include +#include namespace Dropdown { @@ -51,10 +52,10 @@ 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 itemHeight, int32_t numColumns); void WindowDropdownClose(); -int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, rct_window* w); -void WindowDropdownShowColour(rct_window* w, rct_widget* widget, uint8_t dropdownColour, uint8_t selectedColour); +int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w); +void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour); void WindowDropdownShowColourAvailable( - rct_window* w, rct_widget* widget, uint8_t dropdownColour, uint8_t selectedColour, uint32_t availableColours); + WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour, uint32_t availableColours); uint32_t DropdownGetAppropriateImageDropdownItemsPerRow(uint32_t numItems); bool WindowDropDownHasMultipleColumns(size_t numItems); diff --git a/src/openrct2-ui/interface/Graph.cpp b/src/openrct2-ui/interface/Graph.cpp index d8939d6a43..007d5a3279 100644 --- a/src/openrct2-ui/interface/Graph.cpp +++ b/src/openrct2-ui/interface/Graph.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,9 +15,9 @@ namespace Graph { - static void DrawMonths(rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, const ScreenCoordsXY& origCoords) + static void DrawMonths(DrawPixelInfo* dpi, const uint8_t* history, int32_t count, const ScreenCoordsXY& origCoords) { - int32_t currentMonth = date_get_month(gDateMonthsElapsed); + int32_t currentMonth = DateGetMonth(gDateMonthsElapsed); int32_t currentDay = gDateMonthTicks; int32_t yearOver32 = (currentMonth * 4) + (currentDay >> 14) - 31; auto screenCoords = origCoords; @@ -27,13 +27,13 @@ namespace Graph { // Draw month text auto ft = Formatter(); - ft.Add(DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]); + ft.Add(DateGameShortMonthNames[DateGetMonth((yearOver32 / 4) + MONTH_COUNT)]); DrawTextBasic( - dpi, screenCoords - ScreenCoordsXY{ 0, 10 }, STR_GRAPH_LABEL, ft, + *dpi, screenCoords - ScreenCoordsXY{ 0, 10 }, STR_GRAPH_LABEL, ft, { FontStyle::Small, TextAlignment::CENTRE }); // Draw month mark - gfx_fill_rect(dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_10); + GfxFillRect(dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_10); } yearOver32 = (yearOver32 + 1) % 32; @@ -41,7 +41,7 @@ namespace Graph } } - static void DrawLineA(rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, const ScreenCoordsXY& origCoords) + static void DrawLineA(DrawPixelInfo* dpi, const uint8_t* history, int32_t count, const ScreenCoordsXY& origCoords) { auto lastCoords = ScreenCoordsXY{ -1, -1 }; auto coords = origCoords; @@ -57,11 +57,11 @@ namespace Graph auto rightBottom1 = coords + ScreenCoordsXY{ 1, 1 }; auto leftTop2 = lastCoords + ScreenCoordsXY{ 0, 1 }; auto rightBottom2 = coords + ScreenCoordsXY{ 0, 1 }; - gfx_draw_line(dpi, { leftTop1, rightBottom1 }, PALETTE_INDEX_10); - gfx_draw_line(dpi, { leftTop2, rightBottom2 }, PALETTE_INDEX_10); + GfxDrawLine(dpi, { leftTop1, rightBottom1 }, PALETTE_INDEX_10); + GfxDrawLine(dpi, { leftTop2, rightBottom2 }, PALETTE_INDEX_10); } if (i == 0) - gfx_fill_rect(dpi, { coords, coords + ScreenCoordsXY{ 2, 2 } }, PALETTE_INDEX_10); + GfxFillRect(dpi, { coords, coords + ScreenCoordsXY{ 2, 2 } }, PALETTE_INDEX_10); lastCoords = coords; } @@ -69,7 +69,7 @@ namespace Graph } } - static void DrawLineB(rct_drawpixelinfo* dpi, const uint8_t* history, int32_t count, const ScreenCoordsXY& origCoords) + static void DrawLineB(DrawPixelInfo* dpi, const uint8_t* history, int32_t count, const ScreenCoordsXY& origCoords) { auto lastCoords = ScreenCoordsXY{ -1, -1 }; auto coords = origCoords; @@ -83,10 +83,10 @@ namespace Graph { auto leftTop = lastCoords; auto rightBottom = coords; - gfx_draw_line(dpi, { leftTop, rightBottom }, PALETTE_INDEX_21); + GfxDrawLine(dpi, { leftTop, rightBottom }, PALETTE_INDEX_21); } if (i == 0) - gfx_fill_rect(dpi, { coords - ScreenCoordsXY{ 1, 1 }, coords + ScreenCoordsXY{ 1, 1 } }, PALETTE_INDEX_21); + GfxFillRect(dpi, { coords - ScreenCoordsXY{ 1, 1 }, coords + ScreenCoordsXY{ 1, 1 } }, PALETTE_INDEX_21); lastCoords = coords; } @@ -94,7 +94,7 @@ namespace Graph } } - void Draw(rct_drawpixelinfo* dpi, uint8_t* history, int32_t count, const ScreenCoordsXY& screenPos) + void Draw(DrawPixelInfo* dpi, uint8_t* history, int32_t count, const ScreenCoordsXY& screenPos) { DrawMonths(dpi, history, count, screenPos); DrawLineA(dpi, history, count, screenPos); @@ -150,11 +150,11 @@ static const FinancialTooltipInfo FinanceTooltipInfoFromMoney( namespace Graph { - static void DrawMonths(rct_drawpixelinfo* dpi, const money64* history, int32_t count, const ScreenCoordsXY& origCoords) + static void DrawMonths(DrawPixelInfo* dpi, const money64* history, int32_t count, const ScreenCoordsXY& origCoords) { int32_t i, yearOver32, currentMonth, currentDay; - currentMonth = date_get_month(gDateMonthsElapsed); + currentMonth = DateGetMonth(gDateMonthsElapsed); currentDay = gDateMonthTicks; yearOver32 = (currentMonth * 4) + (currentDay >> 14) - 31; auto screenCoords = origCoords; @@ -164,13 +164,13 @@ namespace Graph { // Draw month text auto ft = Formatter(); - ft.Add(DateGameShortMonthNames[date_get_month((yearOver32 / 4) + MONTH_COUNT)]); + ft.Add(DateGameShortMonthNames[DateGetMonth((yearOver32 / 4) + MONTH_COUNT)]); DrawTextBasic( - dpi, screenCoords - ScreenCoordsXY{ 0, 10 }, STR_GRAPH_LABEL, ft, + *dpi, screenCoords - ScreenCoordsXY{ 0, 10 }, STR_GRAPH_LABEL, ft, { FontStyle::Small, TextAlignment::CENTRE }); // Draw month mark - gfx_fill_rect(dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_10); + GfxFillRect(dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_10); } yearOver32 = (yearOver32 + 1) % 32; @@ -179,7 +179,7 @@ namespace Graph } static void DrawLineA( - rct_drawpixelinfo* dpi, const money64* history, int32_t count, const ScreenCoordsXY& origCoords, int32_t modifier, + DrawPixelInfo* dpi, const money64* history, int32_t count, const ScreenCoordsXY& origCoords, int32_t modifier, int32_t offset) { auto lastCoords = ScreenCoordsXY{ -1, -1 }; @@ -196,11 +196,11 @@ namespace Graph auto rightBottom1 = coords + ScreenCoordsXY{ 1, 1 }; auto leftTop2 = lastCoords + ScreenCoordsXY{ 0, 1 }; auto rightBottom2 = coords + ScreenCoordsXY{ 0, 1 }; - gfx_draw_line(dpi, { leftTop1, rightBottom1 }, PALETTE_INDEX_10); - gfx_draw_line(dpi, { leftTop2, rightBottom2 }, PALETTE_INDEX_10); + GfxDrawLine(dpi, { leftTop1, rightBottom1 }, PALETTE_INDEX_10); + GfxDrawLine(dpi, { leftTop2, rightBottom2 }, PALETTE_INDEX_10); } if (i == 0) - gfx_fill_rect(dpi, { coords, coords + ScreenCoordsXY{ 2, 2 } }, PALETTE_INDEX_10); + GfxFillRect(dpi, { coords, coords + ScreenCoordsXY{ 2, 2 } }, PALETTE_INDEX_10); lastCoords = coords; } @@ -209,7 +209,7 @@ namespace Graph } static void DrawLineB( - rct_drawpixelinfo* dpi, const money64* history, int32_t count, const ScreenCoordsXY& origCoords, int32_t modifier, + DrawPixelInfo* dpi, const money64* history, int32_t count, const ScreenCoordsXY& origCoords, int32_t modifier, int32_t offset) { auto lastCoords = ScreenCoordsXY{ -1, -1 }; @@ -224,10 +224,10 @@ namespace Graph { auto leftTop = lastCoords; auto rightBottom = coords; - gfx_draw_line(dpi, { leftTop, rightBottom }, PALETTE_INDEX_21); + GfxDrawLine(dpi, { leftTop, rightBottom }, PALETTE_INDEX_21); } if (i == 0) - gfx_fill_rect(dpi, { coords - ScreenCoordsXY{ 1, 1 }, coords + ScreenCoordsXY{ 1, 1 } }, PALETTE_INDEX_21); + GfxFillRect(dpi, { coords - ScreenCoordsXY{ 1, 1 }, coords + ScreenCoordsXY{ 1, 1 } }, PALETTE_INDEX_21); lastCoords = coords; } @@ -236,7 +236,7 @@ namespace Graph } static void DrawHoveredValue( - rct_drawpixelinfo* dpi, const money64* history, const int32_t historyCount, const ScreenCoordsXY& screenCoords, + DrawPixelInfo* dpi, const money64* history, const int32_t historyCount, const ScreenCoordsXY& screenCoords, const int32_t modifier, const int32_t offset) { const auto cursorPosition = ContextGetCursorPositionScaled(); @@ -253,27 +253,26 @@ namespace Graph { return; } - gfx_draw_dashed_line(dpi, { { info.coords.x, chartFrame.GetTop() }, info.coords }, DefaultDashedLength, 0); - gfx_draw_dashed_line(dpi, { { chartFrame.GetLeft() - 10, info.coords.y }, info.coords }, DefaultDashedLength, 0); + GfxDrawDashedLine(dpi, { { info.coords.x, chartFrame.GetTop() }, info.coords }, DefaultDashedLength, 0); + GfxDrawDashedLine(dpi, { { chartFrame.GetLeft() - 10, info.coords.y }, info.coords }, DefaultDashedLength, 0); if (cursorPosition.y > info.coords.y) { - gfx_draw_dashed_line(dpi, { info.coords, { info.coords.x, cursorPosition.y } }, DefaultDashedLength, 0); + GfxDrawDashedLine(dpi, { info.coords, { info.coords.x, cursorPosition.y } }, DefaultDashedLength, 0); } auto ft = Formatter(); ft.Add(info.money); DrawTextBasic( - dpi, info.coords - ScreenCoordsXY{ 0, 16 }, STR_FINANCES_SUMMARY_EXPENDITURE_VALUE, ft, { TextAlignment::CENTRE }); + *dpi, info.coords - ScreenCoordsXY{ 0, 16 }, STR_FINANCES_SUMMARY_EXPENDITURE_VALUE, ft, { TextAlignment::CENTRE }); - gfx_fill_rect( - dpi, { { info.coords - ScreenCoordsXY{ 2, 2 } }, info.coords + ScreenCoordsXY{ 2, 2 } }, PALETTE_INDEX_10); - gfx_fill_rect( + GfxFillRect(dpi, { { info.coords - ScreenCoordsXY{ 2, 2 } }, info.coords + ScreenCoordsXY{ 2, 2 } }, PALETTE_INDEX_10); + GfxFillRect( dpi, { { info.coords - ScreenCoordsXY{ 1, 1 } }, { info.coords + ScreenCoordsXY{ 1, 1 } } }, PALETTE_INDEX_21); } void Draw( - rct_drawpixelinfo* dpi, const money64* history, const int32_t count, const ScreenCoordsXY& screenCoords, + DrawPixelInfo* dpi, const money64* history, const int32_t count, const ScreenCoordsXY& screenCoords, const int32_t modifier, const int32_t offset) { DrawMonths(dpi, history, count, screenCoords); diff --git a/src/openrct2-ui/interface/Graph.h b/src/openrct2-ui/interface/Graph.h index 2ce1e6cd56..c0696679c6 100644 --- a/src/openrct2-ui/interface/Graph.h +++ b/src/openrct2-ui/interface/Graph.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,8 +15,8 @@ namespace Graph { - void Draw(rct_drawpixelinfo* dpi, uint8_t* history, int32_t count, const ScreenCoordsXY& screenPos); + void Draw(DrawPixelInfo* dpi, uint8_t* history, int32_t count, const ScreenCoordsXY& screenPos); void Draw( - rct_drawpixelinfo* dpi, const money64* history, const int32_t count, const ScreenCoordsXY& coords, - const int32_t modifier, const int32_t offset); + DrawPixelInfo* dpi, const money64* history, const int32_t count, const ScreenCoordsXY& coords, const int32_t modifier, + const int32_t offset); } // namespace Graph diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index 1412a8b8b8..3227772069 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ static FontStyle InGameConsoleGetFontStyle() static int32_t InGameConsoleGetLineHeight() { - return font_get_line_height(InGameConsoleGetFontStyle()); + return FontGetLineHeight(InGameConsoleGetFontStyle()); } InGameConsole::InGameConsole() @@ -76,24 +76,22 @@ void InGameConsole::Input(ConsoleInput input) if (_consoleHistoryIndex > 0) { _consoleHistoryIndex--; - std::memcpy(_consoleCurrentLine, _consoleHistory[_consoleHistoryIndex], CONSOLE_INPUT_SIZE); + _consoleCurrentLine = _consoleHistory[_consoleHistoryIndex]; } - _consoleTextInputSession->Size = strlen(_consoleTextInputSession->Buffer); - _consoleTextInputSession->Length = utf8_length(_consoleTextInputSession->Buffer); - _consoleTextInputSession->SelectionStart = strlen(_consoleCurrentLine); + _consoleTextInputSession->Length = UTF8Length(_consoleCurrentLine.c_str()); + _consoleTextInputSession->SelectionStart = _consoleCurrentLine.size(); break; case ConsoleInput::HistoryNext: - if (_consoleHistoryIndex < _consoleHistoryCount - 1) + if (_consoleHistoryIndex < _consoleHistory.size() - 1) { _consoleHistoryIndex++; - std::memcpy(_consoleCurrentLine, _consoleHistory[_consoleHistoryIndex], CONSOLE_INPUT_SIZE); - _consoleTextInputSession->Size = strlen(_consoleTextInputSession->Buffer); - _consoleTextInputSession->Length = utf8_length(_consoleTextInputSession->Buffer); - _consoleTextInputSession->SelectionStart = strlen(_consoleCurrentLine); + _consoleCurrentLine = _consoleHistory[_consoleHistoryIndex]; + _consoleTextInputSession->Length = UTF8Length(_consoleCurrentLine.c_str()); + _consoleTextInputSession->SelectionStart = _consoleCurrentLine.size(); } else { - _consoleHistoryIndex = _consoleHistoryCount; + _consoleHistoryIndex = _consoleHistory.size(); ClearInput(); } break; @@ -116,23 +114,21 @@ void InGameConsole::Input(ConsoleInput input) void InGameConsole::ClearInput() { - _consoleCurrentLine[0] = 0; + _consoleCurrentLine.clear(); if (_isOpen) { - ContextStartTextInput(_consoleCurrentLine, sizeof(_consoleCurrentLine)); + _consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, CONSOLE_INPUT_SIZE); } } -void InGameConsole::HistoryAdd(const utf8* src) +void InGameConsole::HistoryAdd(const u8string& src) { - if (_consoleHistoryCount >= CONSOLE_HISTORY_SIZE) + if (_consoleHistory.size() >= CONSOLE_HISTORY_SIZE) { - for (int32_t i = 0; i < _consoleHistoryCount - 1; i++) - std::memcpy(_consoleHistory[i], _consoleHistory[i + 1], CONSOLE_INPUT_SIZE); - _consoleHistoryCount--; + _consoleHistory.pop_front(); } - std::memcpy(_consoleHistory[_consoleHistoryCount++], src, CONSOLE_INPUT_SIZE); - _consoleHistoryIndex = _consoleHistoryCount; + _consoleHistory.push_back(src); + _consoleHistoryIndex = _consoleHistory.size(); } void InGameConsole::ScrollToEnd() @@ -148,9 +144,9 @@ void InGameConsole::RefreshCaret(size_t position) { _consoleCaretTicks = 0; _selectionStart = position; - char tempString[TEXT_INPUT_SIZE] = { 0 }; - std::memcpy(tempString, &_consoleCurrentLine, _selectionStart); - _caretScreenPosX = gfx_get_string_width_no_formatting(tempString, InGameConsoleGetFontStyle()); + + auto text = u8string_view{ _consoleCurrentLine }.substr(0, _selectionStart); + _caretScreenPosX = GfxGetStringWidthNoFormatting(text, InGameConsoleGetFontStyle()); } void InGameConsole::Scroll(int32_t linesToScroll) @@ -181,7 +177,7 @@ void InGameConsole::Open() _isOpen = true; ScrollToEnd(); RefreshCaret(); - _consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, sizeof(_consoleCurrentLine)); + _consoleTextInputSession = ContextStartTextInput(_consoleCurrentLine, CONSOLE_INPUT_SIZE); } void InGameConsole::Close() @@ -237,7 +233,7 @@ void InGameConsole::WriteLine(const std::string& input, FormatToken colourFormat void InGameConsole::Invalidate() const { - gfx_set_dirty_blocks({ _consoleTopLeft, _consoleBottomRight }); + GfxSetDirtyBlocks({ _consoleTopLeft, _consoleBottomRight }); } void InGameConsole::Update() @@ -248,17 +244,17 @@ void InGameConsole::Update() if (_isOpen) { // When scrolling the map, the console pixels get copied... therefore invalidate the screen - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - rct_viewport* mainViewport = window_get_viewport(mainWindow); + Viewport* mainViewport = WindowGetViewport(mainWindow); if (mainViewport != nullptr) { if (_lastMainViewport != mainViewport->viewPos) { _lastMainViewport = mainViewport->viewPos; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } } @@ -268,7 +264,7 @@ void InGameConsole::Update() _consoleCaretTicks = (_consoleCaretTicks + 1) % 30; } -void InGameConsole::Draw(rct_drawpixelinfo* dpi) const +void InGameConsole::Draw(DrawPixelInfo* dpi) const { if (!_isOpen) return; @@ -296,17 +292,17 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const Invalidate(); // Give console area a translucent effect. - gfx_filter_rect(dpi, { _consoleTopLeft, _consoleBottomRight }, FilterPaletteID::Palette51); + GfxFilterRect(dpi, { _consoleTopLeft, _consoleBottomRight }, FilterPaletteID::Palette51); // Make input area more opaque. - gfx_filter_rect( + GfxFilterRect( dpi, { { _consoleTopLeft.x, _consoleBottomRight.y - lineHeight - 10 }, _consoleBottomRight - ScreenCoordsXY{ 0, 1 } }, FilterPaletteID::Palette51); // Paint background colour. uint8_t backgroundColour = ThemeGetColour(WindowClass::Console, 0); - gfx_fill_rect_inset(dpi, { _consoleTopLeft, _consoleBottomRight }, backgroundColour, INSET_RECT_FLAG_FILL_NONE); - gfx_fill_rect_inset( + GfxFillRectInset(dpi, { _consoleTopLeft, _consoleBottomRight }, backgroundColour, INSET_RECT_FLAG_FILL_NONE); + GfxFillRectInset( dpi, { _consoleTopLeft + ScreenCoordsXY{ 1, 1 }, _consoleBottomRight - ScreenCoordsXY{ 1, 1 } }, backgroundColour, INSET_RECT_FLAG_BORDER_INSET); @@ -318,7 +314,7 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const { const size_t index = i + _consoleScrollPos; lineBuffer = _colourFormatStr + _consoleLines[index]; - gfx_draw_string(dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() }); + GfxDrawString(*dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() }); screenCoords.y += lineHeight; } @@ -326,14 +322,14 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const // Draw current line lineBuffer = _colourFormatStr + _consoleCurrentLine; - gfx_draw_string_no_formatting(dpi, screenCoords, lineBuffer.c_str(), { TEXT_COLOUR_255, InGameConsoleGetFontStyle() }); + DrawText(*dpi, screenCoords, { TEXT_COLOUR_255, InGameConsoleGetFontStyle() }, lineBuffer.c_str(), true); // Draw caret if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD) { auto caret = screenCoords + ScreenCoordsXY{ _caretScreenPosX, lineHeight }; uint8_t caretColour = ColourMapA[BASE_COLOUR(textColour)].lightest; - gfx_fill_rect(dpi, { caret, caret + ScreenCoordsXY{ CONSOLE_CARET_WIDTH, 1 } }, caretColour); + GfxFillRect(dpi, { caret, caret + ScreenCoordsXY{ CONSOLE_CARET_WIDTH, 1 } }, caretColour); } // What about border colours? @@ -341,22 +337,22 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const uint8_t borderColour2 = ColourMapA[BASE_COLOUR(backgroundColour)].mid_dark; // Input area top border - gfx_fill_rect( + GfxFillRect( dpi, { { _consoleTopLeft.x, _consoleBottomRight.y - lineHeight - 11 }, { _consoleBottomRight.x, _consoleBottomRight.y - lineHeight - 11 } }, borderColour1); - gfx_fill_rect( + GfxFillRect( dpi, { { _consoleTopLeft.x, _consoleBottomRight.y - lineHeight - 10 }, { _consoleBottomRight.x, _consoleBottomRight.y - lineHeight - 10 } }, borderColour2); // Input area bottom border - gfx_fill_rect( + GfxFillRect( dpi, { { _consoleTopLeft.x, _consoleBottomRight.y - 1 }, { _consoleBottomRight.x, _consoleBottomRight.y - 1 } }, borderColour1); - gfx_fill_rect(dpi, { { _consoleTopLeft.x, _consoleBottomRight.y }, _consoleBottomRight }, borderColour2); + GfxFillRect(dpi, { { _consoleTopLeft.x, _consoleBottomRight.y }, _consoleBottomRight }, borderColour2); } // Calculates the amount of visible lines, based on the console size, excluding the input line. diff --git a/src/openrct2-ui/interface/InGameConsole.h b/src/openrct2-ui/interface/InGameConsole.h index c6d631c2bd..000a93d550 100644 --- a/src/openrct2-ui/interface/InGameConsole.h +++ b/src/openrct2-ui/interface/InGameConsole.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,14 +30,17 @@ namespace OpenRCT2::Ui ScreenCoordsXY _consoleTopLeft; ScreenCoordsXY _consoleBottomRight; ScreenCoordsXY _lastMainViewport; - std::deque _consoleLines; - utf8 _consoleCurrentLine[CONSOLE_INPUT_SIZE] = {}; + + std::vector _consoleLines; + u8string _consoleCurrentLine; + int32_t _consoleCaretTicks; int32_t _consoleScrollPos = 0; TextInputSession* _consoleTextInputSession; - utf8 _consoleHistory[CONSOLE_HISTORY_SIZE][CONSOLE_INPUT_SIZE]; - int32_t _consoleHistoryIndex = 0; - int32_t _consoleHistoryCount = 0; + + std::deque _consoleHistory; + size_t _consoleHistoryIndex = 0; + size_t _selectionStart = 0; int32_t _caretScreenPosX = 0; @@ -62,12 +65,12 @@ namespace OpenRCT2::Ui void Scroll(int32_t linesToScroll); void Update(); - void Draw(rct_drawpixelinfo* dpi) const; + void Draw(DrawPixelInfo* dpi) const; private: void ClearInput(); void ClearLine(); - void HistoryAdd(const utf8* src); + void HistoryAdd(const u8string& src); void WritePrompt(); void ScrollToEnd(); void Invalidate() const; diff --git a/src/openrct2-ui/interface/LandTool.cpp b/src/openrct2-ui/interface/LandTool.cpp index fd4fb15591..d8d6106faa 100644 --- a/src/openrct2-ui/interface/LandTool.cpp +++ b/src/openrct2-ui/interface/LandTool.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -55,7 +55,7 @@ uint32_t LandTool::SizeToSpriteIndex(uint16_t size) return 0xFFFFFFFF; } -void LandTool::ShowSurfaceStyleDropdown(rct_window* w, rct_widget* widget, ObjectEntryIndex currentSurfaceType) +void LandTool::ShowSurfaceStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentSurfaceType) { auto& objManager = GetContext()->GetObjectManager(); @@ -89,7 +89,7 @@ void LandTool::ShowSurfaceStyleDropdown(rct_window* w, rct_widget* widget, Objec gDropdownDefaultIndex = defaultIndex; } -void LandTool::ShowEdgeStyleDropdown(rct_window* w, rct_widget* widget, ObjectEntryIndex currentEdgeType) +void LandTool::ShowEdgeStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentEdgeType) { auto& objManager = GetContext()->GetObjectManager(); diff --git a/src/openrct2-ui/interface/LandTool.h b/src/openrct2-ui/interface/LandTool.h index dbcd2fc6b9..dab9395cad 100644 --- a/src/openrct2-ui/interface/LandTool.h +++ b/src/openrct2-ui/interface/LandTool.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,6 +29,6 @@ extern money64 gWaterToolLowerCost; namespace LandTool { uint32_t SizeToSpriteIndex(uint16_t size); - void ShowSurfaceStyleDropdown(rct_window* w, rct_widget* widget, ObjectEntryIndex currentSurfaceType); - void ShowEdgeStyleDropdown(rct_window* w, rct_widget* widget, ObjectEntryIndex currentEdgeType); + void ShowSurfaceStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentSurfaceType); + void ShowEdgeStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentEdgeType); } // namespace LandTool diff --git a/src/openrct2-ui/interface/Theme.cpp b/src/openrct2-ui/interface/Theme.cpp index e4696f0994..ecf6ae169f 100644 --- a/src/openrct2-ui/interface/Theme.cpp +++ b/src/openrct2-ui/interface/Theme.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -404,7 +404,7 @@ bool UITheme::WriteToFile(const std::string& path) const } catch (const std::exception& ex) { - log_error("Unable to save %s: %s", path.c_str(), ex.what()); + LOG_ERROR("Unable to save %s: %s", path.c_str(), ex.what()); result = false; } @@ -475,7 +475,7 @@ UITheme* UITheme::FromFile(const std::string& path) } catch (const std::exception&) { - log_error("Unable to read theme: %s", path.c_str()); + LOG_ERROR("Unable to read theme: %s", path.c_str()); result = nullptr; } return result; @@ -569,7 +569,7 @@ namespace ThemeManager CurrentTheme = theme; CurrentThemePath.clear(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } static void LoadTheme(const std::string& path) @@ -617,9 +617,9 @@ namespace ThemeManager ActiveAvailableThemeIndex = 1; bool configValid = false; - if (!String::IsNullOrEmpty(gConfigInterface.CurrentThemePreset)) + if (!gConfigInterface.CurrentThemePreset.empty()) { - if (LoadThemeByConfigName(gConfigInterface.CurrentThemePreset)) + if (LoadThemeByConfigName(gConfigInterface.CurrentThemePreset.c_str())) { configValid = true; } @@ -627,7 +627,7 @@ namespace ThemeManager if (!configValid) { - String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(1)); + gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); } } @@ -682,7 +682,7 @@ const utf8* ThemeManagerGetAvailableThemeConfigName(size_t index) const utf8* ThemeManagerGetAvailableThemeName(size_t index) { if (index < ThemeManager::NumPredefinedThemes) - return language_get_string(PredefinedThemes[index].Name); + return LanguageGetString(PredefinedThemes[index].Name); return ThemeManager::AvailableThemes[index].Name.c_str(); } @@ -709,7 +709,7 @@ void ThemeManagerSetActiveAvailableTheme(size_t index) } } ThemeManager::ActiveAvailableThemeIndex = index; - String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(index)); + gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(index); ColourSchemeUpdateAll(); } @@ -805,7 +805,7 @@ void ThemeRename(const utf8* name) if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path)) { ThemeManager::ActiveAvailableThemeIndex = i; - String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(1)); + gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); break; } } @@ -830,7 +830,7 @@ void ThemeDuplicate(const utf8* name) if (Path::Equals(newPath, ThemeManager::AvailableThemes[i].Path)) { ThemeManager::ActiveAvailableThemeIndex = i; - String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(i)); + gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(i); break; } } @@ -841,7 +841,7 @@ void ThemeDelete() File::Delete(ThemeManager::CurrentThemePath); ThemeManager::LoadTheme(const_cast(&PredefinedThemeRCT2)); ThemeManager::ActiveAvailableThemeIndex = 1; - String::DiscardDuplicate(&gConfigInterface.CurrentThemePreset, ThemeManagerGetAvailableThemeConfigName(1)); + gConfigInterface.CurrentThemePreset = ThemeManagerGetAvailableThemeConfigName(1); } void ThemeManagerInitialise() @@ -871,15 +871,15 @@ StringId ThemeDescGetName(WindowClass wc) void ColourSchemeUpdateAll() { - window_visit_each([](rct_window* w) { ColourSchemeUpdate(w); }); + WindowVisitEach([](WindowBase* w) { ColourSchemeUpdate(w); }); } -void ColourSchemeUpdate(rct_window* window) +void ColourSchemeUpdate(WindowBase* window) { ColourSchemeUpdateByClass(window, window->classification); } -void ColourSchemeUpdateByClass(rct_window* window, WindowClass classification) +void ColourSchemeUpdateByClass(WindowBase* window, WindowClass classification) { const WindowTheme* windowTheme; const UIThemeWindowEntry* entry = ThemeManager::CurrentTheme->GetEntry(classification); diff --git a/src/openrct2-ui/interface/Theme.h b/src/openrct2-ui/interface/Theme.h index 704aea30af..e0def3382d 100644 --- a/src/openrct2-ui/interface/Theme.h +++ b/src/openrct2-ui/interface/Theme.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,9 +21,9 @@ enum UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR = 1 << 4, }; -void ColourSchemeUpdate(rct_window* window); +void ColourSchemeUpdate(WindowBase* window); void ColourSchemeUpdateAll(); -void ColourSchemeUpdateByClass(rct_window* window, WindowClass classification); +void ColourSchemeUpdateByClass(WindowBase* window, WindowClass classification); void ThemeManagerInitialise(); void ThemeManagerLoadAvailableThemes(); diff --git a/src/openrct2-ui/interface/Viewport.h b/src/openrct2-ui/interface/Viewport.h index 73b3761f73..3e20e8fba8 100644 --- a/src/openrct2-ui/interface/Viewport.h +++ b/src/openrct2-ui/interface/Viewport.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index e0683f44ae..d37f85d9c1 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,6 +31,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -40,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -70,7 +75,7 @@ InteractionInfo ViewportInteractionGetItemLeft(const ScreenCoordsXY& screenCoord if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && gEditorStep != EditorStep::RollercoasterDesigner) return info; - info = get_map_coordinates_from_pos( + info = GetMapCoordinatesFromPos( screenCoords, EnumsToFlags(ViewportInteractionItem::Entity, ViewportInteractionItem::Ride, ViewportInteractionItem::ParkEntrance)); auto tileElement = info.SpriteType != ViewportInteractionItem::Entity ? info.Element : nullptr; @@ -96,7 +101,7 @@ InteractionInfo ViewportInteractionGetItemLeft(const ScreenCoordsXY& screenCoord case EntityType::Vehicle: { auto vehicle = sprite->As(); - if (vehicle != nullptr && vehicle->ride_subtype != OBJECT_ENTRY_INDEX_NULL) + if (vehicle != nullptr && !vehicle->IsCableLift()) vehicle->SetMapToolbar(); else info.SpriteType = ViewportInteractionItem::None; @@ -108,7 +113,7 @@ InteractionInfo ViewportInteractionGetItemLeft(const ScreenCoordsXY& screenCoord auto peep = sprite->As(); if (peep != nullptr) { - peep_set_map_tooltip(peep); + PeepSetMapTooltip(peep); } else { @@ -121,7 +126,7 @@ InteractionInfo ViewportInteractionGetItemLeft(const ScreenCoordsXY& screenCoord } break; case ViewportInteractionItem::Ride: - ride_set_map_tooltip(tileElement); + RideSetMapTooltip(tileElement); break; case ViewportInteractionItem::ParkEntrance: { @@ -149,7 +154,7 @@ InteractionInfo ViewportInteractionGetItemLeft(const ScreenCoordsXY& screenCoord info.SpriteType = ViewportInteractionItem::Entity; info.Loc.x = peep->x; info.Loc.y = peep->y; - peep_set_map_tooltip(peep); + PeepSetMapTooltip(peep); } } @@ -185,7 +190,7 @@ bool ViewportInteractionLeftClick(const ScreenCoordsXY& screenCoords) case EntityType::Vehicle: { auto intent = Intent(WD_VEHICLE); - intent.putExtra(INTENT_EXTRA_VEHICLE, entity); + intent.PutExtra(INTENT_EXTRA_VEHICLE, entity); ContextOpenIntent(&intent); break; } @@ -193,22 +198,22 @@ bool ViewportInteractionLeftClick(const ScreenCoordsXY& screenCoords) case EntityType::Staff: { auto intent = Intent(WindowClass::Peep); - intent.putExtra(INTENT_EXTRA_PEEP, entity); + intent.PutExtra(INTENT_EXTRA_PEEP, entity); ContextOpenIntent(&intent); break; } case EntityType::Balloon: { - if (game_is_not_paused()) + if (GameIsNotPaused()) { - auto balloonPress = BalloonPressAction(entity->sprite_index); + auto balloonPress = BalloonPressAction(entity->Id); GameActions::Execute(&balloonPress); } } break; case EntityType::Duck: { - if (game_is_not_paused()) + if (GameIsNotPaused()) { auto duck = entity->As(); if (duck != nullptr) @@ -226,7 +231,7 @@ bool ViewportInteractionLeftClick(const ScreenCoordsXY& screenCoords) case ViewportInteractionItem::Ride: { auto intent = Intent(WD_TRACK); - intent.putExtra(INTENT_EXTRA_TILE_ELEMENT, info.Element); + intent.PutExtra(INTENT_EXTRA_TILE_ELEMENT, info.Element); ContextOpenIntent(&intent); return true; } @@ -257,7 +262,7 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor constexpr auto flags = static_cast( ~EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); - info = get_map_coordinates_from_pos(screenCoords, flags); + info = GetMapCoordinatesFromPos(screenCoords, flags); auto tileElement = info.Element; switch (info.SpriteType) @@ -277,7 +282,7 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor info.SpriteType = ViewportInteractionItem::None; return info; } - ride = get_ride(vehicle->ride); + ride = GetRide(vehicle->ride); if (ride != nullptr && ride->status == RideStatus::Closed) { auto ft = Formatter(); @@ -300,7 +305,7 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor return info; } - ride = get_ride(tileElement->GetRideIndex()); + ride = GetRide(tileElement->GetRideIndex()); if (ride == nullptr) { info.SpriteType = ViewportInteractionItem::None; @@ -428,7 +433,7 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor auto banner = tileElement->AsBanner()->GetBanner(); if (banner != nullptr) { - auto* bannerEntry = GetBannerEntry(banner->type); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); auto ft = Formatter(); ft.Add(STR_MAP_TOOLTIP_BANNER_STRINGID_STRINGID); @@ -444,10 +449,9 @@ InteractionInfo ViewportInteractionGetItemRight(const ScreenCoordsXY& screenCoor break; } - if (!(input_test_flag(INPUT_FLAG_6)) || !(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_6)) || !(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) { - if (window_find_by_class(WindowClass::RideConstruction) == nullptr - && window_find_by_class(WindowClass::Footpath) == nullptr) + if (WindowFindByClass(WindowClass::RideConstruction) == nullptr && WindowFindByClass(WindowClass::Footpath) == nullptr) { info.SpriteType = ViewportInteractionItem::None; return info; @@ -556,17 +560,17 @@ bool ViewportInteractionRightClick(const ScreenCoordsXY& screenCoords) { break; } - auto ride = get_ride(vehicle->ride); + auto ride = GetRide(vehicle->ride); if (ride != nullptr) { - ride_construct(ride); + RideConstructionStart(*ride); } } } break; case ViewportInteractionItem::Ride: tileElement = { info.Loc, info.Element }; - ride_modify(tileElement); + RideModify(tileElement); break; case ViewportInteractionItem::Scenery: ViewportInteractionRemoveScenery(info.Element, info.Loc); @@ -613,12 +617,12 @@ static void ViewportInteractionRemoveScenery(TileElement* tileElement, const Coo */ static void ViewportInteractionRemoveFootpath(TileElement* tileElement, const CoordsXY& mapCoords) { - rct_window* w; + WindowBase* w; TileElement* tileElement2; auto z = tileElement->GetBaseZ(); - w = window_find_by_class(WindowClass::Footpath); + w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) FootpathProvisionalUpdate(); @@ -737,7 +741,7 @@ PeepDistance GetClosestPeep(const ScreenCoordsXY& viewportCoords, const int32_t static Peep* ViewportInteractionGetClosestPeep(ScreenCoordsXY screenCoords, int32_t maxDistance) { - auto* w = window_find_from_point(screenCoords); + auto* w = WindowFindFromPoint(screenCoords); if (w == nullptr) return nullptr; @@ -761,7 +765,7 @@ static Peep* ViewportInteractionGetClosestPeep(ScreenCoordsXY screenCoords, int3 */ CoordsXY ViewportInteractionGetTileStartAtCursor(const ScreenCoordsXY& screenCoords) { - rct_window* window = window_find_from_point(screenCoords); + WindowBase* window = WindowFindFromPoint(screenCoords); if (window == nullptr || window->viewport == nullptr) { CoordsXY ret{}; @@ -769,7 +773,7 @@ CoordsXY ViewportInteractionGetTileStartAtCursor(const ScreenCoordsXY& screenCoo return ret; } auto viewport = window->viewport; - auto info = get_map_coordinates_from_pos_window( + auto info = GetMapCoordinatesFromPosWindow( window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); auto initialPos = info.Loc; @@ -795,7 +799,7 @@ CoordsXY ViewportInteractionGetTileStartAtCursor(const ScreenCoordsXY& screenCoo { z = TileElementHeight(mapPos); } - mapPos = viewport_coord_to_map_coord(initialVPPos, z); + mapPos = ViewportPosToMapPos(initialVPPos, z); mapPos.x = std::clamp(mapPos.x, initialPos.x, initialPos.x + 31); mapPos.y = std::clamp(mapPos.y, initialPos.y, initialPos.y + 31); } diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 0df6a1ddf1..328c0343b9 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,41 +17,42 @@ #include #include #include +#include #include #include #include -static void WidgetFrameDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetResizeDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetTabDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetFlatButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetTextButton(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetTextCentred(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetText(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetTextInset(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetTextBoxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetGroupboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetCaptionDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetCheckboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetCloseboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); -static void WidgetScrollDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); +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); +static void WidgetTabDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex); +static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex); +static void WidgetTextButton(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex); +static void WidgetTextCentred(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex); +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 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( - rct_drawpixelinfo* dpi, const rct_scroll& 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, int32_t colour); static void WidgetVScrollbarDraw( - rct_drawpixelinfo* dpi, const rct_scroll& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour); -static void WidgetDrawImage(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); + DrawPixelInfo* dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour); +static void WidgetDrawImage(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex); /** * * rct2: 0x006EB2A8 */ -void WidgetDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +void WidgetDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { const auto* widget = GetWidgetByIndex(w, widgetIndex); if (widget == nullptr) { - log_error("Tried drawing an out-of-bounds widget index!"); + LOG_ERROR("Tried drawing an out-of-bounds widget index!"); return; } @@ -116,7 +117,7 @@ void WidgetDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) * * rct2: 0x006EB6CE */ -static void WidgetFrameDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetFrameDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -133,7 +134,7 @@ static void WidgetFrameDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex w uint8_t colour = w.colours[widget.colour]; // Draw the frame - gfx_fill_rect_inset(dpi, { leftTop, { r, b } }, colour, press); + GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, press); // Check if the window can be resized if (!(w.flags & WF_RESIZABLE)) @@ -143,14 +144,14 @@ static void WidgetFrameDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex w // Draw the resize sprite at the bottom right corner leftTop = w.windowPos + ScreenCoordsXY{ widget.right - 18, widget.bottom - 18 }; - gfx_draw_sprite(dpi, ImageId(SPR_RESIZE, colour & 0x7F), leftTop); + GfxDrawSprite(dpi, ImageId(SPR_RESIZE, colour & 0x7F), leftTop); } /** * * rct2: 0x006EB765 */ -static void WidgetResizeDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetResizeDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -164,7 +165,7 @@ static void WidgetResizeDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex uint8_t colour = w.colours[widget.colour]; // Draw the panel - gfx_fill_rect_inset(dpi, { leftTop, { r, b } }, colour, 0); + GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, 0); // Check if the window can be resized if (!(w.flags & WF_RESIZABLE)) @@ -174,14 +175,14 @@ static void WidgetResizeDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex // Draw the resize sprite at the bottom right corner leftTop = w.windowPos + ScreenCoordsXY{ widget.right - 18, widget.bottom - 18 }; - gfx_draw_sprite(dpi, ImageId(SPR_RESIZE, colour & 0x7F), leftTop); + GfxDrawSprite(dpi, ImageId(SPR_RESIZE, colour & 0x7F), leftTop); } /** * * rct2: 0x006EB8E5 */ -static void WidgetButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -196,15 +197,15 @@ static void WidgetButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex // Get the colour uint8_t colour = w.colours[widget.colour]; - if (static_cast(widget.image) == -2) + if (static_cast(widget.image.ToUInt32()) == -2) { // Draw border with no fill - gfx_fill_rect_inset(dpi, rect, colour, press | INSET_RECT_FLAG_FILL_NONE); + GfxFillRectInset(dpi, rect, colour, press | INSET_RECT_FLAG_FILL_NONE); return; } // Draw the border with fill - gfx_fill_rect_inset(dpi, rect, colour, press); + GfxFillRectInset(dpi, rect, colour, press); WidgetDrawImage(dpi, w, widgetIndex); } @@ -213,12 +214,12 @@ static void WidgetButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex * * rct2: 0x006EB806 */ -static void WidgetTabDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetTabDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget auto& widget = w.widgets[widgetIndex]; - if (widget.type != WindowWidgetType::Tab && static_cast(widget.image) == -1) + if (widget.type != WindowWidgetType::Tab && widget.image.GetIndex() == ImageIndexUndefined) return; if (widget.type == WindowWidgetType::Tab) @@ -226,10 +227,10 @@ static void WidgetTabDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex wid if (WidgetIsDisabled(w, widgetIndex)) return; - if (widget.image == static_cast(SPR_NONE)) + if (widget.image.GetIndex() == ImageIndexUndefined) { // Set standard tab sprite to use. - widget.image = IMAGE_TYPE_REMAP | SPR_TAB; + widget.image = ImageId(SPR_TAB, FilterPaletteID::PaletteNull); } } @@ -251,17 +252,18 @@ static void WidgetTabDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex wid // Get the colour and disabled image auto colour = w.colours[widget.colour] & 0x7F; - auto image = ImageId::FromUInt32(widget.image + 2).WithPrimary(colour); + const auto newIndex = widget.image.GetIndex() + 2; + auto image = widget.image.WithIndex(newIndex).WithPrimary(colour); // Draw disabled image - gfx_draw_sprite(dpi, image, leftTop); + GfxDrawSprite(dpi, image, leftTop); } /** * * rct2: 0x006EB861 */ -static void WidgetFlatButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { if (!WidgetIsDisabled(w, widgetIndex) && WidgetIsHighlighted(w, widgetIndex)) { @@ -282,15 +284,15 @@ static void WidgetFlatButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIn // Check if the button is pressed down if (WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex)) { - if (static_cast(widget.image) == -2) + if (static_cast(widget.image.ToUInt32()) == -2) { // Draw border with no fill - gfx_fill_rect_inset(dpi, rect, colour, INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE); + GfxFillRectInset(dpi, rect, colour, INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE); return; } // Draw the border with fill - gfx_fill_rect_inset(dpi, rect, colour, INSET_RECT_FLAG_BORDER_INSET); + GfxFillRectInset(dpi, rect, colour, INSET_RECT_FLAG_BORDER_INSET); } // Draw image @@ -301,7 +303,7 @@ static void WidgetFlatButtonDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIn * * rct2: 0x006EBBEB */ -static void WidgetTextButton(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetTextButton(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -315,7 +317,7 @@ static void WidgetTextButton(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex // Border uint8_t press = WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0; - gfx_fill_rect_inset(dpi, rect, colour, press); + GfxFillRectInset(dpi, rect, colour, press); // Button caption if (widget.type != WindowWidgetType::TableHeader) @@ -332,7 +334,7 @@ static void WidgetTextButton(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex * * rct2: 0x006EBC41 */ -static void WidgetTextCentred(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetTextCentred(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -366,11 +368,11 @@ static void WidgetTextCentred(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex ScreenCoordsXY coords = { (topLeft.x + r + 1) / 2 - 1, topLeft.y }; if (widget.type == WindowWidgetType::LabelCentred) { - DrawTextWrapped(dpi, coords, widget.width() - 2, stringId, ft, { colour, TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, coords, widget.width() - 2, stringId, ft, { colour, TextAlignment::CENTRE }); } else { - DrawTextEllipsised(dpi, coords, widget.width() - 2, stringId, ft, { colour, TextAlignment::CENTRE }); + DrawTextEllipsised(*dpi, coords, widget.width() - 2, stringId, ft, { colour, TextAlignment::CENTRE }); } } @@ -378,7 +380,7 @@ static void WidgetTextCentred(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex * * rct2: 0x006EBD52 */ -static void WidgetText(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetText(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -415,11 +417,11 @@ static void WidgetText(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widget ScreenCoordsXY coords = { l + 1, t }; if (widget.type == WindowWidgetType::LabelCentred) { - DrawTextWrapped(dpi, coords, r - l, stringId, ft, { colour, TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, coords, r - l, stringId, ft, { colour, TextAlignment::CENTRE }); } else { - DrawTextEllipsised(dpi, coords, r - l, stringId, ft, colour); + DrawTextEllipsised(*dpi, coords, r - l, stringId, ft, colour); } } @@ -427,7 +429,7 @@ static void WidgetText(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widget * * rct2: 0x006EBD1F */ -static void WidgetTextInset(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetTextInset(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -439,11 +441,11 @@ static void WidgetTextInset(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex w // Get the colour uint8_t colour = w.colours[widget.colour]; - gfx_fill_rect_inset(dpi, rect, colour, INSET_RECT_F_60); + GfxFillRectInset(dpi, rect, colour, INSET_RECT_F_60); WidgetText(dpi, w, widgetIndex); } -static std::pair WidgetGetStringidAndArgs(const rct_widget& widget) +static std::pair WidgetGetStringidAndArgs(const Widget& widget) { auto stringId = widget.text; void* formatArgs = gCommonFormatArgs; @@ -467,7 +469,7 @@ static std::pair WidgetGetStringidAndArgs(const rct_widget& wid * * rct2: 0x006EB535 */ -static void WidgetGroupboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetGroupboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -486,11 +488,11 @@ static void WidgetGroupboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde colour |= COLOUR_FLAG_INSET; utf8 buffer[512] = { 0 }; - format_string(buffer, sizeof(buffer), stringId, formatArgs); + OpenRCT2::FormatStringLegacy(buffer, sizeof(buffer), stringId, formatArgs); auto ft = Formatter(); ft.Add(buffer); - DrawTextBasic(dpi, { l, t }, STR_STRING, ft, { colour }); - textRight = l + gfx_get_string_width(buffer, FontStyle::Medium) + 1; + DrawTextBasic(*dpi, { l, t }, STR_STRING, ft, { colour }); + textRight = l + GfxGetStringWidth(buffer, FontStyle::Medium) + 1; } // Border @@ -504,31 +506,31 @@ static void WidgetGroupboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde uint8_t colour = w.colours[widget.colour] & 0x7F; // Border left of text - gfx_fill_rect(dpi, { { l, t }, { l + 4, t } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + 1, t + 1 }, { l + 4, t + 1 } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l, t }, { l + 4, t } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + 1, t + 1 }, { l + 4, t + 1 } }, ColourMapA[colour].lighter); // Border right of text - gfx_fill_rect(dpi, { { textRight, t }, { r - 1, t } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { textRight, t + 1 }, { r - 2, t + 1 } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { textRight, t }, { r - 1, t } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { textRight, t + 1 }, { r - 2, t + 1 } }, ColourMapA[colour].lighter); // Border right - gfx_fill_rect(dpi, { { r - 1, t + 1 }, { r - 1, b - 1 } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { r, t }, { r, b } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { r - 1, t + 1 }, { r - 1, b - 1 } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { r, t }, { r, b } }, ColourMapA[colour].lighter); // Border bottom - gfx_fill_rect(dpi, { { l, b - 1 }, { r - 2, b - 1 } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l, b }, { r - 1, b } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l, b - 1 }, { r - 2, b - 1 } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l, b }, { r - 1, b } }, ColourMapA[colour].lighter); // Border left - gfx_fill_rect(dpi, { { l, t + 1 }, { l, b - 2 } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + 1, t + 2 }, { l + 1, b - 2 } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l, t + 1 }, { l, b - 2 } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + 1, t + 2 }, { l + 1, b - 2 } }, ColourMapA[colour].lighter); } /** * * rct2: 0x006EB2F9 */ -static void WidgetCaptionDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetCaptionDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto* widget = &w.widgets[widgetIndex]; @@ -544,14 +546,14 @@ static void WidgetCaptionDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex if (w.flags & WF_10) press |= INSET_RECT_FLAG_FILL_MID_LIGHT; - gfx_fill_rect_inset(dpi, { topLeft, bottomRight }, colour, press); + GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, press); // Black caption bars look slightly green, this fixes that if (colour == 0) - gfx_fill_rect( + GfxFillRect( dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, ColourMapA[colour].dark); else - gfx_filter_rect( + GfxFilterRect( dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, FilterPaletteID::PaletteDarken3); @@ -569,14 +571,15 @@ static void WidgetCaptionDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex } topLeft.x += width / 2; DrawTextEllipsised( - dpi, topLeft, width, widget->text, Formatter::Common(), { COLOUR_WHITE | COLOUR_FLAG_OUTLINE, TextAlignment::CENTRE }); + *dpi, topLeft, width, widget->text, Formatter::Common(), + { COLOUR_WHITE | static_cast(COLOUR_FLAG_OUTLINE), TextAlignment::CENTRE }); } /** * * rct2: 0x006EBB85 */ -static void WidgetCloseboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetCloseboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -596,7 +599,7 @@ static void WidgetCloseboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde uint8_t colour = w.colours[widget.colour]; // Draw the button - gfx_fill_rect_inset(dpi, { topLeft, bottomRight }, colour, press); + GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, press); if (widget.text == STR_NONE) return; @@ -606,14 +609,14 @@ static void WidgetCloseboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde if (WidgetIsDisabled(w, widgetIndex)) colour |= COLOUR_FLAG_INSET; - DrawTextEllipsised(dpi, topLeft, widget.width() - 2, widget.text, Formatter::Common(), { colour, TextAlignment::CENTRE }); + DrawTextEllipsised(*dpi, topLeft, widget.width() - 2, widget.text, Formatter::Common(), { colour, TextAlignment::CENTRE }); } /** * * rct2: 0x006EBAD9 */ -static void WidgetCheckboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetCheckboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -627,7 +630,7 @@ static void WidgetCheckboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde colour_t colour = w.colours[widget.colour]; // checkbox - gfx_fill_rect_inset(dpi, { midLeft - ScreenCoordsXY{ 0, 5 }, midLeft + ScreenCoordsXY{ 9, 4 } }, colour, INSET_RECT_F_60); + GfxFillRectInset(dpi, { midLeft - ScreenCoordsXY{ 0, 5 }, midLeft + ScreenCoordsXY{ 9, 4 } }, colour, INSET_RECT_F_60); if (WidgetIsDisabled(w, widgetIndex)) { @@ -637,8 +640,8 @@ static void WidgetCheckboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde // fill it when checkbox is pressed if (WidgetIsPressed(w, widgetIndex)) { - gfx_draw_string( - dpi, { midLeft - ScreenCoordsXY{ 0, 5 } }, static_cast(CheckBoxMarkString), + GfxDrawString( + *dpi, { midLeft - ScreenCoordsXY{ 0, 5 } }, static_cast(CheckBoxMarkString), { static_cast(NOT_TRANSLUCENT(colour)) }); } @@ -647,17 +650,17 @@ static void WidgetCheckboxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetInde return; auto [stringId, formatArgs] = WidgetGetStringidAndArgs(widget); - gfx_draw_string_left_centred(dpi, stringId, formatArgs, colour, { midLeft + ScreenCoordsXY{ 14, 0 } }); + GfxDrawStringLeftCentred(*dpi, stringId, formatArgs, colour, { midLeft + ScreenCoordsXY{ 14, 0 } }); } /** * * rct2: 0x006EBD96 */ -static void WidgetScrollDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetScrollDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget - int32_t scrollIndex = window_get_scroll_data_index(w, widgetIndex); + int32_t scrollIndex = WindowGetScrollDataIndex(w, widgetIndex); const auto& widget = w.widgets[widgetIndex]; const auto& scroll = w.scrolls[scrollIndex]; @@ -669,7 +672,7 @@ static void WidgetScrollDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex uint8_t colour = w.colours[widget.colour]; // Draw the border - gfx_fill_rect_inset(dpi, { topLeft, bottomRight }, colour, INSET_RECT_F_60); + GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, INSET_RECT_F_60); // Inflate by -1 topLeft.x++; @@ -700,7 +703,7 @@ static void WidgetScrollDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex bottomRight.x++; // Create a new inner scroll dpi - rct_drawpixelinfo scroll_dpi = *dpi; + DrawPixelInfo scroll_dpi = *dpi; // Clip the scroll dpi against the outer dpi int32_t cl = std::max(dpi->x, topLeft.x); @@ -719,27 +722,27 @@ static void WidgetScrollDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex // Draw the scroll contents if (scroll_dpi.width > 0 && scroll_dpi.height > 0) - window_event_scroll_paint_call(&w, &scroll_dpi, scrollIndex); + WindowEventScrollPaintCall(&w, &scroll_dpi, scrollIndex); } static void WidgetHScrollbarDraw( - rct_drawpixelinfo* dpi, const rct_scroll& 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, int32_t colour) { colour &= 0x7F; // Trough - gfx_fill_rect(dpi, { { l + SCROLLBAR_WIDTH, t }, { r - SCROLLBAR_WIDTH, b } }, ColourMapA[colour].lighter); - gfx_fill_rect(dpi, { { l + SCROLLBAR_WIDTH, t }, { r - SCROLLBAR_WIDTH, b } }, 0x1000000 | ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + SCROLLBAR_WIDTH, t + 2 }, { r - SCROLLBAR_WIDTH, t + 2 } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + SCROLLBAR_WIDTH, t + 3 }, { r - SCROLLBAR_WIDTH, t + 3 } }, ColourMapA[colour].lighter); - gfx_fill_rect(dpi, { { l + SCROLLBAR_WIDTH, t + 7 }, { r - SCROLLBAR_WIDTH, t + 7 } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + SCROLLBAR_WIDTH, t + 8 }, { r - SCROLLBAR_WIDTH, t + 8 } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l + SCROLLBAR_WIDTH, t }, { r - SCROLLBAR_WIDTH, b } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l + SCROLLBAR_WIDTH, t }, { r - SCROLLBAR_WIDTH, b } }, 0x1000000 | ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + SCROLLBAR_WIDTH, t + 2 }, { r - SCROLLBAR_WIDTH, t + 2 } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + SCROLLBAR_WIDTH, t + 3 }, { r - SCROLLBAR_WIDTH, t + 3 } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l + SCROLLBAR_WIDTH, t + 7 }, { r - SCROLLBAR_WIDTH, t + 7 } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + SCROLLBAR_WIDTH, t + 8 }, { r - SCROLLBAR_WIDTH, t + 8 } }, ColourMapA[colour].lighter); // Left button { uint8_t flags = (scroll.flags & HSCROLLBAR_LEFT_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0; - gfx_fill_rect_inset(dpi, { { l, t }, { l + (SCROLLBAR_WIDTH - 1), b } }, colour, flags); - gfx_draw_string(dpi, { l + 1, t }, static_cast(BlackLeftArrowString), {}); + GfxFillRectInset(dpi, { { l, t }, { l + (SCROLLBAR_WIDTH - 1), b } }, colour, flags); + GfxDrawString(*dpi, { l + 1, t }, static_cast(BlackLeftArrowString), {}); } // Thumb @@ -748,63 +751,63 @@ static void WidgetHScrollbarDraw( int16_t right = std::min(r - SCROLLBAR_WIDTH, l + scroll.h_thumb_right - 1); uint8_t flags = (scroll.flags & HSCROLLBAR_THUMB_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0; - gfx_fill_rect_inset(dpi, { { left, t }, { right, b } }, colour, flags); + GfxFillRectInset(dpi, { { left, t }, { right, b } }, colour, flags); } // Right button { uint8_t flags = (scroll.flags & HSCROLLBAR_RIGHT_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0; - gfx_fill_rect_inset(dpi, { { r - (SCROLLBAR_WIDTH - 1), t }, { r, b } }, colour, flags); - gfx_draw_string(dpi, { r - 6, t }, static_cast(BlackRightArrowString), {}); + GfxFillRectInset(dpi, { { r - (SCROLLBAR_WIDTH - 1), t }, { r, b } }, colour, flags); + GfxDrawString(*dpi, { r - 6, t }, static_cast(BlackRightArrowString), {}); } } static void WidgetVScrollbarDraw( - rct_drawpixelinfo* dpi, const rct_scroll& 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, int32_t colour) { colour &= 0x7F; // Trough - gfx_fill_rect(dpi, { { l, t + SCROLLBAR_WIDTH }, { r, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].lighter); - gfx_fill_rect(dpi, { { l, t + SCROLLBAR_WIDTH }, { r, b - SCROLLBAR_WIDTH } }, 0x1000000 | ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + 2, t + SCROLLBAR_WIDTH }, { l + 2, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + 3, t + SCROLLBAR_WIDTH }, { l + 3, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].lighter); - gfx_fill_rect(dpi, { { l + 7, t + SCROLLBAR_WIDTH }, { l + 7, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].mid_dark); - gfx_fill_rect(dpi, { { l + 8, t + SCROLLBAR_WIDTH }, { l + 8, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l, t + SCROLLBAR_WIDTH }, { r, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l, t + SCROLLBAR_WIDTH }, { r, b - SCROLLBAR_WIDTH } }, 0x1000000 | ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + 2, t + SCROLLBAR_WIDTH }, { l + 2, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + 3, t + SCROLLBAR_WIDTH }, { l + 3, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].lighter); + GfxFillRect(dpi, { { l + 7, t + SCROLLBAR_WIDTH }, { l + 7, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].mid_dark); + GfxFillRect(dpi, { { l + 8, t + SCROLLBAR_WIDTH }, { l + 8, b - SCROLLBAR_WIDTH } }, ColourMapA[colour].lighter); // Up button - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { { l, t }, { r, t + (SCROLLBAR_WIDTH - 1) } }, colour, ((scroll.flags & VSCROLLBAR_UP_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); - gfx_draw_string(dpi, { l + 1, t - 1 }, static_cast(BlackUpArrowString), {}); + GfxDrawString(*dpi, { l + 1, t - 1 }, static_cast(BlackUpArrowString), {}); // Thumb - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { { l, std::max(t + SCROLLBAR_WIDTH, t + scroll.v_thumb_top - 1) }, { r, std::min(b - SCROLLBAR_WIDTH, t + scroll.v_thumb_bottom - 1) } }, colour, ((scroll.flags & VSCROLLBAR_THUMB_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); // Down button - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { { l, b - (SCROLLBAR_WIDTH - 1) }, { r, b } }, colour, ((scroll.flags & VSCROLLBAR_DOWN_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0)); - gfx_draw_string(dpi, { l + 1, b - (SCROLLBAR_WIDTH - 1) }, static_cast(BlackDownArrowString), {}); + GfxDrawString(*dpi, { l + 1, b - (SCROLLBAR_WIDTH - 1) }, static_cast(BlackDownArrowString), {}); } /** * * rct2: 0x006EB951 */ -static void WidgetDrawImage(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetDrawImage(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { // Get the widget const auto& widget = w.widgets[widgetIndex]; // Get the image - if (static_cast(widget.image) == SPR_NONE) + if (static_cast(widget.image.ToUInt32()) == SPR_NONE) return; - auto image = ImageId::FromUInt32(widget.image); + auto image = widget.image; // Resolve the absolute ltrb auto screenCoords = w.windowPos + ScreenCoordsXY{ widget.left, widget.top }; @@ -822,12 +825,12 @@ static void WidgetDrawImage(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex w // Draw greyed out (light border bottom right shadow) colour = w.colours[widget.colour]; colour = ColourMapA[NOT_TRANSLUCENT(colour)].lighter; - gfx_draw_sprite_solid(dpi, image, screenCoords + ScreenCoordsXY{ 1, 1 }, colour); + GfxDrawSpriteSolid(dpi, image, screenCoords + ScreenCoordsXY{ 1, 1 }, colour); // Draw greyed out (dark) colour = w.colours[widget.colour]; colour = ColourMapA[NOT_TRANSLUCENT(colour)].mid_light; - gfx_draw_sprite_solid(dpi, image, screenCoords, colour); + GfxDrawSpriteSolid(dpi, image, screenCoords, colour); } else { @@ -841,30 +844,30 @@ static void WidgetDrawImage(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex w else image = image.WithPrimary(colour); - gfx_draw_sprite(dpi, image, screenCoords); + GfxDrawSprite(dpi, image, screenCoords); } } -bool WidgetIsDisabled(const rct_window& w, WidgetIndex widgetIndex) +bool WidgetIsDisabled(const WindowBase& w, WidgetIndex widgetIndex) { if (w.classification == WindowClass::Custom) return w.widgets[widgetIndex].flags & WIDGET_FLAGS::IS_DISABLED; return (w.disabled_widgets & (1LL << widgetIndex)) != 0; } -bool WidgetIsHoldable(const rct_window& w, WidgetIndex widgetIndex) +bool WidgetIsHoldable(const WindowBase& w, WidgetIndex widgetIndex) { if (w.classification == WindowClass::Custom) return w.widgets[widgetIndex].flags & WIDGET_FLAGS::IS_HOLDABLE; return (w.hold_down_widgets & (1LL << widgetIndex)) != 0; } -bool WidgetIsVisible(const rct_window& w, WidgetIndex widgetIndex) +bool WidgetIsVisible(const WindowBase& w, WidgetIndex widgetIndex) { return w.widgets[widgetIndex].IsVisible(); } -bool WidgetIsPressed(const rct_window& w, WidgetIndex widgetIndex) +bool WidgetIsPressed(const WindowBase& w, WidgetIndex widgetIndex) { if (w.classification == WindowClass::Custom) { @@ -881,9 +884,9 @@ bool WidgetIsPressed(const rct_window& w, WidgetIndex widgetIndex) } } - if (input_get_state() == InputState::WidgetPressed || input_get_state() == InputState::DropdownActive) + if (InputGetState() == InputState::WidgetPressed || InputGetState() == InputState::DropdownActive) { - if (!(input_test_flag(INPUT_FLAG_WIDGET_PRESSED))) + if (!(InputTestFlag(INPUT_FLAG_WIDGET_PRESSED))) return false; if (gPressedWidget.window_classification != w.classification) return false; @@ -896,7 +899,7 @@ bool WidgetIsPressed(const rct_window& w, WidgetIndex widgetIndex) return false; } -bool WidgetIsHighlighted(const rct_window& w, WidgetIndex widgetIndex) +bool WidgetIsHighlighted(const WindowBase& w, WidgetIndex widgetIndex) { if (gHoverWidget.window_classification != w.classification) return false; @@ -907,9 +910,9 @@ bool WidgetIsHighlighted(const rct_window& w, WidgetIndex widgetIndex) return true; } -bool WidgetIsActiveTool(const rct_window& w, WidgetIndex widgetIndex) +bool WidgetIsActiveTool(const WindowBase& w, WidgetIndex widgetIndex) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) return false; if (gCurrentToolWidget.window_classification != w.classification) return false; @@ -932,11 +935,11 @@ bool WidgetIsActiveTool(const rct_window& w, WidgetIndex widgetIndex) * edi: widget */ void WidgetScrollGetPart( - rct_window& w, const rct_widget* widget, const ScreenCoordsXY& screenCoords, ScreenCoordsXY& retScreenCoords, + WindowBase& w, const Widget* widget, const ScreenCoordsXY& screenCoords, ScreenCoordsXY& retScreenCoords, int32_t* output_scroll_area, int32_t* scroll_id) { *scroll_id = 0; - for (rct_widget* iterator = w.widgets; iterator != widget; iterator++) + for (Widget* iterator = w.widgets; iterator != widget; iterator++) { if (iterator->type == WindowWidgetType::Scroll) { @@ -1036,7 +1039,7 @@ void WidgetScrollGetPart( } } -rct_widget* GetWidgetByIndex(const rct_window& w, WidgetIndex widgetIndex) +Widget* GetWidgetByIndex(const WindowBase& w, WidgetIndex widgetIndex) { // Make sure we don't go out of bounds if we are given a bad widget index WidgetIndex index = 0; @@ -1049,14 +1052,14 @@ rct_widget* GetWidgetByIndex(const rct_window& w, WidgetIndex widgetIndex) index++; } - log_error("Widget index %i out of bounds for window class %u", widgetIndex, w.classification); + LOG_ERROR("Widget index %i out of bounds for window class %u", widgetIndex, w.classification); return nullptr; } -static void SafeSetWidgetFlag(rct_window& w, WidgetIndex widgetIndex, WidgetFlags mask, bool value) +static void SafeSetWidgetFlag(WindowBase& w, WidgetIndex widgetIndex, WidgetFlags mask, bool value) { - rct_widget* widget = GetWidgetByIndex(w, widgetIndex); + Widget* widget = GetWidgetByIndex(w, widgetIndex); if (widget == nullptr) { return; @@ -1068,12 +1071,12 @@ static void SafeSetWidgetFlag(rct_window& w, WidgetIndex widgetIndex, WidgetFlag widget->flags &= ~mask; } -void WidgetSetEnabled(rct_window& w, WidgetIndex widgetIndex, bool enabled) +void WidgetSetEnabled(WindowBase& w, WidgetIndex widgetIndex, bool enabled) { WidgetSetDisabled(w, widgetIndex, !enabled); } -void WidgetSetDisabled(rct_window& w, WidgetIndex widgetIndex, bool value) +void WidgetSetDisabled(WindowBase& w, WidgetIndex widgetIndex, bool value) { SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_DISABLED, value); if (value) @@ -1086,7 +1089,7 @@ void WidgetSetDisabled(rct_window& w, WidgetIndex widgetIndex, bool value) } } -void WidgetSetHoldable(rct_window& w, WidgetIndex widgetIndex, bool value) +void WidgetSetHoldable(WindowBase& w, WidgetIndex widgetIndex, bool value) { SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_HOLDABLE, value); if (value) @@ -1099,12 +1102,12 @@ void WidgetSetHoldable(rct_window& w, WidgetIndex widgetIndex, bool value) } } -void WidgetSetVisible(rct_window& w, WidgetIndex widgetIndex, bool value) +void WidgetSetVisible(WindowBase& w, WidgetIndex widgetIndex, bool value) { SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_HIDDEN, !value); } -void WidgetSetPressed(rct_window& w, WidgetIndex widgetIndex, bool value) +void WidgetSetPressed(WindowBase& w, WidgetIndex widgetIndex, bool value) { SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_PRESSED, value); if (value) @@ -1113,16 +1116,13 @@ void WidgetSetPressed(rct_window& w, WidgetIndex widgetIndex, bool value) w.pressed_widgets &= ~(1uLL << widgetIndex); } -void WidgetSetCheckboxValue(rct_window& w, WidgetIndex widgetIndex, bool value) +void WidgetSetCheckboxValue(WindowBase& w, WidgetIndex widgetIndex, bool value) { WidgetSetPressed(w, widgetIndex, value); } -static void WidgetTextBoxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex) +static void WidgetTextBoxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex) { - int32_t no_lines = 0; - char wrapped_string[TEXT_INPUT_SIZE]; - // Get the widget const auto& widget = w.widgets[widgetIndex]; @@ -1136,8 +1136,8 @@ static void WidgetTextBoxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex bool active = w.classification == gCurrentTextBox.window.classification && w.number == gCurrentTextBox.window.number && widgetIndex == gCurrentTextBox.widget_index; - // gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x20 | (!active ? 0x40 : 0x00)); - gfx_fill_rect_inset(dpi, { topLeft, bottomRight }, colour, INSET_RECT_F_60); + // GfxFillRectInset(dpi, l, t, r, b, colour, 0x20 | (!active ? 0x40 : 0x00)); + GfxFillRectInset(dpi, { topLeft, bottomRight }, colour, INSET_RECT_F_60); // Figure out where the text should be positioned vertically. topLeft.y = w.windowPos.y + widget.textTop(); @@ -1146,44 +1146,41 @@ static void WidgetTextBoxDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex { if (widget.text != 0) { - safe_strcpy(wrapped_string, widget.string, 512); - gfx_wrap_string(wrapped_string, bottomRight.x - topLeft.x - 5, FontStyle::Medium, &no_lines); - gfx_draw_string_no_formatting( - dpi, { topLeft.x + 2, topLeft.y }, wrapped_string, { w.colours[1], FontStyle::Medium }); + u8string wrappedString; + GfxWrapString(widget.string, bottomRight.x - topLeft.x - 5, FontStyle::Medium, &wrappedString, nullptr); + DrawText(*dpi, { topLeft.x + 2, topLeft.y }, { w.colours[1] }, wrappedString.c_str(), true); } return; } - safe_strcpy(wrapped_string, gTextBoxInput, TEXT_INPUT_SIZE); - // String length needs to add 12 either side of box // +13 for cursor when max length. - gfx_wrap_string(wrapped_string, bottomRight.x - topLeft.x - 5 - 6, FontStyle::Medium, &no_lines); + u8string wrappedString; + GfxWrapString(gTextBoxInput, bottomRight.x - topLeft.x - 5 - 6, FontStyle::Medium, &wrappedString, nullptr); - gfx_draw_string_no_formatting(dpi, { topLeft.x + 2, topLeft.y }, wrapped_string, { w.colours[1], FontStyle::Medium }); + DrawText(*dpi, { topLeft.x + 2, topLeft.y }, { w.colours[1] }, wrappedString.c_str(), true); - size_t string_length = get_string_size(wrapped_string) - 1; - - // Make a copy of the string for measuring the width. - char temp_string[TEXT_INPUT_SIZE] = { 0 }; - std::memcpy(temp_string, wrapped_string, std::min(string_length, gTextInput->SelectionStart)); - int32_t cur_x = topLeft.x + gfx_get_string_width_no_formatting(temp_string, FontStyle::Medium) + 3; + // Make a trimmed view of the string for measuring the width. + int32_t curX = topLeft.x + + GfxGetStringWidthNoFormatting( + u8string_view{ wrappedString.c_str(), std::min(wrappedString.length(), gTextInput->SelectionStart) }, + FontStyle::Medium) + + 3; int32_t width = 6; - if (static_cast(gTextInput->SelectionStart) < strlen(gTextBoxInput)) + if (static_cast(gTextInput->SelectionStart) < gTextBoxInput.size()) { // Make a new 1 character wide string for measuring the width // of the character that the cursor is under. - temp_string[1] = '\0'; - temp_string[0] = gTextBoxInput[gTextInput->SelectionStart]; - width = std::max(gfx_get_string_width_no_formatting(temp_string, FontStyle::Medium) - 2, 4); + width = std::max( + GfxGetStringWidthNoFormatting(u8string{ gTextBoxInput[gTextInput->SelectionStart] }, FontStyle::Medium) - 2, 4); } if (gTextBoxFrameNo <= 15) { colour = ColourMapA[w.colours[1]].mid_light; auto y = topLeft.y + (widget.height() - 1); - gfx_fill_rect(dpi, { { cur_x, y }, { cur_x + width, y } }, colour + 5); + GfxFillRect(dpi, { { curX, y }, { curX + width, y } }, colour + 5); } } diff --git a/src/openrct2-ui/interface/Widget.h b/src/openrct2-ui/interface/Widget.h index ec5b1fc7bb..05fc1939ac 100644 --- a/src/openrct2-ui/interface/Widget.h +++ b/src/openrct2-ui/interface/Widget.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,4 +13,4 @@ #include ImageId GetColourButtonImage(colour_t colour); -rct_widget* GetWidgetByIndex(const rct_window& w, WidgetIndex widgetIndex); +Widget* GetWidgetByIndex(const WindowBase& w, WidgetIndex widgetIndex); diff --git a/src/openrct2-ui/interface/Window.cpp b/src/openrct2-ui/interface/Window.cpp index fdc4ab02e0..39fd2ed297 100644 --- a/src/openrct2-ui/interface/Window.cpp +++ b/src/openrct2-ui/interface/Window.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -200,8 +200,8 @@ static ScreenCoordsXY GetCentrePositionForNewWindow(int32_t width, int32_t heigh return ScreenCoordsXY{ (screenWidth - width) / 2, std::max(TOP_TOOLBAR_HEIGHT + 1, (screenHeight - height) / 2) }; } -rct_window* WindowCreate( - std::unique_ptr&& wp, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags) +WindowBase* WindowCreate( + std::unique_ptr&& wp, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags) { if (flags & WF_AUTO_POSITION) { @@ -224,7 +224,7 @@ rct_window* WindowCreate( { if (!(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT | WF_NO_AUTO_CLOSE))) { - window_close(*w.get()); + WindowClose(*w.get()); break; } } @@ -287,43 +287,43 @@ rct_window* WindowCreate( return w; } -rct_window* WindowCreate( +WindowBase* WindowCreate( const ScreenCoordsXY& pos, int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags) { - auto w = std::make_unique(); + auto w = std::make_unique(); w->event_handlers = event_handlers; return WindowCreate(std::move(w), cls, pos, width, height, flags); } -rct_window* WindowCreateAutoPos(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags) +WindowBase* WindowCreateAutoPos(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags) { auto pos = GetAutoPositionForNewWindow(width, height); return WindowCreate(pos, width, height, event_handlers, cls, flags); } -rct_window* WindowCreateCentred(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags) +WindowBase* WindowCreateCentred(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags) { auto pos = GetCentrePositionForNewWindow(width, height); return WindowCreate(pos, width, height, event_handlers, cls, flags); } -static int32_t WindowGetWidgetIndex(const rct_window& w, rct_widget* widget) +static int32_t WindowGetWidgetIndex(const WindowBase& w, Widget* widget) { int32_t i = 0; - for (rct_widget* widget2 = w.widgets; widget2->type != WindowWidgetType::Last; widget2++, i++) + for (Widget* widget2 = w.widgets; widget2->type != WindowWidgetType::Last; widget2++, i++) if (widget == widget2) return i; return -1; } -static int32_t WindowGetScrollIndex(const rct_window& w, int32_t targetWidgetIndex) +static int32_t WindowGetScrollIndex(const WindowBase& w, int32_t targetWidgetIndex) { if (w.widgets[targetWidgetIndex].type != WindowWidgetType::Scroll) return -1; int32_t scrollIndex = 0; WidgetIndex widgetIndex = 0; - for (rct_widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++, widgetIndex++) + for (Widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++, widgetIndex++) { if (widgetIndex == targetWidgetIndex) break; @@ -334,9 +334,9 @@ static int32_t WindowGetScrollIndex(const rct_window& w, int32_t targetWidgetInd return scrollIndex; } -static rct_widget* WindowGetScrollWidget(const rct_window& w, int32_t scrollIndex) +static Widget* WindowGetScrollWidget(const WindowBase& w, int32_t scrollIndex) { - for (rct_widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++) + for (Widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++) { if (widget->type != WindowWidgetType::Scroll) continue; @@ -353,10 +353,10 @@ static rct_widget* WindowGetScrollWidget(const rct_window& w, int32_t scrollInde * * rct2: 0x006E78E3 */ -static void WindowScrollWheelInput(rct_window& w, int32_t scrollIndex, int32_t wheel) +static void WindowScrollWheelInput(WindowBase& w, int32_t scrollIndex, int32_t wheel) { auto& scroll = w.scrolls[scrollIndex]; - rct_widget* widget = WindowGetScrollWidget(w, scrollIndex); + Widget* widget = WindowGetScrollWidget(w, scrollIndex); WidgetIndex widgetIndex = WindowGetWidgetIndex(w, widget); if (scroll.flags & VSCROLLBAR_VISIBLE) @@ -377,17 +377,17 @@ static void WindowScrollWheelInput(rct_window& w, int32_t scrollIndex, int32_t w } WidgetScrollUpdateThumbs(w, widgetIndex); - widget_invalidate(w, widgetIndex); + WidgetInvalidate(w, widgetIndex); } /** * * rct2: 0x006E793B */ -static int32_t WindowWheelInput(rct_window& w, int32_t wheel) +static int32_t WindowWheelInput(WindowBase& w, int32_t wheel) { int32_t i = 0; - for (rct_widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++) + for (Widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++) { if (widget->type != WindowWidgetType::Scroll) continue; @@ -409,18 +409,18 @@ static int32_t WindowWheelInput(rct_window& w, int32_t wheel) * * rct2: 0x006E79FB */ -static void WindowViewportWheelInput(rct_window& w, int32_t wheel) +static void WindowViewportWheelInput(WindowBase& w, int32_t wheel) { if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO)) return; if (wheel < 0) - window_zoom_in(w, true); + WindowZoomIn(w, true); else if (wheel > 0) - window_zoom_out(w, true); + WindowZoomOut(w, true); } -static bool WindowOtherWheelInput(rct_window& w, WidgetIndex widgetIndex, int32_t wheel) +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. @@ -466,21 +466,38 @@ static bool WindowOtherWheelInput(rct_window& w, WidgetIndex widgetIndex, int32_ WidgetIndex buttonWidgetIndex; WindowWidgetType expectedType; - uint32_t expectedContent[2]; + 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; - expectedContent[0] = IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE; - expectedContent[1] = IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE; 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; - expectedContent[0] = STR_NUMERIC_UP; - expectedContent[1] = STR_NUMERIC_DOWN; break; + } default: return false; } @@ -491,16 +508,13 @@ static bool WindowOtherWheelInput(rct_window& w, WidgetIndex widgetIndex, int32_ } auto button1Type = w.widgets[widgetIndex + 1].type; - auto button1Image = w.widgets[widgetIndex + 1].image; auto button2Type = w.widgets[widgetIndex + 2].type; - auto button2Image = w.widgets[widgetIndex + 2].image; - if (button1Type != expectedType || button2Type != expectedType || button1Image != expectedContent[0] - || button2Image != expectedContent[1]) + if (button1Type != expectedType || button2Type != expectedType) { return false; } - window_event_mouse_down_call(&w, buttonWidgetIndex); + WindowEventMouseDownCall(&w, buttonWidgetIndex); return true; } @@ -521,9 +535,9 @@ void WindowAllWheelInput() return; // Check window cursor is over - if (!(input_test_flag(INPUT_FLAG_5))) + if (!(InputTestFlag(INPUT_FLAG_5))) { - rct_window* w = window_find_from_point(cursorState->position); + WindowBase* w = WindowFindFromPoint(cursorState->position); if (w != nullptr) { // Check if main window @@ -534,7 +548,7 @@ void WindowAllWheelInput() } // Check scroll view, cursor is over - WidgetIndex widgetIndex = window_find_widget_from_point(*w, cursorState->position); + WidgetIndex widgetIndex = WindowFindWidgetFromPoint(*w, cursorState->position); if (widgetIndex != -1) { const auto& widget = w->widgets[widgetIndex]; @@ -573,9 +587,9 @@ void ApplyScreenSaverLockSetting() * Initialises scroll widgets to their virtual size. * rct2: 0x006EAEB8 */ -void WindowInitScrollWidgets(rct_window& w) +void WindowInitScrollWidgets(WindowBase& w) { - rct_widget* widget; + Widget* widget; int32_t widget_index, scroll_index; int32_t width, height; @@ -593,7 +607,7 @@ void WindowInitScrollWidgets(rct_window& w) scroll.flags = 0; width = 0; height = 0; - window_get_scroll_size(&w, scroll_index, &width, &height); + WindowGetScrollSize(&w, scroll_index, &width, &height); scroll.h_left = 0; scroll.h_right = width + 1; scroll.v_top = 0; @@ -615,13 +629,13 @@ void WindowInitScrollWidgets(rct_window& w) * * rct2: 0x006EB15C */ -void WindowDrawWidgets(rct_window& w, rct_drawpixelinfo* dpi) +void WindowDrawWidgets(WindowBase& w, DrawPixelInfo* dpi) { - rct_widget* widget; + Widget* widget; WidgetIndex widgetIndex; if ((w.flags & WF_TRANSPARENT) && !(w.flags & WF_NO_BACKGROUND)) - gfx_filter_rect( + GfxFilterRect( dpi, { w.windowPos, w.windowPos + ScreenCoordsXY{ w.width - 1, w.height - 1 } }, FilterPaletteID::Palette51); // todo: some code missing here? Between 006EB18C and 006EB260 @@ -650,7 +664,7 @@ void WindowDrawWidgets(rct_window& w, rct_drawpixelinfo* dpi) if (w.flags & WF_WHITE_BORDER_MASK) { - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { w.windowPos, w.windowPos + ScreenCoordsXY{ w.width - 1, w.height - 1 } }, COLOUR_WHITE, INSET_RECT_FLAG_FILL_NONE); } @@ -660,10 +674,10 @@ void WindowDrawWidgets(rct_window& w, rct_drawpixelinfo* dpi) * * rct2: 0x006EA776 */ -static void WindowInvalidatePressedImageButton(const rct_window& w) +static void WindowInvalidatePressedImageButton(const WindowBase& w) { WidgetIndex widgetIndex; - rct_widget* widget; + Widget* widget; widgetIndex = 0; for (widget = w.widgets; widget->type != WindowWidgetType::Last; widget++, widgetIndex++) @@ -672,7 +686,7 @@ static void WindowInvalidatePressedImageButton(const rct_window& w) continue; if (WidgetIsPressed(w, widgetIndex) || WidgetIsActiveTool(w, widgetIndex)) - gfx_set_dirty_blocks({ w.windowPos, w.windowPos + ScreenCoordsXY{ w.width, w.height } }); + GfxSetDirtyBlocks({ w.windowPos, w.windowPos + ScreenCoordsXY{ w.width, w.height } }); } } @@ -682,10 +696,10 @@ static void WindowInvalidatePressedImageButton(const rct_window& w) */ void InvalidateAllWindowsAfterInput() { - window_visit_each([](rct_window* w) { - window_update_scroll_widgets(*w); + WindowVisitEach([](WindowBase* w) { + WindowUpdateScrollWidgets(*w); WindowInvalidatePressedImageButton(*w); - window_event_resize_call(w); + WindowEventResizeCall(w); }); } @@ -694,12 +708,12 @@ bool Window::IsLegacy() return false; } -void Window::OnDraw(rct_drawpixelinfo& dpi) +void Window::OnDraw(DrawPixelInfo& dpi) { WindowDrawWidgets(*this, &dpi); } -void Window::OnDrawWidget(WidgetIndex widgetIndex, rct_drawpixelinfo& dpi) +void Window::OnDrawWidget(WidgetIndex widgetIndex, DrawPixelInfo& dpi) { WidgetDraw(&dpi, *this, widgetIndex); } @@ -711,7 +725,7 @@ void Window::InitScrollWidgets() void Window::InvalidateWidget(WidgetIndex widgetIndex) { - widget_invalidate(*this, widgetIndex); + WidgetInvalidate(*this, widgetIndex); } bool Window::IsWidgetDisabled(WidgetIndex widgetIndex) const @@ -724,6 +738,11 @@ bool Window::IsWidgetPressed(WidgetIndex widgetIndex) const return WidgetIsPressed(*this, widgetIndex); } +void Window::SetWidgetEnabled(WidgetIndex widgetIndex, bool value) +{ + WidgetSetEnabled(*this, widgetIndex, value); +} + void Window::SetWidgetDisabled(WidgetIndex widgetIndex, bool value) { WidgetSetDisabled(*this, widgetIndex, value); @@ -739,14 +758,51 @@ void Window::SetCheckboxValue(WidgetIndex widgetIndex, bool value) SetWidgetPressed(widgetIndex, value); } -void Window::DrawWidgets(rct_drawpixelinfo& dpi) +void Window::DrawWidgets(DrawPixelInfo& dpi) { WindowDrawWidgets(*this, &dpi); } void Window::Close() { - window_close(*this); + CloseWindowModifier modifier = GetCloseModifier(); + + if (modifier == CloseWindowModifier::Shift) + { + CloseOthers(); + } + else if (modifier == CloseWindowModifier::Control) + { + CloseOthersOfThisClass(); + } + else + { + WindowClose(*this); + } +} + +void Window::CloseOthers() +{ + WindowCloseAllExceptNumberAndClass(number, classification); +} + +void Window::CloseOthersOfThisClass() +{ + WindowCloseByClass(classification); +} + +CloseWindowModifier Window::GetCloseModifier() +{ + CloseWindowModifier lastModifier = CloseWindowModifier::None; + + if (gLastCloseModifier.window.number == number && gLastCloseModifier.window.classification == classification) + { + lastModifier = gLastCloseModifier.modifier; + } + + gLastCloseModifier.modifier = CloseWindowModifier::None; + + return lastModifier; } void Window::TextInputOpen( @@ -756,7 +812,7 @@ void Window::TextInputOpen( WindowTextInputOpen(this, callWidget, title, description, descriptionArgs, existingText, existingArgs, maxLength); } -void window_align_tabs(rct_window* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id) +void WindowAlignTabs(WindowBase* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id) { int32_t i, x = w->widgets[start_tab_id].left; int32_t tab_width = w->widgets[start_tab_id].width(); diff --git a/src/openrct2-ui/interface/Window.h b/src/openrct2-ui/interface/Window.h index 6b37f9917a..576e194ebe 100644 --- a/src/openrct2-ui/interface/Window.h +++ b/src/openrct2-ui/interface/Window.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,21 +12,25 @@ #include #include -struct Window : rct_window +struct Window : WindowBase { virtual bool IsLegacy() override; - virtual void OnDraw(rct_drawpixelinfo& dpi) override; - virtual void OnDrawWidget(WidgetIndex widgetIndex, rct_drawpixelinfo& dpi) override; + virtual void OnDraw(DrawPixelInfo& dpi) override; + virtual void OnDrawWidget(WidgetIndex widgetIndex, DrawPixelInfo& dpi) override; void InitScrollWidgets(); void InvalidateWidget(WidgetIndex widgetIndex); bool IsWidgetDisabled(WidgetIndex widgetIndex) const; bool IsWidgetPressed(WidgetIndex widgetIndex) const; + void SetWidgetEnabled(WidgetIndex widgetIndex, bool value); void SetWidgetDisabled(WidgetIndex widgetIndex, bool value); void SetWidgetPressed(WidgetIndex widgetIndex, bool value); void SetCheckboxValue(WidgetIndex widgetIndex, bool value); - void DrawWidgets(rct_drawpixelinfo& dpi); + void DrawWidgets(DrawPixelInfo& dpi); void Close(); + void CloseOthers(); + void CloseOthersOfThisClass(); + CloseWindowModifier GetCloseModifier(); void TextInputOpen( WidgetIndex callWidget, StringId title, StringId description, const Formatter& descriptionArgs, StringId existingText, uintptr_t existingArgs, int32_t maxLength); @@ -34,4 +38,4 @@ struct Window : rct_window void WindowAllWheelInput(); void ApplyScreenSaverLockSetting(); -void window_align_tabs(rct_window* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id); +void WindowAlignTabs(WindowBase* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id); diff --git a/src/openrct2-ui/libopenrct2ui.vcxproj b/src/openrct2-ui/libopenrct2ui.vcxproj index aebee18021..358c1577d7 100644 --- a/src/openrct2-ui/libopenrct2ui.vcxproj +++ b/src/openrct2-ui/libopenrct2ui.vcxproj @@ -16,6 +16,18 @@ Debug arm64 + + ReleaseLTCG + arm64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + Release Win32 @@ -234,4 +246,4 @@
- + \ No newline at end of file diff --git a/src/openrct2-ui/ride/Construction.cpp b/src/openrct2-ui/ride/Construction.cpp index 2de17ef496..1528e0f946 100644 --- a/src/openrct2-ui/ride/Construction.cpp +++ b/src/openrct2-ui/ride/Construction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,17 +11,18 @@ #include #include +#include #include /** * * rct2: 0x006B4800 */ -void ride_construct_new(RideSelection listItem) +void RideConstructNew(RideSelection listItem) { - int32_t rideEntryIndex = ride_get_entry_index(listItem.Type, listItem.EntryIndex); - int32_t colour1 = ride_get_random_colour_preset_index(listItem.Type); - int32_t colour2 = ride_get_unused_preset_vehicle_colour(rideEntryIndex); + int32_t rideEntryIndex = RideGetEntryIndex(listItem.Type, listItem.EntryIndex); + int32_t colour1 = RideGetRandomColourPresetIndex(listItem.Type); + int32_t colour2 = RideGetUnusedPresetVehicleColour(rideEntryIndex); auto gameAction = RideCreateAction(listItem.Type, listItem.EntryIndex, colour1, colour2, gLastEntranceStyle); @@ -29,8 +30,8 @@ void ride_construct_new(RideSelection listItem) if (result->Error != GameActions::Status::Ok) return; const auto rideIndex = result->GetData(); - auto ride = get_ride(rideIndex); - ride_construct(ride); + auto ride = GetRide(rideIndex); + RideConstructionStart(*ride); }); GameActions::Execute(&gameAction); diff --git a/src/openrct2-ui/ride/Construction.h b/src/openrct2-ui/ride/Construction.h index 321b564545..c21e2db159 100644 --- a/src/openrct2-ui/ride/Construction.h +++ b/src/openrct2-ui/ride/Construction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,4 +11,4 @@ #include -void ride_construct_new(RideSelection listItem); +void RideConstructNew(RideSelection listItem); diff --git a/src/openrct2-ui/scripting/CustomImages.cpp b/src/openrct2-ui/scripting/CustomImages.cpp index 0383f31324..20db2ea2d8 100644 --- a/src/openrct2-ui/scripting/CustomImages.cpp +++ b/src/openrct2-ui/scripting/CustomImages.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -63,26 +63,26 @@ namespace OpenRCT2::Scripting for (ImageIndex i = 0; i < range.Count; i++) { auto index = range.BaseId + i; - auto g1 = gfx_get_g1_element(index); + auto g1 = GfxGetG1Element(index); if (g1 != nullptr) { // Free pixel data delete[] g1->offset; // Replace slot with empty element - rct_g1_element empty{}; - gfx_set_g1_element(index, &empty); + G1Element empty{}; + GfxSetG1Element(index, &empty); } } - gfx_object_free_images(range.BaseId, range.Count); + GfxObjectFreeImages(range.BaseId, range.Count); } std::optional AllocateCustomImages(const std::shared_ptr& plugin, uint32_t count) { - std::vector images; + std::vector images; images.resize(count); - auto base = gfx_object_allocate_images(images.data(), count); + auto base = GfxObjectAllocateImages(images.data(), count); if (base == ImageIndexUndefined) { return {}; @@ -143,7 +143,7 @@ namespace OpenRCT2::Scripting DukValue DukGetImageInfo(duk_context* ctx, ImageIndex id) { - auto* g1 = gfx_get_g1_element(id); + auto* g1 = GfxGetG1Element(id); if (g1 == nullptr) { return ToDuk(ctx, undefined); @@ -171,7 +171,7 @@ namespace OpenRCT2::Scripting return obj.Take(); } - static const char* GetPixelDataTypeForG1(const rct_g1_element& g1) + static const char* GetPixelDataTypeForG1(const G1Element& g1) { if (g1.flags & G1_FLAG_RLE_COMPRESSION) return "rle"; @@ -182,12 +182,12 @@ namespace OpenRCT2::Scripting DukValue DukGetImagePixelData(duk_context* ctx, ImageIndex id) { - auto* g1 = gfx_get_g1_element(id); + auto* g1 = GfxGetG1Element(id); if (g1 == nullptr) { return ToDuk(ctx, undefined); } - auto dataSize = g1_calculate_data_size(g1); + auto dataSize = G1CalculateDataSize(g1); auto* type = GetPixelDataTypeForG1(*g1); // Copy the G1 data to a JS buffer wrapped in a Uint8Array @@ -376,8 +376,8 @@ namespace OpenRCT2::Scripting static void ReplacePixelDataForImage(ImageIndex id, const PixelData& pixelData, std::vector&& data) { // Setup the g1 element - rct_g1_element el{}; - auto* lastel = gfx_get_g1_element(id); + G1Element el{}; + auto* lastel = GfxGetG1Element(id); if (lastel != nullptr) { el = *lastel; @@ -396,8 +396,8 @@ namespace OpenRCT2::Scripting { el.flags |= G1_FLAG_RLE_COMPRESSION; } - gfx_set_g1_element(id, &el); - drawing_engine_invalidate_image(id); + GfxSetG1Element(id, &el); + DrawingEngineInvalidateImage(id); } void DukSetPixelData(duk_context* ctx, ImageIndex id, const DukValue& dukPixelData) @@ -420,13 +420,13 @@ namespace OpenRCT2::Scripting auto plugin = scriptEngine.GetExecInfo().GetCurrentPlugin(); auto drawingEngine = std::make_unique(GetContext()->GetUiContext()); - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.DrawingEngine = drawingEngine.get(); dpi.width = size.width; dpi.height = size.height; auto createNewImage = false; - auto g1 = gfx_get_g1_element(id); + auto g1 = GfxGetG1Element(id); if (g1 == nullptr || g1->width != size.width || g1->height != size.height || (g1->flags & G1_FLAG_RLE_COMPRESSION)) { createNewImage = true; @@ -439,7 +439,7 @@ namespace OpenRCT2::Scripting std::memset(dpi.bits, 0, bufferSize); // Draw the original image if we are creating a new one - gfx_draw_sprite(&dpi, ImageId(id), { 0, 0 }); + GfxDrawSprite(&dpi, ImageId(id), { 0, 0 }); } else { @@ -451,7 +451,7 @@ namespace OpenRCT2::Scripting if (createNewImage) { - rct_g1_element newg1{}; + G1Element newg1{}; if (g1 != nullptr) { delete[] g1->offset; @@ -461,10 +461,10 @@ namespace OpenRCT2::Scripting newg1.width = size.width; newg1.height = size.height; newg1.flags = 0; - gfx_set_g1_element(id, &newg1); + GfxSetG1Element(id, &newg1); } - drawing_engine_invalidate_image(id); + DrawingEngineInvalidateImage(id); } } // namespace OpenRCT2::Scripting diff --git a/src/openrct2-ui/scripting/CustomImages.h b/src/openrct2-ui/scripting/CustomImages.h index 1c731d7f12..2ec13cb768 100644 --- a/src/openrct2-ui/scripting/CustomImages.h +++ b/src/openrct2-ui/scripting/CustomImages.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/scripting/CustomListView.cpp b/src/openrct2-ui/scripting/CustomListView.cpp index 6acb41247a..903a5bb8c0 100644 --- a/src/openrct2-ui/scripting/CustomListView.cpp +++ b/src/openrct2-ui/scripting/CustomListView.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,6 +17,7 @@ # include # include # include +# include # include # include @@ -208,7 +209,7 @@ namespace OpenRCT2::Scripting } // namespace OpenRCT2::Scripting -CustomListView::CustomListView(rct_window* parent, size_t scrollIndex) +CustomListView::CustomListView(WindowBase* parent, size_t scrollIndex) : ParentWindow(parent) , ScrollIndex(scrollIndex) { @@ -255,7 +256,7 @@ void CustomListView::SetColumns(const std::vector& columns, bool SortItems(0, ColumnSortOrder::None); if (!initialising) { - window_update_scroll_widgets(*ParentWindow); + WindowUpdateScrollWidgets(*ParentWindow); Invalidate(); } } @@ -272,7 +273,7 @@ void CustomListView::SetItems(const std::vector& items, bool initi SortItems(0, ColumnSortOrder::None); if (!initialising) { - window_update_scroll_widgets(*ParentWindow); + WindowUpdateScrollWidgets(*ParentWindow); Invalidate(); } } @@ -283,7 +284,7 @@ void CustomListView::SetItems(std::vector&& items, bool initialisi SortItems(0, ColumnSortOrder::None); if (!initialising) { - window_update_scroll_widgets(*ParentWindow); + WindowUpdateScrollWidgets(*ParentWindow); Invalidate(); } } @@ -292,7 +293,7 @@ bool CustomListView::SortItem(size_t indexA, size_t indexB, int32_t column) { const auto& cellA = Items[indexA].Cells[column]; const auto& cellB = Items[indexB].Cells[column]; - return strlogicalcmp(cellA.c_str(), cellB.c_str()) < 0; + return StrLogicalCmp(cellA.c_str(), cellB.c_str()) < 0; } void CustomListView::SortItems(int32_t column) @@ -548,10 +549,10 @@ void CustomListView::MouseUp(const ScreenCoordsXY& pos) } } -void CustomListView::Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scroll* scroll) const +void CustomListView::Paint(WindowBase* w, DrawPixelInfo* dpi, const ScrollBar* scroll) const { auto paletteIndex = ColourMapA[w->colours[1]].mid_light; - gfx_fill_rect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }, paletteIndex); + GfxFillRect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }, paletteIndex); int32_t y = ShowColumnHeaders ? COLUMN_HEADER_HEIGHT : 0; for (size_t i = 0; i < Items.size(); i++) @@ -581,19 +582,19 @@ void CustomListView::Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scro auto isSelected = (SelectedCell && itemIndex == SelectedCell->Row); if (isSelected) { - gfx_filter_rect( + GfxFilterRect( dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } }, FilterPaletteID::PaletteDarken2); } else if (isHighlighted) { - gfx_filter_rect( + GfxFilterRect( dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } }, FilterPaletteID::PaletteDarken2); } else if (isStriped) { - gfx_fill_rect( + GfxFillRect( dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } }, ColourMapA[w->colours[1]].lighter | 0x1000000); } @@ -640,7 +641,7 @@ void CustomListView::Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scro y = scroll->v_top; auto bgColour = ColourMapA[w->colours[1]].mid_light; - gfx_fill_rect(dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + 12 } }, bgColour); + GfxFillRect(dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + 12 } }, bgColour); int32_t x = 0; for (int32_t j = 0; j < static_cast(Columns.size()); j++) @@ -664,7 +665,7 @@ void CustomListView::Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scro } void CustomListView::PaintHeading( - rct_window* w, rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text, + WindowBase* w, DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text, ColumnSortOrder sortOrder, bool isPressed) const { auto boxFlags = 0; @@ -672,7 +673,7 @@ void CustomListView::PaintHeading( { boxFlags = INSET_RECT_FLAG_BORDER_INSET; } - gfx_fill_rect_inset(dpi, { pos, pos + ScreenCoordsXY{ size.width - 1, size.height - 1 } }, w->colours[1], boxFlags); + GfxFillRectInset(dpi, { pos, pos + ScreenCoordsXY{ size.width - 1, size.height - 1 } }, w->colours[1], boxFlags); if (!text.empty()) { PaintCell(dpi, pos, size, text.c_str(), false); @@ -682,18 +683,18 @@ void CustomListView::PaintHeading( { auto ft = Formatter(); ft.Add(STR_UP); - DrawTextBasic(dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::RIGHT }); + DrawTextBasic(*dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::RIGHT }); } else if (sortOrder == ColumnSortOrder::Descending) { auto ft = Formatter(); ft.Add(STR_DOWN); - DrawTextBasic(dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::RIGHT }); + DrawTextBasic(*dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::RIGHT }); } } void CustomListView::PaintSeperator( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const + DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const { auto hasText = text != nullptr && text[0] != '\0'; auto left = pos.x + 4; @@ -711,55 +712,55 @@ void CustomListView::PaintSeperator( // Draw string Formatter ft; ft.Add(text); - DrawTextBasic(dpi, { centreX, pos.y }, STR_STRING, ft, { baseColour, TextAlignment::CENTRE }); + DrawTextBasic(*dpi, { centreX, pos.y }, STR_STRING, ft, { baseColour, TextAlignment::CENTRE }); // Get string dimensions - format_string(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_STRING, ft.Data()); - int32_t categoryStringHalfWidth = (gfx_get_string_width(gCommonStringFormatBuffer, FontStyle::Medium) / 2) + 4; + FormatStringLegacy(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_STRING, ft.Data()); + int32_t categoryStringHalfWidth = (GfxGetStringWidth(gCommonStringFormatBuffer, FontStyle::Medium) / 2) + 4; int32_t strLeft = centreX - categoryStringHalfWidth; int32_t strRight = centreX + categoryStringHalfWidth; // Draw light horizontal rule auto lightLineLeftTop1 = ScreenCoordsXY{ left, lineY0 }; auto lightLineRightBottom1 = ScreenCoordsXY{ strLeft, lineY0 }; - gfx_draw_line(dpi, { lightLineLeftTop1, lightLineRightBottom1 }, lightColour); + GfxDrawLine(dpi, { lightLineLeftTop1, lightLineRightBottom1 }, lightColour); auto lightLineLeftTop2 = ScreenCoordsXY{ strRight, lineY0 }; auto lightLineRightBottom2 = ScreenCoordsXY{ right, lineY0 }; - gfx_draw_line(dpi, { lightLineLeftTop2, lightLineRightBottom2 }, lightColour); + GfxDrawLine(dpi, { lightLineLeftTop2, lightLineRightBottom2 }, lightColour); // Draw dark horizontal rule auto darkLineLeftTop1 = ScreenCoordsXY{ left, lineY1 }; auto darkLineRightBottom1 = ScreenCoordsXY{ strLeft, lineY1 }; - gfx_draw_line(dpi, { darkLineLeftTop1, darkLineRightBottom1 }, darkColour); + GfxDrawLine(dpi, { darkLineLeftTop1, darkLineRightBottom1 }, darkColour); auto darkLineLeftTop2 = ScreenCoordsXY{ strRight, lineY1 }; auto darkLineRightBottom2 = ScreenCoordsXY{ right, lineY1 }; - gfx_draw_line(dpi, { darkLineLeftTop2, darkLineRightBottom2 }, darkColour); + GfxDrawLine(dpi, { darkLineLeftTop2, darkLineRightBottom2 }, darkColour); } else { // Draw light horizontal rule auto lightLineLeftTop1 = ScreenCoordsXY{ left, lineY0 }; auto lightLineRightBottom1 = ScreenCoordsXY{ right, lineY0 }; - gfx_draw_line(dpi, { lightLineLeftTop1, lightLineRightBottom1 }, lightColour); + GfxDrawLine(dpi, { lightLineLeftTop1, lightLineRightBottom1 }, lightColour); // Draw dark horizontal rule auto darkLineLeftTop1 = ScreenCoordsXY{ left, lineY1 }; auto darkLineRightBottom1 = ScreenCoordsXY{ right, lineY1 }; - gfx_draw_line(dpi, { darkLineLeftTop1, darkLineRightBottom1 }, darkColour); + GfxDrawLine(dpi, { darkLineLeftTop1, darkLineRightBottom1 }, darkColour); } } void CustomListView::PaintCell( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text, bool isHighlighted) const + DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text, bool isHighlighted) const { StringId stringId = isHighlighted ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING; auto ft = Formatter(); ft.Add(STR_STRING); ft.Add(text); - DrawTextEllipsised(dpi, pos, size.width, stringId, ft, {}); + DrawTextEllipsised(*dpi, pos, size.width, stringId, ft, {}); } std::optional CustomListView::GetItemIndexAt(const ScreenCoordsXY& pos) @@ -816,7 +817,7 @@ std::optional CustomListView::GetItemIndexAt(const ScreenCoordsXY& po return result; } -rct_widget* CustomListView::GetWidget() const +Widget* CustomListView::GetWidget() const { size_t scrollIndex = 0; for (auto widget = ParentWindow->widgets; widget->type != WindowWidgetType::Last; widget++) diff --git a/src/openrct2-ui/scripting/CustomListView.h b/src/openrct2-ui/scripting/CustomListView.h index 8559da9ada..3178d9121c 100644 --- a/src/openrct2-ui/scripting/CustomListView.h +++ b/src/openrct2-ui/scripting/CustomListView.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -94,7 +94,7 @@ namespace OpenRCT2::Ui::Windows private: static constexpr int32_t HEADER_ROW = -1; - rct_window* ParentWindow{}; + WindowBase* ParentWindow{}; size_t ScrollIndex{}; std::vector Columns; std::vector Items; @@ -120,7 +120,7 @@ namespace OpenRCT2::Ui::Windows DukValue OnClick; DukValue OnHighlight; - CustomListView(rct_window* parent, size_t scrollIndex); + CustomListView(WindowBase* parent, size_t scrollIndex); ScrollbarType GetScrollbars() const; void SetScrollbars(ScrollbarType value, bool initialising = false); const std::vector& GetColumns() const; @@ -136,18 +136,17 @@ namespace OpenRCT2::Ui::Windows void MouseOver(const ScreenCoordsXY& pos, bool isMouseDown); void MouseDown(const ScreenCoordsXY& pos); void MouseUp(const ScreenCoordsXY& pos); - void Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scroll* scroll) const; + void Paint(WindowBase* w, DrawPixelInfo* dpi, const ScrollBar* scroll) const; private: void PaintHeading( - rct_window* w, rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text, + WindowBase* w, DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text, ColumnSortOrder sortOrder, bool isPressed) const; - void PaintSeperator(rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const; + void PaintSeperator(DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const; void PaintCell( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text, - bool isHighlighted) const; + DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text, bool isHighlighted) const; std::optional GetItemIndexAt(const ScreenCoordsXY& pos); - rct_widget* GetWidget() const; + Widget* GetWidget() const; void Invalidate(); }; } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/scripting/CustomMenu.cpp b/src/openrct2-ui/scripting/CustomMenu.cpp index 3351f5d79b..73557bec04 100644 --- a/src/openrct2-ui/scripting/CustomMenu.cpp +++ b/src/openrct2-ui/scripting/CustomMenu.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -110,7 +110,7 @@ namespace OpenRCT2::Scripting { if (ActiveCustomTool->Owner == owner) { - tool_cancel(); + ToolCancel(); } } @@ -185,7 +185,7 @@ namespace OpenRCT2::Scripting if (dukHandler.is_function()) { auto ctx = dukHandler.context(); - auto info = get_map_coordinates_from_pos(screenCoords, Filter); + auto info = GetMapCoordinatesFromPos(screenCoords, Filter); DukObject obj(dukHandler.context()); obj.Set("isDown", MouseDown); @@ -194,7 +194,7 @@ namespace OpenRCT2::Scripting if (info.SpriteType == ViewportInteractionItem::Entity && info.Entity != nullptr) { - obj.Set("entityId", info.Entity->sprite_index.ToUnderlying()); + obj.Set("entityId", info.Entity->Id.ToUnderlying()); } else if (info.Element != nullptr) { @@ -261,14 +261,14 @@ namespace OpenRCT2::Scripting customTool.onUp = dukValue["onUp"]; customTool.onFinish = dukValue["onFinish"]; - auto toolbarWindow = window_find_by_class(WindowClass::TopToolbar); + auto toolbarWindow = WindowFindByClass(WindowClass::TopToolbar); if (toolbarWindow != nullptr) { // Use a widget that does not exist on top toolbar but also make sure it isn't -1 as that // prevents abort from being called. WidgetIndex widgetIndex = -2; - tool_cancel(); - tool_set(*toolbarWindow, widgetIndex, static_cast(customTool.Cursor)); + ToolCancel(); + ToolSet(*toolbarWindow, widgetIndex, static_cast(customTool.Cursor)); ActiveCustomTool = std::move(customTool); ActiveCustomTool->Start(); } diff --git a/src/openrct2-ui/scripting/CustomMenu.h b/src/openrct2-ui/scripting/CustomMenu.h index 33101e61ce..0696344456 100644 --- a/src/openrct2-ui/scripting/CustomMenu.h +++ b/src/openrct2-ui/scripting/CustomMenu.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/scripting/CustomWindow.cpp b/src/openrct2-ui/scripting/CustomWindow.cpp index 0542ec968c..c57ddddce4 100644 --- a/src/openrct2-ui/scripting/CustomWindow.cpp +++ b/src/openrct2-ui/scripting/CustomWindow.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,7 +47,7 @@ namespace OpenRCT2::Ui::Windows WIDX_TAB_0, }; - static rct_widget CustomDefaultWidgets[] = { + static Widget CustomDefaultWidgets[] = { { WindowWidgetType::Frame, 0, 0, 0, 0, 0, 0xFFFFFFFF, STR_NONE }, // panel / background { WindowWidgetType::Caption, 0, 1, 0, 1, 14, STR_STRING, STR_WINDOW_TITLE_TIP }, // title bar { WindowWidgetType::CloseBox, 0, 0, 0, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button @@ -335,7 +335,7 @@ namespace OpenRCT2::Ui::Windows public: std::shared_ptr Owner; CustomWindowDesc Desc; - std::vector Widgets; + std::vector Widgets; std::vector WidgetIndexMap; std::vector ListViews; @@ -347,7 +347,7 @@ namespace OpenRCT2::Ui::Windows CustomWindowInfo(const CustomWindowInfo&) = delete; - const CustomWidgetDesc* GetCustomWidgetDesc(rct_window* w, size_t widgetIndex) const + const CustomWidgetDesc* GetCustomWidgetDesc(WindowBase* w, size_t widgetIndex) const { if (widgetIndex < WidgetIndexMap.size()) { @@ -371,13 +371,13 @@ namespace OpenRCT2::Ui::Windows return nullptr; } - CustomWidgetDesc* GetCustomWidgetDesc(rct_window* w, size_t widgetIndex) + CustomWidgetDesc* GetCustomWidgetDesc(WindowBase* w, size_t widgetIndex) { return const_cast(std::as_const(*this).GetCustomWidgetDesc(w, widgetIndex)); } }; - static CustomWindowInfo& GetInfo(rct_window* w); + static CustomWindowInfo& GetInfo(WindowBase* w); static void InvokeEventHandler(const std::shared_ptr& owner, const DukValue& dukHandler); static void InvokeEventHandler( const std::shared_ptr& owner, const DukValue& dukHandler, const std::vector& args); @@ -455,7 +455,7 @@ namespace OpenRCT2::Ui::Windows { frame_no = 0; } - widget_invalidate(*this, WIDX_TAB_0 + this->page); + WidgetInvalidate(*this, WIDX_TAB_0 + this->page); } } @@ -528,7 +528,7 @@ namespace OpenRCT2::Ui::Windows } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); DrawTabImages(dpi); @@ -537,12 +537,12 @@ namespace OpenRCT2::Ui::Windows auto widgetIndex = GetViewportWidgetIndex(); if (WidgetIsVisible(*this, widgetIndex.value_or(false))) { - window_draw_viewport(&dpi, *this); + WindowDrawViewport(&dpi, *this); } } } - void OnDrawWidget(WidgetIndex widgetIndex, rct_drawpixelinfo& dpi) override + void OnDrawWidget(WidgetIndex widgetIndex, DrawPixelInfo& dpi) override { const auto& widget = widgets[widgetIndex]; const auto& info = GetInfo(this); @@ -552,8 +552,8 @@ namespace OpenRCT2::Ui::Windows auto& onDraw = widgetDesc->OnDraw; if (onDraw.is_function()) { - rct_drawpixelinfo widgetDpi; - if (clip_drawpixelinfo( + DrawPixelInfo widgetDpi; + if (ClipDrawPixelInfo( &widgetDpi, &dpi, { windowPos.x + widget.left, windowPos.y + widget.top }, widget.width(), widget.height())) { @@ -576,7 +576,7 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; default: { @@ -664,7 +664,7 @@ namespace OpenRCT2::Ui::Windows else if (widgetDesc->Type == "textbox") { auto* text = const_cast(widgetDesc->Text.c_str()); - window_start_textbox(*this, widgetIndex, STR_STRING, text, widgetDesc->MaxLength + 1); + WindowStartTextbox(*this, widgetIndex, STR_STRING, text, widgetDesc->MaxLength + 1); } } } @@ -746,7 +746,7 @@ namespace OpenRCT2::Ui::Windows } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { const auto& info = GetInfo(this); if (scrollIndex < static_cast(info.ListViews.size())) @@ -764,8 +764,8 @@ namespace OpenRCT2::Ui::Windows RefreshWidgets(); Invalidate(); - window_event_resize_call(this); - window_event_invalidate_call(this); + WindowEventResizeCall(this); + WindowEventInvalidateCall(this); WindowInitScrollWidgets(*this); Invalidate(); @@ -803,7 +803,7 @@ namespace OpenRCT2::Ui::Windows auto wheight = viewportWidget->height() - 1; if (viewport == nullptr) { - viewport_create(this, { left, top }, wwidth, wheight, Focus(CoordsXYZ(0, 0, 0))); + ViewportCreate(this, { left, top }, wwidth, wheight, Focus(CoordsXYZ(0, 0, 0))); flags |= WF_NO_SCROLLING; Invalidate(); } @@ -847,7 +847,7 @@ namespace OpenRCT2::Ui::Windows } } - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { const auto& customInfo = GetInfo(this); const auto& tabs = customInfo.Desc.Tabs; @@ -866,7 +866,7 @@ namespace OpenRCT2::Ui::Windows auto imageOffset = frame % tab.imageFrameCount; image = image.WithIndex(image.GetIndex() + imageOffset); } - gfx_draw_sprite(&dpi, image, leftTop); + GfxDrawSprite(&dpi, image, leftTop); } tabIndex++; } @@ -895,14 +895,14 @@ namespace OpenRCT2::Ui::Windows } for (size_t tabDescIndex = 0; tabDescIndex < info.Desc.Tabs.size(); tabDescIndex++) { - rct_widget widget{}; + Widget widget{}; widget.type = WindowWidgetType::Tab; widget.colour = 1; widget.left = static_cast(3 + (tabDescIndex * 31)); widget.right = widget.left + 30; widget.top = 17; widget.bottom = 43; - widget.image = IMAGE_TYPE_REMAP | SPR_TAB; + widget.image = ImageId(SPR_TAB, FilterPaletteID::PaletteNull); widget.tooltip = STR_NONE; widgetList.push_back(widget); info.WidgetIndexMap.push_back(std::numeric_limits::max()); @@ -952,9 +952,9 @@ namespace OpenRCT2::Ui::Windows UpdateViewport(); } - static void CreateWidget(std::vector& widgetList, const CustomWidgetDesc& desc) + static void CreateWidget(std::vector& widgetList, const CustomWidgetDesc& desc) { - rct_widget widget{}; + Widget widget{}; widget.colour = 1; widget.left = desc.X; widget.top = desc.Y; @@ -974,7 +974,7 @@ namespace OpenRCT2::Ui::Windows if (desc.Image.HasValue()) { widget.type = desc.HasBorder ? WindowWidgetType::ImgBtn : WindowWidgetType::FlatBtn; - widget.image = desc.Image.ToUInt32(); + widget.image = desc.Image; } else { @@ -1002,7 +1002,7 @@ namespace OpenRCT2::Ui::Windows else if (desc.Type == "colourpicker") { widget.type = WindowWidgetType::ColourBtn; - widget.image = GetColourButtonImage(desc.Colour).ToUInt32(); + widget.image = GetColourButtonImage(desc.Colour); widgetList.push_back(widget); } else if (desc.Type == "custom") @@ -1114,7 +1114,7 @@ namespace OpenRCT2::Ui::Windows static rct_windownumber GetNewWindowNumber() { auto result = _nextWindowNumber++; - while (window_find_by_number(WindowClass::Custom, result) != nullptr) + while (WindowFindByNumber(WindowClass::Custom, result) != nullptr) { result++; } @@ -1124,7 +1124,7 @@ namespace OpenRCT2::Ui::Windows rct_windownumber CustomWindow::_nextWindowNumber; - rct_window* window_custom_open(std::shared_ptr owner, DukValue dukDesc) + WindowBase* WindowCustomOpen(std::shared_ptr owner, DukValue dukDesc) { auto desc = CustomWindowDesc::FromDukValue(dukDesc); uint16_t windowFlags = WF_RESIZABLE | WF_TRANSPARENT; @@ -1145,7 +1145,7 @@ namespace OpenRCT2::Ui::Windows return window; } - static CustomWindowInfo& GetInfo(rct_window* w) + static CustomWindowInfo& GetInfo(WindowBase* w) { return *(static_cast(w->custom_info)); } @@ -1163,7 +1163,7 @@ namespace OpenRCT2::Ui::Windows scriptEngine.ExecutePluginCall(owner, dukHandler, args, false); } - std::string GetWindowTitle(rct_window* w) + std::string GetWindowTitle(WindowBase* w) { if (w->custom_info != nullptr) { @@ -1173,7 +1173,7 @@ namespace OpenRCT2::Ui::Windows return {}; } - void UpdateWindowTitle(rct_window* w, std::string_view value) + void UpdateWindowTitle(WindowBase* w, std::string_view value) { if (w->custom_info != nullptr) { @@ -1182,7 +1182,7 @@ namespace OpenRCT2::Ui::Windows } } - void UpdateWindowTab(rct_window* w, int32_t tabIndex) + void UpdateWindowTab(WindowBase* w, int32_t tabIndex) { if (w->classification == WindowClass::Custom && w->custom_info != nullptr) { @@ -1194,7 +1194,7 @@ namespace OpenRCT2::Ui::Windows } } - void UpdateWidgetText(rct_window* w, WidgetIndex widgetIndex, std::string_view value) + void UpdateWidgetText(WindowBase* w, WidgetIndex widgetIndex, std::string_view value) { if (w->custom_info != nullptr) { @@ -1204,12 +1204,12 @@ namespace OpenRCT2::Ui::Windows { customWidgetInfo->Text = value; w->widgets[widgetIndex].string = customWidgetInfo->Text.data(); - widget_invalidate(*w, widgetIndex); + WidgetInvalidate(*w, widgetIndex); } } } - void UpdateWidgetItems(rct_window* w, WidgetIndex widgetIndex, const std::vector& items) + void UpdateWidgetItems(WindowBase* w, WidgetIndex widgetIndex, const std::vector& items) { if (w->custom_info != nullptr) { @@ -1223,7 +1223,7 @@ namespace OpenRCT2::Ui::Windows } } - void UpdateWidgetColour(rct_window* w, WidgetIndex widgetIndex, colour_t colour) + void UpdateWidgetColour(WindowBase* w, WidgetIndex widgetIndex, colour_t colour) { if (w->custom_info != nullptr) { @@ -1237,8 +1237,8 @@ namespace OpenRCT2::Ui::Windows if (lastColour != colour && colour < COLOUR_COUNT) { customWidgetInfo->Colour = colour; - widget.image = GetColourButtonImage(colour).ToUInt32(); - widget_invalidate(*w, widgetIndex); + widget.image = GetColourButtonImage(colour); + WidgetInvalidate(*w, widgetIndex); std::vector args; auto ctx = customWidgetInfo->OnChange.context(); @@ -1250,7 +1250,7 @@ namespace OpenRCT2::Ui::Windows } } - void UpdateWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex, int32_t selectedIndex) + void UpdateWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex, int32_t selectedIndex) { if (w->custom_info != nullptr) { @@ -1283,7 +1283,7 @@ namespace OpenRCT2::Ui::Windows } customWidgetInfo->SelectedIndex = selectedIndex; - widget_invalidate(*w, widgetIndex); + WidgetInvalidate(*w, widgetIndex); if (lastSelectedIndex != selectedIndex) { @@ -1297,7 +1297,7 @@ namespace OpenRCT2::Ui::Windows } } - std::vector GetWidgetItems(rct_window* w, WidgetIndex widgetIndex) + std::vector GetWidgetItems(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { @@ -1311,7 +1311,7 @@ namespace OpenRCT2::Ui::Windows return {}; } - colour_t GetWidgetColour(rct_window* w, WidgetIndex widgetIndex) + colour_t GetWidgetColour(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { @@ -1325,7 +1325,7 @@ namespace OpenRCT2::Ui::Windows return COLOUR_BLACK; } - int32_t GetWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex) + int32_t GetWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { @@ -1339,7 +1339,7 @@ namespace OpenRCT2::Ui::Windows return -1; } - rct_window* FindCustomWindowByClassification(std::string_view classification) + WindowBase* FindCustomWindowByClassification(std::string_view classification) { for (const auto& w : g_window_list) { @@ -1355,7 +1355,7 @@ namespace OpenRCT2::Ui::Windows return nullptr; } - std::optional FindWidgetIndexByName(rct_window* w, std::string_view name) + std::optional FindWidgetIndexByName(WindowBase* w, std::string_view name) { if (w->custom_info != nullptr) { @@ -1375,7 +1375,7 @@ namespace OpenRCT2::Ui::Windows return std::nullopt; } - std::string GetWidgetName(rct_window* w, WidgetIndex widgetIndex) + std::string GetWidgetName(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { @@ -1389,7 +1389,7 @@ namespace OpenRCT2::Ui::Windows return {}; } - void SetWidgetName(rct_window* w, WidgetIndex widgetIndex, std::string_view name) + void SetWidgetName(WindowBase* w, WidgetIndex widgetIndex, std::string_view name) { if (w->custom_info != nullptr) { @@ -1402,7 +1402,7 @@ namespace OpenRCT2::Ui::Windows } } - std::string GetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex) + std::string GetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { @@ -1416,7 +1416,7 @@ namespace OpenRCT2::Ui::Windows return {}; } - void SetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex, std::string_view tooltip) + void SetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex, std::string_view tooltip) { if (w->custom_info != nullptr) { @@ -1429,12 +1429,12 @@ namespace OpenRCT2::Ui::Windows } } - CustomListView* GetCustomListView(rct_window* w, WidgetIndex widgetIndex) + CustomListView* GetCustomListView(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { auto& info = GetInfo(w); - auto scrollIndex = window_get_scroll_data_index(*w, widgetIndex); + auto scrollIndex = WindowGetScrollDataIndex(*w, widgetIndex); if (scrollIndex < static_cast(info.ListViews.size())) { return &info.ListViews[scrollIndex]; @@ -1443,7 +1443,7 @@ namespace OpenRCT2::Ui::Windows return nullptr; } - int32_t GetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex) + int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex) { if (w->custom_info != nullptr) { @@ -1457,7 +1457,7 @@ namespace OpenRCT2::Ui::Windows return 0; } - void SetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex, int32_t value) + void SetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex, int32_t value) { if (w->custom_info != nullptr) { @@ -1473,7 +1473,7 @@ namespace OpenRCT2::Ui::Windows void CloseWindowsOwnedByPlugin(std::shared_ptr plugin) { // Get all the windows that need closing - std::vector> customWindows; + std::vector> customWindows; for (const auto& window : g_window_list) { if (window->classification == WindowClass::Custom) @@ -1489,7 +1489,7 @@ namespace OpenRCT2::Ui::Windows for (auto& window : customWindows) { - window_close(*window.get()); + WindowClose(*window.get()); } } diff --git a/src/openrct2-ui/scripting/CustomWindow.h b/src/openrct2-ui/scripting/CustomWindow.h index 00ed2d7099..c0e40b5f98 100644 --- a/src/openrct2-ui/scripting/CustomWindow.h +++ b/src/openrct2-ui/scripting/CustomWindow.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,25 +21,25 @@ namespace OpenRCT2::Ui::Windows { class CustomListView; - std::string GetWindowTitle(rct_window* w); - void UpdateWindowTitle(rct_window* w, std::string_view value); - void UpdateWindowTab(rct_window* w, int32_t tabIndex); - void UpdateWidgetText(rct_window* w, WidgetIndex widget, std::string_view string_view); - void UpdateWidgetItems(rct_window* w, WidgetIndex widgetIndex, const std::vector& items); - void UpdateWidgetColour(rct_window* w, WidgetIndex widgetIndex, colour_t colour); - void UpdateWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex, int32_t selectedIndex); - std::vector GetWidgetItems(rct_window* w, WidgetIndex widgetIndex); - colour_t GetWidgetColour(rct_window* w, WidgetIndex widgetIndex); - int32_t GetWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex); - rct_window* FindCustomWindowByClassification(std::string_view classification); - std::optional FindWidgetIndexByName(rct_window* w, std::string_view name); - std::string GetWidgetName(rct_window* w, WidgetIndex widgetIndex); - void SetWidgetName(rct_window* w, WidgetIndex widgetIndex, std::string_view name); - std::string GetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex); - void SetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex, std::string_view tooltip); - CustomListView* GetCustomListView(rct_window* w, WidgetIndex widgetIndex); - int32_t GetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex); - void SetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex, int32_t value); + std::string GetWindowTitle(WindowBase* w); + void UpdateWindowTitle(WindowBase* w, std::string_view value); + void UpdateWindowTab(WindowBase* w, int32_t tabIndex); + void UpdateWidgetText(WindowBase* w, WidgetIndex widget, std::string_view string_view); + void UpdateWidgetItems(WindowBase* w, WidgetIndex widgetIndex, const std::vector& items); + void UpdateWidgetColour(WindowBase* w, WidgetIndex widgetIndex, colour_t colour); + void UpdateWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex, int32_t selectedIndex); + std::vector GetWidgetItems(WindowBase* w, WidgetIndex widgetIndex); + colour_t GetWidgetColour(WindowBase* w, WidgetIndex widgetIndex); + int32_t GetWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex); + WindowBase* FindCustomWindowByClassification(std::string_view classification); + std::optional FindWidgetIndexByName(WindowBase* w, std::string_view name); + std::string GetWidgetName(WindowBase* w, WidgetIndex widgetIndex); + void SetWidgetName(WindowBase* w, WidgetIndex widgetIndex, std::string_view name); + std::string GetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex); + void SetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex, std::string_view tooltip); + CustomListView* GetCustomListView(WindowBase* w, WidgetIndex widgetIndex); + int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex); + void SetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex, int32_t value); void CloseWindowsOwnedByPlugin(std::shared_ptr plugin); } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/scripting/ScGraphicsContext.hpp b/src/openrct2-ui/scripting/ScGraphicsContext.hpp index a8bb99c7c6..5f6d411810 100644 --- a/src/openrct2-ui/scripting/ScGraphicsContext.hpp +++ b/src/openrct2-ui/scripting/ScGraphicsContext.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ namespace OpenRCT2::Scripting { private: duk_context* _ctx{}; - rct_drawpixelinfo _dpi{}; + DrawPixelInfo _dpi{}; std::optional _colour{}; std::optional _secondaryColour{}; @@ -32,7 +32,7 @@ namespace OpenRCT2::Scripting uint8_t _fill{}; public: - ScGraphicsContext(duk_context* ctx, const rct_drawpixelinfo& dpi) + ScGraphicsContext(duk_context* ctx, const DrawPixelInfo& dpi) : _ctx(ctx) , _dpi(dpi) { @@ -156,32 +156,32 @@ namespace OpenRCT2::Scripting DukValue measureText(const std::string& text) { - auto width = gfx_get_string_width(text, FontStyle::Medium); - auto height = string_get_height_raw(text.c_str(), FontStyle::Medium); + auto width = GfxGetStringWidth(text, FontStyle::Medium); + auto height = StringGetHeightRaw(text.c_str(), FontStyle::Medium); return ToDuk(_ctx, { width, height }); } void box(int32_t x, int32_t y, int32_t width, int32_t height) { - gfx_fill_rect_inset(&_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) { - gfx_fill_rect_inset( + GfxFillRectInset( &_dpi, { x, y, x + width - 1, y + height - 1 }, _colour.value_or(0), INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN); } void clear() { - gfx_clear(&_dpi, _fill); + GfxClear(&_dpi, _fill); } void clip(int32_t x, int32_t y, int32_t width, int32_t height) { - rct_drawpixelinfo newDpi; - clip_drawpixelinfo(&newDpi, &_dpi, { x, y }, width, height); + DrawPixelInfo newDpi; + ClipDrawPixelInfo(&newDpi, &_dpi, { x, y }, width, height); _dpi = newDpi; } @@ -205,12 +205,12 @@ namespace OpenRCT2::Scripting } } - gfx_draw_sprite(&_dpi, img.WithTertiary(_tertiaryColour.value_or(0)), { x, y }); + GfxDrawSprite(&_dpi, img.WithTertiary(_tertiaryColour.value_or(0)), { x, y }); } void line(int32_t x1, int32_t y1, int32_t x2, int32_t y2) { - gfx_draw_line(&_dpi, { { x1, y1 }, { x2, y2 } }, _stroke); + GfxDrawLine(&_dpi, { { x1, y1 }, { x2, y2 } }, _stroke); } void rect(int32_t x, int32_t y, int32_t width, int32_t height) @@ -229,13 +229,13 @@ namespace OpenRCT2::Scripting } if (_fill != 0) { - gfx_fill_rect(&_dpi, { x, y, x + width - 1, y + height - 1 }, _fill); + GfxFillRect(&_dpi, { x, y, x + width - 1, y + height - 1 }, _fill); } } void text(const std::string& text, int32_t x, int32_t y) { - gfx_draw_string(&_dpi, { x, y }, text.c_str(), { _colour.value_or(0) }); + GfxDrawString(_dpi, { x, y }, text.c_str(), { _colour.value_or(0) }); } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2-ui/scripting/ScImageManager.hpp b/src/openrct2-ui/scripting/ScImageManager.hpp index 11cf87e4c3..ff9adcaa24 100644 --- a/src/openrct2-ui/scripting/ScImageManager.hpp +++ b/src/openrct2-ui/scripting/ScImageManager.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/scripting/ScTileSelection.hpp b/src/openrct2-ui/scripting/ScTileSelection.hpp index 526f7ca389..1fd05fa399 100644 --- a/src/openrct2-ui/scripting/ScTileSelection.hpp +++ b/src/openrct2-ui/scripting/ScTileSelection.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/scripting/ScTitleSequence.hpp b/src/openrct2-ui/scripting/ScTitleSequence.hpp index 1e9ca8e90c..d6dfd60c22 100644 --- a/src/openrct2-ui/scripting/ScTitleSequence.hpp +++ b/src/openrct2-ui/scripting/ScTitleSequence.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -265,9 +265,9 @@ namespace OpenRCT2::Scripting } if (isScenario) - scenario_begin(); + ScenarioBegin(); else - game_load_init(); + GameLoadInit(); gLoadKeepWindowsOpen = old; } catch (const std::exception&) @@ -446,7 +446,7 @@ namespace OpenRCT2::Scripting bool isPlaying_get() const { auto index = GetManagerIndex(); - return index && title_is_previewing_sequence() && *index == title_get_current_sequence(); + return index && TitleIsPreviewingSequence() && *index == TitleGetCurrentSequence(); } DukValue position_get() const @@ -454,7 +454,7 @@ namespace OpenRCT2::Scripting auto ctx = GetContext()->GetScriptEngine().GetContext(); if (isPlaying_get()) { - auto* player = static_cast(title_get_sequence_player()); + auto* player = static_cast(TitleGetSequencePlayer()); if (player != nullptr) { return ToDuk(ctx, player->GetCurrentPosition()); @@ -467,9 +467,9 @@ namespace OpenRCT2::Scripting { auto ctx = GetContext()->GetScriptEngine().GetContext(); auto index = GetManagerIndex(); - if (index && (!title_is_previewing_sequence() || *index != title_get_current_sequence())) + if (index && (!TitleIsPreviewingSequence() || *index != TitleGetCurrentSequence())) { - if (!title_preview_sequence(*index)) + if (!TitlePreviewSequence(*index)) { duk_error(ctx, DUK_ERR_ERROR, "Failed to load title sequence"); } @@ -485,7 +485,7 @@ namespace OpenRCT2::Scripting auto ctx = GetContext()->GetScriptEngine().GetContext(); if (isPlaying_get()) { - auto* player = static_cast(title_get_sequence_player()); + auto* player = static_cast(TitleGetSequencePlayer()); try { player->Seek(position); @@ -502,7 +502,7 @@ namespace OpenRCT2::Scripting { if (isPlaying_get()) { - title_stop_previewing_sequence(); + TitleStopPreviewingSequence(); } } diff --git a/src/openrct2-ui/scripting/ScUi.hpp b/src/openrct2-ui/scripting/ScUi.hpp index 8f1feb143a..fd5373841d 100644 --- a/src/openrct2-ui/scripting/ScUi.hpp +++ b/src/openrct2-ui/scripting/ScUi.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ namespace OpenRCT2::Scripting namespace OpenRCT2::Ui::Windows { - rct_window* window_custom_open(std::shared_ptr owner, DukValue dukDesc); + WindowBase* WindowCustomOpen(std::shared_ptr owner, DukValue dukDesc); } namespace OpenRCT2::Scripting @@ -110,7 +110,7 @@ namespace OpenRCT2::Scripting void cancel() { - tool_cancel(); + ToolCancel(); } }; @@ -151,7 +151,7 @@ namespace OpenRCT2::Scripting std::shared_ptr tool_get() const { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { return std::make_shared(_scriptEngine.GetContext()); } @@ -173,7 +173,7 @@ namespace OpenRCT2::Scripting owner->ThrowIfStopping(); std::shared_ptr scWindow = nullptr; - auto w = window_custom_open(owner, desc); + auto w = WindowCustomOpen(owner, desc); if (w != nullptr) { scWindow = std::make_shared(w); @@ -188,18 +188,18 @@ namespace OpenRCT2::Scripting { if (id.type() == DukValue::Type::NUMBER) { - window_close_by_number(cls, id.as_int()); + WindowCloseByNumber(cls, id.as_int()); } else { - window_close_by_class(cls); + WindowCloseByClass(cls); } } } void closeAllWindows() { - window_close_all(); + WindowCloseAll(); } std::shared_ptr getWindow(DukValue a) const @@ -406,14 +406,14 @@ namespace OpenRCT2::Scripting auto entry = scenarioRepo->GetByPath(std::string(path).c_str()); if (entry != nullptr) { - obj.Set("id", entry->sc_id); - obj.Set("category", ToDuk(ctx, static_cast(entry->category))); - obj.Set("sourceGame", ToDuk(ctx, entry->source_game)); - obj.Set("internalName", entry->internal_name); - obj.Set("name", entry->name); - obj.Set("details", entry->details); + obj.Set("id", entry->ScenarioId); + obj.Set("category", ToDuk(ctx, static_cast(entry->Category))); + obj.Set("sourceGame", ToDuk(ctx, entry->SourceGame)); + obj.Set("internalName", entry->InternalName); + obj.Set("name", entry->Name); + obj.Set("details", entry->Details); - auto* highscore = entry->highscore; + auto* highscore = entry->Highscore; if (highscore == nullptr) { obj.Set("highscore", nullptr); diff --git a/src/openrct2-ui/scripting/ScViewport.hpp b/src/openrct2-ui/scripting/ScViewport.hpp index 09e913c5c6..f290176a1b 100644 --- a/src/openrct2-ui/scripting/ScViewport.hpp +++ b/src/openrct2-ui/scripting/ScViewport.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -111,7 +111,7 @@ namespace OpenRCT2::Scripting int32_t rotation_get() const { - return get_current_rotation(); + return GetCurrentRotation(); } void rotation_set(int32_t value) { @@ -120,9 +120,9 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - while (get_current_rotation() != value) + while (GetCurrentRotation() != value) { - window_rotate_camera(*w, 1); + WindowRotateCamera(*w, 1); } } } @@ -143,7 +143,7 @@ namespace OpenRCT2::Scripting if (w != nullptr) { auto i8Value = static_cast(value); - window_zoom_set(*w, ZoomLevel{ i8Value }, false); + WindowZoomSet(*w, ZoomLevel{ i8Value }, false); } } @@ -179,7 +179,7 @@ namespace OpenRCT2::Scripting if (viewport != nullptr) { auto centre = viewport->viewPos + ScreenCoordsXY{ viewport->view_width / 2, viewport->view_height / 2 }; - auto coords = viewport_coord_to_map_coord(centre, 24); + auto coords = ViewportPosToMapPos(centre, 24); auto ctx = GetContext()->GetScriptEngine().GetContext(); auto obj = duk_push_object(ctx); @@ -203,7 +203,7 @@ namespace OpenRCT2::Scripting auto coords = GetCoordsFromObject(position); if (coords) { - auto screenCoords = Translate3DTo2DWithZ(get_current_rotation(), *coords); + auto screenCoords = Translate3DTo2DWithZ(GetCurrentRotation(), *coords); auto left = screenCoords.x - (viewport->view_width / 2); auto top = screenCoords.y - (viewport->view_height / 2); SetViewLeftTop(left, top); @@ -220,7 +220,7 @@ namespace OpenRCT2::Scripting auto coords = GetCoordsFromObject(position); if (coords) { - window_scroll_to_location(*w, *coords); + WindowScrollToLocation(*w, *coords); } } } @@ -242,15 +242,15 @@ namespace OpenRCT2::Scripting } private: - rct_window* GetWindow() const + WindowBase* GetWindow() const { if (_class == WindowClass::MainWindow) - return window_get_main(); + return WindowGetMain(); - return window_find_by_number(_class, _number); + return WindowFindByNumber(_class, _number); } - rct_viewport* GetViewport() const + Viewport* GetViewport() const { auto w = GetWindow(); if (w != nullptr) diff --git a/src/openrct2-ui/scripting/ScWidget.hpp b/src/openrct2-ui/scripting/ScWidget.hpp index 30f18109d7..b0dabe4cef 100644 --- a/src/openrct2-ui/scripting/ScWidget.hpp +++ b/src/openrct2-ui/scripting/ScWidget.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,7 +42,7 @@ namespace OpenRCT2::Scripting { } - static DukValue ToDukValue(duk_context* ctx, rct_window* w, WidgetIndex widgetIndex); + static DukValue ToDukValue(duk_context* ctx, WindowBase* w, WidgetIndex widgetIndex); private: std::shared_ptr window_get() const; @@ -146,19 +146,19 @@ namespace OpenRCT2::Scripting auto buttonWidget = widget + 1; buttonWidget->left += delta; buttonWidget->right += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); } else if (widget->type == WindowWidgetType::Spinner) { auto upWidget = widget + 1; upWidget->left += delta; upWidget->right += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); auto downWidget = widget + 2; downWidget->left += delta; downWidget->right += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 2); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 2); } Invalidate(); @@ -190,19 +190,19 @@ namespace OpenRCT2::Scripting auto buttonWidget = widget + 1; buttonWidget->top += delta; buttonWidget->bottom += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); } else if (widget->type == WindowWidgetType::Spinner) { auto upWidget = widget + 1; upWidget->top += delta; upWidget->bottom += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); auto downWidget = widget + 2; downWidget->top += delta; downWidget->bottom += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 2); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 2); } Invalidate(); @@ -233,19 +233,19 @@ namespace OpenRCT2::Scripting auto buttonWidget = widget + 1; buttonWidget->left += delta; buttonWidget->right += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); } else if (widget->type == WindowWidgetType::Spinner) { auto upWidget = widget + 1; upWidget->left += delta; upWidget->right += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); auto downWidget = widget + 2; downWidget->left += delta; downWidget->right += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 2); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 2); } Invalidate(); @@ -275,17 +275,17 @@ namespace OpenRCT2::Scripting { auto buttonWidget = widget + 1; buttonWidget->bottom += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); } else if (widget->type == WindowWidgetType::Spinner) { auto upWidget = widget + 1; upWidget->bottom += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 1); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 1); auto downWidget = widget + 2; downWidget->bottom += delta; - widget_invalidate_by_number(_class, _number, _widgetIndex + 2); + WidgetInvalidateByNumber(_class, _number, _widgetIndex + 2); } Invalidate(); @@ -401,15 +401,15 @@ namespace OpenRCT2::Scripting static void Register(duk_context* ctx); protected: - rct_window* GetWindow() const + WindowBase* GetWindow() const { if (_class == WindowClass::MainWindow) - return window_get_main(); + return WindowGetMain(); - return window_find_by_number(_class, _number); + return WindowFindByNumber(_class, _number); } - rct_widget* GetWidget() const + Widget* GetWidget() const { auto w = GetWindow(); if (w != nullptr) @@ -431,7 +431,7 @@ namespace OpenRCT2::Scripting void Invalidate() { - widget_invalidate_by_number(_class, _number, _widgetIndex); + WidgetInvalidateByNumber(_class, _number, _widgetIndex); } }; @@ -503,9 +503,9 @@ namespace OpenRCT2::Scripting { if (GetTargetAPIVersion() <= API_VERSION_63_G2_REORDER) { - return LegacyIconIndex(widget->image); + return LegacyIconIndex(widget->image.GetIndex()); } - return widget->image; + return widget->image.GetIndex(); } return 0; } @@ -515,7 +515,7 @@ namespace OpenRCT2::Scripting auto widget = GetWidget(); if (widget != nullptr && widget->type == WindowWidgetType::FlatBtn) { - widget->image = ImageFromDuk(value); + widget->image = ImageId(ImageFromDuk(value)); Invalidate(); } } @@ -989,7 +989,7 @@ namespace OpenRCT2::Scripting } }; - inline DukValue ScWidget::ToDukValue(duk_context* ctx, rct_window* w, WidgetIndex widgetIndex) + inline DukValue ScWidget::ToDukValue(duk_context* ctx, WindowBase* w, WidgetIndex widgetIndex) { const auto& widget = w->widgets[widgetIndex]; auto c = w->classification; diff --git a/src/openrct2-ui/scripting/ScWindow.hpp b/src/openrct2-ui/scripting/ScWindow.hpp index 5a92ec4bfc..7c1aa37fc7 100644 --- a/src/openrct2-ui/scripting/ScWindow.hpp +++ b/src/openrct2-ui/scripting/ScWindow.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,7 +30,7 @@ namespace OpenRCT2::Scripting rct_windownumber _number; public: - ScWindow(rct_window* w) + ScWindow(WindowBase* w) : ScWindow(w->classification, w->number) { } @@ -65,7 +65,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_set_position(*w, { value, w->windowPos.y }); + WindowSetPosition(*w, { value, w->windowPos.y }); } } int32_t y_get() const @@ -82,7 +82,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_set_position(*w, { w->windowPos.x, value }); + WindowSetPosition(*w, { w->windowPos.x, value }); } } int32_t width_get() const @@ -99,13 +99,13 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - if (window_can_resize(*w)) + if (WindowCanResize(*w)) { - window_resize(*w, value - w->width, 0); + WindowResize(*w, value - w->width, 0); } else { - window_set_resize(*w, value, w->min_height, value, w->max_height); + WindowSetResize(*w, value, w->min_height, value, w->max_height); } } } @@ -123,13 +123,13 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - if (window_can_resize(*w)) + if (WindowCanResize(*w)) { - window_resize(*w, 0, value - w->height); + WindowResize(*w, 0, value - w->height); } else { - window_set_resize(*w, w->min_width, value, w->max_width, value); + WindowSetResize(*w, w->min_width, value, w->max_width, value); } } } @@ -147,7 +147,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_set_resize(*w, value, w->min_height, w->max_width, w->max_height); + WindowSetResize(*w, value, w->min_height, w->max_width, w->max_height); } } int32_t maxWidth_get() const @@ -164,7 +164,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_set_resize(*w, w->min_width, w->min_height, value, w->max_height); + WindowSetResize(*w, w->min_width, w->min_height, value, w->max_height); } } int32_t minHeight_get() const @@ -181,7 +181,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_set_resize(*w, w->min_width, value, w->max_width, w->max_height); + WindowSetResize(*w, w->min_width, value, w->max_width, w->max_height); } } int32_t maxHeight_get() const @@ -198,7 +198,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_set_resize(*w, w->min_width, w->min_height, w->max_width, value); + WindowSetResize(*w, w->min_width, w->min_height, w->max_width, value); } } bool isSticky_get() const @@ -305,7 +305,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_close(*w); + WindowClose(*w); } } @@ -329,7 +329,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - window_bring_to_front(*w); + WindowBringToFront(*w); w->flags |= WF_WHITE_BORDER_MASK; } } @@ -358,9 +358,9 @@ namespace OpenRCT2::Scripting } private: - rct_window* GetWindow() const + WindowBase* GetWindow() const { - return window_find_by_number(_class, _number); + return WindowFindByNumber(_class, _number); } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2-ui/scripting/UiExtensions.cpp b/src/openrct2-ui/scripting/UiExtensions.cpp index 2abc70a764..528e612c92 100644 --- a/src/openrct2-ui/scripting/UiExtensions.cpp +++ b/src/openrct2-ui/scripting/UiExtensions.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/scripting/UiExtensions.h b/src/openrct2-ui/scripting/UiExtensions.h index bdde29257f..5265671260 100644 --- a/src/openrct2-ui/scripting/UiExtensions.h +++ b/src/openrct2-ui/scripting/UiExtensions.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/title/TitleSequencePlayer.cpp b/src/openrct2-ui/title/TitleSequencePlayer.cpp index fc1421c8a2..c4a336bdb6 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.cpp +++ b/src/openrct2-ui/title/TitleSequencePlayer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -132,7 +132,7 @@ namespace OpenRCT2::Title auto parkHandle = TitleSequenceGetParkHandle(*_sequence, saveIndex); if (parkHandle != nullptr) { - game_notify_map_change(); + GameNotifyMapChange(); loadSuccess = LoadParkFromStream(parkHandle->Stream.get(), parkHandle->HintPath); } if (!loadSuccess) @@ -146,7 +146,7 @@ namespace OpenRCT2::Title throw std::out_of_range("Failed to load park; index out of range."); } - game_notify_map_changed(); + GameNotifyMapChanged(); } else if (std::holds_alternative(currentCommand)) { @@ -155,8 +155,8 @@ namespace OpenRCT2::Title auto scenario = GetScenarioRepository()->GetByInternalName(scenarioName); if (scenario != nullptr) { - game_notify_map_change(); - loadSuccess = LoadParkFromFile(scenario->path); + GameNotifyMapChange(); + loadSuccess = LoadParkFromFile(scenario->Path); } if (!loadSuccess) @@ -165,7 +165,7 @@ namespace OpenRCT2::Title throw std::domain_error(message); } - game_notify_map_changed(); + GameNotifyMapChanged(); } IncrementPosition(); @@ -279,9 +279,9 @@ namespace OpenRCT2::Title return _position != entryPosition; } - bool LoadParkFromFile(const utf8* path) + bool LoadParkFromFile(const u8string& path) { - log_verbose("TitleSequencePlayer::LoadParkFromFile(%s)", path); + LOG_VERBOSE("TitleSequencePlayer::LoadParkFromFile(%s)", path.c_str()); bool success = false; try { @@ -306,7 +306,7 @@ namespace OpenRCT2::Title } catch (const std::exception&) { - Console::Error::WriteLine("Unable to load park: %s", path); + Console::Error::WriteLine("Unable to load park: %s", path.c_str()); } gLoadKeepWindowsOpen = false; return success; @@ -318,7 +318,7 @@ namespace OpenRCT2::Title */ bool LoadParkFromStream(OpenRCT2::IStream* stream, const std::string& hintPath) { - log_verbose("TitleSequencePlayer::LoadParkFromStream(%s)", hintPath.c_str()); + LOG_VERBOSE("TitleSequencePlayer::LoadParkFromStream(%s)", hintPath.c_str()); bool success = false; try { @@ -352,26 +352,26 @@ namespace OpenRCT2::Title void CloseParkSpecificWindows() { - window_close_by_class(WindowClass::ConstructRide); - window_close_by_class(WindowClass::DemolishRidePrompt); - window_close_by_class(WindowClass::EditorInventionListDrag); - window_close_by_class(WindowClass::EditorInventionList); - window_close_by_class(WindowClass::EditorObjectSelection); - window_close_by_class(WindowClass::EditorObjectiveOptions); - window_close_by_class(WindowClass::EditorScenarioOptions); - window_close_by_class(WindowClass::Finances); - window_close_by_class(WindowClass::FirePrompt); - window_close_by_class(WindowClass::GuestList); - window_close_by_class(WindowClass::InstallTrack); - window_close_by_class(WindowClass::Peep); - window_close_by_class(WindowClass::Ride); - window_close_by_class(WindowClass::RideConstruction); - window_close_by_class(WindowClass::RideList); - window_close_by_class(WindowClass::Scenery); - window_close_by_class(WindowClass::Staff); - window_close_by_class(WindowClass::TrackDeletePrompt); - window_close_by_class(WindowClass::TrackDesignList); - window_close_by_class(WindowClass::TrackDesignPlace); + WindowCloseByClass(WindowClass::ConstructRide); + WindowCloseByClass(WindowClass::DemolishRidePrompt); + WindowCloseByClass(WindowClass::EditorInventionListDrag); + WindowCloseByClass(WindowClass::EditorInventionList); + WindowCloseByClass(WindowClass::EditorObjectSelection); + WindowCloseByClass(WindowClass::EditorObjectiveOptions); + WindowCloseByClass(WindowClass::EditorScenarioOptions); + WindowCloseByClass(WindowClass::Finances); + WindowCloseByClass(WindowClass::FirePrompt); + WindowCloseByClass(WindowClass::GuestList); + WindowCloseByClass(WindowClass::InstallTrack); + WindowCloseByClass(WindowClass::Peep); + WindowCloseByClass(WindowClass::Ride); + WindowCloseByClass(WindowClass::RideConstruction); + WindowCloseByClass(WindowClass::RideList); + WindowCloseByClass(WindowClass::Scenery); + WindowCloseByClass(WindowClass::Staff); + WindowCloseByClass(WindowClass::TrackDeletePrompt); + WindowCloseByClass(WindowClass::TrackDesignList); + WindowCloseByClass(WindowClass::TrackDesignPlace); } void PrepareParkForPlayback() @@ -379,12 +379,12 @@ namespace OpenRCT2::Title auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); windowManager->SetMainView(gSavedView, gSavedViewZoom, gSavedViewRotation); ResetEntitySpatialIndices(); - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES); ContextBroadcastIntent(&intent); ScenerySetDefaultPlacementConfiguration(); News::InitQueue(); - load_palette(); + LoadPalette(); gScreenAge = 0; gGamePaused = false; gGameSpeed = 1; @@ -392,7 +392,7 @@ namespace OpenRCT2::Title void StoreCurrentViewLocation() { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr && w->viewport_smart_follow_sprite.IsNull()) { _previousWindowWidth = w->width; @@ -406,7 +406,7 @@ namespace OpenRCT2::Title */ void RestoreViewLocationIfResized() { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr && w->viewport_smart_follow_sprite.IsNull()) { if (w->width != _previousWindowWidth || w->height != _previousWindowHeight) diff --git a/src/openrct2-ui/title/TitleSequencePlayer.h b/src/openrct2-ui/title/TitleSequencePlayer.h index db36355e63..3bfa8072d1 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.h +++ b/src/openrct2-ui/title/TitleSequencePlayer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index 3109c53c91..6013a4938d 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ using namespace OpenRCT2; static constexpr const int32_t WW = 400; -static constexpr const int32_t WH = 352; +static constexpr const int32_t WH = 400; static constexpr const StringId WINDOW_TITLE = STR_ABOUT; static constexpr const int32_t TABHEIGHT = 50; @@ -53,34 +53,40 @@ enum WindowAboutWidgetIdx { WIDX_JOIN_DISCORD, WIDX_CONTRIBUTORS, WIDX_COPYRIGHT, + WIDX_SPECIAL_THANKS, + WIDX_COMPANY_NAMES, + WIDX_CONTRIBUTORS_BUTTON, }; #define WIDGETS_MAIN \ WINDOW_SHIM(WINDOW_TITLE, WW, WH), \ MakeWidget ({ 0, TABHEIGHT}, {WW, WH - TABHEIGHT}, WindowWidgetType::Frame, WindowColour::Secondary ), /* page background */ \ MakeRemapWidget({ 3, 17}, {91, TABHEIGHT - 16}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB_LARGE), /* about OpenRCT2 button */ \ - MakeRemapWidget({94, 17}, {91, TABHEIGHT - 16}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB_LARGE) /* about RCT2 button */ + MakeRemapWidget({94, 17}, {91, TABHEIGHT - 16}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB_LARGE) /* about RCT2 button */ \ -static rct_widget _windowAboutOpenRCT2Widgets[] = { +static Widget _windowAboutOpenRCT2Widgets[] = { WIDGETS_MAIN, MakeWidget({10, 60}, {WW - 20, 20}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION), // Introduction MakeWidget({30, 90}, {128, 128}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_NONE), // OpenRCT2 Logo MakeWidget({168, 100}, {173, 24}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_NONE), // Build version - MakeWidget({344, 100 }, {24, 24}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_COPY, STR_COPY_BUILD_HASH ), // "Copy build info" button - MakeWidget({168, 115 + 24}, {200, 14}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_UPDATE_AVAILABLE ), // "new version" button - MakeWidget({168, 115 + 48}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGELOG_ELLIPSIS), // changelog button - MakeWidget({168, 115 + 72}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_JOIN_DISCORD ), // "join discord" button - MakeWidget({10, 250}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION_2), // Contributors + MakeWidget({344, 100 }, {24, 24}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_COPY), STR_COPY_BUILD_HASH ), // "Copy build info" button + MakeWidget({168, 115 + 20}, {200, 14}, WindowWidgetType::Placeholder, WindowColour::Secondary, STR_UPDATE_AVAILABLE ), // "new version" button + MakeWidget({168, 115 + 40}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGELOG_ELLIPSIS), // changelog button + MakeWidget({168, 115 + 60}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_JOIN_DISCORD ), // "join discord" button + MakeWidget({10, 250}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION_2), // More info MakeWidget({10, 300}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION_3), // Copyright + MakeWidget({10, 350}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_SPECIAL_THANKS_1), // Special Thanks + MakeWidget({10, 375}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_SPECIAL_THANKS_2), // Company names + MakeWidget({168, 115 + 80}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CONTRIBUTORS_WINDOW_BUTTON), // "contributors" button WIDGETS_END, }; -static rct_widget _windowAboutRCT2Widgets[] = { +static Widget _windowAboutRCT2Widgets[] = { WIDGETS_MAIN, WIDGETS_END, }; -static rct_widget *_windowAboutPageWidgets[] = { +static Widget *_windowAboutPageWidgets[] = { _windowAboutOpenRCT2Widgets, _windowAboutRCT2Widgets, }; @@ -121,10 +127,13 @@ public: case WIDX_COPY_BUILD_INFO: SDL_SetClipboardText(gVersionInfoFull); break; + case WIDX_CONTRIBUTORS_BUTTON: + ContextOpenWindowView(WV_CONTRIBUTORS); + break; } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -140,13 +149,13 @@ public: auto ft = Formatter(); ft.Add(STR_TITLE_SEQUENCE_OPENRCT2); DrawTextWrapped( - &dpi, aboutOpenRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::CENTRE }); + dpi, aboutOpenRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::CENTRE }); } { auto ft = Formatter(); ft.Add(STR_TITLE_SEQUENCE_RCT2); DrawTextWrapped( - &dpi, aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::CENTRE }); + dpi, aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::CENTRE }); } if (page == WINDOW_ABOUT_PAGE_OPENRCT2) @@ -170,7 +179,16 @@ private: pressed_widgets = 0; widgets = _windowAboutPageWidgets[p]; - pressed_widgets |= (p == WINDOW_ABOUT_PAGE_RCT2) ? (1uLL << WIDX_TAB_ABOUT_RCT2) : (1uLL << WIDX_TAB_ABOUT_OPENRCT2); + switch (p) + { + case WINDOW_ABOUT_PAGE_OPENRCT2: + pressed_widgets |= (1uLL << WIDX_TAB_ABOUT_OPENRCT2); + break; + case WINDOW_ABOUT_PAGE_RCT2: + pressed_widgets |= (1uLL << WIDX_TAB_ABOUT_RCT2); + break; + } + WindowInitScrollWidgets(*this); Invalidate(); } @@ -178,25 +196,25 @@ private: /** * @brief Draw OpenRCT2 info on open tab */ - void DrawOpenRCT2Info(rct_drawpixelinfo& dpi) + void DrawOpenRCT2Info(DrawPixelInfo& dpi) { // Draw logo on placeholder widget ScreenCoordsXY logoCoords = windowPos + ScreenCoordsXY(widgets[WIDX_OPENRCT2_LOGO].left, widgets[WIDX_OPENRCT2_LOGO].top); - gfx_draw_sprite(&dpi, ImageId(SPR_G2_LOGO), logoCoords); + GfxDrawSprite(&dpi, ImageId(SPR_G2_LOGO), logoCoords); // Version info utf8 buffer[256]; utf8* ch = buffer; - openrct2_write_full_version_info(ch, sizeof(buffer) - (ch - buffer)); + OpenRCT2WriteFullVersionInfo(ch, sizeof(buffer) - (ch - buffer)); auto ft = Formatter(); ft.Add(buffer); auto const& versionPlaceholder = widgets[WIDX_VERSION]; auto versionPlaceHolderWidth = versionPlaceholder.right - versionPlaceholder.left; auto centreX = versionPlaceholder.left + versionPlaceHolderWidth / 2; - auto centreY = (versionPlaceholder.top + versionPlaceholder.bottom - font_get_line_height(FontStyle::Medium)) / 2; + auto centreY = (versionPlaceholder.top + versionPlaceholder.bottom - FontGetLineHeight(FontStyle::Medium)) / 2; auto centrePos = windowPos + ScreenCoordsXY(centreX, centreY); - DrawTextWrapped(&dpi, centrePos, versionPlaceHolderWidth, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); + DrawTextWrapped(dpi, centrePos, versionPlaceHolderWidth, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); // Shows the update available button if (OpenRCT2::GetContext()->HasNewVersionInfo()) @@ -209,35 +227,35 @@ private: /** * @brief Draw RCT2 info on open tab */ - void DrawRCT2Info(rct_drawpixelinfo& dpi) + void DrawRCT2Info(DrawPixelInfo& dpi) { int32_t yPage = windowPos.y + widgets[WIDX_PAGE_BACKGROUND].top + 5; auto screenCoords = ScreenCoordsXY{ windowPos.x + 200, yPage + 5 }; - int32_t lineHeight = font_get_line_height(FontStyle::Medium); + int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); // Credits - DrawTextBasic(&dpi, screenCoords, STR_COPYRIGHT_CS, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_COPYRIGHT_CS, {}, { TextAlignment::CENTRE }); screenCoords.y += lineHeight + 74; - DrawTextBasic(&dpi, screenCoords, STR_DESIGNED_AND_PROGRAMMED_BY_CS, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_DESIGNED_AND_PROGRAMMED_BY_CS, {}, { TextAlignment::CENTRE }); screenCoords.y += lineHeight; - DrawTextBasic(&dpi, screenCoords, STR_GRAPHICS_BY_SF, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_GRAPHICS_BY_SF, {}, { TextAlignment::CENTRE }); screenCoords.y += lineHeight; - DrawTextBasic(&dpi, screenCoords, STR_SOUND_AND_MUSIC_BY_AB, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_SOUND_AND_MUSIC_BY_AB, {}, { TextAlignment::CENTRE }); screenCoords.y += lineHeight; - DrawTextBasic(&dpi, screenCoords, STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE, {}, { TextAlignment::CENTRE }); screenCoords.y += lineHeight + 3; - DrawTextBasic(&dpi, screenCoords, STR_REPRESENTATION_BY_JL, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_REPRESENTATION_BY_JL, {}, { TextAlignment::CENTRE }); screenCoords.y += 2 * lineHeight + 5; - DrawTextBasic(&dpi, screenCoords, STR_THANKS_TO, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_THANKS_TO, {}, { TextAlignment::CENTRE }); screenCoords.y += lineHeight; - DrawTextBasic(&dpi, screenCoords, STR_THANKS_TO_PEOPLE, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_THANKS_TO_PEOPLE, {}, { TextAlignment::CENTRE }); screenCoords.y += 2 * lineHeight + 5; - DrawTextBasic(&dpi, screenCoords, STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC, {}, { TextAlignment::CENTRE }); // Images - gfx_draw_sprite(&dpi, ImageId(SPR_CREDITS_CHRIS_SAWYER_SMALL), { windowPos.x + 92, yPage + 24 }); + GfxDrawSprite(&dpi, ImageId(SPR_CREDITS_CHRIS_SAWYER_SMALL), { windowPos.x + 92, yPage + 24 }); // Licence } @@ -247,7 +265,7 @@ private: * * rct2: 0x0066D2AC */ -rct_window* WindowAboutOpen() +WindowBase* WindowAboutOpen() { return WindowFocusOrCreate(WindowClass::About, WW, WH, WF_CENTRE_SCREEN); } diff --git a/src/openrct2-ui/windows/AssetPacks.cpp b/src/openrct2-ui/windows/AssetPacks.cpp index f16a3c2b8a..134058a170 100644 --- a/src/openrct2-ui/windows/AssetPacks.cpp +++ b/src/openrct2-ui/windows/AssetPacks.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,14 +37,14 @@ enum WindowAssetPacksWidgetIdx { WIDX_APPLY, }; -static rct_widget WindowAssetPacksWidgets[] = { +static Widget WindowAssetPacksWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_HIGH_PRIORITY), MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_LOW_PRIORITY), - MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_ARROW_UP, STR_INCREASE_PRIOTITY_TIP), - MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_ARROW_DOWN, STR_DECREASE_PRIOTITY_TIP), - MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_RELOAD, STR_RELOAD_ASSET_PACKS_TIP), + MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_ARROW_UP), STR_INCREASE_PRIOTITY_TIP), + MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_ARROW_DOWN), STR_DECREASE_PRIOTITY_TIP), + MakeWidget({ 0, 0 }, { 0, 0 }, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_RELOAD), STR_RELOAD_ASSET_PACKS_TIP), WIDGETS_END, }; // clang-format on @@ -184,15 +184,15 @@ public: widgets[WIDX_APPLY].top = widgets[WIDX_APPLY].bottom - 24; } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; - gfx_fill_rect( + GfxFillRect( &dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); auto assetPackManager = GetContext()->GetAssetPackManager(); @@ -233,36 +233,36 @@ public: } private: - void PaintItem(rct_drawpixelinfo& dpi, int32_t y, Formatter& ft, bool isChecked, bool isSelected, bool isHighlighted) + void PaintItem(DrawPixelInfo& dpi, int32_t y, Formatter& ft, bool isChecked, bool isSelected, bool isHighlighted) { auto listWidth = dpi.width - 1; auto stringId = STR_BLACK_STRING; auto fillRectangle = ScreenRect{ { 0, y }, { listWidth, y + ItemHeight - 1 } }; if (isSelected) { - gfx_fill_rect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); + GfxFillRect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); stringId = STR_WINDOW_COLOUR_2_STRINGID; } else if (isHighlighted) { - gfx_fill_rect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); + GfxFillRect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); } - DrawTextEllipsised(&dpi, { 16, y + 1 }, listWidth, stringId, ft); + DrawTextEllipsised(dpi, { 16, y + 1 }, listWidth, stringId, ft); auto checkboxSize = ItemHeight - 3; PaintCheckbox(dpi, { { 2, y + 1 }, { 2 + checkboxSize + 1, y + 1 + checkboxSize } }, isChecked); } - void PaintCheckbox(rct_drawpixelinfo& dpi, const ScreenRect& rect, bool checked) + void PaintCheckbox(DrawPixelInfo& dpi, const ScreenRect& rect, bool checked) { - gfx_fill_rect_inset(&dpi, rect, colours[1], INSET_RECT_F_E0); + GfxFillRectInset(&dpi, rect, colours[1], INSET_RECT_F_E0); if (checked) { auto checkmark = Formatter(); checkmark.Add(STR_STRING); checkmark.Add(CheckBoxMarkString); - DrawTextBasic(&dpi, ScreenCoordsXY{ rect.GetLeft() + 1, rect.GetTop() }, STR_WINDOW_COLOUR_2_STRINGID, checkmark); + DrawTextBasic(dpi, ScreenCoordsXY{ rect.GetLeft() + 1, rect.GetTop() }, STR_WINDOW_COLOUR_2_STRINGID, checkmark); } } @@ -337,7 +337,7 @@ private: } }; -rct_window* WindowAssetPacksOpen() +WindowBase* WindowAssetPacksOpen() { auto flags = WF_AUTO_POSITION | WF_CENTRE_SCREEN; return WindowFocusOrCreate(WindowClass::AssetPacks, WW, WH, flags); diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index c88425ae82..e8b4980d82 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include #include @@ -56,12 +58,12 @@ static constexpr const StringId BannerColouredTextFormats[] = { STR_TEXT_COLOUR_PALESILVER, }; -static rct_widget window_banner_widgets[] = { +static Widget window_banner_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 3, 17}, {85, 60}, WindowWidgetType::Viewport, WindowColour::Secondary, 0x0FFFFFFFE ), // tab content panel - MakeWidget({WW - 25, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RENAME, STR_CHANGE_BANNER_TEXT_TIP ), // change banner button - MakeWidget({WW - 25, 43}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_NO_ENTRY, STR_SET_AS_NO_ENTRY_BANNER_TIP ), // no entry button - MakeWidget({WW - 25, 67}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_DEMOLISH_BANNER_TIP ), // demolish button + MakeWidget({WW - 25, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RENAME), STR_CHANGE_BANNER_TEXT_TIP ), // change banner button + MakeWidget({WW - 25, 43}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_NO_ENTRY), STR_SET_AS_NO_ENTRY_BANNER_TIP ), // no entry button + MakeWidget({WW - 25, 67}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_DEMOLISH_BANNER_TIP ), // demolish button MakeWidget({ 5, WH - 16}, {12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_MAIN_SIGN_COLOUR_TIP), // high money MakeWidget({ 43, WH - 16}, {39, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // high money MakeWidget({ 70, WH - 15}, {11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_TEXT_COLOUR_TIP ), // high money @@ -77,8 +79,8 @@ private: void CreateViewport() { - rct_widget* viewportWidget = &window_banner_widgets[WIDX_VIEWPORT]; - viewport_create( + Widget* viewportWidget = &window_banner_widgets[WIDX_VIEWPORT]; + ViewportCreate( this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, (viewportWidget->width()) - 1, (viewportWidget->height()) - 1, Focus(_bannerViewPos)); @@ -144,7 +146,7 @@ public: void OnMouseDown(WidgetIndex widgetIndex) override { - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; auto* banner = GetBanner(GetBannerIndex()); if (banner == nullptr) { @@ -206,7 +208,7 @@ public: break; case WIDX_BANNER_NO_ENTRY: { - textinput_cancel(); + TextinputCancel(); auto bannerSetStyle = BannerSetStyleAction( BannerSetStyleType::NoEntry, GetBannerIndex(), banner->flags ^ BANNER_FLAG_NO_ENTRY); GameActions::Execute(&bannerSetStyle); @@ -254,13 +256,13 @@ public: CreateViewport(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); if (viewport != nullptr) { - window_draw_viewport(&dpi, *this); + WindowDrawViewport(&dpi, *this); } } @@ -271,10 +273,10 @@ public: { return; } - rct_widget* colourBtn = &window_banner_widgets[WIDX_MAIN_COLOUR]; + Widget* colourBtn = &window_banner_widgets[WIDX_MAIN_COLOUR]; colourBtn->type = WindowWidgetType::Empty; - auto* bannerEntry = GetBannerEntry(banner->type); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); if (bannerEntry != nullptr && (bannerEntry->flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR)) { colourBtn->type = WindowWidgetType::ColourBtn; @@ -288,8 +290,8 @@ public: disabled_widgets |= (1uLL << WIDX_BANNER_TEXT) | (1uLL << WIDX_TEXT_COLOUR_DROPDOWN) | (1uLL << WIDX_TEXT_COLOUR_DROPDOWN_BUTTON); } - colourBtn->image = GetColourButtonImage(banner->colour).ToUInt32(); - rct_widget* dropDownWidget = &window_banner_widgets[WIDX_TEXT_COLOUR_DROPDOWN]; + colourBtn->image = GetColourButtonImage(banner->colour); + Widget* dropDownWidget = &window_banner_widgets[WIDX_TEXT_COLOUR_DROPDOWN]; dropDownWidget->text = BannerColouredTextFormats[banner->text_colour]; } }; @@ -298,9 +300,9 @@ public: * * rct2: 0x006BA305 */ -rct_window* WindowBannerOpen(rct_windownumber number) +WindowBase* WindowBannerOpen(rct_windownumber number) { - auto w = static_cast(window_bring_to_front_by_number(WindowClass::Banner, number)); + auto w = static_cast(WindowBringToFrontByNumber(WindowClass::Banner, number)); if (w != nullptr) return w; diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index e6db56da45..75c3a89204 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,7 @@ static constexpr const StringId WINDOW_TITLE = STR_CHANGELOG_TITLE; constexpr int32_t MIN_WW = 300; constexpr int32_t MIN_WH = 250; -static rct_widget _windowChangelogWidgets[] = { +static Widget _windowChangelogWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({0, 14}, {500, 382}, WindowWidgetType::Resize, WindowColour::Secondary ), // content panel MakeWidget({3, 16}, {495, 366}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_BOTH ), // scroll area @@ -63,9 +64,10 @@ public: /** * @brief Retrieves the changelog contents. */ - const std::string GetChangelogText() + const std::string GetText(PATHID pathId) { - auto path = GetChangelogPath(); + auto env = GetContext()->GetPlatformEnvironment(); + auto path = env->GetFilePath(pathId); auto fs = std::ifstream(fs::u8path(path), std::ios::in); if (!fs.is_open()) { @@ -94,15 +96,25 @@ public: return true; case WV_CHANGELOG: - if (!ReadChangelogFile()) + if (!ReadFile(PATHID::CHANGELOG)) { return false; } _personality = WV_CHANGELOG; + widgets[WIDX_TITLE].text = STR_CHANGELOG_TITLE; + return true; + + case WV_CONTRIBUTORS: + if (!ReadFile(PATHID::CONTRIBUTORS)) + { + return false; + } + _personality = WV_CONTRIBUTORS; + widgets[WIDX_TITLE].text = STR_CONTRIBUTORS_WINDOW; return true; default: - log_error("Invalid personality for changelog window: %d", personality); + LOG_ERROR("Invalid personality for changelog window: %d", personality); return false; } } @@ -168,15 +180,15 @@ public: } else { - log_error("Cannot open URL: NewVersionInfo for ChangelogWindow is undefined!"); + LOG_ERROR("Cannot open URL: NewVersionInfo for ChangelogWindow is undefined!"); } break; } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - const int32_t lineHeight = font_get_line_height(FontStyle::Medium); + const int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); ScreenCoordsXY screenCoords(3, 3 - lineHeight); for (const auto& line : _changelogLines) @@ -185,7 +197,7 @@ public: if (screenCoords.y + lineHeight < dpi.y || screenCoords.y >= dpi.y + dpi.height) continue; - gfx_draw_string(&dpi, screenCoords, line.c_str(), { colours[0] }); + GfxDrawString(dpi, screenCoords, line.c_str(), { colours[0] }); } } @@ -193,7 +205,7 @@ public: { return ScreenSize( _changelogLongestLineWidth + 4, - static_cast(_changelogLines.size()) * font_get_line_height(FontStyle::Medium)); + static_cast(_changelogLines.size()) * FontGetLineHeight(FontStyle::Medium)); } // TODO: This probably should be a utility function defined elsewhere for reusability @@ -223,16 +235,16 @@ private: char version_info[256]; const char* version_info_ptr = _newVersionInfo->name.c_str(); - format_string(version_info, 256, STR_NEW_RELEASE_VERSION_INFO, &version_info_ptr); + FormatStringLegacy(version_info, 256, STR_NEW_RELEASE_VERSION_INFO, &version_info_ptr); _changelogLines.emplace_back(version_info); _changelogLines.emplace_back(""); - ProcessChangelogText(_newVersionInfo->changelog); + ProcessText(_newVersionInfo->changelog); } else { - log_error("ChangelogWindow: Could not process NewVersionInfo, result was undefined"); + LOG_ERROR("ChangelogWindow: Could not process NewVersionInfo, result was undefined"); } } @@ -251,25 +263,25 @@ private: * @brief Attempts to read the changelog file, returns true on success * */ - bool ReadChangelogFile() + bool ReadFile(PATHID pathId) { - std::string _changelogText; + std::string _text; try { - _changelogText = GetChangelogText(); + _text = GetText(pathId); } catch (const std::bad_alloc&) { - log_error("Unable to allocate memory for changelog.txt"); + LOG_ERROR("Unable to allocate memory for text file"); return false; } catch (const std::exception&) { - log_error("Unable to read changelog.txt"); + LOG_ERROR("Unable to read text file"); return false; } - ProcessChangelogText(_changelogText); + ProcessText(_text); return true; } @@ -279,7 +291,7 @@ private: * * @param text */ - void ProcessChangelogText(const std::string& text) + void ProcessText(const std::string& text) { std::string::size_type pos = 0; std::string::size_type prev = 0; @@ -295,15 +307,15 @@ private: _changelogLongestLineWidth = 0; for (const auto& line : _changelogLines) { - int32_t linewidth = gfx_get_string_width(line.c_str(), FontStyle::Medium); + int32_t linewidth = GfxGetStringWidth(line.c_str(), FontStyle::Medium); _changelogLongestLineWidth = std::max(linewidth, _changelogLongestLineWidth); } } }; -rct_window* WindowChangelogOpen(int personality) +WindowBase* WindowChangelogOpen(int personality) { - auto* window = window_bring_to_front_by_class(WindowClass::Changelog); + auto* window = WindowBringToFrontByClass(WindowClass::Changelog); if (window == nullptr) { // Create a new centred window diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 8b243bde16..c050ee1fd4 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,8 +15,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -149,6 +149,8 @@ enum WindowCheatsWidgetIdx WIDX_STAFF_GROUP, WIDX_STAFF_SPEED, WIDX_STAFF_SPEED_DROPDOWN_BUTTON, + WIDX_PARK_CONSTRUCTION_GROUP, + WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, WIDX_FIX_ALL = WIDX_TAB_CONTENT, WIDX_RENEW_RIDES, @@ -198,7 +200,7 @@ static constexpr const int32_t TAB_START = 3; MakeTab ({65, 17}, STR_PARK_CHEATS_TIP ), /* tab 3 */ \ MakeTab ({96, 17}, STR_RIDE_CHEATS_TIP ) /* tab 4 */ -static rct_widget window_cheats_money_widgets[] = +static Widget window_cheats_money_widgets[] = { MAIN_CHEATS_WIDGETS, MakeWidget ({ 11, 48}, CHEAT_BUTTON, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_MAKE_PARK_NO_MONEY), // No money @@ -216,7 +218,7 @@ static rct_widget window_cheats_money_widgets[] = WIDGETS_END, }; -static rct_widget window_cheats_guests_widgets[] = +static Widget window_cheats_guests_widgets[] = { MAIN_CHEATS_WIDGETS, MakeWidget({ 5, 48}, {238, 279}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_SET_GUESTS_PARAMETERS ), // Guests parameters group frame @@ -250,7 +252,7 @@ static rct_widget window_cheats_guests_widgets[] = }; //Strings for following moved to window_cheats_paint() -static rct_widget window_cheats_misc_widgets[] = +static Widget window_cheats_misc_widgets[] = { MAIN_CHEATS_WIDGETS, MakeWidget ({ 5, 48}, {238, 60}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GENERAL_GROUP ), // General group @@ -282,9 +284,13 @@ static rct_widget window_cheats_misc_widgets[] = MakeWidget ({ 5, 347}, {238, 35}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_STAFF_GROUP ), // Staff group MakeWidget ({126, 361}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Staff speed MakeWidget ({225, 362}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), // Staff speed + + MakeWidget ({ 5, 392}, {238, 35}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_CONSTRUCTION ), // Construction group + MakeWidget ({ 11, 407}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_PATH_AS_QUEUE, STR_CHEAT_ALLOW_PATH_AS_QUEUE_TIP ), // Allow regular footpaths as queue path + WIDGETS_END, }; -static rct_widget window_cheats_rides_widgets[] = +static Widget window_cheats_rides_widgets[] = { MAIN_CHEATS_WIDGETS, MakeWidget({ 11, 48}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_FIX_ALL_RIDES, STR_CHEAT_FIX_ALL_RIDES_TIP ), // Fix all rides @@ -297,13 +303,13 @@ static rct_widget window_cheats_rides_widgets[] = MakeWidget({ 11, 153}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES, STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES_TIP ), // Show all drawable track pieces MakeWidget({ 11, 174}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK, STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK_TIP ), // Enable chain lift on all track MakeWidget({ 11, 195}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS_TIP), // Allow track place at invalid heights - MakeWidget({ 5, 221}, {238, 122}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_OPERATION ), // Construction group + MakeWidget({ 5, 221}, {238, 122}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_OPERATION ), // Operation group MakeWidget({ 11, 237}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_SHOW_ALL_OPERATING_MODES ), // Show all operating modes MakeWidget({ 11, 258}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_UNLOCK_OPERATING_LIMITS, STR_CHEAT_UNLOCK_OPERATING_LIMITS_TIP ), // 410 km/h lift hill etc. MakeWidget({ 11, 279}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_BRAKES_FAILURE, STR_CHEAT_DISABLE_BRAKES_FAILURE_TIP ), // Disable brakes failure MakeWidget({ 11, 300}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_BREAKDOWNS, STR_CHEAT_DISABLE_BREAKDOWNS_TIP ), // Disable all breakdowns MakeWidget({ 11, 321}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_RIDE_VALUE_AGING, STR_CHEAT_DISABLE_RIDE_VALUE_AGING_TIP ), // Disable ride ageing - MakeWidget({ 5, 347}, {238, 101}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_AVAILABILITY ), // Construction group + MakeWidget({ 5, 347}, {238, 101}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_AVAILABILITY ), // Availability group MakeWidget({ 11, 363}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES_TIP), // Allow arbitrary ride type changes MakeWidget({ 11, 384}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES ), // Show vehicles from other track types MakeWidget({ 11, 405}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT_TIP ), // Disable train length limits @@ -311,7 +317,7 @@ static rct_widget window_cheats_rides_widgets[] = WIDGETS_END, }; -static rct_widget *window_cheats_page_widgets[] = +static Widget *window_cheats_page_widgets[] = { window_cheats_money_widgets, window_cheats_guests_widgets, @@ -350,7 +356,7 @@ class CheatsWindow final : public Window { private: char _moneySpinnerText[MONEY_STRING_MAXLENGTH]{}; - money32 _moneySpinnerValue = CHEATS_MONEY_DEFAULT; + money64 _moneySpinnerValue = CHEATS_MONEY_DEFAULT; int32_t _selectedStaffSpeed = 1; int32_t _parkRatingSpinnerValue{}; int32_t _yearSpinnerValue = 1; @@ -475,6 +481,7 @@ public: SetCheckboxValue(WIDX_FREEZE_WEATHER, gCheatsFreezeWeather); SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gCheatsNeverendingMarketing); SetCheckboxValue(WIDX_DISABLE_PLANT_AGING, gCheatsDisablePlantAging); + SetCheckboxValue(WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, gCheatsAllowRegularPathAsQueue); break; case WINDOW_CHEATS_PAGE_RIDES: SetCheckboxValue(WIDX_UNLOCK_OPERATING_LIMITS, gCheatsUnlockOperatingLimits); @@ -506,7 +513,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { UpdateTabPositions(); DrawWidgets(dpi); @@ -525,28 +532,28 @@ public: colour |= COLOUR_FLAG_INSET; } int32_t actual_month = _monthSpinnerValue - 1; - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 93 }, STR_BOTTOM_TOOLBAR_CASH, ft, { colour }); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 198 }, STR_YEAR); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 219 }, STR_MONTH); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 240 }, STR_DAY); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 93 }, STR_BOTTOM_TOOLBAR_CASH, ft, { colour }); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 198 }, STR_YEAR); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 219 }, STR_MONTH); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 240 }, STR_DAY); ft = Formatter(); ft.Add(_yearSpinnerValue); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ _xRcol, 198 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); + dpi, windowPos + ScreenCoordsXY{ _xRcol, 198 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); ft = Formatter(); ft.Add(actual_month); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ _xRcol, 219 }, STR_FORMAT_MONTH, ft, { colours[1], TextAlignment::RIGHT }); + dpi, windowPos + ScreenCoordsXY{ _xRcol, 219 }, STR_FORMAT_MONTH, ft, { colours[1], TextAlignment::RIGHT }); ft = Formatter(); ft.Add(_daySpinnerValue); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ _xRcol, 240 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); + dpi, windowPos + ScreenCoordsXY{ _xRcol, 240 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); } else if (page == WINDOW_CHEATS_PAGE_MISC) { { auto& widget = widgets[WIDX_WEATHER]; - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHANGE_WEATHER); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHANGE_WEATHER); } { @@ -555,25 +562,24 @@ public: auto& widget = widgets[WIDX_PARK_RATING_SPINNER]; DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 2 }, STR_FORMAT_INTEGER, ft, - { colours[1] }); + dpi, windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 2 }, STR_FORMAT_INTEGER, ft, { colours[1] }); } { auto& widget = widgets[WIDX_STAFF_SPEED]; - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHEAT_STAFF_SPEED); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHEAT_STAFF_SPEED); } } else if (page == WINDOW_CHEATS_PAGE_GUESTS) { - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 72 }, STR_CHEAT_GUEST_HAPPINESS); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 93 }, STR_CHEAT_GUEST_ENERGY); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 114 }, STR_CHEAT_GUEST_HUNGER); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 135 }, STR_CHEAT_GUEST_THIRST); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 156 }, STR_CHEAT_GUEST_NAUSEA); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 177 }, STR_CHEAT_GUEST_NAUSEA_TOLERANCE); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 198 }, STR_CHEAT_GUEST_TOILET); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ _xLcol, 219 }, STR_CHEAT_GUEST_PREFERRED_INTENSITY); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 72 }, STR_CHEAT_GUEST_HAPPINESS); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 93 }, STR_CHEAT_GUEST_ENERGY); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 114 }, STR_CHEAT_GUEST_HUNGER); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 135 }, STR_CHEAT_GUEST_THIRST); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 156 }, STR_CHEAT_GUEST_NAUSEA); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 177 }, STR_CHEAT_GUEST_NAUSEA_TOLERANCE); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 198 }, STR_CHEAT_GUEST_TOILET); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ _xLcol, 219 }, STR_CHEAT_GUEST_PREFERRED_INTENSITY); } } @@ -581,8 +587,8 @@ public: { if (page == WINDOW_CHEATS_PAGE_MONEY && widgetIndex == WIDX_MONEY_SPINNER) { - auto val = string_to_money(std::string(text).c_str()); - if (val != MONEY32_UNDEFINED) + auto val = StringToMoney(std::string(text).c_str()); + if (val != MONEY64_UNDEFINED) { _moneySpinnerValue = val; } @@ -647,7 +653,7 @@ private: } } - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { // Money tab if (!IsWidgetDisabled(WIDX_TAB_1)) @@ -655,7 +661,7 @@ private: uint32_t sprite_idx = SPR_TAB_FINANCES_SUMMARY_0; if (page == WINDOW_CHEATS_PAGE_MONEY) sprite_idx += (frame_no / 2) % 8; - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_1].left, widgets[WIDX_TAB_1].top }); } @@ -665,14 +671,14 @@ private: uint32_t sprite_idx = SPR_TAB_GUESTS_0; if (page == WINDOW_CHEATS_PAGE_GUESTS) sprite_idx += (frame_no / 3) % 8; - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left, widgets[WIDX_TAB_2].top }); } // Misc tab if (!IsWidgetDisabled(WIDX_TAB_3)) { - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_TAB_PARK), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].left, widgets[WIDX_TAB_3].top }); } @@ -682,7 +688,7 @@ private: uint32_t sprite_idx = SPR_TAB_RIDE_0; if (page == WINDOW_CHEATS_PAGE_RIDES) sprite_idx += (frame_no / 4) % 16; - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_4].left, widgets[WIDX_TAB_4].top }); } } @@ -692,12 +698,12 @@ private: switch (widgetIndex) { case WIDX_MONEY_SPINNER_INCREMENT: - _moneySpinnerValue = add_clamp_money32( + _moneySpinnerValue = AddClamp_money64( CHEATS_MONEY_INCREMENT_DIV * (_moneySpinnerValue / CHEATS_MONEY_INCREMENT_DIV), CHEATS_MONEY_INCREMENT_DIV); InvalidateWidget(WIDX_MONEY_SPINNER); break; case WIDX_MONEY_SPINNER_DECREMENT: - _moneySpinnerValue = add_clamp_money32( + _moneySpinnerValue = AddClamp_money64( CHEATS_MONEY_INCREMENT_DIV * (_moneySpinnerValue / CHEATS_MONEY_INCREMENT_DIV), -CHEATS_MONEY_INCREMENT_DIV); InvalidateWidget(WIDX_MONEY_SPINNER); @@ -743,14 +749,14 @@ private: { auto setDateAction = ParkSetDateAction(_yearSpinnerValue, _monthSpinnerValue, _daySpinnerValue); GameActions::Execute(&setDateAction); - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::BottomToolbar); break; } case WIDX_DATE_RESET: { auto setDateAction = ParkSetDateAction(1, 1, 1); GameActions::Execute(&setDateAction); - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::BottomToolbar); InvalidateWidget(WIDX_YEAR_BOX); InvalidateWidget(WIDX_MONTH_BOX); InvalidateWidget(WIDX_DAY_BOX); @@ -767,7 +773,7 @@ private: CheatsSet(CheatType::NoMoney, gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : 1); break; case WIDX_MONEY_SPINNER: - money_to_string(_moneySpinnerValue, _moneySpinnerText, MONEY_STRING_MAXLENGTH, false); + MoneyToString(_moneySpinnerValue, _moneySpinnerText, MONEY_STRING_MAXLENGTH, false); WindowTextInputRawOpen( this, WIDX_MONEY_SPINNER, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneySpinnerText, MONEY_STRING_MAXLENGTH); @@ -791,8 +797,8 @@ private: InvalidateWidget(WIDX_PARK_RATING_SPINNER); if (ParkGetForcedRating() >= 0) { - auto setCheatAction = SetCheatAction(CheatType::SetForcedParkRating, _parkRatingSpinnerValue); - GameActions::Execute(&setCheatAction); + auto cheatSetAction = CheatSetAction(CheatType::SetForcedParkRating, _parkRatingSpinnerValue); + GameActions::Execute(&cheatSetAction); } break; case WIDX_DECREASE_PARK_RATING: @@ -805,7 +811,7 @@ private: break; case WIDX_WEATHER_DROPDOWN_BUTTON: { - rct_widget* dropdownWidget = widget - 1; + Widget* dropdownWidget = widget - 1; for (size_t i = 0; i < std::size(WeatherTypes); i++) { @@ -822,7 +828,7 @@ private: break; case WIDX_STAFF_SPEED_DROPDOWN_BUTTON: { - rct_widget* dropdownWidget; + Widget* dropdownWidget; dropdownWidget = widget - 1; @@ -896,6 +902,9 @@ private: CheatsSet(CheatType::SetForcedParkRating, _parkRatingSpinnerValue); } break; + case WIDX_ALLOW_REGULAR_PATH_AS_QUEUE: + CheatsSet(CheatType::AllowRegularPathAsQueue, !gCheatsAllowRegularPathAsQueue); + break; } } @@ -1101,9 +1110,9 @@ private: } }; -rct_window* WindowCheatsOpen() +WindowBase* WindowCheatsOpen() { - auto* window = window_bring_to_front_by_class(WindowClass::Cheats); + auto* window = WindowBringToFrontByClass(WindowClass::Cheats); if (window == nullptr) { window = WindowCreate(WindowClass::Cheats, ScreenCoordsXY(32, 32), WW, WH); diff --git a/src/openrct2-ui/windows/ClearScenery.cpp b/src/openrct2-ui/windows/ClearScenery.cpp index 5da7d472bd..6685b3c356 100644 --- a/src/openrct2-ui/windows/ClearScenery.cpp +++ b/src/openrct2-ui/windows/ClearScenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,7 +36,7 @@ static constexpr const int32_t WH = 94; static constexpr ScreenSize CLEAR_SCENERY_BUTTON = { 24, 24 }; -static rct_widget window_clear_scenery_widgets[] = { +static Widget window_clear_scenery_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget( { 27, 17 }, { 44, 32 }, WindowWidgetType::ImgBtn, WindowColour::Primary, SPR_LAND_TOOL_SIZE_0, STR_NONE), // preview box @@ -66,7 +66,7 @@ public: widgets = window_clear_scenery_widgets; hold_down_widgets = (1uLL << WIDX_INCREMENT) | (1uLL << WIDX_DECREMENT); WindowInitScrollWidgets(*this); - window_push_others_below(*this); + WindowPushOthersBelow(*this); gLandToolSize = 2; gClearSceneryCost = MONEY64_UNDEFINED; @@ -81,7 +81,7 @@ public: void OnClose() override { if (ClearSceneryToolIsActive()) - tool_cancel(); + ToolCancel(); } void OnMouseUp(const WidgetIndex widgetIndex) override @@ -168,10 +168,10 @@ public: | (gClearLargeScenery ? (1uLL << WIDX_LARGE_SCENERY) : 0) | (gClearFootpath ? (1uLL << WIDX_FOOTPATH) : 0); // Update the preview image (for tool sizes up to 7) - window_clear_scenery_widgets[WIDX_PREVIEW].image = LandTool::SizeToSpriteIndex(gLandToolSize); + window_clear_scenery_widgets[WIDX_PREVIEW].image = ImageId(LandTool::SizeToSpriteIndex(gLandToolSize)); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -182,7 +182,7 @@ public: { auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } // Draw cost amount @@ -192,14 +192,14 @@ public: ft.Add(gClearSceneryCost); screenCoords.x = window_clear_scenery_widgets[WIDX_PREVIEW].midX() + windowPos.x; screenCoords.y = window_clear_scenery_widgets[WIDX_PREVIEW].bottom + windowPos.y + 5 + 27; - DrawTextBasic(&dpi, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } } }; -rct_window* WindowClearSceneryOpen() +WindowBase* WindowClearSceneryOpen() { - auto* w = static_cast(window_bring_to_front_by_class(WindowClass::ClearScenery)); + auto* w = static_cast(WindowBringToFrontByClass(WindowClass::ClearScenery)); if (w != nullptr) return w; diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 4ebe20a4ca..c6c79d6317 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ enum WindowCustomCurrencyWidgetIdx { WIDX_AFFIX_DROPDOWN_BUTTON, }; -static rct_widget window_custom_currency_widgets[] = { +static Widget window_custom_currency_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeSpinnerWidgets({100, 30}, {101, 11}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_CURRENCY_FORMAT), // NB: 3 widgets MakeWidget ({120, 50}, { 81, 11}, WindowWidgetType::Button, WindowColour::Secondary, STR_EMPTY ), @@ -72,7 +72,7 @@ public: CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate += 1; gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; ConfigSaveDefault(); - window_invalidate_all(); + WindowInvalidateAll(); break; case WIDX_RATE_DOWN: if (CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate > 1) @@ -80,7 +80,7 @@ public: CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate -= 1; gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; ConfigSaveDefault(); - window_invalidate_all(); + WindowInvalidateAll(); } break; case WIDX_AFFIX_DROPDOWN_BUTTON: @@ -146,7 +146,7 @@ public: gConfigGeneral.CustomCurrencyAffix = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode; ConfigSaveDefault(); - window_invalidate_all(); + WindowInvalidateAll(); } } @@ -160,16 +160,14 @@ public: switch (widgetIndex) { case WIDX_SYMBOL_TEXT: - safe_strcpy( + SafeStrCpy( CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, std::string(text).c_str(), CURRENCY_SYMBOL_MAX_SIZE); - safe_strcpy( - gConfigGeneral.CustomCurrencySymbol, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, - CURRENCY_SYMBOL_MAX_SIZE); + gConfigGeneral.CustomCurrencySymbol = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode; ConfigSaveDefault(); - window_invalidate_all(); + WindowInvalidateAll(); break; case WIDX_RATE: @@ -180,13 +178,13 @@ public: CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = rate; gConfigGeneral.CustomCurrencyRate = CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate; ConfigSaveDefault(); - window_invalidate_all(); + WindowInvalidateAll(); } break; } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto ft = Formatter::Common(); ft.Add(10.00_GBP); @@ -195,23 +193,22 @@ public: auto screenCoords = windowPos + ScreenCoordsXY{ 10, 30 }; - DrawTextBasic(&dpi, screenCoords, STR_RATE, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_RATE, {}, { colours[1] }); int32_t baseExchange = CurrencyDescriptors[EnumValue(CurrencyType::Pounds)].rate; ft = Formatter(); ft.Add(baseExchange); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ 200, 0 }, STR_CUSTOM_CURRENCY_EQUIVALENCY, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 200, 0 }, STR_CUSTOM_CURRENCY_EQUIVALENCY, ft, { colours[1] }); screenCoords.y += 20; - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_SYMBOL_TEXT, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_SYMBOL_TEXT, {}, { colours[1] }); screenCoords = windowPos + ScreenCoordsXY{ window_custom_currency_widgets[WIDX_SYMBOL_TEXT].left + 1, window_custom_currency_widgets[WIDX_SYMBOL_TEXT].top }; - gfx_draw_string( - &dpi, screenCoords, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, { colours[1] }); + GfxDrawString(dpi, screenCoords, CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, { colours[1] }); auto drawPos = windowPos + ScreenCoordsXY{ window_custom_currency_widgets[WIDX_AFFIX_DROPDOWN].left + 1, @@ -219,11 +216,11 @@ public: StringId stringId = (CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode == CurrencyAffix::Prefix) ? STR_PREFIX : STR_SUFFIX; - DrawTextBasic(&dpi, drawPos, stringId, {}, { colours[1] }); + DrawTextBasic(dpi, drawPos, stringId, {}, { colours[1] }); } }; -rct_window* CustomCurrencyWindowOpen() +WindowBase* CustomCurrencyWindowOpen() { return WindowFocusOrCreate(WindowClass::CustomCurrencyConfig, WW, WH, WF_CENTRE_SCREEN); } diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index 3ae7a9fb02..18e134b733 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ enum WindowDebugPaintWidgetIdx constexpr int32_t WINDOW_WIDTH = 200; constexpr int32_t WINDOW_HEIGHT = 8 + 15 + 15 + 15 + 15 + 11 + 8; -static rct_widget window_debug_paint_widgets[] = { +static Widget window_debug_paint_widgets[] = { MakeWidget({0, 0}, {WINDOW_WIDTH, WINDOW_HEIGHT}, WindowWidgetType::Frame, WindowColour::Primary ), MakeWidget({8, 8 + 15 * 0}, { 185, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_DEBUG_PAINT_SHOW_WIDE_PATHS ), MakeWidget({8, 8 + 15 * 1}, { 185, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_DEBUG_PAINT_SHOW_BLOCKED_TILES ), @@ -55,7 +55,7 @@ public: widgets = window_debug_paint_widgets; InitScrollWidgets(); - window_push_others_below(*this); + WindowPushOthersBelow(*this); colours[0] = TRANSLUCENT(COLOUR_BLACK); colours[1] = COLOUR_GREY; @@ -69,27 +69,27 @@ public: { case WIDX_TOGGLE_SHOW_WIDE_PATHS: gPaintWidePathsAsGhost = !gPaintWidePathsAsGhost; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_TOGGLE_SHOW_BLOCKED_TILES: gPaintBlockedTiles = !gPaintBlockedTiles; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_TOGGLE_SHOW_SEGMENT_HEIGHTS: gShowSupportSegmentHeights = !gShowSupportSegmentHeights; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_TOGGLE_SHOW_BOUND_BOXES: gPaintBoundingBoxes = !gPaintBoundingBoxes; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_TOGGLE_SHOW_DIRTY_VISUALS: gShowDirtyVisuals = !gShowDirtyVisuals; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; } } @@ -110,7 +110,7 @@ public: const auto& stringIdx = widgets[widgetIndex].text; auto string = ls.GetString(stringIdx); Guard::ArgumentNotNull(string); - const auto strWidth = gfx_get_string_width(string, FontStyle::Medium); + const auto strWidth = GfxGetStringWidth(string, FontStyle::Medium); newWidth = std::max(strWidth, newWidth); } @@ -137,13 +137,13 @@ public: WidgetSetCheckboxValue(*this, WIDX_TOGGLE_SHOW_DIRTY_VISUALS, gShowDirtyVisuals); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } }; -rct_window* WindowDebugPaintOpen() +WindowBase* WindowDebugPaintOpen() { auto* window = WindowFocusOrCreate( WindowClass::DebugPaint, { 16, ContextGetHeight() - 16 - 33 - WINDOW_HEIGHT }, WINDOW_WIDTH, WINDOW_HEIGHT, diff --git a/src/openrct2-ui/windows/DemolishRidePrompt.cpp b/src/openrct2-ui/windows/DemolishRidePrompt.cpp index 555e6123d2..555c023d41 100644 --- a/src/openrct2-ui/windows/DemolishRidePrompt.cpp +++ b/src/openrct2-ui/windows/DemolishRidePrompt.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ enum WindowRideDemolishWidgetIdx WIDX_CANCEL }; -static rct_widget window_ride_demolish_widgets[] = +static Widget window_ride_demolish_widgets[] = { WINDOW_SHIM_WHITE(STR_DEMOLISH_RIDE, WW, WH), MakeWidget({ 10, WH - 22}, {85, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_DEMOLISH ), @@ -42,13 +42,13 @@ static rct_widget window_ride_demolish_widgets[] = class DemolishRidePromptWindow final : public Window { - money32 _demolishRideCost; + money64 _demolishRideCost; public: - void SetRide(Ride* currentRide) + void SetRide(const Ride& currentRide) { - rideId = currentRide->id; - _demolishRideCost = -ride_get_refund_price(currentRide); + rideId = currentRide.id; + _demolishRideCost = -RideGetRefundPrice(currentRide); } void OnOpen() override @@ -74,11 +74,11 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); - auto currentRide = get_ride(rideId); + auto currentRide = GetRide(rideId); if (currentRide != nullptr) { auto stringId = (gParkFlags & PARK_FLAGS_NO_MONEY) ? STR_DEMOLISH_RIDE_ID : STR_DEMOLISH_RIDE_ID_MONEY; @@ -87,21 +87,21 @@ public: ft.Add(_demolishRideCost); ScreenCoordsXY stringCoords(windowPos.x + WW / 2, windowPos.y + (WH / 2) - 3); - DrawTextWrapped(&dpi, stringCoords, WW - 4, stringId, ft, { TextAlignment::CENTRE }); + DrawTextWrapped(dpi, stringCoords, WW - 4, stringId, ft, { TextAlignment::CENTRE }); } } }; -rct_window* WindowRideDemolishPromptOpen(Ride* ride) +WindowBase* WindowRideDemolishPromptOpen(const Ride& ride) { - rct_window* w; + WindowBase* w; DemolishRidePromptWindow* newWindow; - w = window_find_by_class(WindowClass::DemolishRidePrompt); + w = WindowFindByClass(WindowClass::DemolishRidePrompt); if (w != nullptr) { auto windowPos = w->windowPos; - window_close(*w); + WindowClose(*w); newWindow = WindowCreate(WindowClass::DemolishRidePrompt, windowPos, WW, WH, WF_TRANSPARENT); } else diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index c5f628644f..d0859d8c00 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -39,7 +40,7 @@ enum WIDX_BACKGROUND, }; -static rct_widget window_dropdown_widgets[] = { +static Widget window_dropdown_widgets[] = { MakeWidget({ 0, 0 }, { 1, 1 }, WindowWidgetType::ImgBtn, WindowColour::Primary), WIDGETS_END, }; @@ -132,10 +133,10 @@ public: ResetDropdownFlags(); gDropdownIsColour = false; gDropdownDefaultIndex = -1; - input_set_state(InputState::DropdownActive); + InputSetState(InputState::DropdownActive); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -159,15 +160,14 @@ public: if (colours[0] & COLOUR_FLAG_TRANSLUCENT) { - translucent_window_palette palette = TranslucentWindowPalettes[BASE_COLOUR(colours[0])]; - gfx_filter_rect(&dpi, { leftTop, rightBottom }, palette.highlight); - gfx_filter_rect(&dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, palette.shadow); + TranslucentWindowPalette palette = TranslucentWindowPalettes[BASE_COLOUR(colours[0])]; + GfxFilterRect(&dpi, { leftTop, rightBottom }, palette.highlight); + GfxFilterRect(&dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, palette.shadow); } else { - gfx_fill_rect(&dpi, { leftTop, rightBottom }, ColourMapA[colours[0]].mid_dark); - gfx_fill_rect( - &dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, ColourMapA[colours[0]].lightest); + GfxFillRect(&dpi, { leftTop, rightBottom }, ColourMapA[colours[0]].mid_dark); + GfxFillRect(&dpi, { leftTop + shadowOffset, rightBottom + shadowOffset }, ColourMapA[colours[0]].lightest); } } else @@ -176,7 +176,7 @@ public: { // Darken the cell's background slightly when highlighted const ScreenCoordsXY rightBottom = screenCoords + ScreenCoordsXY{ ItemWidth - 1, ItemHeight - 1 }; - gfx_filter_rect(&dpi, { screenCoords, rightBottom }, FilterPaletteID::PaletteDarken3); + GfxFilterRect(&dpi, { screenCoords, rightBottom }, FilterPaletteID::PaletteDarken3); } StringId item = gDropdownItems[i].Format; @@ -187,7 +187,7 @@ public: : ImageId::FromUInt32(static_cast(gDropdownItems[i].Args)); if (item == Dropdown::FormatColourPicker && highlightedIndex == i) image = image.WithIndexOffset(1); - gfx_draw_sprite(&dpi, image, screenCoords); + GfxDrawSprite(&dpi, image, screenCoords); } else { @@ -204,7 +204,7 @@ public: // Draw item string Formatter ft(reinterpret_cast(&gDropdownItems[i].Args)); - DrawTextEllipsised(&dpi, screenCoords, width - 5, item, ft, { colour }); + DrawTextEllipsised(dpi, screenCoords, width - 5, item, ft, { colour }); } } } @@ -353,8 +353,8 @@ void WindowDropdownShowText(const ScreenCoordsXY& screenPos, int32_t extray, uin max_string_width = 0; for (size_t i = 0; i < num_items; i++) { - format_string(buffer, 256, gDropdownItems[i].Format, static_cast(&gDropdownItems[i].Args)); - string_width = gfx_get_string_width(buffer, FontStyle::Medium); + FormatStringLegacy(buffer, 256, gDropdownItems[i].Format, static_cast(&gDropdownItems[i].Args)); + string_width = GfxGetStringWidth(buffer, FontStyle::Medium); max_string_width = std::max(string_width, max_string_width); } @@ -377,9 +377,9 @@ 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) { - input_set_flag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); + InputSetFlag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); if (flags & Dropdown::Flag::StayOpen) - input_set_flag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); + InputSetFlag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); WindowDropdownClose(); @@ -409,9 +409,9 @@ 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 itemHeight, int32_t numColumns) { - input_set_flag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); + InputSetFlag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); if (flags & Dropdown::Flag::StayOpen) - input_set_flag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); + InputSetFlag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); // Close existing dropdown WindowDropdownClose(); @@ -426,14 +426,14 @@ void WindowDropdownShowImage( void WindowDropdownClose() { - window_close_by_class(WindowClass::Dropdown); + WindowCloseByClass(WindowClass::Dropdown); } /** * New function based on 6e914e * returns -1 if index is invalid */ -int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, rct_window* w) +int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w) { if (w->classification == WindowClass::Dropdown) { @@ -446,7 +446,7 @@ int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, rct_window* w) /** * rct2: 0x006ED43D */ -void WindowDropdownShowColour(rct_window* w, rct_widget* widget, uint8_t dropdownColour, uint8_t selectedColour) +void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour) { int32_t defaultIndex = -1; // Set items diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index 2948dd2b21..28967c8633 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ enum { WIDX_NEXT_STEP_BUTTON, // 8 }; -static rct_widget _editorBottomToolbarWidgets[] = { +static Widget _editorBottomToolbarWidgets[] = { MakeWidget({ 0, 0}, {200, 34}, WindowWidgetType::ImgBtn, WindowColour::Primary), MakeWidget({ 2, 2}, {196, 30}, WindowWidgetType::FlatBtn, WindowColour::Primary), MakeWidget({440, 0}, {200, 34}, WindowWidgetType::ImgBtn, WindowColour::Primary), @@ -61,7 +61,7 @@ public: widgets = _editorBottomToolbarWidgets; InitScrollWidgets(); - set_all_scenery_items_invented(); + SetAllSceneryItemsInvented(); } void OnPrepareDraw() override @@ -107,7 +107,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto drawPreviousButton = widgets[WIDX_PREVIOUS_STEP_BUTTON].type != WindowWidgetType::Empty; auto drawNextButton = widgets[WIDX_NEXT_STEP_BUTTON].type != WindowWidgetType::Empty; @@ -148,54 +148,54 @@ public: private: void JumpBackToObjectSelection() const { - window_close_all(); + WindowCloseAll(); gEditorStep = EditorStep::ObjectSelection; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void JumpBackToLandscapeEditor() const { - window_close_all(); - set_all_scenery_items_invented(); + WindowCloseAll(); + SetAllSceneryItemsInvented(); ScenerySetDefaultPlacementConfiguration(); gEditorStep = EditorStep::LandscapeEditor; ContextOpenWindow(WindowClass::Map); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void JumpBackToInventionListSetUp() const { - window_close_all(); + WindowCloseAll(); ContextOpenWindow(WindowClass::EditorInventionList); gEditorStep = EditorStep::InventionsListSetUp; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void JumpBackToOptionsSelection() const { - window_close_all(); + WindowCloseAll(); ContextOpenWindow(WindowClass::EditorScenarioOptions); gEditorStep = EditorStep::OptionsSelection; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } bool CheckObjectSelection() const { - rct_window* w; + WindowBase* w; auto [missingObjectType, errorString] = Editor::CheckObjectSelection(); if (missingObjectType == ObjectType::None) { - window_close_by_class(WindowClass::EditorObjectSelection); + WindowCloseByClass(WindowClass::EditorObjectSelection); return true; } ContextShowError(STR_INVALID_SELECTION_OF_OBJECTS, errorString, {}); - w = window_find_by_class(WindowClass::EditorObjectSelection); + w = WindowFindByClass(WindowClass::EditorObjectSelection); if (w != nullptr) { // Click tab with missing object - window_event_mouse_up_call(w, WC_EDITOR_OBJECT_SELECTION__WIDX_TAB_1 + EnumValue(missingObjectType)); + WindowEventMouseUpCall(w, WC_EDITOR_OBJECT_SELECTION__WIDX_TAB_1 + EnumValue(missingObjectType)); } return false; } @@ -205,7 +205,7 @@ private: if (!CheckObjectSelection()) return; - finish_object_selection(); + FinishObjectSelection(); if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) { ContextOpenWindow(WindowClass::ConstructRide); @@ -221,7 +221,7 @@ private: auto [checksPassed, errorString] = Editor::CheckPark(); if (checksPassed) { - window_close_all(); + WindowCloseAll(); ContextOpenWindow(WindowClass::EditorInventionList); gEditorStep = EditorStep::InventionsListSetUp; } @@ -230,39 +230,39 @@ private: ContextShowError(STR_CANT_ADVANCE_TO_NEXT_EDITOR_STAGE, errorString, {}); } - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void JumpForwardToOptionsSelection() const { - window_close_all(); + WindowCloseAll(); ContextOpenWindow(WindowClass::EditorScenarioOptions); gEditorStep = EditorStep::OptionsSelection; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void JumpForwardToObjectiveSelection() const { - window_close_all(); + WindowCloseAll(); ContextOpenWindow(WindowClass::EditorObjectiveOptions); gEditorStep = EditorStep::ObjectiveSelection; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void JumpForwardToSaveScenario() const { - const auto savePrepareResult = scenario_prepare_for_save(); + const auto savePrepareResult = ScenarioPrepareForSave(); if (!savePrepareResult.Successful) { ContextShowError(STR_UNABLE_TO_SAVE_SCENARIO_FILE, savePrepareResult.Message, {}); - gfx_invalidate_screen(); + GfxInvalidateScreen(); return; } - window_close_all(); + WindowCloseAll(); auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO); - intent.putExtra(INTENT_EXTRA_PATH, gScenarioName); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO); + intent.PutExtra(INTENT_EXTRA_PATH, gScenarioName); ContextOpenIntent(&intent); } @@ -278,23 +278,23 @@ private: widgets[WIDX_NEXT_IMAGE].type = WindowWidgetType::Empty; } - void DrawLeftButtonBack(rct_drawpixelinfo& dpi) + void DrawLeftButtonBack(DrawPixelInfo& dpi) { auto previousWidget = widgets[WIDX_PREVIOUS_IMAGE]; auto leftTop = windowPos + ScreenCoordsXY{ previousWidget.left, previousWidget.top }; auto rightBottom = windowPos + ScreenCoordsXY{ previousWidget.right, previousWidget.bottom }; - gfx_filter_rect(&dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); + GfxFilterRect(&dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); } - void DrawLeftButton(rct_drawpixelinfo& dpi) + void DrawLeftButton(DrawPixelInfo& dpi) { const auto topLeft = windowPos + ScreenCoordsXY{ widgets[WIDX_PREVIOUS_IMAGE].left + 1, widgets[WIDX_PREVIOUS_IMAGE].top + 1 }; const auto bottomRight = windowPos + ScreenCoordsXY{ widgets[WIDX_PREVIOUS_IMAGE].right - 1, widgets[WIDX_PREVIOUS_IMAGE].bottom - 1 }; - gfx_fill_rect_inset(&dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_30); + GfxFillRectInset(&dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_30); - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_PREVIOUS), windowPos + ScreenCoordsXY{ widgets[WIDX_PREVIOUS_IMAGE].left + 6, widgets[WIDX_PREVIOUS_IMAGE].top + 6 }); @@ -312,26 +312,26 @@ private: if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) stringId = STR_EDITOR_STEP_OBJECT_SELECTION; - DrawTextBasic(&dpi, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::CENTRE }); - DrawTextBasic(&dpi, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::CENTRE }); + DrawTextBasic(dpi, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::CENTRE }); + DrawTextBasic(dpi, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::CENTRE }); } - void DrawRightButtonBack(rct_drawpixelinfo& dpi) + void DrawRightButtonBack(DrawPixelInfo& dpi) { auto nextWidget = widgets[WIDX_NEXT_IMAGE]; auto leftTop = windowPos + ScreenCoordsXY{ nextWidget.left, nextWidget.top }; auto rightBottom = windowPos + ScreenCoordsXY{ nextWidget.right, nextWidget.bottom }; - gfx_filter_rect(&dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); + GfxFilterRect(&dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); } - void DrawRightButton(rct_drawpixelinfo& dpi) + void DrawRightButton(DrawPixelInfo& dpi) { const auto topLeft = windowPos + ScreenCoordsXY{ widgets[WIDX_NEXT_IMAGE].left + 1, widgets[WIDX_NEXT_IMAGE].top + 1 }; const auto bottomRight = windowPos + ScreenCoordsXY{ widgets[WIDX_NEXT_IMAGE].right - 1, widgets[WIDX_NEXT_IMAGE].bottom - 1 }; - gfx_fill_rect_inset(&dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_30); + GfxFillRectInset(&dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_30); - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_NEXT), windowPos + ScreenCoordsXY{ widgets[WIDX_NEXT_IMAGE].right - 29, widgets[WIDX_NEXT_IMAGE].top + 6 }); @@ -350,16 +350,16 @@ private: if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) stringId = STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER; - DrawTextBasic(&dpi, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::CENTRE }); - DrawTextBasic(&dpi, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::CENTRE }); + DrawTextBasic(dpi, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::CENTRE }); + DrawTextBasic(dpi, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::CENTRE }); } - void DrawStepText(rct_drawpixelinfo& dpi) + void DrawStepText(DrawPixelInfo& dpi) { int16_t stateX = (widgets[WIDX_PREVIOUS_IMAGE].right + widgets[WIDX_NEXT_IMAGE].left) / 2 + windowPos.x; int16_t stateY = height - 0x0C + windowPos.y; DrawTextBasic( - &dpi, { stateX, stateY }, _editorStepNames[EnumValue(gEditorStep)], {}, + dpi, { stateX, stateY }, _editorStepNames[EnumValue(gEditorStep)], {}, { static_cast(NOT_TRANSLUCENT(colours[2]) | COLOUR_FLAG_OUTLINE), TextAlignment::CENTRE }); } @@ -390,7 +390,7 @@ private: * Creates the main editor top toolbar window. * rct2: 0x0066F052 (part of 0x0066EF38) */ -rct_window* WindowEditorBottomToolbarOpen() +WindowBase* WindowEditorBottomToolbarOpen() { auto* window = WindowCreate( WindowClass::BottomToolbar, ScreenCoordsXY(0, ContextGetHeight() - 32), ContextGetWidth(), 32, diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index a384a69b44..749c605b99 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -46,7 +46,7 @@ enum { WIDX_RANDOM_SHUFFLE }; -static rct_widget _inventionListWidgets[] = { +static Widget _inventionListWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, {600, 357}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeTab ({ 3, 17} ), @@ -59,7 +59,7 @@ static rct_widget _inventionListWidgets[] = { WIDGETS_END, }; -static rct_widget _inventionListDragWidgets[] = { +static Widget _inventionListDragWidgets[] = { MakeWidget({0, 0}, {150, 14}, WindowWidgetType::ImgBtn, WindowColour::Primary), WIDGETS_END, }; @@ -96,7 +96,7 @@ static void ResearchRidesSetup() } static void DrawResearchItem( - rct_drawpixelinfo& dpi, const ResearchItem& researchItem, const int16_t& width, const ScreenCoordsXY& screenCoords, + DrawPixelInfo& dpi, const ResearchItem& researchItem, const int16_t& width, const ScreenCoordsXY& screenCoords, StringId format, TextPaint textPaint) { const StringId itemNameId = researchItem.GetName(); @@ -105,25 +105,26 @@ static void DrawResearchItem( if (researchItem.type == Research::EntryType::Ride && !GetRideTypeDescriptor(researchItem.baseRideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { - const StringId rideTypeName = get_ride_naming(researchItem.baseRideType, get_ride_entry(researchItem.entryIndex)).Name; + const StringId rideTypeName = GetRideNaming(researchItem.baseRideType, *GetRideEntryByIndex(researchItem.entryIndex)) + .Name; // Draw group name auto ft = Formatter(); ft.Add(rideTypeName); - DrawTextEllipsised(&dpi, screenCoords, columnSplitOffset - 11, format, ft, textPaint); + DrawTextEllipsised(dpi, screenCoords, columnSplitOffset - 11, format, ft, textPaint); // Draw vehicle name ft = Formatter(); ft.Add(itemNameId); DrawTextEllipsised( - &dpi, { screenCoords + ScreenCoordsXY{ columnSplitOffset, 0 } }, columnSplitOffset - 11, format, ft, textPaint); + dpi, { screenCoords + ScreenCoordsXY{ columnSplitOffset, 0 } }, columnSplitOffset - 11, format, ft, textPaint); } else { // Scenery group, flat ride or shopdis auto ft = Formatter(); ft.Add(itemNameId); - DrawTextEllipsised(&dpi, screenCoords, width, format, ft, textPaint); + DrawTextEllipsised(dpi, screenCoords, width, format, ft, textPaint); } } @@ -156,13 +157,13 @@ public: void OnClose() override { - research_remove_flags(); + ResearchRemoveFlags(); // When used in-game (as a cheat) if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) { gSilentResearch = true; - research_reset_current_item(); + ResearchResetCurrentItem(); gSilentResearch = false; } } @@ -175,16 +176,16 @@ public: Close(); break; case WIDX_RANDOM_SHUFFLE: - research_items_shuffle(); + ResearchItemsShuffle(); Invalidate(); break; case WIDX_MOVE_ITEMS_TO_TOP: - research_items_make_all_researched(); + ResearchItemsMakeAllResearched(); InitScrollWidgets(); Invalidate(); break; case WIDX_MOVE_ITEMS_TO_BOTTOM: - research_items_make_all_unresearched(); + ResearchItemsMakeAllUnresearched(); InitScrollWidgets(); Invalidate(); break; @@ -209,7 +210,7 @@ public: { frame_no++; OnPrepareDraw(); - widget_invalidate(*this, WIDX_TAB_1); + WidgetInvalidate(*this, WIDX_TAB_1); if (WindowEditorInventionsListDragGetItem() != nullptr) return; @@ -262,11 +263,11 @@ public: WindowEditorInventionsListDragOpen(researchItem, windowPos, widgets[WIDX_PRE_RESEARCHED_SCROLL].right); } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { // Draw background uint8_t paletteIndex = ColourMapA[colours[1]].mid_light; - gfx_clear(&dpi, paletteIndex); + GfxClear(&dpi, paletteIndex); int16_t boxWidth = widgets[WIDX_RESEARCH_ORDER_SCROLL].width(); int32_t itemY = -SCROLLABLE_ROW_HEIGHT; @@ -295,7 +296,7 @@ public: bottom = itemY; } - gfx_filter_rect(&dpi, { 0, top, boxWidth, bottom }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, top, boxWidth, bottom }, FilterPaletteID::PaletteDarken1); } if (dragItem != nullptr && researchItem == *dragItem) @@ -345,27 +346,27 @@ public: return fallback; } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); // Tab image auto screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_1].left, widgets[WIDX_TAB_1].top }; - gfx_draw_sprite(&dpi, ImageId(SPR_TAB_FINANCES_RESEARCH_0 + (frame_no / 2) % 8), screenPos); + GfxDrawSprite(&dpi, ImageId(SPR_TAB_FINANCES_RESEARCH_0 + (frame_no / 2) % 8), screenPos); // Pre-researched items label screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_PRE_RESEARCHED_SCROLL].left, widgets[WIDX_PRE_RESEARCHED_SCROLL].top - 11 }; - DrawTextBasic(&dpi, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_PREINVENTED_ITEMS); + DrawTextBasic(dpi, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_PREINVENTED_ITEMS); // Research order label screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_RESEARCH_ORDER_SCROLL].left, widgets[WIDX_RESEARCH_ORDER_SCROLL].top - 11 }; - DrawTextBasic(&dpi, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_TO_BE_INVENTED_ITEMS); + DrawTextBasic(dpi, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_TO_BE_INVENTED_ITEMS); // Preview background auto& bkWidget = widgets[WIDX_PREVIEW]; - gfx_fill_rect( + GfxFillRect( &dpi, { windowPos + ScreenCoordsXY{ bkWidget.left + 1, bkWidget.top + 1 }, windowPos + ScreenCoordsXY{ bkWidget.right - 1, bkWidget.bottom - 1 } }, @@ -383,21 +384,21 @@ public: if (researchItem->type == Research::EntryType::Ride) objectEntryType = ObjectType::Ride; - auto chunk = object_entry_get_chunk(objectEntryType, researchItem->entryIndex); + auto chunk = ObjectEntryGetChunk(objectEntryType, researchItem->entryIndex); if (chunk == nullptr) return; // Draw preview - const auto* object = object_entry_get_object(objectEntryType, researchItem->entryIndex); + const auto* object = ObjectEntryGetObject(objectEntryType, researchItem->entryIndex); if (object != nullptr) { - rct_drawpixelinfo clipDPI; + DrawPixelInfo clipDPI; screenPos = windowPos + ScreenCoordsXY{ bkWidget.left + 1, bkWidget.top + 1 }; const auto clipWidth = bkWidget.width() - 1; const auto clipHeight = bkWidget.height() - 1; - if (clip_drawpixelinfo(&clipDPI, &dpi, screenPos, clipWidth, clipHeight)) + if (ClipDrawPixelInfo(&clipDPI, &dpi, screenPos, clipWidth, clipHeight)) { - object->DrawPreview(&clipDPI, clipWidth, clipHeight); + object->DrawPreview(clipDPI, clipWidth, clipHeight); } } @@ -413,7 +414,8 @@ public: && !GetRideTypeDescriptor(researchItem->baseRideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { drawString = STR_WINDOW_COLOUR_2_STRINGID_STRINGID; - StringId rideTypeName = get_ride_naming(researchItem->baseRideType, get_ride_entry(researchItem->entryIndex)).Name; + StringId rideTypeName = GetRideNaming(researchItem->baseRideType, *GetRideEntryByIndex(researchItem->entryIndex)) + .Name; ft.Add(rideTypeName); ft.Add(stringId); } @@ -422,14 +424,14 @@ public: ft.Add(stringId); } - DrawTextEllipsised(&dpi, screenPos, itemWidth, drawString, ft, { TextAlignment::CENTRE }); + DrawTextEllipsised(dpi, screenPos, itemWidth, drawString, ft, { TextAlignment::CENTRE }); screenPos.y += 15; // Item category screenPos.x = windowPos.x + widgets[WIDX_RESEARCH_ORDER_SCROLL].right + 4; ft = Formatter(); ft.Add(researchItem->GetCategoryInventionString()); - DrawTextBasic(&dpi, screenPos, STR_INVENTION_RESEARCH_GROUP, ft); + DrawTextBasic(dpi, screenPos, STR_INVENTION_RESEARCH_GROUP, ft); } void OnPrepareDraw() override @@ -476,7 +478,7 @@ public: if (windowPos.x <= screenCoords.x && windowPos.y < screenCoords.y && windowPos.x + width > screenCoords.x && windowPos.y + height > screenCoords.y) { - WidgetIndex widgetIndex = window_find_widget_from_point(*this, screenCoords); + WidgetIndex widgetIndex = WindowFindWidgetFromPoint(*this, screenCoords); auto& widget = widgets[widgetIndex]; if (widgetIndex == WIDX_PRE_RESEARCHED_SCROLL || widgetIndex == WIDX_RESEARCH_ORDER_SCROLL) { @@ -574,7 +576,7 @@ private: * * rct2: 0x00684E04 */ -rct_window* WindowEditorInventionsListOpen() +WindowBase* WindowEditorInventionsListOpen() { return WindowFocusOrCreate( WindowClass::EditorInventionList, WW, WH, WF_NO_SCROLLING | WF_RESIZABLE | WF_CENTRE_SCREEN); @@ -596,7 +598,7 @@ public: CursorID OnCursor(const WidgetIndex widx, const ScreenCoordsXY& screenCoords, const CursorID defaultCursor) override { - auto* inventionListWindow = static_cast(window_find_by_class(WindowClass::EditorInventionList)); + auto* inventionListWindow = static_cast(WindowFindByClass(WindowClass::EditorInventionList)); if (inventionListWindow != nullptr) { auto res = inventionListWindow->GetResearchItemAt(screenCoords); @@ -613,10 +615,11 @@ public: void OnMoved(const ScreenCoordsXY& screenCoords) override { - auto* inventionListWindow = static_cast(window_find_by_class(WindowClass::EditorInventionList)); + auto* inventionListWindow = static_cast(WindowFindByClass(WindowClass::EditorInventionList)); if (inventionListWindow == nullptr) { Close(); + return; } std::optional res; // Skip always researched items, so that the dragged item gets placed underneath them @@ -632,16 +635,17 @@ public: inventionListWindow->MoveResearchItem(_draggedItem, res->research, res->isInvented); } - window_invalidate_by_class(WindowClass::EditorInventionList); + WindowInvalidateByClass(WindowClass::EditorInventionList); Close(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto screenCoords = windowPos + ScreenCoordsXY{ 0, 2 }; DrawResearchItem( - dpi, _draggedItem, width, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, { COLOUR_BLACK | COLOUR_FLAG_OUTLINE }); + dpi, _draggedItem, width, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, + { COLOUR_BLACK | static_cast(COLOUR_FLAG_OUTLINE) }); } void Init(ResearchItem& researchItem, const ScreenCoordsXY& editorPos, int objectSelectionScrollWidth) @@ -666,7 +670,7 @@ public: static void WindowEditorInventionsListDragOpen( ResearchItem* researchItem, const ScreenCoordsXY& editorPos, int objectSelectionScrollWidth) { - window_close_by_class(WindowClass::EditorInventionListDrag); + WindowCloseByClass(WindowClass::EditorInventionListDrag); auto* wnd = WindowCreate( WindowClass::EditorInventionListDrag, 10, 14, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_SNAPPING); if (wnd != nullptr) @@ -677,7 +681,7 @@ static void WindowEditorInventionsListDragOpen( static const ResearchItem* WindowEditorInventionsListDragGetItem() { - auto* wnd = static_cast(window_find_by_class(WindowClass::EditorInventionListDrag)); + auto* wnd = static_cast(WindowFindByClass(WindowClass::EditorInventionListDrag)); if (wnd == nullptr) { return nullptr; diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index 1f37bc4ee1..47d565b310 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -92,7 +92,7 @@ enum struct ObjectListItem { const ObjectRepositoryItem* repositoryItem; - std::unique_ptr filter; + std::unique_ptr filter; uint8_t* flags; }; @@ -191,7 +191,7 @@ validate_global_widx(WC_EDITOR_OBJECT_SELECTION, WIDX_TAB_1); static bool _window_editor_object_selection_widgets_initialised; // clang-format off -static std::vector _window_editor_object_selection_widgets = { +static std::vector _window_editor_object_selection_widgets = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, {WW, 357}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeWidget({470, 22}, {122, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_OBJECT_SELECTION_ADVANCED, STR_OBJECT_SELECTION_ADVANCED_TIP), @@ -264,8 +264,8 @@ public: { InitWidgets(); - sub_6AB211(); - reset_selected_object_count_and_size(); + Sub6AB211(); + ResetSelectedObjectCountAndSize(); widgets[WIDX_FILTER_TEXT_BOX].string = _filter_string; @@ -293,23 +293,23 @@ public: */ void OnClose() override { - unload_unselected_objects(); + UnloadUnselectedObjects(); EditorLoadSelectedObjects(); - editor_object_flags_free(); + EditorObjectFlagsFree(); if (_loadedObject != nullptr) _loadedObject->Unload(); if (gScreenFlags & SCREEN_FLAGS_EDITOR) { - research_populate_list_random(); + ResearchPopulateListRandom(); } else { // Used for in-game object selection cheat // This resets the ride selection list and resets research to 0 on current item gSilentResearch = true; - research_reset_current_item(); + ResearchResetCurrentItem(); gSilentResearch = false; } @@ -326,8 +326,8 @@ public: { if (gCurrentTextBox.window.classification == classification && gCurrentTextBox.window.number == number) { - window_update_textbox_caret(); - widget_invalidate(*this, WIDX_FILTER_TEXT_BOX); + WindowUpdateTextboxCaret(); + WidgetInvalidate(*this, WIDX_FILTER_TEXT_BOX); } for (WidgetIndex i = WIDX_FILTER_RIDE_TAB_TRANSPORT; i <= WIDX_FILTER_RIDE_TAB_STALL; i++) @@ -339,7 +339,7 @@ public: if (frame_no >= window_editor_object_selection_animation_loops[i - WIDX_FILTER_RIDE_TAB_TRANSPORT]) frame_no = 0; - widget_invalidate(*this, i); + WidgetInvalidate(*this, i); break; } } @@ -353,16 +353,16 @@ public: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); if (gScreenFlags & SCREEN_FLAGS_EDITOR) { - finish_object_selection(); + FinishObjectSelection(); } if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - game_notify_map_change(); - game_unload_scripts(); - title_load(); + GameNotifyMapChange(); + GameUnloadScripts(); + TitleLoad(); } break; case WIDX_FILTER_RIDE_TAB_ALL: @@ -411,12 +411,12 @@ public: Invalidate(); auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK); ContextOpenIntent(&intent); break; } case WIDX_FILTER_TEXT_BOX: - window_start_textbox(*this, widgetIndex, STR_STRING, _filter_string, sizeof(_filter_string)); + WindowStartTextbox(*this, widgetIndex, STR_STRING, _filter_string, sizeof(_filter_string)); break; case WIDX_FILTER_CLEAR_BUTTON: std::fill_n(_filter_string, sizeof(_filter_string), 0x00); @@ -461,7 +461,7 @@ public: void OnResize() override { - window_set_resize(*this, WW, WH, 1200, 1000); + WindowSetResize(*this, WW, WH, 1200, 1000); } void OnMouseDown(WidgetIndex widgetIndex) override @@ -576,7 +576,7 @@ public: { // Used for in-game object selection cheat to prevent crashing the game // when windows attempt to draw objects that don't exist any more - window_close_all_except_class(WindowClass::EditorObjectSelection); + WindowCloseAllExceptClass(WindowClass::EditorObjectSelection); int32_t selected_object = GetObjectFromObjectSelection(GetSelectedObjectType(), screenCoords.y); if (selected_object == -1) @@ -594,17 +594,19 @@ public: if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - const auto objectSelectResult = window_editor_object_selection_select_object( + const auto objectSelectResult = WindowEditorObjectSelectionSelectObject( 0, INPUT_FLAG_EDITOR_OBJECT_SELECT, listItem->repositoryItem); if (!objectSelectResult.Successful) return; - // Close any other open windows such as options/colour schemes to prevent a crash. - window_close_all(); - // window_close(*w); + auto& objRepository = OpenRCT2::GetContext()->GetObjectRepository(); + _loadedObject = objRepository.LoadObject(listItem->repositoryItem); + auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); + objManager.LoadObject(_loadedObject.get()->GetIdentifier()); // This function calls window_track_list_open ManageTracks(); + Close(); return; } @@ -614,7 +616,7 @@ public: inputFlags |= INPUT_FLAG_EDITOR_OBJECT_SELECT; _gSceneryGroupPartialSelectError = std::nullopt; - const auto objectSelectResult = window_editor_object_selection_select_object(0, inputFlags, listItem->repositoryItem); + const auto objectSelectResult = WindowEditorObjectSelectionSelectObject(0, inputFlags, listItem->repositoryItem); if (!objectSelectResult.Successful) { StringId error_title = (inputFlags & INPUT_FLAG_EDITOR_OBJECT_SELECT) ? STR_UNABLE_TO_SELECT_THIS_OBJECT @@ -688,14 +690,14 @@ public: } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { // ScrollPaint ScreenCoordsXY screenCoords; bool ridePage = (GetSelectedObjectType() == ObjectType::Ride); uint8_t paletteIndex = ColourMapA[colours[1]].mid_light; - gfx_clear(&dpi, paletteIndex); + GfxClear(&dpi, paletteIndex); screenCoords.y = 0; for (size_t i = 0; i < _listItems.size(); i++) @@ -705,8 +707,7 @@ public: { // Draw checkbox if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem.flags & 0x20)) - gfx_fill_rect_inset( - &dpi, { { 2, screenCoords.y }, { 11, screenCoords.y + 10 } }, colours[1], INSET_RECT_F_E0); + GfxFillRectInset(&dpi, { { 2, screenCoords.y }, { 11, screenCoords.y + 10 } }, colours[1], INSET_RECT_F_E0); // Highlight background auto highlighted = i == static_cast(selected_list_item) @@ -714,7 +715,7 @@ public: if (highlighted) { auto bottom = screenCoords.y + (SCROLLABLE_ROW_HEIGHT - 1); - gfx_filter_rect(&dpi, { 0, screenCoords.y, width, bottom }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, screenCoords.y, width, bottom }, FilterPaletteID::PaletteDarken1); } // Draw checkmark @@ -726,8 +727,8 @@ public: if (*listItem.flags & (ObjectSelectionFlags::InUse | ObjectSelectionFlags::AlwaysRequired)) colour2 |= COLOUR_FLAG_INSET; - gfx_draw_string( - &dpi, screenCoords, static_cast(CheckBoxMarkString), + GfxDrawString( + dpi, screenCoords, static_cast(CheckBoxMarkString), { static_cast(colour2), FontStyle::Medium, darkness }); } @@ -751,16 +752,16 @@ public: width_limit /= 2; // Draw ride type StringId rideTypeStringId = GetRideTypeStringId(listItem.repositoryItem); - safe_strcpy(buffer, language_get_string(rideTypeStringId), 256 - (buffer - bufferWithColour)); + SafeStrCpy(buffer, LanguageGetString(rideTypeStringId), 256 - (buffer - bufferWithColour)); auto ft = Formatter(); ft.Add(gCommonStringFormatBuffer); DrawTextEllipsised( - &dpi, screenCoords, width_limit - 15, STR_STRING, ft, { colour, FontStyle::Medium, darkness }); + dpi, screenCoords, width_limit - 15, STR_STRING, ft, { colour, FontStyle::Medium, darkness }); screenCoords.x = widgets[WIDX_LIST_SORT_RIDE].left - widgets[WIDX_LIST].left; } // Draw text - safe_strcpy(buffer, listItem.repositoryItem->Name.c_str(), 256 - (buffer - bufferWithColour)); + SafeStrCpy(buffer, listItem.repositoryItem->Name.c_str(), 256 - (buffer - bufferWithColour)); if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { while (*buffer != 0 && *buffer != 9) @@ -770,7 +771,7 @@ public: } auto ft = Formatter(); ft.Add(gCommonStringFormatBuffer); - DrawTextEllipsised(&dpi, screenCoords, width_limit, STR_STRING, ft, { colour, FontStyle::Medium, darkness }); + DrawTextEllipsised(dpi, screenCoords, width_limit, STR_STRING, ft, { colour, FontStyle::Medium, darkness }); } screenCoords.y += SCROLLABLE_ROW_HEIGHT; } @@ -793,7 +794,7 @@ public: void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override { - if (widgetIndex != WIDX_FILTER_TEXT_BOX || text.empty()) + if (widgetIndex != WIDX_FILTER_TEXT_BOX) return; std::string tempText = text.data(); @@ -802,7 +803,7 @@ public: if (strcmp(_filter_string, c) == 0) return; - safe_strcpy(_filter_string, c, sizeof(_filter_string)); + SafeStrCpy(_filter_string, c, sizeof(_filter_string)); FilterUpdateCounts(); @@ -953,7 +954,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { int32_t _width; @@ -967,7 +968,7 @@ public: { auto image = ImageId(ObjectSelectionPages[i].Image); auto screenPos = windowPos + ScreenCoordsXY{ widget.left, widget.top }; - gfx_draw_sprite(&dpi, image, screenPos); + GfxDrawSprite(&dpi, image, screenPos); } } @@ -997,13 +998,13 @@ public: spriteIndex += (i == 4 ? ThrillRidesTabAnimationSequence[frame] : frame); auto screenPos = windowPos + ScreenCoordsXY{ widget.left, widget.top }; - gfx_draw_sprite(&dpi, ImageId(spriteIndex, colours[1]), screenPos); + GfxDrawSprite(&dpi, ImageId(spriteIndex, colours[1]), screenPos); } } // Preview background const auto& previewWidget = widgets[WIDX_PREVIEW]; - gfx_fill_rect( + GfxFillRect( &dpi, { windowPos + ScreenCoordsXY{ previewWidget.left + 1, previewWidget.top + 1 }, windowPos + ScreenCoordsXY{ previewWidget.right - 1, previewWidget.bottom - 1 } }, @@ -1020,7 +1021,7 @@ public: auto ft = Formatter(); ft.Add(numSelected); ft.Add(totalSelectable); - DrawTextBasic(&dpi, screenPos, STR_OBJECT_SELECTION_SELECTION_SIZE, ft); + DrawTextBasic(dpi, screenPos, STR_OBJECT_SELECTION_SELECTION_SIZE, ft); } // Draw sort button text @@ -1032,7 +1033,7 @@ public: : STR_NONE; ft.Add(stringId); auto screenPos = windowPos + ScreenCoordsXY{ listSortTypeWidget.left + 1, listSortTypeWidget.top + 1 }; - DrawTextEllipsised(&dpi, screenPos, listSortTypeWidget.width(), STR_OBJECTS_SORT_TYPE, ft, { colours[1] }); + DrawTextEllipsised(dpi, screenPos, listSortTypeWidget.width(), STR_OBJECTS_SORT_TYPE, ft, { colours[1] }); } const auto& listSortRideWidget = widgets[WIDX_LIST_SORT_RIDE]; if (listSortRideWidget.type != WindowWidgetType::Empty) @@ -1042,7 +1043,7 @@ public: : STR_NONE; ft.Add(stringId); auto screenPos = windowPos + ScreenCoordsXY{ listSortRideWidget.left + 1, listSortRideWidget.top + 1 }; - DrawTextEllipsised(&dpi, screenPos, listSortRideWidget.width(), STR_OBJECTS_SORT_RIDE, ft, { colours[1] }); + DrawTextEllipsised(dpi, screenPos, listSortRideWidget.width(), STR_OBJECTS_SORT_RIDE, ft, { colours[1] }); } if (selected_list_item == -1 || _loadedObject == nullptr) @@ -1052,13 +1053,13 @@ public: // Draw preview { - rct_drawpixelinfo clipDPI; + DrawPixelInfo clipDPI; auto screenPos = windowPos + ScreenCoordsXY{ previewWidget.left + 1, previewWidget.top + 1 }; _width = previewWidget.width() - 1; int32_t _height = previewWidget.height() - 1; - if (clip_drawpixelinfo(&clipDPI, &dpi, screenPos, _width, _height)) + if (ClipDrawPixelInfo(&clipDPI, &dpi, screenPos, _width, _height)) { - _loadedObject->DrawPreview(&clipDPI, _width, _height); + _loadedObject->DrawPreview(clipDPI, _width, _height); } } @@ -1069,7 +1070,7 @@ public: auto ft = Formatter(); ft.Add(STR_STRING); ft.Add(listItem->repositoryItem->Name.c_str()); - DrawTextEllipsised(&dpi, screenPos, _width, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); + DrawTextEllipsised(dpi, screenPos, _width, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); } DrawDescriptions(&dpi); @@ -1120,12 +1121,12 @@ private: void VisibleListRefresh() { - int32_t numObjects = static_cast(object_repository_get_items_count()); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); VisibleListDispose(); selected_list_item = -1; - const ObjectRepositoryItem* items = object_repository_get_items(); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (int32_t i = 0; i < numObjects; i++) { uint8_t selectionFlags = _objectSelectionFlags[i]; @@ -1133,10 +1134,10 @@ private: if (item->Type == GetSelectedObjectType() && !(selectionFlags & ObjectSelectionFlags::Flag6) && FilterSource(item) && FilterString(*item) && FilterChunks(item) && FilterSelected(selectionFlags)) { - auto filter = std::make_unique(); - filter->ride.category[0] = 0; - filter->ride.category[1] = 0; - filter->ride.ride_type = 0; + auto filter = std::make_unique(); + filter->category[0] = 0; + filter->category[1] = 0; + filter->ride_type = 0; ObjectListItem currentListItem; currentListItem.repositoryItem = item; @@ -1162,7 +1163,7 @@ private: sortFunc = VisibleListSortRideName; break; default: - log_warning("Wrong sort type %d, leaving list as-is.", _listSortType); + LOG_WARNING("Wrong sort type %d, leaving list as-is.", _listSortType); break; } if (sortFunc != nullptr) @@ -1183,7 +1184,7 @@ private: _listItems.shrink_to_fit(); } - void DrawDescriptions(rct_drawpixelinfo* dpi) + void DrawDescriptions(DrawPixelInfo* dpi) { const auto& widget = widgets[WIDX_PREVIEW]; auto screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_LIST].right + 4, widget.bottom + 23 }; @@ -1196,12 +1197,12 @@ private: ft.Add(STR_STRING); ft.Add(description.c_str()); - screenPos.y += DrawTextWrapped(dpi, screenPos, _width2, STR_WINDOW_COLOUR_2_STRINGID, ft) + LIST_ROW_HEIGHT; + screenPos.y += DrawTextWrapped(*dpi, screenPos, _width2, STR_WINDOW_COLOUR_2_STRINGID, ft) + LIST_ROW_HEIGHT; } if (GetSelectedObjectType() == ObjectType::Ride) { auto* rideObject = reinterpret_cast(_loadedObject.get()); - const auto* rideEntry = reinterpret_cast(rideObject->GetLegacyData()); + const auto* rideEntry = reinterpret_cast(rideObject->GetLegacyData()); if (rideEntry->shop_item[0] != ShopItem::None) { std::string sells = ""; @@ -1213,11 +1214,11 @@ private: if (!sells.empty()) sells += ", "; - sells += language_get_string(GetShopItemDescriptor(rideEntry->shop_item[i]).Naming.Plural); + sells += LanguageGetString(GetShopItemDescriptor(rideEntry->shop_item[i]).Naming.Plural); } auto ft = Formatter(); ft.Add(sells.c_str()); - screenPos.y += DrawTextWrapped(dpi, screenPos, _width2, STR_RIDE_OBJECT_SHOP_SELLS, ft) + 2; + screenPos.y += DrawTextWrapped(*dpi, screenPos, _width2, STR_RIDE_OBJECT_SHOP_SELLS, ft) + 2; } } else if (GetSelectedObjectType() == ObjectType::SceneryGroup) @@ -1225,11 +1226,11 @@ private: const auto* sceneryGroupObject = reinterpret_cast(_loadedObject.get()); auto ft = Formatter(); ft.Add(sceneryGroupObject->GetNumIncludedObjects()); - screenPos.y += DrawTextWrapped(dpi, screenPos, _width2, STR_INCLUDES_X_OBJECTS, ft) + 2; + screenPos.y += DrawTextWrapped(*dpi, screenPos, _width2, STR_INCLUDES_X_OBJECTS, ft) + 2; } else if (GetSelectedObjectType() == ObjectType::Music) { - screenPos.y += DrawTextWrapped(dpi, screenPos, _width2, STR_MUSIC_OBJECT_TRACK_HEADER) + 2; + screenPos.y += DrawTextWrapped(*dpi, screenPos, _width2, STR_MUSIC_OBJECT_TRACK_HEADER) + 2; const auto* musicObject = reinterpret_cast(_loadedObject.get()); for (size_t i = 0; i < musicObject->GetTrackCount(); i++) { @@ -1242,12 +1243,12 @@ private: auto ft = Formatter(); ft.Add(track->Name.c_str()); ft.Add(track->Composer.c_str()); - screenPos.y += DrawTextWrapped(dpi, screenPos + ScreenCoordsXY{ 10, 0 }, _width2, stringId, ft); + screenPos.y += DrawTextWrapped(*dpi, screenPos + ScreenCoordsXY{ 10, 0 }, _width2, stringId, ft); } } } - void DrawDebugData(rct_drawpixelinfo* dpi) + void DrawDebugData(DrawPixelInfo* dpi) { ObjectListItem* listItem = &_listItems[selected_list_item]; auto screenPos = windowPos + ScreenCoordsXY{ width - 5, height - (LIST_ROW_HEIGHT * 6) }; @@ -1255,7 +1256,7 @@ private: // Draw fallback image warning if (_loadedObject && _loadedObject->UsesFallbackImages()) { - DrawTextBasic(dpi, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { COLOUR_WHITE, TextAlignment::RIGHT }); + DrawTextBasic(*dpi, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { COLOUR_WHITE, TextAlignment::RIGHT }); } screenPos.y += LIST_ROW_HEIGHT; @@ -1263,14 +1264,14 @@ private: if (GetSelectedObjectType() == ObjectType::Ride) { auto stringId = GetRideTypeStringId(listItem->repositoryItem); - DrawTextBasic(dpi, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT }); + DrawTextBasic(*dpi, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT }); } screenPos.y += LIST_ROW_HEIGHT; // Draw object source - auto stringId = object_manager_get_source_game_string(listItem->repositoryItem->GetFirstSourceGame()); - DrawTextBasic(dpi, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT }); + auto stringId = ObjectManagerGetSourceGameString(listItem->repositoryItem->GetFirstSourceGame()); + DrawTextBasic(*dpi, screenPos, stringId, {}, { COLOUR_WHITE, TextAlignment::RIGHT }); screenPos.y += LIST_ROW_HEIGHT; // Draw object filename @@ -1280,7 +1281,7 @@ private: ft.Add(STR_STRING); ft.Add(path.c_str()); DrawTextBasic( - dpi, { windowPos.x + this->width - 5, screenPos.y }, STR_WINDOW_COLOUR_2_STRINGID, ft, + *dpi, { windowPos.x + this->width - 5, screenPos.y }, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_BLACK, TextAlignment::RIGHT }); screenPos.y += LIST_ROW_HEIGHT; } @@ -1300,13 +1301,18 @@ private: ft.Add(STR_STRING); ft.Add(authorsString.c_str()); DrawTextEllipsised( - dpi, { windowPos.x + width - 5, screenPos.y }, width - widgets[WIDX_LIST].right - 4, + *dpi, { windowPos.x + width - 5, screenPos.y }, width - widgets[WIDX_LIST].right - 4, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::RIGHT }); } } bool FilterSelected(uint8_t objectFlag) { + // Track Manager has no concept of selection filtering, so always return true + if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + { + return true; + } if (_FILTER_SELECTED == _FILTER_NONSELECTED) { return true; @@ -1332,7 +1338,7 @@ private: { if (item.Type == ObjectType::Ride) { - auto rideTypeName = language_get_string(GetRideTypeStringId(&item)); + auto rideTypeName = LanguageGetString(GetRideTypeStringId(&item)); if (String::Contains(rideTypeName, filter, true)) return true; } @@ -1427,8 +1433,8 @@ private: const auto& selectionFlags = _objectSelectionFlags; std::fill(std::begin(_filter_object_counts), std::end(_filter_object_counts), 0); - size_t numObjects = object_repository_get_items_count(); - const ObjectRepositoryItem* items = object_repository_get_items(); + size_t numObjects = ObjectRepositoryGetItemsCount(); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (size_t i = 0; i < numObjects; i++) { const ObjectRepositoryItem* item = &items[i]; @@ -1481,7 +1487,7 @@ private: { for (size_t i = 0; i < std::size(ObjectSelectionPages); i++) { - pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); + pressed_widgets &= ~(1ull << (WIDX_TAB_1 + i)); } pressed_widgets |= 1LL << (WIDX_TAB_1 + selected_tab); } @@ -1492,21 +1498,21 @@ private: */ void ManageTracks() { - set_every_ride_type_invented(); - set_every_ride_entry_invented(); + SetEveryRideTypeInvented(); + SetEveryRideEntryInvented(); gEditorStep = EditorStep::DesignsManager; int32_t entry_index = 0; - for (; object_entry_get_chunk(ObjectType::Ride, entry_index) == nullptr; entry_index++) + for (; ObjectEntryGetChunk(ObjectType::Ride, entry_index) == nullptr; entry_index++) ; - rct_ride_entry* ride_entry = get_ride_entry(entry_index); - auto rideType = ride_entry->GetFirstNonNullRideType(); + const auto* rideEntry = GetRideEntryByIndex(entry_index); + auto rideType = rideEntry->GetFirstNonNullRideType(); auto intent = Intent(WindowClass::TrackDesignList); - intent.putExtra(INTENT_EXTRA_RIDE_TYPE, rideType); - intent.putExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, entry_index); + intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, rideType); + intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, entry_index); ContextOpenIntent(&intent); } }; @@ -1515,7 +1521,7 @@ private: * * rct2: 0x006AA64E */ -rct_window* WindowEditorObjectSelectionOpen() +WindowBase* WindowEditorObjectSelectionOpen() { return WindowFocusOrCreate( WindowClass::EditorObjectSelection, 755, 400, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); @@ -1530,8 +1536,8 @@ static bool VisibleListSortRideName(const ObjectListItem& a, const ObjectListIte static bool VisibleListSortRideType(const ObjectListItem& a, const ObjectListItem& b) { - auto rideTypeA = language_get_string(GetRideTypeStringId(a.repositoryItem)); - auto rideTypeB = language_get_string(GetRideTypeStringId(b.repositoryItem)); + auto rideTypeA = LanguageGetString(GetRideTypeStringId(a.repositoryItem)); + auto rideTypeB = LanguageGetString(GetRideTypeStringId(b.repositoryItem)); int32_t result = String::Compare(rideTypeA, rideTypeB); return result != 0 ? result < 0 : VisibleListSortRideName(a, b); } @@ -1558,8 +1564,8 @@ static StringId GetRideTypeStringId(const ObjectRepositoryItem* item) void EditorLoadSelectedObjects() { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); - int32_t numItems = static_cast(object_repository_get_items_count()); - const ObjectRepositoryItem* items = object_repository_get_items(); + int32_t numItems = static_cast(ObjectRepositoryGetItemsCount()); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); bool showFallbackWarning = false; for (int32_t i = 0; i < numItems; i++) { @@ -1573,23 +1579,23 @@ void EditorLoadSelectedObjects() loadedObject = objManager.LoadObject(descriptor); if (loadedObject == nullptr) { - log_error("Failed to load entry %s", std::string(descriptor.GetName()).c_str()); + LOG_ERROR("Failed to load entry %s", std::string(descriptor.GetName()).c_str()); } else if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) { // Defaults selected items to researched (if in-game) auto objectType = loadedObject->GetObjectType(); - auto entryIndex = object_manager_get_loaded_object_entry_index(loadedObject); + auto entryIndex = ObjectManagerGetLoadedObjectEntryIndex(loadedObject); if (objectType == ObjectType::Ride) { - rct_ride_entry* rideEntry = get_ride_entry(entryIndex); + const auto* rideEntry = GetRideEntryByIndex(entryIndex); auto rideType = rideEntry->GetFirstNonNullRideType(); ResearchCategory category = static_cast(GetRideTypeDescriptor(rideType).Category); - research_insert_ride_entry(rideType, entryIndex, category, true); + ResearchInsertRideEntry(rideType, entryIndex, category, true); } else if (objectType == ObjectType::SceneryGroup) { - research_insert_scenery_group_entry(entryIndex, true); + ResearchInsertSceneryGroupEntry(entryIndex, true); } if (loadedObject->UsesFallbackImages()) { @@ -1602,7 +1608,7 @@ void EditorLoadSelectedObjects() if (_numSelectedObjectsForType[EnumValue(ObjectType::Water)] == 0) { // Reloads the default cyan water palette if no palette was selected. - load_palette(); + LoadPalette(); } if (showFallbackWarning) ContextShowError(STR_OBJECT_SELECTION_FALLBACK_IMAGES_WARNING, STR_EMPTY, Formatter::Common()); diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index 4092b4b6f8..bda024ad33 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,6 +37,9 @@ static constexpr const StringId WINDOW_TITLE = STR_OBJECTIVE_SELECTION; static constexpr const int32_t WH = 229; static constexpr const int32_t WW = 450; +// The number has to leave a bit of room for other entities like vehicles, litter and balloons. +static constexpr const uint16_t MaxObjectiveGuests = 50000; + #pragma region Widgets // clang-format off @@ -92,7 +95,7 @@ enum { MakeTab ({ 3, 17}, STR_SELECT_OBJECTIVE_AND_PARK_NAME_TIP ), \ MakeTab ({ 34, 17}, STR_SELECT_RIDES_TO_BE_PRESERVED_TIP ) -static rct_widget window_editor_objective_options_main_widgets[] = { +static Widget window_editor_objective_options_main_widgets[] = { MAIN_OBJECTIVE_OPTIONS_WIDGETS, MakeWidget ({ 98, 48}, {344, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP ), MakeWidget ({430, 49}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_OBJECTIVE_FOR_THIS_SCENARIO_TIP ), @@ -106,13 +109,13 @@ static rct_widget window_editor_objective_options_main_widgets[] = { WIDGETS_END, }; -static rct_widget window_editor_objective_options_rides_widgets[] = { +static Widget window_editor_objective_options_rides_widgets[] = { MAIN_OBJECTIVE_OPTIONS_WIDGETS, MakeWidget({ 3, 60}, {374, 161}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), WIDGETS_END, }; -static rct_widget *window_editor_objective_options_widgets[] = { +static Widget *window_editor_objective_options_widgets[] = { window_editor_objective_options_main_widgets, window_editor_objective_options_rides_widgets, }; @@ -121,24 +124,24 @@ static rct_widget *window_editor_objective_options_widgets[] = { #pragma region Events -static void WindowEditorObjectiveOptionsMainMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowEditorObjectiveOptionsMainResize(rct_window *w); -static void WindowEditorObjectiveOptionsMainMousedown(rct_window *w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowEditorObjectiveOptionsMainDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowEditorObjectiveOptionsMainUpdate(rct_window *w); -static void WindowEditorObjectiveOptionsMainTextinput(rct_window *w, WidgetIndex widgetIndex, char *text); -static void WindowEditorObjectiveOptionsMainInvalidate(rct_window *w); -static void WindowEditorObjectiveOptionsMainPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowEditorObjectiveOptionsMainMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowEditorObjectiveOptionsMainResize(WindowBase *w); +static void WindowEditorObjectiveOptionsMainMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget); +static void WindowEditorObjectiveOptionsMainDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowEditorObjectiveOptionsMainUpdate(WindowBase *w); +static void WindowEditorObjectiveOptionsMainTextinput(WindowBase *w, WidgetIndex widgetIndex, const char *text); +static void WindowEditorObjectiveOptionsMainInvalidate(WindowBase *w); +static void WindowEditorObjectiveOptionsMainPaint(WindowBase *w, DrawPixelInfo *dpi); -static void WindowEditorObjectiveOptionsRidesMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowEditorObjectiveOptionsRidesResize(rct_window *w); -static void WindowEditorObjectiveOptionsRidesUpdate(rct_window *w); -static void WindowEditorObjectiveOptionsRidesScrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); -static void WindowEditorObjectiveOptionsRidesScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowEditorObjectiveOptionsRidesScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowEditorObjectiveOptionsRidesInvalidate(rct_window *w); -static void WindowEditorObjectiveOptionsRidesPaint(rct_window *w, rct_drawpixelinfo *dpi); -static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); +static void WindowEditorObjectiveOptionsRidesMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowEditorObjectiveOptionsRidesResize(WindowBase *w); +static void WindowEditorObjectiveOptionsRidesUpdate(WindowBase *w); +static void WindowEditorObjectiveOptionsRidesScrollgetheight(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void WindowEditorObjectiveOptionsRidesScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowEditorObjectiveOptionsRidesScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowEditorObjectiveOptionsRidesInvalidate(WindowBase *w); +static void WindowEditorObjectiveOptionsRidesPaint(WindowBase *w, DrawPixelInfo *dpi); +static void WindowEditorObjectiveOptionsRidesScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex); // 0x009A9DF4 static WindowEventList window_objective_options_main_events([](auto& events) @@ -188,17 +191,17 @@ static uint64_t window_editor_objective_options_page_hold_down_widgets[] = { #pragma endregion -static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(rct_window* w); +static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(WindowBase* w); /** * * rct2: 0x0067137D */ -rct_window* WindowEditorObjectiveOptionsOpen() +WindowBase* WindowEditorObjectiveOptionsOpen() { - rct_window* w; + WindowBase* w; - w = window_bring_to_front_by_class(WindowClass::EditorObjectiveOptions); + w = WindowBringToFrontByClass(WindowClass::EditorObjectiveOptions); if (w != nullptr) return w; @@ -215,7 +218,7 @@ rct_window* WindowEditorObjectiveOptionsOpen() return w; } -static void WindowEditorObjectiveOptionsSetPressedTab(rct_window* w) +static void WindowEditorObjectiveOptionsSetPressedTab(WindowBase* w) { int32_t i; for (i = WIDX_TAB_1; i <= WIDX_TAB_2; i++) @@ -223,14 +226,14 @@ static void WindowEditorObjectiveOptionsSetPressedTab(rct_window* w) w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void WindowEditorObjectiveOptionsAnchorBorderWidgets(rct_window* w) +static void WindowEditorObjectiveOptionsAnchorBorderWidgets(WindowBase* w) { w->ResizeFrameWithPage(); } -static void WindowEditorObjectiveOptionsDrawTabImages(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowEditorObjectiveOptionsDrawTabImages(WindowBase* w, DrawPixelInfo* dpi) { - rct_widget* widget; + Widget* widget; int32_t spriteIndex; // Tab 1 @@ -240,7 +243,7 @@ static void WindowEditorObjectiveOptionsDrawTabImages(rct_window* w, rct_drawpix if (w->page == WINDOW_EDITOR_OBJECTIVE_OPTIONS_PAGE_MAIN) spriteIndex += (w->frame_no / 4) % 16; - gfx_draw_sprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget->left, widget->top }); + GfxDrawSprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget->left, widget->top }); // Tab 2 if (!WidgetIsDisabled(*w, WIDX_TAB_2)) @@ -250,7 +253,7 @@ static void WindowEditorObjectiveOptionsDrawTabImages(rct_window* w, rct_drawpix if (w->page == WINDOW_EDITOR_OBJECTIVE_OPTIONS_PAGE_RIDES) spriteIndex += (w->frame_no / 4) % 16; - gfx_draw_sprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget->left, widget->top }); + GfxDrawSprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget->left, widget->top }); } } @@ -258,7 +261,7 @@ static void WindowEditorObjectiveOptionsDrawTabImages(rct_window* w, rct_drawpix * * rct2: 0x00668496 */ -static void WindowEditorObjectiveOptionsSetPage(rct_window* w, int32_t page) +static void WindowEditorObjectiveOptionsSetPage(WindowBase* w, int32_t page) { if (w->page == page) return; @@ -273,8 +276,8 @@ static void WindowEditorObjectiveOptionsSetPage(rct_window* w, int32_t page) w->widgets = window_editor_objective_options_widgets[page]; w->Invalidate(); WindowEditorObjectiveOptionsUpdateDisabledWidgets(w); - window_event_resize_call(w); - window_event_invalidate_call(w); + WindowEventResizeCall(w); + WindowEventInvalidateCall(w); WindowInitScrollWidgets(*w); w->Invalidate(); } @@ -283,7 +286,7 @@ static void WindowEditorObjectiveOptionsSetPage(rct_window* w, int32_t page) * * rct2: 0x0067201D */ -static void WindowEditorObjectiveOptionsSetObjective(rct_window* w, int32_t objective) +static void WindowEditorObjectiveOptionsSetObjective(WindowBase* w, int32_t objective) { gScenarioObjective.Type = objective; w->Invalidate(); @@ -329,12 +332,12 @@ static void WindowEditorObjectiveOptionsSetObjective(rct_window* w, int32_t obje * * rct2: 0x006719CA */ -static void WindowEditorObjectiveOptionsMainMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowEditorObjectiveOptionsMainMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -364,15 +367,15 @@ static void WindowEditorObjectiveOptionsMainMouseup(rct_window* w, WidgetIndex w * * rct2: 0x00672254 */ -static void WindowEditorObjectiveOptionsMainResize(rct_window* w) +static void WindowEditorObjectiveOptionsMainResize(WindowBase* w) { - window_set_resize(*w, 450, 229, 450, 229); + WindowSetResize(*w, 450, 229, 450, 229); } -static void WindowEditorObjectiveOptionsShowObjectiveDropdown(rct_window* w) +static void WindowEditorObjectiveOptionsShowObjectiveDropdown(WindowBase* w) { int32_t numItems = 0, objectiveType; - rct_widget* dropdownWidget; + Widget* dropdownWidget; uint32_t parkFlags; dropdownWidget = &w->widgets[WIDX_OBJECTIVE]; @@ -409,10 +412,10 @@ static void WindowEditorObjectiveOptionsShowObjectiveDropdown(rct_window* w) } } -static void WindowEditorObjectiveOptionsShowCategoryDropdown(rct_window* w) +static void WindowEditorObjectiveOptionsShowCategoryDropdown(WindowBase* w) { int32_t i; - rct_widget* dropdownWidget; + Widget* dropdownWidget; dropdownWidget = &w->widgets[WIDX_CATEGORY]; @@ -427,7 +430,7 @@ static void WindowEditorObjectiveOptionsShowCategoryDropdown(rct_window* w) Dropdown::SetChecked(gScenarioCategory, true); } -static void WindowEditorObjectiveOptionsArg1Increase(rct_window* w) +static void WindowEditorObjectiveOptionsArg1Increase(WindowBase* w) { switch (gScenarioObjective.Type) { @@ -478,7 +481,7 @@ static void WindowEditorObjectiveOptionsArg1Increase(rct_window* w) } break; default: - if (gScenarioObjective.NumGuests >= 5000) + if (gScenarioObjective.NumGuests >= MaxObjectiveGuests) { ContextShowError(STR_CANT_INCREASE_FURTHER, STR_NONE, {}); } @@ -491,7 +494,7 @@ static void WindowEditorObjectiveOptionsArg1Increase(rct_window* w) } } -static void WindowEditorObjectiveOptionsArg1Decrease(rct_window* w) +static void WindowEditorObjectiveOptionsArg1Decrease(WindowBase* w) { switch (gScenarioObjective.Type) { @@ -555,7 +558,7 @@ static void WindowEditorObjectiveOptionsArg1Decrease(rct_window* w) } } -static void WindowEditorObjectiveOptionsArg2Increase(rct_window* w) +static void WindowEditorObjectiveOptionsArg2Increase(WindowBase* w) { if (gScenarioObjective.Year >= 25) { @@ -568,7 +571,7 @@ static void WindowEditorObjectiveOptionsArg2Increase(rct_window* w) } } -static void WindowEditorObjectiveOptionsArg2Decrease(rct_window* w) +static void WindowEditorObjectiveOptionsArg2Decrease(WindowBase* w) { if (gScenarioObjective.Year <= 1) { @@ -585,7 +588,7 @@ static void WindowEditorObjectiveOptionsArg2Decrease(rct_window* w) * * rct2: 0x00671A0D */ -static void WindowEditorObjectiveOptionsMainMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowEditorObjectiveOptionsMainMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { switch (widgetIndex) { @@ -614,7 +617,7 @@ static void WindowEditorObjectiveOptionsMainMousedown(rct_window* w, WidgetIndex * * rct2: 0x00671A54 */ -static void WindowEditorObjectiveOptionsMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowEditorObjectiveOptionsMainDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { uint8_t newObjectiveType; @@ -643,14 +646,14 @@ static void WindowEditorObjectiveOptionsMainDropdown(rct_window* w, WidgetIndex * * rct2: 0x006721E7 */ -static void WindowEditorObjectiveOptionsMainUpdate(rct_window* w) +static void WindowEditorObjectiveOptionsMainUpdate(WindowBase* w) { uint32_t parkFlags; uint8_t objectiveType; w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_1); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_1); parkFlags = gParkFlags; objectiveType = gScenarioObjective.Type; @@ -670,7 +673,7 @@ static void WindowEditorObjectiveOptionsMainUpdate(rct_window* w) * * rct2: 0x00671A73 */ -static void WindowEditorObjectiveOptionsMainTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) +static void WindowEditorObjectiveOptionsMainTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text) { if (text == nullptr) return; @@ -704,7 +707,7 @@ static void WindowEditorObjectiveOptionsMainTextinput(rct_window* w, WidgetIndex * * rct2: 0x0067161C */ -static void WindowEditorObjectiveOptionsMainInvalidate(rct_window* w) +static void WindowEditorObjectiveOptionsMainInvalidate(WindowBase* w) { auto widgets = window_editor_objective_options_widgets[w->page]; if (w->widgets != widgets) @@ -760,7 +763,7 @@ static void WindowEditorObjectiveOptionsMainInvalidate(rct_window* w) * * rct2: 0x0067161C */ -static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowEditorObjectiveOptionsMainPaint(WindowBase* w, DrawPixelInfo* dpi) { int32_t width; StringId stringId; @@ -770,13 +773,13 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelin // Objective label auto screenCoords = w->windowPos + ScreenCoordsXY{ 8, w->widgets[WIDX_OBJECTIVE].top }; - DrawTextBasic(dpi, screenCoords, STR_OBJECTIVE_WINDOW); + DrawTextBasic(*dpi, screenCoords, STR_OBJECTIVE_WINDOW); // Objective value screenCoords = w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_OBJECTIVE].left + 1, w->widgets[WIDX_OBJECTIVE].top }; auto ft = Formatter(); ft.Add(ObjectiveDropdownOptionNames[gScenarioObjective.Type]); - DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); if (w->widgets[WIDX_OBJECTIVE_ARG_1].type != WindowWidgetType::Empty) { @@ -805,7 +808,7 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelin stringId = STR_WINDOW_OBJECTIVE_EXCITEMENT_RATING; break; } - DrawTextBasic(dpi, screenCoords, stringId); + DrawTextBasic(*dpi, screenCoords, stringId); // Objective argument 1 value screenCoords = w->windowPos @@ -838,21 +841,21 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelin ft.Add(gScenarioObjective.Currency); break; } - DrawTextBasic(dpi, screenCoords, stringId, ft, COLOUR_BLACK); + DrawTextBasic(*dpi, screenCoords, stringId, ft, COLOUR_BLACK); } if (w->widgets[WIDX_OBJECTIVE_ARG_2].type != WindowWidgetType::Empty) { // Objective argument 2 label screenCoords = w->windowPos + ScreenCoordsXY{ 28, w->widgets[WIDX_OBJECTIVE_ARG_2].top }; - DrawTextBasic(dpi, screenCoords, STR_WINDOW_OBJECTIVE_DATE); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_OBJECTIVE_DATE); // Objective argument 2 value screenCoords = w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_OBJECTIVE_ARG_2].left + 1, w->widgets[WIDX_OBJECTIVE_ARG_2].top }; ft = Formatter(); ft.Add((gScenarioObjective.Year * MONTH_COUNT) - 1); - DrawTextBasic(dpi, screenCoords, STR_WINDOW_OBJECTIVE_VALUE_DATE, ft); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_OBJECTIVE_VALUE_DATE, ft); } // Park name @@ -866,7 +869,7 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelin ft = Formatter(); ft.Add(STR_STRING); ft.Add(parkName); - DrawTextEllipsised(dpi, screenCoords, width, STR_WINDOW_PARK_NAME, ft); + DrawTextEllipsised(*dpi, screenCoords, width, STR_WINDOW_PARK_NAME, ft); } // Scenario name @@ -876,11 +879,11 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelin ft = Formatter(); ft.Add(STR_STRING); ft.Add(gScenarioName.c_str()); - DrawTextEllipsised(dpi, screenCoords, width, STR_WINDOW_SCENARIO_NAME, ft); + DrawTextEllipsised(*dpi, screenCoords, width, STR_WINDOW_SCENARIO_NAME, ft); // Scenario details label screenCoords = w->windowPos + ScreenCoordsXY{ 8, w->widgets[WIDX_DETAILS].top }; - DrawTextBasic(dpi, screenCoords, STR_WINDOW_PARK_DETAILS); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_PARK_DETAILS); // Scenario details value screenCoords = w->windowPos + ScreenCoordsXY{ 16, w->widgets[WIDX_DETAILS].top + 10 }; @@ -889,29 +892,29 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, rct_drawpixelin ft = Formatter(); ft.Add(STR_STRING); ft.Add(gScenarioDetails.c_str()); - DrawTextWrapped(dpi, screenCoords, width, STR_BLACK_STRING, ft); + DrawTextWrapped(*dpi, screenCoords, width, STR_BLACK_STRING, ft); // Scenario category label screenCoords = w->windowPos + ScreenCoordsXY{ 8, w->widgets[WIDX_CATEGORY].top }; - DrawTextBasic(dpi, screenCoords, STR_WINDOW_SCENARIO_GROUP); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_SCENARIO_GROUP); // Scenario category value screenCoords = w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_CATEGORY].left + 1, w->widgets[WIDX_CATEGORY].top }; ft = Formatter(); ft.Add(ScenarioCategoryStringIds[gScenarioCategory]); - DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } /** * * rct2: 0x006724A4 */ -static void WindowEditorObjectiveOptionsRidesMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowEditorObjectiveOptionsRidesMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -924,21 +927,21 @@ static void WindowEditorObjectiveOptionsRidesMouseup(rct_window* w, WidgetIndex * * rct2: 0x006725A8 */ -static void WindowEditorObjectiveOptionsRidesResize(rct_window* w) +static void WindowEditorObjectiveOptionsRidesResize(WindowBase* w) { - window_set_resize(*w, 380, 224, 380, 224); + WindowSetResize(*w, 380, 224, 380, 224); } /** * * rct2: 0x00672544 */ -static void WindowEditorObjectiveOptionsRidesUpdate(rct_window* w) +static void WindowEditorObjectiveOptionsRidesUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - window_event_resize_call(w); - widget_invalidate(*w, WIDX_TAB_2); + WindowEventInvalidateCall(w); + WindowEventResizeCall(w); + WidgetInvalidate(*w, WIDX_TAB_2); auto numItems = 0; for (auto& ride : GetRideManager()) @@ -962,7 +965,7 @@ static void WindowEditorObjectiveOptionsRidesUpdate(rct_window* w) * rct2: 0x006724BF */ static void WindowEditorObjectiveOptionsRidesScrollgetheight( - rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) + WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { *height = w->no_list_items * 12; } @@ -972,14 +975,14 @@ static void WindowEditorObjectiveOptionsRidesScrollgetheight( * rct2: 0x006724FC */ static void WindowEditorObjectiveOptionsRidesScrollmousedown( - rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) + WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { auto i = screenCoords.y / 12; if (i < 0 || i >= w->no_list_items) return; const auto rideId = RideId::FromUnderlying(w->list_item_positions[i]); - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride != nullptr) { ride->lifecycle_flags ^= RIDE_LIFECYCLE_INDESTRUCTIBLE; @@ -992,7 +995,7 @@ static void WindowEditorObjectiveOptionsRidesScrollmousedown( * rct2: 0x006724CC */ static void WindowEditorObjectiveOptionsRidesScrollmouseover( - rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) + WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { int32_t i; @@ -1011,9 +1014,9 @@ static void WindowEditorObjectiveOptionsRidesScrollmouseover( * * rct2: 0x006722B5 */ -static void WindowEditorObjectiveOptionsRidesInvalidate(rct_window* w) +static void WindowEditorObjectiveOptionsRidesInvalidate(WindowBase* w) { - rct_widget* widgets; + Widget* widgets; widgets = window_editor_objective_options_widgets[w->page]; if (w->widgets != widgets) @@ -1035,23 +1038,23 @@ static void WindowEditorObjectiveOptionsRidesInvalidate(rct_window* w) * * rct2: 0x00672340 */ -static void WindowEditorObjectiveOptionsRidesPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowEditorObjectiveOptionsRidesPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowEditorObjectiveOptionsDrawTabImages(w, dpi); DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 6, w->widgets[WIDX_PAGE_BACKGROUND].top + 3 }, STR_WINDOW_PRESERVATION_ORDER); + *dpi, w->windowPos + ScreenCoordsXY{ 6, w->widgets[WIDX_PAGE_BACKGROUND].top + 3 }, STR_WINDOW_PRESERVATION_ORDER); } /** * * rct2: 0x0067236F */ -static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowEditorObjectiveOptionsRidesScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { int32_t colour = ColourMapA[w->colours[1]].mid_light; - gfx_fill_rect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width - 1, dpi->y + dpi->height - 1 } }, colour); + GfxFillRect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width - 1, dpi->y + dpi->height - 1 } }, colour); for (int32_t i = 0; i < w->no_list_items; i++) { @@ -1061,26 +1064,26 @@ static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window* w, rct_draw continue; // Checkbox - gfx_fill_rect_inset(dpi, { { 2, y }, { 11, y + 10 } }, w->colours[1], INSET_RECT_F_E0); + GfxFillRectInset(dpi, { { 2, y }, { 11, y + 10 } }, w->colours[1], INSET_RECT_F_E0); // Highlighted auto stringId = STR_BLACK_STRING; if (i == w->selected_list_item) { stringId = STR_WINDOW_COLOUR_2_STRINGID; - gfx_filter_rect(dpi, { 0, y, w->width, y + 11 }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(dpi, { 0, y, w->width, y + 11 }, FilterPaletteID::PaletteDarken1); } // Checkbox mark const auto rideId = RideId::FromUnderlying(w->list_item_positions[i]); - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride != nullptr) { if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) { auto darkness = stringId == STR_WINDOW_COLOUR_2_STRINGID ? TextDarkness::ExtraDark : TextDarkness::Dark; - gfx_draw_string( - dpi, { 2, y }, static_cast(CheckBoxMarkString), + GfxDrawString( + *dpi, { 2, y }, static_cast(CheckBoxMarkString), { static_cast(w->colours[1] & 0x7F), FontStyle::Medium, darkness }); } @@ -1088,7 +1091,7 @@ static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window* w, rct_draw Formatter ft; ride->FormatNameTo(ft); - DrawTextBasic(dpi, { 15, y }, stringId, ft); + DrawTextBasic(*dpi, { 15, y }, stringId, ft); } } } @@ -1097,7 +1100,7 @@ static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window* w, rct_draw * * rct2: 0x00672609 */ -static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(rct_window* w) +static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(WindowBase* w) { // Check if there are any rides (not shops or facilities) const auto& rideManager = GetRideManager(); diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index 3b62c41e72..94e4459b4e 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -80,6 +80,7 @@ enum { WIDX_INTEREST_RATE_INCREASE, WIDX_INTEREST_RATE_DECREASE, WIDX_FORBID_MARKETING, + WIDX_RCT1_INTEREST, // Guests tab WIDX_CASH_PER_GUEST = WIDX_PAGE_START, @@ -118,7 +119,7 @@ enum { WIDX_HARD_GUEST_GENERATION }; -static rct_widget window_editor_scenario_options_financial_widgets[] = { +static Widget window_editor_scenario_options_financial_widgets[] = { WINDOW_SHIM(STR_SCENARIO_OPTIONS_FINANCIAL, WW_FINANCIAL, WH_FINANCIAL), MakeWidget ({ 0, 43}, { WW_FINANCIAL, 106}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeTab ({ 3, 17}, STR_SCENARIO_OPTIONS_FINANCIAL_TIP), @@ -130,10 +131,11 @@ static rct_widget window_editor_scenario_options_financial_widgets[] = { MakeSpinnerWidgets({168, 99}, { 100, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets MakeSpinnerWidgets({168, 116}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets MakeWidget ({ 8, 133}, {WW_FINANCIAL - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORBID_MARKETING, STR_FORBID_MARKETING_TIP ), + MakeWidget ({ 8, 116}, {WW_FINANCIAL - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_RCT1_INTEREST, STR_RCT1_INTEREST_TIP ), WIDGETS_END, }; -static rct_widget window_editor_scenario_options_guests_widgets[] = { +static Widget window_editor_scenario_options_guests_widgets[] = { WINDOW_SHIM(STR_SCENARIO_OPTIONS_GUESTS, WW_GUESTS, WH_GUESTS), MakeWidget ({ 0, 43}, { WW_GUESTS, 106}, WindowWidgetType::Resize, WindowColour::Secondary), MakeRemapWidget ({ 3, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP ), @@ -148,7 +150,7 @@ static rct_widget window_editor_scenario_options_guests_widgets[] = { WIDGETS_END, }; -static rct_widget window_editor_scenario_options_park_widgets[] = { +static Widget window_editor_scenario_options_park_widgets[] = { WINDOW_SHIM(STR_SCENARIO_OPTIONS_PARK, WW_PARK, WH_PARK), MakeWidget ({ 0, 43}, { WW_PARK, 106}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeRemapWidget ({ 3, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP), @@ -169,7 +171,7 @@ static rct_widget window_editor_scenario_options_park_widgets[] = { WIDGETS_END, }; -static rct_widget *window_editor_scenario_options_widgets[] = { +static Widget *window_editor_scenario_options_widgets[] = { window_editor_scenario_options_financial_widgets, window_editor_scenario_options_guests_widgets, window_editor_scenario_options_park_widgets, @@ -284,7 +286,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { switch (page) { @@ -320,9 +322,9 @@ private: ResizeFrameWithPage(); } - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { - rct_widget* widget; + Widget* widget; int32_t spriteIndex; // Tab 1 @@ -331,7 +333,7 @@ private: if (page == WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_FINANCIAL) spriteIndex += (frame_no / 2) % 8; - gfx_draw_sprite(&dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget->left, widget->top }); + GfxDrawSprite(&dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget->left, widget->top }); // Tab 2 widget = &widgets[WIDX_TAB_2]; @@ -339,12 +341,12 @@ private: if (page == WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_GUESTS) spriteIndex += (frame_no / 4) % 8; - gfx_draw_sprite(&dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget->left, widget->top }); + GfxDrawSprite(&dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget->left, widget->top }); // Tab 3 widget = &widgets[WIDX_TAB_3]; spriteIndex = SPR_TAB_PARK; - gfx_draw_sprite(&dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget->left, widget->top }); + GfxDrawSprite(&dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget->left, widget->top }); } void SetPage(int32_t newPage) @@ -371,7 +373,7 @@ private: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -394,12 +396,20 @@ private: Invalidate(); break; } + case WIDX_RCT1_INTEREST: + { + auto scenarioSetSetting = ScenarioSetSettingAction( + ScenarioSetSetting::UseRCT1Interest, gParkFlags & PARK_FLAGS_RCT1_INTEREST ? 0 : 1); + GameActions::Execute(&scenarioSetSetting); + Invalidate(); + break; + } } } void FinancialResize() { - window_set_resize(*this, 280, 149, 280, 149); + WindowSetResize(*this, 280, 149, 280, 149); } void ShowClimateDropdown() @@ -531,8 +541,8 @@ private: if (gScreenFlags == SCREEN_FLAGS_PLAYING) { - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::BottomToolbar); } } @@ -540,12 +550,12 @@ private: { frame_no++; FinancialPrepareDraw(); - widget_invalidate(*this, WIDX_TAB_1); + WidgetInvalidate(*this, WIDX_TAB_1); } void FinancialPrepareDraw() { - rct_widget* newWidgets = window_editor_scenario_options_widgets[page]; + Widget* newWidgets = window_editor_scenario_options_widgets[page]; if (widgets != newWidgets) { widgets = newWidgets; @@ -557,7 +567,7 @@ private: if (gParkFlags & PARK_FLAGS_NO_MONEY) { SetWidgetPressed(WIDX_NO_MONEY, true); - for (int32_t i = WIDX_INITIAL_CASH; i <= WIDX_FORBID_MARKETING; i++) + for (int32_t i = WIDX_INITIAL_CASH; i <= WIDX_RCT1_INTEREST; i++) widgets[i].type = WindowWidgetType::Empty; } else @@ -572,10 +582,23 @@ private: widgets[WIDX_MAXIMUM_LOAN].type = WindowWidgetType::Spinner; widgets[WIDX_MAXIMUM_LOAN_INCREASE].type = WindowWidgetType::Button; widgets[WIDX_MAXIMUM_LOAN_DECREASE].type = WindowWidgetType::Button; - widgets[WIDX_INTEREST_RATE].type = WindowWidgetType::Spinner; - widgets[WIDX_INTEREST_RATE_INCREASE].type = WindowWidgetType::Button; - widgets[WIDX_INTEREST_RATE_DECREASE].type = WindowWidgetType::Button; widgets[WIDX_FORBID_MARKETING].type = WindowWidgetType::Checkbox; + + if (gParkFlags & PARK_FLAGS_RCT1_INTEREST) + { + widgets[WIDX_INTEREST_RATE].type = WindowWidgetType::Empty; + widgets[WIDX_INTEREST_RATE_INCREASE].type = WindowWidgetType::Empty; + widgets[WIDX_INTEREST_RATE_DECREASE].type = WindowWidgetType::Empty; + widgets[WIDX_RCT1_INTEREST].type = WindowWidgetType::Checkbox; + SetWidgetPressed(WIDX_RCT1_INTEREST, true); + } + else + { + widgets[WIDX_INTEREST_RATE].type = WindowWidgetType::Spinner; + widgets[WIDX_INTEREST_RATE_INCREASE].type = WindowWidgetType::Button; + widgets[WIDX_INTEREST_RATE_DECREASE].type = WindowWidgetType::Button; + widgets[WIDX_RCT1_INTEREST].type = WindowWidgetType::Empty; + } } SetWidgetPressed(WIDX_FORBID_MARKETING, gParkFlags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN); @@ -586,7 +609,7 @@ private: AnchorBorderWidgets(); } - void FinancialDraw(rct_drawpixelinfo& dpi) + void FinancialDraw(DrawPixelInfo& dpi) { ScreenCoordsXY screenCoords{}; @@ -597,49 +620,49 @@ private: if (initialCashWidget.type != WindowWidgetType::Empty) { screenCoords = windowPos + ScreenCoordsXY{ 8, initialCashWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_INIT_CASH_LABEL); + DrawTextBasic(dpi, screenCoords, STR_INIT_CASH_LABEL); screenCoords = windowPos + ScreenCoordsXY{ initialCashWidget.left + 1, initialCashWidget.top }; auto ft = Formatter(); ft.Add(gInitialCash); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } const auto& initialLoanWidget = widgets[WIDX_INITIAL_LOAN]; if (initialLoanWidget.type != WindowWidgetType::Empty) { screenCoords = windowPos + ScreenCoordsXY{ 8, initialLoanWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_INIT_LOAN_LABEL); + DrawTextBasic(dpi, screenCoords, STR_INIT_LOAN_LABEL); screenCoords = windowPos + ScreenCoordsXY{ initialLoanWidget.left + 1, initialLoanWidget.top }; auto ft = Formatter(); ft.Add(gBankLoan); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } const auto& maximumLoanWidget = widgets[WIDX_MAXIMUM_LOAN]; if (maximumLoanWidget.type != WindowWidgetType::Empty) { screenCoords = windowPos + ScreenCoordsXY{ 8, maximumLoanWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_MAX_LOAN_LABEL); + DrawTextBasic(dpi, screenCoords, STR_MAX_LOAN_LABEL); screenCoords = windowPos + ScreenCoordsXY{ maximumLoanWidget.left + 1, maximumLoanWidget.top }; auto ft = Formatter(); ft.Add(gMaxBankLoan); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } const auto& interestRateWidget = widgets[WIDX_INTEREST_RATE]; if (interestRateWidget.type != WindowWidgetType::Empty) { screenCoords = windowPos + ScreenCoordsXY{ 8, interestRateWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_INTEREST_RATE_LABEL); + DrawTextBasic(dpi, screenCoords, STR_INTEREST_RATE_LABEL); screenCoords = windowPos + ScreenCoordsXY{ interestRateWidget.left + 1, interestRateWidget.top }; auto ft = Formatter(); ft.Add(std::clamp(static_cast(gBankLoanInterestRate), INT16_MIN, INT16_MAX)); - DrawTextBasic(&dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); } } @@ -652,7 +675,7 @@ private: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -680,7 +703,7 @@ private: void GuestsResize() { - window_set_resize(*this, 380, 149, 380, 149); + WindowSetResize(*this, 380, 149, 380, 149); } void GuestsMouseDown(WidgetIndex widgetIndex) @@ -798,12 +821,12 @@ private: { frame_no++; GuestsPrepareDraw(); - widget_invalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_2); } void GuestsPrepareDraw() { - rct_widget* newWidgets = window_editor_scenario_options_widgets[page]; + Widget* newWidgets = window_editor_scenario_options_widgets[page]; if (widgets != newWidgets) { widgets = newWidgets; @@ -834,7 +857,7 @@ private: AnchorBorderWidgets(); } - void GuestsDraw(rct_drawpixelinfo& dpi) + void GuestsDraw(DrawPixelInfo& dpi) { ScreenCoordsXY screenCoords{}; @@ -846,47 +869,47 @@ private: { // Cash per guest label screenCoords = windowPos + ScreenCoordsXY{ 8, cashPerGuestWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_CASH_PER_GUEST_LABEL); + DrawTextBasic(dpi, screenCoords, STR_CASH_PER_GUEST_LABEL); // Cash per guest value screenCoords = windowPos + ScreenCoordsXY{ cashPerGuestWidget.left + 1, cashPerGuestWidget.top }; auto ft = Formatter(); ft.Add(gGuestInitialCash); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } // Guest initial happiness label const auto& initialHappinessWidget = widgets[WIDX_GUEST_INITIAL_HAPPINESS]; screenCoords = windowPos + ScreenCoordsXY{ 8, initialHappinessWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_INIT_HAPPINESS); + DrawTextBasic(dpi, screenCoords, STR_GUEST_INIT_HAPPINESS); // Guest initial happiness value screenCoords = windowPos + ScreenCoordsXY{ initialHappinessWidget.left + 1, initialHappinessWidget.top }; auto ft = Formatter(); ft.Add((gGuestInitialHappiness * 100) / 255); - DrawTextBasic(&dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); // Guest initial hunger label const auto& initialHungerWidget = widgets[WIDX_GUEST_INITIAL_HUNGER]; screenCoords = windowPos + ScreenCoordsXY{ 8, initialHungerWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_INIT_HUNGER); + DrawTextBasic(dpi, screenCoords, STR_GUEST_INIT_HUNGER); // Guest initial hunger value screenCoords = windowPos + ScreenCoordsXY{ initialHungerWidget.left + 1, initialHungerWidget.top }; ft = Formatter(); ft.Add(((255 - gGuestInitialHunger) * 100) / 255); - DrawTextBasic(&dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); // Guest initial thirst label const auto& initialThirstWidget = widgets[WIDX_GUEST_INITIAL_THIRST]; screenCoords = windowPos + ScreenCoordsXY{ 8, initialThirstWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_INIT_THIRST); + DrawTextBasic(dpi, screenCoords, STR_GUEST_INIT_THIRST); // Guest initial thirst value screenCoords = windowPos + ScreenCoordsXY{ initialThirstWidget.left + 1, initialThirstWidget.top }; ft = Formatter(); ft.Add(((255 - gGuestInitialThirst) * 100) / 255); - DrawTextBasic(&dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); } #pragma endregion @@ -898,7 +921,7 @@ private: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -951,13 +974,13 @@ private: void ParkResize() { - window_set_resize(*this, 400, 200, 400, 200); + WindowSetResize(*this, 400, 200, 400, 200); } void ParkMouseDown(WidgetIndex widgetIndex) { - rct_widget* dropdownWidget; - rct_widget* widget = &widgets[widgetIndex]; + Widget* dropdownWidget; + Widget* widget = &widgets[widgetIndex]; switch (widgetIndex) { @@ -1097,12 +1120,12 @@ private: { frame_no++; ParkPrepareDraw(); - widget_invalidate(*this, WIDX_TAB_3); + WidgetInvalidate(*this, WIDX_TAB_3); } void ParkPrepareDraw() { - rct_widget* newWidgets = window_editor_scenario_options_widgets[page]; + Widget* newWidgets = window_editor_scenario_options_widgets[page]; if (widgets != newWidgets) { widgets = newWidgets; @@ -1153,7 +1176,7 @@ private: AnchorBorderWidgets(); } - void ParkDraw(rct_drawpixelinfo& dpi) + void ParkDraw(DrawPixelInfo& dpi) { ScreenCoordsXY screenCoords{}; @@ -1165,13 +1188,13 @@ private: { // Cost to buy land label screenCoords = windowPos + ScreenCoordsXY{ 8, landCostWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_LAND_COST_LABEL); + DrawTextBasic(dpi, screenCoords, STR_LAND_COST_LABEL); // Cost to buy land value screenCoords = windowPos + ScreenCoordsXY{ landCostWidget.left + 1, landCostWidget.top }; auto ft = Formatter(); ft.Add(gLandPrice); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } const auto& constructionRightsCostWidget = widgets[WIDX_CONSTRUCTION_RIGHTS_COST]; @@ -1179,14 +1202,14 @@ private: { // Cost to buy construction rights label screenCoords = windowPos + ScreenCoordsXY{ 8, constructionRightsCostWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_RIGHTS_COST_LABEL); + DrawTextBasic(dpi, screenCoords, STR_RIGHTS_COST_LABEL); // Cost to buy construction rights value screenCoords = windowPos + ScreenCoordsXY{ constructionRightsCostWidget.left + 1, constructionRightsCostWidget.top }; auto ft = Formatter(); ft.Add(gConstructionRightsPrice); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } const auto& payForParkOrRidesWidget = widgets[WIDX_PAY_FOR_PARK_OR_RIDES]; @@ -1204,7 +1227,7 @@ private: else ft.Add(STR_PAY_PARK_ENTER); - DrawTextBasic(&dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } const auto& entryPriceWidget = widgets[WIDX_ENTRY_PRICE]; @@ -1212,31 +1235,31 @@ private: { // Entry price label screenCoords = windowPos + ScreenCoordsXY{ payForParkOrRidesWidget.right + 8, entryPriceWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_ENTRY_PRICE_LABEL); + DrawTextBasic(dpi, screenCoords, STR_ENTRY_PRICE_LABEL); // Entry price value screenCoords = windowPos + ScreenCoordsXY{ entryPriceWidget.left + 1, entryPriceWidget.top }; auto ft = Formatter(); ft.Add(gParkEntranceFee); - DrawTextBasic(&dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } // Climate label const auto& climateWidget = widgets[WIDX_CLIMATE]; screenCoords = windowPos + ScreenCoordsXY{ 8, climateWidget.top }; - DrawTextBasic(&dpi, screenCoords, STR_CLIMATE_LABEL); + DrawTextBasic(dpi, screenCoords, STR_CLIMATE_LABEL); // Climate value screenCoords = windowPos + ScreenCoordsXY{ climateWidget.left + 1, climateWidget.top }; auto ft = Formatter(); ft.Add(ClimateNames[static_cast(gClimate)]); - DrawTextBasic(&dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } #pragma endregion }; -rct_window* WindowEditorScenarioOptionsOpen() +WindowBase* WindowEditorScenarioOptionsOpen() { return WindowFocusOrCreate(WindowClass::EditorScenarioOptions, 280, 148, WF_NO_SCROLLING); } diff --git a/src/openrct2-ui/windows/Error.cpp b/src/openrct2-ui/windows/Error.cpp index 81d41c14bb..c92be3b339 100644 --- a/src/openrct2-ui/windows/Error.cpp +++ b/src/openrct2-ui/windows/Error.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ enum { WIDX_BACKGROUND }; -static rct_widget window_error_widgets[] = { +static Widget window_error_widgets[] = { MakeWidget({0, 0}, {200, 42}, WindowWidgetType::ImgBtn, WindowColour::Primary), WIDGETS_END, }; @@ -37,7 +37,7 @@ private: public: ErrorWindow(std::string text, uint16_t numLines) - : _text(text) + : _text(std::move(text)) , _numLines(numLines) { } @@ -55,46 +55,46 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { ScreenCoordsXY leftTop{ windowPos }; ScreenCoordsXY rightBottom{ windowPos + ScreenCoordsXY{ width - 1, height - 1 } }; ScreenCoordsXY leftBottom{ leftTop.x, rightBottom.y }; ScreenCoordsXY rightTop{ rightBottom.x, leftTop.y }; - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, FilterPaletteID::Palette45); - gfx_filter_rect(&dpi, ScreenRect{ leftTop, rightBottom }, FilterPaletteID::PaletteGlassSaturatedRed); + GfxFilterRect(&dpi, ScreenRect{ leftTop, rightBottom }, FilterPaletteID::PaletteGlassSaturatedRed); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ leftTop + ScreenCoordsXY{ 0, 2 }, leftBottom - ScreenCoordsXY{ 0, 2 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ rightTop + ScreenCoordsXY{ 0, 2 }, rightBottom - ScreenCoordsXY{ 0, 2 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ leftBottom + ScreenCoordsXY{ 2, 0 }, rightBottom - ScreenCoordsXY{ 2, 0 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ leftTop + ScreenCoordsXY{ 2, 0 }, rightTop - ScreenCoordsXY{ 2, 0 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ rightTop + ScreenCoordsXY{ 1, 1 }, rightTop + ScreenCoordsXY{ 1, 1 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ rightTop + ScreenCoordsXY{ -1, 1 }, rightTop + ScreenCoordsXY{ -1, 1 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ leftBottom + ScreenCoordsXY{ 1, -1 }, leftBottom + ScreenCoordsXY{ 1, -1 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect( + GfxFilterRect( &dpi, ScreenRect{ rightBottom - ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, FilterPaletteID::PaletteDarken3); - draw_string_centred_raw( - &dpi, { leftTop + ScreenCoordsXY{ (width + 1) / 2 - 1, 1 } }, _numLines, _text.data(), FontStyle::Medium); + DrawStringCentredRaw( + dpi, { leftTop + ScreenCoordsXY{ (width + 1) / 2 - 1, 1 } }, _numLines, _text.data(), FontStyle::Medium); } void OnUnknown5() override @@ -107,9 +107,9 @@ public: } }; -rct_window* WindowErrorOpen(std::string_view title, std::string_view message) +WindowBase* WindowErrorOpen(std::string_view title, std::string_view message) { - window_close_by_class(WindowClass::Error); + WindowCloseByClass(WindowClass::Error); std::string buffer = "{BLACK}"; buffer.append(title); @@ -121,7 +121,7 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message) buffer.append(message); } - log_verbose("show error, %s", buffer.c_str() + 1); + LOG_VERBOSE("show error, %s", buffer.c_str() + 1); // Don't do unnecessary work in headless. Also saves checking if cursor state is null. if (gOpenRCT2Headless) @@ -135,14 +135,14 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message) return nullptr; } - int32_t width = gfx_get_string_width_new_lined(buffer.data(), FontStyle::Medium); + int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::Medium); width = std::clamp(width, 64, 196); int32_t numLines{}; - gfx_wrap_string(buffer.data(), width + 1, FontStyle::Medium, &numLines); + GfxWrapString(buffer, width + 1, FontStyle::Medium, &buffer, &numLines); width = width + 3; - int32_t height = (numLines + 1) * font_get_line_height(FontStyle::Medium) + 4; + int32_t height = (numLines + 1) * FontGetLineHeight(FontStyle::Medium) + 4; int32_t screenWidth = ContextGetWidth(); int32_t screenHeight = ContextGetHeight(); const CursorState* state = ContextGetCursorState(); @@ -155,15 +155,15 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message) windowPosition.y = std::min(windowPosition.y - height - 40, maxY); } - auto errorWindow = std::make_unique(buffer, numLines); + auto errorWindow = std::make_unique(std::move(buffer), numLines); return WindowCreate( std::move(errorWindow), WindowClass::Error, windowPosition, width, height, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_RESIZABLE); } -rct_window* WindowErrorOpen(StringId title, StringId message, const Formatter& args) +WindowBase* WindowErrorOpen(StringId title, StringId message, const Formatter& args) { - auto titlez = format_string(title, args.Data()); - auto messagez = format_string(message, args.Data()); + auto titlez = FormatStringID(title, args.Data()); + auto messagez = FormatStringID(message, args.Data()); return WindowErrorOpen(titlez, messagez); } diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index 988383a7d2..7818028718 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -109,7 +109,7 @@ static constexpr const int32_t RSW_OTHER_TABS = WW_OTHER_TABS; MakeTab({127, 17}, STR_FINANCES_SHOW_MARKETING_TAB_TIP ), \ MakeTab({158, 17}, STR_FINANCES_RESEARCH_TIP ) -static rct_widget _windowFinancesSummaryWidgets[] = +static Widget _windowFinancesSummaryWidgets[] = { MAIN_FINANCES_WIDGETS(STR_FINANCIAL_SUMMARY, RSW_OTHER_TABS, RSH_SUMMARY, WW_OTHER_TABS, WH_SUMMARY), MakeWidget ({130, 50}, {391, 211}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_HORIZONTAL ), @@ -117,25 +117,25 @@ static rct_widget _windowFinancesSummaryWidgets[] = WIDGETS_END, }; -static rct_widget _windowFinancesCashWidgets[] = +static Widget _windowFinancesCashWidgets[] = { MAIN_FINANCES_WIDGETS(STR_FINANCIAL_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), WIDGETS_END, }; -static rct_widget _windowFinancesParkValueWidgets[] = +static Widget _windowFinancesParkValueWidgets[] = { MAIN_FINANCES_WIDGETS(STR_PARK_VALUE_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), WIDGETS_END, }; -static rct_widget _windowFinancesProfitWidgets[] = +static Widget _windowFinancesProfitWidgets[] = { MAIN_FINANCES_WIDGETS(STR_PROFIT_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), WIDGETS_END, }; -static rct_widget _windowFinancesMarketingWidgets[] = +static Widget _windowFinancesMarketingWidgets[] = { MAIN_FINANCES_WIDGETS(STR_MARKETING, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), MakeWidget({3, 47}, { WW_OTHER_TABS - 6, 45}, WindowWidgetType::Groupbox, WindowColour::Tertiary , STR_MARKETING_CAMPAIGNS_IN_OPERATION ), @@ -149,7 +149,7 @@ static rct_widget _windowFinancesMarketingWidgets[] = WIDGETS_END, }; -static rct_widget _windowFinancesResearchWidgets[] = +static Widget _windowFinancesResearchWidgets[] = { MAIN_FINANCES_WIDGETS(STR_RESEARCH_FUNDING, RSW_RESEARCH, RSH_RESEARCH, WW_RESEARCH, WH_RESEARCH), MakeWidget({ 3, 47}, { WW_RESEARCH - 6, 45}, WindowWidgetType::Groupbox, WindowColour::Tertiary, STR_RESEARCH_FUNDING_ ), @@ -167,7 +167,7 @@ static rct_widget _windowFinancesResearchWidgets[] = }; // clang-format on -static rct_widget* _windowFinancesPageWidgets[] = { +static Widget* _windowFinancesPageWidgets[] = { _windowFinancesSummaryWidgets, // WINDOW_FINANCES_PAGE_SUMMARY _windowFinancesCashWidgets, // WINDOW_FINANCES_PAGE_FINANCIAL_GRAPH _windowFinancesParkValueWidgets, // WINDOW_FINANCES_PAGE_VALUE_GRAPH @@ -318,7 +318,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(dpi); @@ -356,14 +356,14 @@ public: return {}; } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { if (page != WINDOW_FINANCES_PAGE_SUMMARY) return; auto screenCoords = ScreenCoordsXY{ 0, TABLE_CELL_HEIGHT + 2 }; - rct_widget self = widgets[WIDX_SUMMARY_SCROLL]; + Widget self = widgets[WIDX_SUMMARY_SCROLL]; int32_t row_width = std::max(scrolls[0].h_right, self.width()); // Expenditure / Income row labels @@ -371,7 +371,7 @@ public: { // Darken every even row if (i % 2 == 0) - gfx_fill_rect( + GfxFillRect( &dpi, { screenCoords - ScreenCoordsXY{ 0, 1 }, screenCoords + ScreenCoordsXY{ row_width, (TABLE_CELL_HEIGHT - 2) } }, @@ -393,7 +393,7 @@ public: ft.Add(STR_FINANCES_SUMMARY_MONTH_HEADING); ft.Add(monthyear); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, + dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, monthyear == currentMonthYear ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING, ft, { TextUnderline::On, TextAlignment::RIGHT }); screenCoords.y += 14; @@ -411,7 +411,7 @@ public: ft = Formatter(); ft.Add(expenditure); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, format, ft, + dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, format, ft, { TextAlignment::RIGHT }); } screenCoords.y += TABLE_CELL_HEIGHT; @@ -423,9 +423,9 @@ public: ft = Formatter(); ft.Add(profit); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, format, ft, { TextAlignment::RIGHT }); + dpi, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, 0 }, format, ft, { TextAlignment::RIGHT }); - gfx_fill_rect( + GfxFillRect( &dpi, { screenCoords + ScreenCoordsXY{ 10, -2 }, screenCoords + ScreenCoordsXY{ EXPENDITURE_COLUMN_WIDTH, -2 } }, PALETTE_INDEX_10); @@ -461,8 +461,8 @@ public: width = WW_OTHER_TABS; height = WH_OTHER_TABS; } - window_event_resize_call(this); - window_event_invalidate_call(this); + WindowEventResizeCall(this); + WindowEventInvalidateCall(this); WindowInitScrollWidgets(*this); @@ -481,16 +481,29 @@ public: { case WIDX_LOAN_INCREASE: { + // If loan can be increased, do so. + // If not, action shows error message. auto newLoan = gBankLoan + 1000.00_GBP; + if (gBankLoan < gMaxBankLoan) + { + newLoan = std::min(gMaxBankLoan, newLoan); + } auto gameAction = ParkSetLoanAction(newLoan); GameActions::Execute(&gameAction); break; } case WIDX_LOAN_DECREASE: { - if (gBankLoan > 0) + // If loan is positive, decrease it. + // If loan is negative, action shows error message. + // If loan is exactly 0, prevent error message. + if (gBankLoan != 0) { auto newLoan = gBankLoan - 1000.00_GBP; + if (gBankLoan > 0) + { + newLoan = std::max(static_cast(0LL), newLoan); + } auto gameAction = ParkSetLoanAction(newLoan); GameActions::Execute(&gameAction); } @@ -513,13 +526,13 @@ public: InitialiseScrollPosition(WIDX_SUMMARY_SCROLL, 0); } - void OnDrawSummary(rct_drawpixelinfo& dpi) + void OnDrawSummary(DrawPixelInfo& dpi) { auto screenCoords = windowPos + ScreenCoordsXY{ 8, 51 }; // Expenditure / Income heading DrawTextBasic( - &dpi, screenCoords, STR_FINANCES_SUMMARY_EXPENDITURE_INCOME, {}, + dpi, screenCoords, STR_FINANCES_SUMMARY_EXPENDITURE_INCOME, {}, { COLOUR_BLACK, TextUnderline::On, TextAlignment::LEFT }); screenCoords.y += 14; @@ -528,51 +541,53 @@ public: { // Darken every even row if (i % 2 == 0) - gfx_fill_rect( + GfxFillRect( &dpi, { screenCoords - ScreenCoordsXY{ 0, 1 }, screenCoords + ScreenCoordsXY{ 121, (TABLE_CELL_HEIGHT - 2) } }, ColourMapA[colours[1]].lighter | 0x1000000); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, _windowFinancesSummaryRowLabels[i]); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, _windowFinancesSummaryRowLabels[i]); screenCoords.y += TABLE_CELL_HEIGHT; } // Horizontal rule below expenditure / income table - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { windowPos + ScreenCoordsXY{ 8, 272 }, windowPos + ScreenCoordsXY{ 8 + 513, 272 + 1 } }, colours[1], INSET_RECT_FLAG_BORDER_INSET); // Loan and interest rate - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 8, 279 }, STR_FINANCES_SUMMARY_LOAN); - auto ft = Formatter(); - ft.Add(gBankLoanInterestRate); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 167, 279 }, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 8, 279 }, STR_FINANCES_SUMMARY_LOAN); + if (!(gParkFlags & PARK_FLAGS_RCT1_INTEREST)) + { + auto ft = Formatter(); + ft.Add(gBankLoanInterestRate); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 167, 279 }, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft); + } // Current cash - ft = Formatter(); + auto ft = Formatter(); ft.Add(gCash); StringId stringId = gCash >= 0 ? STR_CASH_LABEL : STR_CASH_NEGATIVE_LABEL; - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 8, 294 }, stringId, ft); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 8, 294 }, stringId, ft); // Objective related financial information if (gScenarioObjective.Type == OBJECTIVE_MONTHLY_FOOD_INCOME) { - auto lastMonthProfit = finance_get_last_month_shop_profit(); + auto lastMonthProfit = FinanceGetLastMonthShopProfit(); ft = Formatter(); ft.Add(lastMonthProfit); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 280, 279 }, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, - ft); + dpi, windowPos + ScreenCoordsXY{ 280, 279 }, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, ft); } else { // Park value and company value ft = Formatter(); ft.Add(gParkValue); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 280, 279 }, STR_PARK_VALUE_LABEL, ft); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 280, 279 }, STR_PARK_VALUE_LABEL, ft); ft = Formatter(); ft.Add(gCompanyValue); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 280, 294 }, STR_COMPANY_VALUE_LABEL, ft); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 280, 294 }, STR_COMPANY_VALUE_LABEL, ft); } } @@ -585,9 +600,9 @@ public: #pragma region Financial Graph Events - void OnDrawFinancialGraph(rct_drawpixelinfo& dpi) + void OnDrawFinancialGraph(DrawPixelInfo& dpi) { - rct_widget* pageWidget = &_windowFinancesCashWidgets[WIDX_PAGE_BACKGROUND]; + Widget* pageWidget = &_windowFinancesCashWidgets[WIDX_PAGE_BACKGROUND]; auto graphTopLeft = windowPos + ScreenCoordsXY{ pageWidget->left + 4, pageWidget->top + 15 }; auto graphBottomRight = windowPos + ScreenCoordsXY{ pageWidget->right - 4, pageWidget->bottom - 4 }; @@ -597,13 +612,13 @@ public: ft.Add(cashLessLoan); DrawTextBasic( - &dpi, graphTopLeft - ScreenCoordsXY{ 0, 11 }, + dpi, graphTopLeft - ScreenCoordsXY{ 0, 11 }, cashLessLoan >= 0 ? STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_POSITIVE : STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_NEGATIVE, ft); // Graph - gfx_fill_rect_inset(&dpi, { graphTopLeft, graphBottomRight }, colours[1], INSET_RECT_F_30); + GfxFillRectInset(&dpi, { graphTopLeft, graphBottomRight }, colours[1], INSET_RECT_F_30); // Calculate the Y axis scale (log2 of highest [+/-]balance) int32_t yAxisScale = 0; @@ -631,9 +646,9 @@ public: ft = Formatter(); ft.Add(axisValue); DrawTextBasic( - &dpi, coords + ScreenCoordsXY{ 70, 0 }, STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE, ft, + dpi, coords + ScreenCoordsXY{ 70, 0 }, STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE, ft, { FontStyle::Small, TextAlignment::RIGHT }); - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { coords + ScreenCoordsXY{ 70, 5 }, { graphTopLeft.x + 482, coords.y + 5 } }, colours[2], INSET_RECT_FLAG_BORDER_INSET); coords.y += 39; @@ -648,19 +663,19 @@ public: #pragma region Park Value Graph Events - void OnDrawParkValueGraph(rct_drawpixelinfo& dpi) + void OnDrawParkValueGraph(DrawPixelInfo& dpi) { - rct_widget* pageWidget = &_windowFinancesCashWidgets[WIDX_PAGE_BACKGROUND]; + Widget* pageWidget = &_windowFinancesCashWidgets[WIDX_PAGE_BACKGROUND]; auto graphTopLeft = windowPos + ScreenCoordsXY{ pageWidget->left + 4, pageWidget->top + 15 }; auto graphBottomRight = windowPos + ScreenCoordsXY{ pageWidget->right - 4, pageWidget->bottom - 4 }; // Park value auto ft = Formatter(); ft.Add(gParkValue); - DrawTextBasic(&dpi, graphTopLeft - ScreenCoordsXY{ 0, 11 }, STR_FINANCES_PARK_VALUE, ft); + DrawTextBasic(dpi, graphTopLeft - ScreenCoordsXY{ 0, 11 }, STR_FINANCES_PARK_VALUE, ft); // Graph - gfx_fill_rect_inset(&dpi, { graphTopLeft, graphBottomRight }, colours[1], INSET_RECT_F_30); + GfxFillRectInset(&dpi, { graphTopLeft, graphBottomRight }, colours[1], INSET_RECT_F_30); // Calculate the Y axis scale (log2 of highest [+/-]balance) int32_t yAxisScale = 0; @@ -688,9 +703,9 @@ public: ft = Formatter(); ft.Add(axisValue); DrawTextBasic( - &dpi, coords + ScreenCoordsXY{ 70, 0 }, STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE, ft, + dpi, coords + ScreenCoordsXY{ 70, 0 }, STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE, ft, { FontStyle::Small, TextAlignment::RIGHT }); - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { coords + ScreenCoordsXY{ 70, 5 }, { graphTopLeft.x + 482, coords.y + 5 } }, colours[2], INSET_RECT_FLAG_BORDER_INSET); coords.y += 39; @@ -705,9 +720,9 @@ public: #pragma region Profit Graph Events - void OnDrawProfitGraph(rct_drawpixelinfo& dpi) + void OnDrawProfitGraph(DrawPixelInfo& dpi) { - rct_widget* pageWidget = &_windowFinancesCashWidgets[WIDX_PAGE_BACKGROUND]; + Widget* pageWidget = &_windowFinancesCashWidgets[WIDX_PAGE_BACKGROUND]; auto graphTopLeft = windowPos + ScreenCoordsXY{ pageWidget->left + 4, pageWidget->top + 15 }; auto graphBottomRight = windowPos + ScreenCoordsXY{ pageWidget->right - 4, pageWidget->bottom - 4 }; @@ -715,11 +730,11 @@ public: auto ft = Formatter(); ft.Add(gCurrentProfit); DrawTextBasic( - &dpi, graphTopLeft - ScreenCoordsXY{ 0, 11 }, + dpi, graphTopLeft - ScreenCoordsXY{ 0, 11 }, gCurrentProfit >= 0 ? STR_FINANCES_WEEKLY_PROFIT_POSITIVE : STR_FINANCES_WEEKLY_PROFIT_LOSS, ft); // Graph - gfx_fill_rect_inset(&dpi, { graphTopLeft, graphBottomRight }, colours[1], INSET_RECT_F_30); + GfxFillRectInset(&dpi, { graphTopLeft, graphBottomRight }, colours[1], INSET_RECT_F_30); // Calculate the Y axis scale (log2 of highest [+/-]balance) int32_t yAxisScale = 0; @@ -747,9 +762,9 @@ public: ft = Formatter(); ft.Add(axisValue); DrawTextBasic( - &dpi, screenPos + ScreenCoordsXY{ 70, 0 }, STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE, ft, + dpi, screenPos + ScreenCoordsXY{ 70, 0 }, STR_FINANCES_FINANCIAL_GRAPH_CASH_VALUE, ft, { FontStyle::Small, TextAlignment::RIGHT }); - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { screenPos + ScreenCoordsXY{ 70, 5 }, { graphTopLeft.x + 482, screenPos.y + 5 } }, colours[2], INSET_RECT_FLAG_BORDER_INSET); screenPos.y += 39; @@ -787,8 +802,8 @@ public: for (int32_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) { auto campaignButton = &_windowFinancesMarketingWidgets[WIDX_CAMPAIGN_1 + i]; - auto marketingCampaign = marketing_get_campaign(i); - if (marketingCampaign == nullptr && marketing_is_campaign_type_applicable(i)) + auto marketingCampaign = MarketingGetCampaign(i); + if (marketingCampaign == nullptr && MarketingIsCampaignTypeApplicable(i)) { campaignButton->type = WindowWidgetType::Button; campaignButton->top = y; @@ -802,13 +817,13 @@ public: } } - void OnDrawMarketing(rct_drawpixelinfo& dpi) + void OnDrawMarketing(DrawPixelInfo& dpi) { auto screenCoords = windowPos + ScreenCoordsXY{ 8, 62 }; int32_t noCampaignsActive = 1; for (int32_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) { - auto marketingCampaign = marketing_get_campaign(i); + auto marketingCampaign = MarketingGetCampaign(i); if (marketingCampaign == nullptr) continue; @@ -821,7 +836,7 @@ public: case ADVERTISING_CAMPAIGN_RIDE_FREE: case ADVERTISING_CAMPAIGN_RIDE: { - auto campaignRide = get_ride(marketingCampaign->RideId); + auto campaignRide = GetRide(marketingCampaign->RideId); if (campaignRide != nullptr) { campaignRide->FormatNameTo(ft); @@ -844,14 +859,14 @@ public: } } // Advertisement - DrawTextEllipsised(&dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, 296, MarketingCampaignNames[i][1], ft); + DrawTextEllipsised(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, 296, MarketingCampaignNames[i][1], ft); // Duration uint16_t weeksRemaining = marketingCampaign->WeeksLeft; ft = Formatter(); ft.Add(weeksRemaining); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 304, 0 }, + dpi, screenCoords + ScreenCoordsXY{ 304, 0 }, weeksRemaining == 1 ? STR_1_WEEK_REMAINING : STR_X_WEEKS_REMAINING, ft); screenCoords.y += LIST_ROW_HEIGHT; @@ -859,7 +874,7 @@ public: if (noCampaignsActive) { - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, STR_MARKETING_CAMPAIGNS_NONE); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, STR_MARKETING_CAMPAIGNS_NONE); screenCoords.y += LIST_ROW_HEIGHT; } screenCoords.y += 34; @@ -871,10 +886,10 @@ public: if (campaignButton->type != WindowWidgetType::Empty) { // Draw button text - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, MarketingCampaignNames[i][0]); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, MarketingCampaignNames[i][0]); auto ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[i]); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ WH_SUMMARY, 0 }, STR_MARKETING_PER_WEEK, ft); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ WH_SUMMARY, 0 }, STR_MARKETING_PER_WEEK, ft); screenCoords.y += BUTTON_FACE_HEIGHT + 2; } @@ -902,7 +917,7 @@ public: if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON) return; - rct_widget* dropdownWidget = &widgets[widgetIndex - 1]; + Widget* dropdownWidget = &widgets[widgetIndex - 1]; for (std::size_t i = 0; i < std::size(ResearchFundingLevelNames); i++) { @@ -971,7 +986,7 @@ public: } } - void OnDrawResearch(rct_drawpixelinfo& dpi) + void OnDrawResearch(DrawPixelInfo& dpi) { WindowResearchFundingPagePaint(this, &dpi, WIDX_RESEARCH_FUNDING); } @@ -986,7 +1001,7 @@ public: WidgetScrollUpdateThumbs(*this, widgetIndex); } - void DrawTabImage(rct_drawpixelinfo& dpi, int32_t tabPage, int32_t spriteIndex) + void DrawTabImage(DrawPixelInfo& dpi, int32_t tabPage, int32_t spriteIndex) { WidgetIndex widgetIndex = WIDX_TAB_1 + tabPage; @@ -998,12 +1013,12 @@ public: spriteIndex += (frame % _windowFinancesTabAnimationFrames[this->page]); } - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widgets[widgetIndex].left, widgets[widgetIndex].top }); } } - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { DrawTabImage(dpi, WINDOW_FINANCES_PAGE_SUMMARY, SPR_TAB_FINANCES_SUMMARY_0); DrawTabImage(dpi, WINDOW_FINANCES_PAGE_FINANCIAL_GRAPH, SPR_TAB_FINANCES_FINANCIAL_GRAPH_0); @@ -1024,17 +1039,17 @@ static FinancesWindow* FinancesWindowOpen(uint8_t page) return window; } -rct_window* WindowFinancesOpen() +WindowBase* WindowFinancesOpen() { return WindowFocusOrCreate(WindowClass::Finances, WW_OTHER_TABS, WH_SUMMARY, WF_10); } -rct_window* WindowFinancesResearchOpen() +WindowBase* WindowFinancesResearchOpen() { return FinancesWindowOpen(WINDOW_FINANCES_PAGE_RESEARCH); } -rct_window* WindowFinancesMarketingOpen() +WindowBase* WindowFinancesMarketingOpen() { return FinancesWindowOpen(WINDOW_FINANCES_PAGE_MARKETING); } diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index a99315e12b..486d195137 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -82,7 +82,7 @@ enum WindowFootpathWidgetIdx WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL, }; -static rct_widget window_footpath_widgets[] = { +static Widget window_footpath_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW_WINDOW, WH_WINDOW), // Type group @@ -93,23 +93,23 @@ static rct_widget window_footpath_widgets[] = { // Direction group MakeWidget({ 3, 115}, {100, 77}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_DIRECTION ), - MakeWidget({53, 127}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_NE, STR_DIRECTION_TIP ), - MakeWidget({53, 156}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_SE, STR_DIRECTION_TIP ), - MakeWidget({ 8, 156}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_SW, STR_DIRECTION_TIP ), - MakeWidget({ 8, 127}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_NW, STR_DIRECTION_TIP ), + MakeWidget({53, 127}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_NE), STR_DIRECTION_TIP ), + MakeWidget({53, 156}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_SE), STR_DIRECTION_TIP ), + MakeWidget({ 8, 156}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_SW), STR_DIRECTION_TIP ), + MakeWidget({ 8, 127}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_NW), STR_DIRECTION_TIP ), // Slope group MakeWidget({ 3, 195}, {100, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_SLOPE ), - MakeWidget({17, 207}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_DOWN, STR_SLOPE_DOWN_TIP ), - MakeWidget({41, 207}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_LEVEL, STR_LEVEL_TIP ), - MakeWidget({65, 207}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_UP, STR_SLOPE_UP_TIP ), + MakeWidget({17, 207}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN), STR_SLOPE_DOWN_TIP ), + MakeWidget({41, 207}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_LEVEL), STR_LEVEL_TIP ), + MakeWidget({65, 207}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP), STR_SLOPE_UP_TIP ), MakeWidget({ 8, 242}, { 90, 90}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_CONSTRUCT_THE_SELECTED_FOOTPATH_SECTION_TIP), - MakeWidget({30, 335}, { 46, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH_CURRENT_SECTION, STR_REMOVE_PREVIOUS_FOOTPATH_SECTION_TIP ), + MakeWidget({30, 335}, { 46, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH_CURRENT_SECTION), STR_REMOVE_PREVIOUS_FOOTPATH_SECTION_TIP ), // Mode group MakeWidget({ 3, 361}, {100, 54}, WindowWidgetType::Groupbox, WindowColour::Primary ), - MakeWidget({13, 372}, { 36, 36}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_FOOTPATH_LAND, STR_CONSTRUCT_FOOTPATH_ON_LAND_TIP ), - MakeWidget({57, 372}, { 36, 36}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_FOOTPATH_BRIDGE, STR_CONSTRUCT_BRIDGE_OR_TUNNEL_FOOTPATH_TIP ), + MakeWidget({13, 372}, { 36, 36}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_FOOTPATH_LAND), STR_CONSTRUCT_FOOTPATH_ON_LAND_TIP ), + MakeWidget({57, 372}, { 36, 36}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_FOOTPATH_BRIDGE), STR_CONSTRUCT_BRIDGE_OR_TUNNEL_FOOTPATH_TIP ), WIDGETS_END, }; @@ -154,7 +154,7 @@ private: std::vector> _dropdownEntries; - money32 _windowFootpathCost; + money64 _windowFootpathCost; uint32_t _footpathConstructionNextArrowPulse = 0; uint8_t _lastUpdatedCameraRotation = UINT8_MAX; bool _footpathErrorOccured = false; @@ -167,13 +167,13 @@ public: widgets = window_footpath_widgets; WindowInitScrollWidgets(*this); - window_push_others_right(*this); - show_gridlines(); + WindowPushOthersRight(*this); + ShowGridlines(); - tool_cancel(); + ToolCancel(); _footpathConstructionMode = PATH_CONSTRUCTION_MODE_LAND; - tool_set(*this, WIDX_CONSTRUCT_ON_LAND, Tool::PathDown); - input_set_flag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_CONSTRUCT_ON_LAND, Tool::PathDown); + InputSetFlag(INPUT_FLAG_6, true); _footpathErrorOccured = false; WindowFootpathSetEnabledAndPressedWidgets(); } @@ -181,20 +181,20 @@ public: void OnClose() override { FootpathProvisionalUpdate(); - viewport_set_visibility(0); + ViewportSetVisibility(0); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; - window_invalidate_by_class(WindowClass::TopToolbar); - hide_gridlines(); + WindowInvalidateByClass(WindowClass::TopToolbar); + HideGridlines(); } void OnUpdate() override { - widget_invalidate(*this, WIDX_CONSTRUCT); + WidgetInvalidate(*this, WIDX_CONSTRUCT); WindowFootpathUpdateProvisionalPathForBridgeMode(); // #2502: The camera might have changed rotation, so we need to update which directional buttons are pressed - uint8_t currentRotation = get_current_rotation(); + uint8_t currentRotation = GetCurrentRotation(); if (_lastUpdatedCameraRotation != currentRotation) { _lastUpdatedCameraRotation = currentRotation; @@ -204,7 +204,7 @@ public: // Check tool if (_footpathConstructionMode == PATH_CONSTRUCTION_MODE_LAND) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) { Close(); } @@ -219,7 +219,7 @@ public: } else if (_footpathConstructionMode == PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL_TOOL) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) { Close(); } @@ -290,14 +290,14 @@ public: break; } - _windowFootpathCost = MONEY32_UNDEFINED; - tool_cancel(); + _windowFootpathCost = MONEY64_UNDEFINED; + ToolCancel(); FootpathProvisionalUpdate(); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; _footpathConstructionMode = PATH_CONSTRUCTION_MODE_LAND; - tool_set(*this, WIDX_CONSTRUCT_ON_LAND, Tool::PathDown); - input_set_flag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_CONSTRUCT_ON_LAND, Tool::PathDown); + InputSetFlag(INPUT_FLAG_6, true); _footpathErrorOccured = false; WindowFootpathSetEnabledAndPressedWidgets(); break; @@ -307,14 +307,14 @@ public: break; } - _windowFootpathCost = MONEY32_UNDEFINED; - tool_cancel(); + _windowFootpathCost = MONEY64_UNDEFINED; + ToolCancel(); FootpathProvisionalUpdate(); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; _footpathConstructionMode = PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL_TOOL; - tool_set(*this, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL, Tool::Crosshair); - input_set_flag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL, Tool::Crosshair); + InputSetFlag(INPUT_FLAG_6, true); _footpathErrorOccured = false; WindowFootpathSetEnabledAndPressedWidgets(); break; @@ -363,7 +363,7 @@ public: } FootpathProvisionalUpdate(); - _windowFootpathCost = MONEY32_UNDEFINED; + _windowFootpathCost = MONEY64_UNDEFINED; Invalidate(); } @@ -429,7 +429,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { ScreenCoordsXY screenCoords; WindowDrawWidgets(*this, &dpi); @@ -438,7 +438,7 @@ public: if (!IsWidgetDisabled(WIDX_CONSTRUCT)) { // Get construction image - uint8_t direction = (_footpathConstructDirection + get_current_rotation()) % 4; + uint8_t direction = (_footpathConstructDirection + GetCurrentRotation()) % 4; uint8_t slope = 0; if (gFootpathConstructSlope == 2) { @@ -466,7 +466,7 @@ public: objManager.GetLoadedObject(ObjectType::Paths, gFootpathSelection.LegacyPath)); if (pathObj != nullptr) { - auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); + auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); if (gFootpathSelection.IsQueueSelected) baseImage = pathEntry->GetQueueImage(); else @@ -482,27 +482,27 @@ public: screenCoords = this->windowPos + ScreenCoordsXY{ window_footpath_widgets[WIDX_CONSTRUCT].midX(), window_footpath_widgets[WIDX_CONSTRUCT].bottom - 60 }; - gfx_draw_sprite(&dpi, ImageId(image), screenCoords); + GfxDrawSprite(&dpi, ImageId(image), screenCoords); } // Draw build this... label screenCoords = this->windowPos + ScreenCoordsXY{ window_footpath_widgets[WIDX_CONSTRUCT].midX(), window_footpath_widgets[WIDX_CONSTRUCT].bottom - 23 }; - DrawTextBasic(&dpi, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE }); } // Draw cost screenCoords = this->windowPos + ScreenCoordsXY{ window_footpath_widgets[WIDX_CONSTRUCT].midX(), window_footpath_widgets[WIDX_CONSTRUCT].bottom - 12 }; - if (_windowFootpathCost != MONEY32_UNDEFINED) + if (_windowFootpathCost != MONEY64_UNDEFINED) { if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_windowFootpathCost); - DrawTextBasic(&dpi, screenCoords, STR_COST_LABEL, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_COST_LABEL, ft, { TextAlignment::CENTRE }); } } } @@ -540,7 +540,7 @@ private: auto pathConstructFlags = FootpathCreateConstructFlags(type); _windowFootpathCost = FootpathProvisionalSet(type, railings, footpathLoc, slope, pathConstructFlags); - widget_invalidate(*this, WIDX_CONSTRUCT); + WidgetInvalidate(*this, WIDX_CONSTRUCT); } auto curTime = Platform::GetTicks(); @@ -568,7 +568,7 @@ private: } } - void WindowFootpathDrawDropdownButtons(rct_drawpixelinfo* dpi) + void WindowFootpathDrawDropdownButtons(DrawPixelInfo* dpi) { if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL) { @@ -610,7 +610,7 @@ private: objManager.GetLoadedObject(ObjectType::Paths, gFootpathSelection.LegacyPath)); if (pathObj != nullptr) { - auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); + auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); pathImage = pathEntry->GetPreviewImage(); queueImage = pathEntry->GetQueuePreviewImage(); } @@ -620,17 +620,17 @@ private: } } - void WindowFootpathDrawDropdownButton(rct_drawpixelinfo* dpi, WidgetIndex widgetIndex, ImageIndex image) + void WindowFootpathDrawDropdownButton(DrawPixelInfo* dpi, WidgetIndex widgetIndex, ImageIndex image) { const auto& widget = widgets[widgetIndex]; - gfx_draw_sprite(dpi, ImageId(image), { windowPos.x + widget.left, windowPos.y + widget.top }); + GfxDrawSprite(dpi, ImageId(image), { windowPos.x + widget.left, windowPos.y + widget.top }); } /** * * rct2: 0x006A7F88 */ - void WindowFootpathShowFootpathTypesDialog(rct_widget* widget, bool showQueues) + void WindowFootpathShowFootpathTypesDialog(Widget* widget, bool showQueues) { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); @@ -652,10 +652,18 @@ private: { continue; } - if (showQueues != ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) + // If regular paths can be used as queue, only hide the path if we’re _not_ looking at a queue, + // but the path surface is one. + if (gCheatsAllowRegularPathAsQueue && !showQueues && ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) { continue; } + // If the cheat is disabled, hide queues from the regular path view and vice versa. + else if (!gCheatsAllowRegularPathAsQueue && showQueues != ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) + { + continue; + } + if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL && i == (showQueues ? gFootpathSelection.QueueSurface : gFootpathSelection.NormalSurface)) { @@ -676,7 +684,7 @@ private: continue; } - auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); + auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); if ((pathEntry->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !showEditorPaths) { continue; @@ -702,7 +710,7 @@ private: gDropdownDefaultIndex = static_cast(*defaultIndex); } - void WindowFootpathShowRailingsTypesDialog(rct_widget* widget) + void WindowFootpathShowRailingsTypesDialog(Widget* widget) { uint32_t numRailingsTypes = 0; // If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor @@ -742,8 +750,8 @@ private: void WindowFootpathMousedownDirection(int32_t direction) { FootpathProvisionalUpdate(); - _footpathConstructDirection = (direction - get_current_rotation()) & 3; - _windowFootpathCost = MONEY32_UNDEFINED; + _footpathConstructDirection = (direction - GetCurrentRotation()) & 3; + _windowFootpathCost = MONEY64_UNDEFINED; WindowFootpathSetEnabledAndPressedWidgets(); } @@ -755,7 +763,7 @@ private: { FootpathProvisionalUpdate(); gFootpathConstructSlope = slope; - _windowFootpathCost = MONEY32_UNDEFINED; + _windowFootpathCost = MONEY64_UNDEFINED; WindowFootpathSetEnabledAndPressedWidgets(); } @@ -768,7 +776,7 @@ private: MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - auto info = get_map_coordinates_from_pos( + auto info = GetMapCoordinatesFromPos( screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath)); if (info.SpriteType == ViewportInteractionItem::None || info.Element == nullptr) @@ -833,7 +841,7 @@ private: auto constructFlags = FootpathCreateConstructFlags(pathType); _windowFootpathCost = FootpathProvisionalSet( pathType, gFootpathSelection.Railings, { info.Loc, z }, slope, constructFlags); - window_invalidate_by_class(WindowClass::Footpath); + WindowInvalidateByClass(WindowClass::Footpath); } } @@ -894,7 +902,7 @@ private: FootpathProvisionalUpdate(); - const auto info = get_map_coordinates_from_pos( + const auto info = GetMapCoordinatesFromPos( screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath)); if (info.SpriteType == ViewportInteractionItem::None) @@ -996,7 +1004,7 @@ private: } } - tool_cancel(); + ToolCancel(); gFootpathConstructFromPosition = { mapCoords, z }; _footpathConstructDirection = direction; gProvisionalFootpath.Flags = 0; @@ -1012,7 +1020,7 @@ private: */ void WindowFootpathConstruct() { - _windowFootpathCost = MONEY32_UNDEFINED; + _windowFootpathCost = MONEY64_UNDEFINED; FootpathProvisionalUpdate(); ObjectEntryIndex type; @@ -1040,7 +1048,7 @@ private: if (gFootpathGroundFlags & ELEMENT_IS_UNDERGROUND) { - viewport_set_visibility(1); + ViewportSetVisibility(1); } gFootpathConstructFromPosition = footpathLoc; @@ -1168,7 +1176,7 @@ private: { TileElement* tileElement; - _windowFootpathCost = MONEY32_UNDEFINED; + _windowFootpathCost = MONEY64_UNDEFINED; FootpathProvisionalUpdate(); tileElement = FootpathGetTileElementToRemove(); @@ -1203,7 +1211,7 @@ private: & ~((1LL << WIDX_DIRECTION_NW) | (1LL << WIDX_DIRECTION_NE) | (1LL << WIDX_DIRECTION_SW) | (1LL << WIDX_DIRECTION_SE) | (1LL << WIDX_SLOPEDOWN) | (1LL << WIDX_LEVEL) | (1LL << WIDX_SLOPEUP)); uint64_t disabledWidgets = 0; - int32_t currentRotation = get_current_rotation(); + int32_t currentRotation = GetCurrentRotation(); if (_footpathConstructionMode >= PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL) { // Set pressed directional widget @@ -1298,7 +1306,7 @@ public: { return; } - int32_t currentRotation = get_current_rotation(); + int32_t currentRotation = GetCurrentRotation(); int32_t turnedRotation = _footpathConstructDirection - currentRotation + (currentRotation % 2 == 1 ? 1 : -1); WindowFootpathMousedownDirection(turnedRotation); } @@ -1310,7 +1318,7 @@ public: { return; } - int32_t currentRotation = get_current_rotation(); + int32_t currentRotation = GetCurrentRotation(); int32_t turnedRotation = _footpathConstructDirection - currentRotation + (currentRotation % 2 == 1 ? -1 : 1); WindowFootpathMousedownDirection(turnedRotation); } @@ -1373,7 +1381,7 @@ public: void KeyboardShortcutDemolishCurrent() { if (IsWidgetDisabled(WIDX_REMOVE) || widgets[WIDX_REMOVE].type == WindowWidgetType::Empty - || (!gCheatsBuildInPauseMode && game_is_paused())) + || (!gCheatsBuildInPauseMode && GameIsPaused())) { return; } @@ -1398,7 +1406,7 @@ public: * * rct2: 0x006A7C43 */ -rct_window* WindowFootpathOpen() +WindowBase* WindowFootpathOpen() { if (!FootpathSelectDefault()) { @@ -1414,9 +1422,9 @@ void WindowFootpathResetSelectedPath() gFootpathSelection = {}; } -void window_footpath_keyboard_shortcut_turn_left() +void WindowFootpathKeyboardShortcutTurnLeft() { - rct_window* w = window_find_by_class(WindowClass::Footpath); + WindowBase* w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1427,9 +1435,9 @@ void window_footpath_keyboard_shortcut_turn_left() } } -void window_footpath_keyboard_shortcut_turn_right() +void WindowFootpathKeyboardShortcutTurnRight() { - rct_window* w = window_find_by_class(WindowClass::Footpath); + WindowBase* w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1440,9 +1448,9 @@ void window_footpath_keyboard_shortcut_turn_right() } } -void window_footpath_keyboard_shortcut_slope_down() +void WindowFootpathKeyboardShortcutSlopeDown() { - rct_window* w = window_find_by_class(WindowClass::Footpath); + WindowBase* w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1453,9 +1461,9 @@ void window_footpath_keyboard_shortcut_slope_down() } } -void window_footpath_keyboard_shortcut_slope_up() +void WindowFootpathKeyboardShortcutSlopeUp() { - rct_window* w = window_find_by_class(WindowClass::Footpath); + WindowBase* w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1466,9 +1474,9 @@ void window_footpath_keyboard_shortcut_slope_up() } } -void window_footpath_keyboard_shortcut_demolish_current() +void WindowFootpathKeyboardShortcutDemolishCurrent() { - rct_window* w = window_find_by_class(WindowClass::Footpath); + WindowBase* w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1479,9 +1487,9 @@ void window_footpath_keyboard_shortcut_demolish_current() } } -void window_footpath_keyboard_shortcut_build_current() +void WindowFootpathKeyboardShortcutBuildCurrent() { - rct_window* w = window_find_by_class(WindowClass::Footpath); + WindowBase* w = WindowFindByClass(WindowClass::Footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index 2e1f9ec5b3..c036abf6e4 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -48,7 +48,7 @@ enum WindowGameBottomToolbarWidgetIdx WIDX_DATE }; -static rct_widget window_game_bottom_toolbar_widgets[] = +static Widget window_game_bottom_toolbar_widgets[] = { MakeWidget({ 0, 0}, {142, 34}, WindowWidgetType::ImgBtn, WindowColour::Primary ), // Left outset panel MakeWidget({ 2, 2}, {138, 30}, WindowWidgetType::ImgBtn, WindowColour::Primary ), // Left inset panel @@ -59,7 +59,7 @@ static rct_widget window_game_bottom_toolbar_widgets[] = MakeWidget({142, 0}, {356, 34}, WindowWidgetType::ImgBtn, WindowColour::Tertiary ), // Middle outset panel MakeWidget({144, 2}, {352, 30}, WindowWidgetType::FlatBtn, WindowColour::Tertiary ), // Middle inset panel MakeWidget({147, 5}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, 0xFFFFFFFF, STR_SHOW_SUBJECT_TIP ), // Associated news item window - MakeWidget({469, 5}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP ), // Scroll to news item target + MakeWidget({469, 5}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP ), // Scroll to news item target MakeWidget({498, 0}, {142, 34}, WindowWidgetType::ImgBtn, WindowColour::Primary ), // Right outset panel MakeWidget({500, 2}, {138, 30}, WindowWidgetType::ImgBtn, WindowColour::Primary ), // Right inset panel @@ -69,19 +69,19 @@ static rct_widget window_game_bottom_toolbar_widgets[] = uint8_t gToolbarDirtyFlags; -static void WindowGameBottomToolbarMouseup(rct_window *w, WidgetIndex widgetIndex); -static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback); -static void WindowGameBottomToolbarInvalidate(rct_window *w); -static void WindowGameBottomToolbarPaint(rct_window *w, rct_drawpixelinfo *dpi); -static void WindowGameBottomToolbarUpdate(rct_window* w); -static void WindowGameBottomToolbarCursor(rct_window *w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID *cursorId); -static void WindowGameBottomToolbarUnknown05(rct_window *w); +static void WindowGameBottomToolbarMouseup(WindowBase *w, WidgetIndex widgetIndex); +static OpenRCT2String WindowGameBottomToolbarTooltip(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback); +static void WindowGameBottomToolbarInvalidate(WindowBase *w); +static void WindowGameBottomToolbarPaint(WindowBase *w, DrawPixelInfo *dpi); +static void WindowGameBottomToolbarUpdate(WindowBase* w); +static void WindowGameBottomToolbarCursor(WindowBase *w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID *cursorId); +static void WindowGameBottomToolbarUnknown05(WindowBase *w); -static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo *dpi, rct_window *w); -static void WindowGameBottomToolbarDrawParkRating(rct_drawpixelinfo *dpi, rct_window *w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor); -static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo *dpi, rct_window *w); -static void WindowGameBottomToolbarDrawNewsItem(rct_drawpixelinfo *dpi, rct_window *w); -static void WindowGameBottomToolbarDrawMiddlePanel(rct_drawpixelinfo *dpi, rct_window *w); +static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo *dpi, WindowBase *w); +static void WindowGameBottomToolbarDrawParkRating(DrawPixelInfo *dpi, WindowBase *w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor); +static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo *dpi, WindowBase *w); +static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo *dpi, WindowBase *w); +static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo *dpi, WindowBase *w); /** * @@ -99,22 +99,22 @@ static WindowEventList window_game_bottom_toolbar_events([](auto& events) }); // clang-format on -static void WindowGameBottomToolbarInvalidateDirtyWidgets(rct_window* w); +static void WindowGameBottomToolbarInvalidateDirtyWidgets(WindowBase* w); /** * Creates the main game bottom toolbar window. * rct2: 0x0066B52F (part of 0x0066B3E8) */ -rct_window* WindowGameBottomToolbarOpen() +WindowBase* WindowGameBottomToolbarOpen() { int32_t screenWidth = ContextGetWidth(); int32_t screenHeight = ContextGetHeight(); // Figure out how much line height we have to work with. - uint32_t line_height = font_get_line_height(FontStyle::Medium); + uint32_t line_height = FontGetLineHeight(FontStyle::Medium); uint32_t toolbar_height = line_height * 2 + 12; - rct_window* window = WindowCreate( + WindowBase* window = WindowCreate( ScreenCoordsXY(0, screenHeight - toolbar_height), screenWidth, toolbar_height, &window_game_bottom_toolbar_events, WindowClass::BottomToolbar, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); window->widgets = window_game_bottom_toolbar_widgets; @@ -133,7 +133,7 @@ rct_window* WindowGameBottomToolbarOpen() * * rct2: 0x0066C588 */ -static void WindowGameBottomToolbarMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowGameBottomToolbarMouseup(WindowBase* w, WidgetIndex widgetIndex) { News::Item* newsItem; @@ -176,9 +176,9 @@ static void WindowGameBottomToolbarMouseup(rct_window* w, WidgetIndex widgetInde if (!subjectLoc.has_value()) break; - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) - window_scroll_to_location(*mainWindow, subjectLoc.value()); + WindowScrollToLocation(*mainWindow, subjectLoc.value()); } break; case WIDX_RIGHT_OUTSET: @@ -188,7 +188,7 @@ static void WindowGameBottomToolbarMouseup(rct_window* w, WidgetIndex widgetInde } } -static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback) +static OpenRCT2String WindowGameBottomToolbarTooltip(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback) { int32_t month, day; auto ft = Formatter(); @@ -203,7 +203,7 @@ static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const Widget ft.Add(gParkRating); break; case WIDX_DATE: - month = date_get_month(gDateMonthsElapsed); + month = DateGetMonth(gDateMonthsElapsed); day = ((gDateMonthTicks * days_in_month[month]) >> 16) & 0xFF; ft.Add(DateDayNames[day]); @@ -217,10 +217,10 @@ static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const Widget * * rct2: 0x0066BBA0 */ -static void WindowGameBottomToolbarInvalidate(rct_window* w) +static void WindowGameBottomToolbarInvalidate(WindowBase* w) { // Figure out how much line height we have to work with. - uint32_t line_height = font_get_line_height(FontStyle::Medium); + uint32_t line_height = FontGetLineHeight(FontStyle::Medium); // Reset dimensions as appropriate -- in case we're switching languages. w->height = line_height * 2 + 12; @@ -338,7 +338,7 @@ void WindowGameBottomToolbarInvalidateNewsItem() { if (gScreenFlags == SCREEN_FLAGS_PLAYING) { - widget_invalidate_by_class(WindowClass::BottomToolbar, WIDX_MIDDLE_OUTSET); + WidgetInvalidateByClass(WindowClass::BottomToolbar, WIDX_MIDDLE_OUTSET); } } @@ -346,7 +346,7 @@ void WindowGameBottomToolbarInvalidateNewsItem() * * rct2: 0x0066BC87 */ -static void WindowGameBottomToolbarPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowGameBottomToolbarPaint(WindowBase* w, DrawPixelInfo* dpi) { auto leftWidget = window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET]; auto rightWidget = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET]; @@ -355,18 +355,18 @@ static void WindowGameBottomToolbarPaint(rct_window* w, rct_drawpixelinfo* dpi) // Draw panel grey backgrounds auto leftTop = w->windowPos + ScreenCoordsXY{ leftWidget.left, leftWidget.top }; auto rightBottom = w->windowPos + ScreenCoordsXY{ leftWidget.right, leftWidget.bottom }; - gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); + GfxFilterRect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); leftTop = w->windowPos + ScreenCoordsXY{ rightWidget.left, rightWidget.top }; rightBottom = w->windowPos + ScreenCoordsXY{ rightWidget.right, rightWidget.bottom }; - gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); + GfxFilterRect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); if (ThemeGetFlags() & UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR) { // Draw grey background leftTop = w->windowPos + ScreenCoordsXY{ middleWidget.left, middleWidget.top }; rightBottom = w->windowPos + ScreenCoordsXY{ middleWidget.right, middleWidget.bottom }; - gfx_filter_rect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); + GfxFilterRect(dpi, { leftTop, rightBottom }, FilterPaletteID::Palette51); } WindowDrawWidgets(*w, dpi); @@ -384,7 +384,7 @@ static void WindowGameBottomToolbarPaint(rct_window* w, rct_drawpixelinfo* dpi) } } -static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo* dpi, WindowBase* w) { const auto topLeft = w->windowPos + ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].left + 1, @@ -393,15 +393,15 @@ static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo* dpi, rct_win + ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].right - 1, window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].bottom - 1 }; // Draw green inset rectangle on panel - gfx_fill_rect_inset(dpi, { topLeft, bottomRight }, w->colours[1], INSET_RECT_F_30); + GfxFillRectInset(dpi, { topLeft, bottomRight }, w->colours[1], INSET_RECT_F_30); // Figure out how much line height we have to work with. - uint32_t line_height = font_get_line_height(FontStyle::Medium); + uint32_t line_height = FontGetLineHeight(FontStyle::Medium); // Draw money if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { - rct_widget widget = window_game_bottom_toolbar_widgets[WIDX_MONEY]; + Widget widget = window_game_bottom_toolbar_widgets[WIDX_MONEY]; auto screenCoords = ScreenCoordsXY{ w->windowPos.x + widget.midX(), w->windowPos.y + widget.midY() - (line_height == 10 ? 5 : 6) }; @@ -412,7 +412,7 @@ static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo* dpi, rct_win StringId stringId = gCash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH; auto ft = Formatter(); ft.Add(gCash); - DrawTextBasic(dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); + DrawTextBasic(*dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); } static constexpr const StringId _guestCountFormats[] = { @@ -429,7 +429,7 @@ static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo* dpi, rct_win // Draw guests { - rct_widget widget = window_game_bottom_toolbar_widgets[WIDX_GUESTS]; + Widget widget = window_game_bottom_toolbar_widgets[WIDX_GUESTS]; auto screenCoords = ScreenCoordsXY{ w->windowPos.x + widget.midX(), w->windowPos.y + widget.midY() - 6 }; StringId stringId = gNumGuestsInPark == 1 ? _guestCountFormatsSingular[gGuestChangeModifier] @@ -440,12 +440,12 @@ static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo* dpi, rct_win : NOT_TRANSLUCENT(w->colours[0])); auto ft = Formatter(); ft.Add(gNumGuestsInPark); - DrawTextBasic(dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); + DrawTextBasic(*dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); } // Draw park rating { - rct_widget widget = window_game_bottom_toolbar_widgets[WIDX_PARK_RATING]; + Widget widget = window_game_bottom_toolbar_widgets[WIDX_PARK_RATING]; auto screenCoords = w->windowPos + ScreenCoordsXY{ widget.left + 11, widget.midY() - 5 }; WindowGameBottomToolbarDrawParkRating( @@ -458,28 +458,27 @@ static void WindowGameBottomToolbarDrawLeftPanel(rct_drawpixelinfo* dpi, rct_win * rct2: 0x0066C76C */ static void WindowGameBottomToolbarDrawParkRating( - rct_drawpixelinfo* dpi, rct_window* w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor) + DrawPixelInfo* dpi, WindowBase* w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor) { int16_t bar_width; bar_width = (factor * 114) / 255; - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { coords + ScreenCoordsXY{ 1, 1 }, coords + ScreenCoordsXY{ 114, 9 } }, w->colours[1], INSET_RECT_F_30); - if (!(colour & BAR_BLINK) || game_is_paused() || (gCurrentRealTimeTicks & 8)) + if (!(colour & BAR_BLINK) || GameIsPaused() || (gCurrentRealTimeTicks & 8)) { if (bar_width > 2) { - gfx_fill_rect_inset( - dpi, { coords + ScreenCoordsXY{ 2, 2 }, coords + ScreenCoordsXY{ bar_width - 1, 8 } }, colour, 0); + GfxFillRectInset(dpi, { coords + ScreenCoordsXY{ 2, 2 }, coords + ScreenCoordsXY{ bar_width - 1, 8 } }, colour, 0); } } // Draw thumbs on the sides - gfx_draw_sprite(dpi, ImageId(SPR_RATING_LOW), coords - ScreenCoordsXY{ 14, 0 }); - gfx_draw_sprite(dpi, ImageId(SPR_RATING_HIGH), coords + ScreenCoordsXY{ 114, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_RATING_LOW), coords - ScreenCoordsXY{ 14, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_RATING_HIGH), coords + ScreenCoordsXY{ 114, 0 }); } -static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo* dpi, WindowBase* w) { const auto topLeft = w->windowPos + ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + 1, @@ -488,7 +487,7 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi + ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right - 1, window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].bottom - 1 }; // Draw green inset rectangle on panel - gfx_fill_rect_inset(dpi, { topLeft, bottomRight }, w->colours[1], INSET_RECT_F_30); + GfxFillRectInset(dpi, { topLeft, bottomRight }, w->colours[1], INSET_RECT_F_30); auto screenCoords = ScreenCoordsXY{ (window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right) @@ -497,8 +496,8 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].top + w->windowPos.y + 2 }; // Date - int32_t year = date_get_year(gDateMonthsElapsed) + 1; - int32_t month = date_get_month(gDateMonthsElapsed); + int32_t year = DateGetYear(gDateMonthsElapsed) + 1; + int32_t month = DateGetMonth(gDateMonthsElapsed); int32_t day = ((gDateMonthTicks * days_in_month[month]) >> 16) & 0xFF; colour_t colour @@ -510,10 +509,10 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi ft.Add(DateDayNames[day]); ft.Add(month); ft.Add(year); - DrawTextBasic(dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); + DrawTextBasic(*dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); // Figure out how much line height we have to work with. - uint32_t line_height = font_get_line_height(FontStyle::Medium); + uint32_t line_height = FontGetLineHeight(FontStyle::Medium); // Temperature screenCoords = { w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + 15, @@ -528,12 +527,12 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi } ft = Formatter(); ft.Add(temperature); - DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 0, 6 }, format, ft); + DrawTextBasic(*dpi, screenCoords + ScreenCoordsXY{ 0, 6 }, format, ft); screenCoords.x += 30; // Current weather auto currentWeatherSpriteId = ClimateGetWeatherSpriteId(gClimateCurrent); - gfx_draw_sprite(dpi, ImageId(currentWeatherSpriteId), screenCoords); + GfxDrawSprite(dpi, ImageId(currentWeatherSpriteId), screenCoords); // Next weather auto nextWeatherSpriteId = ClimateGetWeatherSpriteId(gClimateNext); @@ -541,8 +540,8 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi { if (gClimateUpdateTimer < 960) { - gfx_draw_sprite(dpi, ImageId(SPR_NEXT_WEATHER), screenCoords + ScreenCoordsXY{ 27, 5 }); - gfx_draw_sprite(dpi, ImageId(nextWeatherSpriteId), screenCoords + ScreenCoordsXY{ 40, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_NEXT_WEATHER), screenCoords + ScreenCoordsXY{ 27, 5 }); + GfxDrawSprite(dpi, ImageId(nextWeatherSpriteId), screenCoords + ScreenCoordsXY{ 40, 0 }); } } } @@ -551,27 +550,27 @@ static void WindowGameBottomToolbarDrawRightPanel(rct_drawpixelinfo* dpi, rct_wi * * rct2: 0x0066BFA5 */ -static void WindowGameBottomToolbarDrawNewsItem(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo* dpi, WindowBase* w) { int32_t width; News::Item* newsItem; - rct_widget* middleOutsetWidget; + Widget* middleOutsetWidget; middleOutsetWidget = &window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET]; newsItem = News::GetItem(0); // Current news item - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { w->windowPos + ScreenCoordsXY{ middleOutsetWidget->left + 1, middleOutsetWidget->top + 1 }, w->windowPos + ScreenCoordsXY{ middleOutsetWidget->right - 1, middleOutsetWidget->bottom - 1 } }, w->colours[2], INSET_RECT_F_30); // Text - const auto* newsItemText = newsItem->Text.c_str(); auto screenCoords = w->windowPos + ScreenCoordsXY{ middleOutsetWidget->midX(), middleOutsetWidget->top + 11 }; width = middleOutsetWidget->width() - 62; - DrawNewsTicker(dpi, screenCoords, width, COLOUR_BRIGHT_GREEN, STR_BOTTOM_TOOLBAR_NEWS_TEXT, &newsItemText, newsItem->Ticks); + DrawNewsTicker( + *dpi, screenCoords, width, COLOUR_BRIGHT_GREEN, STR_BOTTOM_TOOLBAR_NEWS_TEXT, newsItem->Text, newsItem->Ticks); screenCoords = w->windowPos + ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_NEWS_SUBJECT].left, @@ -579,7 +578,7 @@ static void WindowGameBottomToolbarDrawNewsItem(rct_drawpixelinfo* dpi, rct_wind switch (newsItem->Type) { case News::ItemType::Ride: - gfx_draw_sprite(dpi, ImageId(SPR_RIDE), screenCoords); + GfxDrawSprite(dpi, ImageId(SPR_RIDE), screenCoords); break; case News::ItemType::PeepOnRide: case News::ItemType::Peep: @@ -587,8 +586,8 @@ static void WindowGameBottomToolbarDrawNewsItem(rct_drawpixelinfo* dpi, rct_wind if (newsItem->HasButton()) break; - rct_drawpixelinfo cliped_dpi; - if (!clip_drawpixelinfo(&cliped_dpi, dpi, screenCoords + ScreenCoordsXY{ 1, 1 }, 22, 22)) + DrawPixelInfo cliped_dpi; + if (!ClipDrawPixelInfo(&cliped_dpi, dpi, screenCoords + ScreenCoordsXY{ 1, 1 }, 22, 22)) { break; } @@ -609,41 +608,41 @@ static void WindowGameBottomToolbarDrawNewsItem(rct_drawpixelinfo* dpi, rct_wind image_id_base++; auto image_id = ImageId(image_id_base, peep->TshirtColour, peep->TrousersColour); - gfx_draw_sprite(&cliped_dpi, image_id, clipCoords); + GfxDrawSprite(&cliped_dpi, image_id, clipCoords); auto* guest = peep->As(); if (guest != nullptr) { if (image_id_base >= 0x2A1D && image_id_base < 0x2A3D) { - gfx_draw_sprite(&cliped_dpi, ImageId(image_id_base + 32, guest->BalloonColour), clipCoords); + GfxDrawSprite(&cliped_dpi, ImageId(image_id_base + 32, guest->BalloonColour), clipCoords); } else if (image_id_base >= 0x2BBD && image_id_base < 0x2BDD) { - gfx_draw_sprite(&cliped_dpi, ImageId(image_id_base + 32, guest->UmbrellaColour), clipCoords); + GfxDrawSprite(&cliped_dpi, ImageId(image_id_base + 32, guest->UmbrellaColour), clipCoords); } else if (image_id_base >= 0x29DD && image_id_base < 0x29FD) { - gfx_draw_sprite(&cliped_dpi, ImageId(image_id_base + 32, guest->HatColour), clipCoords); + GfxDrawSprite(&cliped_dpi, ImageId(image_id_base + 32, guest->HatColour), clipCoords); } } break; } case News::ItemType::Money: case News::ItemType::Campaign: - gfx_draw_sprite(dpi, ImageId(SPR_FINANCE), screenCoords); + GfxDrawSprite(dpi, ImageId(SPR_FINANCE), screenCoords); break; case News::ItemType::Research: - gfx_draw_sprite(dpi, ImageId(newsItem->Assoc < 0x10000 ? SPR_NEW_SCENERY : SPR_NEW_RIDE), screenCoords); + GfxDrawSprite(dpi, ImageId(newsItem->Assoc < 0x10000 ? SPR_NEW_SCENERY : SPR_NEW_RIDE), screenCoords); break; case News::ItemType::Peeps: - gfx_draw_sprite(dpi, ImageId(SPR_GUESTS), screenCoords); + GfxDrawSprite(dpi, ImageId(SPR_GUESTS), screenCoords); break; case News::ItemType::Award: - gfx_draw_sprite(dpi, ImageId(SPR_AWARD), screenCoords); + GfxDrawSprite(dpi, ImageId(SPR_AWARD), screenCoords); break; case News::ItemType::Graph: - gfx_draw_sprite(dpi, ImageId(SPR_GRAPH), screenCoords); + GfxDrawSprite(dpi, ImageId(SPR_GRAPH), screenCoords); break; case News::ItemType::Null: case News::ItemType::Blank: @@ -652,18 +651,18 @@ static void WindowGameBottomToolbarDrawNewsItem(rct_drawpixelinfo* dpi, rct_wind } } -static void WindowGameBottomToolbarDrawMiddlePanel(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo* dpi, WindowBase* w) { - rct_widget* middleOutsetWidget = &window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET]; + Widget* middleOutsetWidget = &window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET]; - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { w->windowPos + ScreenCoordsXY{ middleOutsetWidget->left + 1, middleOutsetWidget->top + 1 }, w->windowPos + ScreenCoordsXY{ middleOutsetWidget->right - 1, middleOutsetWidget->bottom - 1 } }, w->colours[1], INSET_RECT_F_30); // Figure out how much line height we have to work with. - uint32_t line_height = font_get_line_height(FontStyle::Medium); + uint32_t line_height = FontGetLineHeight(FontStyle::Medium); ScreenCoordsXY middleWidgetCoords( w->windowPos.x + middleOutsetWidget->midX(), w->windowPos.y + middleOutsetWidget->top + line_height + 1); @@ -676,12 +675,12 @@ static void WindowGameBottomToolbarDrawMiddlePanel(rct_drawpixelinfo* dpi, rct_w if (stringId == STR_NONE) { DrawTextWrapped( - dpi, middleWidgetCoords, width, STR_TITLE_SEQUENCE_OPENRCT2, ft, { w->colours[0], TextAlignment::CENTRE }); + *dpi, middleWidgetCoords, width, STR_TITLE_SEQUENCE_OPENRCT2, ft, { w->colours[0], TextAlignment::CENTRE }); } else { // Show tooltip in bottom toolbar - DrawTextWrapped(dpi, middleWidgetCoords, width, STR_STRINGID, ft, { w->colours[0], TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, middleWidgetCoords, width, STR_STRINGID, ft, { w->colours[0], TextAlignment::CENTRE }); } } @@ -689,7 +688,7 @@ static void WindowGameBottomToolbarDrawMiddlePanel(rct_drawpixelinfo* dpi, rct_w * * rct2: 0x0066C6D8 */ -static void WindowGameBottomToolbarUpdate(rct_window* w) +static void WindowGameBottomToolbarUpdate(WindowBase* w) { w->frame_no++; if (w->frame_no >= 24) @@ -703,7 +702,7 @@ static void WindowGameBottomToolbarUpdate(rct_window* w) * rct2: 0x0066C644 */ static void WindowGameBottomToolbarCursor( - rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID* cursorId) + WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID* cursorId) { switch (widgetIndex) { @@ -720,7 +719,7 @@ static void WindowGameBottomToolbarCursor( * * rct2: 0x0066C6F2 */ -static void WindowGameBottomToolbarUnknown05(rct_window* w) +static void WindowGameBottomToolbarUnknown05(WindowBase* w) { WindowGameBottomToolbarInvalidateDirtyWidgets(w); } @@ -729,35 +728,35 @@ static void WindowGameBottomToolbarUnknown05(rct_window* w) * * rct2: 0x0066C6F2 */ -static void WindowGameBottomToolbarInvalidateDirtyWidgets(rct_window* w) +static void WindowGameBottomToolbarInvalidateDirtyWidgets(WindowBase* w) { if (gToolbarDirtyFlags & BTM_TB_DIRTY_FLAG_MONEY) { gToolbarDirtyFlags &= ~BTM_TB_DIRTY_FLAG_MONEY; - widget_invalidate(*w, WIDX_LEFT_INSET); + WidgetInvalidate(*w, WIDX_LEFT_INSET); } if (gToolbarDirtyFlags & BTM_TB_DIRTY_FLAG_DATE) { gToolbarDirtyFlags &= ~BTM_TB_DIRTY_FLAG_DATE; - widget_invalidate(*w, WIDX_RIGHT_INSET); + WidgetInvalidate(*w, WIDX_RIGHT_INSET); } if (gToolbarDirtyFlags & BTM_TB_DIRTY_FLAG_PEEP_COUNT) { gToolbarDirtyFlags &= ~BTM_TB_DIRTY_FLAG_PEEP_COUNT; - widget_invalidate(*w, WIDX_LEFT_INSET); + WidgetInvalidate(*w, WIDX_LEFT_INSET); } if (gToolbarDirtyFlags & BTM_TB_DIRTY_FLAG_CLIMATE) { gToolbarDirtyFlags &= ~BTM_TB_DIRTY_FLAG_CLIMATE; - widget_invalidate(*w, WIDX_RIGHT_INSET); + WidgetInvalidate(*w, WIDX_RIGHT_INSET); } if (gToolbarDirtyFlags & BTM_TB_DIRTY_FLAG_PARK_RATING) { gToolbarDirtyFlags &= ~BTM_TB_DIRTY_FLAG_PARK_RATING; - widget_invalidate(*w, WIDX_LEFT_INSET); + WidgetInvalidate(*w, WIDX_LEFT_INSET); } } diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 3f3dc37938..609197f2c1 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -92,46 +93,46 @@ static constexpr int32_t TabWidth = 30; MakeTab({ 189, 17 }, STR_DEBUG_TIP) /* Tab 7 */ // clang-format off -static rct_widget _guestWindowWidgetsOverview[] = { +static Widget _guestWindowWidgetsOverview[] = { MAIN_GUEST_WIDGETS, MakeWidget({ 3, 45}, {164, 12}, WindowWidgetType::LabelCentred, WindowColour::Secondary ), // Label Thought marquee MakeWidget({ 3, 57}, {164, 87}, WindowWidgetType::Viewport, WindowColour::Secondary ), // Viewport MakeWidget({ 3, 144}, {164, 11}, WindowWidgetType::LabelCentred, WindowColour::Secondary ), // Label Action - MakeWidget({167, 45}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PICKUP_BTN, STR_PICKUP_TIP ), // Pickup Button - MakeWidget({167, 69}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RENAME, STR_NAME_GUEST_TIP ), // Rename Button - MakeWidget({167, 93}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP ), // Locate Button - MakeWidget({167, 117}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_TRACK_PEEP, STR_TOGGLE_GUEST_TRACKING_TIP), // Track Button + MakeWidget({167, 45}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PICKUP_BTN), STR_PICKUP_TIP ), // Pickup Button + MakeWidget({167, 69}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RENAME), STR_NAME_GUEST_TIP ), // Rename Button + MakeWidget({167, 93}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP ), // Locate Button + MakeWidget({167, 117}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_TRACK_PEEP), STR_TOGGLE_GUEST_TRACKING_TIP), // Track Button WIDGETS_END, }; // clang-format on -static rct_widget _guestWindowWidgetsStats[] = { +static Widget _guestWindowWidgetsStats[] = { MAIN_GUEST_WIDGETS, WIDGETS_END, }; -static rct_widget _guestWindowWidgetsRides[] = { +static Widget _guestWindowWidgetsRides[] = { MAIN_GUEST_WIDGETS, MakeWidget({ 3, 57 }, { 186, 87 }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), WIDGETS_END, }; -static rct_widget _guestWindowWidgetsFinance[] = { +static Widget _guestWindowWidgetsFinance[] = { MAIN_GUEST_WIDGETS, WIDGETS_END, }; -static rct_widget _guestWindowWidgetsThoughts[] = { +static Widget _guestWindowWidgetsThoughts[] = { MAIN_GUEST_WIDGETS, WIDGETS_END, }; -static rct_widget _guestWindowWidgetsInventory[] = { +static Widget _guestWindowWidgetsInventory[] = { MAIN_GUEST_WIDGETS, WIDGETS_END, }; -static rct_widget _guestWindowWidgetsDebug[] = { +static Widget _guestWindowWidgetsDebug[] = { MAIN_GUEST_WIDGETS, WIDGETS_END, }; @@ -193,10 +194,10 @@ public: void OnClose() override { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { if (classification == gCurrentToolWidget.window_classification && number == gCurrentToolWidget.window_number) - tool_cancel(); + ToolCancel(); } } @@ -206,7 +207,7 @@ public: { case WIDX_CLOSE: Close(); - break; + return; case WIDX_TAB_1: case WIDX_TAB_2: case WIDX_TAB_3: @@ -215,7 +216,7 @@ public: case WIDX_TAB_6: case WIDX_TAB_7: SetPage(widx - WIDX_TAB_1); - break; + return; } switch (page) @@ -318,7 +319,7 @@ public: OnViewportRotateOverview(); } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { switch (page) { @@ -381,7 +382,7 @@ public: OnScrollMouseDownRides(scrollIndex, screenCoords); } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { if (page == WINDOW_GUEST_RIDES) { @@ -419,7 +420,7 @@ private: } maxWidth = std::max(minWidth, maxWidth); - window_set_resize(*this, minWidth, minHeight, maxWidth, maxHeight); + WindowSetResize(*this, minWidth, minHeight, maxWidth, maxHeight); } void OnPrepareDrawCommon() @@ -442,7 +443,7 @@ private: ResizeFrameWithPage(); - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); } void DisableWidgets() @@ -478,10 +479,10 @@ private: void SetPage(int32_t newPage) { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { if (number == gCurrentToolWidget.window_number && classification == gCurrentToolWidget.window_classification) - tool_cancel(); + ToolCancel(); } int32_t listen = 0; if (newPage == WINDOW_GUEST_OVERVIEW && page == WINDOW_GUEST_OVERVIEW && viewport != nullptr) @@ -513,7 +514,7 @@ private: #pragma region Overview - void OverviewTabDraw(rct_drawpixelinfo& dpi) + void OverviewTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_1)) return; @@ -525,8 +526,8 @@ private: if (page == WINDOW_GUEST_OVERVIEW) widgHeight++; - rct_drawpixelinfo clipDpi; - if (!clip_drawpixelinfo(&clipDpi, &dpi, screenCoords, widgWidth, widgHeight)) + DrawPixelInfo clipDpi; + if (!ClipDrawPixelInfo(&clipDpi, &dpi, screenCoords, widgWidth, widgHeight)) { return; } @@ -551,7 +552,7 @@ private: animationFrame += animationFrameOffset; auto spriteId = ImageId(animationFrame, peep->TshirtColour, peep->TrousersColour); - gfx_draw_sprite(&clipDpi, spriteId, screenCoords); + GfxDrawSprite(&clipDpi, spriteId, screenCoords); auto* guest = peep->As(); if (guest != nullptr) @@ -559,19 +560,19 @@ private: // If holding a balloon if (animationFrame >= 0x2A1D && animationFrame < 0x2A3D) { - gfx_draw_sprite(&clipDpi, ImageId(animationFrame + 32, guest->BalloonColour), screenCoords); + GfxDrawSprite(&clipDpi, ImageId(animationFrame + 32, guest->BalloonColour), screenCoords); } // If holding umbrella if (animationFrame >= 0x2BBD && animationFrame < 0x2BDD) { - gfx_draw_sprite(&clipDpi, ImageId(animationFrame + 32, guest->UmbrellaColour), screenCoords); + GfxDrawSprite(&clipDpi, ImageId(animationFrame + 32, guest->UmbrellaColour), screenCoords); } // If wearing hat if (animationFrame >= 0x29DD && animationFrame < 0x29FD) { - gfx_draw_sprite(&clipDpi, ImageId(animationFrame + 32, guest->HatColour), screenCoords); + GfxDrawSprite(&clipDpi, ImageId(animationFrame + 32, guest->HatColour), screenCoords); } } } @@ -581,7 +582,7 @@ private: DisableWidgets(); OnPrepareDraw(); - widget_invalidate(*this, WIDX_MARQUEE); + WidgetInvalidate(*this, WIDX_MARQUEE); OnResizeCommon(); @@ -620,14 +621,14 @@ private: CoordsXYZ nullLoc{}; nullLoc.SetNull(); PeepPickupAction pickupAction{ PeepPickupType::Pickup, EntityId::FromUnderlying(number), nullLoc, - network_get_current_player_id() }; + NetworkGetCurrentPlayerId() }; pickupAction.SetCallback([peepnum = number](const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) return; - rct_window* wind = window_find_by_number(WindowClass::Peep, peepnum); + WindowBase* wind = WindowFindByNumber(WindowClass::Peep, peepnum); if (wind != nullptr) { - tool_set(*wind, WC_PEEP__WIDX_PICKUP, Tool::Picker); + ToolSet(*wind, WC_PEEP__WIDX_PICKUP, Tool::Picker); } }); GameActions::Execute(&pickupAction); @@ -680,7 +681,7 @@ private: } } - void ShowLocateDropdown(rct_widget& widget) + void ShowLocateDropdown(Widget& widget) { gDropdownItems[0].Format = STR_LOCATE_SUBJECT_TIP; gDropdownItems[1].Format = STR_FOLLOW_SUBJECT_TIP; @@ -691,8 +692,8 @@ private: void GuestFollow() { - rct_window* main = window_get_main(); - window_follow_sprite(*main, EntityId::FromUnderlying(number)); + WindowBase* main = WindowGetMain(); + WindowFollowSprite(*main, EntityId::FromUnderlying(number)); } void OnViewportRotateOverview() @@ -703,7 +704,7 @@ private: return; } - viewport_update_smart_guest_follow(this, peep); + ViewportUpdateSmartFollowGuest(this, peep); bool reCreateViewport = false; uint16_t origViewportFlags{}; if (viewport != nullptr) @@ -726,7 +727,7 @@ private: int32_t widgWidth = viewWidget.width() - 1; int32_t widgHeight = viewWidget.height() - 1; - viewport_create(this, screenPos, widgWidth, widgHeight, focus.value()); + ViewportCreate(this, screenPos, widgWidth, widgHeight, focus.value()); if (viewport != nullptr && reCreateViewport) { viewport->flags = origViewportFlags; @@ -737,7 +738,7 @@ private: Invalidate(); } - void OnDrawOverview(rct_drawpixelinfo& dpi) + void OnDrawOverview(DrawPixelInfo& dpi) { DrawWidgets(dpi); OverviewTabDraw(dpi); @@ -751,10 +752,10 @@ private: // Draw the viewport no sound sprite if (viewport != nullptr) { - window_draw_viewport(&dpi, *this); + WindowDrawViewport(&dpi, *this); if (viewport->flags & VIEWPORT_FLAG_SOUND_ON) { - gfx_draw_sprite(&dpi, ImageId(SPR_HEARING_VIEWPORT), windowPos + ScreenCoordsXY{ 2, 2 }); + GfxDrawSprite(&dpi, ImageId(SPR_HEARING_VIEWPORT), windowPos + ScreenCoordsXY{ 2, 2 }); } } @@ -772,7 +773,7 @@ private: auto ft = Formatter(); peep->FormatActionTo(ft); int32_t textWidth = actionLabelWidget.width(); - DrawTextEllipsised(&dpi, screenPos, textWidth, STR_BLACK_STRING, ft, { TextAlignment::CENTRE }); + DrawTextEllipsised(dpi, screenPos, textWidth, STR_BLACK_STRING, ft, { TextAlignment::CENTRE }); } // Draw the marquee thought @@ -781,8 +782,8 @@ private: int32_t left = marqueeWidget.left + 2 + windowPos.x; int32_t top = marqueeWidget.top + windowPos.y; int32_t marqHeight = marqueeWidget.height(); - rct_drawpixelinfo dpiMarquee; - if (!clip_drawpixelinfo(&dpiMarquee, &dpi, { left, top }, marqWidth, marqHeight)) + DrawPixelInfo dpiMarquee; + if (!ClipDrawPixelInfo(&dpiMarquee, &dpi, { left, top }, marqWidth, marqHeight)) { return; } @@ -809,8 +810,8 @@ private: screenPos.x = marqueeWidget.width() - _marqueePosition; { auto ft = Formatter(); - peep_thought_set_format_args(&peep->Thoughts[i], ft); - DrawTextBasic(&dpiMarquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, { FontStyle::Small }); + PeepThoughtSetFormatArgs(&peep->Thoughts[i], ft); + DrawTextBasic(dpiMarquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, { FontStyle::Small }); } } @@ -854,8 +855,8 @@ private: newAnimationFrame %= 24; _guestAnimationFrame = newAnimationFrame; - widget_invalidate(*this, WIDX_TAB_1); - widget_invalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_1); + WidgetInvalidate(*this, WIDX_TAB_2); const auto peep = GetGuest(); if (peep == nullptr) @@ -865,7 +866,7 @@ private: if (peep->WindowInvalidateFlags & PEEP_INVALIDATE_PEEP_ACTION) { peep->WindowInvalidateFlags &= ~PEEP_INVALIDATE_PEEP_ACTION; - widget_invalidate(*this, WIDX_ACTION_LBL); + WidgetInvalidate(*this, WIDX_ACTION_LBL); } _marqueePosition += 2; @@ -873,14 +874,14 @@ private: _beingWatchedTimer++; // Disable peep watching thought for multiplayer as it's client specific - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) { // Create the "I have the strangest feeling I am being watched thought" if (_beingWatchedTimer >= 3840) { if (!(_beingWatchedTimer & 0x3FF)) { - int32_t random = util_rand() & 0xFFFF; + int32_t random = UtilRand() & 0xFFFF; if (random <= 0x2AAA) { peep->InsertNewThought(PeepThoughtType::Watched); @@ -923,7 +924,7 @@ private: gPickupPeepImage = ImageId(); - auto info = get_map_coordinates_from_pos(screenCoords, ViewportInteractionItemAll); + auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionItemAll); if (info.SpriteType == ViewportInteractionItem::None) return; @@ -960,11 +961,11 @@ private: PeepPickupAction pickupAction{ PeepPickupType::Place, EntityId::FromUnderlying(number), { destCoords, tileElement->GetBaseZ() }, - network_get_current_player_id() }; + NetworkGetCurrentPlayerId() }; pickupAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) return; - tool_cancel(); + ToolCancel(); gPickupPeepImage = ImageId(); }); GameActions::Execute(&pickupAction); @@ -976,7 +977,7 @@ private: return; PeepPickupAction pickupAction{ - PeepPickupType::Cancel, EntityId::FromUnderlying(number), { _pickedPeepX, 0, 0 }, network_get_current_player_id() + PeepPickupType::Cancel, EntityId::FromUnderlying(number), { _pickedPeepX, 0, 0 }, NetworkGetCurrentPlayerId() }; GameActions::Execute(&pickupAction); } @@ -984,7 +985,7 @@ private: #pragma endregion #pragma region Stats - void StatsTabDraw(rct_drawpixelinfo& dpi) + void StatsTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_2)) return; @@ -997,7 +998,7 @@ private: { return; } - int32_t imageId = get_peep_face_sprite_large(peep); + int32_t imageId = GetPeepFaceSpriteLarge(peep); if (page == WINDOW_GUEST_STATS) { // If currently viewing this tab animate tab @@ -1015,7 +1016,7 @@ private: break; } } - gfx_draw_sprite(&dpi, ImageId(imageId), screenCoords); + GfxDrawSprite(&dpi, ImageId(imageId), screenCoords); } void OnUpdateStats() @@ -1031,18 +1032,18 @@ private: Invalidate(); } - void StatsBarsDraw(int32_t value, const ScreenCoordsXY& origCoords, rct_drawpixelinfo& dpi, int32_t colour, bool blinkFlag) + void StatsBarsDraw(int32_t value, const ScreenCoordsXY& origCoords, DrawPixelInfo& dpi, int32_t colour, bool blinkFlag) { auto coords = origCoords; - if (font_get_line_height(FontStyle::Medium) > 10) + if (FontGetLineHeight(FontStyle::Medium) > 10) { coords.y += 1; } - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { coords + ScreenCoordsXY{ 61, 1 }, coords + ScreenCoordsXY{ 61 + 121, 9 } }, colours[1], INSET_RECT_F_30); - if (!blinkFlag || game_is_paused() || (gCurrentRealTimeTicks & 8) == 0) + if (!blinkFlag || GameIsPaused() || (gCurrentRealTimeTicks & 8) == 0) { value *= 118; value >>= 8; @@ -1050,7 +1051,7 @@ private: if (value <= 2) return; - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { coords + ScreenCoordsXY{ 63, 2 }, coords + ScreenCoordsXY{ 63 + value - 1, 8 } }, colour, 0); } } @@ -1065,7 +1066,7 @@ private: return std::clamp(newValue, newMin, 255); } - void OnDrawStats(rct_drawpixelinfo& dpi) + void OnDrawStats(DrawPixelInfo& dpi) { DrawWidgets(dpi); OverviewTabDraw(dpi); @@ -1089,7 +1090,7 @@ private: + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; // Happiness - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_HAPPINESS_LABEL); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_HAPPINESS_LABEL); int32_t happiness = NormalizeGuestStatValue(peep->Happiness, PEEP_MAX_HAPPINESS, 10); int32_t barColour = COLOUR_BRIGHT_GREEN; @@ -1098,7 +1099,7 @@ private: // Energy screenCoords.y += LIST_ROW_HEIGHT; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_ENERGY_LABEL); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_ENERGY_LABEL); int32_t energy = NormalizeGuestStatValue(peep->Energy - PEEP_MIN_ENERGY, PEEP_MAX_ENERGY - PEEP_MIN_ENERGY, 10); barColour = COLOUR_BRIGHT_GREEN; @@ -1107,7 +1108,7 @@ private: // Hunger screenCoords.y += LIST_ROW_HEIGHT; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_HUNGER_LABEL); + 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 @@ -1117,7 +1118,7 @@ private: // Thirst screenCoords.y += LIST_ROW_HEIGHT; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_THIRST_LABEL); + 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 @@ -1127,7 +1128,7 @@ private: // Nausea screenCoords.y += LIST_ROW_HEIGHT; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_NAUSEA_LABEL); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_NAUSEA_LABEL); int32_t nausea = NormalizeGuestStatValue(peep->Nausea - 32, 223, 0); barColour = COLOUR_BRIGHT_RED; @@ -1136,7 +1137,7 @@ private: // Toilet screenCoords.y += LIST_ROW_HEIGHT; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_TOILET_LABEL); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TOILET_LABEL); int32_t toilet = NormalizeGuestStatValue(peep->Toilet - 64, 178, 0); barColour = COLOUR_BRIGHT_RED; @@ -1151,16 +1152,16 @@ private: int32_t timeInPark = (gCurrentTicks - guestEntryTime) >> 11; auto ft = Formatter(); ft.Add(timeInPark & 0xFFFF); - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft); } screenCoords.y += LIST_ROW_HEIGHT + 9; - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { screenCoords - ScreenCoordsXY{ 0, 6 }, screenCoords + ScreenCoordsXY{ 179, -5 } }, colours[1], INSET_RECT_FLAG_BORDER_INSET); // Preferred Ride - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_PREFERRED_RIDE); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_PREFERRED_RIDE); screenCoords.y += LIST_ROW_HEIGHT; // Intensity @@ -1181,7 +1182,7 @@ private: ft.Add(maxIntensity); } - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, string_id, ft); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, string_id, ft); } // Nausea tolerance @@ -1196,14 +1197,14 @@ private: auto nausea_tolerance = EnumValue(peep->NauseaTolerance) & 0x3; auto ft = Formatter(); ft.Add(_nauseaTolerances[nausea_tolerance]); - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_NAUSEA_TOLERANCE, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_NAUSEA_TOLERANCE, ft); } } #pragma endregion #pragma region Rides - void RidesTabDraw(rct_drawpixelinfo& dpi) + void RidesTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_3)) return; @@ -1218,15 +1219,15 @@ private: imageId += (frame_no / 4) & 0xF; } - gfx_draw_sprite(&dpi, ImageId(imageId), screenCoords); + GfxDrawSprite(&dpi, ImageId(imageId), screenCoords); } void OnUpdateRides() { frame_no++; - widget_invalidate(*this, WIDX_TAB_2); - widget_invalidate(*this, WIDX_TAB_3); + WidgetInvalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_3); const auto guest = GetGuest(); if (guest == nullptr) @@ -1242,7 +1243,7 @@ private: uint8_t currListPosition = 0; for (const auto& r : GetRideManager()) { - if (r.IsRide() && guest->HasRidden(&r)) + if (r.IsRide() && guest->HasRidden(r)) { list_item_positions[currListPosition] = r.id.ToUnderlying(); currListPosition++; @@ -1288,7 +1289,7 @@ private: return; auto intent = Intent(WindowClass::Ride); - intent.putExtra(INTENT_EXTRA_RIDE_ID, list_item_positions[index]); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, list_item_positions[index]); ContextOpenIntent(&intent); } @@ -1311,7 +1312,7 @@ private: widgets[WIDX_RIDE_SCROLL].bottom = height - 15; } - void OnDrawRides(rct_drawpixelinfo& dpi) + void OnDrawRides(DrawPixelInfo& dpi) { DrawWidgets(dpi); OverviewTabDraw(dpi); @@ -1332,12 +1333,12 @@ private: auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 2, widgets[WIDX_PAGE_BACKGROUND].top + 2 }; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_LABEL_RIDES_BEEN_ON); + DrawTextBasic(dpi, screenCoords, STR_GUEST_LABEL_RIDES_BEEN_ON); screenCoords.y = windowPos.y + widgets[WIDX_PAGE_BACKGROUND].bottom - 12; auto ft = Formatter(); - auto* r = get_ride(peep->FavouriteRide); + auto* r = GetRide(peep->FavouriteRide); if (r != nullptr) { r->FormatNameTo(ft); @@ -1347,13 +1348,13 @@ private: ft.Add(STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE); } - DrawTextEllipsised(&dpi, screenCoords, width - 14, STR_FAVOURITE_RIDE, ft); + DrawTextEllipsised(dpi, screenCoords, width - 14, STR_FAVOURITE_RIDE, ft); } - void OnScrollDrawRides(int32_t scrollIndex, rct_drawpixelinfo& dpi) + void OnScrollDrawRides(int32_t scrollIndex, DrawPixelInfo& dpi) { auto colour = ColourMapA[colours[1]].mid_light; - gfx_fill_rect(&dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, colour); + GfxFillRect(&dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, colour); for (int32_t listIndex = 0; listIndex < no_list_items; listIndex++) { @@ -1361,24 +1362,24 @@ private: StringId stringId = STR_BLACK_STRING; if (listIndex == selected_list_item) { - gfx_filter_rect(&dpi, { 0, y, 800, y + 9 }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, y, 800, y + 9 }, FilterPaletteID::PaletteDarken1); stringId = STR_WINDOW_COLOUR_2_STRINGID; } const auto rId = RideId::FromUnderlying(list_item_positions[listIndex]); - auto* r = get_ride(rId); + auto* r = GetRide(rId); if (r != nullptr) { auto ft = Formatter(); r->FormatNameTo(ft); - DrawTextBasic(&dpi, { 0, y - 1 }, stringId, ft); + DrawTextBasic(dpi, { 0, y - 1 }, stringId, ft); } } } #pragma endregion #pragma region Finance - void FinanceTabDraw(rct_drawpixelinfo& dpi) + void FinanceTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_4)) return; @@ -1393,18 +1394,18 @@ private: imageId += (frame_no / 2) & 0x7; } - gfx_draw_sprite(&dpi, ImageId(imageId), screenCoords); + GfxDrawSprite(&dpi, ImageId(imageId), screenCoords); } void OnUpdateFinance() { frame_no++; - widget_invalidate(*this, WIDX_TAB_2); - widget_invalidate(*this, WIDX_TAB_4); + WidgetInvalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_4); } - void OnDrawFinance(rct_drawpixelinfo& dpi) + void OnDrawFinance(DrawPixelInfo& dpi) { DrawWidgets(dpi); OverviewTabDraw(dpi); @@ -1429,7 +1430,7 @@ private: { auto ft = Formatter(); ft.Add(peep->CashInPocket); - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_CASH_IN_POCKET, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_CASH_IN_POCKET, ft); screenCoords.y += LIST_ROW_HEIGHT; } @@ -1437,11 +1438,11 @@ private: { auto ft = Formatter(); ft.Add(peep->CashSpent); - DrawTextBasic(&dpi, screenCoords, STR_GUEST_STAT_CASH_SPENT, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_CASH_SPENT, ft); screenCoords.y += LIST_ROW_HEIGHT * 2; } - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { screenCoords - ScreenCoordsXY{ 0, 6 }, screenCoords + ScreenCoordsXY{ 179, -5 } }, colours[1], INSET_RECT_FLAG_BORDER_INSET); @@ -1449,7 +1450,7 @@ private: { auto ft = Formatter(); ft.Add(peep->PaidToEnter); - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_ENTRANCE_FEE, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_ENTRANCE_FEE, ft); screenCoords.y += LIST_ROW_HEIGHT; } // Paid on rides @@ -1459,11 +1460,11 @@ private: ft.Add(peep->GuestNumRides); if (peep->GuestNumRides != 1) { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_RIDE_PLURAL, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_RIDE_PLURAL, ft); } else { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_RIDE, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_RIDE, ft); } screenCoords.y += LIST_ROW_HEIGHT; } @@ -1474,11 +1475,11 @@ private: ft.Add(peep->AmountOfFood); if (peep->AmountOfFood != 1) { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_FOOD_PLURAL, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_FOOD_PLURAL, ft); } else { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_FOOD, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_FOOD, ft); } screenCoords.y += LIST_ROW_HEIGHT; } @@ -1490,11 +1491,11 @@ private: ft.Add(peep->AmountOfDrinks); if (peep->AmountOfDrinks != 1) { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_DRINK_PLURAL, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_DRINK_PLURAL, ft); } else { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_DRINK, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_DRINK, ft); } screenCoords.y += LIST_ROW_HEIGHT; } @@ -1505,18 +1506,18 @@ private: ft.Add(peep->AmountOfSouvenirs); if (peep->AmountOfSouvenirs != 1) { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, ft); } else { - DrawTextBasic(&dpi, screenCoords, STR_GUEST_EXPENSES_SOUVENIR, ft); + DrawTextBasic(dpi, screenCoords, STR_GUEST_EXPENSES_SOUVENIR, ft); } } } #pragma endregion #pragma region Thoughts - void ThoughtsTabDraw(rct_drawpixelinfo& dpi) + void ThoughtsTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_5)) return; @@ -1531,15 +1532,15 @@ private: imageId += (frame_no / 2) & 0x7; } - gfx_draw_sprite(&dpi, ImageId(imageId), screenCoords); + GfxDrawSprite(&dpi, ImageId(imageId), screenCoords); } void OnUpdateThoughts() { frame_no++; - widget_invalidate(*this, WIDX_TAB_2); - widget_invalidate(*this, WIDX_TAB_5); + WidgetInvalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_5); auto peep = GetGuest(); if (peep == nullptr) @@ -1553,7 +1554,7 @@ private: } } - void OnDrawThoughts(rct_drawpixelinfo& dpi) + void OnDrawThoughts(DrawPixelInfo& dpi) { DrawWidgets(dpi); OverviewTabDraw(dpi); @@ -1574,7 +1575,7 @@ private: auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; - DrawTextBasic(&dpi, screenCoords, STR_GUEST_RECENT_THOUGHTS_LABEL); + DrawTextBasic(dpi, screenCoords, STR_GUEST_RECENT_THOUGHTS_LABEL); screenCoords.y += 10; for (const auto& thought : peep->Thoughts) @@ -1587,8 +1588,8 @@ private: int32_t widgWidth = widgets[WIDX_PAGE_BACKGROUND].right - widgets[WIDX_PAGE_BACKGROUND].left - 8; auto ft = Formatter(); - peep_thought_set_format_args(&thought, ft); - screenCoords.y += DrawTextWrapped(&dpi, screenCoords, widgWidth, STR_BLACK_STRING, ft, { FontStyle::Small }); + PeepThoughtSetFormatArgs(&thought, ft); + screenCoords.y += DrawTextWrapped(dpi, screenCoords, widgWidth, STR_BLACK_STRING, ft, { FontStyle::Small }); // If this is the last visible line end drawing. if (screenCoords.y > windowPos.y + widgets[WIDX_PAGE_BACKGROUND].bottom - 32) @@ -1598,7 +1599,7 @@ private: #pragma endregion #pragma region Inventory - void InventoryTabDraw(rct_drawpixelinfo& dpi) + void InventoryTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_6)) return; @@ -1606,15 +1607,15 @@ private: const auto& widget = widgets[WIDX_TAB_6]; auto screenCoords = windowPos + ScreenCoordsXY{ widget.left, widget.top }; - gfx_draw_sprite(&dpi, ImageId(SPR_TAB_GUEST_INVENTORY), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_TAB_GUEST_INVENTORY), screenCoords); } void OnUpdateInventory() { frame_no++; - widget_invalidate(*this, WIDX_TAB_2); - widget_invalidate(*this, WIDX_TAB_6); + WidgetInvalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_6); auto peep = GetGuest(); if (peep == nullptr) @@ -1649,7 +1650,7 @@ private: ft.Add(ImageId(GetShopItemDescriptor(item).Image, (guest.BalloonColour)).ToUInt32()); break; case ShopItem::Photo: - invRide = get_ride(guest.Photo1RideRef); + invRide = GetRide(guest.Photo1RideRef); if (invRide != nullptr) { ft.Rewind(); @@ -1673,7 +1674,7 @@ private: ft.Add(parkName); break; case VOUCHER_TYPE_RIDE_FREE: - invRide = get_ride(guest.VoucherRideId); + invRide = GetRide(guest.VoucherRideId); if (invRide != nullptr) { ft.Rewind(); @@ -1706,7 +1707,7 @@ private: ft.Add(ImageId(GetShopItemDescriptor(item).Image, (guest.TshirtColour)).ToUInt32()); break; case ShopItem::Photo2: - invRide = get_ride(guest.Photo2RideRef); + invRide = GetRide(guest.Photo2RideRef); if (invRide != nullptr) { ft.Rewind(); @@ -1715,7 +1716,7 @@ private: } break; case ShopItem::Photo3: - invRide = get_ride(guest.Photo3RideRef); + invRide = GetRide(guest.Photo3RideRef); if (invRide != nullptr) { ft.Rewind(); @@ -1724,7 +1725,7 @@ private: } break; case ShopItem::Photo4: - invRide = get_ride(guest.Photo4RideRef); + invRide = GetRide(guest.Photo4RideRef); if (invRide != nullptr) { ft.Rewind(); @@ -1740,7 +1741,7 @@ private: return std::make_pair(STR_GUEST_ITEM_FORMAT, ft); } - void OnDrawInventory(rct_drawpixelinfo& dpi) + void OnDrawInventory(DrawPixelInfo& dpi) { DrawWidgets(dpi); OverviewTabDraw(dpi); @@ -1757,14 +1758,14 @@ private: return; } - rct_widget* pageBackgroundWidget = &widgets[WIDX_PAGE_BACKGROUND]; + Widget* pageBackgroundWidget = &widgets[WIDX_PAGE_BACKGROUND]; auto screenCoords = windowPos + ScreenCoordsXY{ pageBackgroundWidget->left + 4, pageBackgroundWidget->top + 2 }; int32_t itemNameWidth = pageBackgroundWidget->width() - 8; int32_t maxY = windowPos.y + height - 22; int32_t numItems = 0; - DrawTextBasic(&dpi, screenCoords, STR_CARRYING); + DrawTextBasic(dpi, screenCoords, STR_CARRYING); screenCoords.y += 10; for (ShopItem item = ShopItem::Balloon; item < ShopItem::Count; item++) @@ -1775,19 +1776,19 @@ private: continue; auto [stringId, ft] = InventoryFormatItem(*guest, item); - screenCoords.y += DrawTextWrapped(&dpi, screenCoords, itemNameWidth, stringId, ft); + screenCoords.y += DrawTextWrapped(dpi, screenCoords, itemNameWidth, stringId, ft); numItems++; } if (numItems == 0) { - DrawTextBasic(&dpi, screenCoords, STR_NOTHING); + DrawTextBasic(dpi, screenCoords, STR_NOTHING); } } #pragma endregion #pragma region Debug - void DebugTabDraw(rct_drawpixelinfo& dpi) + void DebugTabDraw(DrawPixelInfo& dpi) { if (WidgetIsDisabled(*this, WIDX_TAB_7)) return; @@ -1801,7 +1802,7 @@ private: imageId += (frame_no / 2) & 0x3; } - gfx_draw_sprite(&dpi, ImageId(imageId), screenCoords); + GfxDrawSprite(&dpi, ImageId(imageId), screenCoords); } void OnUpdateDebug() @@ -1810,7 +1811,7 @@ private: Invalidate(); } - void OnDrawDebug(rct_drawpixelinfo& dpi) + void OnDrawDebug(DrawPixelInfo& dpi) { char buffer[512]{}; char buffer2[512]{}; @@ -1833,8 +1834,8 @@ private: + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; { auto ft = Formatter(); - ft.Add(peep->sprite_index); - DrawTextBasic(&dpi, screenCoords, STR_PEEP_DEBUG_SPRITE_INDEX, ft); + ft.Add(peep->Id); + DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_SPRITE_INDEX, ft); } screenCoords.y += LIST_ROW_HEIGHT; { @@ -1842,7 +1843,7 @@ private: ft.Add(peep->x); ft.Add(peep->y); ft.Add(peep->z); - DrawTextBasic(&dpi, screenCoords, STR_PEEP_DEBUG_POSITION, ft); + DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_POSITION, ft); } screenCoords.y += LIST_ROW_HEIGHT; { @@ -1850,20 +1851,20 @@ private: ft.Add(peep->NextLoc.x); ft.Add(peep->NextLoc.y); ft.Add(peep->NextLoc.z); - format_string(buffer, sizeof(buffer), STR_PEEP_DEBUG_NEXT, ft.Data()); + OpenRCT2::FormatStringLegacy(buffer, sizeof(buffer), STR_PEEP_DEBUG_NEXT, ft.Data()); if (peep->GetNextIsSurface()) { - format_string(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SURFACE, nullptr); - safe_strcat(buffer, buffer2, sizeof(buffer)); + OpenRCT2::FormatStringLegacy(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SURFACE, nullptr); + SafeStrCat(buffer, buffer2, sizeof(buffer)); } if (peep->GetNextIsSloped()) { auto ft2 = Formatter(); ft2.Add(peep->GetNextDirection()); - format_string(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SLOPE, ft2.Data()); - safe_strcat(buffer, buffer2, sizeof(buffer)); + OpenRCT2::FormatStringLegacy(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SLOPE, ft2.Data()); + SafeStrCat(buffer, buffer2, sizeof(buffer)); } - gfx_draw_string(&dpi, screenCoords, buffer, {}); + GfxDrawString(dpi, screenCoords, buffer, {}); } screenCoords.y += LIST_ROW_HEIGHT; { @@ -1871,7 +1872,7 @@ private: ft.Add(peep->DestinationX); ft.Add(peep->DestinationY); ft.Add(peep->DestinationTolerance); - DrawTextBasic(&dpi, screenCoords, STR_PEEP_DEBUG_DEST, ft); + DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_DEST, ft); } screenCoords.y += LIST_ROW_HEIGHT; { @@ -1880,10 +1881,10 @@ private: ft.Add(peep->PathfindGoal.y); ft.Add(peep->PathfindGoal.z); ft.Add(peep->PathfindGoal.direction); - DrawTextBasic(&dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_GOAL, ft); + DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_GOAL, ft); } screenCoords.y += LIST_ROW_HEIGHT; - DrawTextBasic(&dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY); + DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY); screenCoords.y += LIST_ROW_HEIGHT; screenCoords.x += 10; @@ -1894,7 +1895,7 @@ private: ft.Add(point.y); ft.Add(point.z); ft.Add(point.direction); - DrawTextBasic(&dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, ft); + DrawTextBasic(dpi, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, ft); screenCoords.y += LIST_ROW_HEIGHT; } screenCoords.x -= 10; @@ -1907,7 +1908,7 @@ private: * rct2: 0x006989E9 * */ -rct_window* WindowGuestOpen(Peep* peep) +WindowBase* WindowGuestOpen(Peep* peep) { if (peep == nullptr) { @@ -1918,8 +1919,7 @@ rct_window* WindowGuestOpen(Peep* peep) return WindowStaffOpen(peep); } - auto* window = static_cast( - window_bring_to_front_by_number(WindowClass::Peep, peep->sprite_index.ToUnderlying())); + auto* window = static_cast(WindowBringToFrontByNumber(WindowClass::Peep, peep->Id.ToUnderlying())); if (window == nullptr) { int32_t windowWidth = 192; @@ -1933,7 +1933,7 @@ rct_window* WindowGuestOpen(Peep* peep) } } - window->Init(peep->sprite_index); + window->Init(peep->Id); return window; } diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 5634d7cdb0..6a7cea611b 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -50,16 +51,16 @@ enum WindowGuestListWidgetIdx }; // clang-format off -static rct_widget window_guest_list_widgets[] = { +static Widget window_guest_list_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, {350, 287}, WindowWidgetType::Resize, WindowColour::Secondary ), // tab content panel MakeWidget({ 5, 59}, { 80, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_ARG_4_PAGE_X ), // page dropdown MakeWidget({ 73, 60}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), // page dropdown button MakeWidget({120, 59}, {142, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, 0xFFFFFFFF, STR_INFORMATION_TYPE_TIP ), // information type dropdown MakeWidget({250, 60}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_INFORMATION_TYPE_TIP ), // information type dropdown button - MakeWidget({273, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_MAP, STR_SHOW_GUESTS_ON_MAP_TIP ), // map - MakeWidget({297, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_SEARCH, STR_GUESTS_FILTER_BY_NAME_TIP), // filter by name - MakeWidget({321, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_TRACK_PEEP, STR_TRACKED_GUESTS_ONLY_TIP ), // tracking + MakeWidget({273, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_MAP), STR_SHOW_GUESTS_ON_MAP_TIP ), // map + MakeWidget({297, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_SEARCH), STR_GUESTS_FILTER_BY_NAME_TIP), // filter by name + MakeWidget({321, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_TRACK_PEEP), STR_TRACKED_GUESTS_ONLY_TIP ), // tracking MakeTab ({ 3, 17}, STR_INDIVIDUAL_GUESTS_TIP ), // tab 1 MakeTab ({ 34, 17}, STR_SUMMARISED_GUESTS_TIP ), // tab 2 MakeWidget({ 3, 72}, {344, 255}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_BOTH ), // guest list @@ -183,7 +184,7 @@ public: { case GuestListFilterType::GuestsOnRide: { - auto guestRide = get_ride(RideId::FromUnderlying(index)); + auto guestRide = GetRide(RideId::FromUnderlying(index)); if (guestRide != nullptr) { ft.Add( @@ -199,7 +200,7 @@ public: } case GuestListFilterType::GuestsInQueue: { - auto guestRide = get_ride(RideId::FromUnderlying(index)); + auto guestRide = GetRide(RideId::FromUnderlying(index)); if (guestRide != nullptr) { ft.Add(STR_QUEUING_FOR); @@ -214,7 +215,7 @@ public: } case GuestListFilterType::GuestsThinkingAboutRide: { - auto guestRide = get_ride(RideId::FromUnderlying(index)); + auto guestRide = GetRide(RideId::FromUnderlying(index)); if (guestRide != nullptr) { ft.Add(STR_NONE); @@ -439,7 +440,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(dpi); @@ -472,7 +473,7 @@ public: { Formatter ft(_filterArguments.args); - DrawTextEllipsised(&dpi, screenCoords, 310, format, ft); + DrawTextEllipsised(dpi, screenCoords, 310, format, ft); } // Number of guests (list items) @@ -482,7 +483,7 @@ public: auto ft = Formatter(); ft.Add(static_cast(_guestList.size())); DrawTextBasic( - &dpi, screenCoords, (_guestList.size() == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), + dpi, screenCoords, (_guestList.size() == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), ft); } } @@ -585,9 +586,9 @@ public: } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - gfx_fill_rect( + GfxFillRect( &dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); switch (_selectedTab) { @@ -626,11 +627,11 @@ public: continue; auto& item = _guestList.emplace_back(); - item.Id = peep->sprite_index; + item.Id = peep->Id; Formatter ft; peep->FormatNameTo(ft); - format_string(item.Name, sizeof(item.Name), STR_STRINGID, ft.Data()); + OpenRCT2::FormatStringLegacy(item.Name, sizeof(item.Name), STR_STRINGID, ft.Data()); } std::sort(_guestList.begin(), _guestList.end(), GetGuestCompareFunc()); @@ -638,23 +639,23 @@ public: } private: - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { // Tab 1 image auto i = (_selectedTab == TabId::Individual ? _tabAnimationIndex & ~3 : 0); i += GetPeepAnimation(PeepSpriteType::Normal).base_image + 1; - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(i, COLOUR_GREY, COLOUR_DARK_OLIVE_GREEN), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_1].midX(), widgets[WIDX_TAB_1].bottom - 6 }); // Tab 2 image i = (_selectedTab == TabId::Summarised ? _tabAnimationIndex / 4 : 0); - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_TAB_GUESTS_0 + i), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left, widgets[WIDX_TAB_2].top }); } - void DrawScrollIndividual(rct_drawpixelinfo& dpi) + void DrawScrollIndividual(DrawPixelInfo& dpi) { size_t index = 0; auto y = static_cast(_selectedPage) * -GUEST_PAGE_HEIGHT; @@ -668,7 +669,7 @@ private: StringId format = STR_BLACK_STRING; if (index == _highlightedIndex) { - gfx_filter_rect(&dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); format = STR_WINDOW_COLOUR_2_STRINGID; } @@ -680,22 +681,22 @@ private: } auto ft = Formatter(); peep->FormatNameTo(ft); - DrawTextEllipsised(&dpi, { 0, y }, 113, format, ft); + DrawTextEllipsised(dpi, { 0, y }, 113, format, ft); switch (_selectedView) { case GuestViewType::Actions: // Guest face - gfx_draw_sprite(&dpi, ImageId(get_peep_face_sprite_small(peep)), { 118, y + 1 }); + GfxDrawSprite(&dpi, ImageId(GetPeepFaceSpriteSmall(peep)), { 118, y + 1 }); // Tracking icon if (peep->PeepFlags & PEEP_FLAGS_TRACKING) - gfx_draw_sprite(&dpi, ImageId(STR_ENTER_SELECTION_SIZE), { 112, y + 1 }); + GfxDrawSprite(&dpi, ImageId(STR_ENTER_SELECTION_SIZE), { 112, y + 1 }); // Action ft = Formatter(); peep->FormatActionTo(ft); - DrawTextEllipsised(&dpi, { 133, y }, 314, format, ft); + DrawTextEllipsised(dpi, { 133, y }, 314, format, ft); break; case GuestViewType::Thoughts: // For each thought @@ -709,8 +710,8 @@ private: break; ft = Formatter(); - peep_thought_set_format_args(&thought, ft); - DrawTextEllipsised(&dpi, { 118, y }, 329, format, ft, { FontStyle::Small }); + PeepThoughtSetFormatArgs(&thought, ft); + DrawTextEllipsised(dpi, { 118, y }, 329, format, ft, { FontStyle::Small }); break; } break; @@ -721,7 +722,7 @@ private: } } - void DrawScrollSummarised(rct_drawpixelinfo& dpi) + void DrawScrollSummarised(DrawPixelInfo& dpi) { size_t index = 0; auto y = 0; @@ -738,14 +739,14 @@ private: StringId format = STR_BLACK_STRING; if (index == _highlightedIndex) { - gfx_filter_rect(&dpi, { 0, y, 800, y + SUMMARISED_GUEST_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, y, 800, y + SUMMARISED_GUEST_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1); format = STR_WINDOW_COLOUR_2_STRINGID; } // Draw guest faces for (uint32_t j = 0; j < std::size(group.Faces) && j < group.NumGuests; j++) { - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(group.Faces[j] + SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY), { static_cast(j) * 8, y + 12 }); } @@ -755,18 +756,18 @@ private: // Draw small font if displaying guests if (_selectedView == GuestViewType::Thoughts) { - DrawTextEllipsised(&dpi, { 0, y }, 414, format, ft, { FontStyle::Small }); + DrawTextEllipsised(dpi, { 0, y }, 414, format, ft, { FontStyle::Small }); } else { - DrawTextEllipsised(&dpi, { 0, y }, 414, format, ft); + DrawTextEllipsised(dpi, { 0, y }, 414, format, ft); } // Draw guest count ft = Formatter(); ft.Add(STR_GUESTS_COUNT_COMMA_SEP); ft.Add(group.NumGuests); - DrawTextBasic(&dpi, { 326, y }, format, ft, { TextAlignment::RIGHT }); + DrawTextBasic(dpi, { 326, y }, format, ft, { TextAlignment::RIGHT }); } y += SUMMARISED_GUEST_ROW_HEIGHT; index++; @@ -784,8 +785,8 @@ private: Formatter ft; peep.FormatNameTo(ft); - format_string(name, sizeof(name), STR_STRINGID, ft.Data()); - if (strcasestr(name, _filterName.c_str()) == nullptr) + OpenRCT2::FormatStringLegacy(name, sizeof(name), STR_STRINGID, ft.Data()); + if (!String::Contains(name, _filterName.c_str(), true)) { return false; } @@ -807,7 +808,7 @@ private: bool IsRefreshOfGroupsRequired() { - uint32_t tick256 = floor2(gCurrentTicks, 256); + uint32_t tick256 = Floor2(gCurrentTicks, 256); if (_selectedView == _lastFindGroupsSelectedView) { if (_lastFindGroupsWait != 0 || _lastFindGroupsTick == tick256) @@ -834,7 +835,7 @@ private: void RefreshGroups() { - _lastFindGroupsTick = floor2(gCurrentTicks, 256); + _lastFindGroupsTick = Floor2(gCurrentTicks, 256); _lastFindGroupsSelectedView = _selectedView; _lastFindGroupsWait = 320; _groups.clear(); @@ -847,7 +848,7 @@ private: auto& group = FindOrAddGroup(GetArgumentsFromPeep(*peep, _selectedView)); if (group.NumGuests < std::size(group.Faces)) { - group.Faces[group.NumGuests] = get_peep_face_sprite_small(peep) - SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY; + group.Faces[group.NumGuests] = GetPeepFaceSpriteSmall(peep) - SPR_PEEP_SMALL_FACE_VERY_VERY_UNHAPPY; } group.NumGuests++; } @@ -889,7 +890,7 @@ private: const auto& thought = peep.Thoughts[0]; if (thought.type != PeepThoughtType::None && thought.freshness <= 5) { - peep_thought_set_format_args(&thought, ft); + PeepThoughtSetFormatArgs(&thought, ft); } break; } @@ -941,11 +942,11 @@ private: if (peepA->Name == nullptr && peepB->Name == nullptr) { // Simple ID comparison for when both peeps use a number or a generated name - return peepA->Id < peepB->Id; + return peepA->PeepId < peepB->PeepId; } } } - return strlogicalcmp(a.Name, b.Name) < 0; + return StrLogicalCmp(a.Name, b.Name) < 0; } static GuestItem::CompareFunc GetGuestCompareFunc() @@ -954,9 +955,9 @@ private: } }; -rct_window* WindowGuestListOpen() +WindowBase* WindowGuestListOpen() { - auto* window = window_bring_to_front_by_class(WindowClass::GuestList); + auto* window = WindowBringToFrontByClass(WindowClass::GuestList); if (window == nullptr) { window = WindowCreate(WindowClass::GuestList, 350, 330, WF_10 | WF_RESIZABLE); @@ -967,7 +968,7 @@ rct_window* WindowGuestListOpen() /** * @param index The number of the ride or index of the thought */ -rct_window* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index) +WindowBase* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index) { auto* w = static_cast(WindowGuestListOpen()); if (w != nullptr) @@ -979,7 +980,7 @@ rct_window* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t inde void WindowGuestListRefreshList() { - auto* w = window_find_by_class(WindowClass::GuestList); + auto* w = WindowFindByClass(WindowClass::GuestList); if (w != nullptr) { static_cast(w)->RefreshList(); diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index 397a50d103..e7afb69ae3 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,11 +47,11 @@ static constexpr const int32_t WH = 460; constexpr int32_t PREVIEW_BUTTONS_LEFT = WW - 25; constexpr int32_t ACTION_BUTTONS_LEFT = WW - 100; -static rct_widget window_install_track_widgets[] = { +static Widget window_install_track_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 4, 18}, {372, 219}, WindowWidgetType::FlatBtn, WindowColour::Primary ), - MakeWidget({PREVIEW_BUTTONS_LEFT, 422}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, SPR_ROTATE_ARROW, STR_ROTATE_90_TIP ), - MakeWidget({PREVIEW_BUTTONS_LEFT, 398}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, SPR_SCENERY, STR_TOGGLE_SCENERY_TIP), + MakeWidget({PREVIEW_BUTTONS_LEFT, 422}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_90_TIP ), + MakeWidget({PREVIEW_BUTTONS_LEFT, 398}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, ImageId(SPR_SCENERY), STR_TOGGLE_SCENERY_TIP), MakeWidget({ ACTION_BUTTONS_LEFT, 241}, { 97, 15}, WindowWidgetType::Button, WindowColour::Primary, STR_INSTALL_NEW_TRACK_DESIGN_INSTALL ), MakeWidget({ ACTION_BUTTONS_LEFT, 259}, { 97, 15}, WindowWidgetType::Button, WindowColour::Primary, STR_INSTALL_NEW_TRACK_DESIGN_CANCEL ), WIDGETS_END, @@ -85,7 +85,7 @@ public: track_list.track_list_being_updated = false; WindowInitScrollWidgets(*this); - window_push_others_right(*this); + WindowPushOthersRight(*this); } void OnClose() override @@ -130,7 +130,7 @@ public: _trackName = std::string(text); - window_event_mouse_up_call(this, WIDX_INSTALL); + WindowEventMouseUpCall(this, WIDX_INSTALL); } void OnPrepareDraw() override @@ -146,24 +146,24 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); // Track preview - rct_widget* widget = &window_install_track_widgets[WIDX_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; - gfx_fill_rect(&dpi, { screenPos, screenPos + ScreenCoordsXY{ 369, 216 } }, colour); + GfxFillRect(&dpi, { screenPos, screenPos + ScreenCoordsXY{ 369, 216 } }, colour); - rct_g1_element g1temp = {}; + G1Element g1temp = {}; g1temp.offset = _trackDesignPreviewPixels.data() + (_currentTrackPieceDirection * TRACK_PREVIEW_IMAGE_SIZE); g1temp.width = 370; g1temp.height = 217; g1temp.flags = G1_FLAG_HAS_TRANSPARENCY; - gfx_set_g1_element(SPR_TEMP, &g1temp); - drawing_engine_invalidate_image(SPR_TEMP); - gfx_draw_sprite(&dpi, ImageId(SPR_TEMP), screenPos); + GfxSetG1Element(SPR_TEMP, &g1temp); + DrawingEngineInvalidateImage(SPR_TEMP); + GfxDrawSprite(&dpi, ImageId(SPR_TEMP), screenPos); screenPos = windowPos + ScreenCoordsXY{ widget->midX(), widget->bottom - 12 }; @@ -175,7 +175,7 @@ public: { // Scenery not available DrawTextEllipsised( - &dpi, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE }); + dpi, screenPos, 308, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE }); screenPos.y -= LIST_ROW_HEIGHT; } } @@ -189,7 +189,7 @@ public: auto trackName = _trackName.c_str(); auto ft = Formatter(); ft.Add(trackName); - DrawTextBasic(&dpi, screenPos - ScreenCoordsXY{ 1, 0 }, STR_TRACK_DESIGN_NAME, ft); + DrawTextBasic(dpi, screenPos - ScreenCoordsXY{ 1, 0 }, STR_TRACK_DESIGN_NAME, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -197,11 +197,11 @@ public: { auto ft = Formatter(); - const auto* objectEntry = object_manager_load_object(&td6->vehicle_object.Entry); + const auto* objectEntry = ObjectManagerLoadObject(&td6->vehicle_object.Entry); if (objectEntry != nullptr) { - auto groupIndex = object_manager_get_loaded_object_entry_index(objectEntry); - auto rideName = get_ride_naming(td6->type, get_ride_entry(groupIndex)); + auto groupIndex = ObjectManagerGetLoadedObjectEntryIndex(objectEntry); + auto rideName = GetRideNaming(td6->type, *GetRideEntryByIndex(groupIndex)); ft.Add(rideName.Name); } else @@ -210,7 +210,7 @@ public: ft.Add(GetRideTypeDescriptor(td6->type).Naming.Name); } - DrawTextBasic(&dpi, screenPos, STR_TRACK_DESIGN_TYPE, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_DESIGN_TYPE, ft); screenPos.y += LIST_ROW_HEIGHT + 4; } @@ -219,25 +219,26 @@ public: fixed32_2dp rating = td6->excitement * 10; auto ft = Formatter(); ft.Add(rating); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); screenPos.y += LIST_ROW_HEIGHT; } { fixed32_2dp rating = td6->intensity * 10; auto ft = Formatter(); ft.Add(rating); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); screenPos.y += LIST_ROW_HEIGHT; } { fixed32_2dp rating = td6->nausea * 10; auto ft = Formatter(); ft.Add(rating); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); screenPos.y += LIST_ROW_HEIGHT + 4; } - if (td6->type != RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(td6->type); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { if (td6->type == RIDE_TYPE_MINI_GOLF) { @@ -245,7 +246,7 @@ public: uint16_t holes = td6->holes & 0x1F; auto ft = Formatter(); ft.Add(holes); - DrawTextBasic(&dpi, screenPos, STR_HOLES, ft); + DrawTextBasic(dpi, screenPos, STR_HOLES, ft); screenPos.y += LIST_ROW_HEIGHT; } else @@ -255,7 +256,7 @@ public: uint16_t speed = ((td6->max_speed << 16) * 9) >> 18; auto ft = Formatter(); ft.Add(speed); - DrawTextBasic(&dpi, screenPos, STR_MAX_SPEED, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_SPEED, ft); screenPos.y += LIST_ROW_HEIGHT; } // Average speed @@ -263,7 +264,7 @@ public: uint16_t speed = ((td6->average_speed << 16) * 9) >> 18; auto ft = Formatter(); ft.Add(speed); - DrawTextBasic(&dpi, screenPos, STR_AVERAGE_SPEED, ft); + DrawTextBasic(dpi, screenPos, STR_AVERAGE_SPEED, ft); screenPos.y += LIST_ROW_HEIGHT; } } @@ -272,7 +273,7 @@ public: auto ft = Formatter(); ft.Add(STR_RIDE_LENGTH_ENTRY); ft.Add(td6->ride_length); - DrawTextEllipsised(&dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft); + DrawTextEllipsised(dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -283,7 +284,7 @@ public: int32_t gForces = td6->max_positive_vertical_g * 32; auto ft = Formatter(); ft.Add(gForces); - DrawTextBasic(&dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); screenPos.y += LIST_ROW_HEIGHT; } // Maximum negative vertical Gs @@ -291,7 +292,7 @@ public: int32_t gForces = td6->max_negative_vertical_g * 32; auto ft = Formatter(); ft.Add(gForces); - DrawTextBasic(&dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); screenPos.y += LIST_ROW_HEIGHT; } // Maximum lateral Gs @@ -299,7 +300,7 @@ public: int32_t gForces = td6->max_lateral_g * 32; auto ft = Formatter(); ft.Add(gForces); - DrawTextBasic(&dpi, screenPos, STR_MAX_LATERAL_G, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_LATERAL_G, ft); screenPos.y += LIST_ROW_HEIGHT; } if (td6->total_air_time != 0) @@ -308,7 +309,7 @@ public: int32_t airTime = td6->total_air_time * 25; auto ft = Formatter(); ft.Add(airTime); - DrawTextBasic(&dpi, screenPos, STR_TOTAL_AIR_TIME, ft); + DrawTextBasic(dpi, screenPos, STR_TOTAL_AIR_TIME, ft); screenPos.y += LIST_ROW_HEIGHT; } } @@ -319,11 +320,11 @@ public: uint16_t drops = td6->drops & 0x3F; auto ft = Formatter(); ft.Add(drops); - DrawTextBasic(&dpi, screenPos, STR_DROPS, ft); + DrawTextBasic(dpi, screenPos, STR_DROPS, ft); screenPos.y += LIST_ROW_HEIGHT; // Drop height is multiplied by 0.75 - DrawTextBasic(&dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); + DrawTextBasic(dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -335,7 +336,7 @@ public: // Inversions auto ft = Formatter(); ft.Add(inversions); - DrawTextBasic(&dpi, screenPos, STR_INVERSIONS, ft); + DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft); screenPos.y += LIST_ROW_HEIGHT; } } @@ -347,7 +348,7 @@ public: auto ft = Formatter(); ft.Add(td6->space_required_x); ft.Add(td6->space_required_y); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -355,7 +356,7 @@ public: { auto ft = Formatter(); ft.Add(td6->cost); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_COST_AROUND, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_COST_AROUND, ft); } } @@ -371,7 +372,7 @@ private: auto destPath = env->GetDirectoryPath(OpenRCT2::DIRBASE::USER, OpenRCT2::DIRID::TRACK); if (!Platform::EnsureDirectoryExists(destPath.c_str())) { - log_error("Unable to create directory '%s'", destPath.c_str()); + LOG_ERROR("Unable to create directory '%s'", destPath.c_str()); ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, STR_NONE, {}); return; } @@ -380,7 +381,7 @@ private: if (File::Exists(destPath)) { - log_info("%s already exists, prompting user for a different track design name", destPath.c_str()); + LOG_INFO("%s already exists, prompting user for a different track design name", destPath.c_str()); ContextShowError(STR_UNABLE_TO_INSTALL_THIS_TRACK_DESIGN, STR_NONE, {}); WindowTextInputRawOpen( this, WIDX_INSTALL, STR_SELECT_NEW_NAME_FOR_TRACK_DESIGN, STR_AN_EXISTING_TRACK_DESIGN_ALREADY_HAS_THIS_NAME, @@ -388,7 +389,7 @@ private: } else { - if (track_repository_install(_trackPath.c_str(), _trackName.c_str())) + if (TrackRepositoryInstall(_trackPath.c_str(), _trackName.c_str())) { Close(); } @@ -400,7 +401,7 @@ private: } }; -rct_window* WindowInstallTrackOpen(const utf8* path) +WindowBase* WindowInstallTrackOpen(const utf8* path) { auto trackDesign = TrackDesignImport(path); if (trackDesign == nullptr) @@ -409,20 +410,20 @@ rct_window* WindowInstallTrackOpen(const utf8* path) return nullptr; } - object_manager_unload_all_objects(); + ObjectManagerUnloadAllObjects(); if (trackDesign->type == RIDE_TYPE_NULL) { - log_error("Failed to load track (ride type null): %s", path); + LOG_ERROR("Failed to load track (ride type null): %s", path); return nullptr; } - if (object_manager_load_object(&trackDesign->vehicle_object.Entry) == nullptr) + if (ObjectManagerLoadObject(&trackDesign->vehicle_object.Entry) == nullptr) { - log_error("Failed to load track (vehicle load fail): %s", path); + LOG_ERROR("Failed to load track (vehicle load fail): %s", path); return nullptr; } - window_close_by_class(WindowClass::EditorObjectSelection); - window_close_construction_windows(); + WindowCloseByClass(WindowClass::EditorObjectSelection); + WindowCloseConstructionWindows(); gTrackDesignSceneryToggle = false; _currentTrackPieceDirection = 2; diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index a6544b7dd5..d4a183a757 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,11 +39,11 @@ enum WindowLandWidgetIdx { WIDX_WALL, }; -static rct_widget window_land_widgets[] = { +static Widget window_land_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget ({19, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_UP, STR_ENABLE_MOUNTAIN_TOOL_TIP), // mountain mode - MakeWidget ({55, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PAINTBRUSH, STR_DISABLE_ELEVATION), // paint mode - MakeWidget ({27, 48}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , SPR_LAND_TOOL_SIZE_0, STR_NONE), // preview box + MakeWidget ({19, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP), STR_ENABLE_MOUNTAIN_TOOL_TIP), // mountain mode + MakeWidget ({55, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PAINTBRUSH), STR_DISABLE_ELEVATION), // paint mode + MakeWidget ({27, 48}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0), STR_NONE), // preview box MakeRemapWidget({28, 49}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP), // decrement size MakeRemapWidget({54, 63}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP), // increment size MakeWidget ({ 2, 106}, {47, 36}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_CHANGE_BASE_LAND_TIP), // floor texture @@ -72,7 +72,7 @@ public: widgets = window_land_widgets; hold_down_widgets = (1uLL << WIDX_DECREMENT) | (1uLL << WIDX_INCREMENT); WindowInitScrollWidgets(*this); - window_push_others_below(*this); + WindowPushOthersBelow(*this); gLandToolSize = 1; gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; @@ -89,7 +89,7 @@ public: { // If the tool wasn't changed, turn tool off if (LandToolIsActive()) - tool_cancel(); + ToolCancel(); } void OnMouseUp(WidgetIndex widgetIndex) override @@ -117,7 +117,7 @@ public: void OnMouseDown(WidgetIndex widgetIndex) override { - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; switch (widgetIndex) { case WIDX_FLOOR: @@ -227,15 +227,15 @@ public: SetWidgetPressed(WIDX_PAINTMODE, true); // Update the preview image (for tool sizes up to 7) - widgets[WIDX_PREVIEW].image = LandTool::SizeToSpriteIndex(gLandToolSize); + widgets[WIDX_PREVIEW].image = ImageId(LandTool::SizeToSpriteIndex(gLandToolSize)); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { ScreenCoordsXY screenCoords; int32_t numTiles; money64 price; - rct_widget* previewWidget = &widgets[WIDX_PREVIEW]; + Widget* previewWidget = &widgets[WIDX_PREVIEW]; DrawWidgets(dpi); DrawDropdownButtons(dpi); @@ -246,13 +246,13 @@ public: auto ft = Formatter(); ft.Add(gLandToolSize); screenCoords = { windowPos.x + previewWidget->midX(), windowPos.y + previewWidget->midY() }; - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } else if (gLandMountainMode) { screenCoords = { windowPos.x + previewWidget->left, windowPos.y + previewWidget->top }; auto sprite = ImageId(gLandToolSize % 2 == 0 ? SPR_G2_MOUNTAIN_TOOL_EVEN : SPR_G2_MOUNTAIN_TOOL_ODD); - gfx_draw_sprite(&dpi, sprite, screenCoords); + GfxDrawSprite(&dpi, sprite, screenCoords); WidgetDraw(&dpi, *this, WIDX_DECREMENT); WidgetDraw(&dpi, *this, WIDX_INCREMENT); } @@ -266,7 +266,7 @@ public: { auto ft = Formatter(); ft.Add(gLandToolRaiseCost); - DrawTextBasic(&dpi, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } screenCoords.y += 10; @@ -275,7 +275,7 @@ public: { auto ft = Formatter(); ft.Add(gLandToolLowerCost); - DrawTextBasic(&dpi, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } screenCoords.y += 50; @@ -300,13 +300,13 @@ public: { auto ft = Formatter(); ft.Add(price); - DrawTextBasic(&dpi, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } } } private: - void DrawDropdownButtons(rct_drawpixelinfo& dpi) + void DrawDropdownButtons(DrawPixelInfo& dpi) { auto& objManager = GetContext()->GetObjectManager(); const auto surfaceObj = static_cast( @@ -331,14 +331,14 @@ private: DrawDropdownButton(dpi, WIDX_WALL, edgeImage); } - void DrawDropdownButton(rct_drawpixelinfo& dpi, WidgetIndex widgetIndex, ImageId image) + void DrawDropdownButton(DrawPixelInfo& dpi, WidgetIndex widgetIndex, ImageId image) { const auto& widget = widgets[widgetIndex]; - gfx_draw_sprite(&dpi, image, { windowPos.x + widget.left, windowPos.y + widget.top }); + GfxDrawSprite(&dpi, image, { windowPos.x + widget.left, windowPos.y + widget.top }); } }; -rct_window* WindowLandOpen() +WindowBase* WindowLandOpen() { return WindowFocusOrCreate(WindowClass::Land, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0); } diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index a0d4867918..708f3d13ed 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,9 +38,9 @@ enum WindowLandRightsWidgetIdx { WIDX_BUY_CONSTRUCTION_RIGHTS }; -static rct_widget window_land_rights_widgets[] = { +static Widget window_land_rights_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget ({27, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , SPR_LAND_TOOL_SIZE_0 ), // preview box + MakeWidget ({27, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0) ), // preview box MakeRemapWidget({28, 18}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_RIGHTS_TIP), // decrement size MakeRemapWidget({54, 32}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_RIGHTS_TIP ), // increment size MakeRemapWidget({22, 53}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, SPR_BUY_LAND_RIGHTS, STR_BUY_LAND_RIGHTS_TIP ), // land rights @@ -60,35 +60,35 @@ public: widgets = window_land_rights_widgets; hold_down_widgets = (1uLL << WIDX_INCREMENT) | (1uLL << WIDX_DECREMENT); WindowInitScrollWidgets(*this); - window_push_others_below(*this); + WindowPushOthersBelow(*this); _landRightsMode = LAND_RIGHTS_MODE_BUY_LAND; pressed_widgets = (1uLL << WIDX_BUY_LAND_RIGHTS); gLandToolSize = 1; - show_gridlines(); - tool_set(*this, WIDX_BUY_LAND_RIGHTS, Tool::UpArrow); - input_set_flag(INPUT_FLAG_6, true); + ShowGridlines(); + ToolSet(*this, WIDX_BUY_LAND_RIGHTS, Tool::UpArrow); + InputSetFlag(INPUT_FLAG_6, true); - show_land_rights(); + ShowLandRights(); if (gLandRemainingConstructionSales == 0) { - show_construction_rights(); + ShowConstructionRights(); } } void OnClose() override { - hide_gridlines(); + HideGridlines(); if (gLandRemainingConstructionSales == 0) { - hide_construction_rights(); + HideConstructionRights(); } // If the tool wasn't changed, turn tool off if (LandRightsToolIsActive()) - tool_cancel(); + ToolCancel(); } void OnMouseUp(WidgetIndex widgetIndex) override @@ -104,18 +104,18 @@ public: case WIDX_BUY_LAND_RIGHTS: if (_landRightsMode != LAND_RIGHTS_MODE_BUY_LAND) { - tool_set(*this, WIDX_BUY_LAND_RIGHTS, Tool::UpArrow); + ToolSet(*this, WIDX_BUY_LAND_RIGHTS, Tool::UpArrow); _landRightsMode = LAND_RIGHTS_MODE_BUY_LAND; - show_land_rights(); + ShowLandRights(); Invalidate(); } break; case WIDX_BUY_CONSTRUCTION_RIGHTS: if (_landRightsMode != LAND_RIGHTS_MODE_BUY_CONSTRUCTION_RIGHTS) { - tool_set(*this, WIDX_BUY_CONSTRUCTION_RIGHTS, Tool::UpArrow); + ToolSet(*this, WIDX_BUY_CONSTRUCTION_RIGHTS, Tool::UpArrow); _landRightsMode = LAND_RIGHTS_MODE_BUY_CONSTRUCTION_RIGHTS; - show_construction_rights(); + ShowConstructionRights(); Invalidate(); } break; @@ -185,7 +185,7 @@ public: SetWidgetPressed(WIDX_BUY_CONSTRUCTION_RIGHTS, true); } - window_land_rights_widgets[WIDX_PREVIEW].image = LandTool::SizeToSpriteIndex(gLandToolSize); + window_land_rights_widgets[WIDX_PREVIEW].image = ImageId(LandTool::SizeToSpriteIndex(gLandToolSize)); if (gLandRemainingOwnershipSales == 0) { @@ -210,7 +210,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto screenCoords = ScreenCoordsXY{ windowPos.x + window_land_rights_widgets[WIDX_PREVIEW].midX(), windowPos.y + window_land_rights_widgets[WIDX_PREVIEW].midY() }; @@ -221,17 +221,17 @@ public: { auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } // Draw cost amount - if (_landRightsCost != MONEY32_UNDEFINED && _landRightsCost != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) + if (_landRightsCost != MONEY64_UNDEFINED && _landRightsCost != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_landRightsCost); screenCoords = { window_land_rights_widgets[WIDX_PREVIEW].midX() + windowPos.x, window_land_rights_widgets[WIDX_PREVIEW].bottom + windowPos.y + 32 }; - DrawTextBasic(&dpi, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } } @@ -240,14 +240,14 @@ public: MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - auto mapTile = screen_get_map_xy(screenCoords, nullptr); + auto mapTile = ScreenGetMapXY(screenCoords, nullptr); if (!mapTile.has_value()) { - if (_landRightsCost != MONEY32_UNDEFINED) + if (_landRightsCost != MONEY64_UNDEFINED) { - _landRightsCost = MONEY32_UNDEFINED; - window_invalidate_by_class(WindowClass::ClearScenery); + _landRightsCost = MONEY64_UNDEFINED; + WindowInvalidateByClass(WindowClass::ClearScenery); } return; } @@ -314,18 +314,18 @@ public: : LandBuyRightSetting::BuyConstructionRights); auto res = GameActions::Query(&landBuyRightsAction); - _landRightsCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY32_UNDEFINED; + _landRightsCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; } void OnToolAbort(WidgetIndex widgetIndex) override { if (_landRightsMode == LAND_RIGHTS_MODE_BUY_LAND) { - hide_land_rights(); + HideLandRights(); } else { - hide_construction_rights(); + HideConstructionRights(); } } @@ -379,7 +379,7 @@ public: private: uint8_t _landRightsMode; - money32 _landRightsCost; + money64 _landRightsCost; void InputSize() { @@ -391,7 +391,7 @@ private: bool LandRightsToolIsActive() { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) return false; if (gCurrentToolWidget.window_classification != WindowClass::LandRights) return false; @@ -399,7 +399,7 @@ private: } }; -rct_window* WindowLandRightsOpen() +WindowBase* WindowLandRightsOpen() { return WindowFocusOrCreate( WindowClass::LandRights, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0); diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index 0692e23de2..413b12acd6 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -45,7 +45,8 @@ static constexpr const StringId WINDOW_TITLE = STR_NONE; static constexpr const int32_t WW = 350; static constexpr const int32_t WH = 400; -// clang-format off +static constexpr uint16_t DATE_TIME_GAP = 2; + enum { WIDX_BACKGROUND, @@ -62,55 +63,27 @@ enum WIDX_BROWSE, }; -// 0x9DE48C -static rct_widget window_loadsave_widgets[] = +// clang-format off +static Widget window_loadsave_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget({ 0, WH - 1}, { WW, 1}, WindowWidgetType::Resize, WindowColour::Secondary ), // tab content panel - MakeWidget({ 4, 36}, { 84, 14}, WindowWidgetType::Button, WindowColour::Primary , STR_LOADSAVE_DEFAULT, STR_LOADSAVE_DEFAULT_TIP), // Go to default directory - MakeWidget({ 88, 36}, { 84, 14}, WindowWidgetType::Button, WindowColour::Primary , STR_FILEBROWSER_ACTION_UP ), // Up - MakeWidget({ 172, 36}, { 87, 14}, WindowWidgetType::Button, WindowColour::Primary , STR_FILEBROWSER_ACTION_NEW_FOLDER ), // New - MakeWidget({ 259, 36}, { 87, 14}, WindowWidgetType::Button, WindowColour::Primary , STR_FILEBROWSER_ACTION_NEW_FILE ), // New - MakeWidget({ 4, 55}, {170, 14}, WindowWidgetType::TableHeader, WindowColour::Primary ), // Name - MakeWidget({(WW - 5) / 2 + 1, 55}, {170, 14}, WindowWidgetType::TableHeader, WindowColour::Primary ), // Date - MakeWidget({ 4, 68}, {342, 303}, WindowWidgetType::Scroll, WindowColour::Primary , SCROLL_VERTICAL ), // File list - MakeWidget({ 4, WH - 24}, {197, 19}, WindowWidgetType::Button, WindowColour::Primary , STR_FILEBROWSER_USE_SYSTEM_WINDOW ), // Use native browser + MakeWidget({ 0, WH - 1}, { WW, 1}, WindowWidgetType::Resize, WindowColour::Secondary ), // WIDX_RESIZE + MakeWidget({ 4, 36}, { 84, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_LOADSAVE_DEFAULT, STR_LOADSAVE_DEFAULT_TIP), // WIDX_DEFAULT + MakeWidget({ 88, 36}, { 84, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_FILEBROWSER_ACTION_UP ), // WIDX_UP + MakeWidget({ 172, 36}, { 87, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_FILEBROWSER_ACTION_NEW_FOLDER ), // WIDX_NEW_FOLDER + MakeWidget({ 259, 36}, { 87, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_FILEBROWSER_ACTION_NEW_FILE ), // WIDX_NEW_FILE + MakeWidget({ 4, 55}, {170, 14}, WindowWidgetType::TableHeader, WindowColour::Primary ), // WIDX_SORT_NAME + MakeWidget({(WW - 5) / 2 + 1, 55}, {170, 14}, WindowWidgetType::TableHeader, WindowColour::Primary ), // WIDX_SORT_DATE + MakeWidget({ 4, 68}, {342, 303}, WindowWidgetType::Scroll, WindowColour::Primary, SCROLL_VERTICAL ), // WIDX_SCROLL + MakeWidget({ 4, WH - 24}, {197, 19}, WindowWidgetType::Button, WindowColour::Primary, STR_FILEBROWSER_USE_SYSTEM_WINDOW ), // WIDX_BROWSE WIDGETS_END, }; - -#pragma endregion - -#pragma region Events - -static void WindowLoadsaveClose(rct_window *w); -static void WindowLoadsaveMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowLoadsaveResize(rct_window *w); -static void WindowLoadsaveScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); -static void WindowLoadsaveScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowLoadsaveScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowLoadsaveTextinput(rct_window *w, WidgetIndex widgetIndex, char *text); -static void WindowLoadsaveComputeMaxDateWidth(); -static void WindowLoadsaveInvalidate(rct_window *w); -static void WindowLoadsavePaint(rct_window *w, rct_drawpixelinfo *dpi); -static void WindowLoadsaveScrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); - -static WindowEventList window_loadsave_events([](auto& events) -{ - events.close = &WindowLoadsaveClose; - events.mouse_up = &WindowLoadsaveMouseup; - events.resize = &WindowLoadsaveResize; - events.get_scroll_size = &WindowLoadsaveScrollgetsize; - events.scroll_mousedown = &WindowLoadsaveScrollmousedown; - events.scroll_mouseover = &WindowLoadsaveScrollmouseover; - events.text_input = &WindowLoadsaveTextinput; - events.invalidate = &WindowLoadsaveInvalidate; - events.paint = &WindowLoadsavePaint; - events.scroll_paint = &WindowLoadsaveScrollpaint; -}); // clang-format on #pragma endregion +static WindowBase* WindowOverwritePromptOpen(const char* name, const char* path); + enum { TYPE_DIRECTORY, @@ -139,15 +112,40 @@ static u8string _extensionPattern; static u8string _defaultPath; static int32_t _type; -static int32_t maxDateWidth = 0; -static int32_t maxTimeWidth = 0; +static bool ListItemSort(LoadSaveListItem& a, LoadSaveListItem& b) +{ + if (a.type != b.type) + return a.type - b.type < 0; -static void WindowLoadsavePopulateList( - rct_window* w, int32_t includeNewItem, const u8string& directory, std::string_view extensionPattern); -static void WindowLoadsaveSelect(rct_window* w, const utf8* path); -static void WindowLoadsaveSortList(); + switch (gConfigGeneral.LoadSaveSort) + { + case Sort::NameAscending: + return StrLogicalCmp(a.name.c_str(), b.name.c_str()) < 0; + case Sort::NameDescending: + return -StrLogicalCmp(a.name.c_str(), b.name.c_str()) < 0; + case Sort::DateDescending: + return -difftime(a.date_modified, b.date_modified) < 0; + case Sort::DateAscending: + return difftime(a.date_modified, b.date_modified) < 0; + } + return StrLogicalCmp(a.name.c_str(), b.name.c_str()) < 0; +} -static rct_window* WindowOverwritePromptOpen(const char* name, const char* path); +static void SetAndSaveConfigPath(u8string& config_str, u8string_view path) +{ + config_str = Path::GetDirectory(path); + ConfigSaveDefault(); +} + +static bool IsValidPath(const char* path) +{ + // HACK This is needed because tracks get passed through with td? + // I am sure this will change eventually to use the new FileScanner + // which handles multiple patterns + auto filename = Path::GetFileNameWithoutExtension(path); + + return Platform::IsFilenameValid(filename); +} static u8string GetLastDirectoryByType(int32_t type) { @@ -238,7 +236,7 @@ static u8string RemovePatternWildcard(u8string_view pattern) return u8string{ pattern }; } -static u8string WindowLoadsaveGetDir(const int32_t type) +static u8string GetDir(const int32_t type) { u8string result = GetLastDirectoryByType(type); if (result.empty() || !Path::DirectoryExists(result)) @@ -248,9 +246,792 @@ static u8string WindowLoadsaveGetDir(const int32_t type) return result; } -static u8string Browse(bool isSave); +static void InvokeCallback(int32_t result, const utf8* path) +{ + if (_loadSaveCallback != nullptr) + { + _loadSaveCallback(result, path); + } +} -rct_window* WindowLoadsaveOpen( +static void Select(const char* path) +{ + if (!IsValidPath(path)) + { + ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {}); + return; + } + + char pathBuffer[MAX_PATH]; + SafeStrCpy(pathBuffer, path, sizeof(pathBuffer)); + + switch (_type & 0x0F) + { + case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME): + SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer); + if (OpenRCT2::GetContext()->LoadParkFromFile(pathBuffer)) + { + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + WindowCloseByClass(WindowClass::Loadsave); + GfxInvalidateScreen(); + } + else + { + // Not the best message... + ContextShowError(STR_LOAD_GAME, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); + InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); + } + break; + + case (LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME): + SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer); + if (ScenarioSave(pathBuffer, gConfigGeneral.SavePluginData ? 1 : 0)) + { + gScenarioSavePath = pathBuffer; + gCurrentLoadedPath = pathBuffer; + gIsAutosaveLoaded = false; + gFirstTimeSaving = false; + + WindowCloseByClass(WindowClass::Loadsave); + GfxInvalidateScreen(); + + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + } + else + { + ContextShowError(STR_SAVE_GAME, STR_GAME_SAVE_FAILED, {}); + InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); + } + break; + + case (LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE): + SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer); + if (Editor::LoadLandscape(pathBuffer)) + { + gCurrentLoadedPath = pathBuffer; + GfxInvalidateScreen(); + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + } + else + { + // Not the best message... + ContextShowError(STR_LOAD_LANDSCAPE, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); + InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); + } + break; + + case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE): + SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer); + gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer))); + if (ScenarioSave(pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2)) + { + gCurrentLoadedPath = pathBuffer; + WindowCloseByClass(WindowClass::Loadsave); + GfxInvalidateScreen(); + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + } + else + { + ContextShowError(STR_SAVE_LANDSCAPE, STR_LANDSCAPE_SAVE_FAILED, {}); + InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); + } + break; + + case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO): + { + SetAndSaveConfigPath(gConfigGeneral.LastSaveScenarioDirectory, pathBuffer); + int32_t parkFlagsBackup = gParkFlags; + gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; + gEditorStep = EditorStep::Invalid; + gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer))); + int32_t success = ScenarioSave(pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2); + gParkFlags = parkFlagsBackup; + + if (success) + { + WindowCloseByClass(WindowClass::Loadsave); + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + TitleLoad(); + } + else + { + ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {}); + gEditorStep = EditorStep::ObjectiveSelection; + InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); + } + break; + } + + case (LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK): + { + SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer); + auto intent = Intent(WindowClass::InstallTrack); + intent.PutExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); + ContextOpenIntent(&intent); + WindowCloseByClass(WindowClass::Loadsave); + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + break; + } + + case (LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK): + { + SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer); + + const auto withExtension = Path::WithExtension(pathBuffer, "td6"); + String::Set(pathBuffer, sizeof(pathBuffer), withExtension.c_str()); + + RCT2::T6Exporter t6Export{ _trackDesign }; + + auto success = t6Export.SaveTrack(pathBuffer); + + if (success) + { + WindowCloseByClass(WindowClass::Loadsave); + WindowRideMeasurementsDesignCancel(); + InvokeCallback(MODAL_RESULT_OK, path); + } + else + { + ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_TRACK, STR_TRACK_SAVE_FAILED, {}); + InvokeCallback(MODAL_RESULT_FAIL, path); + } + break; + } + + case (LOADSAVETYPE_LOAD | LOADSAVETYPE_HEIGHTMAP): + WindowCloseByClass(WindowClass::Loadsave); + InvokeCallback(MODAL_RESULT_OK, pathBuffer); + break; + } +} + +static u8string OpenSystemFileBrowser(bool isSave) +{ + OpenRCT2::Ui::FileDialogDesc desc = {}; + u8string extension{}; + auto fileType = FileExtension::Unknown; + StringId title = STR_NONE; + switch (_type & 0x0E) + { + case LOADSAVETYPE_GAME: + extension = u8".park"; + fileType = FileExtension::PARK; + title = isSave ? STR_FILE_DIALOG_TITLE_SAVE_GAME : STR_FILE_DIALOG_TITLE_LOAD_GAME; + desc.Filters.emplace_back(LanguageGetString(STR_OPENRCT2_SAVED_GAME), GetFilterPatternByType(_type, isSave)); + break; + + case LOADSAVETYPE_LANDSCAPE: + extension = u8".park"; + fileType = FileExtension::PARK; + title = isSave ? STR_FILE_DIALOG_TITLE_SAVE_LANDSCAPE : STR_FILE_DIALOG_TITLE_LOAD_LANDSCAPE; + desc.Filters.emplace_back(LanguageGetString(STR_OPENRCT2_LANDSCAPE_FILE), GetFilterPatternByType(_type, isSave)); + break; + + case LOADSAVETYPE_SCENARIO: + extension = u8".park"; + fileType = FileExtension::PARK; + title = STR_FILE_DIALOG_TITLE_SAVE_SCENARIO; + desc.Filters.emplace_back(LanguageGetString(STR_OPENRCT2_SCENARIO_FILE), GetFilterPatternByType(_type, isSave)); + break; + + case LOADSAVETYPE_TRACK: + extension = u8".td6"; + fileType = FileExtension::TD6; + title = isSave ? STR_FILE_DIALOG_TITLE_SAVE_TRACK : STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN; + desc.Filters.emplace_back(LanguageGetString(STR_OPENRCT2_TRACK_DESIGN_FILE), GetFilterPatternByType(_type, isSave)); + break; + + case LOADSAVETYPE_HEIGHTMAP: + title = STR_FILE_DIALOG_TITLE_LOAD_HEIGHTMAP; + desc.Filters.emplace_back(LanguageGetString(STR_OPENRCT2_HEIGHTMAP_FILE), GetFilterPatternByType(_type, isSave)); + break; + } + + u8string path = _directory; + if (isSave) + { + // The file browser requires a file path instead of just a directory + if (!_defaultPath.empty()) + { + path = Path::Combine(path, _defaultPath); + } + else + { + auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); + auto buffer = park.Name; + if (buffer.empty()) + { + // Use localised "Unnamed Park" if park name was empty. + buffer = FormatStringID(STR_UNNAMED_PARK, nullptr); + } + path = Path::Combine(path, buffer); + } + } + + desc.InitialDirectory = _directory; + desc.Type = isSave ? OpenRCT2::Ui::FileDialogType::Save : OpenRCT2::Ui::FileDialogType::Open; + desc.DefaultFilename = isSave ? path : u8string(); + + // Add 'all files' filter. If the number of filters is increased, this code will need to be adjusted. + desc.Filters.emplace_back(LanguageGetString(STR_ALL_FILES), "*"); + + desc.Title = LanguageGetString(title); + + u8string outPath = ContextOpenCommonFileDialog(desc); + if (!outPath.empty()) + { + // When the given save type was given, Windows still interprets a filename with a dot in its name as a custom + // extension, meaning files like "My Coaster v1.2" will not get the .td6 extension by default. + if (isSave && GetFileExtensionType(outPath) != fileType) + outPath = Path::WithExtension(outPath, extension); + } + + return outPath; +} + +class LoadSaveWindow final : public Window +{ +public: + LoadSaveWindow(int32_t type) + { + widgets = window_loadsave_widgets; + + min_width = WW; + min_height = WH / 2; + max_width = WW * 2; + max_height = WH * 2; + + const auto uiContext = OpenRCT2::GetContext()->GetUiContext(); + if (!uiContext->HasFilePicker()) + { + disabled_widgets |= (1uLL << WIDX_BROWSE); + window_loadsave_widgets[WIDX_BROWSE].type = WindowWidgetType::Empty; + } + + // TODO: Split LOADSAVETYPE_* into two proper enum classes (one for load/save, the other for the type) + const bool isSave = (type & 0x01) == LOADSAVETYPE_SAVE; + const auto path = GetDir(type); + + const char* pattern = GetFilterPatternByType(type, isSave); + PopulateList(isSave, path, pattern); + no_list_items = static_cast(_listItems.size()); + selected_list_item = -1; + + InitScrollWidgets(); + ComputeMaxDateWidth(); + } + +private: + int32_t maxDateWidth{ 0 }; + int32_t maxTimeWidth{ 0 }; + +public: + void PopulateList(int32_t includeNewItem, const u8string& directory, std::string_view extensionPattern) + { + const auto absoluteDirectory = Path::GetAbsolute(directory); + SafeStrCpy(_directory, absoluteDirectory.c_str(), std::size(_directory)); + // Note: This compares the pointers, not values + _extensionPattern = extensionPattern; + _shortenedDirectory[0] = '\0'; + + _listItems.clear(); + + // Show "new" buttons when saving + window_loadsave_widgets[WIDX_NEW_FILE].type = includeNewItem ? WindowWidgetType::Button : WindowWidgetType::Empty; + window_loadsave_widgets[WIDX_NEW_FOLDER].type = includeNewItem ? WindowWidgetType::Button : WindowWidgetType::Empty; + + int32_t drives = Platform::GetDrives(); + if (directory.empty() && drives) + { + // List Windows drives + disabled_widgets |= (1uLL << WIDX_NEW_FILE) | (1uLL << WIDX_NEW_FOLDER) | (1uLL << WIDX_UP); + static constexpr auto NumDriveLetters = 26; + for (int32_t x = 0; x < NumDriveLetters; x++) + { + if (drives & (1 << x)) + { + // If the drive exists, list it + LoadSaveListItem newListItem; + newListItem.path = std::string(1, 'A' + x) + ":" PATH_SEPARATOR; + newListItem.name = newListItem.path; + newListItem.type = TYPE_DIRECTORY; + + _listItems.push_back(std::move(newListItem)); + } + } + } + else + { + // Remove the separator at the end of the path, if present + SafeStrCpy(_parentDirectory, absoluteDirectory.c_str(), std::size(_parentDirectory)); + if (_parentDirectory[strlen(_parentDirectory) - 1] == *PATH_SEPARATOR + || _parentDirectory[strlen(_parentDirectory) - 1] == '/') + _parentDirectory[strlen(_parentDirectory) - 1] = '\0'; + + // Remove everything past the now last separator + char* ch = strrchr(_parentDirectory, *PATH_SEPARATOR); + char* posix_ch = strrchr(_parentDirectory, '/'); + ch = ch < posix_ch ? posix_ch : ch; + if (ch != nullptr) + { + *(ch + 1) = '\0'; + } + else if (drives) + { + // If on Windows, clear the entire path to show the drives + _parentDirectory[0] = '\0'; + } + else + { + // Else, go to the root directory + snprintf(_parentDirectory, MAX_PATH, "%c", *PATH_SEPARATOR); + } + + // Disable the Up button if the current directory is the root directory + if (String::IsNullOrEmpty(_parentDirectory) && !drives) + disabled_widgets |= (1uLL << WIDX_UP); + else + disabled_widgets &= ~(1uLL << WIDX_UP); + + // Re-enable the "new" buttons if these were disabled + disabled_widgets &= ~(1uLL << WIDX_NEW_FILE); + disabled_widgets &= ~(1uLL << WIDX_NEW_FOLDER); + + // List all directories + auto subDirectories = Path::GetDirectories(absoluteDirectory); + for (const auto& sdName : subDirectories) + { + auto subDir = sdName + PATH_SEPARATOR; + + LoadSaveListItem newListItem; + newListItem.path = Path::Combine(absoluteDirectory, subDir); + newListItem.name = std::move(subDir); + newListItem.type = TYPE_DIRECTORY; + newListItem.loaded = false; + + _listItems.push_back(std::move(newListItem)); + } + + // List all files with the wanted extensions + bool showExtension = false; + for (const u8string& extToken : String::Split(extensionPattern, ";")) + { + const u8string filter = Path::Combine(directory, extToken); + auto scanner = Path::ScanDirectory(filter, false); + while (scanner->Next()) + { + LoadSaveListItem newListItem; + newListItem.path = scanner->GetPath(); + newListItem.type = TYPE_FILE; + newListItem.date_modified = Platform::FileGetModifiedTime(newListItem.path.c_str()); + + // Cache a human-readable version of the modified date. + newListItem.date_formatted = Platform::FormatShortDate(newListItem.date_modified); + newListItem.time_formatted = Platform::FormatTime(newListItem.date_modified); + + // Mark if file is the currently loaded game + newListItem.loaded = newListItem.path.compare(gCurrentLoadedPath) == 0; + + // Remove the extension (but only the first extension token) + if (!showExtension) + { + newListItem.name = Path::GetFileNameWithoutExtension(newListItem.path); + } + else + { + newListItem.name = Path::GetFileName(newListItem.path); + } + + _listItems.push_back(std::move(newListItem)); + } + + showExtension = true; // Show any extension after the first iteration + } + + SortList(); + } + + Invalidate(); + } + + void ComputeMaxDateWidth() + { + // Generate a time object for a relatively wide time: 2000-02-20 00:00:00 + std::tm tm; + tm.tm_sec = 0; + tm.tm_min = 0; + tm.tm_hour = 0; + tm.tm_mday = 20; + tm.tm_mon = 2; + tm.tm_year = 100; + tm.tm_wday = 5; + tm.tm_yday = 51; + tm.tm_isdst = -1; + + std::time_t long_time = mktime(&tm); + + // Check how this date is represented (e.g. 2000-02-20, or 00/02/20) + std::string date = Platform::FormatShortDate(long_time); + maxDateWidth = GfxGetStringWidth(date.c_str(), FontStyle::Medium) + DATE_TIME_GAP; + + // Some locales do not use leading zeros for months and days, so let's try October, too. + tm.tm_mon = 10; + tm.tm_yday = 294; + long_time = mktime(&tm); + + // Again, check how this date is represented (e.g. 2000-10-20, or 00/10/20) + date = Platform::FormatShortDate(long_time); + maxDateWidth = std::max(maxDateWidth, GfxGetStringWidth(date.c_str(), FontStyle::Medium) + DATE_TIME_GAP); + + // Time appears to be universally represented with two digits for minutes, so 12:00 or 00:00 should be representable. + std::string time = Platform::FormatTime(long_time); + maxTimeWidth = GfxGetStringWidth(time.c_str(), FontStyle::Medium) + DATE_TIME_GAP; + } + + void SortList() + { + std::sort(_listItems.begin(), _listItems.end(), ListItemSort); + } + +#pragma region Events +public: + void OnOpen() override + { + } + + void OnClose() override + { + _listItems.clear(); + WindowCloseByClass(WindowClass::LoadsaveOverwritePrompt); + } + + void OnResize() override + { + if (width < min_width) + { + Invalidate(); + width = min_width; + } + if (height < min_height) + { + Invalidate(); + height = min_height; + } + } + + void OnPrepareDraw() override + { + ResizeFrameWithPage(); + + Widget* date_widget = &window_loadsave_widgets[WIDX_SORT_DATE]; + date_widget->right = width - 5; + date_widget->left = date_widget->right - (maxDateWidth + maxTimeWidth + (4 * DATE_TIME_GAP) + (SCROLLBAR_WIDTH + 1)); + + window_loadsave_widgets[WIDX_SORT_NAME].left = 4; + window_loadsave_widgets[WIDX_SORT_NAME].right = window_loadsave_widgets[WIDX_SORT_DATE].left - 1; + + window_loadsave_widgets[WIDX_SCROLL].right = width - 4; + window_loadsave_widgets[WIDX_SCROLL].bottom = height - 30; + + window_loadsave_widgets[WIDX_BROWSE].top = height - 24; + window_loadsave_widgets[WIDX_BROWSE].bottom = height - 6; + } + + void OnDraw(DrawPixelInfo& dpi) override + { + DrawWidgets(dpi); + + if (_shortenedDirectory[0] == '\0') + { + ShortenPath(_shortenedDirectory, sizeof(_shortenedDirectory), _directory, width - 8, FontStyle::Medium); + } + + // Format text + thread_local std::string _buffer; + _buffer.assign("{BLACK}"); + _buffer += _shortenedDirectory; + + // Draw path text + const auto normalisedPath = Platform::StrDecompToPrecomp(_buffer.data()); + const auto* normalisedPathC = normalisedPath.c_str(); + auto ft = Formatter(); + ft.Add(normalisedPathC); + DrawTextEllipsised(dpi, windowPos + ScreenCoordsXY{ 4, 20 }, width - 8, STR_STRING, ft); + + // Name button text + StringId id = STR_NONE; + if (gConfigGeneral.LoadSaveSort == Sort::NameAscending) + id = STR_UP; + else if (gConfigGeneral.LoadSaveSort == Sort::NameDescending) + id = STR_DOWN; + + // Draw name button indicator. + Widget sort_name_widget = window_loadsave_widgets[WIDX_SORT_NAME]; + ft = Formatter(); + ft.Add(id); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ sort_name_widget.left + 11, sort_name_widget.top + 1 }, STR_NAME, ft, + { COLOUR_GREY }); + + // Date button text + if (gConfigGeneral.LoadSaveSort == Sort::DateAscending) + id = STR_UP; + else if (gConfigGeneral.LoadSaveSort == Sort::DateDescending) + id = STR_DOWN; + else + id = STR_NONE; + + Widget sort_date_widget = window_loadsave_widgets[WIDX_SORT_DATE]; + ft = Formatter(); + ft.Add(id); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ sort_date_widget.left + 5, sort_date_widget.top + 1 }, STR_DATE, ft, + { COLOUR_GREY }); + } + + OpenRCT2String OnTooltip(WidgetIndex widgetIndex, StringId fallback) override + { + return { fallback, {} }; + } + + void OnMouseUp(WidgetIndex widgetIndex) override + { + bool isSave = (_type & 0x01) == LOADSAVETYPE_SAVE; + switch (widgetIndex) + { + case WIDX_CLOSE: + Close(); + break; + + case WIDX_UP: + PopulateList(isSave, _parentDirectory, _extensionPattern); + InitScrollWidgets(); + no_list_items = static_cast(_listItems.size()); + break; + + case WIDX_NEW_FILE: + WindowTextInputOpen( + this, WIDX_NEW_FILE, STR_NONE, STR_FILEBROWSER_FILE_NAME_PROMPT, {}, STR_STRING, + reinterpret_cast(_defaultPath.c_str()), 64); + break; + + case WIDX_NEW_FOLDER: + WindowTextInputRawOpen(this, WIDX_NEW_FOLDER, STR_NONE, STR_FILEBROWSER_FOLDER_NAME_PROMPT, {}, "", 64); + break; + + case WIDX_BROWSE: + { + u8string path = OpenSystemFileBrowser(isSave); + if (!path.empty()) + { + Select(path.c_str()); + } + else + { + // If user cancels file dialog, refresh list + PopulateList(isSave, _directory, _extensionPattern); + InitScrollWidgets(); + no_list_items = static_cast(_listItems.size()); + } + } + break; + + case WIDX_SORT_NAME: + if (gConfigGeneral.LoadSaveSort == Sort::NameAscending) + { + gConfigGeneral.LoadSaveSort = Sort::NameDescending; + } + else + { + gConfigGeneral.LoadSaveSort = Sort::NameAscending; + } + ConfigSaveDefault(); + SortList(); + Invalidate(); + break; + + case WIDX_SORT_DATE: + if (gConfigGeneral.LoadSaveSort == Sort::DateDescending) + { + gConfigGeneral.LoadSaveSort = Sort::DateAscending; + } + else + { + gConfigGeneral.LoadSaveSort = Sort::DateDescending; + } + ConfigSaveDefault(); + SortList(); + Invalidate(); + break; + + case WIDX_DEFAULT: + PopulateList(isSave, GetInitialDirectoryByType(_type).c_str(), _extensionPattern); + InitScrollWidgets(); + no_list_items = static_cast(_listItems.size()); + break; + } + } + + void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override + { + if (text.empty()) + return; + + if (!Platform::IsFilenameValid(text)) + { + ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {}); + return; + } + + switch (widgetIndex) + { + case WIDX_NEW_FOLDER: + { + const u8string path = Path::Combine(_directory, text); + if (!Platform::EnsureDirectoryExists(path)) + { + ContextShowError(STR_UNABLE_TO_CREATE_FOLDER, STR_NONE, {}); + return; + } + + no_list_items = 0; + selected_list_item = -1; + + PopulateList((_type & 1) == LOADSAVETYPE_SAVE, path, _extensionPattern); + InitScrollWidgets(); + + no_list_items = static_cast(_listItems.size()); + Invalidate(); + break; + } + + case WIDX_NEW_FILE: + { + const u8string path = Path::WithExtension( + Path::Combine(_directory, text), RemovePatternWildcard(_extensionPattern)); + + if (File::Exists(path)) + WindowOverwritePromptOpen(std::string(text).c_str(), path.c_str()); + else + Select(path.c_str()); + break; + } + } + } + + ScreenSize OnScrollGetSize(int32_t scrollIndex) override + { + return { 0, no_list_items * SCROLLABLE_ROW_HEIGHT }; + } + + void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override + { + int32_t selectedItem; + + selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + if (selectedItem >= no_list_items) + return; + + selected_list_item = selectedItem; + + Invalidate(); + } + + void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override + { + int32_t selectedItem; + + selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; + if (selectedItem >= no_list_items) + return; + + if (_listItems[selectedItem].type == TYPE_DIRECTORY) + { + // The selected item is a folder + int32_t includeNewItem; + + no_list_items = 0; + selected_list_item = -1; + includeNewItem = (_type & 1) == LOADSAVETYPE_SAVE; + + char directory[MAX_PATH]; + SafeStrCpy(directory, _listItems[selectedItem].path.c_str(), sizeof(directory)); + + PopulateList(includeNewItem, directory, _extensionPattern); + InitScrollWidgets(); + + no_list_items = static_cast(_listItems.size()); + } + else + { + // TYPE_FILE + // Load or overwrite + if ((_type & 0x01) == LOADSAVETYPE_SAVE) + WindowOverwritePromptOpen(_listItems[selectedItem].name.c_str(), _listItems[selectedItem].path.c_str()); + else + Select(_listItems[selectedItem].path.c_str()); + } + } + + 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); + 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; + if (y > dpi.y + dpi.height) + break; + + if (y + SCROLLABLE_ROW_HEIGHT < dpi.y) + continue; + + StringId stringId = STR_BLACK_STRING; + + // If hovering over item, change the color and fill the backdrop. + if (i == selected_list_item) + { + stringId = STR_WINDOW_COLOUR_2_STRINGID; + GfxFilterRect(&dpi, { 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1); + } + // display a marker next to the currently loaded game file + if (_listItems[i].loaded) + { + auto ft = Formatter(); + ft.Add(STR_RIGHTGUILLEMET); + DrawTextBasic(dpi, { 0, y }, stringId, ft); + } + + // Print filename + auto ft = Formatter(); + ft.Add(STR_STRING); + ft.Add(_listItems[i].name.c_str()); + int32_t max_file_width = widgets[WIDX_SORT_NAME].width() - 10; + DrawTextEllipsised(dpi, { 10, y }, max_file_width, stringId, ft); + + // Print formatted modified date, if this is a file + if (_listItems[i].type == TYPE_FILE) + { + ft = Formatter(); + ft.Add(STR_STRING); + ft.Add(_listItems[i].date_formatted.c_str()); + DrawTextEllipsised( + dpi, { dateAnchor - DATE_TIME_GAP, y }, maxDateWidth, stringId, ft, { TextAlignment::RIGHT }); + + ft = Formatter(); + ft.Add(STR_STRING); + ft.Add(_listItems[i].time_formatted.c_str()); + DrawTextEllipsised(dpi, { dateAnchor + DATE_TIME_GAP, y }, maxTimeWidth, stringId, ft); + } + } + } +#pragma endregion +}; + +WindowBase* WindowLoadsaveOpen( int32_t type, std::string_view defaultPath, std::function callback, TrackDesign* trackDesign) { @@ -265,39 +1046,23 @@ rct_window* WindowLoadsaveOpen( auto hasFilePicker = OpenRCT2::GetContext()->GetUiContext()->HasFilePicker(); if (gConfigGeneral.UseNativeBrowseDialog && hasFilePicker) { - const u8string path = Browse(isSave); + const u8string path = OpenSystemFileBrowser(isSave); if (!path.empty()) { - WindowLoadsaveSelect(nullptr, path.c_str()); + Select(path.c_str()); } return nullptr; } - const u8string path = WindowLoadsaveGetDir(type); + const u8string path = GetDir(type); - rct_window* w = window_bring_to_front_by_class(WindowClass::Loadsave); + auto* w = static_cast(WindowBringToFrontByClass(WindowClass::Loadsave)); if (w == nullptr) { - w = WindowCreateCentred(WW, WH, &window_loadsave_events, WindowClass::Loadsave, WF_STICK_TO_FRONT | WF_RESIZABLE); - w->widgets = window_loadsave_widgets; - - w->min_width = WW; - w->min_height = WH / 2; - w->max_width = WW * 2; - w->max_height = WH * 2; - - if (!hasFilePicker) - { - w->disabled_widgets |= (1uLL << WIDX_BROWSE); - window_loadsave_widgets[WIDX_BROWSE].type = WindowWidgetType::Empty; - } + w = WindowCreate( + WindowClass::Loadsave, WW, WH, WF_STICK_TO_FRONT | WF_RESIZABLE | WF_AUTO_POSITION | WF_CENTRE_SCREEN, type); } - const char* pattern = GetFilterPatternByType(type, isSave); - WindowLoadsavePopulateList(w, isSave, path.c_str(), pattern); - w->no_list_items = static_cast(_listItems.size()); - w->selected_list_item = -1; - switch (type & 0x0E) { case LOADSAVETYPE_GAME: @@ -324,779 +1089,12 @@ rct_window* WindowLoadsaveOpen( default: openrct2_assert(true, "Unsupported load/save type: %d", type & 0x0F); + break; } - WindowInitScrollWidgets(*w); - WindowLoadsaveComputeMaxDateWidth(); - return w; } -static void WindowLoadsaveClose(rct_window* w) -{ - _listItems.clear(); - window_close_by_class(WindowClass::LoadsaveOverwritePrompt); -} - -static void WindowLoadsaveResize(rct_window* w) -{ - if (w->width < w->min_width) - { - w->Invalidate(); - w->width = w->min_width; - } - if (w->height < w->min_height) - { - w->Invalidate(); - w->height = w->min_height; - } -} - -static u8string Browse(bool isSave) -{ - OpenRCT2::Ui::FileDialogDesc desc = {}; - u8string extension{}; - auto fileType = FileExtension::Unknown; - StringId title = STR_NONE; - switch (_type & 0x0E) - { - case LOADSAVETYPE_GAME: - extension = u8".park"; - fileType = FileExtension::PARK; - title = isSave ? STR_FILE_DIALOG_TITLE_SAVE_GAME : STR_FILE_DIALOG_TITLE_LOAD_GAME; - desc.Filters.emplace_back(language_get_string(STR_OPENRCT2_SAVED_GAME), GetFilterPatternByType(_type, isSave)); - break; - - case LOADSAVETYPE_LANDSCAPE: - extension = u8".park"; - fileType = FileExtension::PARK; - title = isSave ? STR_FILE_DIALOG_TITLE_SAVE_LANDSCAPE : STR_FILE_DIALOG_TITLE_LOAD_LANDSCAPE; - desc.Filters.emplace_back(language_get_string(STR_OPENRCT2_LANDSCAPE_FILE), GetFilterPatternByType(_type, isSave)); - break; - - case LOADSAVETYPE_SCENARIO: - extension = u8".park"; - fileType = FileExtension::PARK; - title = STR_FILE_DIALOG_TITLE_SAVE_SCENARIO; - desc.Filters.emplace_back(language_get_string(STR_OPENRCT2_SCENARIO_FILE), GetFilterPatternByType(_type, isSave)); - break; - - case LOADSAVETYPE_TRACK: - extension = u8".td6"; - fileType = FileExtension::TD6; - title = isSave ? STR_FILE_DIALOG_TITLE_SAVE_TRACK : STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN; - desc.Filters.emplace_back( - language_get_string(STR_OPENRCT2_TRACK_DESIGN_FILE), GetFilterPatternByType(_type, isSave)); - break; - - case LOADSAVETYPE_HEIGHTMAP: - title = STR_FILE_DIALOG_TITLE_LOAD_HEIGHTMAP; - desc.Filters.emplace_back(language_get_string(STR_OPENRCT2_HEIGHTMAP_FILE), GetFilterPatternByType(_type, isSave)); - break; - } - - u8string path = _directory; - if (isSave) - { - // The file browser requires a file path instead of just a directory - if (!_defaultPath.empty()) - { - path = Path::Combine(path, _defaultPath); - } - else - { - auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); - auto buffer = park.Name; - if (buffer.empty()) - { - // Use localised "Unnamed Park" if park name was empty. - buffer = format_string(STR_UNNAMED_PARK, nullptr); - } - path = Path::Combine(path, buffer); - } - } - - desc.InitialDirectory = _directory; - desc.Type = isSave ? OpenRCT2::Ui::FileDialogType::Save : OpenRCT2::Ui::FileDialogType::Open; - desc.DefaultFilename = isSave ? path : u8string(); - - // Add 'all files' filter. If the number of filters is increased, this code will need to be adjusted. - desc.Filters.emplace_back(language_get_string(STR_ALL_FILES), "*"); - - desc.Title = language_get_string(title); - - u8string outPath = ContextOpenCommonFileDialog(desc); - if (!outPath.empty()) - { - // When the given save type was given, Windows still interprets a filename with a dot in its name as a custom extension, - // meaning files like "My Coaster v1.2" will not get the .td6 extension by default. - if (isSave && get_file_extension_type(outPath) != fileType) - outPath = Path::WithExtension(outPath, extension); - } - - return outPath; -} - -static void WindowLoadsaveMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - bool isSave = (_type & 0x01) == LOADSAVETYPE_SAVE; - switch (widgetIndex) - { - case WIDX_CLOSE: - window_close(*w); - break; - - case WIDX_UP: - WindowLoadsavePopulateList(w, isSave, _parentDirectory, _extensionPattern); - WindowInitScrollWidgets(*w); - w->no_list_items = static_cast(_listItems.size()); - break; - - case WIDX_NEW_FILE: - WindowTextInputOpen( - w, WIDX_NEW_FILE, STR_NONE, STR_FILEBROWSER_FILE_NAME_PROMPT, {}, STR_STRING, - reinterpret_cast(_defaultPath.c_str()), 64); - break; - - case WIDX_NEW_FOLDER: - WindowTextInputRawOpen(w, WIDX_NEW_FOLDER, STR_NONE, STR_FILEBROWSER_FOLDER_NAME_PROMPT, {}, "", 64); - break; - - case WIDX_BROWSE: - { - u8string path = Browse(isSave); - if (!path.empty()) - { - WindowLoadsaveSelect(w, path.c_str()); - } - else - { - // If user cancels file dialog, refresh list - WindowLoadsavePopulateList(w, isSave, _directory, _extensionPattern); - WindowInitScrollWidgets(*w); - w->no_list_items = static_cast(_listItems.size()); - } - } - break; - - case WIDX_SORT_NAME: - if (gConfigGeneral.LoadSaveSort == Sort::NameAscending) - { - gConfigGeneral.LoadSaveSort = Sort::NameDescending; - } - else - { - gConfigGeneral.LoadSaveSort = Sort::NameAscending; - } - ConfigSaveDefault(); - WindowLoadsaveSortList(); - w->Invalidate(); - break; - - case WIDX_SORT_DATE: - if (gConfigGeneral.LoadSaveSort == Sort::DateDescending) - { - gConfigGeneral.LoadSaveSort = Sort::DateAscending; - } - else - { - gConfigGeneral.LoadSaveSort = Sort::DateDescending; - } - ConfigSaveDefault(); - WindowLoadsaveSortList(); - w->Invalidate(); - break; - - case WIDX_DEFAULT: - WindowLoadsavePopulateList(w, isSave, GetInitialDirectoryByType(_type).c_str(), _extensionPattern); - WindowInitScrollWidgets(*w); - w->no_list_items = static_cast(_listItems.size()); - break; - } -} - -static void WindowLoadsaveScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) -{ - *height = w->no_list_items * SCROLLABLE_ROW_HEIGHT; -} - -static void WindowLoadsaveScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) -{ - int32_t selectedItem; - - selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; - if (selectedItem >= w->no_list_items) - return; - - if (_listItems[selectedItem].type == TYPE_DIRECTORY) - { - // The selected item is a folder - int32_t includeNewItem; - - w->no_list_items = 0; - w->selected_list_item = -1; - includeNewItem = (_type & 1) == LOADSAVETYPE_SAVE; - - char directory[MAX_PATH]; - safe_strcpy(directory, _listItems[selectedItem].path.c_str(), sizeof(directory)); - - WindowLoadsavePopulateList(w, includeNewItem, directory, _extensionPattern); - WindowInitScrollWidgets(*w); - - w->no_list_items = static_cast(_listItems.size()); - } - else - { - // TYPE_FILE - // Load or overwrite - if ((_type & 0x01) == LOADSAVETYPE_SAVE) - WindowOverwritePromptOpen(_listItems[selectedItem].name.c_str(), _listItems[selectedItem].path.c_str()); - else - WindowLoadsaveSelect(w, _listItems[selectedItem].path.c_str()); - } -} - -static void WindowLoadsaveScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) -{ - int32_t selectedItem; - - selectedItem = screenCoords.y / SCROLLABLE_ROW_HEIGHT; - if (selectedItem >= w->no_list_items) - return; - - w->selected_list_item = selectedItem; - - w->Invalidate(); -} - -static void WindowLoadsaveTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) -{ - if (text == nullptr || text[0] == 0) - return; - - if (!Platform::IsFilenameValid(text)) - { - ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {}); - return; - } - - switch (widgetIndex) - { - case WIDX_NEW_FOLDER: - { - const u8string path = Path::Combine(_directory, text); - if (!Platform::EnsureDirectoryExists(path)) - { - ContextShowError(STR_UNABLE_TO_CREATE_FOLDER, STR_NONE, {}); - return; - } - - w->no_list_items = 0; - w->selected_list_item = -1; - - WindowLoadsavePopulateList(w, (_type & 1) == LOADSAVETYPE_SAVE, path, _extensionPattern); - WindowInitScrollWidgets(*w); - - w->no_list_items = static_cast(_listItems.size()); - w->Invalidate(); - break; - } - - case WIDX_NEW_FILE: - { - const u8string path = Path::WithExtension( - Path::Combine(_directory, text), RemovePatternWildcard(_extensionPattern)); - - if (File::Exists(path)) - WindowOverwritePromptOpen(text, path.c_str()); - else - WindowLoadsaveSelect(w, path.c_str()); - break; - } - } -} - -constexpr uint16_t DATE_TIME_GAP = 2; - -static void WindowLoadsaveComputeMaxDateWidth() -{ - // Generate a time object for a relatively wide time: 2000-02-20 00:00:00 - std::tm tm; - tm.tm_sec = 0; - tm.tm_min = 0; - tm.tm_hour = 0; - tm.tm_mday = 20; - tm.tm_mon = 2; - tm.tm_year = 100; - tm.tm_wday = 5; - tm.tm_yday = 51; - tm.tm_isdst = -1; - - std::time_t long_time = mktime(&tm); - - // Check how this date is represented (e.g. 2000-02-20, or 00/02/20) - std::string date = Platform::FormatShortDate(long_time); - maxDateWidth = gfx_get_string_width(date.c_str(), FontStyle::Medium) + DATE_TIME_GAP; - - // Some locales do not use leading zeros for months and days, so let's try October, too. - tm.tm_mon = 10; - tm.tm_yday = 294; - long_time = mktime(&tm); - - // Again, check how this date is represented (e.g. 2000-10-20, or 00/10/20) - date = Platform::FormatShortDate(long_time); - maxDateWidth = std::max(maxDateWidth, gfx_get_string_width(date.c_str(), FontStyle::Medium) + DATE_TIME_GAP); - - // Time appears to be universally represented with two digits for minutes, so 12:00 or 00:00 should be representable. - std::string time = Platform::FormatTime(long_time); - maxTimeWidth = gfx_get_string_width(time.c_str(), FontStyle::Medium) + DATE_TIME_GAP; -} - -static void WindowLoadsaveInvalidate(rct_window* w) -{ - w->ResizeFrameWithPage(); - - rct_widget* date_widget = &window_loadsave_widgets[WIDX_SORT_DATE]; - date_widget->right = w->width - 5; - date_widget->left = date_widget->right - (maxDateWidth + maxTimeWidth + (4 * DATE_TIME_GAP) + (SCROLLBAR_WIDTH + 1)); - - window_loadsave_widgets[WIDX_SORT_NAME].left = 4; - window_loadsave_widgets[WIDX_SORT_NAME].right = window_loadsave_widgets[WIDX_SORT_DATE].left - 1; - - window_loadsave_widgets[WIDX_SCROLL].right = w->width - 4; - window_loadsave_widgets[WIDX_SCROLL].bottom = w->height - 30; - - window_loadsave_widgets[WIDX_BROWSE].top = w->height - 24; - window_loadsave_widgets[WIDX_BROWSE].bottom = w->height - 6; -} - -static void WindowLoadsavePaint(rct_window* w, rct_drawpixelinfo* dpi) -{ - WindowDrawWidgets(*w, dpi); - - if (_shortenedDirectory[0] == '\0') - { - shorten_path(_shortenedDirectory, sizeof(_shortenedDirectory), _directory, w->width - 8, FontStyle::Medium); - } - - // Format text - thread_local std::string _buffer; - _buffer.assign("{BLACK}"); - _buffer += _shortenedDirectory; - - // Draw path text - const auto normalisedPath = Platform::StrDecompToPrecomp(_buffer.data()); - const auto* normalisedPathC = normalisedPath.c_str(); - auto ft = Formatter(); - ft.Add(normalisedPathC); - DrawTextEllipsised(dpi, { w->windowPos.x + 4, w->windowPos.y + 20 }, w->width - 8, STR_STRING, ft); - - // Name button text - StringId id = STR_NONE; - if (gConfigGeneral.LoadSaveSort == Sort::NameAscending) - id = STR_UP; - else if (gConfigGeneral.LoadSaveSort == Sort::NameDescending) - id = STR_DOWN; - - // Draw name button indicator. - rct_widget sort_name_widget = window_loadsave_widgets[WIDX_SORT_NAME]; - ft = Formatter(); - ft.Add(id); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ sort_name_widget.left + 11, sort_name_widget.top + 1 }, STR_NAME, ft, - { COLOUR_GREY }); - - // Date button text - if (gConfigGeneral.LoadSaveSort == Sort::DateAscending) - id = STR_UP; - else if (gConfigGeneral.LoadSaveSort == Sort::DateDescending) - id = STR_DOWN; - else - id = STR_NONE; - - rct_widget sort_date_widget = window_loadsave_widgets[WIDX_SORT_DATE]; - ft = Formatter(); - ft.Add(id); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ sort_date_widget.left + 5, sort_date_widget.top + 1 }, STR_DATE, ft, - { COLOUR_GREY }); -} - -static void WindowLoadsaveScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) -{ - gfx_fill_rect( - dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width - 1, dpi->y + dpi->height - 1 } }, - ColourMapA[w->colours[1]].mid_light); - const int32_t listWidth = w->widgets[WIDX_SCROLL].width(); - const int32_t dateAnchor = w->widgets[WIDX_SORT_DATE].left + maxDateWidth + DATE_TIME_GAP; - - for (int32_t i = 0; i < w->no_list_items; i++) - { - int32_t y = i * SCROLLABLE_ROW_HEIGHT; - if (y > dpi->y + dpi->height) - break; - - if (y + SCROLLABLE_ROW_HEIGHT < dpi->y) - continue; - - StringId stringId = STR_BLACK_STRING; - - // If hovering over item, change the color and fill the backdrop. - if (i == w->selected_list_item) - { - stringId = STR_WINDOW_COLOUR_2_STRINGID; - gfx_filter_rect(dpi, { 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT }, FilterPaletteID::PaletteDarken1); - } - // display a marker next to the currently loaded game file - if (_listItems[i].loaded) - { - auto ft = Formatter(); - ft.Add(STR_RIGHTGUILLEMET); - DrawTextBasic(dpi, { 0, y }, stringId, ft); - } - - // Print filename - auto ft = Formatter(); - ft.Add(STR_STRING); - ft.Add(_listItems[i].name.c_str()); - int32_t max_file_width = w->widgets[WIDX_SORT_NAME].width() - 10; - DrawTextEllipsised(dpi, { 10, y }, max_file_width, stringId, ft); - - // Print formatted modified date, if this is a file - if (_listItems[i].type == TYPE_FILE) - { - ft = Formatter(); - ft.Add(STR_STRING); - ft.Add(_listItems[i].date_formatted.c_str()); - DrawTextEllipsised(dpi, { dateAnchor - DATE_TIME_GAP, y }, maxDateWidth, stringId, ft, { TextAlignment::RIGHT }); - - ft = Formatter(); - ft.Add(STR_STRING); - ft.Add(_listItems[i].time_formatted.c_str()); - DrawTextEllipsised(dpi, { dateAnchor + DATE_TIME_GAP, y }, maxTimeWidth, stringId, ft); - } - } -} - -static bool ListItemSort(LoadSaveListItem& a, LoadSaveListItem& b) -{ - if (a.type != b.type) - return a.type - b.type < 0; - - switch (gConfigGeneral.LoadSaveSort) - { - case Sort::NameAscending: - return strlogicalcmp(a.name.c_str(), b.name.c_str()) < 0; - case Sort::NameDescending: - return -strlogicalcmp(a.name.c_str(), b.name.c_str()) < 0; - case Sort::DateDescending: - return -difftime(a.date_modified, b.date_modified) < 0; - case Sort::DateAscending: - return difftime(a.date_modified, b.date_modified) < 0; - } - return strlogicalcmp(a.name.c_str(), b.name.c_str()) < 0; -} - -static void WindowLoadsaveSortList() -{ - std::sort(_listItems.begin(), _listItems.end(), ListItemSort); -} - -static void WindowLoadsavePopulateList( - rct_window* w, int32_t includeNewItem, const u8string& directory, std::string_view extensionPattern) -{ - const auto absoluteDirectory = Path::GetAbsolute(directory); - safe_strcpy(_directory, absoluteDirectory.c_str(), std::size(_directory)); - // Note: This compares the pointers, not values - _extensionPattern = extensionPattern; - _shortenedDirectory[0] = '\0'; - - _listItems.clear(); - - // Show "new" buttons when saving - window_loadsave_widgets[WIDX_NEW_FILE].type = includeNewItem ? WindowWidgetType::Button : WindowWidgetType::Empty; - window_loadsave_widgets[WIDX_NEW_FOLDER].type = includeNewItem ? WindowWidgetType::Button : WindowWidgetType::Empty; - - int32_t drives = Platform::GetDrives(); - if (directory.empty() && drives) - { - // List Windows drives - w->disabled_widgets |= (1uLL << WIDX_NEW_FILE) | (1uLL << WIDX_NEW_FOLDER) | (1uLL << WIDX_UP); - static constexpr auto NumDriveLetters = 26; - for (int32_t x = 0; x < NumDriveLetters; x++) - { - if (drives & (1 << x)) - { - // If the drive exists, list it - LoadSaveListItem newListItem; - newListItem.path = std::string(1, 'A' + x) + ":" PATH_SEPARATOR; - newListItem.name = newListItem.path; - newListItem.type = TYPE_DIRECTORY; - - _listItems.push_back(std::move(newListItem)); - } - } - } - else - { - // Remove the separator at the end of the path, if present - safe_strcpy(_parentDirectory, absoluteDirectory.c_str(), std::size(_parentDirectory)); - if (_parentDirectory[strlen(_parentDirectory) - 1] == *PATH_SEPARATOR - || _parentDirectory[strlen(_parentDirectory) - 1] == '/') - _parentDirectory[strlen(_parentDirectory) - 1] = '\0'; - - // Remove everything past the now last separator - char* ch = strrchr(_parentDirectory, *PATH_SEPARATOR); - char* posix_ch = strrchr(_parentDirectory, '/'); - ch = ch < posix_ch ? posix_ch : ch; - if (ch != nullptr) - { - *(ch + 1) = '\0'; - } - else if (drives) - { - // If on Windows, clear the entire path to show the drives - _parentDirectory[0] = '\0'; - } - else - { - // Else, go to the root directory - snprintf(_parentDirectory, MAX_PATH, "%c", *PATH_SEPARATOR); - } - - // Disable the Up button if the current directory is the root directory - if (str_is_null_or_empty(_parentDirectory) && !drives) - w->disabled_widgets |= (1uLL << WIDX_UP); - else - w->disabled_widgets &= ~(1uLL << WIDX_UP); - - // Re-enable the "new" buttons if these were disabled - w->disabled_widgets &= ~(1uLL << WIDX_NEW_FILE); - w->disabled_widgets &= ~(1uLL << WIDX_NEW_FOLDER); - - // List all directories - auto subDirectories = Path::GetDirectories(absoluteDirectory); - for (const auto& sdName : subDirectories) - { - auto subDir = sdName + PATH_SEPARATOR; - - LoadSaveListItem newListItem; - newListItem.path = Path::Combine(absoluteDirectory, subDir); - newListItem.name = std::move(subDir); - newListItem.type = TYPE_DIRECTORY; - newListItem.loaded = false; - - _listItems.push_back(std::move(newListItem)); - } - - // List all files with the wanted extensions - bool showExtension = false; - for (const u8string& extToken : String::Split(extensionPattern, ";")) - { - const u8string filter = Path::Combine(directory, extToken); - auto scanner = Path::ScanDirectory(filter, false); - while (scanner->Next()) - { - LoadSaveListItem newListItem; - newListItem.path = scanner->GetPath(); - newListItem.type = TYPE_FILE; - newListItem.date_modified = Platform::FileGetModifiedTime(newListItem.path.c_str()); - - // Cache a human-readable version of the modified date. - newListItem.date_formatted = Platform::FormatShortDate(newListItem.date_modified); - newListItem.time_formatted = Platform::FormatTime(newListItem.date_modified); - - // Mark if file is the currently loaded game - newListItem.loaded = newListItem.path.compare(gCurrentLoadedPath) == 0; - - // Remove the extension (but only the first extension token) - if (!showExtension) - { - newListItem.name = Path::GetFileNameWithoutExtension(newListItem.path); - } - else - { - newListItem.name = Path::GetFileName(newListItem.path); - } - - _listItems.push_back(std::move(newListItem)); - } - - showExtension = true; // Show any extension after the first iteration - } - - WindowLoadsaveSortList(); - } - - w->Invalidate(); -} - -static void WindowLoadsaveInvokeCallback(int32_t result, const utf8* path) -{ - if (_loadSaveCallback != nullptr) - { - _loadSaveCallback(result, path); - } -} - -static void SetAndSaveConfigPath(u8string& config_str, u8string_view path) -{ - config_str = Path::GetDirectory(path); - ConfigSaveDefault(); -} - -static bool IsValidPath(const char* path) -{ - // HACK This is needed because tracks get passed through with td? - // I am sure this will change eventually to use the new FileScanner - // which handles multiple patterns - auto filename = Path::GetFileNameWithoutExtension(path); - - return Platform::IsFilenameValid(filename); -} - -static void WindowLoadsaveSelect(rct_window* w, const char* path) -{ - if (!IsValidPath(path)) - { - ContextShowError(STR_ERROR_INVALID_CHARACTERS, STR_NONE, {}); - return; - } - - char pathBuffer[MAX_PATH]; - safe_strcpy(pathBuffer, path, sizeof(pathBuffer)); - - switch (_type & 0x0F) - { - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME): - SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - window_close_by_class(WindowClass::Loadsave); - gfx_invalidate_screen(); - break; - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME): - SetAndSaveConfigPath(gConfigGeneral.LastSaveGameDirectory, pathBuffer); - if (scenario_save(pathBuffer, gConfigGeneral.SavePluginData ? 1 : 0)) - { - gScenarioSavePath = pathBuffer; - gCurrentLoadedPath = pathBuffer; - gIsAutosaveLoaded = false; - gFirstTimeSaving = false; - - window_close_by_class(WindowClass::Loadsave); - gfx_invalidate_screen(); - - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - } - else - { - ContextShowError(STR_SAVE_GAME, STR_GAME_SAVE_FAILED, {}); - WindowLoadsaveInvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE): - SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer); - if (Editor::LoadLandscape(pathBuffer)) - { - gCurrentLoadedPath = pathBuffer; - gfx_invalidate_screen(); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - } - else - { - // Not the best message... - ContextShowError(STR_LOAD_LANDSCAPE, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); - WindowLoadsaveInvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE): - SetAndSaveConfigPath(gConfigGeneral.LastSaveLandscapeDirectory, pathBuffer); - gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer))); - if (scenario_save(pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2)) - { - gCurrentLoadedPath = pathBuffer; - window_close_by_class(WindowClass::Loadsave); - gfx_invalidate_screen(); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - } - else - { - ContextShowError(STR_SAVE_LANDSCAPE, STR_LANDSCAPE_SAVE_FAILED, {}); - WindowLoadsaveInvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO): - { - SetAndSaveConfigPath(gConfigGeneral.LastSaveScenarioDirectory, pathBuffer); - int32_t parkFlagsBackup = gParkFlags; - gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; - gEditorStep = EditorStep::Invalid; - gScenarioFileName = std::string(String::ToStringView(pathBuffer, std::size(pathBuffer))); - int32_t success = scenario_save(pathBuffer, gConfigGeneral.SavePluginData ? 3 : 2); - gParkFlags = parkFlagsBackup; - - if (success) - { - window_close_by_class(WindowClass::Loadsave); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - title_load(); - } - else - { - ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {}); - gEditorStep = EditorStep::ObjectiveSelection; - WindowLoadsaveInvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - } - - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK): - { - SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer); - auto intent = Intent(WindowClass::InstallTrack); - intent.putExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); - ContextOpenIntent(&intent); - window_close_by_class(WindowClass::Loadsave); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - break; - } - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK): - { - SetAndSaveConfigPath(gConfigGeneral.LastSaveTrackDirectory, pathBuffer); - - const auto withExtension = Path::WithExtension(pathBuffer, "td6"); - String::Set(pathBuffer, sizeof(pathBuffer), withExtension.c_str()); - - RCT2::T6Exporter t6Export{ _trackDesign }; - - auto success = t6Export.SaveTrack(pathBuffer); - - if (success) - { - window_close_by_class(WindowClass::Loadsave); - WindowRideMeasurementsDesignCancel(); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, path); - } - else - { - ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_TRACK, STR_TRACK_SAVE_FAILED, {}); - WindowLoadsaveInvokeCallback(MODAL_RESULT_FAIL, path); - } - break; - } - - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_HEIGHTMAP): - window_close_by_class(WindowClass::Loadsave); - WindowLoadsaveInvokeCallback(MODAL_RESULT_OK, pathBuffer); - break; - } -} - #pragma region Overwrite prompt constexpr int32_t OVERWRITE_WW = 200; @@ -1111,7 +1109,7 @@ enum WIDX_OVERWRITE_CANCEL }; -static rct_widget window_overwrite_prompt_widgets[] = { +static Widget window_overwrite_prompt_widgets[] = { WINDOW_SHIM_WHITE(STR_FILEBROWSER_OVERWRITE_TITLE, OVERWRITE_WW, OVERWRITE_WH), { WindowWidgetType::Button, 0, 10, 94, OVERWRITE_WH - 20, OVERWRITE_WH - 9, STR_FILEBROWSER_OVERWRITE_TITLE, STR_NONE }, { WindowWidgetType::Button, 0, OVERWRITE_WW - 95, OVERWRITE_WW - 11, OVERWRITE_WH - 20, OVERWRITE_WH - 9, @@ -1119,8 +1117,8 @@ static rct_widget window_overwrite_prompt_widgets[] = { WIDGETS_END, }; -static void WindowOverwritePromptMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowOverwritePromptPaint(rct_window* w, rct_drawpixelinfo* dpi); +static void WindowOverwritePromptMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowOverwritePromptPaint(WindowBase* w, DrawPixelInfo* dpi); static WindowEventList window_overwrite_prompt_events([](auto& events) { events.mouse_up = &WindowOverwritePromptMouseup; @@ -1130,11 +1128,11 @@ static WindowEventList window_overwrite_prompt_events([](auto& events) { static char _window_overwrite_prompt_name[256]; static char _window_overwrite_prompt_path[MAX_PATH]; -static rct_window* WindowOverwritePromptOpen(const char* name, const char* path) +static WindowBase* WindowOverwritePromptOpen(const char* name, const char* path) { - rct_window* w; + WindowBase* w; - window_close_by_class(WindowClass::LoadsaveOverwritePrompt); + WindowCloseByClass(WindowClass::LoadsaveOverwritePrompt); w = WindowCreateCentred( OVERWRITE_WW, OVERWRITE_WH, &window_overwrite_prompt_events, WindowClass::LoadsaveOverwritePrompt, WF_STICK_TO_FRONT); @@ -1145,35 +1143,34 @@ static rct_window* WindowOverwritePromptOpen(const char* name, const char* path) w->flags |= WF_TRANSPARENT; w->colours[0] = TRANSLUCENT(COLOUR_BORDEAUX_RED); - safe_strcpy(_window_overwrite_prompt_name, name, sizeof(_window_overwrite_prompt_name)); - safe_strcpy(_window_overwrite_prompt_path, path, sizeof(_window_overwrite_prompt_path)); + SafeStrCpy(_window_overwrite_prompt_name, name, sizeof(_window_overwrite_prompt_name)); + SafeStrCpy(_window_overwrite_prompt_path, path, sizeof(_window_overwrite_prompt_path)); return w; } -static void WindowOverwritePromptMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowOverwritePromptMouseup(WindowBase* w, WidgetIndex widgetIndex) { - rct_window* loadsaveWindow; - switch (widgetIndex) { case WIDX_OVERWRITE_OVERWRITE: - loadsaveWindow = window_find_by_class(WindowClass::Loadsave); - if (loadsaveWindow != nullptr) - WindowLoadsaveSelect(loadsaveWindow, _window_overwrite_prompt_path); - // As the window_loadsave_select function can change the order of the - // windows we can't use window_close(w). - window_close_by_class(WindowClass::LoadsaveOverwritePrompt); + { + Select(_window_overwrite_prompt_path); + + // As the LoadSaveWindow::Select function can change the order of the + // windows we can't use WindowClose(w). + WindowCloseByClass(WindowClass::LoadsaveOverwritePrompt); break; + } case WIDX_OVERWRITE_CANCEL: case WIDX_OVERWRITE_CLOSE: - window_close(*w); + WindowClose(*w); break; } } -static void WindowOverwritePromptPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowOverwritePromptPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); @@ -1182,7 +1179,7 @@ static void WindowOverwritePromptPaint(rct_window* w, rct_drawpixelinfo* dpi) ft.Add(_window_overwrite_prompt_name); ScreenCoordsXY stringCoords(w->windowPos.x + w->width / 2, w->windowPos.y + (w->height / 2) - 3); - DrawTextWrapped(dpi, stringCoords, w->width - 4, STR_FILEBROWSER_OVERWRITE_PROMPT, ft, { TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, stringCoords, w->width - 4, STR_FILEBROWSER_OVERWRITE_PROMPT, ft, { TextAlignment::CENTRE }); } #pragma endregion diff --git a/src/openrct2-ui/windows/Main.cpp b/src/openrct2-ui/windows/Main.cpp index 7c7df24b62..b37b39c74d 100644 --- a/src/openrct2-ui/windows/Main.cpp +++ b/src/openrct2-ui/windows/Main.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,7 +16,7 @@ #include // clang-format off -static rct_widget _mainWidgets[] = { +static Widget _mainWidgets[] = { MakeWidget({0, 0}, {0, 0}, WindowWidgetType::Viewport, WindowColour::Primary, STR_VIEWPORT), WIDGETS_END, }; @@ -31,7 +31,7 @@ public: _mainWidgets[0].bottom = height; widgets = _mainWidgets; - viewport_create(this, windowPos, width, height, Focus(CoordsXYZ(0x0FFF, 0x0FFF, 0))); + ViewportCreate(this, windowPos, width, height, Focus(CoordsXYZ(0x0FFF, 0x0FFF, 0))); if (viewport != nullptr) { SetViewportFlags(); @@ -43,9 +43,9 @@ public: WindowFootpathResetSelectedPath(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { - viewport_render(&dpi, viewport, { { dpi.x, dpi.y }, { dpi.x + dpi.width, dpi.y + dpi.height } }); + ViewportRender(&dpi, viewport, { { dpi.x, dpi.y }, { dpi.x + dpi.width, dpi.y + dpi.height } }); } private: @@ -71,7 +71,7 @@ private: * Creates the main window that holds the main viewport. * rct2: 0x0066B3E8 */ -rct_window* WindowMainOpen() +WindowBase* WindowMainOpen() { return WindowCreate(WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK); } diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index d6ca8e0a61..a18e925f76 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,10 +17,10 @@ #include #include #include -#include #include -#include -#include +#include +#include +#include #include #include #include @@ -100,26 +100,26 @@ enum WindowMapWidgetIdx validate_global_widx(WC_MAP, WIDX_ROTATE_90); // clang-format off -static rct_widget window_map_widgets[] = { +static Widget window_map_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget ({ 0, 43}, {245, 215}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeRemapWidget ({ 3, 17}, { 31, 27}, WindowWidgetType::ColourBtn, WindowColour::Secondary, SPR_TAB, STR_SHOW_PEOPLE_ON_MAP_TIP ), MakeRemapWidget ({ 34, 17}, { 31, 27}, WindowWidgetType::ColourBtn, WindowColour::Secondary, SPR_TAB, STR_SHOW_RIDES_STALLS_ON_MAP_TIP ), MakeWidget ({ 3, 46}, {239, 180}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_BOTH ), MakeSpinnerWidgets({102, 229}, { 50, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_COMMA16 ), // NB: 3 widgets - MakeWidget ({153, 230}, { 20, 12}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_LINK_CHAIN, STR_MAINTAIN_SQUARE_MAP_TOOLTIP ), + MakeWidget ({153, 230}, { 20, 12}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_LINK_CHAIN), STR_MAINTAIN_SQUARE_MAP_TOOLTIP ), MakeSpinnerWidgets({174, 229}, { 50, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_POP16_COMMA16 ), // NB: 3 widgets - MakeWidget ({ 4, 1}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_BUY_LAND_RIGHTS, STR_SELECT_PARK_OWNED_LAND_TIP ), - MakeWidget ({ 4, 1}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PARK_ENTRANCE, STR_BUILD_PARK_ENTRANCE_TIP ), + MakeWidget ({ 4, 1}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_BUY_LAND_RIGHTS), STR_SELECT_PARK_OWNED_LAND_TIP ), + MakeWidget ({ 4, 1}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PARK_ENTRANCE), STR_BUILD_PARK_ENTRANCE_TIP ), MakeWidget ({ 28, 1}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SET_STARTING_POSITIONS_TIP ), - MakeWidget ({ 4, 17}, { 44, 32}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_LAND_TOOL_SIZE_0 ), + MakeWidget ({ 4, 17}, { 44, 32}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_LAND_TOOL_SIZE_0) ), MakeRemapWidget ({ 5, 18}, { 16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP ), MakeRemapWidget ({ 31, 32}, { 16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP ), MakeWidget ({ 58, 197}, {184, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_LAND_OWNED, STR_SET_LAND_TO_BE_OWNED_TIP ), MakeWidget ({ 58, 197}, {184, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CONSTRUCTION_RIGHTS_OWNED, STR_SET_CONSTRUCTION_RIGHTS_TO_BE_OWNED_TIP ), MakeWidget ({ 58, 197}, {184, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_LAND_SALE, STR_SET_LAND_TO_BE_AVAILABLE_TIP ), MakeWidget ({ 58, 197}, {174, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CONSTRUCTION_RIGHTS_SALE, STR_SET_CONSTRUCTION_RIGHTS_TO_BE_AVAILABLE_TIP), - MakeWidget ({218, 45}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_ROTATE_ARROW, STR_ROTATE_OBJECTS_90 ), + MakeWidget ({218, 45}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_OBJECTS_90 ), MakeWidget ({110, 189}, {131, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_MAPGEN_WINDOW_TITLE, STR_MAP_GENERATOR_TIP ), WIDGETS_END, }; @@ -154,7 +154,7 @@ public: InitScrollWidgets(); - _rotation = get_current_rotation(); + _rotation = GetCurrentRotation(); InitMap(); gWindowSceneryRotation = 0; @@ -171,10 +171,10 @@ public: { _mapImageData.clear(); _mapImageData.shrink_to_fit(); - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == classification + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == classification && gCurrentToolWidget.window_number == number) { - tool_cancel(); + ToolCancel(); } } @@ -196,14 +196,14 @@ public: break; case WIDX_SET_LAND_RIGHTS: Invalidate(); - if (tool_set(*this, widgetIndex, Tool::UpArrow)) + if (ToolSet(*this, widgetIndex, Tool::UpArrow)) break; _activeTool = 2; // Prevent mountain tool size. _landRightsToolSize = std::max(MINIMUM_TOOL_SIZE, _landRightsToolSize); - show_gridlines(); - show_land_rights(); - show_construction_rights(); + ShowGridlines(); + ShowLandRights(); + ShowConstructionRights(); break; case WIDX_LAND_OWNED_CHECKBOX: _activeTool ^= 2; @@ -239,26 +239,26 @@ public: break; case WIDX_BUILD_PARK_ENTRANCE: Invalidate(); - if (tool_set(*this, widgetIndex, Tool::UpArrow)) + if (ToolSet(*this, widgetIndex, Tool::UpArrow)) break; gParkEntranceGhostExists = false; - input_set_flag(INPUT_FLAG_6, true); + InputSetFlag(INPUT_FLAG_6, true); - show_gridlines(); - show_land_rights(); - show_construction_rights(); + ShowGridlines(); + ShowLandRights(); + ShowConstructionRights(); break; case WIDX_ROTATE_90: gWindowSceneryRotation = (gWindowSceneryRotation + 1) & 3; break; case WIDX_PEOPLE_STARTING_POSITION: - if (tool_set(*this, widgetIndex, Tool::UpArrow)) + if (ToolSet(*this, widgetIndex, Tool::UpArrow)) break; - show_gridlines(); - show_land_rights(); - show_construction_rights(); + ShowGridlines(); + ShowLandRights(); + ShowConstructionRights(); break; case WIDX_LAND_TOOL: InputLandSize(); @@ -323,9 +323,9 @@ public: void OnUpdate() override { - if (get_current_rotation() != _rotation) + if (GetCurrentRotation() != _rotation) { - _rotation = get_current_rotation(); + _rotation = GetCurrentRotation(); InitMap(); CentreMapOnViewPoint(); } @@ -405,22 +405,22 @@ public: { case WIDX_SET_LAND_RIGHTS: Invalidate(); - hide_gridlines(); - hide_land_rights(); - hide_construction_rights(); + HideGridlines(); + HideLandRights(); + HideConstructionRights(); break; case WIDX_BUILD_PARK_ENTRANCE: ParkEntranceRemoveGhost(); Invalidate(); - hide_gridlines(); - hide_land_rights(); - hide_construction_rights(); + HideGridlines(); + HideLandRights(); + HideConstructionRights(); break; case WIDX_PEOPLE_STARTING_POSITION: Invalidate(); - hide_gridlines(); - hide_land_rights(); - hide_construction_rights(); + HideGridlines(); + HideLandRights(); + HideConstructionRights(); break; } } @@ -429,7 +429,7 @@ public: { MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - auto mapCoords = screen_get_map_xy(screenCoords, nullptr); + auto mapCoords = ScreenGetMapXY(screenCoords, nullptr); if (!mapCoords.has_value()) return; @@ -478,7 +478,7 @@ public: } } } - parkEntranceMapPosition.direction = (gWindowSceneryRotation - get_current_rotation()) & 3; + parkEntranceMapPosition.direction = (gWindowSceneryRotation - GetCurrentRotation()) & 3; return parkEntranceMapPosition; } @@ -516,7 +516,7 @@ public: ParkEntranceRemoveGhost(); - auto gameAction = PlaceParkEntranceAction(parkEntrancePosition, gFootpathSelectedId); + auto gameAction = ParkEntrancePlaceAction(parkEntrancePosition, gFootpathSelectedId); gameAction.SetFlags(GAME_COMMAND_FLAG_GHOST); auto result = GameActions::Execute(&gameAction); @@ -534,7 +534,7 @@ public: CoordsXYZD parkEntrancePosition = PlaceParkEntranceGetMapPosition(screenCoords); if (!parkEntrancePosition.IsNull()) { - auto gameAction = PlaceParkEntranceAction(parkEntrancePosition, gFootpathSelectedId); + auto gameAction = ParkEntrancePlaceAction(parkEntrancePosition, gFootpathSelectedId); auto result = GameActions::Execute(&gameAction); if (result.Error == GameActions::Status::Ok) { @@ -584,7 +584,7 @@ public: int32_t mapZ = tileElement->GetBaseZ(); - auto gameAction = PlacePeepSpawnAction({ mapCoords, mapZ, static_cast(direction) }); + auto gameAction = PeepSpawnPlaceAction({ mapCoords, mapZ, static_cast(direction) }); auto result = GameActions::Execute(&gameAction); if (result.Error == GameActions::Status::Ok) { @@ -630,8 +630,8 @@ public: if (_resizeDirection != ResizeDirection::Y) newMapSize.x = size; - auto changeMapSizeAction = ChangeMapSizeAction(newMapSize); - GameActions::Execute(&changeMapSizeAction); + auto mapChangeSizeAction = MapChangeSizeAction(newMapSize); + GameActions::Execute(&mapChangeSizeAction); Invalidate(); } break; @@ -650,10 +650,10 @@ public: auto mapCoords = CoordsXY{ std::clamp(c.x, 0, MAXIMUM_MAP_SIZE_BIG - 1), std::clamp(c.y, 0, MAXIMUM_MAP_SIZE_BIG - 1) }; auto mapZ = TileElementHeight(mapCoords); - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - window_scroll_to_location(*mainWindow, { mapCoords, mapZ }); + WindowScrollToLocation(*mainWindow, { mapCoords, mapZ }); } if (LandToolIsActive()) @@ -703,19 +703,19 @@ public: OnScrollMouseDown(scrollIndex, screenCoords); } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - gfx_clear(&dpi, PALETTE_INDEX_10); + GfxClear(&dpi, PALETTE_INDEX_10); - rct_g1_element g1temp = {}; + 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; - gfx_set_g1_element(SPR_TEMP, &g1temp); - drawing_engine_invalidate_image(SPR_TEMP); - gfx_draw_sprite(&dpi, ImageId(SPR_TEMP), { 0, 0 }); + GfxSetG1Element(SPR_TEMP, &g1temp); + DrawingEngineInvalidateImage(SPR_TEMP); + GfxDrawSprite(&dpi, ImageId(SPR_TEMP), { 0, 0 }); if (selected_tab == PAGE_PEEPS) { @@ -815,7 +815,7 @@ public: if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) { // scenario editor: build park entrance selected, show rotate button - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::Map + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::Map && gCurrentToolWidget.widget_index == WIDX_BUILD_PARK_ENTRANCE) { widgets[WIDX_ROTATE_90].type = WindowWidgetType::FlatBtn; @@ -825,7 +825,7 @@ public: widgets[WIDX_SET_LAND_RIGHTS].type = WindowWidgetType::FlatBtn; // If any tool is active - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::Map) + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::Map) { // if not in set land rights mode: show the default scenario editor buttons if (gCurrentToolWidget.widget_index != WIDX_SET_LAND_RIGHTS) @@ -841,7 +841,7 @@ public: for (int32_t i = WIDX_LAND_OWNED_CHECKBOX; i <= WIDX_CONSTRUCTION_RIGHTS_SALE_CHECKBOX; i++) widgets[i].type = WindowWidgetType::Checkbox; - widgets[WIDX_LAND_TOOL].image = LandTool::SizeToSpriteIndex(_landRightsToolSize); + widgets[WIDX_LAND_TOOL].image = ImageId(LandTool::SizeToSpriteIndex(_landRightsToolSize)); } } else @@ -852,7 +852,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(&dpi); @@ -865,7 +865,7 @@ public: { auto ft = Formatter(); ft.Add(_landRightsToolSize); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } screenCoords.y = windowPos.y + window_map_widgets[WIDX_LAND_TOOL].bottom + 5; @@ -875,7 +875,7 @@ public: screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PEOPLE_STARTING_POSITION].left + 12, widgets[WIDX_PEOPLE_STARTING_POSITION].top + 18 }; - gfx_draw_sprite(&dpi, ImageId(SPR_6410, COLOUR_BRIGHT_RED, COLOUR_LIGHT_BROWN), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_6410, COLOUR_BRIGHT_RED, COLOUR_LIGHT_BROWN), screenCoords); } if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) @@ -893,10 +893,10 @@ public: for (uint32_t i = 0; i < std::size(RideKeyColours); i++) { - gfx_fill_rect( + GfxFillRect( &dpi, { screenCoords + ScreenCoordsXY{ 0, 2 }, screenCoords + ScreenCoordsXY{ 6, 8 } }, RideKeyColours[i]); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ LIST_ROW_HEIGHT, 0 }, _mapLabels[i], {}); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ LIST_ROW_HEIGHT, 0 }, _mapLabels[i], {}); screenCoords.y += LIST_ROW_HEIGHT; if (i == 3) { @@ -908,7 +908,7 @@ public: else if (!WidgetIsActiveTool(*this, WIDX_SET_LAND_RIGHTS)) { DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_MAP_SIZE_SPINNER_Y].top + 1 }, STR_MAP_SIZE, {}, + dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_MAP_SIZE_SPINNER_Y].top + 1 }, STR_MAP_SIZE, {}, { colours[1] }); } } @@ -928,14 +928,14 @@ private: void CentreMapOnViewPoint() { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); int16_t ax, bx, cx, dx; int16_t bp, di; if (mainWindow == nullptr || mainWindow->viewport == nullptr) return; - auto offset = MiniMapOffsets[get_current_rotation()]; + auto offset = MiniMapOffsets[GetCurrentRotation()]; // calculate centre view point of viewport and transform it to minimap coordinates @@ -978,7 +978,7 @@ private: if (IsWidgetPressed(WIDX_MAP_SIZE_LINK) || _resizeDirection == ResizeDirection::X) newMapSize.x++; - auto increaseMapSizeAction = ChangeMapSizeAction(newMapSize); + auto increaseMapSizeAction = MapChangeSizeAction(newMapSize); GameActions::Execute(&increaseMapSizeAction); } @@ -990,7 +990,7 @@ private: if (IsWidgetPressed(WIDX_MAP_SIZE_LINK) || _resizeDirection == ResizeDirection::X) newMapSize.x--; - auto decreaseMapSizeAction = ChangeMapSizeAction(newMapSize); + auto decreaseMapSizeAction = MapChangeSizeAction(newMapSize); GameActions::Execute(&decreaseMapSizeAction); } @@ -1001,7 +1001,7 @@ private: int32_t pos = (_currentLine * (MAP_WINDOW_MAP_SIZE - 1)) + MAXIMUM_MAP_SIZE_TECHNICAL - 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; - switch (get_current_rotation()) + switch (GetCurrentRotation()) { case 0: x = _currentLine * COORDS_XY_STEP; @@ -1131,7 +1131,7 @@ private: { if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE) break; - Ride* targetRide = get_ride(tileElement->AsEntrance()->GetRideIndex()); + Ride* targetRide = GetRide(tileElement->AsEntrance()->GetRideIndex()); if (targetRide != nullptr) { const auto& colourKey = targetRide->GetRideTypeDescriptor().ColourKey; @@ -1141,7 +1141,7 @@ private: } case TileElementType::Track: { - Ride* targetRide = get_ride(tileElement->AsTrack()->GetRideIndex()); + Ride* targetRide = GetRide(tileElement->AsTrack()->GetRideIndex()); if (targetRide != nullptr) { const auto& colourKey = targetRide->GetRideTypeDescriptor().ColourKey; @@ -1161,7 +1161,7 @@ private: return colourB; } - void PaintPeepOverlay(rct_drawpixelinfo* dpi) + void PaintPeepOverlay(DrawPixelInfo* dpi) { auto flashColour = GetGuestFlashColour(); for (auto guest : EntityList()) @@ -1175,7 +1175,7 @@ private: } } - void DrawMapPeepPixel(Peep* peep, const uint8_t flashColour, rct_drawpixelinfo* dpi) + void DrawMapPeepPixel(Peep* peep, const uint8_t flashColour, DrawPixelInfo* dpi) { if (peep->x == LOCATION_NULL) return; @@ -1194,7 +1194,7 @@ private: } } - gfx_fill_rect(dpi, { leftTop, rightBottom }, colour); + GfxFillRect(dpi, { leftTop, rightBottom }, colour); } static uint8_t GetGuestFlashColour() @@ -1221,7 +1221,7 @@ private: return colour; } - void PaintTrainOverlay(rct_drawpixelinfo* dpi) + void PaintTrainOverlay(DrawPixelInfo* dpi) { for (auto train : TrainManager::View()) { @@ -1232,26 +1232,26 @@ private: MapCoordsXY c = TransformToMapCoords({ vehicle->x, vehicle->y }); - gfx_fill_rect(dpi, { { c.x, c.y }, { c.x, c.y } }, PALETTE_INDEX_171); + GfxFillRect(dpi, { { c.x, c.y }, { c.x, c.y } }, PALETTE_INDEX_171); } } } /** - * The call to gfx_fill_rect was originally wrapped in sub_68DABD which made sure that arguments were ordered correctly, + * 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(rct_drawpixelinfo* dpi) + void PaintHudRectangle(DrawPixelInfo* dpi) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow == nullptr) return; - rct_viewport* mainViewport = mainWindow->viewport; + Viewport* mainViewport = mainWindow->viewport; if (mainViewport == nullptr) return; - auto offset = MiniMapOffsets[get_current_rotation()]; + 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 }; @@ -1259,30 +1259,30 @@ private: auto leftBottom = ScreenCoordsXY{ leftTop.x, rightBottom.y }; // top horizontal lines - gfx_fill_rect(dpi, { leftTop, leftTop + ScreenCoordsXY{ 3, 0 } }, PALETTE_INDEX_56); - gfx_fill_rect(dpi, { rightTop - ScreenCoordsXY{ 3, 0 }, rightTop }, PALETTE_INDEX_56); + GfxFillRect(dpi, { leftTop, leftTop + ScreenCoordsXY{ 3, 0 } }, PALETTE_INDEX_56); + GfxFillRect(dpi, { rightTop - ScreenCoordsXY{ 3, 0 }, rightTop }, PALETTE_INDEX_56); // left vertical lines - gfx_fill_rect(dpi, { leftTop, leftTop + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_56); - gfx_fill_rect(dpi, { leftBottom - ScreenCoordsXY{ 0, 3 }, leftBottom }, PALETTE_INDEX_56); + GfxFillRect(dpi, { leftTop, leftTop + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_56); + GfxFillRect(dpi, { leftBottom - ScreenCoordsXY{ 0, 3 }, leftBottom }, PALETTE_INDEX_56); // bottom horizontal lines - gfx_fill_rect(dpi, { leftBottom, leftBottom + ScreenCoordsXY{ 3, 0 } }, PALETTE_INDEX_56); - gfx_fill_rect(dpi, { rightBottom - ScreenCoordsXY{ 3, 0 }, rightBottom }, PALETTE_INDEX_56); + GfxFillRect(dpi, { leftBottom, leftBottom + ScreenCoordsXY{ 3, 0 } }, PALETTE_INDEX_56); + GfxFillRect(dpi, { rightBottom - ScreenCoordsXY{ 3, 0 }, rightBottom }, PALETTE_INDEX_56); // right vertical lines - gfx_fill_rect(dpi, { rightTop, rightTop + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_56); - gfx_fill_rect(dpi, { rightBottom - ScreenCoordsXY{ 0, 3 }, rightBottom }, PALETTE_INDEX_56); + GfxFillRect(dpi, { rightTop, rightTop + ScreenCoordsXY{ 0, 3 } }, PALETTE_INDEX_56); + GfxFillRect(dpi, { rightBottom - ScreenCoordsXY{ 0, 3 }, rightBottom }, PALETTE_INDEX_56); } - void DrawTabImages(rct_drawpixelinfo* dpi) + void DrawTabImages(DrawPixelInfo* dpi) { // Guest tab image (animated) uint32_t guestTabImage = SPR_TAB_GUESTS_0; if (selected_tab == PAGE_PEEPS) guestTabImage += list_information_type / 4; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(guestTabImage), windowPos + ScreenCoordsXY{ widgets[WIDX_PEOPLE_TAB].left, widgets[WIDX_PEOPLE_TAB].top }); @@ -1291,7 +1291,7 @@ private: if (selected_tab == PAGE_RIDES) rideTabImage += list_information_type / 4; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(rideTabImage), windowPos + ScreenCoordsXY{ widgets[WIDX_RIDES_TAB].left, widgets[WIDX_RIDES_TAB].top }); } @@ -1345,7 +1345,7 @@ private: screenCoords.y = ((screenCoords.y + 8)) / 2; auto location = TileCoordsXY(screenCoords.y - screenCoords.x, screenCoords.x + screenCoords.y).ToCoordsXY(); - switch (get_current_rotation()) + switch (GetCurrentRotation()) { case 0: return location; @@ -1364,7 +1364,7 @@ private: { int32_t x = c.x, y = c.y; - switch (get_current_rotation()) + switch (GetCurrentRotation()) { case 3: std::swap(x, y); @@ -1441,11 +1441,11 @@ private: }; }; -rct_window* WindowMapOpen() +WindowBase* WindowMapOpen() { try { - rct_window* w = WindowFocusOrCreate(WindowClass::Map, 245, 259, WF_10); + WindowBase* w = WindowFocusOrCreate(WindowClass::Map, 245, 259, WF_10); w->selected_tab = 0; w->list_information_type = 0; return w; @@ -1458,10 +1458,10 @@ rct_window* WindowMapOpen() void WindowMapReset() { - rct_window* w; + WindowBase* w; // Check if window is even opened - w = window_bring_to_front_by_class(WindowClass::Map); + w = WindowBringToFrontByClass(WindowClass::Map); if (w == nullptr) { return; diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index 348a1ccd1e..8c65326e53 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -132,11 +132,11 @@ static constexpr const int32_t WH = 273; MakeTab ({65, 17} ), /* WIDX_TAB_3 */ \ MakeTab ({96, 17} ) /* WIDX_TAB_4 */ -static rct_widget MapWidgets[] = { +static Widget MapWidgets[] = { SHARED_WIDGETS, MakeWidget ({155, 255}, {90, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_MAPGEN_ACTION_GENERATE ), MakeSpinnerWidgets({104, 52}, {50, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_COMMA16 ), // NB: 3 widgets - MakeWidget ({155, 52}, {21, 12}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_LINK_CHAIN, STR_MAINTAIN_SQUARE_MAP_TOOLTIP), + MakeWidget ({155, 52}, {21, 12}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_LINK_CHAIN), STR_MAINTAIN_SQUARE_MAP_TOOLTIP), MakeSpinnerWidgets({177, 52}, {50, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_POP16_COMMA16 ), // NB: 3 widgets MakeSpinnerWidgets({104, 70}, {95, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets MakeSpinnerWidgets({104, 88}, {95, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets @@ -145,7 +145,7 @@ static rct_widget MapWidgets[] = { WIDGETS_END, }; -static rct_widget RandomWidgets[] = { +static Widget RandomWidgets[] = { SHARED_WIDGETS, MakeWidget({155, 255}, { 90, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_MAPGEN_ACTION_GENERATE ), MakeWidget({ 4, 52}, {195, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_MAPGEN_OPTION_RANDOM_TERRAIN), @@ -153,7 +153,7 @@ static rct_widget RandomWidgets[] = { WIDGETS_END, }; -static rct_widget SimplexWidgets[] = { +static Widget SimplexWidgets[] = { SHARED_WIDGETS, MakeWidget ({155, 255}, { 90, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_MAPGEN_ACTION_GENERATE ), // WIDX_SIMPLEX_GENERATE MakeWidget ({ 4, 52}, {195, 12}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_MAPGEN_SIMPLEX_NOISE ), // WIDX_SIMPLEX_LABEL @@ -162,7 +162,7 @@ static rct_widget SimplexWidgets[] = { MakeSpinnerWidgets({104, 106}, { 95, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // WIDX_SIMPLEX_BASE_FREQ{,_UP,_DOWN} MakeSpinnerWidgets({104, 124}, { 95, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // WIDX_SIMPLEX_OCTAVES{,_UP,_DOWN} MakeSpinnerWidgets({104, 148}, { 50, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_COMMA16 ), // WIDX_SIMPLEX_MAP_SIZE_Y{,_UP,_DOWN} - MakeWidget ({155, 148}, { 21, 12}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_LINK_CHAIN, STR_MAINTAIN_SQUARE_MAP_TOOLTIP), // WIDX_SIMPLEX_MAP_SIZE_LINK + MakeWidget ({155, 148}, { 21, 12}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_LINK_CHAIN), STR_MAINTAIN_SQUARE_MAP_TOOLTIP), // WIDX_SIMPLEX_MAP_SIZE_LINK MakeSpinnerWidgets({177, 148}, { 50, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_POP16_COMMA16 ), // WIDX_SIMPLEX_MAP_SIZE_X{,_UP,_DOWN} MakeSpinnerWidgets({104, 166}, { 95, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // WIDX_SIMPLEX_WATER_LEVEL{,_UP,_DOWN} MakeWidget ({104, 190}, { 95, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_MAPGEN_OPTION_RANDOM_TERRAIN ), // WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX @@ -172,7 +172,7 @@ static rct_widget SimplexWidgets[] = { WIDGETS_END, }; -static rct_widget HeightmapWidgets[] = { +static Widget HeightmapWidgets[] = { SHARED_WIDGETS, MakeWidget ({ 95, 255}, {150, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_MAPGEN_SELECT_HEIGHTMAP), // WIDX_HEIGHTMAP_SELECT MakeWidget ({ 4, 52}, {100, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_MAPGEN_SMOOTH_HEIGHTMAP), // WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP @@ -186,7 +186,7 @@ static rct_widget HeightmapWidgets[] = { }; // clang-format on -static rct_widget* PageWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { +static Widget* PageWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { MapWidgets, RandomWidgets, SimplexWidgets, @@ -195,85 +195,6 @@ static rct_widget* PageWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { #pragma endregion -#pragma region Events - -static void WindowMapgenSharedClose(rct_window* w); -static void WindowMapgenSharedMouseup(rct_window* w, WidgetIndex widgetIndex); - -static void WindowMapgenBaseMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowMapgenBaseMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowMapgenBaseDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowMapgenBaseUpdate(rct_window* w); -static void WindowMapgenTextinput(rct_window* w, WidgetIndex widgetIndex, char* text); -static void WindowMapgenBaseInvalidate(rct_window* w); -static void WindowMapgenBasePaint(rct_window* w, rct_drawpixelinfo* dpi); - -static void WindowMapgenRandomMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowMapgenRandomMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowMapgenRandomUpdate(rct_window* w); -static void WindowMapgenRandomInvalidate(rct_window* w); -static void WindowMapgenRandomPaint(rct_window* w, rct_drawpixelinfo* dpi); - -static void WindowMapgenSimplexMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowMapgenSimplexMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowMapgenSimplexDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowMapgenSimplexUpdate(rct_window* w); -static void WindowMapgenSimplexInvalidate(rct_window* w); -static void WindowMapgenSimplexPaint(rct_window* w, rct_drawpixelinfo* dpi); - -static void WindowMapgenHeightmapMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowMapgenHeightmapMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowMapgenHeightmapInvalidate(rct_window* w); -static void WindowMapgenHeightmapPaint(rct_window* w, rct_drawpixelinfo* dpi); - -static WindowEventList BaseEvents([](auto& events) { - events.close = &WindowMapgenSharedClose; - events.mouse_up = &WindowMapgenBaseMouseup; - events.mouse_down = &WindowMapgenBaseMousedown; - events.dropdown = &WindowMapgenBaseDropdown; - events.update = &WindowMapgenBaseUpdate; - events.text_input = &WindowMapgenTextinput; - events.invalidate = &WindowMapgenBaseInvalidate; - events.paint = &WindowMapgenBasePaint; -}); - -static WindowEventList RandomEvents([](auto& events) { - events.close = &WindowMapgenSharedClose; - events.mouse_up = &WindowMapgenRandomMouseup; - events.mouse_down = &WindowMapgenRandomMousedown; - events.update = &WindowMapgenRandomUpdate; - events.invalidate = &WindowMapgenRandomInvalidate; - events.paint = &WindowMapgenRandomPaint; -}); - -static WindowEventList SimplexEvents([](auto& events) { - events.close = &WindowMapgenSharedClose; - events.mouse_up = &WindowMapgenSimplexMouseup; - events.mouse_down = &WindowMapgenSimplexMousedown; - events.dropdown = &WindowMapgenSimplexDropdown; - events.update = &WindowMapgenSimplexUpdate; - events.text_input = &WindowMapgenTextinput; - events.invalidate = &WindowMapgenSimplexInvalidate; - events.paint = &WindowMapgenSimplexPaint; -}); - -static WindowEventList HeightmapEvents([](auto& events) { - events.close = &WindowMapgenSharedClose; - events.mouse_up = &WindowMapgenHeightmapMouseup; - events.mouse_down = &WindowMapgenHeightmapMousedown; - events.invalidate = &WindowMapgenHeightmapInvalidate; - events.paint = &WindowMapgenHeightmapPaint; -}); - -static WindowEventList* PageEvents[] = { - &BaseEvents, - &RandomEvents, - &SimplexEvents, - &HeightmapEvents, -}; - -#pragma endregion - #pragma region Widget flags // clang-format off @@ -374,10 +295,6 @@ constexpr int32_t WATERLEVEL_MIN = 0; constexpr int32_t WATERLEVEL_MAX = 54; constexpr int32_t MAX_SMOOTH_ITERATIONS = 20; -static void WindowMapgenSetPage(rct_window* w, int32_t page); -static void WindowMapgenSetPressedTab(rct_window* w); -static void WindowMapgenDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w); - enum class ResizeDirection { Both, @@ -385,1002 +302,1084 @@ enum class ResizeDirection Y, }; -static TileCoordsXY _mapSize{ 150, 150 }; -static ResizeDirection _resizeDirection{ ResizeDirection::Both }; -static bool _mapWidthAndHeightLinked{ true }; -static int32_t _baseHeight = 12; -static int32_t _waterLevel = 6; -static int32_t _floorTexture = 0; -static int32_t _wallTexture = 0; -static bool _randomTerrain = true; -static int32_t _placeTrees = 1; +static void HeightmapLoadsaveCallback(int32_t result, const utf8* path); -static int32_t _simplex_low = 6; -static int32_t _simplex_high = 10; -static int32_t _simplex_base_freq = 60; -static int32_t _simplex_octaves = 4; - -static bool _heightmapLoaded = false; -static bool _heightmapSmoothMap = false; -static int32_t _heightmapSmoothStrength = 1; -static bool _heightmapNormalize = false; -static bool _heightmapSmoothTiles = true; -static int32_t _heightmapLow = 2; -static int32_t _heightmapHigh = 70; - -static void WindowMapgenChangeMapSize(int32_t sizeOffset) +class MapGenWindow final : public Window { - if (_mapWidthAndHeightLinked) - _resizeDirection = ResizeDirection::Both; +private: + TileCoordsXY _mapSize{ 150, 150 }; + ResizeDirection _resizeDirection{ ResizeDirection::Both }; + bool _mapWidthAndHeightLinked{ true }; + int32_t _baseHeight = 12; + int32_t _waterLevel = 6; + int32_t _floorTexture = 0; + int32_t _wallTexture = 0; + bool _randomTerrain = true; + int32_t _placeTrees = 1; - if (_resizeDirection != ResizeDirection::X) - _mapSize.y = std::clamp(_mapSize.y + sizeOffset, MINIMUM_MAP_SIZE_TECHNICAL, MAXIMUM_MAP_SIZE_TECHNICAL); - if (_resizeDirection != ResizeDirection::Y) - _mapSize.x = std::clamp(_mapSize.x + sizeOffset, MINIMUM_MAP_SIZE_TECHNICAL, MAXIMUM_MAP_SIZE_TECHNICAL); -} + int32_t _simplex_low = 6; + int32_t _simplex_high = 10; + int32_t _simplex_base_freq = 60; + int32_t _simplex_octaves = 4; -rct_window* WindowMapgenOpen() -{ - rct_window* w = window_bring_to_front_by_class(WindowClass::Mapgen); - if (w != nullptr) + bool _heightmapLoaded = false; + bool _heightmapSmoothMap = false; + int32_t _heightmapSmoothStrength = 1; + bool _heightmapNormalize = false; + bool _heightmapSmoothTiles = true; + int32_t _heightmapLow = 2; + int32_t _heightmapHigh = 70; + + void SetPage(int32_t newPage) { - return w; - } + page = newPage; + frame_no = 0; + RemoveViewport(); - w = WindowCreateCentred(WW, WH, PageEvents[WINDOW_MAPGEN_PAGE_BASE], WindowClass::Mapgen, WF_10); - w->number = 0; - w->frame_no = 0; + hold_down_widgets = HoldDownWidgets[newPage]; + widgets = PageWidgets[newPage]; + disabled_widgets = PageDisabledWidgets[newPage]; + pressed_widgets = PressedWidgets[newPage]; - w->page = WINDOW_MAPGEN_PAGE_BASE; - w->Invalidate(); - w->widgets = PageWidgets[WINDOW_MAPGEN_PAGE_BASE]; - w->hold_down_widgets = HoldDownWidgets[WINDOW_MAPGEN_PAGE_BASE]; - w->event_handlers = PageEvents[WINDOW_MAPGEN_PAGE_BASE]; - w->pressed_widgets = PressedWidgets[WINDOW_MAPGEN_PAGE_BASE]; - w->disabled_widgets = PageDisabledWidgets[WINDOW_MAPGEN_PAGE_BASE]; - WindowInitScrollWidgets(*w); - - _heightmapLoaded = false; - - return w; -} - -static void WindowMapgenSharedClose(rct_window* w) -{ - MapGenUnloadHeightmap(); -} - -static void WindowMapgenSharedMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - switch (widgetIndex) - { - case WIDX_CLOSE: - window_close(*w); - break; - case WIDX_TAB_1: - case WIDX_TAB_2: - case WIDX_TAB_3: - case WIDX_TAB_4: - WindowMapgenSetPage(w, widgetIndex - WIDX_TAB_1); - break; - } -} - -static void WindowMapgenInputMapSize(rct_window* w, WidgetIndex callingWidget, int32_t currentValue) -{ - Formatter ft; - ft.Add(MINIMUM_MAP_SIZE_PRACTICAL); - ft.Add(MAXIMUM_MAP_SIZE_PRACTICAL); - - // Practical map size is 2 lower than the technical map size - currentValue -= 2; - WindowTextInputOpen(w, callingWidget, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, ft, STR_FORMAT_INTEGER, currentValue, 4); -} - -#pragma region Base page - -static void WindowMapgenBaseMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - WindowMapgenSharedMouseup(w, widgetIndex); - - mapgen_settings mapgenSettings; - Formatter ft; - switch (widgetIndex) - { - case WIDX_MAP_GENERATE: - mapgenSettings.mapSize = _mapSize; - mapgenSettings.height = _baseHeight + 2; - mapgenSettings.water_level = _waterLevel + 2; - mapgenSettings.floor = _floorTexture; - mapgenSettings.wall = _wallTexture; - - MapGenGenerateBlank(&mapgenSettings); - gfx_invalidate_screen(); - break; - case WIDX_MAP_SIZE_Y: - _resizeDirection = ResizeDirection::Y; - WindowMapgenInputMapSize(w, WIDX_MAP_SIZE_Y, _mapSize.y); - break; - case WIDX_MAP_SIZE_X: - _resizeDirection = ResizeDirection::X; - WindowMapgenInputMapSize(w, WIDX_MAP_SIZE_X, _mapSize.x); - break; - case WIDX_MAP_SIZE_LINK: - _mapWidthAndHeightLinked = !_mapWidthAndHeightLinked; - break; - case WIDX_BASE_HEIGHT: - ft.Add((BASESIZE_MIN - 12) / 2); - ft.Add((BASESIZE_MAX - 12) / 2); - WindowTextInputOpen( - w, WIDX_BASE_HEIGHT, STR_BASE_HEIGHT, STR_ENTER_BASE_HEIGHT, ft, STR_FORMAT_INTEGER, (_baseHeight - 12) / 2, 3); - break; - case WIDX_WATER_LEVEL: - ft.Add((WATERLEVEL_MIN - 12) / 2); - ft.Add((WATERLEVEL_MAX - 12) / 2); - WindowTextInputOpen( - w, WIDX_WATER_LEVEL, STR_WATER_LEVEL, STR_ENTER_WATER_LEVEL, ft, STR_FORMAT_INTEGER, (_waterLevel - 12) / 2, 3); - break; - } -} - -static void WindowMapgenBaseMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) -{ - switch (widgetIndex) - { - case WIDX_MAP_SIZE_Y_UP: - _resizeDirection = ResizeDirection::Y; - WindowMapgenChangeMapSize(+1); - w->Invalidate(); - break; - case WIDX_MAP_SIZE_Y_DOWN: - _resizeDirection = ResizeDirection::Y; - WindowMapgenChangeMapSize(-1); - w->Invalidate(); - break; - case WIDX_MAP_SIZE_X_UP: - _resizeDirection = ResizeDirection::X; - WindowMapgenChangeMapSize(+1); - w->Invalidate(); - break; - case WIDX_MAP_SIZE_X_DOWN: - _resizeDirection = ResizeDirection::X; - WindowMapgenChangeMapSize(-1); - w->Invalidate(); - break; - case WIDX_BASE_HEIGHT_UP: - _baseHeight = std::min(_baseHeight + 2, BASESIZE_MAX); - w->Invalidate(); - break; - case WIDX_BASE_HEIGHT_DOWN: - _baseHeight = std::max(_baseHeight - 2, BASESIZE_MIN); - w->Invalidate(); - break; - case WIDX_WATER_LEVEL_UP: - _waterLevel = std::min(_waterLevel + 2, WATERLEVEL_MAX); - w->Invalidate(); - break; - case WIDX_WATER_LEVEL_DOWN: - _waterLevel = std::max(_waterLevel - 2, WATERLEVEL_MIN); - w->Invalidate(); - break; - case WIDX_FLOOR_TEXTURE: - LandTool::ShowSurfaceStyleDropdown(w, widget, _floorTexture); - break; - case WIDX_WALL_TEXTURE: - LandTool::ShowEdgeStyleDropdown(w, widget, _wallTexture); - break; - } -} - -static void WindowMapgenBaseDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) -{ - int32_t type; - - switch (widgetIndex) - { - case WIDX_FLOOR_TEXTURE: - if (dropdownIndex == -1) - dropdownIndex = gDropdownHighlightedIndex; - - type = (dropdownIndex == -1) ? _floorTexture : dropdownIndex; - - if (gLandToolTerrainSurface == type) - { - gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; - } - else - { - gLandToolTerrainSurface = type; - _floorTexture = type; - } - w->Invalidate(); - break; - case WIDX_WALL_TEXTURE: - if (dropdownIndex == -1) - dropdownIndex = gDropdownHighlightedIndex; - - type = (dropdownIndex == -1) ? _wallTexture : dropdownIndex; - - if (gLandToolTerrainEdge == type) - { - gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; - } - else - { - gLandToolTerrainEdge = type; - _wallTexture = type; - } - w->Invalidate(); - break; - } -} - -static void WindowMapgenBaseUpdate(rct_window* w) -{ - // Tab animation - if (++w->frame_no >= TabAnimationLoops[w->page]) - w->frame_no = 0; - widget_invalidate(*w, WIDX_TAB_1); -} - -static void WindowMapgenTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) -{ - int32_t value; - char* end; - - if (text == nullptr) - return; - - value = strtol(text, &end, 10); - - if (*end != '\0') - { - return; - } - - switch (widgetIndex) - { - case WIDX_MAP_SIZE_Y: - case WIDX_MAP_SIZE_X: - case WIDX_SIMPLEX_MAP_SIZE_Y: - case WIDX_SIMPLEX_MAP_SIZE_X: - // The practical size is 2 lower than the technical size - value += 2; - if (_resizeDirection == ResizeDirection::Y || _mapWidthAndHeightLinked) - _mapSize.y = value; - if (_resizeDirection == ResizeDirection::X || _mapWidthAndHeightLinked) - _mapSize.x = value; - break; - case WIDX_BASE_HEIGHT: - _baseHeight = std::clamp((value * 2) + 12, BASESIZE_MIN, BASESIZE_MAX); - break; - case WIDX_WATER_LEVEL: - _waterLevel = std::clamp((value * 2) + 12, WATERLEVEL_MIN, WATERLEVEL_MAX); - break; - } - - w->Invalidate(); -} - -static void WindowMapgenBaseInvalidate(rct_window* w) -{ - if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_BASE]) - { - w->widgets = PageWidgets[WINDOW_MAPGEN_PAGE_BASE]; - WindowInitScrollWidgets(*w); - } - - // Only allow linking the map size when X and Y are the same - WidgetSetPressed(*w, WIDX_MAP_SIZE_LINK, _mapWidthAndHeightLinked); - WidgetSetDisabled(*w, WIDX_MAP_SIZE_LINK, _mapSize.x != _mapSize.y); - - WindowMapgenSetPressedTab(w); - - // Push width (Y) and height (X) to the common formatter arguments for the map size spinners to use - auto ft = Formatter::Common(); - ft.Add(_mapSize.y - 2); - ft.Add(_mapSize.x - 2); -} - -static void WindowMapgenDrawDropdownButton(rct_window* w, rct_drawpixelinfo* dpi, WidgetIndex widgetIndex, ImageId image) -{ - const auto& widget = w->widgets[widgetIndex]; - ScreenCoordsXY pos = { w->windowPos.x + widget.left, w->windowPos.y + widget.top }; - if (WidgetIsDisabled(*w, widgetIndex)) - { - // Draw greyed out (light border bottom right shadow) - auto colour = w->colours[widget.colour]; - colour = ColourMapA[NOT_TRANSLUCENT(colour)].lighter; - gfx_draw_sprite_solid(dpi, image, pos + ScreenCoordsXY{ 1, 1 }, colour); - - // Draw greyed out (dark) - colour = w->colours[widget.colour]; - colour = ColourMapA[NOT_TRANSLUCENT(colour)].mid_light; - gfx_draw_sprite_solid(dpi, image, pos, colour); - } - else - { - gfx_draw_sprite(dpi, image, pos); - } -} - -static void WindowMapgenDrawDropdownButtons( - rct_window* w, rct_drawpixelinfo* dpi, WidgetIndex floorWidgetIndex, WidgetIndex edgeWidgetIndex) -{ - auto& objManager = GetContext()->GetObjectManager(); - const auto surfaceObj = static_cast( - objManager.GetLoadedObject(ObjectType::TerrainSurface, _floorTexture)); - ImageId surfaceImage; - if (surfaceObj != nullptr) - { - surfaceImage = ImageId(surfaceObj->IconImageId); - if (surfaceObj->Colour != 255) + // Enable heightmap widgets if one is loaded + if (newPage == WINDOW_MAPGEN_PAGE_HEIGHTMAP && _heightmapLoaded) { - surfaceImage = surfaceImage.WithPrimary(surfaceObj->Colour); + SetWidgetEnabled(WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_STRENGTH, _heightmapSmoothMap); + SetWidgetEnabled(WIDX_HEIGHTMAP_STRENGTH_UP, _heightmapSmoothMap); + SetWidgetEnabled(WIDX_HEIGHTMAP_STRENGTH_DOWN, _heightmapSmoothMap); + SetWidgetEnabled(WIDX_HEIGHTMAP_NORMALIZE, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_SMOOTH_TILES, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_HIGH, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_HIGH_UP, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_HIGH_DOWN, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_LOW, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_LOW_UP, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_LOW_DOWN, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_WATER_LEVEL, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_WATER_LEVEL_UP, true); + SetWidgetEnabled(WIDX_HEIGHTMAP_WATER_LEVEL_DOWN, true); + } + + InitScrollWidgets(); + Invalidate(); + } + + void SetPressedTab() + { + int32_t i; + for (i = 0; i < WINDOW_MAPGEN_PAGE_COUNT; i++) + pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); + pressed_widgets |= 1LL << (WIDX_TAB_1 + page); + } + + void DrawTabImage(DrawPixelInfo& dpi, int32_t newPage, int32_t spriteIndex) + { + WidgetIndex widgetIndex = WIDX_TAB_1 + newPage; + + if (!WidgetIsDisabled(*this, widgetIndex)) + { + if (page == newPage) + { + int32_t frame = frame_no / TabAnimationDivisor[page]; + spriteIndex += (frame % TabAnimationFrames[page]); + } + + GfxDrawSprite( + &dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widgets[widgetIndex].left, widgets[widgetIndex].top }); } } - ImageId edgeImage; - const auto edgeObj = static_cast(objManager.GetLoadedObject(ObjectType::TerrainEdge, _wallTexture)); - if (edgeObj != nullptr) + void DrawTabImages(DrawPixelInfo& dpi) { - edgeImage = ImageId(edgeObj->IconImageId); + DrawTabImage(dpi, WINDOW_MAPGEN_PAGE_BASE, SPR_G2_TAB_LAND); + DrawTabImage(dpi, WINDOW_MAPGEN_PAGE_RANDOM, SPR_G2_TAB_TREE); + DrawTabImage(dpi, WINDOW_MAPGEN_PAGE_SIMPLEX, SPR_G2_TAB_PENCIL); + DrawTabImage(dpi, WINDOW_MAPGEN_PAGE_HEIGHTMAP, SPR_TAB_GRAPH_0); } - WindowMapgenDrawDropdownButton(w, dpi, floorWidgetIndex, surfaceImage); - WindowMapgenDrawDropdownButton(w, dpi, edgeWidgetIndex, edgeImage); -} + void ChangeMapSize(int32_t sizeOffset) + { + if (_mapWidthAndHeightLinked) + _resizeDirection = ResizeDirection::Both; -static void WindowMapgenBasePaint(rct_window* w, rct_drawpixelinfo* dpi) -{ - WindowDrawWidgets(*w, dpi); - WindowMapgenDrawTabImages(dpi, w); - WindowMapgenDrawDropdownButtons(w, dpi, WIDX_FLOOR_TEXTURE, WIDX_WALL_TEXTURE); + if (_resizeDirection != ResizeDirection::X) + _mapSize.y = std::clamp(_mapSize.y + sizeOffset, MINIMUM_MAP_SIZE_TECHNICAL, MAXIMUM_MAP_SIZE_TECHNICAL); + if (_resizeDirection != ResizeDirection::Y) + _mapSize.x = std::clamp(_mapSize.x + sizeOffset, MINIMUM_MAP_SIZE_TECHNICAL, MAXIMUM_MAP_SIZE_TECHNICAL); + } - const auto textColour = w->colours[1]; + void InputMapSize(WidgetIndex callingWidget, int32_t currentValue) + { + Formatter ft; + ft.Add(MINIMUM_MAP_SIZE_PRACTICAL); + ft.Add(MAXIMUM_MAP_SIZE_PRACTICAL); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 4, w->widgets[WIDX_MAP_SIZE_Y].top + 1 }, STR_MAP_SIZE, {}, { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 4, w->widgets[WIDX_BASE_HEIGHT].top + 1 }, STR_BASE_HEIGHT_LABEL, {}, - { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 4, w->widgets[WIDX_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, - { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 4, w->widgets[WIDX_FLOOR_TEXTURE].top + 1 }, STR_TERRAIN_LABEL, {}, { textColour }); + // Practical map size is 2 lower than the technical map size + currentValue -= 2; + WindowTextInputOpen(this, callingWidget, STR_MAP_SIZE_2, STR_ENTER_MAP_SIZE, ft, STR_FORMAT_INTEGER, currentValue, 4); + } - auto ft = Formatter(); - ft.Add((_baseHeight - 12) / 2); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_BASE_HEIGHT].left + 1, w->widgets[WIDX_BASE_HEIGHT].top + 1 }, - STR_COMMA16, ft, { w->colours[1] }); + void SharedMouseUp(WidgetIndex widgetIndex) + { + switch (widgetIndex) + { + case WIDX_CLOSE: + Close(); + break; + case WIDX_TAB_1: + case WIDX_TAB_2: + case WIDX_TAB_3: + case WIDX_TAB_4: + SetPage(widgetIndex - WIDX_TAB_1); + break; + } + } - ft = Formatter(); - ft.Add((_waterLevel - 12) / 2); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_WATER_LEVEL].left + 1, w->widgets[WIDX_WATER_LEVEL].top + 1 }, - STR_COMMA16, ft, { w->colours[1] }); -} +#pragma region Base page + + void BaseMouseUp(WidgetIndex widgetIndex) + { + SharedMouseUp(widgetIndex); + + MapGenSettings mapgenSettings; + Formatter ft; + switch (widgetIndex) + { + case WIDX_MAP_GENERATE: + mapgenSettings.mapSize = _mapSize; + mapgenSettings.height = _baseHeight + 2; + mapgenSettings.water_level = _waterLevel + 2; + mapgenSettings.floor = _floorTexture; + mapgenSettings.wall = _wallTexture; + + MapGenGenerateBlank(&mapgenSettings); + GfxInvalidateScreen(); + break; + case WIDX_MAP_SIZE_Y: + _resizeDirection = ResizeDirection::Y; + InputMapSize(WIDX_MAP_SIZE_Y, _mapSize.y); + break; + case WIDX_MAP_SIZE_X: + _resizeDirection = ResizeDirection::X; + InputMapSize(WIDX_MAP_SIZE_X, _mapSize.x); + break; + case WIDX_MAP_SIZE_LINK: + _mapWidthAndHeightLinked = !_mapWidthAndHeightLinked; + break; + case WIDX_BASE_HEIGHT: + ft.Add((BASESIZE_MIN - 12) / 2); + ft.Add((BASESIZE_MAX - 12) / 2); + WindowTextInputOpen( + this, WIDX_BASE_HEIGHT, STR_BASE_HEIGHT, STR_ENTER_BASE_HEIGHT, ft, STR_FORMAT_INTEGER, + (_baseHeight - 12) / 2, 3); + break; + case WIDX_WATER_LEVEL: + ft.Add((WATERLEVEL_MIN - 12) / 2); + ft.Add((WATERLEVEL_MAX - 12) / 2); + WindowTextInputOpen( + this, WIDX_WATER_LEVEL, STR_WATER_LEVEL, STR_ENTER_WATER_LEVEL, ft, STR_FORMAT_INTEGER, + (_waterLevel - 12) / 2, 3); + break; + } + } + + void BaseMouseDown(WidgetIndex widgetIndex, Widget* widget) + { + switch (widgetIndex) + { + case WIDX_MAP_SIZE_Y_UP: + _resizeDirection = ResizeDirection::Y; + ChangeMapSize(+1); + Invalidate(); + break; + case WIDX_MAP_SIZE_Y_DOWN: + _resizeDirection = ResizeDirection::Y; + ChangeMapSize(-1); + Invalidate(); + break; + case WIDX_MAP_SIZE_X_UP: + _resizeDirection = ResizeDirection::X; + ChangeMapSize(+1); + Invalidate(); + break; + case WIDX_MAP_SIZE_X_DOWN: + _resizeDirection = ResizeDirection::X; + ChangeMapSize(-1); + Invalidate(); + break; + case WIDX_BASE_HEIGHT_UP: + _baseHeight = std::min(_baseHeight + 2, BASESIZE_MAX); + Invalidate(); + break; + case WIDX_BASE_HEIGHT_DOWN: + _baseHeight = std::max(_baseHeight - 2, BASESIZE_MIN); + Invalidate(); + break; + case WIDX_WATER_LEVEL_UP: + _waterLevel = std::min(_waterLevel + 2, WATERLEVEL_MAX); + Invalidate(); + break; + case WIDX_WATER_LEVEL_DOWN: + _waterLevel = std::max(_waterLevel - 2, WATERLEVEL_MIN); + Invalidate(); + break; + case WIDX_FLOOR_TEXTURE: + LandTool::ShowSurfaceStyleDropdown(this, widget, _floorTexture); + break; + case WIDX_WALL_TEXTURE: + LandTool::ShowEdgeStyleDropdown(this, widget, _wallTexture); + break; + } + } + + void BaseDropdown(WidgetIndex widgetIndex, int32_t dropdownIndex) + { + int32_t type; + + switch (widgetIndex) + { + case WIDX_FLOOR_TEXTURE: + if (dropdownIndex == -1) + dropdownIndex = gDropdownHighlightedIndex; + + type = (dropdownIndex == -1) ? _floorTexture : dropdownIndex; + + if (gLandToolTerrainSurface == type) + { + gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; + } + else + { + gLandToolTerrainSurface = type; + _floorTexture = type; + } + Invalidate(); + break; + case WIDX_WALL_TEXTURE: + if (dropdownIndex == -1) + dropdownIndex = gDropdownHighlightedIndex; + + type = (dropdownIndex == -1) ? _wallTexture : dropdownIndex; + + if (gLandToolTerrainEdge == type) + { + gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; + } + else + { + gLandToolTerrainEdge = type; + _wallTexture = type; + } + Invalidate(); + break; + } + } + + void BaseUpdate() + { + // Tab animation + if (++frame_no >= TabAnimationLoops[page]) + frame_no = 0; + InvalidateWidget(WIDX_TAB_1); + } + + void TextInput(WidgetIndex widgetIndex, std::string_view text) + { + int32_t value; + char* end; + + const auto strText = u8string(text); + value = strtol(strText.c_str(), &end, 10); + + if (*end != '\0') + { + return; + } + + switch (widgetIndex) + { + case WIDX_MAP_SIZE_Y: + case WIDX_MAP_SIZE_X: + case WIDX_SIMPLEX_MAP_SIZE_Y: + case WIDX_SIMPLEX_MAP_SIZE_X: + // The practical size is 2 lower than the technical size + value += 2; + if (_resizeDirection == ResizeDirection::Y || _mapWidthAndHeightLinked) + _mapSize.y = value; + if (_resizeDirection == ResizeDirection::X || _mapWidthAndHeightLinked) + _mapSize.x = value; + break; + case WIDX_BASE_HEIGHT: + _baseHeight = std::clamp((value * 2) + 12, BASESIZE_MIN, BASESIZE_MAX); + break; + case WIDX_WATER_LEVEL: + _waterLevel = std::clamp((value * 2) + 12, WATERLEVEL_MIN, WATERLEVEL_MAX); + break; + } + + Invalidate(); + } + + void BasePrepareDraw() + { + if (widgets != PageWidgets[WINDOW_MAPGEN_PAGE_BASE]) + { + widgets = PageWidgets[WINDOW_MAPGEN_PAGE_BASE]; + InitScrollWidgets(); + } + + // Only allow linking the map size when X and Y are the same + SetWidgetPressed(WIDX_MAP_SIZE_LINK, _mapWidthAndHeightLinked); + SetWidgetDisabled(WIDX_MAP_SIZE_LINK, _mapSize.x != _mapSize.y); + + SetPressedTab(); + + // Push width (Y) and height (X) to the common formatter arguments for the map size spinners to use + auto ft = Formatter::Common(); + ft.Add(_mapSize.y - 2); + ft.Add(_mapSize.x - 2); + } + + void DrawDropdownButton(DrawPixelInfo& dpi, WidgetIndex widgetIndex, ImageId image) + { + const auto& widget = widgets[widgetIndex]; + ScreenCoordsXY pos = { windowPos.x + widget.left, windowPos.y + widget.top }; + if (IsWidgetDisabled(widgetIndex)) + { + // Draw greyed out (light border bottom right shadow) + auto colour = colours[widget.colour]; + colour = ColourMapA[NOT_TRANSLUCENT(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; + GfxDrawSpriteSolid(&dpi, image, pos, colour); + } + else + { + GfxDrawSprite(&dpi, image, pos); + } + } + + void DrawDropdownButtons(DrawPixelInfo& dpi, WidgetIndex floorWidgetIndex, WidgetIndex edgeWidgetIndex) + { + auto& objManager = GetContext()->GetObjectManager(); + const auto surfaceObj = static_cast( + objManager.GetLoadedObject(ObjectType::TerrainSurface, _floorTexture)); + ImageId surfaceImage; + if (surfaceObj != nullptr) + { + surfaceImage = ImageId(surfaceObj->IconImageId); + if (surfaceObj->Colour != 255) + { + surfaceImage = surfaceImage.WithPrimary(surfaceObj->Colour); + } + } + + ImageId edgeImage; + const auto edgeObj = static_cast(objManager.GetLoadedObject(ObjectType::TerrainEdge, _wallTexture)); + if (edgeObj != nullptr) + { + edgeImage = ImageId(edgeObj->IconImageId); + } + + DrawDropdownButton(dpi, floorWidgetIndex, surfaceImage); + DrawDropdownButton(dpi, edgeWidgetIndex, edgeImage); + } + + void BaseDraw(DrawPixelInfo& dpi) + { + DrawWidgets(dpi); + DrawTabImages(dpi); + DrawDropdownButtons(dpi, WIDX_FLOOR_TEXTURE, WIDX_WALL_TEXTURE); + + const auto textColour = colours[1]; + + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_MAP_SIZE_Y].top + 1 }, STR_MAP_SIZE, {}, { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_BASE_HEIGHT].top + 1 }, STR_BASE_HEIGHT_LABEL, {}, { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_FLOOR_TEXTURE].top + 1 }, STR_TERRAIN_LABEL, {}, { textColour }); + + auto ft = Formatter(); + ft.Add((_baseHeight - 12) / 2); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_BASE_HEIGHT].left + 1, widgets[WIDX_BASE_HEIGHT].top + 1 }, + STR_COMMA16, ft, { colours[1] }); + + ft = Formatter(); + ft.Add((_waterLevel - 12) / 2); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_WATER_LEVEL].left + 1, widgets[WIDX_WATER_LEVEL].top + 1 }, + STR_COMMA16, ft, { colours[1] }); + } #pragma endregion #pragma region Random page -static void WindowMapgenRandomMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - WindowMapgenSharedMouseup(w, widgetIndex); - - mapgen_settings mapgenSettings; - - switch (widgetIndex) + void RandomMouseUp(WidgetIndex widgetIndex) { - case WIDX_RANDOM_GENERATE: - mapgenSettings.mapSize = _mapSize; - mapgenSettings.height = _baseHeight + 2; - mapgenSettings.water_level = _waterLevel + 2; - mapgenSettings.floor = _randomTerrain ? -1 : _floorTexture; - mapgenSettings.wall = _randomTerrain ? -1 : _wallTexture; - mapgenSettings.trees = _placeTrees; + SharedMouseUp(widgetIndex); - mapgenSettings.simplex_low = util_rand() % 4; - mapgenSettings.simplex_high = 12 + (util_rand() % (32 - 12)); - mapgenSettings.simplex_base_freq = 1.75f; - mapgenSettings.simplex_octaves = 6; + MapGenSettings mapgenSettings; - MapGenGenerate(&mapgenSettings); - gfx_invalidate_screen(); - break; - case WIDX_RANDOM_TERRAIN: - _randomTerrain = !_randomTerrain; - break; - case WIDX_RANDOM_PLACE_TREES: - _placeTrees ^= 1; - break; - } -} + switch (widgetIndex) + { + case WIDX_RANDOM_GENERATE: + mapgenSettings.mapSize = _mapSize; + mapgenSettings.height = _baseHeight + 2; + mapgenSettings.water_level = _waterLevel + 2; + mapgenSettings.floor = _randomTerrain ? -1 : _floorTexture; + mapgenSettings.wall = _randomTerrain ? -1 : _wallTexture; + mapgenSettings.trees = _placeTrees; -static void WindowMapgenRandomMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) -{ -} + mapgenSettings.simplex_low = UtilRand() % 4; + mapgenSettings.simplex_high = 12 + (UtilRand() % (32 - 12)); + mapgenSettings.simplex_base_freq = 1.75f; + mapgenSettings.simplex_octaves = 6; -static void WindowMapgenRandomUpdate(rct_window* w) -{ - // Tab animation - if (++w->frame_no >= TabAnimationLoops[w->page]) - w->frame_no = 0; - widget_invalidate(*w, WIDX_TAB_2); -} - -static void WindowMapgenRandomInvalidate(rct_window* w) -{ - if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_RANDOM]) - { - w->widgets = PageWidgets[WINDOW_MAPGEN_PAGE_RANDOM]; - WindowInitScrollWidgets(*w); + MapGenGenerate(&mapgenSettings); + GfxInvalidateScreen(); + break; + case WIDX_RANDOM_TERRAIN: + _randomTerrain = !_randomTerrain; + break; + case WIDX_RANDOM_PLACE_TREES: + _placeTrees ^= 1; + break; + } } - w->pressed_widgets = 0; - if (_randomTerrain) - w->pressed_widgets |= 1uLL << WIDX_RANDOM_TERRAIN; - if (_placeTrees) - w->pressed_widgets |= 1uLL << WIDX_RANDOM_PLACE_TREES; + void RandomUpdate() + { + // Tab animation + if (++frame_no >= TabAnimationLoops[page]) + frame_no = 0; + InvalidateWidget(WIDX_TAB_2); + } - WindowMapgenSetPressedTab(w); -} + void RandomPrepareDraw() + { + if (widgets != PageWidgets[WINDOW_MAPGEN_PAGE_RANDOM]) + { + widgets = PageWidgets[WINDOW_MAPGEN_PAGE_RANDOM]; + InitScrollWidgets(); + } -static void WindowMapgenRandomPaint(rct_window* w, rct_drawpixelinfo* dpi) -{ - WindowDrawWidgets(*w, dpi); - WindowMapgenDrawTabImages(dpi, w); -} + pressed_widgets = 0; + if (_randomTerrain) + pressed_widgets |= 1uLL << WIDX_RANDOM_TERRAIN; + if (_placeTrees) + pressed_widgets |= 1uLL << WIDX_RANDOM_PLACE_TREES; + + SetPressedTab(); + } + + void RandomDraw(DrawPixelInfo& dpi) + { + DrawWidgets(dpi); + DrawTabImages(dpi); + } #pragma endregion #pragma region Simplex page -static void WindowMapgenSimplexMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - WindowMapgenSharedMouseup(w, widgetIndex); - - mapgen_settings mapgenSettings; - - switch (widgetIndex) + void SimplexMouseUp(WidgetIndex widgetIndex) { - case WIDX_SIMPLEX_MAP_SIZE_Y: - _resizeDirection = ResizeDirection::Y; - WindowMapgenInputMapSize(w, WIDX_SIMPLEX_MAP_SIZE_Y, _mapSize.y); - break; - case WIDX_SIMPLEX_MAP_SIZE_X: - _resizeDirection = ResizeDirection::X; - WindowMapgenInputMapSize(w, WIDX_SIMPLEX_MAP_SIZE_X, _mapSize.x); - break; - case WIDX_SIMPLEX_MAP_SIZE_LINK: - _mapWidthAndHeightLinked = !_mapWidthAndHeightLinked; - break; - case WIDX_SIMPLEX_GENERATE: - mapgenSettings.mapSize = _mapSize; + SharedMouseUp(widgetIndex); - mapgenSettings.height = _baseHeight; - mapgenSettings.water_level = _waterLevel + MINIMUM_WATER_HEIGHT; - mapgenSettings.floor = _randomTerrain ? -1 : _floorTexture; - mapgenSettings.wall = _randomTerrain ? -1 : _wallTexture; - mapgenSettings.trees = _placeTrees; + MapGenSettings mapgenSettings; - mapgenSettings.simplex_low = _simplex_low; - mapgenSettings.simplex_high = _simplex_high; - mapgenSettings.simplex_base_freq = (static_cast(_simplex_base_freq)) / 100.00f; - mapgenSettings.simplex_octaves = _simplex_octaves; + switch (widgetIndex) + { + case WIDX_SIMPLEX_MAP_SIZE_Y: + _resizeDirection = ResizeDirection::Y; + InputMapSize(WIDX_SIMPLEX_MAP_SIZE_Y, _mapSize.y); + break; + case WIDX_SIMPLEX_MAP_SIZE_X: + _resizeDirection = ResizeDirection::X; + InputMapSize(WIDX_SIMPLEX_MAP_SIZE_X, _mapSize.x); + break; + case WIDX_SIMPLEX_MAP_SIZE_LINK: + _mapWidthAndHeightLinked = !_mapWidthAndHeightLinked; + break; + case WIDX_SIMPLEX_GENERATE: + mapgenSettings.mapSize = _mapSize; - MapGenGenerate(&mapgenSettings); - gfx_invalidate_screen(); - break; - } -} + mapgenSettings.height = _baseHeight; + mapgenSettings.water_level = _waterLevel + MINIMUM_WATER_HEIGHT; + mapgenSettings.floor = _randomTerrain ? -1 : _floorTexture; + mapgenSettings.wall = _randomTerrain ? -1 : _wallTexture; + mapgenSettings.trees = _placeTrees; -static void WindowMapgenSimplexMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) -{ - switch (widgetIndex) - { - case WIDX_SIMPLEX_LOW_UP: - _simplex_low = std::min(_simplex_low + 1, 24); - w->Invalidate(); - break; - case WIDX_SIMPLEX_LOW_DOWN: - _simplex_low = std::max(_simplex_low - 1, 0); - w->Invalidate(); - break; - case WIDX_SIMPLEX_HIGH_UP: - _simplex_high = std::min(_simplex_high + 1, 36); - w->Invalidate(); - break; - case WIDX_SIMPLEX_HIGH_DOWN: - _simplex_high = std::max(_simplex_high - 1, 0); - w->Invalidate(); - break; - case WIDX_SIMPLEX_BASE_FREQ_UP: - _simplex_base_freq = std::min(_simplex_base_freq + 5, 1000); - w->Invalidate(); - break; - case WIDX_SIMPLEX_BASE_FREQ_DOWN: - _simplex_base_freq = std::max(_simplex_base_freq - 5, 0); - w->Invalidate(); - break; - case WIDX_SIMPLEX_OCTAVES_UP: - _simplex_octaves = std::min(_simplex_octaves + 1, 10); - w->Invalidate(); - break; - case WIDX_SIMPLEX_OCTAVES_DOWN: - _simplex_octaves = std::max(_simplex_octaves - 1, 1); - w->Invalidate(); - break; - case WIDX_SIMPLEX_MAP_SIZE_Y_UP: - _resizeDirection = ResizeDirection::Y; - WindowMapgenChangeMapSize(+1); - w->Invalidate(); - break; - case WIDX_SIMPLEX_MAP_SIZE_Y_DOWN: - _resizeDirection = ResizeDirection::Y; - WindowMapgenChangeMapSize(-1); - w->Invalidate(); - break; - case WIDX_SIMPLEX_MAP_SIZE_X_UP: - _resizeDirection = ResizeDirection::X; - WindowMapgenChangeMapSize(+1); - w->Invalidate(); - break; - case WIDX_SIMPLEX_MAP_SIZE_X_DOWN: - _resizeDirection = ResizeDirection::X; - WindowMapgenChangeMapSize(-1); - w->Invalidate(); - break; - case WIDX_SIMPLEX_WATER_LEVEL_UP: - _waterLevel = std::min(_waterLevel + MINIMUM_WATER_HEIGHT, MINIMUM_WATER_HEIGHT + MAXIMUM_WATER_HEIGHT); - w->Invalidate(); - break; - case WIDX_SIMPLEX_WATER_LEVEL_DOWN: - _waterLevel = std::max(_waterLevel - MINIMUM_WATER_HEIGHT, 0); - w->Invalidate(); - break; - case WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX: - _randomTerrain = !_randomTerrain; - w->Invalidate(); - break; - case WIDX_SIMPLEX_FLOOR_TEXTURE: - LandTool::ShowSurfaceStyleDropdown(w, widget, _floorTexture); - break; - case WIDX_SIMPLEX_WALL_TEXTURE: - LandTool::ShowEdgeStyleDropdown(w, widget, _wallTexture); - break; - case WIDX_SIMPLEX_PLACE_TREES_CHECKBOX: - _placeTrees ^= 1; - w->Invalidate(); - break; - } -} + mapgenSettings.simplex_low = _simplex_low; + mapgenSettings.simplex_high = _simplex_high; + mapgenSettings.simplex_base_freq = (static_cast(_simplex_base_freq)) / 100.00f; + mapgenSettings.simplex_octaves = _simplex_octaves; -static void WindowMapgenSimplexDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) -{ - int32_t type; - - switch (widgetIndex) - { - case WIDX_SIMPLEX_FLOOR_TEXTURE: - if (dropdownIndex == -1) - dropdownIndex = gDropdownHighlightedIndex; - - type = (dropdownIndex == -1) ? _floorTexture : dropdownIndex; - - if (gLandToolTerrainSurface == type) - { - gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; - } - else - { - gLandToolTerrainSurface = type; - _floorTexture = type; - } - w->Invalidate(); - break; - case WIDX_SIMPLEX_WALL_TEXTURE: - if (dropdownIndex == -1) - dropdownIndex = gDropdownHighlightedIndex; - - type = (dropdownIndex == -1) ? _wallTexture : dropdownIndex; - - if (gLandToolTerrainEdge == type) - { - gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; - } - else - { - gLandToolTerrainEdge = type; - _wallTexture = type; - } - w->Invalidate(); - break; - } -} - -static void WindowMapgenSimplexUpdate(rct_window* w) -{ - // Tab animation - if (++w->frame_no >= TabAnimationLoops[w->page]) - w->frame_no = 0; - widget_invalidate(*w, WIDX_TAB_3); -} - -static void WindowMapgenSimplexInvalidate(rct_window* w) -{ - if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_SIMPLEX]) - { - w->widgets = PageWidgets[WINDOW_MAPGEN_PAGE_SIMPLEX]; - WindowInitScrollWidgets(*w); + MapGenGenerate(&mapgenSettings); + GfxInvalidateScreen(); + break; + } } - // Only allow linking the map size when X and Y are the same - WidgetSetPressed(*w, WIDX_SIMPLEX_MAP_SIZE_LINK, _mapWidthAndHeightLinked); - WidgetSetDisabled(*w, WIDX_SIMPLEX_MAP_SIZE_LINK, _mapSize.x != _mapSize.y); - - WidgetSetCheckboxValue(*w, WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX, _randomTerrain != 0); - WidgetSetCheckboxValue(*w, WIDX_SIMPLEX_PLACE_TREES_CHECKBOX, _placeTrees != 0); - - // Only allow floor and wall texture options if random terrain is disabled - if (!_randomTerrain) + void SimplexMouseDown(WidgetIndex widgetIndex, Widget* widget) { - WidgetSetEnabled(*w, WIDX_SIMPLEX_FLOOR_TEXTURE, true); - WidgetSetEnabled(*w, WIDX_SIMPLEX_WALL_TEXTURE, true); - } - else - { - WidgetSetEnabled(*w, WIDX_SIMPLEX_FLOOR_TEXTURE, false); - WidgetSetEnabled(*w, WIDX_SIMPLEX_WALL_TEXTURE, false); + switch (widgetIndex) + { + case WIDX_SIMPLEX_LOW_UP: + _simplex_low = std::min(_simplex_low + 1, 24); + Invalidate(); + break; + case WIDX_SIMPLEX_LOW_DOWN: + _simplex_low = std::max(_simplex_low - 1, 0); + Invalidate(); + break; + case WIDX_SIMPLEX_HIGH_UP: + _simplex_high = std::min(_simplex_high + 1, 36); + Invalidate(); + break; + case WIDX_SIMPLEX_HIGH_DOWN: + _simplex_high = std::max(_simplex_high - 1, 0); + Invalidate(); + break; + case WIDX_SIMPLEX_BASE_FREQ_UP: + _simplex_base_freq = std::min(_simplex_base_freq + 5, 1000); + Invalidate(); + break; + case WIDX_SIMPLEX_BASE_FREQ_DOWN: + _simplex_base_freq = std::max(_simplex_base_freq - 5, 0); + Invalidate(); + break; + case WIDX_SIMPLEX_OCTAVES_UP: + _simplex_octaves = std::min(_simplex_octaves + 1, 10); + Invalidate(); + break; + case WIDX_SIMPLEX_OCTAVES_DOWN: + _simplex_octaves = std::max(_simplex_octaves - 1, 1); + Invalidate(); + break; + case WIDX_SIMPLEX_MAP_SIZE_Y_UP: + _resizeDirection = ResizeDirection::Y; + ChangeMapSize(+1); + Invalidate(); + break; + case WIDX_SIMPLEX_MAP_SIZE_Y_DOWN: + _resizeDirection = ResizeDirection::Y; + ChangeMapSize(-1); + Invalidate(); + break; + case WIDX_SIMPLEX_MAP_SIZE_X_UP: + _resizeDirection = ResizeDirection::X; + ChangeMapSize(+1); + Invalidate(); + break; + case WIDX_SIMPLEX_MAP_SIZE_X_DOWN: + _resizeDirection = ResizeDirection::X; + ChangeMapSize(-1); + Invalidate(); + break; + case WIDX_SIMPLEX_WATER_LEVEL_UP: + _waterLevel = std::min(_waterLevel + MINIMUM_WATER_HEIGHT, MINIMUM_WATER_HEIGHT + MAXIMUM_WATER_HEIGHT); + Invalidate(); + break; + case WIDX_SIMPLEX_WATER_LEVEL_DOWN: + _waterLevel = std::max(_waterLevel - MINIMUM_WATER_HEIGHT, 0); + Invalidate(); + break; + case WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX: + _randomTerrain = !_randomTerrain; + Invalidate(); + break; + case WIDX_SIMPLEX_FLOOR_TEXTURE: + LandTool::ShowSurfaceStyleDropdown(this, widget, _floorTexture); + break; + case WIDX_SIMPLEX_WALL_TEXTURE: + LandTool::ShowEdgeStyleDropdown(this, widget, _wallTexture); + break; + case WIDX_SIMPLEX_PLACE_TREES_CHECKBOX: + _placeTrees ^= 1; + Invalidate(); + break; + } } - WindowMapgenSetPressedTab(w); + void SimplexDropdown(WidgetIndex widgetIndex, int32_t dropdownIndex) + { + int32_t type; - // Push width (Y) and height (X) to the common formatter arguments for the map size spinners to use - auto ft = Formatter::Common(); - ft.Add(_mapSize.y - 2); - ft.Add(_mapSize.x - 2); -} + switch (widgetIndex) + { + case WIDX_SIMPLEX_FLOOR_TEXTURE: + if (dropdownIndex == -1) + dropdownIndex = gDropdownHighlightedIndex; -static void WindowMapgenSimplexPaint(rct_window* w, rct_drawpixelinfo* dpi) -{ - WindowDrawWidgets(*w, dpi); - WindowMapgenDrawTabImages(dpi, w); - WindowMapgenDrawDropdownButtons(w, dpi, WIDX_SIMPLEX_FLOOR_TEXTURE, WIDX_SIMPLEX_WALL_TEXTURE); + type = (dropdownIndex == -1) ? _floorTexture : dropdownIndex; - const uint8_t textColour = w->colours[1]; + if (gLandToolTerrainSurface == type) + { + gLandToolTerrainSurface = OBJECT_ENTRY_INDEX_NULL; + } + else + { + gLandToolTerrainSurface = type; + _floorTexture = type; + } + Invalidate(); + break; + case WIDX_SIMPLEX_WALL_TEXTURE: + if (dropdownIndex == -1) + dropdownIndex = gDropdownHighlightedIndex; - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_LOW].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_LOW_, {}, - { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_HIGH].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_HIGH, {}, - { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1 }, - STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY, {}, { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_OCTAVES].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_OCTAVES, {}, - { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_MAP_SIZE_Y].top + 1 }, STR_MAP_SIZE, {}, { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, - { textColour }); + type = (dropdownIndex == -1) ? _wallTexture : dropdownIndex; - auto ft = Formatter(); - ft.Add(_simplex_low); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_SIMPLEX_LOW].left + 1, w->widgets[WIDX_SIMPLEX_LOW].top + 1 }, - STR_COMMA16, ft, { textColour }); - ft = Formatter(); - ft.Add(_simplex_high); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_SIMPLEX_HIGH].left + 1, w->widgets[WIDX_SIMPLEX_HIGH].top + 1 }, - STR_COMMA16, ft, { textColour }); - ft = Formatter(); - ft.Add(_simplex_base_freq); - DrawTextBasic( - dpi, - w->windowPos - + ScreenCoordsXY{ w->widgets[WIDX_SIMPLEX_BASE_FREQ].left + 1, w->widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1 }, - STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { textColour }); - ft = Formatter(); - ft.Add(_simplex_octaves); - DrawTextBasic( - dpi, - w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_SIMPLEX_OCTAVES].left + 1, w->widgets[WIDX_SIMPLEX_OCTAVES].top + 1 }, - STR_COMMA16, ft, { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX].top + 1 }, STR_TERRAIN_LABEL, - {}, { textColour }); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_SIMPLEX_PLACE_TREES_CHECKBOX].top + 1 }, - STR_MAPGEN_OPTION_PLACE_TREES, {}, { textColour }); + if (gLandToolTerrainEdge == type) + { + gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; + } + else + { + gLandToolTerrainEdge = type; + _wallTexture = type; + } + Invalidate(); + break; + } + } - ft = Formatter(); - ft.Add((_waterLevel - 12) / 2); - DrawTextBasic( - dpi, - w->windowPos - + ScreenCoordsXY{ w->widgets[WIDX_SIMPLEX_WATER_LEVEL].left + 1, w->widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1 }, - STR_COMMA16, ft, { textColour }); -} + void SimplexUpdate() + { + // Tab animation + if (++frame_no >= TabAnimationLoops[page]) + frame_no = 0; + InvalidateWidget(WIDX_TAB_3); + } + + void SimplexPrepareDraw() + { + if (widgets != PageWidgets[WINDOW_MAPGEN_PAGE_SIMPLEX]) + { + widgets = PageWidgets[WINDOW_MAPGEN_PAGE_SIMPLEX]; + InitScrollWidgets(); + } + + // Only allow linking the map size when X and Y are the same + SetWidgetPressed(WIDX_SIMPLEX_MAP_SIZE_LINK, _mapWidthAndHeightLinked); + SetWidgetDisabled(WIDX_SIMPLEX_MAP_SIZE_LINK, _mapSize.x != _mapSize.y); + + SetCheckboxValue(WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX, _randomTerrain != 0); + SetCheckboxValue(WIDX_SIMPLEX_PLACE_TREES_CHECKBOX, _placeTrees != 0); + + // Only allow floor and wall texture options if random terrain is disabled + if (!_randomTerrain) + { + SetWidgetEnabled(WIDX_SIMPLEX_FLOOR_TEXTURE, true); + SetWidgetEnabled(WIDX_SIMPLEX_WALL_TEXTURE, true); + } + else + { + SetWidgetEnabled(WIDX_SIMPLEX_FLOOR_TEXTURE, false); + SetWidgetEnabled(WIDX_SIMPLEX_WALL_TEXTURE, false); + } + + SetPressedTab(); + + // Push width (Y) and height (X) to the common formatter arguments for the map size spinners to use + auto ft = Formatter::Common(); + ft.Add(_mapSize.y - 2); + ft.Add(_mapSize.x - 2); + } + + void SimplexDraw(DrawPixelInfo& dpi) + { + DrawWidgets(dpi); + DrawTabImages(dpi); + DrawDropdownButtons(dpi, WIDX_SIMPLEX_FLOOR_TEXTURE, WIDX_SIMPLEX_WALL_TEXTURE); + + const uint8_t textColour = colours[1]; + + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_LOW].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_LOW_, {}, + { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_HIGH].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_HIGH, {}, + { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1 }, + STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY, {}, { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_OCTAVES].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_OCTAVES, {}, + { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_MAP_SIZE_Y].top + 1 }, STR_MAP_SIZE, {}, { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, + { textColour }); + + auto ft = Formatter(); + ft.Add(_simplex_low); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_LOW].left + 1, widgets[WIDX_SIMPLEX_LOW].top + 1 }, + STR_COMMA16, ft, { textColour }); + ft = Formatter(); + ft.Add(_simplex_high); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_HIGH].left + 1, widgets[WIDX_SIMPLEX_HIGH].top + 1 }, + STR_COMMA16, ft, { textColour }); + ft = Formatter(); + ft.Add(_simplex_base_freq); + DrawTextBasic( + dpi, + windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_BASE_FREQ].left + 1, widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1 }, + STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { textColour }); + ft = Formatter(); + ft.Add(_simplex_octaves); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_OCTAVES].left + 1, widgets[WIDX_SIMPLEX_OCTAVES].top + 1 }, + STR_COMMA16, ft, { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_RANDOM_TERRAIN_CHECKBOX].top + 1 }, STR_TERRAIN_LABEL, {}, + { textColour }); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_SIMPLEX_PLACE_TREES_CHECKBOX].top + 1 }, + STR_MAPGEN_OPTION_PLACE_TREES, {}, { textColour }); + + ft = Formatter(); + ft.Add((_waterLevel - 12) / 2); + DrawTextBasic( + dpi, + windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_WATER_LEVEL].left + 1, widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1 }, + STR_COMMA16, ft, { textColour }); + } #pragma endregion #pragma region Heightmap page -static void WindowMapgenHeightmapMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) -{ - switch (widgetIndex) + void HeightmapMouseDown(WidgetIndex widgetIndex, Widget* widget) { - case WIDX_HEIGHTMAP_STRENGTH_UP: - _heightmapSmoothStrength = std::min(_heightmapSmoothStrength + 1, MAX_SMOOTH_ITERATIONS); - widget_invalidate(*w, WIDX_HEIGHTMAP_STRENGTH); - break; - case WIDX_HEIGHTMAP_STRENGTH_DOWN: - _heightmapSmoothStrength = std::max(_heightmapSmoothStrength - 1, 1); - widget_invalidate(*w, WIDX_HEIGHTMAP_STRENGTH); - break; - case WIDX_HEIGHTMAP_LOW_UP: - _heightmapLow = std::min(_heightmapLow + 1, 142 - 1); - _heightmapHigh = std::max(_heightmapHigh, _heightmapLow + 1); - widget_invalidate(*w, WIDX_HEIGHTMAP_LOW); - break; - case WIDX_HEIGHTMAP_LOW_DOWN: - _heightmapLow = std::max(_heightmapLow - 1, 2); - widget_invalidate(*w, WIDX_HEIGHTMAP_LOW); - break; - case WIDX_HEIGHTMAP_HIGH_UP: - _heightmapHigh = std::min(_heightmapHigh + 1, 142); - widget_invalidate(*w, WIDX_HEIGHTMAP_HIGH); - break; - case WIDX_HEIGHTMAP_HIGH_DOWN: - _heightmapHigh = std::max(_heightmapHigh - 1, 2 + 1); - _heightmapLow = std::min(_heightmapLow, _heightmapHigh - 1); - widget_invalidate(*w, WIDX_HEIGHTMAP_HIGH); - break; - case WIDX_HEIGHTMAP_WATER_LEVEL_UP: - _waterLevel = std::min(_waterLevel + MINIMUM_WATER_HEIGHT, MINIMUM_WATER_HEIGHT + MAXIMUM_WATER_HEIGHT); - widget_invalidate(*w, WIDX_HEIGHTMAP_WATER_LEVEL); - break; - case WIDX_HEIGHTMAP_WATER_LEVEL_DOWN: - _waterLevel = std::max(_waterLevel - MINIMUM_WATER_HEIGHT, 0); - widget_invalidate(*w, WIDX_HEIGHTMAP_WATER_LEVEL); - break; - } -} - -static void WindowMapgenHeightmapGenerateMap() -{ - mapgen_settings mapgenSettings; - mapgenSettings.water_level = _waterLevel; - mapgenSettings.smooth = _heightmapSmoothTiles; - mapgenSettings.smooth_height_map = _heightmapSmoothMap; - mapgenSettings.smooth_strength = _heightmapSmoothStrength; - mapgenSettings.normalize_height = _heightmapNormalize; - mapgenSettings.simplex_low = _heightmapLow; - mapgenSettings.simplex_high = _heightmapHigh; - MapGenGenerateFromHeightmap(&mapgenSettings); - gfx_invalidate_screen(); -} - -static void WindowMapgenHeightmapLoadsaveCallback(int32_t result, const utf8* path) -{ - if (result == MODAL_RESULT_OK) - { - if (!MapGenLoadHeightmap(path)) + switch (widgetIndex) { - // TODO: Display error popup - return; + case WIDX_HEIGHTMAP_STRENGTH_UP: + _heightmapSmoothStrength = std::min(_heightmapSmoothStrength + 1, MAX_SMOOTH_ITERATIONS); + InvalidateWidget(WIDX_HEIGHTMAP_STRENGTH); + break; + case WIDX_HEIGHTMAP_STRENGTH_DOWN: + _heightmapSmoothStrength = std::max(_heightmapSmoothStrength - 1, 1); + InvalidateWidget(WIDX_HEIGHTMAP_STRENGTH); + break; + case WIDX_HEIGHTMAP_LOW_UP: + _heightmapLow = std::min(_heightmapLow + 1, 142 - 1); + _heightmapHigh = std::max(_heightmapHigh, _heightmapLow + 1); + InvalidateWidget(WIDX_HEIGHTMAP_LOW); + break; + case WIDX_HEIGHTMAP_LOW_DOWN: + _heightmapLow = std::max(_heightmapLow - 1, 2); + InvalidateWidget(WIDX_HEIGHTMAP_LOW); + break; + case WIDX_HEIGHTMAP_HIGH_UP: + _heightmapHigh = std::min(_heightmapHigh + 1, 142); + InvalidateWidget(WIDX_HEIGHTMAP_HIGH); + break; + case WIDX_HEIGHTMAP_HIGH_DOWN: + _heightmapHigh = std::max(_heightmapHigh - 1, 2 + 1); + _heightmapLow = std::min(_heightmapLow, _heightmapHigh - 1); + InvalidateWidget(WIDX_HEIGHTMAP_HIGH); + break; + case WIDX_HEIGHTMAP_WATER_LEVEL_UP: + _waterLevel = std::min(_waterLevel + MINIMUM_WATER_HEIGHT, MINIMUM_WATER_HEIGHT + MAXIMUM_WATER_HEIGHT); + InvalidateWidget(WIDX_HEIGHTMAP_WATER_LEVEL); + break; + case WIDX_HEIGHTMAP_WATER_LEVEL_DOWN: + _waterLevel = std::max(_waterLevel - MINIMUM_WATER_HEIGHT, 0); + InvalidateWidget(WIDX_HEIGHTMAP_WATER_LEVEL); + break; + } + } + + void HeightmapGenerateMap() + { + MapGenSettings mapgenSettings; + mapgenSettings.water_level = _waterLevel; + mapgenSettings.smooth = _heightmapSmoothTiles; + mapgenSettings.smooth_height_map = _heightmapSmoothMap; + mapgenSettings.smooth_strength = _heightmapSmoothStrength; + mapgenSettings.normalize_height = _heightmapNormalize; + mapgenSettings.simplex_low = _heightmapLow; + mapgenSettings.simplex_high = _heightmapHigh; + MapGenGenerateFromHeightmap(&mapgenSettings); + GfxInvalidateScreen(); + } + + void HeightmapMouseUp(WidgetIndex widgetIndex) + { + SharedMouseUp(widgetIndex); + + switch (widgetIndex) + { + case WIDX_CLOSE: + case WIDX_TAB_1: + case WIDX_TAB_2: + case WIDX_TAB_3: + case WIDX_TAB_4: + return; // Only widgets that change a setting need to regenerate the map + + // Page widgets + case WIDX_HEIGHTMAP_SELECT: + { + auto intent = Intent(WindowClass::Loadsave); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_HEIGHTMAP); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(HeightmapLoadsaveCallback)); + ContextOpenIntent(&intent); + return; + } + case WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP: + _heightmapSmoothMap = !_heightmapSmoothMap; + SetCheckboxValue(WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP, _heightmapSmoothMap); + SetWidgetEnabled(WIDX_HEIGHTMAP_STRENGTH, _heightmapSmoothMap); + SetWidgetEnabled(WIDX_HEIGHTMAP_STRENGTH_UP, _heightmapSmoothMap); + SetWidgetEnabled(WIDX_HEIGHTMAP_STRENGTH_DOWN, _heightmapSmoothMap); + InvalidateWidget(WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP); + InvalidateWidget(WIDX_HEIGHTMAP_STRENGTH); + break; + case WIDX_HEIGHTMAP_NORMALIZE: + _heightmapNormalize = !_heightmapNormalize; + SetCheckboxValue(WIDX_HEIGHTMAP_NORMALIZE, _heightmapNormalize); + InvalidateWidget(WIDX_HEIGHTMAP_NORMALIZE); + break; + case WIDX_HEIGHTMAP_SMOOTH_TILES: + _heightmapSmoothTiles = !_heightmapSmoothTiles; + SetCheckboxValue(WIDX_HEIGHTMAP_SMOOTH_TILES, _heightmapSmoothTiles); + InvalidateWidget(WIDX_HEIGHTMAP_SMOOTH_TILES); + break; } - // The window needs to be open while using the map - rct_window* const w = ContextOpenWindow(WindowClass::Mapgen); - _heightmapLoaded = true; - WindowMapgenSetPage(w, WINDOW_MAPGEN_PAGE_HEIGHTMAP); - - WindowMapgenHeightmapGenerateMap(); + // Always regenerate the map after one of the page widgets has been changed + HeightmapGenerateMap(); } -} -static void WindowMapgenHeightmapMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - WindowMapgenSharedMouseup(w, widgetIndex); - - switch (widgetIndex) + void HeightmapPrepareDraw() { - case WIDX_CLOSE: - case WIDX_TAB_1: - case WIDX_TAB_2: - case WIDX_TAB_3: - case WIDX_TAB_4: - return; // Only widgets that change a setting need to regenerate the map - - // Page widgets - case WIDX_HEIGHTMAP_SELECT: + if (widgets != PageWidgets[WINDOW_MAPGEN_PAGE_HEIGHTMAP]) { - auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_HEIGHTMAP); - intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(WindowMapgenHeightmapLoadsaveCallback)); - ContextOpenIntent(&intent); - return; + widgets = PageWidgets[WINDOW_MAPGEN_PAGE_HEIGHTMAP]; + InitScrollWidgets(); } - case WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP: - _heightmapSmoothMap = !_heightmapSmoothMap; - WidgetSetCheckboxValue(*w, WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP, _heightmapSmoothMap); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_STRENGTH, _heightmapSmoothMap); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_STRENGTH_UP, _heightmapSmoothMap); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_STRENGTH_DOWN, _heightmapSmoothMap); - widget_invalidate(*w, WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP); - widget_invalidate(*w, WIDX_HEIGHTMAP_STRENGTH); - break; - case WIDX_HEIGHTMAP_NORMALIZE: - _heightmapNormalize = !_heightmapNormalize; - WidgetSetCheckboxValue(*w, WIDX_HEIGHTMAP_NORMALIZE, _heightmapNormalize); - widget_invalidate(*w, WIDX_HEIGHTMAP_NORMALIZE); - break; - case WIDX_HEIGHTMAP_SMOOTH_TILES: - _heightmapSmoothTiles = !_heightmapSmoothTiles; - WidgetSetCheckboxValue(*w, WIDX_HEIGHTMAP_SMOOTH_TILES, _heightmapSmoothTiles); - widget_invalidate(*w, WIDX_HEIGHTMAP_SMOOTH_TILES); - break; + + SetCheckboxValue(WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP, _heightmapSmoothMap); + SetCheckboxValue(WIDX_HEIGHTMAP_NORMALIZE, _heightmapNormalize); + SetCheckboxValue(WIDX_HEIGHTMAP_SMOOTH_TILES, _heightmapSmoothTiles); + + SetPressedTab(); } - // Always regenerate the map after one of the page widgets has been changed - WindowMapgenHeightmapGenerateMap(); -} - -static void WindowMapgenHeightmapInvalidate(rct_window* w) -{ - if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_HEIGHTMAP]) + void HeightmapDraw(DrawPixelInfo& dpi) { - w->widgets = PageWidgets[WINDOW_MAPGEN_PAGE_HEIGHTMAP]; - WindowInitScrollWidgets(*w); + DrawWidgets(dpi); + DrawTabImages(dpi); + + const colour_t enabledColour = colours[1]; + const colour_t disabledColour = enabledColour | COLOUR_FLAG_INSET; + + // Smooth strength label and value + const colour_t strengthColour = _heightmapSmoothMap ? enabledColour : disabledColour; + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }, STR_MAPGEN_SMOOTH_STRENGTH, {}, + { strengthColour }); + + auto ft = Formatter(); + ft.Add(_heightmapSmoothStrength); + DrawTextBasic( + dpi, + windowPos + ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_STRENGTH].left + 1, widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }, + STR_COMMA16, ft, { strengthColour }); + + // Low label and value + const colour_t labelColour = _heightmapLoaded ? enabledColour : disabledColour; + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_LOW_, {}, + { labelColour }); + + ft = Formatter(); + ft.Add(_heightmapLow); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_LOW].left + 1, widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, + STR_COMMA16, ft, { labelColour }); + + // High label and value + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_HEIGHTMAP_HIGH].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_HIGH, {}, + { labelColour }); + + ft = Formatter(); + ft.Add(_heightmapHigh); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_HIGH].left + 1, widgets[WIDX_HEIGHTMAP_HIGH].top + 1 }, + STR_COMMA16, ft, { labelColour }); + + // Water level label and value + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 5, widgets[WIDX_HEIGHTMAP_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, + { labelColour }); + + ft = Formatter(); + ft.Add(_waterLevel); + DrawTextBasic( + dpi, + windowPos + + ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_WATER_LEVEL].left + 1, widgets[WIDX_HEIGHTMAP_WATER_LEVEL].top + 1 }, + STR_COMMA16, ft, { labelColour }); } - WidgetSetCheckboxValue(*w, WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP, _heightmapSmoothMap); - WidgetSetCheckboxValue(*w, WIDX_HEIGHTMAP_NORMALIZE, _heightmapNormalize); - WidgetSetCheckboxValue(*w, WIDX_HEIGHTMAP_SMOOTH_TILES, _heightmapSmoothTiles); - - WindowMapgenSetPressedTab(w); -} - -static void WindowMapgenHeightmapPaint(rct_window* w, rct_drawpixelinfo* dpi) -{ - WindowDrawWidgets(*w, dpi); - WindowMapgenDrawTabImages(dpi, w); - - const colour_t enabledColour = w->colours[1]; - const colour_t disabledColour = enabledColour | COLOUR_FLAG_INSET; - - // Smooth strength label and value - const colour_t strengthColour = _heightmapSmoothMap ? enabledColour : disabledColour; - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }, STR_MAPGEN_SMOOTH_STRENGTH, {}, - { strengthColour }); - - auto ft = Formatter(); - ft.Add(_heightmapSmoothStrength); - DrawTextBasic( - dpi, - w->windowPos - + ScreenCoordsXY{ w->widgets[WIDX_HEIGHTMAP_STRENGTH].left + 1, w->widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }, - STR_COMMA16, ft, { strengthColour }); - - // Low label and value - const colour_t labelColour = _heightmapLoaded ? enabledColour : disabledColour; - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_LOW_, {}, - { labelColour }); - - ft = Formatter(); - ft.Add(_heightmapLow); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_HEIGHTMAP_LOW].left + 1, w->widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, - STR_COMMA16, ft, { labelColour }); - - // High label and value - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_HEIGHTMAP_HIGH].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_HIGH, {}, - { labelColour }); - - ft = Formatter(); - ft.Add(_heightmapHigh); - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_HEIGHTMAP_HIGH].left + 1, w->widgets[WIDX_HEIGHTMAP_HIGH].top + 1 }, - STR_COMMA16, ft, { labelColour }); - - // Water level label and value - DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 5, w->widgets[WIDX_HEIGHTMAP_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, - { labelColour }); - - ft = Formatter(); - ft.Add(_waterLevel); - DrawTextBasic( - dpi, - w->windowPos - + ScreenCoordsXY{ w->widgets[WIDX_HEIGHTMAP_WATER_LEVEL].left + 1, w->widgets[WIDX_HEIGHTMAP_WATER_LEVEL].top + 1 }, - STR_COMMA16, ft, { labelColour }); -} - #pragma endregion -#pragma region Common - -static void WindowMapgenSetPage(rct_window* w, int32_t page) -{ - w->page = page; - w->frame_no = 0; - w->RemoveViewport(); - - w->hold_down_widgets = HoldDownWidgets[page]; - w->event_handlers = PageEvents[page]; - w->widgets = PageWidgets[page]; - w->disabled_widgets = PageDisabledWidgets[page]; - w->pressed_widgets = PressedWidgets[page]; - - // Enable heightmap widgets if one is loaded - if (page == WINDOW_MAPGEN_PAGE_HEIGHTMAP && _heightmapLoaded) +public: + void OnOpen() override { - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_SMOOTH_HEIGHTMAP, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_STRENGTH, _heightmapSmoothMap); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_STRENGTH_UP, _heightmapSmoothMap); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_STRENGTH_DOWN, _heightmapSmoothMap); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_NORMALIZE, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_SMOOTH_TILES, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_HIGH, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_HIGH_UP, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_HIGH_DOWN, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_LOW, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_LOW_UP, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_LOW_DOWN, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_WATER_LEVEL, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_WATER_LEVEL_UP, true); - WidgetSetEnabled(*w, WIDX_HEIGHTMAP_WATER_LEVEL_DOWN, true); + number = 0; + frame_no = 0; + + page = WINDOW_MAPGEN_PAGE_BASE; + Invalidate(); + widgets = PageWidgets[WINDOW_MAPGEN_PAGE_BASE]; + hold_down_widgets = HoldDownWidgets[WINDOW_MAPGEN_PAGE_BASE]; + pressed_widgets = PressedWidgets[WINDOW_MAPGEN_PAGE_BASE]; + disabled_widgets = PageDisabledWidgets[WINDOW_MAPGEN_PAGE_BASE]; + InitScrollWidgets(); + + _heightmapLoaded = false; } - WindowInitScrollWidgets(*w); - w->Invalidate(); -} - -static void WindowMapgenSetPressedTab(rct_window* w) -{ - int32_t i; - for (i = 0; i < WINDOW_MAPGEN_PAGE_COUNT; i++) - w->pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); - w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); -} - -static void WindowMapgenDrawTabImage(rct_drawpixelinfo* dpi, rct_window* w, int32_t page, int32_t spriteIndex) -{ - WidgetIndex widgetIndex = WIDX_TAB_1 + page; - - if (!WidgetIsDisabled(*w, widgetIndex)) + void OnClose() override { - if (w->page == page) + MapGenUnloadHeightmap(); + } + + void OnMouseUp(WidgetIndex widgetIndex) override + { + switch (page) { - int32_t frame = w->frame_no / TabAnimationDivisor[w->page]; - spriteIndex += (frame % TabAnimationFrames[w->page]); + case WINDOW_MAPGEN_PAGE_BASE: + return BaseMouseUp(widgetIndex); + case WINDOW_MAPGEN_PAGE_RANDOM: + return RandomMouseUp(widgetIndex); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return SimplexMouseUp(widgetIndex); + case WINDOW_MAPGEN_PAGE_HEIGHTMAP: + return HeightmapMouseUp(widgetIndex); } - - gfx_draw_sprite( - dpi, ImageId(spriteIndex), - w->windowPos + ScreenCoordsXY{ w->widgets[widgetIndex].left, w->widgets[widgetIndex].top }); } -} -static void WindowMapgenDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w) + void OnMouseDown(WidgetIndex widgetIndex) override + { + switch (page) + { + case WINDOW_MAPGEN_PAGE_BASE: + return BaseMouseDown(widgetIndex, &widgets[widgetIndex]); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return SimplexMouseDown(widgetIndex, &widgets[widgetIndex]); + case WINDOW_MAPGEN_PAGE_HEIGHTMAP: + return HeightmapMouseDown(widgetIndex, &widgets[widgetIndex]); + } + } + + void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override + { + switch (page) + { + case WINDOW_MAPGEN_PAGE_BASE: + return BaseDropdown(widgetIndex, selectedIndex); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return SimplexDropdown(widgetIndex, selectedIndex); + } + } + + void OnUpdate() override + { + switch (page) + { + case WINDOW_MAPGEN_PAGE_BASE: + return BaseUpdate(); + case WINDOW_MAPGEN_PAGE_RANDOM: + return RandomUpdate(); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return SimplexUpdate(); + } + } + + void OnPrepareDraw() override + { + switch (page) + { + case WINDOW_MAPGEN_PAGE_BASE: + return BasePrepareDraw(); + case WINDOW_MAPGEN_PAGE_RANDOM: + return RandomPrepareDraw(); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return SimplexPrepareDraw(); + case WINDOW_MAPGEN_PAGE_HEIGHTMAP: + return HeightmapPrepareDraw(); + } + } + + void OnDraw(DrawPixelInfo& dpi) override + { + switch (page) + { + case WINDOW_MAPGEN_PAGE_BASE: + return BaseDraw(dpi); + case WINDOW_MAPGEN_PAGE_RANDOM: + return RandomDraw(dpi); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return SimplexDraw(dpi); + case WINDOW_MAPGEN_PAGE_HEIGHTMAP: + return HeightmapDraw(dpi); + } + } + + void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override + { + switch (page) + { + case WINDOW_MAPGEN_PAGE_BASE: + return TextInput(widgetIndex, text); + case WINDOW_MAPGEN_PAGE_SIMPLEX: + return TextInput(widgetIndex, text); + } + } + + void AfterLoadingHeightMap(int32_t result, const utf8* path) + { + if (result == MODAL_RESULT_OK) + { + if (!MapGenLoadHeightmap(path)) + { + // TODO: Display error popup + return; + } + + // The window needs to be open while using the map + _heightmapLoaded = true; + SetPage(WINDOW_MAPGEN_PAGE_HEIGHTMAP); + + HeightmapGenerateMap(); + } + } +}; + +WindowBase* WindowMapgenOpen() { - WindowMapgenDrawTabImage(dpi, w, WINDOW_MAPGEN_PAGE_BASE, SPR_G2_TAB_LAND); - WindowMapgenDrawTabImage(dpi, w, WINDOW_MAPGEN_PAGE_RANDOM, SPR_G2_TAB_TREE); - WindowMapgenDrawTabImage(dpi, w, WINDOW_MAPGEN_PAGE_SIMPLEX, SPR_G2_TAB_PENCIL); - WindowMapgenDrawTabImage(dpi, w, WINDOW_MAPGEN_PAGE_HEIGHTMAP, SPR_TAB_GRAPH_0); + return WindowFocusOrCreate(WindowClass::Mapgen, WW, WH, WF_10 | WF_AUTO_POSITION | WF_CENTRE_SCREEN); } -#pragma endregion +static void HeightmapLoadsaveCallback(int32_t result, const utf8* path) +{ + auto* w = static_cast(WindowMapgenOpen()); + w->AfterLoadingHeightMap(result, path); +} diff --git a/src/openrct2-ui/windows/MapTooltip.cpp b/src/openrct2-ui/windows/MapTooltip.cpp index 0fa177a0b8..c99f2e50de 100644 --- a/src/openrct2-ui/windows/MapTooltip.cpp +++ b/src/openrct2-ui/windows/MapTooltip.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,13 +18,13 @@ #include // clang-format off -static rct_widget window_map_tooltip_widgets[] = { +static Widget window_map_tooltip_widgets[] = { MakeWidget({0, 0}, {200, 30}, WindowWidgetType::ImgBtn, WindowColour::Primary), WIDGETS_END, }; -static void WindowMapTooltipUpdate(rct_window *w); -static void WindowMapTooltipPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowMapTooltipUpdate(WindowBase *w); +static void WindowMapTooltipPaint(WindowBase *w, DrawPixelInfo *dpi); static WindowEventList window_map_tooltip_events([](auto& events) { @@ -61,7 +61,7 @@ void WindowMapTooltipUpdateVisibility() if (ThemeGetFlags() & UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR) { // The map tooltip is drawn by the bottom toolbar - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::BottomToolbar); return; } @@ -71,8 +71,8 @@ void WindowMapTooltipUpdateVisibility() // Check for cursor movement _cursorHoldDuration++; - if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || (input_test_flag(INPUT_FLAG_5)) - || input_get_state() == InputState::ViewportRight) + if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || (InputTestFlag(INPUT_FLAG_5)) + || InputGetState() == InputState::ViewportRight) _cursorHoldDuration = 0; _lastCursor = cursor; @@ -84,9 +84,9 @@ void WindowMapTooltipUpdateVisibility() if (_cursorHoldDuration < 25 || stringId == STR_NONE || InputTestPlaceObjectModifier( static_cast(PLACE_OBJECT_MODIFIER_COPY_Z | PLACE_OBJECT_MODIFIER_SHIFT_Z)) - || window_find_by_class(WindowClass::Error) != nullptr) + || WindowFindByClass(WindowClass::Error) != nullptr) { - window_close_by_class(WindowClass::MapTooltip); + WindowCloseByClass(WindowClass::MapTooltip); } else { @@ -100,14 +100,14 @@ void WindowMapTooltipUpdateVisibility() */ static void WindowMapTooltipOpen() { - rct_window* w; + WindowBase* w; constexpr int32_t width = 200; constexpr int32_t height = 44; const CursorState* state = ContextGetCursorState(); ScreenCoordsXY pos = { state->position.x - (width / 2), state->position.y + 15 }; - w = window_find_by_class(WindowClass::MapTooltip); + w = WindowFindByClass(WindowClass::MapTooltip); if (w == nullptr) { w = WindowCreate( @@ -128,7 +128,7 @@ static void WindowMapTooltipOpen() * * rct2: 0x006EE8CE */ -static void WindowMapTooltipUpdate(rct_window* w) +static void WindowMapTooltipUpdate(WindowBase* w) { w->Invalidate(); } @@ -137,7 +137,7 @@ static void WindowMapTooltipUpdate(rct_window* w) * * rct2: 0x006EE894 */ -static void WindowMapTooltipPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowMapTooltipPaint(WindowBase* w, DrawPixelInfo* dpi) { StringId stringId; std::memcpy(&stringId, _mapTooltipArgs.Data(), sizeof(StringId)); @@ -147,5 +147,5 @@ static void WindowMapTooltipPaint(rct_window* w, rct_drawpixelinfo* dpi) } ScreenCoordsXY stringCoords(w->windowPos.x + (w->width / 2), w->windowPos.y + (w->height / 2)); - DrawTextWrapped(dpi, stringCoords, w->width, STR_MAP_TOOLTIP_STRINGID, _mapTooltipArgs, { TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, stringCoords, w->width, STR_MAP_TOOLTIP_STRINGID, _mapTooltipArgs, { TextAlignment::CENTRE }); } diff --git a/src/openrct2-ui/windows/MazeConstruction.cpp b/src/openrct2-ui/windows/MazeConstruction.cpp index 90883ea862..62a60810b6 100644 --- a/src/openrct2-ui/windows/MazeConstruction.cpp +++ b/src/openrct2-ui/windows/MazeConstruction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -41,23 +41,28 @@ enum { WIDX_MAZE_BUILD_MODE = 6, WIDX_MAZE_MOVE_MODE, WIDX_MAZE_FILL_MODE, - WIDX_MAZE_DIRECTION_GROUPBOX = 23, + WIDX_MAZE_DIRECTION_GROUPBOX = 25, WIDX_MAZE_DIRECTION_NW, WIDX_MAZE_DIRECTION_NE, WIDX_MAZE_DIRECTION_SW, WIDX_MAZE_DIRECTION_SE, - WIDX_MAZE_ENTRANCE = 29, + WIDX_MAZE_ENTRANCE = 30, WIDX_MAZE_EXIT, }; -static rct_widget window_maze_construction_widgets[] = { +validate_global_widx(WC_MAZE_CONSTRUCTION, WIDX_MAZE_DIRECTION_GROUPBOX); +validate_global_widx(WC_MAZE_CONSTRUCTION, WIDX_MAZE_ENTRANCE); +validate_global_widx(WC_MAZE_CONSTRUCTION, WIDX_MAZE_EXIT); + +static Widget window_maze_construction_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 3, 17}, {160, 55}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_MODE ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), - MakeWidget({35, 29}, { 32, 32}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_MAZE_CONSTRUCTION_BUILD, STR_RIDE_CONSTRUCTION_BUILD_MODE ), - MakeWidget({67, 29}, { 32, 32}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_MAZE_CONSTRUCTION_MOVE, STR_RIDE_CONSTRUCTION_MOVE_MODE ), - MakeWidget({99, 29}, { 32, 32}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_MAZE_CONSTRUCTION_FILL_IN, STR_RIDE_CONSTRUCTION_FILL_IN_MODE ), + MakeWidget({35, 29}, { 32, 32}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_MAZE_CONSTRUCTION_BUILD), STR_RIDE_CONSTRUCTION_BUILD_MODE ), + MakeWidget({67, 29}, { 32, 32}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_MAZE_CONSTRUCTION_MOVE), STR_RIDE_CONSTRUCTION_MOVE_MODE ), + MakeWidget({99, 29}, { 32, 32}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_MAZE_CONSTRUCTION_FILL_IN), STR_RIDE_CONSTRUCTION_FILL_IN_MODE ), + MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), @@ -72,12 +77,12 @@ static rct_widget window_maze_construction_widgets[] = { MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), - MakeWidget({ 3, 80}, {160, 87}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_BUILD ), - MakeWidget({83, 96}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_NE, STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), - MakeWidget({83, 125}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_SE, STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), - MakeWidget({38, 125}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_SW, STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), - MakeWidget({38, 96}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION_DIRECTION_NW, STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), MakeWidget({ 3, 168}, {160, 28}, WindowWidgetType::Groupbox, WindowColour::Primary ), + MakeWidget({ 3, 80}, {160, 87}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_BUILD ), + MakeWidget({83, 96}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_NE), STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), + MakeWidget({83, 125}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_SE), STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), + MakeWidget({38, 125}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_SW), STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), + MakeWidget({38, 96}, { 45, 29}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CONSTRUCTION_DIRECTION_NW), STR_RIDE_CONSTRUCTION_BUILD_MAZE_IN_THIS_DIRECTION_TIP), MakeWidget({ 9, 178}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_ENTRANCE, STR_RIDE_CONSTRUCTION_ENTRANCE_TIP ), MakeWidget({87, 178}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_EXIT, STR_RIDE_CONSTRUCTION_EXIT_TIP ), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary ), @@ -96,13 +101,13 @@ public: widgets = window_maze_construction_widgets; WindowInitScrollWidgets(*this); rideId = _currentRideIndex; - show_gridlines(); + ShowGridlines(); } void OnClose() override { - ride_construction_invalidate_current_track(); - viewport_set_visibility(0); + RideConstructionInvalidateCurrentTrack(); + ViewportSetVisibility(0); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; @@ -110,11 +115,11 @@ public: // In order to cancel the yellow arrow correctly the // selection tool should be cancelled. - tool_cancel(); + ToolCancel(); - hide_gridlines(); + HideGridlines(); - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { if (currentRide->overall_view.IsNull()) @@ -129,7 +134,7 @@ public: else { auto intent = Intent(WindowClass::Ride); - intent.putExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); ContextOpenIntent(&intent); } } @@ -150,7 +155,7 @@ public: case WIDX_MAZE_DIRECTION_NE: case WIDX_MAZE_DIRECTION_SE: case WIDX_MAZE_DIRECTION_SW: - WindowMazeConstructionConstruct(((widgetIndex - WIDX_MAZE_DIRECTION_NW) - get_current_rotation()) & 3); + WindowMazeConstructionConstruct(((widgetIndex - WIDX_MAZE_DIRECTION_NW) - GetCurrentRotation()) & 3); break; } } @@ -180,7 +185,7 @@ public: { if ((disabledWidgets & (1uLL << i)) != (currentDisabledWidgets & (1uLL << i))) { - widget_invalidate(*this, i); + WidgetInvalidate(*this, i); } } disabled_widgets = disabledWidgets; @@ -204,7 +209,7 @@ public: void OnUpdate() override { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr || currentRide->status != RideStatus::Closed) { Close(); @@ -236,10 +241,10 @@ public: case RideConstructionState::Front: case RideConstructionState::Back: case RideConstructionState::Selected: - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::RideConstruction) { - tool_cancel(); + ToolCancel(); } break; default: @@ -253,11 +258,11 @@ public: switch (widgetIndex) { case WIDX_MAZE_DIRECTION_GROUPBOX: - ride_construction_toolupdate_construct(screenCoords); + RideConstructionToolupdateConstruct(screenCoords); break; case WIDX_MAZE_ENTRANCE: case WIDX_MAZE_EXIT: - ride_construction_toolupdate_entrance_exit(screenCoords); + RideConstructionToolupdateEntranceExit(screenCoords); break; } } @@ -267,7 +272,7 @@ public: switch (widgetIndex) { case WIDX_MAZE_DIRECTION_GROUPBOX: - ride_construction_tooldown_construct(screenCoords); + RideConstructionTooldownConstruct(screenCoords); break; case WIDX_MAZE_ENTRANCE: case WIDX_MAZE_EXIT: @@ -278,7 +283,7 @@ public: void OnPrepareDraw() override { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); auto ft = Formatter::Common(); if (currentRide != nullptr) { @@ -292,7 +297,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } @@ -300,15 +305,15 @@ public: private: void WindowMazeConstructionEntranceMouseup(WidgetIndex widgetIndex) { - if (tool_set(*this, widgetIndex, Tool::Crosshair)) + if (ToolSet(*this, widgetIndex, Tool::Crosshair)) return; gRideEntranceExitPlaceType = widgetIndex == WIDX_MAZE_ENTRANCE ? ENTRANCE_TYPE_RIDE_ENTRANCE : ENTRANCE_TYPE_RIDE_EXIT; gRideEntranceExitPlaceRideIndex = rideId; gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); - input_set_flag(INPUT_FLAG_6, true); + InputSetFlag(INPUT_FLAG_6, true); - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState != RideConstructionState::EntranceExit) { @@ -323,7 +328,7 @@ private: { if (_rideConstructionState == RideConstructionState::EntranceExit) { - tool_cancel(); + ToolCancel(); } _rideConstructionState = rideConstructionState; WindowMazeConstructionUpdatePressedWidgets(); @@ -331,14 +336,14 @@ private: void WindowMazeConstructionEntranceTooldown(const ScreenCoordsXY& screenCoords) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - CoordsXYZD entranceOrExitCoords = ride_get_entrance_or_exit_position_from_screen_position(screenCoords); + CoordsXYZD entranceOrExitCoords = RideGetEntranceOrExitPositionFromScreenPosition(screenCoords); if (entranceOrExitCoords.IsNull()) return; @@ -357,17 +362,17 @@ private: OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); - auto currentRide = get_ride(rideIndex); - if (currentRide != nullptr && ride_are_all_possible_entrances_and_exits_built(currentRide).Successful) + auto currentRide = GetRide(rideIndex); + if (currentRide != nullptr && RideAreAllPossibleEntrancesAndExitsBuilt(*currentRide).Successful) { - tool_cancel(); + ToolCancel(); if (currentRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_NO_TRACK)) - window_close_by_class(WindowClass::RideConstruction); + WindowCloseByClass(WindowClass::RideConstruction); } else { gRideEntranceExitPlaceType = gRideEntranceExitPlaceType ^ 1; - window_invalidate_by_class(WindowClass::RideConstruction); + WindowInvalidateByClass(WindowClass::RideConstruction); gCurrentToolWidget.widget_index = (gRideEntranceExitPlaceType == ENTRANCE_TYPE_RIDE_ENTRANCE) ? WIDX_MAZE_ENTRANCE : WIDX_MAZE_EXIT; @@ -385,7 +390,7 @@ private: _currentTrackSelectionFlags = 0; _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); x = _currentTrackBegin.x + (CoordsDirectionDelta[direction].x / 2); y = _currentTrackBegin.y + (CoordsDirectionDelta[direction].y / 2); @@ -423,7 +428,7 @@ private: } }; -rct_window* WindowMazeConstructionOpen() +WindowBase* WindowMazeConstructionOpen() { return WindowFocusOrCreate( WindowClass::RideConstruction, ScreenCoordsXY(0, 29), WW, WH, WF_NO_AUTO_CLOSE); @@ -431,9 +436,9 @@ rct_window* WindowMazeConstructionOpen() void WindowMazeConstructionUpdatePressedWidgets() { - rct_window* w; + WindowBase* w; - w = window_find_by_class(WindowClass::RideConstruction); + w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr) return; diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index 67ce26f6bf..598dba55f0 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -68,12 +68,12 @@ enum WindowMultiplayerWidgetIdx { MakeTab ({ 65, 17}, STR_GROUPS_TIP ), /* tab */ \ MakeTab ({ 96, 17}, STR_OPTIONS_TIP ) /* tab */ -static rct_widget window_multiplayer_information_widgets[] = { +static Widget window_multiplayer_information_widgets[] = { MAIN_MULTIPLAYER_WIDGETS, WIDGETS_END, }; -static rct_widget window_multiplayer_players_widgets[] = { +static Widget window_multiplayer_players_widgets[] = { MAIN_MULTIPLAYER_WIDGETS, MakeWidget({ 3, 46}, {173, 15}, WindowWidgetType::TableHeader, WindowColour::Primary , STR_PLAYER ), // Player name MakeWidget({176, 46}, { 83, 15}, WindowWidgetType::TableHeader, WindowColour::Primary , STR_GROUP ), // Player name @@ -83,7 +83,7 @@ static rct_widget window_multiplayer_players_widgets[] = { WIDGETS_END, }; -static rct_widget window_multiplayer_groups_widgets[] = { +static Widget window_multiplayer_groups_widgets[] = { MAIN_MULTIPLAYER_WIDGETS, MakeWidget({141, 46}, {175, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // default group MakeWidget({305, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH), @@ -96,7 +96,7 @@ static rct_widget window_multiplayer_groups_widgets[] = { WIDGETS_END, }; -static rct_widget window_multiplayer_options_widgets[] = { +static Widget window_multiplayer_options_widgets[] = { MAIN_MULTIPLAYER_WIDGETS, MakeWidget({3, 50}, {295, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_LOG_CHAT, STR_LOG_CHAT_TIP ), MakeWidget({3, 64}, {295, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_LOG_SERVER_ACTIONS, STR_LOG_SERVER_ACTIONS_TIP ), @@ -104,7 +104,7 @@ static rct_widget window_multiplayer_options_widgets[] = { WIDGETS_END, }; -static rct_widget *window_multiplayer_page_widgets[] = { +static Widget *window_multiplayer_page_widgets[] = { window_multiplayer_information_widgets, window_multiplayer_players_widgets, window_multiplayer_groups_widgets, @@ -120,40 +120,40 @@ static constexpr StringId WindowMultiplayerPageTitles[] = { static uint8_t _selectedGroup = 0; -static void WindowMultiplayerInformationMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowMultiplayerInformationResize(rct_window *w); -static void WindowMultiplayerInformationUpdate(rct_window *w); -static void WindowMultiplayerInformationInvalidate(rct_window *w); -static void WindowMultiplayerInformationPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowMultiplayerInformationMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowMultiplayerInformationResize(WindowBase *w); +static void WindowMultiplayerInformationUpdate(WindowBase *w); +static void WindowMultiplayerInformationInvalidate(WindowBase *w); +static void WindowMultiplayerInformationPaint(WindowBase *w, DrawPixelInfo *dpi); -static void WindowMultiplayerPlayersMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowMultiplayerPlayersResize(rct_window *w); -static void WindowMultiplayerPlayersUpdate(rct_window *w); -static void WindowMultiplayerPlayersScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); -static void WindowMultiplayerPlayersScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowMultiplayerPlayersScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowMultiplayerPlayersInvalidate(rct_window *w); -static void WindowMultiplayerPlayersPaint(rct_window *w, rct_drawpixelinfo *dpi); -static void WindowMultiplayerPlayersScrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); +static void WindowMultiplayerPlayersMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowMultiplayerPlayersResize(WindowBase *w); +static void WindowMultiplayerPlayersUpdate(WindowBase *w); +static void WindowMultiplayerPlayersScrollgetsize(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void WindowMultiplayerPlayersScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowMultiplayerPlayersScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowMultiplayerPlayersInvalidate(WindowBase *w); +static void WindowMultiplayerPlayersPaint(WindowBase *w, DrawPixelInfo *dpi); +static void WindowMultiplayerPlayersScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex); -static void WindowMultiplayerGroupsMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowMultiplayerGroupsResize(rct_window *w); -static void WindowMultiplayerGroupsMousedown(rct_window *w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowMultiplayerGroupsDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowMultiplayerGroupsUpdate(rct_window *w); -static void WindowMultiplayerGroupsScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); -static void WindowMultiplayerGroupsScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowMultiplayerGroupsScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowMultiplayerGroupsTextInput(rct_window *w, WidgetIndex widgetIndex, char *text); -static void WindowMultiplayerGroupsInvalidate(rct_window *w); -static void WindowMultiplayerGroupsPaint(rct_window *w, rct_drawpixelinfo *dpi); -static void WindowMultiplayerGroupsScrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); +static void WindowMultiplayerGroupsMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowMultiplayerGroupsResize(WindowBase *w); +static void WindowMultiplayerGroupsMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget); +static void WindowMultiplayerGroupsDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowMultiplayerGroupsUpdate(WindowBase *w); +static void WindowMultiplayerGroupsScrollgetsize(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void WindowMultiplayerGroupsScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowMultiplayerGroupsScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowMultiplayerGroupsTextInput(WindowBase *w, WidgetIndex widgetIndex, const char *text); +static void WindowMultiplayerGroupsInvalidate(WindowBase *w); +static void WindowMultiplayerGroupsPaint(WindowBase *w, DrawPixelInfo *dpi); +static void WindowMultiplayerGroupsScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex); -static void WindowMultiplayerOptionsMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowMultiplayerOptionsResize(rct_window *w); -static void WindowMultiplayerOptionsUpdate(rct_window *w); -static void WindowMultiplayerOptionsInvalidate(rct_window *w); -static void WindowMultiplayerOptionsPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowMultiplayerOptionsMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowMultiplayerOptionsResize(WindowBase *w); +static void WindowMultiplayerOptionsUpdate(WindowBase *w); +static void WindowMultiplayerOptionsInvalidate(WindowBase *w); +static void WindowMultiplayerOptionsPaint(WindowBase *w, DrawPixelInfo *dpi); static WindowEventList window_multiplayer_information_events([](auto& events) { @@ -223,16 +223,16 @@ static constexpr const int32_t window_multiplayer_animation_frames[] = { 4, }; -static void WindowMultiplayerDrawTabImages(rct_window* w, rct_drawpixelinfo* dpi); -static void WindowMultiplayerSetPage(rct_window* w, int32_t page); +static void WindowMultiplayerDrawTabImages(WindowBase* w, DrawPixelInfo* dpi); +static void WindowMultiplayerSetPage(WindowBase* w, int32_t page); static bool _windowInformationSizeDirty; static ScreenCoordsXY _windowInformationSize; -rct_window* WindowMultiplayerOpen() +WindowBase* WindowMultiplayerOpen() { // Check if window is already open - rct_window* window = window_bring_to_front_by_class(WindowClass::Multiplayer); + WindowBase* window = WindowBringToFrontByClass(WindowClass::Multiplayer); if (window == nullptr) { window = WindowCreateAutoPos( @@ -243,7 +243,7 @@ rct_window* WindowMultiplayerOpen() return window; } -static void WindowMultiplayerSetPage(rct_window* w, int32_t page) +static void WindowMultiplayerSetPage(WindowBase* w, int32_t page) { _windowInformationSizeDirty = true; @@ -258,18 +258,18 @@ static void WindowMultiplayerSetPage(rct_window* w, int32_t page) w->widgets = window_multiplayer_page_widgets[page]; w->widgets[WIDX_TITLE].text = WindowMultiplayerPageTitles[page]; - window_event_resize_call(w); - window_event_invalidate_call(w); + WindowEventResizeCall(w); + WindowEventInvalidateCall(w); WindowInitScrollWidgets(*w); w->Invalidate(); } -static void WindowMultiplayerAnchorBorderWidgets(rct_window* w) +static void WindowMultiplayerAnchorBorderWidgets(WindowBase* w) { w->ResizeFrameWithPage(); } -static void WindowMultiplayerSetPressedTab(rct_window* w) +static void WindowMultiplayerSetPressedTab(WindowBase* w) { for (int32_t i = WIDX_TAB1; i <= WIDX_TAB4; i++) { @@ -278,42 +278,42 @@ static void WindowMultiplayerSetPressedTab(rct_window* w) w->pressed_widgets |= 1LL << (WIDX_TAB1 + w->page); } -static void WindowMultiplayerGroupsShowGroupDropdown(rct_window* w, rct_widget* widget) +static void WindowMultiplayerGroupsShowGroupDropdown(WindowBase* w, Widget* widget) { - rct_widget* dropdownWidget; + Widget* dropdownWidget; int32_t numItems, i; dropdownWidget = widget - 1; - numItems = network_get_num_groups(); + numItems = NetworkGetNumGroups(); WindowDropdownShowTextCustomWidth( { w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, w->colours[1], 0, 0, numItems, widget->right - dropdownWidget->left); - for (i = 0; i < network_get_num_groups(); i++) + for (i = 0; i < NetworkGetNumGroups(); i++) { gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM; - gDropdownItems[i].Args = reinterpret_cast(network_get_group_name(i)); + gDropdownItems[i].Args = reinterpret_cast(NetworkGetGroupName(i)); } if (widget == &window_multiplayer_groups_widgets[WIDX_DEFAULT_GROUP_DROPDOWN]) { - Dropdown::SetChecked(network_get_group_index(network_get_default_group()), true); + Dropdown::SetChecked(NetworkGetGroupIndex(NetworkGetDefaultGroup()), true); } else if (widget == &window_multiplayer_groups_widgets[WIDX_SELECTED_GROUP_DROPDOWN]) { - Dropdown::SetChecked(network_get_group_index(_selectedGroup), true); + Dropdown::SetChecked(NetworkGetGroupIndex(_selectedGroup), true); } } #pragma region Information page -static void WindowMultiplayerInformationMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowMultiplayerInformationMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB1: case WIDX_TAB2: @@ -334,41 +334,40 @@ static ScreenCoordsXY WindowMultiplayerInformationGetSize() return _windowInformationSize; } - int32_t lineHeight = font_get_line_height(FontStyle::Medium); + int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); // Base dimensions. const int32_t width = 450; int32_t height = 55; - int32_t numLines; // Server name is displayed word-wrapped, so figure out how high it will be. { - u8string buffer = network_get_server_name(); - gfx_wrap_string(buffer.data(), width, FontStyle::Medium, &numLines); - height += ++numLines * lineHeight + (LIST_ROW_HEIGHT / 2); + int32_t numLines; + GfxWrapString(NetworkGetServerName(), width, FontStyle::Medium, nullptr, &numLines); + height += (numLines + 1) * lineHeight + (LIST_ROW_HEIGHT / 2); } // Likewise, for the optional server description -- which can be a little longer. - const utf8* descString = network_get_server_description(); - if (!str_is_null_or_empty(descString)) + const auto& descString = NetworkGetServerDescription(); + if (!descString.empty()) { - u8string buffer = descString; - gfx_wrap_string(buffer.data(), width, FontStyle::Medium, &numLines); - height += ++numLines * lineHeight + (LIST_ROW_HEIGHT / 2); + int32_t numLines; + GfxWrapString(descString, width, FontStyle::Medium, nullptr, &numLines); + height += (numLines + 1) * lineHeight + (LIST_ROW_HEIGHT / 2); } // Finally, account for provider info, if present. { - const utf8* providerName = network_get_server_provider_name(); - if (!str_is_null_or_empty(providerName)) + const auto& providerName = NetworkGetServerProviderName(); + if (!providerName.empty()) height += LIST_ROW_HEIGHT; - const utf8* providerEmail = network_get_server_provider_email(); - if (!str_is_null_or_empty(providerEmail)) + const auto& providerEmail = NetworkGetServerProviderEmail(); + if (!providerEmail.empty()) height += LIST_ROW_HEIGHT; - const utf8* providerWebsite = network_get_server_provider_website(); - if (!str_is_null_or_empty(providerWebsite)) + const auto& providerWebsite = NetworkGetServerProviderWebsite(); + if (!providerWebsite.empty()) height += LIST_ROW_HEIGHT; } @@ -377,79 +376,79 @@ static ScreenCoordsXY WindowMultiplayerInformationGetSize() return _windowInformationSize; } -static void WindowMultiplayerInformationResize(rct_window* w) +static void WindowMultiplayerInformationResize(WindowBase* w) { auto size = WindowMultiplayerInformationGetSize(); - window_set_resize(*w, size.x, size.y, size.x, size.y); + WindowSetResize(*w, size.x, size.y, size.x, size.y); } -static void WindowMultiplayerInformationUpdate(rct_window* w) +static void WindowMultiplayerInformationUpdate(WindowBase* w) { w->frame_no++; - widget_invalidate(*w, WIDX_TAB1 + w->page); + WidgetInvalidate(*w, WIDX_TAB1 + w->page); } -static void WindowMultiplayerInformationInvalidate(rct_window* w) +static void WindowMultiplayerInformationInvalidate(WindowBase* w) { WindowMultiplayerSetPressedTab(w); WindowMultiplayerAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB1, WIDX_TAB4); + WindowAlignTabs(w, WIDX_TAB1, WIDX_TAB4); } -static void WindowMultiplayerInformationPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowMultiplayerInformationPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowMultiplayerDrawTabImages(w, dpi); - rct_drawpixelinfo clippedDPI; - if (clip_drawpixelinfo(&clippedDPI, dpi, w->windowPos, w->width, w->height)) + DrawPixelInfo clippedDPI; + if (ClipDrawPixelInfo(&clippedDPI, dpi, w->windowPos, w->width, w->height)) { dpi = &clippedDPI; auto screenCoords = ScreenCoordsXY{ 3, 50 }; int32_t width = w->width - 6; - const utf8* name = network_get_server_name(); + const auto& name = NetworkGetServerName(); { auto ft = Formatter(); - ft.Add(name); - screenCoords.y += DrawTextWrapped(dpi, screenCoords, width, STR_STRING, ft, { w->colours[1] }); + ft.Add(name.c_str()); + screenCoords.y += DrawTextWrapped(*dpi, screenCoords, width, STR_STRING, ft, { w->colours[1] }); screenCoords.y += LIST_ROW_HEIGHT / 2; } - const utf8* description = network_get_server_description(); - if (!str_is_null_or_empty(description)) + const auto& description = NetworkGetServerDescription(); + if (!description.empty()) { auto ft = Formatter(); - ft.Add(description); - screenCoords.y += DrawTextWrapped(dpi, screenCoords, width, STR_STRING, ft, { w->colours[1] }); + ft.Add(description.c_str()); + screenCoords.y += DrawTextWrapped(*dpi, screenCoords, width, STR_STRING, ft, { w->colours[1] }); screenCoords.y += LIST_ROW_HEIGHT / 2; } - const utf8* providerName = network_get_server_provider_name(); - if (!str_is_null_or_empty(providerName)) + const auto& providerName = NetworkGetServerProviderName(); + if (!providerName.empty()) { auto ft = Formatter(); - ft.Add(providerName); - DrawTextBasic(dpi, screenCoords, STR_PROVIDER_NAME, ft); + ft.Add(providerName.c_str()); + DrawTextBasic(*dpi, screenCoords, STR_PROVIDER_NAME, ft); screenCoords.y += LIST_ROW_HEIGHT; } - const utf8* providerEmail = network_get_server_provider_email(); - if (!str_is_null_or_empty(providerEmail)) + const auto& providerEmail = NetworkGetServerProviderEmail(); + if (!providerEmail.empty()) { auto ft = Formatter(); - ft.Add(providerEmail); - DrawTextBasic(dpi, screenCoords, STR_PROVIDER_EMAIL, ft); + ft.Add(providerEmail.c_str()); + DrawTextBasic(*dpi, screenCoords, STR_PROVIDER_EMAIL, ft); screenCoords.y += LIST_ROW_HEIGHT; } - const utf8* providerWebsite = network_get_server_provider_website(); - if (!str_is_null_or_empty(providerWebsite)) + const auto& providerWebsite = NetworkGetServerProviderWebsite(); + if (!providerWebsite.empty()) { auto ft = Formatter(); - ft.Add(providerWebsite); - DrawTextBasic(dpi, screenCoords, STR_PROVIDER_WEBSITE, ft); + ft.Add(providerWebsite.c_str()); + DrawTextBasic(*dpi, screenCoords, STR_PROVIDER_WEBSITE, ft); } } } @@ -460,15 +459,15 @@ static void WindowMultiplayerInformationPaint(rct_window* w, rct_drawpixelinfo* static bool IsServerPlayerInvisible() { - return network_is_server_player_invisible() && !gConfigGeneral.DebuggingTools; + return NetworkIsServerPlayerInvisible() && !gConfigGeneral.DebuggingTools; } -static void WindowMultiplayerPlayersMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowMultiplayerPlayersMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB1: case WIDX_TAB2: @@ -482,11 +481,11 @@ static void WindowMultiplayerPlayersMouseup(rct_window* w, WidgetIndex widgetInd } } -static void WindowMultiplayerPlayersResize(rct_window* w) +static void WindowMultiplayerPlayersResize(WindowBase* w) { - window_set_resize(*w, 420, 124, 500, 450); + WindowSetResize(*w, 420, 124, 500, 450); - w->no_list_items = (IsServerPlayerInvisible() ? network_get_num_visible_players() : network_get_num_players()); + w->no_list_items = (IsServerPlayerInvisible() ? NetworkGetNumVisiblePlayers() : NetworkGetNumPlayers()); w->list_item_positions[0] = 0; w->widgets[WIDX_HEADER_PING].right = w->width - 5; @@ -495,13 +494,13 @@ static void WindowMultiplayerPlayersResize(rct_window* w) w->Invalidate(); } -static void WindowMultiplayerPlayersUpdate(rct_window* w) +static void WindowMultiplayerPlayersUpdate(WindowBase* w) { w->frame_no++; - widget_invalidate(*w, WIDX_TAB1 + w->page); + WidgetInvalidate(*w, WIDX_TAB1 + w->page); } -static void WindowMultiplayerPlayersScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +static void WindowMultiplayerPlayersScrollgetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { int32_t i; @@ -511,7 +510,7 @@ static void WindowMultiplayerPlayersScrollgetsize(rct_window* w, int32_t scrollI w->Invalidate(); } - *height = network_get_num_players() * SCROLLABLE_ROW_HEIGHT; + *height = NetworkGetNumPlayers() * SCROLLABLE_ROW_HEIGHT; i = *height - window_multiplayer_players_widgets[WIDX_LIST].bottom + window_multiplayer_players_widgets[WIDX_LIST].top + 21; if (i < 0) i = 0; @@ -522,7 +521,7 @@ static void WindowMultiplayerPlayersScrollgetsize(rct_window* w, int32_t scrollI } } -static void WindowMultiplayerPlayersScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowMultiplayerPlayersScrollmousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { int32_t index; @@ -534,10 +533,10 @@ static void WindowMultiplayerPlayersScrollmousedown(rct_window* w, int32_t scrol w->Invalidate(); int32_t player = (IsServerPlayerInvisible() ? index + 1 : index); - WindowPlayerOpen(network_get_player_id(player)); + WindowPlayerOpen(NetworkGetPlayerID(player)); } -static void WindowMultiplayerPlayersScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowMultiplayerPlayersScrollmouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { int32_t index; @@ -549,16 +548,16 @@ static void WindowMultiplayerPlayersScrollmouseover(rct_window* w, int32_t scrol w->Invalidate(); } -static void WindowMultiplayerPlayersInvalidate(rct_window* w) +static void WindowMultiplayerPlayersInvalidate(WindowBase* w) { WindowMultiplayerSetPressedTab(w); WindowMultiplayerAnchorBorderWidgets(w); window_multiplayer_players_widgets[WIDX_LIST].right = w->width - 4; window_multiplayer_players_widgets[WIDX_LIST].bottom = w->height - 0x0F; - window_align_tabs(w, WIDX_TAB1, WIDX_TAB4); + WindowAlignTabs(w, WIDX_TAB1, WIDX_TAB4); } -static void WindowMultiplayerPlayersPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowMultiplayerPlayersPaint(WindowBase* w, DrawPixelInfo* dpi) { StringId stringId; @@ -570,10 +569,10 @@ static void WindowMultiplayerPlayersPaint(rct_window* w, rct_drawpixelinfo* dpi) auto screenCoords = w->windowPos + ScreenCoordsXY{ 4, w->widgets[WIDX_LIST].bottom + 2 }; auto ft = Formatter(); ft.Add(w->no_list_items); - DrawTextBasic(dpi, screenCoords, stringId, ft, { w->colours[2] }); + DrawTextBasic(*dpi, screenCoords, stringId, ft, { w->colours[2] }); } -static void WindowMultiplayerPlayersScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowMultiplayerPlayersScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { ScreenCoordsXY screenCoords; screenCoords.y = 0; @@ -581,7 +580,7 @@ static void WindowMultiplayerPlayersScrollpaint(rct_window* w, rct_drawpixelinfo const int32_t firstPlayerInList = (IsServerPlayerInvisible() ? 1 : 0); int32_t listPosition = 0; - for (int32_t player = firstPlayerInList; player < network_get_num_players(); player++) + for (int32_t player = firstPlayerInList; player < NetworkGetNumPlayers(); player++) { if (screenCoords.y > dpi->y + dpi->height) { @@ -598,15 +597,15 @@ static void WindowMultiplayerPlayersScrollpaint(rct_window* w, rct_drawpixelinfo colour_t colour = COLOUR_BLACK; if (listPosition == w->selected_list_item) { - gfx_filter_rect( + GfxFilterRect( dpi, { 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); - _buffer += network_get_player_name(player); + _buffer += NetworkGetPlayerName(player); colour = w->colours[2]; } else { - if (network_get_player_flags(player) & NETWORK_PLAYER_FLAG_ISSERVER) + if (NetworkGetPlayerFlags(player) & NETWORK_PLAYER_FLAG_ISSERVER) { _buffer += "{BABYBLUE}"; } @@ -614,40 +613,40 @@ static void WindowMultiplayerPlayersScrollpaint(rct_window* w, rct_drawpixelinfo { _buffer += "{BLACK}"; } - _buffer += network_get_player_name(player); + _buffer += NetworkGetPlayerName(player); } screenCoords.x = 0; - gfx_clip_string(_buffer.data(), 230, FontStyle::Medium); - gfx_draw_string(dpi, screenCoords, _buffer.c_str(), { colour }); + GfxClipString(_buffer.data(), 230, FontStyle::Medium); + GfxDrawString(*dpi, screenCoords, _buffer.c_str(), { colour }); // Draw group name _buffer.resize(0); - int32_t group = network_get_group_index(network_get_player_group(player)); + int32_t group = NetworkGetGroupIndex(NetworkGetPlayerGroup(player)); if (group != -1) { _buffer += "{BLACK}"; screenCoords.x = 173; - _buffer += network_get_group_name(group); - gfx_clip_string(_buffer.data(), 80, FontStyle::Medium); - gfx_draw_string(dpi, screenCoords, _buffer.c_str(), { colour }); + _buffer += NetworkGetGroupName(group); + GfxClipString(_buffer.data(), 80, FontStyle::Medium); + GfxDrawString(*dpi, screenCoords, _buffer.c_str(), { colour }); } // Draw last action - int32_t action = network_get_player_last_action(player, 2000); + int32_t action = NetworkGetPlayerLastAction(player, 2000); auto ft = Formatter(); if (action != -999) { - ft.Add(network_get_action_name_string_id(action)); + ft.Add(NetworkGetActionNameStringID(action)); } else { ft.Add(STR_ACTION_NA); } - DrawTextEllipsised(dpi, { 256, screenCoords.y }, 100, STR_BLACK_STRING, ft); + DrawTextEllipsised(*dpi, { 256, screenCoords.y }, 100, STR_BLACK_STRING, ft); // Draw ping _buffer.resize(0); - int32_t ping = network_get_player_ping(player); + int32_t ping = NetworkGetPlayerPing(player); if (ping <= 100) { _buffer += "{GREEN}"; @@ -666,7 +665,7 @@ static void WindowMultiplayerPlayersScrollpaint(rct_window* w, rct_drawpixelinfo _buffer += pingBuffer; screenCoords.x = 356; - gfx_draw_string(dpi, screenCoords, _buffer.c_str(), { colour }); + GfxDrawString(*dpi, screenCoords, _buffer.c_str(), { colour }); } screenCoords.y += SCROLLABLE_ROW_HEIGHT; listPosition++; @@ -677,12 +676,12 @@ static void WindowMultiplayerPlayersScrollpaint(rct_window* w, rct_drawpixelinfo #pragma region Groups page -static void WindowMultiplayerGroupsMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowMultiplayerGroupsMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB1: case WIDX_TAB2: @@ -706,25 +705,25 @@ static void WindowMultiplayerGroupsMouseup(rct_window* w, WidgetIndex widgetInde } break; case WIDX_RENAME_GROUP:; - int32_t groupIndex = network_get_group_index(_selectedGroup); - const utf8* groupName = network_get_group_name(groupIndex); + int32_t groupIndex = NetworkGetGroupIndex(_selectedGroup); + const utf8* groupName = NetworkGetGroupName(groupIndex); WindowTextInputRawOpen(w, widgetIndex, STR_GROUP_NAME, STR_ENTER_NEW_NAME_FOR_THIS_GROUP, {}, groupName, 32); break; } } -static void WindowMultiplayerGroupsResize(rct_window* w) +static void WindowMultiplayerGroupsResize(WindowBase* w) { - window_set_resize(*w, 320, 200, 320, 500); + WindowSetResize(*w, 320, 200, 320, 500); - w->no_list_items = network_get_num_actions(); + w->no_list_items = NetworkGetNumActions(); w->list_item_positions[0] = 0; w->selected_list_item = -1; w->Invalidate(); } -static void WindowMultiplayerGroupsMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowMultiplayerGroupsMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { switch (widgetIndex) { @@ -737,7 +736,7 @@ static void WindowMultiplayerGroupsMousedown(rct_window* w, WidgetIndex widgetIn } } -static void WindowMultiplayerGroupsDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowMultiplayerGroupsDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) { @@ -748,26 +747,25 @@ static void WindowMultiplayerGroupsDropdown(rct_window* w, WidgetIndex widgetInd { case WIDX_DEFAULT_GROUP_DROPDOWN: { - auto networkModifyGroup = NetworkModifyGroupAction( - ModifyGroupType::SetDefault, network_get_group_id(dropdownIndex)); + auto networkModifyGroup = NetworkModifyGroupAction(ModifyGroupType::SetDefault, NetworkGetGroupID(dropdownIndex)); GameActions::Execute(&networkModifyGroup); } break; case WIDX_SELECTED_GROUP_DROPDOWN: - _selectedGroup = network_get_group_id(dropdownIndex); + _selectedGroup = NetworkGetGroupID(dropdownIndex); break; } w->Invalidate(); } -static void WindowMultiplayerGroupsUpdate(rct_window* w) +static void WindowMultiplayerGroupsUpdate(WindowBase* w) { w->frame_no++; - widget_invalidate(*w, WIDX_TAB1 + w->page); + WidgetInvalidate(*w, WIDX_TAB1 + w->page); } -static void WindowMultiplayerGroupsScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +static void WindowMultiplayerGroupsScrollgetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { int32_t i; @@ -777,7 +775,7 @@ static void WindowMultiplayerGroupsScrollgetsize(rct_window* w, int32_t scrollIn w->Invalidate(); } - *height = network_get_num_actions() * SCROLLABLE_ROW_HEIGHT; + *height = NetworkGetNumActions() * SCROLLABLE_ROW_HEIGHT; i = *height - window_multiplayer_groups_widgets[WIDX_LIST].bottom + window_multiplayer_groups_widgets[WIDX_LIST].top + 21; if (i < 0) i = 0; @@ -788,7 +786,7 @@ static void WindowMultiplayerGroupsScrollgetsize(rct_window* w, int32_t scrollIn } } -static void WindowMultiplayerGroupsScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowMultiplayerGroupsScrollmousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { int32_t index; @@ -804,7 +802,7 @@ static void WindowMultiplayerGroupsScrollmousedown(rct_window* w, int32_t scroll GameActions::Execute(&networkModifyGroup); } -static void WindowMultiplayerGroupsScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowMultiplayerGroupsScrollmouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { int32_t index; @@ -816,7 +814,7 @@ static void WindowMultiplayerGroupsScrollmouseover(rct_window* w, int32_t scroll w->Invalidate(); } -static void WindowMultiplayerGroupsTextInput(rct_window* w, WidgetIndex widgetIndex, char* text) +static void WindowMultiplayerGroupsTextInput(WindowBase* w, WidgetIndex widgetIndex, const char* text) { if (widgetIndex != WIDX_RENAME_GROUP) return; @@ -828,39 +826,39 @@ static void WindowMultiplayerGroupsTextInput(rct_window* w, WidgetIndex widgetIn GameActions::Execute(&networkModifyGroup); } -static void WindowMultiplayerGroupsInvalidate(rct_window* w) +static void WindowMultiplayerGroupsInvalidate(WindowBase* w) { WindowMultiplayerSetPressedTab(w); WindowMultiplayerAnchorBorderWidgets(w); window_multiplayer_groups_widgets[WIDX_PERMISSIONS_LIST].right = w->width - 4; window_multiplayer_groups_widgets[WIDX_PERMISSIONS_LIST].bottom = w->height - 0x0F; - window_align_tabs(w, WIDX_TAB1, WIDX_TAB4); + WindowAlignTabs(w, WIDX_TAB1, WIDX_TAB4); // select other group if one is removed - while (network_get_group_index(_selectedGroup) == -1 && _selectedGroup > 0) + while (NetworkGetGroupIndex(_selectedGroup) == -1 && _selectedGroup > 0) { _selectedGroup--; } } -static void WindowMultiplayerGroupsPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowMultiplayerGroupsPaint(WindowBase* w, DrawPixelInfo* dpi) { thread_local std::string _buffer; WindowDrawWidgets(*w, dpi); WindowMultiplayerDrawTabImages(w, dpi); - rct_widget* widget = &window_multiplayer_groups_widgets[WIDX_DEFAULT_GROUP]; - int32_t group = network_get_group_index(network_get_default_group()); + Widget* widget = &window_multiplayer_groups_widgets[WIDX_DEFAULT_GROUP]; + int32_t group = NetworkGetGroupIndex(NetworkGetDefaultGroup()); if (group != -1) { _buffer.assign("{WINDOW_COLOUR_2}"); - _buffer += network_get_group_name(group); + _buffer += NetworkGetGroupName(group); auto ft = Formatter(); ft.Add(_buffer.c_str()); DrawTextEllipsised( - dpi, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft, + *dpi, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft, { TextAlignment::CENTRE }); } @@ -868,41 +866,41 @@ static void WindowMultiplayerGroupsPaint(rct_window* w, rct_drawpixelinfo* dpi) + ScreenCoordsXY{ window_multiplayer_groups_widgets[WIDX_CONTENT_PANEL].left + 4, window_multiplayer_groups_widgets[WIDX_CONTENT_PANEL].top + 4 }; - DrawTextBasic(dpi, screenPos, STR_DEFAULT_GROUP, {}, { w->colours[2] }); + DrawTextBasic(*dpi, screenPos, STR_DEFAULT_GROUP, {}, { w->colours[2] }); screenPos.y += 20; - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { screenPos - ScreenCoordsXY{ 0, 6 }, screenPos + ScreenCoordsXY{ 310, -5 } }, w->colours[1], INSET_RECT_FLAG_BORDER_INSET); widget = &window_multiplayer_groups_widgets[WIDX_SELECTED_GROUP]; - group = network_get_group_index(_selectedGroup); + group = NetworkGetGroupIndex(_selectedGroup); if (group != -1) { _buffer.assign("{WINDOW_COLOUR_2}"); - _buffer += network_get_group_name(group); + _buffer += NetworkGetGroupName(group); auto ft = Formatter(); ft.Add(_buffer.c_str()); DrawTextEllipsised( - dpi, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft, + *dpi, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft, { TextAlignment::CENTRE }); } } -static void WindowMultiplayerGroupsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowMultiplayerGroupsScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { auto screenCoords = ScreenCoordsXY{ 0, 0 }; auto dpiCoords = ScreenCoordsXY{ dpi->x, dpi->y }; - gfx_fill_rect( + GfxFillRect( dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi->width - 1, dpi->height - 1 } }, ColourMapA[w->colours[1]].mid_light); - for (int32_t i = 0; i < network_get_num_actions(); i++) + for (int32_t i = 0; i < NetworkGetNumActions(); i++) { if (i == w->selected_list_item) { - gfx_filter_rect( + GfxFilterRect( dpi, { 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); } if (screenCoords.y > dpi->y + dpi->height) @@ -912,20 +910,20 @@ static void WindowMultiplayerGroupsScrollpaint(rct_window* w, rct_drawpixelinfo* if (screenCoords.y + SCROLLABLE_ROW_HEIGHT + 1 >= dpi->y) { - int32_t groupindex = network_get_group_index(_selectedGroup); + int32_t groupindex = NetworkGetGroupIndex(_selectedGroup); if (groupindex != -1) { - if (network_can_perform_action(groupindex, static_cast(i))) + if (NetworkCanPerformAction(groupindex, static_cast(i))) { screenCoords.x = 0; - gfx_draw_string(dpi, screenCoords, u8"{WINDOW_COLOUR_2}✓", {}); + GfxDrawString(*dpi, screenCoords, u8"{WINDOW_COLOUR_2}✓", {}); } } // Draw action name auto ft = Formatter(); - ft.Add(network_get_action_name_string_id(i)); - DrawTextBasic(dpi, { 10, screenCoords.y }, STR_WINDOW_COLOUR_2_STRINGID, ft); + ft.Add(NetworkGetActionNameStringID(i)); + DrawTextBasic(*dpi, { 10, screenCoords.y }, STR_WINDOW_COLOUR_2_STRINGID, ft); } screenCoords.y += SCROLLABLE_ROW_HEIGHT; } @@ -935,12 +933,12 @@ static void WindowMultiplayerGroupsScrollpaint(rct_window* w, rct_drawpixelinfo* #pragma region Options page -static void WindowMultiplayerOptionsMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowMultiplayerOptionsMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB1: case WIDX_TAB2: @@ -966,24 +964,24 @@ static void WindowMultiplayerOptionsMouseup(rct_window* w, WidgetIndex widgetInd } } -static void WindowMultiplayerOptionsResize(rct_window* w) +static void WindowMultiplayerOptionsResize(WindowBase* w) { - window_set_resize(*w, 300, 100, 300, 100); + WindowSetResize(*w, 300, 100, 300, 100); } -static void WindowMultiplayerOptionsUpdate(rct_window* w) +static void WindowMultiplayerOptionsUpdate(WindowBase* w) { w->frame_no++; - widget_invalidate(*w, WIDX_TAB1 + w->page); + WidgetInvalidate(*w, WIDX_TAB1 + w->page); } -static void WindowMultiplayerOptionsInvalidate(rct_window* w) +static void WindowMultiplayerOptionsInvalidate(WindowBase* w) { WindowMultiplayerSetPressedTab(w); WindowMultiplayerAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB1, WIDX_TAB4); + WindowAlignTabs(w, WIDX_TAB1, WIDX_TAB4); - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) { w->widgets[WIDX_KNOWN_KEYS_ONLY_CHECKBOX].type = WindowWidgetType::Empty; } @@ -993,7 +991,7 @@ static void WindowMultiplayerOptionsInvalidate(rct_window* w) WidgetSetCheckboxValue(*w, WIDX_KNOWN_KEYS_ONLY_CHECKBOX, gConfigNetwork.KnownKeysOnly); } -static void WindowMultiplayerOptionsPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowMultiplayerOptionsPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowMultiplayerDrawTabImages(w, dpi); @@ -1001,7 +999,7 @@ static void WindowMultiplayerOptionsPaint(rct_window* w, rct_drawpixelinfo* dpi) #pragma endregion -static void WindowMultiplayerDrawTabImage(rct_window* w, rct_drawpixelinfo* dpi, int32_t page, int32_t spriteIndex) +static void WindowMultiplayerDrawTabImage(WindowBase* w, DrawPixelInfo* dpi, int32_t page, int32_t spriteIndex) { WidgetIndex widgetIndex = WIDX_TAB1 + page; @@ -1017,13 +1015,13 @@ static void WindowMultiplayerDrawTabImage(rct_window* w, rct_drawpixelinfo* dpi, } } - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ w->widgets[widgetIndex].left, w->widgets[widgetIndex].top }); } } -static void WindowMultiplayerDrawTabImages(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowMultiplayerDrawTabImages(WindowBase* w, DrawPixelInfo* dpi) { WindowMultiplayerDrawTabImage(w, dpi, WINDOW_MULTIPLAYER_PAGE_INFORMATION, SPR_TAB_KIOSKS_AND_FACILITIES_0); WindowMultiplayerDrawTabImage(w, dpi, WINDOW_MULTIPLAYER_PAGE_PLAYERS, SPR_TAB_GUESTS_0); diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index 69d5ef63a4..2875e9e5cd 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ enum WindowNetworkStatusWidgetIdx { WIDX_PASSWORD }; -static rct_widget window_network_status_widgets[] = { +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 @@ -84,11 +84,11 @@ public: } if (text.empty()) { - network_shutdown_client(); + NetworkShutdownClient(); } else { - network_send_password(_password); + NetworkSendPassword(_password); } } @@ -97,16 +97,16 @@ public: ResizeFrame(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); thread_local std::string _buffer; _buffer.assign("{BLACK}"); _buffer += _windowNetworkStatusText; - gfx_clip_string(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::Medium); + GfxClipString(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::Medium); ScreenCoordsXY screenCoords(windowPos.x + (width / 2), windowPos.y + (height / 2)); - screenCoords.x -= gfx_get_string_width(_buffer, FontStyle::Medium) / 2; - gfx_draw_string(&dpi, screenCoords, _buffer.c_str()); + screenCoords.x -= GfxGetStringWidth(_buffer, FontStyle::Medium) / 2; + GfxDrawString(dpi, screenCoords, _buffer.c_str()); } void SetCloseCallBack(close_callback onClose) @@ -130,7 +130,7 @@ private: std::string _password; }; -rct_window* WindowNetworkStatusOpen(const std::string& text, close_callback onClose) +WindowBase* WindowNetworkStatusOpen(const std::string& text, close_callback onClose) { auto window = WindowFocusOrCreate( WindowClass::NetworkStatus, 420, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); @@ -142,7 +142,7 @@ rct_window* WindowNetworkStatusOpen(const std::string& text, close_callback onCl // force close void WindowNetworkStatusClose() { - auto window = window_find_by_class(WindowClass::NetworkStatus); + auto window = WindowFindByClass(WindowClass::NetworkStatus); if (window == nullptr) { return; @@ -152,7 +152,7 @@ void WindowNetworkStatusClose() networkWindow->Close(); } -rct_window* WindowNetworkStatusOpenPassword() +WindowBase* WindowNetworkStatusOpenPassword() { auto window = WindowFocusOrCreate( WindowClass::NetworkStatus, 420, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index bbde080870..a5295b8558 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -44,7 +44,7 @@ enum WindowNewCampaignWidgetIdx { WIDX_START_BUTTON }; -static rct_widget window_new_campaign_widgets[] = { +static Widget window_new_campaign_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget ({ 14, 24}, {126, 12}, WindowWidgetType::Label, WindowColour::Primary, STR_EMPTY ), // ride label MakeWidget ({100, 24}, {242, 12}, WindowWidgetType::DropdownMenu, WindowColour::Primary, STR_EMPTY ), // ride dropdown @@ -65,12 +65,12 @@ private: static bool RideValueCompare(const RideId& a, const RideId& b) { auto valueA = 0; - auto rideA = get_ride(a); + auto rideA = GetRide(a); if (rideA != nullptr) valueA = rideA->value; auto valueB = 0; - auto rideB = get_ride(b); + auto rideB = GetRide(b); if (rideB != nullptr) valueB = rideB->value; @@ -80,16 +80,16 @@ private: static int32_t RideNameCompare(const RideId& a, const RideId& b) { std::string rideAName = ""; - auto rideA = get_ride(a); + auto rideA = GetRide(a); if (rideA != nullptr) rideAName = rideA->GetName(); std::string rideBName = ""; - auto rideB = get_ride(b); + auto rideB = GetRide(b); if (rideB != nullptr) rideBName = rideB->GetName(); - return strlogicalcmp(rideAName.c_str(), rideBName.c_str()) < 0; + return StrLogicalCmp(rideAName.c_str(), rideBName.c_str()) < 0; } /** @@ -177,8 +177,8 @@ public: void OnMouseDown(WidgetIndex widgetIndex) override { - rct_widget* widget = &widgets[widgetIndex]; - rct_widget* dropdownWidget; + Widget* widget = &widgets[widgetIndex]; + Widget* dropdownWidget; switch (widgetIndex) { @@ -210,7 +210,7 @@ public: int32_t numItems = 0; for (auto rideIndex : RideList) { - auto curRide = get_ride(rideIndex); + auto curRide = GetRide(rideIndex); if (curRide != nullptr) { // HACK until dropdown items have longer argument buffers @@ -260,7 +260,7 @@ public: gameAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { if (result->Error == GameActions::Status::Ok) { - window_close_by_class(WindowClass::NewCampaign); + WindowCloseByClass(WindowClass::NewCampaign); } }); GameActions::Execute(&gameAction); @@ -311,7 +311,7 @@ public: widgets[WIDX_RIDE_LABEL].text = STR_MARKETING_RIDE; if (campaign.RideId != RideId::GetNull()) { - auto curRide = get_ride(campaign.RideId); + auto curRide = GetRide(campaign.RideId); if (curRide != nullptr) { widgets[WIDX_RIDE_DROPDOWN].text = STR_STRINGID; @@ -342,18 +342,18 @@ public: WidgetSetDisabled(*this, WIDX_START_BUTTON, true); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { ScreenCoordsXY screenCoords{}; DrawWidgets(dpi); // Number of weeks - rct_widget* spinnerWidget = &widgets[WIDX_WEEKS_SPINNER]; + Widget* spinnerWidget = &widgets[WIDX_WEEKS_SPINNER]; auto ft = Formatter(); ft.Add(campaign.no_weeks); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ spinnerWidget->left + 1, spinnerWidget->top }, + dpi, windowPos + ScreenCoordsXY{ spinnerWidget->left + 1, spinnerWidget->top }, campaign.no_weeks == 1 ? STR_MARKETING_1_WEEK : STR_X_WEEKS, ft, { colours[0] }); screenCoords = windowPos + ScreenCoordsXY{ 14, 60 }; @@ -361,25 +361,25 @@ public: // Price per week ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[campaign.campaign_type]); - DrawTextBasic(&dpi, screenCoords, STR_MARKETING_COST_PER_WEEK, ft); + DrawTextBasic(dpi, screenCoords, STR_MARKETING_COST_PER_WEEK, ft); screenCoords.y += 13; // Total price ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[campaign.campaign_type] * campaign.no_weeks); - DrawTextBasic(&dpi, screenCoords, STR_MARKETING_TOTAL_COST, ft); + DrawTextBasic(dpi, screenCoords, STR_MARKETING_TOTAL_COST, ft); } }; -rct_window* WindowNewCampaignOpen(int16_t campaignType) +WindowBase* WindowNewCampaignOpen(int16_t campaignType) { - auto w = static_cast(window_bring_to_front_by_class(WindowClass::NewCampaign)); + auto w = static_cast(WindowBringToFrontByClass(WindowClass::NewCampaign)); if (w != nullptr) { if (w->campaign.campaign_type == campaignType) return w; - window_close(*w); + WindowClose(*w); } w = WindowCreate(WindowClass::NewCampaign, WW, WH, 0); @@ -392,7 +392,7 @@ rct_window* WindowNewCampaignOpen(int16_t campaignType) void WindowCampaignRefreshRides() { - auto w = static_cast(window_find_by_class(WindowClass::NewCampaign)); + auto w = static_cast(WindowFindByClass(WindowClass::NewCampaign)); if (w != nullptr) { w->RefreshRides(); diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 381ffe7f84..aa70277218 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -193,6 +194,8 @@ enum WIDX_LAST_DEVELOPMENT_BUTTON, WIDX_RESEARCH_FUNDING_BUTTON, + WIDX_FILTER_TEXT_BOX, + WIDX_FILTER_CLEAR_BUTTON, WIDX_GROUP_BY_TRACK_TYPE, }; @@ -200,7 +203,7 @@ static constexpr const ScreenCoordsXY GroupByTrackTypeOrigin{ WindowWidth - 8 - static constexpr const ScreenSize GroupTrackTypeSize{ GroupByTrackTypeWidth, 14 }; // clang-format off -static rct_widget window_new_ride_widgets[] = { +static Widget window_new_ride_widgets[] = { WINDOW_SHIM(WindowTitle, WindowWidth, WindowHeight), MakeWidget({ 0, 43}, {601, 339}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeTab ({ 3, 17}, STR_TRANSPORT_RIDES_TIP ), @@ -214,7 +217,9 @@ static rct_widget window_new_ride_widgets[] = { MakeWidget({ 3, 47}, {290, 70}, WindowWidgetType::Groupbox, WindowColour::Tertiary, STR_CURRENTLY_IN_DEVELOPMENT ), MakeWidget({ 3, 124}, {290, 65}, WindowWidgetType::Groupbox, WindowColour::Tertiary, STR_LAST_DEVELOPMENT ), MakeWidget({265, 161}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, 0xFFFFFFFF, STR_RESEARCH_SHOW_DETAILS_TIP), - MakeWidget({265, 68}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, SPR_FINANCE, STR_FINANCES_RESEARCH_TIP ), + MakeWidget({265, 68}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Tertiary, ImageId(SPR_FINANCE), STR_FINANCES_RESEARCH_TIP ), + MakeWidget({ 4, 46}, {211, 14}, WindowWidgetType::TextBox, WindowColour::Secondary ), + MakeWidget({218, 46}, { 70, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_OBJECT_SEARCH_CLEAR ), MakeWidget(GroupByTrackTypeOrigin, GroupTrackTypeSize, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_GROUP_BY_TRACK_TYPE, STR_GROUP_BY_TRACK_TYPE_TIP ), WIDGETS_END, }; @@ -264,6 +269,7 @@ class NewRideWindow final : public Window private: static NewRideTabId _currentTab; static uint_fast16_t _windowNewRideTabScroll[RideTabCount]; + u8string _filter; u8string _vehicleAvailability{}; RideSelection _lastTrackDesignCountRideType{}; int32_t _lastTrackDesignCount{}; @@ -285,6 +291,7 @@ public: widgets = window_new_ride_widgets; PopulateRideList(); InitScrollWidgets(); + _filter.clear(); frame_no = 0; new_ride.SelectedRide = { RIDE_TYPE_NULL, OBJECT_ENTRY_INDEX_NULL }; @@ -307,7 +314,13 @@ public: if (frame_no >= TabAnimationLoops[_currentTab]) frame_no = 0; - widget_invalidate(*this, WIDX_TAB_1 + _currentTab); + WidgetInvalidate(*this, WIDX_TAB_1 + static_cast(_currentTab)); + + if (gCurrentTextBox.window.classification == classification && gCurrentTextBox.window.number == number) + { + WindowUpdateTextboxCaret(); + WidgetInvalidate(*this, WIDX_FILTER_TEXT_BOX); + } if (new_ride.SelectedRide.Type != RIDE_TYPE_NULL && new_ride.selected_ride_countdown-- == 0) { @@ -324,7 +337,7 @@ public: if (!WidgetIsHighlighted(*this, WIDX_RIDE_LIST)) { new_ride.HighlightedRide = { RIDE_TYPE_NULL, OBJECT_ENTRY_INDEX_NULL }; - widget_invalidate(*this, WIDX_RIDE_LIST); + WidgetInvalidate(*this, WIDX_RIDE_LIST); } } } @@ -347,6 +360,14 @@ public: ConfigSaveDefault(); SetPage(_currentTab); break; + case WIDX_FILTER_TEXT_BOX: + WindowStartTextbox(*this, widgetIndex, STR_STRING, _filter.data(), MAX_PATH); + break; + case WIDX_FILTER_CLEAR_BUTTON: + _filter.clear(); + scrolls->v_top = 0; + Invalidate(); + break; } } @@ -369,6 +390,8 @@ public: widgets[WIDX_TITLE].text = RideTitles[_currentTab]; widgets[WIDX_TAB_7].type = WindowWidgetType::Tab; + widgets[WIDX_FILTER_TEXT_BOX].string = _filter.data(); + if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) widgets[WIDX_TAB_7].type = WindowWidgetType::Empty; @@ -379,19 +402,19 @@ public: { auto type = gResearchLastItem->type; widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WindowWidgetType::FlatBtn; - widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = (type == Research::EntryType::Ride) ? SPR_NEW_RIDE - : SPR_NEW_SCENERY; + const auto index = (type == Research::EntryType::Ride) ? SPR_NEW_RIDE : SPR_NEW_SCENERY; + widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = ImageId(index); } } const auto& ls = OpenRCT2::GetContext()->GetLocalisationService(); auto string = ls.GetString(STR_GROUP_BY_TRACK_TYPE); - auto strWidth = gfx_get_string_width(string, FontStyle::Medium); + auto strWidth = GfxGetStringWidth(string, FontStyle::Medium); auto localizedGroupByTrackTypeWidth = strWidth + 14; widgets[WIDX_GROUP_BY_TRACK_TYPE].left = width - 8 - localizedGroupByTrackTypeWidth; } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(dpi); @@ -448,14 +471,14 @@ public: Invalidate(); } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { if (_currentTab == RESEARCH_TAB) { return; } - gfx_clear(&dpi, ColourMapA[colours[1]].mid_light); + GfxClear(&dpi, ColourMapA[colours[1]].mid_light); ScreenCoordsXY coords{ 1, 1 }; RideSelection* listItem = _windowNewRideListItems; @@ -466,14 +489,14 @@ public: if (new_ride.SelectedRide == *listItem) buttonFlags |= INSET_RECT_FLAG_BORDER_INSET; if (new_ride.HighlightedRide == *listItem || buttonFlags != 0) - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { coords, coords + ScreenCoordsXY{ 115, 115 } }, colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT | buttonFlags); // Draw ride image with feathered border auto mask = ImageId(SPR_NEW_RIDE_MASK); auto rideImage = ImageId(GetRideImage(*listItem)); - gfx_draw_sprite_raw_masked(&dpi, coords + ScreenCoordsXY{ 2, 2 }, mask, rideImage); + GfxDrawSpriteRawMasked(&dpi, coords + ScreenCoordsXY{ 2, 2 }, mask, rideImage); // Next position coords.x += 116; @@ -488,6 +511,20 @@ public: } } + void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override + { + if (widgetIndex != WIDX_FILTER_TEXT_BOX) + return; + + if (text == _filter) + return; + + _filter.assign(text); + + scrolls->v_top = 0; + Invalidate(); + } + void SetPage(int tab) { if (tab >= TRANSPORT_TAB && tab < TAB_COUNT) @@ -522,19 +559,19 @@ private: } Close(); - window_close_construction_windows(); + WindowCloseConstructionWindows(); auto count = GetNumTrackDesigns(item); if (count > 0) { auto intent = Intent(WindowClass::TrackDesignList); - intent.putExtra(INTENT_EXTRA_RIDE_TYPE, item.Type); - intent.putExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, item.EntryIndex); + intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, item.Type); + intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, item.EntryIndex); ContextOpenIntent(&intent); return; } - ride_construct_new(item); + RideConstructNew(item); } int32_t GetNumTrackDesigns(RideSelection item) @@ -551,7 +588,7 @@ private: { if (GetRideTypeDescriptor(item.Type).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { - entryName = get_ride_entry_name(item.EntryIndex); + entryName = GetRideEntryName(item.EntryIndex); } } @@ -574,10 +611,10 @@ private: auto isFirst = true; for (auto rideEntryIndex : rideEntries) { - auto currentRideEntry = get_ride_entry(rideEntryIndex); + auto currentRideEntry = GetRideEntryByIndex(rideEntryIndex); // Skip if vehicle type is not invented yet - if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) { continue; } @@ -589,7 +626,7 @@ private: } // Append vehicle name - auto vehicleName = language_get_string(currentRideEntry->naming.Name); + auto vehicleName = LanguageGetString(currentRideEntry->naming.Name); _vehicleAvailability += vehicleName; isFirst = false; @@ -639,11 +676,11 @@ private: for (auto rideEntryIndex : rideEntries) { // Skip if vehicle type is not invented yet - if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) continue; // Ride entries - rct_ride_entry* rideEntry = get_ride_entry(rideEntryIndex); + const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); // Skip if the vehicle isn't the preferred vehicle for this generic track type if (!gConfigInterface.ListRideVehiclesSeparately @@ -653,6 +690,11 @@ private: continue; } + if (!IsFiltered(*rideEntry)) + { + continue; + } + highestVehiclePriority = rideEntry->BuildMenuPriority; // Determines how and where to draw a button for this ride type/vehicle. @@ -698,6 +740,55 @@ private: return nextListItem; } + bool IsFiltered(const RideObjectEntry& rideEntry) + { + if (_filter.empty()) + return true; + + return IsFilterInRideType(rideEntry) || IsFilterInRideName(rideEntry) || IsFilterInIdentifier(rideEntry) + || IsFilterInAuthors(rideEntry) || IsFilterInFilename(rideEntry); + } + + bool IsFilterInRideType(const RideObjectEntry& rideEntry) + { + auto rideTypeName = GetRideNaming(rideEntry.ride_type[0], rideEntry).Name; + return String::Contains(u8string_view(LanguageGetString(rideTypeName)), _filter, true); + } + + bool IsFilterInRideName(const RideObjectEntry& rideEntry) + { + auto rideName = rideEntry.naming.Name; + return String::Contains(u8string_view(LanguageGetString(rideName)), _filter, true); + } + + bool IsFilterInAuthors(const RideObjectEntry& rideEntry) + { + auto rideObject = static_cast(rideEntry.obj); + auto authors = rideObject->GetAuthors(); + + for (auto author : authors) + if (String::Contains(author, _filter, true)) + return true; + + return false; + } + + bool IsFilterInIdentifier(const RideObjectEntry& rideEntry) + { + auto rideObject = static_cast(rideEntry.obj); + auto objectName = rideObject->GetObjectEntry().GetName(); + + return String::Contains(objectName, _filter, true); + } + + bool IsFilterInFilename(const RideObjectEntry& rideEntry) + { + auto rideObject = static_cast(rideEntry.obj); + auto repoItem = ObjectRepositoryFindObjectByEntry(&(rideObject->GetObjectEntry())); + + return String::Contains(repoItem->Path, _filter, true); + } + void SetPressedTab() { int32_t i{}; @@ -705,7 +796,7 @@ private: { pressed_widgets &= ~(1 << (WIDX_TAB_1 + i)); } - pressed_widgets |= 1LL << (WIDX_TAB_1 + _currentTab); + pressed_widgets |= 1LL << (WIDX_TAB_1 + static_cast(_currentTab)); } void RefreshWidgetSizing() @@ -735,6 +826,8 @@ private: if (_currentTab != RESEARCH_TAB) { widgets[WIDX_RIDE_LIST].type = WindowWidgetType::Scroll; + widgets[WIDX_FILTER_TEXT_BOX].type = WindowWidgetType::TextBox; + widgets[WIDX_FILTER_CLEAR_BUTTON].type = WindowWidgetType::Button; widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP].type = WindowWidgetType::Empty; widgets[WIDX_LAST_DEVELOPMENT_GROUP].type = WindowWidgetType::Empty; widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WindowWidgetType::Empty; @@ -746,6 +839,8 @@ private: else { widgets[WIDX_RIDE_LIST].type = WindowWidgetType::Empty; + widgets[WIDX_FILTER_TEXT_BOX].type = WindowWidgetType::Empty; + widgets[WIDX_FILTER_CLEAR_BUTTON].type = WindowWidgetType::Empty; widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP].type = WindowWidgetType::Groupbox; widgets[WIDX_LAST_DEVELOPMENT_GROUP].type = WindowWidgetType::Groupbox; widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WindowWidgetType::FlatBtn; @@ -805,14 +900,14 @@ private: void RestoreScrollPositionForCurrentTab() { - assert(_currentTab < std::size(_windowNewRideTabScroll)); + assert(static_cast(_currentTab) < std::size(_windowNewRideTabScroll)); auto& currentTabScroll = _windowNewRideTabScroll[_currentTab]; // Get maximum scroll height int32_t scrollWidth = 0; int32_t scrollHeight = 0; - window_get_scroll_size(this, 0, &scrollWidth, &scrollHeight); - const rct_widget& listWidget = widgets[WIDX_RIDE_LIST]; + WindowGetScrollSize(this, 0, &scrollWidth, &scrollHeight); + const Widget& listWidget = widgets[WIDX_RIDE_LIST]; const int32_t listWidgetHeight = listWidget.bottom - listWidget.top - 1; // Ensure the current tab scroll is within range @@ -822,10 +917,10 @@ private: WidgetScrollUpdateThumbs(*this, WIDX_RIDE_LIST); } - void DrawRideInformation(rct_drawpixelinfo& dpi, RideSelection item, const ScreenCoordsXY& screenPos, int32_t textWidth) + void DrawRideInformation(DrawPixelInfo& dpi, RideSelection item, const ScreenCoordsXY& screenPos, int32_t textWidth) { - rct_ride_entry* rideEntry = get_ride_entry(item.EntryIndex); - RideNaming rideNaming = get_ride_naming(item.Type, rideEntry); + const auto* rideEntry = GetRideEntryByIndex(item.EntryIndex); + RideNaming rideNaming = GetRideNaming(item.Type, *rideEntry); auto ft = Formatter(); UpdateVehicleAvailability(item.Type); @@ -833,7 +928,7 @@ private: // Ride name and description ft.Add(rideNaming.Name); ft.Add(rideNaming.Description); - DrawTextWrapped(&dpi, screenPos, textWidth, STR_NEW_RIDE_NAME_AND_DESCRIPTION, ft); + DrawTextWrapped(dpi, screenPos, textWidth, STR_NEW_RIDE_NAME_AND_DESCRIPTION, ft); if (!_vehicleAvailability.empty()) { @@ -841,13 +936,13 @@ private: { ft = Formatter(); ft.Add(rideEntry->naming.Name); - DrawTextEllipsised(&dpi, screenPos + ScreenCoordsXY{ 0, 39 }, WindowWidth - 2, STR_NEW_RIDE_VEHICLE_NAME, ft); + DrawTextEllipsised(dpi, screenPos + ScreenCoordsXY{ 0, 39 }, WindowWidth - 2, STR_NEW_RIDE_VEHICLE_NAME, ft); } else { ft = Formatter(); ft.Add(_vehicleAvailability.c_str()); - DrawTextEllipsised(&dpi, screenPos + ScreenCoordsXY{ 0, 39 }, WindowWidth - 2, STR_AVAILABLE_VEHICLES, ft); + DrawTextEllipsised(dpi, screenPos + ScreenCoordsXY{ 0, 39 }, WindowWidth - 2, STR_AVAILABLE_VEHICLES, ft); } } @@ -855,7 +950,7 @@ private: auto designCountStringId = GetDesignsAvailableStringId(count); ft = Formatter(); ft.Add(count); - DrawTextBasic(&dpi, screenPos + ScreenCoordsXY{ 0, 51 }, designCountStringId, ft); + DrawTextBasic(dpi, screenPos + ScreenCoordsXY{ 0, 51 }, designCountStringId, ft); // Price if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) @@ -874,13 +969,13 @@ private: ft = Formatter(); ft.Add(price); - DrawTextBasic(&dpi, screenPos + ScreenCoordsXY{ textWidth, 51 }, stringId, ft, { TextAlignment::RIGHT }); + DrawTextBasic(dpi, screenPos + ScreenCoordsXY{ textWidth, 51 }, stringId, ft, { TextAlignment::RIGHT }); } } - void DrawTabImage(rct_drawpixelinfo& dpi, NewRideTabId tab, int32_t spriteIndex) + void DrawTabImage(DrawPixelInfo& dpi, NewRideTabId tab, int32_t spriteIndex) { - WidgetIndex widgetIndex = WIDX_TAB_1 + tab; + WidgetIndex widgetIndex = WIDX_TAB_1 + static_cast(tab); if (widgets[widgetIndex].type != WindowWidgetType::Empty && !WidgetIsDisabled(*this, widgetIndex)) { @@ -890,13 +985,13 @@ private: spriteIndex += tab == THRILL_TAB ? ThrillRidesTabAnimationSequence[frame] : frame; - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(spriteIndex, colours[1]), windowPos + ScreenCoordsXY{ widgets[widgetIndex].left, widgets[widgetIndex].top }); } } - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { DrawTabImage(dpi, TRANSPORT_TAB, SPR_TAB_RIDES_TRANSPORT_0); DrawTabImage(dpi, GENTLE_TAB, SPR_TAB_RIDES_GENTLE_0); @@ -946,24 +1041,24 @@ void WindowNewRideInitVars() * * rct2: 0x006B3CFF */ -rct_window* WindowNewRideOpen() +WindowBase* WindowNewRideOpen() { - rct_window* window; + WindowBase* window; - window = window_bring_to_front_by_class(WindowClass::ConstructRide); + window = WindowBringToFrontByClass(WindowClass::ConstructRide); if (window) { return window; } - window_close_by_class(WindowClass::TrackDesignList); - window_close_by_class(WindowClass::TrackDesignPlace); + WindowCloseByClass(WindowClass::TrackDesignList); + WindowCloseByClass(WindowClass::TrackDesignPlace); window = WindowCreate(WindowClass::ConstructRide, WindowWidth, WindowHeight, WF_10 | WF_AUTO_POSITION); return window; } -rct_window* WindowNewRideOpenResearch() +WindowBase* WindowNewRideOpenResearch() { auto w = static_cast(WindowNewRideOpen()); w->SetPage(RESEARCH_TAB); @@ -976,13 +1071,13 @@ rct_window* WindowNewRideOpenResearch() */ void WindowNewRideFocus(RideSelection rideItem) { - auto w = static_cast(window_find_by_class(WindowClass::ConstructRide)); + auto w = static_cast(WindowFindByClass(WindowClass::ConstructRide)); if (!w) { return; } - rct_ride_entry* rideEntry = get_ride_entry(rideItem.EntryIndex); + const auto* rideEntry = GetRideEntryByIndex(rideItem.EntryIndex); if (rideEntry == nullptr) return; diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 9d2e123d64..0f2ce05ebb 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,9 +35,9 @@ enum WindowNewsWidgetIdx { }; -static rct_widget window_news_widgets[] = { +static Widget window_news_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget({372, 18}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, SPR_TAB_GEARS_0), // settings + MakeWidget({372, 18}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, ImageId(SPR_TAB_GEARS_0)), // settings MakeWidget({ 4, 44}, {392, 252}, WindowWidgetType::Scroll, WindowColour::Primary, SCROLL_VERTICAL), // scroll WIDGETS_END, }; @@ -50,7 +50,7 @@ private: int32_t _pressedNewsItemIndex{}, _pressedButtonIndex{}, _suspendUpdateTicks{}; static int32_t CalculateItemHeight() { - return 4 * font_get_line_height(FontStyle::Small) + 2; + return 4 * FontGetLineHeight(FontStyle::Small) + 2; } public: @@ -61,8 +61,8 @@ public: _pressedNewsItemIndex = -1; int32_t w = 0, h = 0; - rct_widget* widget = &widgets[WIDX_SCROLL]; - window_get_scroll_size(this, 0, &w, &h); + Widget* widget = &widgets[WIDX_SCROLL]; + WindowGetScrollSize(this, 0, &w, &h); scrolls[0].v_top = std::max(0, h - (widget->height() - 1)); WidgetScrollUpdateThumbs(*this, WIDX_SCROLL); } @@ -110,11 +110,11 @@ public: } else if (_pressedButtonIndex > 1) { - static rct_window* _mainWindow; + static WindowBase* _mainWindow; auto subjectLoc = News::GetSubjectLocation(newsItem.Type, newsItem.Assoc); - if (subjectLoc.has_value() && (_mainWindow = window_get_main()) != nullptr) + if (subjectLoc.has_value() && (_mainWindow = WindowGetMain()) != nullptr) { - window_scroll_to_location(*_mainWindow, subjectLoc.value()); + WindowScrollToLocation(*_mainWindow, subjectLoc.value()); } } } @@ -166,14 +166,14 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - int32_t lineHeight = font_get_line_height(FontStyle::Small); + int32_t lineHeight = FontGetLineHeight(FontStyle::Small); int32_t itemHeight = CalculateItemHeight(); int32_t y = 0; int32_t i = 0; @@ -190,7 +190,7 @@ public: } // Background - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { -1, y, 383, y + itemHeight - 1 }, colours[1], (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_GREY)); @@ -198,14 +198,14 @@ public: { auto ft = Formatter(); ft.Add(DateDayNames[newsItem.Day - 1]); - ft.Add(DateGameMonthNames[date_get_month(newsItem.MonthYear)]); - DrawTextBasic(&dpi, { 2, y }, STR_NEWS_DATE_FORMAT, ft, { COLOUR_WHITE, FontStyle::Small }); + ft.Add(DateGameMonthNames[DateGetMonth(newsItem.MonthYear)]); + DrawTextBasic(dpi, { 2, y }, STR_NEWS_DATE_FORMAT, ft, { COLOUR_WHITE, FontStyle::Small }); } // Item text { 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, { FontStyle::Small }); } // Subject button if ((newsItem.TypeHasSubject()) && !(newsItem.HasButton())) @@ -221,18 +221,18 @@ public: press = INSET_RECT_FLAG_BORDER_INSET; } } - gfx_fill_rect_inset(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 23, 23 } }, colours[2], press); + GfxFillRectInset(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 23, 23 } }, colours[2], press); switch (newsItem.Type) { case News::ItemType::Ride: - gfx_draw_sprite(&dpi, ImageId(SPR_RIDE), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_RIDE), screenCoords); break; case News::ItemType::Peep: case News::ItemType::PeepOnRide: { - rct_drawpixelinfo cliped_dpi; - if (!clip_drawpixelinfo(&cliped_dpi, &dpi, screenCoords + ScreenCoordsXY{ 1, 1 }, 22, 22)) + DrawPixelInfo cliped_dpi; + if (!ClipDrawPixelInfo(&cliped_dpi, &dpi, screenCoords + ScreenCoordsXY{ 1, 1 }, 22, 22)) { break; } @@ -260,24 +260,24 @@ public: ImageIndex imageId = GetPeepAnimation(spriteType).base_image + 1; auto image = ImageId(imageId, peep->TshirtColour, peep->TrousersColour); - gfx_draw_sprite(&cliped_dpi, image, clipCoords); + GfxDrawSprite(&cliped_dpi, image, clipCoords); break; } case News::ItemType::Money: case News::ItemType::Campaign: - gfx_draw_sprite(&dpi, ImageId(SPR_FINANCE), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_FINANCE), screenCoords); break; case News::ItemType::Research: - gfx_draw_sprite(&dpi, ImageId(newsItem.Assoc < 0x10000 ? SPR_NEW_SCENERY : SPR_NEW_RIDE), screenCoords); + GfxDrawSprite(&dpi, ImageId(newsItem.Assoc < 0x10000 ? SPR_NEW_SCENERY : SPR_NEW_RIDE), screenCoords); break; case News::ItemType::Peeps: - gfx_draw_sprite(&dpi, ImageId(SPR_GUESTS), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_GUESTS), screenCoords); break; case News::ItemType::Award: - gfx_draw_sprite(&dpi, ImageId(SPR_AWARD), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_AWARD), screenCoords); break; case News::ItemType::Graph: - gfx_draw_sprite(&dpi, ImageId(SPR_GRAPH), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_GRAPH), screenCoords); break; case News::ItemType::Null: case News::ItemType::Blank: @@ -298,8 +298,8 @@ public: if (i == _pressedNewsItemIndex && _pressedButtonIndex == 2) press = 0x20; } - gfx_fill_rect_inset(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 23, 23 } }, colours[2], press); - gfx_draw_sprite(&dpi, ImageId(SPR_LOCATE), screenCoords); + GfxFillRectInset(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ 23, 23 } }, colours[2], press); + GfxDrawSprite(&dpi, ImageId(SPR_LOCATE), screenCoords); } y += itemHeight; @@ -308,7 +308,7 @@ public: } }; -rct_window* WindowNewsOpen() +WindowBase* WindowNewsOpen() { return WindowFocusOrCreate(WindowClass::RecentNews, WW, WH, 0); } diff --git a/src/openrct2-ui/windows/NewsOptions.cpp b/src/openrct2-ui/windows/NewsOptions.cpp index 1e088d73b1..34ad3a4ecb 100644 --- a/src/openrct2-ui/windows/NewsOptions.cpp +++ b/src/openrct2-ui/windows/NewsOptions.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -68,7 +68,7 @@ enum WindowNewsOptionsWidgetIdx WIDX_CHECKBOX_0 }; -static rct_widget WindowNewsOptionsWidgets[] = { +static Widget WindowNewsOptionsWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, {400, 257}, WindowWidgetType::Resize, WindowColour::Secondary), // Tab content panel MakeTab ({ 3, 17} ), // Park tab @@ -158,7 +158,7 @@ public: int32_t y = baseCheckBox.top; int32_t checkboxWidgetIndex = WIDX_CHECKBOX_0; - rct_widget* checkboxWidget = &widgets[checkboxWidgetIndex]; + Widget* checkboxWidget = &widgets[checkboxWidgetIndex]; for (size_t i = 0; i < std::size(NewsItemOptionDefinitions); i++) { const NotificationDef* ndef = &NewsItemOptionDefinitions[i]; @@ -201,7 +201,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(&dpi); @@ -218,14 +218,14 @@ private: } } - void DrawTabImages(rct_drawpixelinfo* dpi) + void DrawTabImages(DrawPixelInfo* dpi) { DrawTabImage(dpi, NOTIFICATION_CATEGORY_PARK, SPR_TAB_PARK); DrawTabImage(dpi, NOTIFICATION_CATEGORY_RIDE, SPR_TAB_RIDE_0); DrawTabImage(dpi, NOTIFICATION_CATEGORY_GUEST, SPR_TAB_GUESTS_0); } - void DrawTabImage(rct_drawpixelinfo* dpi, int32_t p, int32_t spriteIndex) + void DrawTabImage(DrawPixelInfo* dpi, int32_t p, int32_t spriteIndex) { WidgetIndex widgetIndex = WIDX_FIRST_TAB + p; @@ -242,7 +242,7 @@ private: } const auto& widget = widgets[widgetIndex]; - gfx_draw_sprite(dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget.left, widget.top }); + GfxDrawSprite(dpi, ImageId(spriteIndex), windowPos + ScreenCoordsXY{ widget.left, widget.top }); } } @@ -271,7 +271,7 @@ private: }; }; -rct_window* WindowNewsOptionsOpen() +WindowBase* WindowNewsOptionsOpen() { return WindowFocusOrCreate(WindowClass::NotificationOptions, WW, WH, WF_CENTRE_SCREEN); } diff --git a/src/openrct2-ui/windows/ObjectLoadError.cpp b/src/openrct2-ui/windows/ObjectLoadError.cpp index c218863891..cfb68c9ee8 100644 --- a/src/openrct2-ui/windows/ObjectLoadError.cpp +++ b/src/openrct2-ui/windows/ObjectLoadError.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -121,7 +122,8 @@ private: ft.Add(static_cast(_downloadStatusInfo.Count)); ft.Add(static_cast(_downloadStatusInfo.Total)); ft.Add(_downloadStatusInfo.Name.c_str()); - format_string(str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS, ft.Data()); + OpenRCT2::FormatStringLegacy( + str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS, ft.Data()); } else { @@ -129,13 +131,13 @@ private: ft.Add(_downloadStatusInfo.Source.c_str()); ft.Add(static_cast(_downloadStatusInfo.Count)); ft.Add(static_cast(_downloadStatusInfo.Total)); - format_string( + OpenRCT2::FormatStringLegacy( str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS_FROM, ft.Data()); } auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string(str_downloading_objects)); - intent.putExtra(INTENT_EXTRA_CALLBACK, []() -> void { _downloadingObjects = false; }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string(str_downloading_objects)); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { _downloadingObjects = false; }); ContextOpenIntent(&intent); } } @@ -203,7 +205,7 @@ private: auto& entry = _entries[_currentDownloadIndex]; auto name = String::Trim(std::string(entry.GetName())); - log_verbose("Downloading object: [%s]:", name.c_str()); + LOG_VERBOSE("Downloading object: [%s]:", name.c_str()); _currentDownloadIndex++; UpdateProgress({ name, _lastDownloadSource, _currentDownloadIndex, _entries.size() }); try @@ -272,7 +274,7 @@ constexpr int32_t NAME_COL_LEFT = 4; constexpr int32_t SOURCE_COL_LEFT = (WW_LESS_PADDING / 4) + 1; constexpr int32_t TYPE_COL_LEFT = 5 * WW_LESS_PADDING / 8 + 1; -static rct_widget window_object_load_error_widgets[] = { +static Widget window_object_load_error_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ NAME_COL_LEFT, 57}, {108, 14}, WindowWidgetType::TableHeader, WindowColour::Primary, STR_OBJECT_NAME ), // 'Object name' header MakeWidget({SOURCE_COL_LEFT, 57}, {166, 14}, WindowWidgetType::TableHeader, WindowColour::Primary, STR_OBJECT_SOURCE ), // 'Object source' header @@ -288,7 +290,7 @@ static rct_widget window_object_load_error_widgets[] = { // clang-format on /** - * Returns an StringId that represents an rct_object_entry's type. + * Returns an StringId that represents an RCTObjectEntry's type. * * Could possibly be moved out of the window file if other * uses exist and a suitable location is found. @@ -322,7 +324,7 @@ static constexpr StringId GetStringFromObjectType(const ObjectType type) } } -class ObjectLoadErrorWindow final : public rct_window +class ObjectLoadErrorWindow final : public WindowBase { private: std::vector _invalidEntries; @@ -384,7 +386,7 @@ private: { selected_list_item = index; } - widget_invalidate(*this, WIDX_SCROLL); + WidgetInvalidate(*this, WIDX_SCROLL); } public: @@ -409,7 +411,7 @@ public: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); return; case WIDX_COPY_CURRENT: if (selected_list_item > -1 && selected_list_item < no_list_items) @@ -437,7 +439,7 @@ public: if (!WidgetIsHighlighted(*this, WIDX_SCROLL)) { _highlightedIndex = -1; - widget_invalidate(*this, WIDX_SCROLL); + WidgetInvalidate(*this, WIDX_SCROLL); } #ifndef DISABLE_HTTP @@ -480,29 +482,29 @@ public: else _highlightedIndex = selectedItem; - widget_invalidate(*this, WIDX_SCROLL); + WidgetInvalidate(*this, WIDX_SCROLL); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); // Draw explanatory message auto ft = Formatter(); ft.Add(STR_OBJECT_ERROR_WINDOW_EXPLANATION); - DrawTextWrapped(&dpi, windowPos + ScreenCoordsXY{ 5, 18 }, WW - 10, STR_BLACK_STRING, ft); + DrawTextWrapped(dpi, windowPos + ScreenCoordsXY{ 5, 18 }, WW - 10, STR_BLACK_STRING, ft); // Draw file name ft = Formatter(); ft.Add(STR_OBJECT_ERROR_WINDOW_FILE); ft.Add(_filePath.c_str()); - DrawTextEllipsised(&dpi, { windowPos.x + 5, windowPos.y + 43 }, WW - 5, STR_BLACK_STRING, ft); + DrawTextEllipsised(dpi, { windowPos.x + 5, windowPos.y + 43 }, WW - 5, STR_BLACK_STRING, ft); } - void OnScrollDraw(const int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(const int32_t scrollIndex, DrawPixelInfo& dpi) override { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; - gfx_fill_rect( + GfxFillRect( &dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); const int32_t listWidth = widgets[WIDX_SCROLL].width(); @@ -520,11 +522,11 @@ public: { listWidth, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }; // If hovering over item, change the color and fill the backdrop. if (i == selected_list_item) - gfx_fill_rect(&dpi, screenRect, ColourMapA[colours[1]].darker); + GfxFillRect(&dpi, screenRect, ColourMapA[colours[1]].darker); else if (i == _highlightedIndex) - gfx_fill_rect(&dpi, screenRect, ColourMapA[colours[1]].mid_dark); + GfxFillRect(&dpi, screenRect, ColourMapA[colours[1]].mid_dark); else if ((i & 1) != 0) // odd / even check - gfx_fill_rect(&dpi, screenRect, ColourMapA[colours[1]].light); + GfxFillRect(&dpi, screenRect, ColourMapA[colours[1]].light); // Draw the actual object entry's name... screenCoords.x = NAME_COL_LEFT - 3; @@ -534,18 +536,18 @@ public: auto name = entry.GetName(); char buffer[256]; String::Set(buffer, sizeof(buffer), name.data(), name.size()); - gfx_draw_string(&dpi, screenCoords, buffer, { COLOUR_DARK_GREEN }); + GfxDrawString(dpi, screenCoords, buffer, { COLOUR_DARK_GREEN }); if (entry.Generation == ObjectGeneration::DAT) { // ... source game ... - const auto sourceStringId = object_manager_get_source_game_string(entry.Entry.GetSourceGame()); - DrawTextBasic(&dpi, { SOURCE_COL_LEFT - 3, screenCoords.y }, sourceStringId, {}, { COLOUR_DARK_GREEN }); + const auto sourceStringId = ObjectManagerGetSourceGameString(entry.Entry.GetSourceGame()); + DrawTextBasic(dpi, { SOURCE_COL_LEFT - 3, screenCoords.y }, sourceStringId, {}, { COLOUR_DARK_GREEN }); } // ... and type const auto type = GetStringFromObjectType(entry.GetType()); - DrawTextBasic(&dpi, { TYPE_COL_LEFT - 3, screenCoords.y }, type, {}, { COLOUR_DARK_GREEN }); + DrawTextBasic(dpi, { TYPE_COL_LEFT - 3, screenCoords.y }, type, {}, { COLOUR_DARK_GREEN }); } } @@ -561,10 +563,10 @@ public: } }; -rct_window* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects) +WindowBase* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects) { // Check if window is already open - auto* window = window_bring_to_front_by_class(WindowClass::ObjectLoadError); + auto* window = WindowBringToFrontByClass(WindowClass::ObjectLoadError); if (window == nullptr) { window = WindowCreate(WindowClass::ObjectLoadError, WW, WH, 0); diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index cba4c21b9d..e3ac323f52 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -227,7 +227,7 @@ static constexpr const int32_t WH = 332; MakeTab ({158, 17}, STR_OPTIONS_MISCELLANEOUS_TIP ), \ MakeTab ({189, 17}, STR_OPTIONS_ADVANCED ) -static rct_widget window_options_display_widgets[] = { +static Widget window_options_display_widgets[] = { MAIN_OPTIONS_WIDGETS, MakeWidget ({ 5, 53}, {300, 170}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_HARDWARE_GROUP ), // Hardware group MakeWidget ({ 10, 67}, {145, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_FULLSCREEN_MODE, STR_FULLSCREEN_MODE_TIP ), // Fullscreen @@ -251,7 +251,7 @@ static rct_widget window_options_display_widgets[] = { WIDGETS_END, }; -static rct_widget window_options_rendering_widgets[] = { +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 @@ -275,7 +275,7 @@ static rct_widget window_options_rendering_widgets[] = { WIDGETS_END, }; -static rct_widget window_options_culture_widgets[] = { +static Widget window_options_culture_widgets[] = { MAIN_OPTIONS_WIDGETS, MakeWidget({ 10, 53}, {145, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_OPTIONS_LANGUAGE, STR_LANGUAGE_TIP ), // language MakeWidget({155, 53}, {145, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_STRING ), @@ -298,7 +298,7 @@ static rct_widget window_options_culture_widgets[] = { WIDGETS_END, }; -static rct_widget window_options_audio_widgets[] = { +static Widget window_options_audio_widgets[] = { MAIN_OPTIONS_WIDGETS, MakeWidget({ 10, 53}, {290, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Audio device MakeWidget({288, 54}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_AUDIO_DEVICE_TIP ), @@ -315,7 +315,7 @@ static rct_widget window_options_audio_widgets[] = { WIDGETS_END, }; -static rct_widget window_options_controls_and_interface_widgets[] = { +static Widget window_options_controls_and_interface_widgets[] = { MAIN_OPTIONS_WIDGETS, #define CONTROLS_GROUP_START 53 MakeWidget({ 5, CONTROLS_GROUP_START + 0}, {300, 92}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CONTROLS_GROUP ), // Controls group @@ -351,7 +351,7 @@ static rct_widget window_options_controls_and_interface_widgets[] = { #define SCENARIO_OPTIONS_START (SCENARIO_START + 55) #define TWEAKS_START (SCENARIO_OPTIONS_START + 39) -static rct_widget window_options_misc_widgets[] = { +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 @@ -380,7 +380,7 @@ static rct_widget window_options_misc_widgets[] = { #undef SCENARIO_START #undef TITLE_SEQUENCE_START -static rct_widget window_options_advanced_widgets[] = { +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 @@ -398,7 +398,7 @@ static rct_widget window_options_advanced_widgets[] = { WIDGETS_END, }; -static rct_widget *window_options_page_widgets[] = { +static Widget *window_options_page_widgets[] = { window_options_display_widgets, window_options_rendering_widgets, window_options_culture_widgets, @@ -552,7 +552,7 @@ public: CommonPrepareDrawAfter(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(&dpi); @@ -612,7 +612,7 @@ public: if (page == WINDOW_OPTIONS_PAGE_ADVANCED) return AdvancedTooltip(widgetIndex, fallback); - return rct_window::OnTooltip(widgetIndex, fallback); + return WindowBase::OnTooltip(widgetIndex, fallback); } private: @@ -622,7 +622,7 @@ private: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_TAB_DISPLAY: case WIDX_TAB_RENDERING: @@ -682,13 +682,13 @@ private: { case WIDX_UNCAP_FPS_CHECKBOX: gConfigGeneral.UncapFPS ^= 1; - drawing_engine_set_vsync(gConfigGeneral.UseVSync); + DrawingEngineSetVSync(gConfigGeneral.UseVSync); ConfigSaveDefault(); Invalidate(); break; case WIDX_USE_VSYNC_CHECKBOX: gConfigGeneral.UseVSync ^= 1; - drawing_engine_set_vsync(gConfigGeneral.UseVSync); + DrawingEngineSetVSync(gConfigGeneral.UseVSync); ConfigSaveDefault(); Invalidate(); break; @@ -724,7 +724,7 @@ private: void DisplayMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; switch (widgetIndex) { @@ -791,7 +791,7 @@ private: case WIDX_SCALE_UP: gConfigGeneral.WindowScale += 0.25f; ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); break; @@ -799,7 +799,7 @@ private: gConfigGeneral.WindowScale -= 0.25f; gConfigGeneral.WindowScale = std::max(0.5f, gConfigGeneral.WindowScale); ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); break; @@ -824,7 +824,7 @@ private: ContextSetFullscreenMode(static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)); ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } break; @@ -835,7 +835,7 @@ private: gConfigGeneral.FullscreenMode = static_cast(dropdownIndex); ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } break; case WIDX_DRAWING_ENGINE_DROPDOWN: @@ -845,7 +845,7 @@ private: DrawingEngine dstEngine = static_cast(dropdownIndex); gConfigGeneral.DrawingEngine = dstEngine; - bool recreate_window = drawing_engine_requires_new_window(srcEngine, dstEngine); + bool recreate_window = DrawingEngineRequiresNewWindow(srcEngine, dstEngine); RefreshVideo(recreate_window); ConfigSaveDefault(); Invalidate(); @@ -909,12 +909,12 @@ private: widgets[WIDX_DRAWING_ENGINE].text = DrawingEngineStringIds[EnumValue(gConfigGeneral.DrawingEngine)]; } - void DisplayDraw(rct_drawpixelinfo* dpi) + void DisplayDraw(DrawPixelInfo* dpi) { auto ft = Formatter(); ft.Add(static_cast(gConfigGeneral.WindowScale * 100)); DrawTextBasic( - dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SCALE].left + 1, widgets[WIDX_SCALE].top + 1 }, + *dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_SCALE].left + 1, widgets[WIDX_SCALE].top + 1 }, STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { colours[1] }); } #pragma endregion @@ -927,14 +927,14 @@ private: case WIDX_TILE_SMOOTHING_CHECKBOX: gConfigGeneral.LandscapeSmoothing ^= 1; ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_GRIDLINES_CHECKBOX: { gConfigGeneral.AlwaysShowGridlines ^= 1; ConfigSaveDefault(); - gfx_invalidate_screen(); - rct_window* mainWindow = window_get_main(); + GfxInvalidateScreen(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (gConfigGeneral.AlwaysShowGridlines) @@ -963,7 +963,7 @@ private: gConfigGeneral.UpperCaseBanners ^= 1; ConfigSaveDefault(); Invalidate(); - scrolling_text_invalidate(); + ScrollingTextInvalidate(); break; case WIDX_DISABLE_LIGHTNING_EFFECT_CHECKBOX: gConfigGeneral.DisableLightningEffect ^= 1; @@ -975,7 +975,7 @@ private: gConfigGeneral.RenderWeatherGloom = gConfigGeneral.RenderWeatherEffects; ConfigSaveDefault(); Invalidate(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_SHOW_GUEST_PURCHASES_CHECKBOX: gConfigGeneral.ShowGuestPurchases ^= 1; @@ -1002,7 +1002,7 @@ private: gDropdownItems[1].Args = STR_VIRTUAL_FLOOR_STYLE_TRANSPARENT; gDropdownItems[2].Args = STR_VIRTUAL_FLOOR_STYLE_GLASSY; - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; ShowDropdown(widget, 3); Dropdown::SetChecked(static_cast(gConfigGeneral.VirtualFloorStyle), true); @@ -1081,7 +1081,7 @@ private: #pragma region Culture tab events void CultureMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; switch (widgetIndex) { @@ -1161,7 +1161,7 @@ private: for (size_t i = 0; i < 4; i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[i].Args = DateFormatStringIds[i]; + gDropdownItems[i].Args = DateFormatStringIDs[i]; } ShowDropdown(widget, 4); Dropdown::SetChecked(gConfigGeneral.DateFormat, true); @@ -1195,7 +1195,7 @@ private: gConfigGeneral.CurrencyFormat = static_cast(dropdownIndex); } ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_DISTANCE_DROPDOWN: gConfigGeneral.MeasurementFormat = static_cast(dropdownIndex); @@ -1207,7 +1207,7 @@ private: { gConfigGeneral.TemperatureFormat = static_cast(dropdownIndex); ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } break; case WIDX_LANGUAGE_DROPDOWN: @@ -1215,23 +1215,23 @@ private: auto fallbackLanguage = LocalisationService_GetCurrentLanguage(); if (dropdownIndex != LocalisationService_GetCurrentLanguage() - 1) { - if (!language_open(dropdownIndex + 1)) + if (!LanguageOpen(dropdownIndex + 1)) { // Failed to open language file, try to recover by falling // back to previously used language - if (language_open(fallbackLanguage)) + if (LanguageOpen(fallbackLanguage)) { // It worked, so we can say it with error message in-game ContextShowError(STR_LANGUAGE_LOAD_FAILED, STR_NONE, {}); } // report error to console regardless - log_error("Failed to open language file."); + LOG_ERROR("Failed to open language file."); } else { gConfigGeneral.Language = dropdownIndex + 1; ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } } @@ -1241,7 +1241,7 @@ private: { gConfigGeneral.DateFormat = static_cast(dropdownIndex); ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } break; } @@ -1275,7 +1275,7 @@ private: } // Date format - widgets[WIDX_DATE_FORMAT].text = DateFormatStringIds[gConfigGeneral.DateFormat]; + widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[gConfigGeneral.DateFormat]; // Temperature: celsius/fahrenheit widgets[WIDX_TEMPERATURE].text = gConfigGeneral.TemperatureFormat == TemperatureUnit::Fahrenheit ? STR_FAHRENHEIT @@ -1304,7 +1304,7 @@ private: OpenRCT2::Audio::Pause(); else OpenRCT2::Audio::Resume(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); ConfigSaveDefault(); Invalidate(); break; @@ -1329,7 +1329,7 @@ private: void AudioMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; switch (widgetIndex) { @@ -1360,7 +1360,7 @@ private: ShowDropdown(widget, numItems); if (gConfigSound.TitleMusic == TitleMusicKind::None) Dropdown::SetChecked(0, true); - else if (gConfigSound.TitleMusic == TitleMusicKind::Rct2) + else if (gConfigSound.TitleMusic == TitleMusicKind::RCT2) Dropdown::SetChecked(1, true); } else @@ -1410,7 +1410,7 @@ private: auto titleMusic = static_cast(dropdownIndex); if (!IsRCT1TitleMusicAvailable() && dropdownIndex != 0) { - titleMusic = TitleMusicKind::Rct2; + titleMusic = TitleMusicKind::RCT2; } gConfigSound.TitleMusic = titleMusic; @@ -1552,43 +1552,43 @@ private: gConfigInterface.ToolbarShowFinances ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_TOOLBAR_SHOW_RESEARCH: gConfigInterface.ToolbarShowResearch ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_TOOLBAR_SHOW_CHEATS: gConfigInterface.ToolbarShowCheats ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_TOOLBAR_SHOW_NEWS: gConfigInterface.ToolbarShowNews ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_TOOLBAR_SHOW_MUTE: gConfigInterface.ToolbarShowMute ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_TOOLBAR_SHOW_CHAT: gConfigInterface.ToolbarShowChat ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_TOOLBAR_SHOW_ZOOM: gConfigInterface.ToolbarShowZoom ^= 1; ConfigSaveDefault(); Invalidate(); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case WIDX_INVERT_DRAG: gConfigGeneral.InvertViewportDrag ^= 1; @@ -1604,7 +1604,7 @@ private: void ControlsMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; switch (widgetIndex) { @@ -1672,7 +1672,7 @@ private: gConfigGeneral.ShowRealNamesOfGuests ^= 1; ConfigSaveDefault(); Invalidate(); - peep_update_names(gConfigGeneral.ShowRealNamesOfGuests); + PeepUpdateNames(gConfigGeneral.ShowRealNamesOfGuests); break; case WIDX_AUTO_STAFF_PLACEMENT: gConfigGeneral.AutoStaffPlacement ^= 1; @@ -1682,7 +1682,7 @@ private: case WIDX_SCENARIO_UNLOCKING: gConfigGeneral.ScenarioUnlockingEnabled ^= 1; ConfigSaveDefault(); - window_close_by_class(WindowClass::ScenarioSelect); + WindowCloseByClass(WindowClass::ScenarioSelect); break; case WIDX_AUTO_OPEN_SHOPS: gConfigGeneral.AutoOpenShops = !gConfigGeneral.AutoOpenShops; @@ -1693,7 +1693,7 @@ private: gConfigGeneral.AllowEarlyCompletion ^= 1; // Only the server can control this setting and needs to send the // current value of allow_early_completion to all clients - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) { auto setAllowEarlyCompletionAction = ScenarioSetSettingAction( ScenarioSetSetting::AllowEarlyCompletion, gConfigGeneral.AllowEarlyCompletion); @@ -1707,17 +1707,17 @@ private: void MiscMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; switch (widgetIndex) { case WIDX_TITLE_SEQUENCE_DROPDOWN: { - uint32_t numItems = static_cast(title_sequence_manager_get_count()); + uint32_t numItems = static_cast(TitleSequenceManagerGetCount()); for (size_t i = 0; i < numItems; i++) { gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM; - gDropdownItems[i].Args = reinterpret_cast(title_sequence_manager_get_name(i)); + gDropdownItems[i].Args = reinterpret_cast(TitleSequenceManagerGetName(i)); } gDropdownItems[numItems].Format = 0; @@ -1731,7 +1731,7 @@ private: Dropdown::Flag::StayOpen, numItems); auto selectedIndex = gConfigInterface.RandomTitleSequence ? numItems - 1 - : static_cast(title_get_current_sequence()); + : static_cast(TitleGetCurrentSequence()); Dropdown::SetChecked(selectedIndex, true); break; } @@ -1770,11 +1770,11 @@ private: { case WIDX_TITLE_SEQUENCE_DROPDOWN: { - auto numItems = static_cast(title_sequence_manager_get_count()); - if (dropdownIndex < numItems && dropdownIndex != static_cast(title_get_current_sequence())) + auto numItems = static_cast(TitleSequenceManagerGetCount()); + if (dropdownIndex < numItems && dropdownIndex != static_cast(TitleGetCurrentSequence())) { gConfigInterface.RandomTitleSequence = false; - title_sequence_change_preset(static_cast(dropdownIndex)); + TitleSequenceChangePreset(static_cast(dropdownIndex)); ConfigSaveDefault(); Invalidate(); } @@ -1801,7 +1801,7 @@ private: gConfigInterface.ScenarioselectLastTab = 0; ConfigSaveDefault(); Invalidate(); - window_close_by_class(WindowClass::ScenarioSelect); + WindowCloseByClass(WindowClass::ScenarioSelect); } break; } @@ -1816,21 +1816,21 @@ private: } else { - auto name = title_sequence_manager_get_name(title_get_config_sequence()); + auto name = TitleSequenceManagerGetName(TitleGetConfigSequence()); ft.Add(STR_STRING); ft.Add(name); } // The real name setting of clients is fixed to that of the server // and the server cannot change the setting during gameplay to prevent desyncs - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { disabled_widgets |= (1uLL << WIDX_REAL_NAME_CHECKBOX); widgets[WIDX_REAL_NAME_CHECKBOX].tooltip = STR_OPTION_DISABLED_DURING_NETWORK_PLAY; // Disable the use of the allow_early_completion option during network play on clients. // This is to prevent confusion on clients because changing this setting during network play wouldn't change // the way scenarios are completed during this network-session - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) { disabled_widgets |= (1uLL << WIDX_ALLOW_EARLY_COMPLETION); widgets[WIDX_ALLOW_EARLY_COMPLETION].tooltip = STR_OPTION_DISABLED_DURING_NETWORK_PLAY; @@ -1871,7 +1871,7 @@ private: case WIDX_DEBUGGING_TOOLS: gConfigGeneral.DebuggingTools ^= 1; ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_SAVE_PLUGIN_DATA_CHECKBOX: gConfigGeneral.SavePluginData ^= 1; @@ -1891,7 +1891,7 @@ private: case WIDX_PATH_TO_RCT1_BUTTON: { auto rct1path = OpenRCT2::GetContext()->GetUiContext()->ShowDirectoryDialog( - language_get_string(STR_PATH_TO_RCT1_BROWSER)); + LanguageGetString(STR_PATH_TO_RCT1_BROWSER)); if (!rct1path.empty()) { // Check if this directory actually contains RCT1 @@ -1940,7 +1940,7 @@ private: void AdvancedMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex - 1]; + Widget* widget = &widgets[widgetIndex - 1]; switch (widgetIndex) { @@ -1997,27 +1997,27 @@ private: widgets[WIDX_AUTOSAVE_FREQUENCY].text = AutosaveNames[gConfigGeneral.AutosaveFrequency]; } - void AdvancedDraw(rct_drawpixelinfo* dpi) + void AdvancedDraw(DrawPixelInfo* dpi) { auto ft = Formatter(); ft.Add(static_cast(gConfigGeneral.AutosaveAmount)); DrawTextBasic( - dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_AUTOSAVE_AMOUNT].left + 1, widgets[WIDX_AUTOSAVE_AMOUNT].top + 1 }, + *dpi, windowPos + ScreenCoordsXY{ widgets[WIDX_AUTOSAVE_AMOUNT].left + 1, widgets[WIDX_AUTOSAVE_AMOUNT].top + 1 }, STR_WINDOW_COLOUR_2_COMMA16, ft, { colours[1] }); const auto normalisedPath = Platform::StrDecompToPrecomp(gConfigGeneral.RCT1Path); ft = Formatter(); ft.Add(normalisedPath.c_str()); - rct_widget pathWidget = widgets[WIDX_PATH_TO_RCT1_BUTTON]; + Widget pathWidget = widgets[WIDX_PATH_TO_RCT1_BUTTON]; // Apply vertical alignment if appropriate. int32_t widgetHeight = pathWidget.bottom - pathWidget.top; - int32_t lineHeight = font_get_line_height(FontStyle::Medium); + int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); uint32_t padding = widgetHeight > lineHeight ? (widgetHeight - lineHeight) / 2 : 0; ScreenCoordsXY screenCoords = { windowPos.x + pathWidget.left + 1, windowPos.y + pathWidget.top + static_cast(padding) }; - DrawTextEllipsised(dpi, screenCoords, 277, STR_STRING, ft, { colours[1] }); + DrawTextEllipsised(*dpi, screenCoords, 277, STR_STRING, ft, { colours[1] }); } OpenRCT2String AdvancedTooltip(WidgetIndex widgetIndex, StringId fallback) @@ -2047,8 +2047,8 @@ private: widgets = window_options_page_widgets[page]; Invalidate(); - window_event_resize_call(this); - window_event_invalidate_call(this); + WindowEventResizeCall(this); + WindowEventInvalidateCall(this); InitScrollWidgets(); Invalidate(); } @@ -2060,7 +2060,7 @@ private: pressed_widgets |= 1LL << (WIDX_FIRST_TAB + page); } - void ShowDropdown(rct_widget* widget, int32_t num_items) + void ShowDropdown(Widget* widget, int32_t num_items) { // helper function, all dropdown boxes have similar properties WindowDropdownShowTextCustomWidth( @@ -2068,7 +2068,7 @@ private: Dropdown::Flag::StayOpen, num_items, widget->width() - 3); } - void DrawTabImages(rct_drawpixelinfo* dpi) + void DrawTabImages(DrawPixelInfo* dpi) { DrawTabImage(dpi, WINDOW_OPTIONS_PAGE_DISPLAY, SPR_TAB_PAINT_0); DrawTabImage(dpi, WINDOW_OPTIONS_PAGE_RENDERING, SPR_G2_TAB_TREE); @@ -2079,10 +2079,10 @@ private: DrawTabImage(dpi, WINDOW_OPTIONS_PAGE_ADVANCED, SPR_TAB_WRENCH_0); } - void DrawTabImage(rct_drawpixelinfo* dpi, int32_t p, int32_t spriteIndex) + void DrawTabImage(DrawPixelInfo* dpi, int32_t p, int32_t spriteIndex) { WidgetIndex widgetIndex = WIDX_FIRST_TAB + p; - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; auto screenCoords = windowPos + ScreenCoordsXY{ widget->left, widget->top }; @@ -2095,7 +2095,7 @@ private: } // Draw normal, enabled sprite. - gfx_draw_sprite(dpi, ImageId(spriteIndex), screenCoords); + GfxDrawSprite(dpi, ImageId(spriteIndex), screenCoords); } else { @@ -2103,21 +2103,21 @@ private: uint8_t window_colour = NOT_TRANSLUCENT(colours[widget->colour]); // Draw greyed out (light border bottom right shadow) - gfx_draw_sprite_solid( + GfxDrawSpriteSolid( dpi, ImageId(spriteIndex), screenCoords + ScreenCoordsXY{ 1, 1 }, ColourMapA[window_colour].lighter); // Draw greyed out (dark) - gfx_draw_sprite_solid(dpi, ImageId(spriteIndex), screenCoords, ColourMapA[window_colour].mid_light); + GfxDrawSpriteSolid(dpi, ImageId(spriteIndex), screenCoords, ColourMapA[window_colour].mid_light); } } void UpdateHeightMarkers() { ConfigSaveDefault(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } - uint8_t GetScrollPercentage(const rct_widget& widget, const rct_scroll& scroll) + uint8_t GetScrollPercentage(const Widget& widget, const ScrollBar& scroll) { uint8_t w = widget.width() - 1; return static_cast(scroll.h_left) / (scroll.h_right - w) * 100; @@ -2184,7 +2184,7 @@ private: * * rct2: 0x006BAC5B */ -rct_window* WindowOptionsOpen() +WindowBase* WindowOptionsOpen() { return WindowFocusOrCreate(WindowClass::Options, WW, WH, WF_CENTRE_SCREEN); } diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index ec24a12710..0775a13874 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,8 +22,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -93,53 +93,53 @@ enum WindowParkWidgetIdx { MakeTab ({158, 17}, STR_PARK_OBJECTIVE_TAB_TIP ), /* tab 6 */ \ MakeTab ({189, 17}, STR_PARK_AWARDS_TAB_TIP ) /* tab 7 */ -static rct_widget _entranceWidgets[] = { +static Widget _entranceWidgets[] = { MAIN_PARK_WIDGETS(230), MakeWidget({ 3, 46}, {202, 115}, WindowWidgetType::Viewport, WindowColour::Secondary ), // viewport MakeWidget({ 3, 161}, {202, 11}, WindowWidgetType::LabelCentred, WindowColour::Secondary ), // status MakeWidget({205, 49}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_OPEN_OR_CLOSE_PARK_TIP ), // open / close - MakeWidget({205, 73}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_BUY_LAND_RIGHTS, STR_BUY_LAND_AND_CONSTRUCTION_RIGHTS_TIP), // buy land rights - MakeWidget({205, 97}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP ), // locate - MakeWidget({205, 121}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RENAME, STR_NAME_PARK_TIP ), // rename - MakeWidget({210, 51}, { 14, 15}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_CLOSE_BUTTON_0, STR_CLOSE_PARK_TIP ), - MakeWidget({210, 66}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_OPEN_BUTTON_0, STR_OPEN_PARK_TIP ), + MakeWidget({205, 73}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_BUY_LAND_RIGHTS), STR_BUY_LAND_AND_CONSTRUCTION_RIGHTS_TIP), // buy land rights + MakeWidget({205, 97}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP ), // locate + MakeWidget({205, 121}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RENAME), STR_NAME_PARK_TIP ), // rename + MakeWidget({210, 51}, { 14, 15}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_CLOSE_BUTTON_0), STR_CLOSE_PARK_TIP ), + MakeWidget({210, 66}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_OPEN_BUTTON_0), STR_OPEN_PARK_TIP ), WIDGETS_END, }; -static rct_widget _ratingWidgets[] = { +static Widget _ratingWidgets[] = { MAIN_PARK_WIDGETS(255), WIDGETS_END, }; -static rct_widget _guestsWidgets[] = { +static Widget _guestsWidgets[] = { MAIN_PARK_WIDGETS(255), WIDGETS_END, }; -static rct_widget _priceWidgets[] = { +static Widget _priceWidgets[] = { MAIN_PARK_WIDGETS(230), MakeWidget ({ 21, 50}, {126, 14}, WindowWidgetType::Label, WindowColour::Secondary, STR_ADMISSION_PRICE), MakeSpinnerWidgets({147, 50}, { 76, 14}, WindowWidgetType::Spinner, WindowColour::Secondary ), // Price (3 widgets) WIDGETS_END, }; -static rct_widget _statsWidgets[] = { +static Widget _statsWidgets[] = { MAIN_PARK_WIDGETS(230), WIDGETS_END, }; -static rct_widget _objectiveWidgets[] = { +static Widget _objectiveWidgets[] = { MAIN_PARK_WIDGETS(230), MakeWidget({7, 207}, {216, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_ENTER_NAME_INTO_SCENARIO_CHART), // enter name WIDGETS_END, }; -static rct_widget _awardsWidgets[] = { +static Widget _awardsWidgets[] = { MAIN_PARK_WIDGETS(230), WIDGETS_END, }; -static std::array _pagedWidgets = { +static std::array _pagedWidgets = { _entranceWidgets, _ratingWidgets, _guestsWidgets, @@ -190,8 +190,8 @@ static constexpr const WindowParkAward _parkAwards[] = { class ParkWindow final : public Window { - int16_t _numberOfStaff = -1; - int16_t _numberOfRides = -1; + int32_t _numberOfStaff = -1; + int32_t _numberOfRides = -1; uint8_t _peepAnimationFrame = 0; public: @@ -207,10 +207,10 @@ public: void OnClose() override { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE) && classification == gCurrentToolWidget.window_classification + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE) && classification == gCurrentToolWidget.window_classification && number == gCurrentToolWidget.window_number) { - tool_cancel(); + ToolCancel(); } } @@ -362,7 +362,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { switch (page) { @@ -437,7 +437,7 @@ private: void OnResizeEntrance() { flags |= WF_RESIZABLE; - window_set_resize(*this, 230, 174 + 9, 230 * 3, (274 + 9) * 3); + WindowSetResize(*this, 230, 174 + 9, 230 * 3, (274 + 9) * 3); InitViewport(); } @@ -487,7 +487,7 @@ private: void OnUpdateEntrance() { frame_no++; - widget_invalidate(*this, WIDX_TAB_1); + WidgetInvalidate(*this, WIDX_TAB_1); } void OnTextInputEntrance(WidgetIndex widgetIndex, std::string_view text) @@ -515,10 +515,11 @@ private: ft.Add(STR_STRING); ft.Add(parkName); } - widgets[WIDX_OPEN_OR_CLOSE].image = ParkIsOpen() ? SPR_OPEN : SPR_CLOSED; - widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + !ParkIsOpen() * 2 - + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT); - widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + ParkIsOpen() * 2 + WidgetIsPressed(*this, WIDX_OPEN_LIGHT); + widgets[WIDX_OPEN_OR_CLOSE].image = ImageId(ParkIsOpen() ? SPR_OPEN : SPR_CLOSED); + const auto closeLightImage = SPR_G2_RCT1_CLOSE_BUTTON_0 + !ParkIsOpen() * 2 + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT); + widgets[WIDX_CLOSE_LIGHT].image = ImageId(closeLightImage); + const auto openLightImage = SPR_G2_RCT1_OPEN_BUTTON_0 + ParkIsOpen() * 2 + WidgetIsPressed(*this, WIDX_OPEN_LIGHT); + widgets[WIDX_OPEN_LIGHT].image = ImageId(openLightImage); // Only allow closing of park for guest / rating objective if (gScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) @@ -532,7 +533,7 @@ private: else widgets[WIDX_BUY_LAND_RIGHTS].type = WindowWidgetType::FlatBtn; - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); // Anchor entrance page specific widgets @@ -584,7 +585,7 @@ private: } } - void OnDrawEntrance(rct_drawpixelinfo& dpi) + void OnDrawEntrance(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); @@ -592,9 +593,9 @@ private: // Draw viewport if (viewport != nullptr) { - window_draw_viewport(&dpi, *this); + WindowDrawViewport(&dpi, *this); if (viewport->flags & VIEWPORT_FLAG_SOUND_ON) - gfx_draw_sprite(&dpi, ImageId(SPR_HEARING_VIEWPORT), windowPos + ScreenCoordsXY{ 2, 2 }); + GfxDrawSprite(&dpi, ImageId(SPR_HEARING_VIEWPORT), windowPos + ScreenCoordsXY{ 2, 2 }); } // Draw park closed / open label @@ -603,7 +604,7 @@ private: auto* labelWidget = &widgets[WIDX_STATUS]; DrawTextEllipsised( - &dpi, windowPos + ScreenCoordsXY{ labelWidget->midX(), labelWidget->top }, labelWidget->width(), STR_BLACK_STRING, + dpi, windowPos + ScreenCoordsXY{ labelWidget->midX(), labelWidget->top }, labelWidget->width(), STR_BLACK_STRING, ft, { TextAlignment::CENTRE }); } @@ -631,7 +632,7 @@ private: } // Call invalidate event - window_event_invalidate_call(this); + WindowEventInvalidateCall(this); focus = newFocus; @@ -640,8 +641,8 @@ private: // Create viewport if (viewport == nullptr) { - rct_widget* viewportWidget = &widgets[WIDX_VIEWPORT]; - viewport_create( + Widget* viewportWidget = &widgets[WIDX_VIEWPORT]; + ViewportCreate( this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, viewportWidget->width() - 1, viewportWidget->height() - 1, focus.value()); flags |= WF_NO_SCROLLING; @@ -659,13 +660,13 @@ private: #pragma region Rating page void OnResizeRating() { - window_set_resize(*this, 255, 182, 255, 182); + WindowSetResize(*this, 255, 182, 255, 182); } void OnUpdateRating() { frame_no++; - widget_invalidate(*this, WIDX_TAB_2); + WidgetInvalidate(*this, WIDX_TAB_2); } void OnPrepareDrawRating() @@ -680,25 +681,25 @@ private: SetPressedTab(); PrepareWindowTitleText(); - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); } - void OnDrawRating(rct_drawpixelinfo& dpi) + void OnDrawRating(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); auto screenPos = windowPos; - rct_widget* widget = &widgets[WIDX_PAGE_BACKGROUND]; + Widget* widget = &widgets[WIDX_PAGE_BACKGROUND]; // Current value auto ft = Formatter(); ft.Add(gParkRating); - DrawTextBasic(&dpi, screenPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_PARK_RATING_LABEL, ft); + DrawTextBasic(dpi, screenPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_PARK_RATING_LABEL, ft); // Graph border - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { screenPos + ScreenCoordsXY{ widget->left + 4, widget->top + 15 }, screenPos + ScreenCoordsXY{ widget->right - 4, widget->bottom - 4 } }, @@ -712,9 +713,8 @@ private: ft = Formatter(); ft.Add(axisValue); DrawTextBasic( - &dpi, screenPos + ScreenCoordsXY{ 10, 0 }, STR_GRAPH_AXIS_LABEL, ft, - { FontStyle::Small, TextAlignment::RIGHT }); - gfx_fill_rect_inset( + dpi, screenPos + ScreenCoordsXY{ 10, 0 }, STR_GRAPH_AXIS_LABEL, ft, { FontStyle::Small, TextAlignment::RIGHT }); + GfxFillRectInset( &dpi, { screenPos + ScreenCoordsXY{ 15, 5 }, screenPos + ScreenCoordsXY{ width - 32, 5 } }, colours[2], INSET_RECT_FLAG_BORDER_INSET); screenPos.y += 20; @@ -731,14 +731,14 @@ private: #pragma region Guests page void OnResizeGuests() { - window_set_resize(*this, 255, 182, 255, 182); + WindowSetResize(*this, 255, 182, 255, 182); } void OnUpdateGuests() { frame_no++; _peepAnimationFrame = (_peepAnimationFrame + 1) % 24; - widget_invalidate(*this, WIDX_TAB_3); + WidgetInvalidate(*this, WIDX_TAB_3); } void OnPrepareDrawGuests() @@ -753,25 +753,25 @@ private: SetPressedTab(); PrepareWindowTitleText(); - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); } - void OnDrawGuests(rct_drawpixelinfo& dpi) + void OnDrawGuests(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); auto screenPos = windowPos; - rct_widget* widget = &widgets[WIDX_PAGE_BACKGROUND]; + Widget* widget = &widgets[WIDX_PAGE_BACKGROUND]; // Current value auto ft = Formatter(); ft.Add(gNumGuestsInPark); - DrawTextBasic(&dpi, screenPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_GUESTS_IN_PARK_LABEL, ft); + DrawTextBasic(dpi, screenPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_GUESTS_IN_PARK_LABEL, ft); // Graph border - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { screenPos + ScreenCoordsXY{ widget->left + 4, widget->top + 15 }, screenPos + ScreenCoordsXY{ widget->right - 4, widget->bottom - 4 } }, @@ -785,9 +785,8 @@ private: ft = Formatter(); ft.Add(axisValue); DrawTextBasic( - &dpi, screenPos + ScreenCoordsXY{ 10, 0 }, STR_GRAPH_AXIS_LABEL, ft, - { FontStyle::Small, TextAlignment::RIGHT }); - gfx_fill_rect_inset( + dpi, screenPos + ScreenCoordsXY{ 10, 0 }, STR_GRAPH_AXIS_LABEL, ft, { FontStyle::Small, TextAlignment::RIGHT }); + GfxFillRectInset( &dpi, { screenPos + ScreenCoordsXY{ 15, 5 }, screenPos + ScreenCoordsXY{ width - 32, 5 } }, colours[2], INSET_RECT_FLAG_BORDER_INSET); screenPos.y += 20; @@ -817,7 +816,7 @@ private: #pragma region Price page void OnResizePrice() { - window_set_resize(*this, 230, 124, 230, 124); + WindowSetResize(*this, 230, 124, 230, 124); } void OnMouseDownPrice(WidgetIndex widgetIndex) @@ -827,14 +826,14 @@ private: case WIDX_INCREASE_PRICE: { const auto newFee = std::min(MAX_ENTRANCE_FEE, gParkEntranceFee + 1.00_GBP); - auto gameAction = SetParkEntranceFeeAction(static_cast(newFee)); + auto gameAction = ParkSetEntranceFeeAction(newFee); GameActions::Execute(&gameAction); break; } case WIDX_DECREASE_PRICE: { const auto newFee = std::max(0.00_GBP, gParkEntranceFee - 1.00_GBP); - auto gameAction = SetParkEntranceFeeAction(static_cast(newFee)); + auto gameAction = ParkSetEntranceFeeAction(newFee); GameActions::Execute(&gameAction); break; } @@ -844,7 +843,7 @@ private: void OnUpdatePrice() { frame_no++; - widget_invalidate(*this, WIDX_TAB_4); + WidgetInvalidate(*this, WIDX_TAB_4); } void OnPrepareDrawPrice() @@ -883,11 +882,11 @@ private: widgets[WIDX_DECREASE_PRICE].type = WindowWidgetType::Button; } - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); } - void OnDrawPrice(rct_drawpixelinfo& dpi) + void OnDrawPrice(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); @@ -896,42 +895,42 @@ private: + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 30 }; auto ft = Formatter(); ft.Add(gTotalIncomeFromAdmissions); - DrawTextBasic(&dpi, screenCoords, STR_INCOME_FROM_ADMISSIONS, ft); + DrawTextBasic(dpi, screenCoords, STR_INCOME_FROM_ADMISSIONS, ft); money64 parkEntranceFee = ParkGetEntranceFee(); 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); - DrawTextBasic(&dpi, screenCoords, stringId, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, stringId, ft, { colours[1] }); } #pragma endregion #pragma region Stats page void OnResizeStats() { - window_set_resize(*this, 230, 119, 230, 119); + WindowSetResize(*this, 230, 119, 230, 119); } void OnUpdateStats() { frame_no++; - widget_invalidate(*this, WIDX_TAB_5); + WidgetInvalidate(*this, WIDX_TAB_5); // Invalidate ride count if changed - const auto rideCount = ride_get_count(); + const auto rideCount = RideGetCount(); if (_numberOfRides != rideCount) { _numberOfRides = rideCount; - widget_invalidate(*this, WIDX_PAGE_BACKGROUND); + WidgetInvalidate(*this, WIDX_PAGE_BACKGROUND); } // Invalidate number of staff if changed - const auto staffCount = peep_get_staff_count(); + const auto staffCount = PeepGetStaffCount(); if (_numberOfStaff != staffCount) { _numberOfStaff = staffCount; - widget_invalidate(*this, WIDX_PAGE_BACKGROUND); + WidgetInvalidate(*this, WIDX_PAGE_BACKGROUND); } } @@ -947,11 +946,11 @@ private: SetPressedTab(); PrepareWindowTitleText(); - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); } - void OnDrawStats(rct_drawpixelinfo& dpi) + void OnDrawStats(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); @@ -965,11 +964,11 @@ private: if (gConfigGeneral.MeasurementFormat == MeasurementFormat::Imperial) { stringIndex = STR_PARK_SIZE_IMPERIAL_LABEL; - parkSize = squaredmetres_to_squaredfeet(parkSize); + parkSize = SquaredMetresToSquaredFeet(parkSize); } auto ft = Formatter(); ft.Add(parkSize); - DrawTextBasic(&dpi, screenCoords, stringIndex, ft); + DrawTextBasic(dpi, screenCoords, stringIndex, ft); screenCoords.y += LIST_ROW_HEIGHT; // Draw number of rides / attractions @@ -977,7 +976,7 @@ private: { ft = Formatter(); ft.Add(_numberOfRides); - DrawTextBasic(&dpi, screenCoords, STR_NUMBER_OF_RIDES_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_NUMBER_OF_RIDES_LABEL, ft); } screenCoords.y += LIST_ROW_HEIGHT; @@ -986,19 +985,19 @@ private: { ft = Formatter(); ft.Add(_numberOfStaff); - DrawTextBasic(&dpi, screenCoords, STR_STAFF_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_STAFF_LABEL, ft); } screenCoords.y += LIST_ROW_HEIGHT; // Draw number of guests in park ft = Formatter(); ft.Add(gNumGuestsInPark); - DrawTextBasic(&dpi, screenCoords, STR_GUESTS_IN_PARK_LABEL, ft); + DrawTextBasic(dpi, screenCoords, STR_GUESTS_IN_PARK_LABEL, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(gTotalAdmissions); - DrawTextBasic(&dpi, screenCoords, STR_TOTAL_ADMISSIONS, ft); + DrawTextBasic(dpi, screenCoords, STR_TOTAL_ADMISSIONS, ft); } #pragma endregion @@ -1019,16 +1018,16 @@ private: { #ifndef NO_TTF if (gCurrentTTFFontSet != nullptr) - window_set_resize(*this, 230, 270, 230, 270); + WindowSetResize(*this, 230, 270, 230, 270); else #endif - window_set_resize(*this, 230, 226, 230, 226); + WindowSetResize(*this, 230, 226, 230, 226); } void OnUpdateObjective() { frame_no++; - widget_invalidate(*this, WIDX_TAB_6); + WidgetInvalidate(*this, WIDX_TAB_6); } void OnTextInputObjective(WidgetIndex widgetIndex, std::string_view text) @@ -1036,7 +1035,7 @@ private: if (widgetIndex == WIDX_ENTER_NAME && !text.empty()) { std::string strText(text); - scenario_success_submit_name(strText.c_str()); + ScenarioSuccessSubmitName(strText.c_str()); Invalidate(); } } @@ -1056,11 +1055,11 @@ private: else widgets[WIDX_ENTER_NAME].type = WindowWidgetType::Empty; - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); } - void OnDrawObjective(rct_drawpixelinfo& dpi) + void OnDrawObjective(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); @@ -1071,11 +1070,11 @@ private: auto ft = Formatter(); ft.Add(STR_STRING); ft.Add(gScenarioDetails.c_str()); - screenCoords.y += DrawTextWrapped(&dpi, screenCoords, 222, STR_BLACK_STRING, ft); + screenCoords.y += DrawTextWrapped(dpi, screenCoords, 222, STR_BLACK_STRING, ft); screenCoords.y += 5; // Your objective: - DrawTextBasic(&dpi, screenCoords, STR_OBJECTIVE_LABEL); + DrawTextBasic(dpi, screenCoords, STR_OBJECTIVE_LABEL); screenCoords.y += LIST_ROW_HEIGHT; // Objective @@ -1093,14 +1092,14 @@ private: else { ft.Add(gScenarioObjective.NumGuests); - ft.Add(date_get_total_months(MONTH_OCTOBER, gScenarioObjective.Year)); + ft.Add(DateGetTotalMonths(MONTH_OCTOBER, gScenarioObjective.Year)); if (gScenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) ft.Add(gScenarioObjective.MinimumExcitement); else ft.Add(gScenarioObjective.Currency); } - screenCoords.y += DrawTextWrapped(&dpi, screenCoords, 221, ObjectiveNames[gScenarioObjective.Type], ft); + screenCoords.y += DrawTextWrapped(dpi, screenCoords, 221, ObjectiveNames[gScenarioObjective.Type], ft); screenCoords.y += 5; // Objective outcome @@ -1109,14 +1108,14 @@ private: if (gScenarioCompletedCompanyValue == COMPANY_VALUE_ON_FAILED_OBJECTIVE) { // Objective failed - DrawTextWrapped(&dpi, screenCoords, 222, STR_OBJECTIVE_FAILED); + DrawTextWrapped(dpi, screenCoords, 222, STR_OBJECTIVE_FAILED); } else { // Objective completed ft = Formatter(); ft.Add(gScenarioCompletedCompanyValue); - DrawTextWrapped(&dpi, screenCoords, 222, STR_OBJECTIVE_ACHIEVED, ft); + DrawTextWrapped(dpi, screenCoords, 222, STR_OBJECTIVE_ACHIEVED, ft); } } } @@ -1125,13 +1124,13 @@ private: #pragma region Awards page void OnResizeAwards() { - window_set_resize(*this, 230, 182, 230, 182); + WindowSetResize(*this, 230, 182, 230, 182); } void OnUpdateAwards() { frame_no++; - widget_invalidate(*this, WIDX_TAB_7); + WidgetInvalidate(*this, WIDX_TAB_7); } void OnPrepareDrawAwards() @@ -1146,11 +1145,11 @@ private: SetPressedTab(); PrepareWindowTitleText(); - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_7); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); } - void OnDrawAwards(rct_drawpixelinfo& dpi) + void OnDrawAwards(DrawPixelInfo& dpi) { DrawWidgets(dpi); DrawTabImages(dpi); @@ -1160,23 +1159,23 @@ private: for (const auto& award : GetAwards()) { - gfx_draw_sprite(&dpi, ImageId(_parkAwards[EnumValue(award.Type)].sprite), screenCoords); - DrawTextWrapped(&dpi, screenCoords + ScreenCoordsXY{ 34, 6 }, 180, _parkAwards[EnumValue(award.Type)].text); + GfxDrawSprite(&dpi, ImageId(_parkAwards[EnumValue(award.Type)].sprite), screenCoords); + DrawTextWrapped(dpi, screenCoords + ScreenCoordsXY{ 34, 6 }, 180, _parkAwards[EnumValue(award.Type)].text); screenCoords.y += 32; } if (GetAwards().empty()) - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ 6, 6 }, STR_NO_RECENT_AWARDS); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 6, 6 }, STR_NO_RECENT_AWARDS); } #pragma endregion #pragma region Common void SetPage(int32_t newPage) { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) if (classification == gCurrentToolWidget.window_classification && number == gCurrentToolWidget.window_number) - tool_cancel(); + ToolCancel(); // Set listen only to viewport bool listen = false; @@ -1193,9 +1192,9 @@ private: SetDisabledTabs(); Invalidate(); - window_event_resize_call(this); - window_event_invalidate_call(this); - window_event_update_call(this); + WindowEventResizeCall(this); + WindowEventInvalidateCall(this); + WindowEventUpdateCall(this); if (listen && viewport != nullptr) viewport->flags |= VIEWPORT_FLAG_SOUND_ON; } @@ -1212,12 +1211,12 @@ private: pressed_widgets |= 1LL << (WIDX_TAB_1 + page); } - void DrawTabImages(rct_drawpixelinfo& dpi) + void DrawTabImages(DrawPixelInfo& dpi) { // Entrance tab if (!WidgetIsDisabled(*this, WIDX_TAB_1)) { - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_TAB_PARK_ENTRANCE), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_1].left, widgets[WIDX_TAB_1].top }); } @@ -1228,11 +1227,11 @@ private: ImageId spriteIdx(SPR_TAB_GRAPH_0); if (page == WINDOW_PARK_PAGE_RATING) spriteIdx = spriteIdx.WithIndexOffset((frame_no / 8) % 8); - gfx_draw_sprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left, widgets[WIDX_TAB_2].top }); - gfx_draw_sprite( + GfxDrawSprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left, widgets[WIDX_TAB_2].top }); + GfxDrawSprite( &dpi, ImageId(SPR_RATING_HIGH), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left + 7, widgets[WIDX_TAB_2].top + 1 }); - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_RATING_LOW), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left + 16, widgets[WIDX_TAB_2].top + 12 }); } @@ -1243,13 +1242,13 @@ private: ImageId spriteIdx(SPR_TAB_GRAPH_0); if (page == WINDOW_PARK_PAGE_GUESTS) spriteIdx = spriteIdx.WithIndexOffset((frame_no / 8) % 8); - gfx_draw_sprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].left, widgets[WIDX_TAB_3].top }); + GfxDrawSprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].left, widgets[WIDX_TAB_3].top }); ImageId peepImage(GetPeepAnimation(PeepSpriteType::Normal).base_image + 1, COLOUR_BRIGHT_RED, COLOUR_TEAL); if (page == WINDOW_PARK_PAGE_GUESTS) peepImage = peepImage.WithIndexOffset(_peepAnimationFrame & 0xFFFFFFFC); - gfx_draw_sprite( + GfxDrawSprite( &dpi, peepImage, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].midX(), widgets[WIDX_TAB_3].bottom - 9 }); } @@ -1259,7 +1258,7 @@ private: ImageId spriteIdx(SPR_TAB_ADMISSION_0); if (page == WINDOW_PARK_PAGE_PRICE) spriteIdx = spriteIdx.WithIndexOffset((frame_no / 2) % 8); - gfx_draw_sprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_4].left, widgets[WIDX_TAB_4].top }); + GfxDrawSprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_4].left, widgets[WIDX_TAB_4].top }); } // Statistics tab @@ -1268,7 +1267,7 @@ private: ImageId spriteIdx(SPR_TAB_STATS_0); if (page == WINDOW_PARK_PAGE_STATS) spriteIdx = spriteIdx.WithIndexOffset((frame_no / 4) % 7); - gfx_draw_sprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_5].left, widgets[WIDX_TAB_5].top }); + GfxDrawSprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_5].left, widgets[WIDX_TAB_5].top }); } // Objective tab @@ -1277,13 +1276,13 @@ private: ImageId spriteIdx(SPR_TAB_OBJECTIVE_0); if (page == WINDOW_PARK_PAGE_OBJECTIVE) spriteIdx = spriteIdx.WithIndexOffset((frame_no / 4) % 16); - gfx_draw_sprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_6].left, widgets[WIDX_TAB_6].top }); + GfxDrawSprite(&dpi, spriteIdx, windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_6].left, widgets[WIDX_TAB_6].top }); } // Awards tab if (!WidgetIsDisabled(*this, WIDX_TAB_7)) { - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(SPR_TAB_AWARDS), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_7].left, widgets[WIDX_TAB_7].top }); } } @@ -1303,7 +1302,7 @@ static ParkWindow* ParkWindowOpen(uint8_t page) * * rct2: 0x00667C48 */ -rct_window* WindowParkEntranceOpen() +WindowBase* WindowParkEntranceOpen() { return ParkWindowOpen(WINDOW_PARK_PAGE_ENTRANCE); } @@ -1312,7 +1311,7 @@ rct_window* WindowParkEntranceOpen() * * rct2: 0x00667CA4 */ -rct_window* WindowParkRatingOpen() +WindowBase* WindowParkRatingOpen() { return ParkWindowOpen(WINDOW_PARK_PAGE_RATING); } @@ -1321,7 +1320,7 @@ rct_window* WindowParkRatingOpen() * * rct2: 0x00667D35 */ -rct_window* WindowParkGuestsOpen() +WindowBase* WindowParkGuestsOpen() { return ParkWindowOpen(WINDOW_PARK_PAGE_GUESTS); } @@ -1330,7 +1329,7 @@ rct_window* WindowParkGuestsOpen() * * rct2: 0x00667E57 */ -rct_window* WindowParkObjectiveOpen() +WindowBase* WindowParkObjectiveOpen() { auto* wnd = ParkWindowOpen(WINDOW_PARK_PAGE_OBJECTIVE); if (wnd != nullptr) @@ -1347,7 +1346,7 @@ rct_window* WindowParkObjectiveOpen() * * rct2: 0x00667DC6 */ -rct_window* WindowParkAwardsOpen() +WindowBase* WindowParkAwardsOpen() { return ParkWindowOpen(WINDOW_PARK_PAGE_AWARDS); } diff --git a/src/openrct2-ui/windows/PatrolArea.cpp b/src/openrct2-ui/windows/PatrolArea.cpp index c0d5e43ebb..5c5a775a38 100644 --- a/src/openrct2-ui/windows/PatrolArea.cpp +++ b/src/openrct2-ui/windows/PatrolArea.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,9 +40,9 @@ enum WindowPatrolAreaWidgetIdx }; // clang-format off -static rct_widget PatrolAreaWidgets[] = { +static Widget PatrolAreaWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget ({27, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , SPR_LAND_TOOL_SIZE_0 ), // preview box + MakeWidget ({27, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0) ), // preview box MakeRemapWidget({28, 18}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_PATROL_AREA_TIP), // decrement size MakeRemapWidget({54, 32}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_PATROL_AREA_TIP ), // increment size WIDGETS_END, @@ -57,7 +57,7 @@ public: widgets = PatrolAreaWidgets; hold_down_widgets = (1uLL << WIDX_INCREMENT) | (1uLL << WIDX_DECREMENT); WindowInitScrollWidgets(*this); - window_push_others_below(*this); + WindowPushOthersBelow(*this); gLandToolSize = 4; } @@ -65,7 +65,7 @@ public: { // If the tool wasn't changed, turn tool off if (PatrolAreaToolIsActive()) - tool_cancel(); + ToolCancel(); } void OnMouseUp(WidgetIndex widgetIndex) override @@ -128,10 +128,10 @@ public: void OnPrepareDraw() override { SetWidgetPressed(WIDX_PREVIEW, true); - PatrolAreaWidgets[WIDX_PREVIEW].image = LandTool::SizeToSpriteIndex(gLandToolSize); + PatrolAreaWidgets[WIDX_PREVIEW].image = ImageId(LandTool::SizeToSpriteIndex(gLandToolSize)); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -142,7 +142,7 @@ public: windowPos.y + PatrolAreaWidgets[WIDX_PREVIEW].midY() }; auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } } @@ -189,9 +189,9 @@ public: void OnToolAbort(WidgetIndex widgetIndex) override { - hide_gridlines(); + HideGridlines(); ClearPatrolAreaToRender(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void OnToolDown(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override @@ -240,16 +240,16 @@ private: if (PatrolAreaToolIsActive()) { SetPatrolAreaToRender(_staffId); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } else { - if (!tool_set(*this, 0, Tool::WalkDown)) + if (!ToolSet(*this, 0, Tool::WalkDown)) { - show_gridlines(); - input_set_flag(INPUT_FLAG_6, true); + ShowGridlines(); + InputSetFlag(INPUT_FLAG_6, true); SetPatrolAreaToRender(_staffId); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } } @@ -264,7 +264,7 @@ private: bool PatrolAreaToolIsActive() { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) return false; if (gCurrentToolWidget.window_classification != WindowClass::PatrolArea) return false; @@ -274,7 +274,7 @@ private: bool IsStaffWindowOpen() { // If staff window for this patrol area was closed, tool is no longer active - auto staffWindow = window_find_by_number(WindowClass::Peep, _staffId); + auto staffWindow = WindowFindByNumber(WindowClass::Peep, _staffId); return staffWindow != nullptr; } @@ -285,7 +285,7 @@ private: } }; -rct_window* WindowPatrolAreaOpen(EntityId staffId) +WindowBase* WindowPatrolAreaOpen(EntityId staffId) { auto w = WindowFocusOrCreate( WindowClass::PatrolArea, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0); @@ -298,6 +298,6 @@ rct_window* WindowPatrolAreaOpen(EntityId staffId) EntityId WindowPatrolAreaGetCurrentStaffId() { - auto current = reinterpret_cast(window_find_by_class(WindowClass::PatrolArea)); + auto current = reinterpret_cast(WindowFindByClass(WindowClass::PatrolArea)); return current != nullptr ? current->GetStaffId() : EntityId::GetNull(); } diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index a5c76bc83d..07a6092f48 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -57,22 +57,22 @@ enum WindowPlayerWidgetIdx { MakeTab ({ 3, 17} ), /* Tab 1 */ \ MakeTab ({ 34, 17} ) /* Tab 2 */ -static rct_widget window_player_overview_widgets[] = { +static Widget window_player_overview_widgets[] = { WINDOW_PLAYER_COMMON_WIDGETS, MakeWidget({ 3, 46}, {175, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Permission group MakeWidget({167, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), - MakeWidget({179, 45}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_LOCATE, STR_LOCATE_PLAYER_TIP), // Locate button - MakeWidget({179, 69}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_KICK_PLAYER_TIP ), // Kick button + MakeWidget({179, 45}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_PLAYER_TIP), // Locate button + MakeWidget({179, 69}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_KICK_PLAYER_TIP ), // Kick button MakeWidget({ 3, 60}, {175, 61}, WindowWidgetType::Viewport, WindowColour::Secondary ), // Viewport WIDGETS_END, }; -static rct_widget window_player_statistics_widgets[] = { +static Widget window_player_statistics_widgets[] = { WINDOW_PLAYER_COMMON_WIDGETS, WIDGETS_END, }; -static rct_widget *window_player_page_widgets[] = { +static Widget *window_player_page_widgets[] = { window_player_overview_widgets, window_player_statistics_widgets, }; @@ -81,14 +81,14 @@ static rct_widget *window_player_page_widgets[] = { #pragma region Events -static void WindowPlayerOverviewClose(rct_window *w); -static void WindowPlayerOverviewMouseUp(rct_window *w, WidgetIndex widgetIndex); -static void WindowPlayerOverviewResize(rct_window *w); -static void WindowPlayerOverviewMouseDown(rct_window *w, WidgetIndex widgetIndex, rct_widget *widget); -static void WindowPlayerOverviewDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowPlayerOverviewUpdate(rct_window* w); -static void WindowPlayerOverviewInvalidate(rct_window *w); -static void WindowPlayerOverviewPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowPlayerOverviewClose(WindowBase *w); +static void WindowPlayerOverviewMouseUp(WindowBase *w, WidgetIndex widgetIndex); +static void WindowPlayerOverviewResize(WindowBase *w); +static void WindowPlayerOverviewMouseDown(WindowBase *w, WidgetIndex widgetIndex, Widget *widget); +static void WindowPlayerOverviewDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowPlayerOverviewUpdate(WindowBase* w); +static void WindowPlayerOverviewInvalidate(WindowBase *w); +static void WindowPlayerOverviewPaint(WindowBase *w, DrawPixelInfo *dpi); static WindowEventList window_player_overview_events([](auto& events) { @@ -102,12 +102,12 @@ static WindowEventList window_player_overview_events([](auto& events) events.paint = &WindowPlayerOverviewPaint; }); -static void WindowPlayerStatisticsClose(rct_window *w); -static void WindowPlayerStatisticsMouseUp(rct_window *w, WidgetIndex widgetIndex); -static void WindowPlayerStatisticsResize(rct_window *w); -static void WindowPlayerStatisticsUpdate(rct_window* w); -static void WindowPlayerStatisticsInvalidate(rct_window *w); -static void WindowPlayerStatisticsPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowPlayerStatisticsClose(WindowBase *w); +static void WindowPlayerStatisticsMouseUp(WindowBase *w, WidgetIndex widgetIndex); +static void WindowPlayerStatisticsResize(WindowBase *w); +static void WindowPlayerStatisticsUpdate(WindowBase* w); +static void WindowPlayerStatisticsInvalidate(WindowBase *w); +static void WindowPlayerStatisticsPaint(WindowBase *w, DrawPixelInfo *dpi); static WindowEventList window_player_statistics_events([](auto& events) { @@ -128,16 +128,16 @@ static WindowEventList *window_player_page_events[] = { // clang-format on -static void WindowPlayerSetPage(rct_window* w, int32_t page); -static void WindowPlayerDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w); -static void WindowPlayerUpdateViewport(rct_window* w, bool scroll); -static void WindowPlayerUpdateTitle(rct_window* w); +static void WindowPlayerSetPage(WindowBase* w, int32_t page); +static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, WindowBase* w); +static void WindowPlayerUpdateViewport(WindowBase* w, bool scroll); +static void WindowPlayerUpdateTitle(WindowBase* w); -rct_window* WindowPlayerOpen(uint8_t id) +WindowBase* WindowPlayerOpen(uint8_t id) { - rct_window* window; + WindowBase* window; - window = window_bring_to_front_by_number(WindowClass::Player, id); + window = WindowBringToFrontByNumber(WindowClass::Player, id); if (window == nullptr) { window = WindowCreateAutoPos(240, 170, &window_player_overview_events, WindowClass::Player, WF_RESIZABLE); @@ -169,11 +169,11 @@ rct_window* WindowPlayerOpen(uint8_t id) return window; } -static void WindowPlayerOverviewShowGroupDropdown(rct_window* w, rct_widget* widget) +static void WindowPlayerOverviewShowGroupDropdown(WindowBase* w, Widget* widget) { - rct_widget* dropdownWidget; + Widget* dropdownWidget; int32_t numItems, i; - int32_t player = network_get_player_index(static_cast(w->number)); + int32_t player = NetworkGetPlayerIndex(static_cast(w->number)); if (player == -1) { return; @@ -181,31 +181,31 @@ static void WindowPlayerOverviewShowGroupDropdown(rct_window* w, rct_widget* wid dropdownWidget = widget - 1; - numItems = network_get_num_groups(); + numItems = NetworkGetNumGroups(); WindowDropdownShowTextCustomWidth( { w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, w->colours[1], 0, 0, numItems, widget->right - dropdownWidget->left); - for (i = 0; i < network_get_num_groups(); i++) + for (i = 0; i < NetworkGetNumGroups(); i++) { gDropdownItems[i].Format = STR_OPTIONS_DROPDOWN_ITEM; - gDropdownItems[i].Args = reinterpret_cast(network_get_group_name(i)); + gDropdownItems[i].Args = reinterpret_cast(NetworkGetGroupName(i)); } - Dropdown::SetChecked(network_get_group_index(network_get_player_group(player)), true); + Dropdown::SetChecked(NetworkGetGroupIndex(NetworkGetPlayerGroup(player)), true); } -void WindowPlayerOverviewClose(rct_window* w) +void WindowPlayerOverviewClose(WindowBase* w) { } -void WindowPlayerOverviewMouseUp(rct_window* w, WidgetIndex widgetIndex) +void WindowPlayerOverviewMouseUp(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -213,18 +213,18 @@ void WindowPlayerOverviewMouseUp(rct_window* w, WidgetIndex widgetIndex) break; case WIDX_LOCATE: { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - int32_t player = network_get_player_index(static_cast(w->number)); + int32_t player = NetworkGetPlayerIndex(static_cast(w->number)); if (player == -1) { return; } - auto coord = network_get_player_last_action_coord(player); + auto coord = NetworkGetPlayerLastActionCoord(player); if (coord.x || coord.y || coord.z) { - window_scroll_to_location(*mainWindow, coord); + WindowScrollToLocation(*mainWindow, coord); } } } @@ -238,7 +238,7 @@ void WindowPlayerOverviewMouseUp(rct_window* w, WidgetIndex widgetIndex) } } -void WindowPlayerOverviewMouseDown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +void WindowPlayerOverviewMouseDown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { switch (widgetIndex) { @@ -248,10 +248,10 @@ void WindowPlayerOverviewMouseDown(rct_window* w, WidgetIndex widgetIndex, rct_w } } -void WindowPlayerOverviewDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +void WindowPlayerOverviewDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { const auto playerId = static_cast(w->number); - const auto playerIdx = network_get_player_index(playerId); + const auto playerIdx = NetworkGetPlayerIndex(playerId); if (playerIdx == -1) { return; @@ -260,31 +260,31 @@ void WindowPlayerOverviewDropdown(rct_window* w, WidgetIndex widgetIndex, int32_ { return; } - const auto groupId = network_get_group_id(dropdownIndex); + const auto groupId = NetworkGetGroupID(dropdownIndex); const auto windowHandle = std::make_pair(w->classification, w->number); auto playerSetGroupAction = PlayerSetGroupAction(playerId, groupId); playerSetGroupAction.SetCallback([windowHandle](const GameAction* ga, const GameActions::Result* result) { if (result->Error == GameActions::Status::Ok) { - window_invalidate_by_number(windowHandle.first, windowHandle.second); + WindowInvalidateByNumber(windowHandle.first, windowHandle.second); } }); GameActions::Execute(&playerSetGroupAction); } -void WindowPlayerOverviewResize(rct_window* w) +void WindowPlayerOverviewResize(WindowBase* w) { - window_set_resize(*w, 240, 170, 500, 300); + WindowSetResize(*w, 240, 170, 500, 300); } -void WindowPlayerOverviewUpdate(rct_window* w) +void WindowPlayerOverviewUpdate(WindowBase* w) { w->frame_no++; - widget_invalidate(*w, WIDX_TAB_1 + w->page); + WidgetInvalidate(*w, WIDX_TAB_1 + w->page); - if (network_get_player_index(static_cast(w->number)) == -1) + if (NetworkGetPlayerIndex(static_cast(w->number)) == -1) { - window_close(*w); + WindowClose(*w); return; } @@ -292,39 +292,39 @@ void WindowPlayerOverviewUpdate(rct_window* w) bool scroll = true; // Use this spare window field for rotation check - if (w->var_4AE != get_current_rotation()) + if (w->var_4AE != GetCurrentRotation()) { - w->var_4AE = get_current_rotation(); + w->var_4AE = GetCurrentRotation(); scroll = false; } WindowPlayerUpdateViewport(w, scroll); } -void WindowPlayerOverviewPaint(rct_window* w, rct_drawpixelinfo* dpi) +void WindowPlayerOverviewPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowPlayerDrawTabImages(dpi, w); - int32_t player = network_get_player_index(static_cast(w->number)); + int32_t player = NetworkGetPlayerIndex(static_cast(w->number)); if (player == -1) { return; } // Draw current group - int32_t groupindex = network_get_group_index(network_get_player_group(player)); + int32_t groupindex = NetworkGetGroupIndex(NetworkGetPlayerGroup(player)); if (groupindex != -1) { - rct_widget* widget = &window_player_overview_widgets[WIDX_GROUP]; + Widget* widget = &window_player_overview_widgets[WIDX_GROUP]; thread_local std::string _buffer; _buffer.assign("{WINDOW_COLOUR_2}"); - _buffer += network_get_group_name(groupindex); + _buffer += NetworkGetGroupName(groupindex); auto ft = Formatter(); ft.Add(_buffer.c_str()); DrawTextEllipsised( - dpi, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft, + *dpi, w->windowPos + ScreenCoordsXY{ widget->midX() - 5, widget->top }, widget->width() - 8, STR_STRING, ft, { TextAlignment::CENTRE }); } @@ -333,35 +333,35 @@ void WindowPlayerOverviewPaint(rct_window* w, rct_drawpixelinfo* dpi) auto ft = Formatter(); ft.Add(STR_PING); - DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawTextBasic(*dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); char ping[64]; - snprintf(ping, 64, "%d ms", network_get_player_ping(player)); - gfx_draw_string(dpi, screenCoords + ScreenCoordsXY(30, 0), ping, { w->colours[2] }); + snprintf(ping, 64, "%d ms", NetworkGetPlayerPing(player)); + GfxDrawString(*dpi, screenCoords + ScreenCoordsXY(30, 0), ping, { w->colours[2] }); // Draw last action screenCoords = w->windowPos + ScreenCoordsXY{ w->width / 2, w->height - 13 }; int32_t width = w->width - 8; - int32_t lastaction = network_get_player_last_action(player, 0); + int32_t lastaction = NetworkGetPlayerLastAction(player, 0); ft = Formatter(); if (lastaction != -999) { - ft.Add(network_get_action_name_string_id(lastaction)); + ft.Add(NetworkGetActionNameStringID(lastaction)); } else { ft.Add(STR_ACTION_NA); } - DrawTextEllipsised(dpi, screenCoords, width, STR_LAST_ACTION_RAN, ft, { TextAlignment::CENTRE }); + DrawTextEllipsised(*dpi, screenCoords, width, STR_LAST_ACTION_RAN, ft, { TextAlignment::CENTRE }); if (w->viewport != nullptr && w->var_492 != -1) { - window_draw_viewport(dpi, *w); + WindowDrawViewport(dpi, *w); } } -void WindowPlayerOverviewInvalidate(rct_window* w) +void WindowPlayerOverviewInvalidate(WindowBase* w) { - int32_t playerIndex = network_get_player_index(static_cast(w->number)); + int32_t playerIndex = NetworkGetPlayerIndex(static_cast(w->number)); if (playerIndex == -1) { return; @@ -393,12 +393,12 @@ void WindowPlayerOverviewInvalidate(rct_window* w) w->widgets[WIDX_GROUP_DROPDOWN].left = w->widgets[WIDX_GROUP].right - 10; w->widgets[WIDX_GROUP_DROPDOWN].right = w->widgets[WIDX_GROUP].right; - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_2); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_2); - rct_viewport* viewport = w->viewport; + Viewport* viewport = w->viewport; if (viewport != nullptr) { - rct_widget* viewportWidget = &window_player_overview_widgets[WIDX_VIEWPORT]; + Widget* viewportWidget = &window_player_overview_widgets[WIDX_VIEWPORT]; viewport->pos = w->windowPos + ScreenCoordsXY{ viewportWidget->left, viewportWidget->top }; viewport->width = viewportWidget->width(); @@ -408,13 +408,13 @@ void WindowPlayerOverviewInvalidate(rct_window* w) } // Only enable kick button for other players - const bool canKick = network_can_perform_action(network_get_current_player_group_index(), NetworkPermission::KickPlayer); - const bool isServer = network_get_player_flags(playerIndex) & NETWORK_PLAYER_FLAG_ISSERVER; - const bool isOwnWindow = (network_get_current_player_id() == w->number); + const bool canKick = NetworkCanPerformAction(NetworkGetCurrentPlayerGroupIndex(), NetworkPermission::KickPlayer); + const bool isServer = NetworkGetPlayerFlags(playerIndex) & NETWORK_PLAYER_FLAG_ISSERVER; + const bool isOwnWindow = (NetworkGetCurrentPlayerId() == w->number); WidgetSetEnabled(*w, WIDX_KICK, canKick && !isOwnWindow && !isServer); } -void WindowPlayerStatisticsClose(rct_window* w) +void WindowPlayerStatisticsClose(WindowBase* w) { if (w->error.var_480) { @@ -422,12 +422,12 @@ void WindowPlayerStatisticsClose(rct_window* w) } } -void WindowPlayerStatisticsMouseUp(rct_window* w, WidgetIndex widgetIndex) +void WindowPlayerStatisticsMouseUp(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -436,23 +436,23 @@ void WindowPlayerStatisticsMouseUp(rct_window* w, WidgetIndex widgetIndex) } } -void WindowPlayerStatisticsResize(rct_window* w) +void WindowPlayerStatisticsResize(WindowBase* w) { - window_set_resize(*w, 210, 80, 210, 80); + WindowSetResize(*w, 210, 80, 210, 80); } -void WindowPlayerStatisticsUpdate(rct_window* w) +void WindowPlayerStatisticsUpdate(WindowBase* w) { w->frame_no++; - widget_invalidate(*w, WIDX_TAB_1 + w->page); + WidgetInvalidate(*w, WIDX_TAB_1 + w->page); - if (network_get_player_index(static_cast(w->number)) == -1) + if (NetworkGetPlayerIndex(static_cast(w->number)) == -1) { - window_close(*w); + WindowClose(*w); } } -void WindowPlayerStatisticsInvalidate(rct_window* w) +void WindowPlayerStatisticsInvalidate(WindowBase* w) { if (window_player_page_widgets[w->page] != w->widgets) { @@ -468,15 +468,15 @@ void WindowPlayerStatisticsInvalidate(rct_window* w) w->ResizeFrameWithPage(); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_2); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_2); } -void WindowPlayerStatisticsPaint(rct_window* w, rct_drawpixelinfo* dpi) +void WindowPlayerStatisticsPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowPlayerDrawTabImages(dpi, w); - int32_t player = network_get_player_index(static_cast(w->number)); + int32_t player = NetworkGetPlayerIndex(static_cast(w->number)); if (player == -1) { return; @@ -487,17 +487,17 @@ void WindowPlayerStatisticsPaint(rct_window* w, rct_drawpixelinfo* dpi) window_player_overview_widgets[WIDX_PAGE_BACKGROUND].top + 4 }; auto ft = Formatter(); - ft.Add(network_get_player_commands_ran(player)); - DrawTextBasic(dpi, screenCoords, STR_COMMANDS_RAN, ft); + ft.Add(NetworkGetPlayerCommandsRan(player)); + DrawTextBasic(*dpi, screenCoords, STR_COMMANDS_RAN, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); - ft.Add(network_get_player_money_spent(player)); - DrawTextBasic(dpi, screenCoords, STR_MONEY_SPENT, ft); + ft.Add(NetworkGetPlayerMoneySpent(player)); + DrawTextBasic(*dpi, screenCoords, STR_MONEY_SPENT, ft); } -static void WindowPlayerSetPage(rct_window* w, int32_t page) +static void WindowPlayerSetPage(WindowBase* w, int32_t page) { int32_t originalPage = w->page; @@ -511,8 +511,8 @@ static void WindowPlayerSetPage(rct_window* w, int32_t page) w->pressed_widgets = 0; w->widgets = window_player_page_widgets[page]; w->Invalidate(); - window_event_resize_call(w); - window_event_invalidate_call(w); + WindowEventResizeCall(w); + WindowEventInvalidateCall(w); WindowInitScrollWidgets(*w); w->Invalidate(); @@ -521,14 +521,14 @@ static void WindowPlayerSetPage(rct_window* w, int32_t page) if (w->viewport == nullptr) { const auto focus = Focus(TileCoordsXYZ(128, 128, 0).ToCoordsXYZ()); - viewport_create(w, w->windowPos, w->width, w->height, focus); + ViewportCreate(w, w->windowPos, w->width, w->height, focus); w->flags |= WF_NO_SCROLLING; - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); WindowPlayerUpdateViewport(w, false); } else if (originalPage != page) { - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); WindowPlayerUpdateViewport(w, false); } } @@ -538,16 +538,16 @@ static void WindowPlayerSetPage(rct_window* w, int32_t page) } } -static void WindowPlayerDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, WindowBase* w) { - rct_widget* widget; + Widget* widget; // Tab 1 if (!WidgetIsDisabled(*w, WIDX_TAB_1)) { widget = &w->widgets[WIDX_TAB_1]; auto screenCoords = w->windowPos + ScreenCoordsXY{ widget->left, widget->top }; - gfx_draw_sprite(dpi, ImageId(SPR_PEEP_LARGE_FACE_NORMAL), screenCoords); + GfxDrawSprite(dpi, ImageId(SPR_PEEP_LARGE_FACE_NORMAL), screenCoords); } // Tab 2 @@ -562,22 +562,22 @@ static void WindowPlayerDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w) imageId += (w->frame_no / 2) & 7; } - gfx_draw_sprite(dpi, ImageId(imageId), screenCoords); + GfxDrawSprite(dpi, ImageId(imageId), screenCoords); } } -static void WindowPlayerUpdateViewport(rct_window* w, bool scroll) +static void WindowPlayerUpdateViewport(WindowBase* w, bool scroll) { - int32_t playerIndex = network_get_player_index(static_cast(w->number)); + int32_t playerIndex = NetworkGetPlayerIndex(static_cast(w->number)); if (playerIndex == -1) { return; } - rct_viewport* viewport = w->viewport; + Viewport* viewport = w->viewport; if (viewport != nullptr) { - auto coord = network_get_player_last_action_coord(playerIndex); + auto coord = NetworkGetPlayerLastActionCoord(playerIndex); if (coord.x != 0 || coord.y != 0 || coord.z != 0) { auto centreLoc = centre_2d_coordinates(coord, viewport); @@ -599,7 +599,7 @@ static void WindowPlayerUpdateViewport(rct_window* w, bool scroll) { w->viewport->viewPos = centreLoc.value(); } - widget_invalidate(*w, WIDX_VIEWPORT); + WidgetInvalidate(*w, WIDX_VIEWPORT); } // Draw the viewport @@ -613,13 +613,13 @@ static void WindowPlayerUpdateViewport(rct_window* w, bool scroll) } } -static void WindowPlayerUpdateTitle(rct_window* w) +static void WindowPlayerUpdateTitle(WindowBase* w) { auto ft = Formatter::Common(); - int32_t player = network_get_player_index(static_cast(w->number)); + int32_t player = NetworkGetPlayerIndex(static_cast(w->number)); if (player != -1) { - ft.Add(network_get_player_name(player)); // set title caption to player name + ft.Add(NetworkGetPlayerName(player)); // set title caption to player name } else { diff --git a/src/openrct2-ui/windows/RefurbishRidePrompt.cpp b/src/openrct2-ui/windows/RefurbishRidePrompt.cpp index 373e515a53..d5be63fb17 100644 --- a/src/openrct2-ui/windows/RefurbishRidePrompt.cpp +++ b/src/openrct2-ui/windows/RefurbishRidePrompt.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,7 +30,7 @@ enum WindowRideRefurbishWidgetIdx WIDX_CANCEL }; -static rct_widget window_ride_refurbish_widgets[] = +static Widget window_ride_refurbish_widgets[] = { WINDOW_SHIM_WHITE(STR_REFURBISH_RIDE, WW, WH), MakeWidget({ 10, WH - 22 }, { 85, 14 }, WindowWidgetType::Button, WindowColour::Primary, STR_REFURBISH), @@ -41,13 +41,13 @@ static rct_widget window_ride_refurbish_widgets[] = class RefurbishRidePromptWindow final : public Window { - money32 _demolishRideCost; + money64 _demolishRideCost; public: - void SetRide(Ride* currentRide) + void SetRide(const Ride& currentRide) { - rideId = currentRide->id; - _demolishRideCost = -ride_get_refund_price(currentRide); + rideId = currentRide.id; + _demolishRideCost = -RideGetRefundPrice(currentRide); } void OnOpen() override @@ -73,11 +73,11 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); - auto currentRide = get_ride(rideId); + auto currentRide = GetRide(rideId); if (currentRide != nullptr) { auto stringId = (gParkFlags & PARK_FLAGS_NO_MONEY) ? STR_REFURBISH_RIDE_ID_NO_MONEY : STR_REFURBISH_RIDE_ID_MONEY; @@ -86,21 +86,21 @@ public: ft.Add(_demolishRideCost / 2); ScreenCoordsXY stringCoords(windowPos.x + WW / 2, windowPos.y + (WH / 2) - 3); - DrawTextWrapped(&dpi, stringCoords, WW - 4, stringId, ft, { TextAlignment::CENTRE }); + DrawTextWrapped(dpi, stringCoords, WW - 4, stringId, ft, { TextAlignment::CENTRE }); } } }; -rct_window* WindowRideRefurbishPromptOpen(Ride* ride) +WindowBase* WindowRideRefurbishPromptOpen(const Ride& ride) { - rct_window* w; + WindowBase* w; RefurbishRidePromptWindow* newWindow; - w = window_find_by_class(WindowClass::DemolishRidePrompt); + w = WindowFindByClass(WindowClass::DemolishRidePrompt); if (w != nullptr) { auto windowPos = w->windowPos; - window_close(*w); + WindowClose(*w); newWindow = WindowCreate(WindowClass::DemolishRidePrompt, windowPos, WW, WH, WF_TRANSPARENT); } else diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index 5452b06a2d..cac555833b 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -62,7 +62,7 @@ enum { #pragma region Widgets -static rct_widget window_research_development_widgets[] = { +static Widget window_research_development_widgets[] = { WINDOW_SHIM(STR_RESEARCH_AND_DEVELOPMENT, WW_DEVELOPMENT, WH_DEVELOPMENT), MakeWidget({ 0, 43}, { WW_DEVELOPMENT, 153}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeTab ({ 3, 17}, STR_RESEARCH_AND_DEVELOPMENT_TIP), @@ -73,7 +73,7 @@ static rct_widget window_research_development_widgets[] = { WIDGETS_END, }; -static rct_widget window_research_funding_widgets[] = { +static Widget window_research_funding_widgets[] = { WINDOW_SHIM(STR_RESEARCH_FUNDING, WW_FUNDING, WH_FUNDING), MakeWidget({ 0, 43}, { WW_FUNDING, 164}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeTab ({ 3, 17}, STR_RESEARCH_AND_DEVELOPMENT_TIP ), @@ -92,7 +92,7 @@ static rct_widget window_research_funding_widgets[] = { WIDGETS_END, }; -static rct_widget *window_research_page_widgets[] = { +static Widget *window_research_page_widgets[] = { window_research_development_widgets, window_research_funding_widgets, }; @@ -101,17 +101,17 @@ static rct_widget *window_research_page_widgets[] = { #pragma region Events -static void WindowResearchDevelopmentMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowResearchDevelopmentUpdate(rct_window *w); -static void WindowResearchDevelopmentInvalidate(rct_window *w); -static void WindowResearchDevelopmentPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowResearchDevelopmentMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowResearchDevelopmentUpdate(WindowBase *w); +static void WindowResearchDevelopmentInvalidate(WindowBase *w); +static void WindowResearchDevelopmentPaint(WindowBase *w, DrawPixelInfo *dpi); -static void WindowResearchFundingMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowResearchFundingMousedown(rct_window *w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowResearchFundingDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowResearchFundingUpdate(rct_window *w); -static void WindowResearchFundingInvalidate(rct_window *w); -static void WindowResearchFundingPaint(rct_window *w, rct_drawpixelinfo *dpi); +static void WindowResearchFundingMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowResearchFundingMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget); +static void WindowResearchFundingDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowResearchFundingUpdate(WindowBase *w); +static void WindowResearchFundingInvalidate(WindowBase *w); +static void WindowResearchFundingPaint(WindowBase *w, DrawPixelInfo *dpi); // static WindowEventList window_research_development_events([](auto& events) @@ -154,15 +154,15 @@ static constexpr const StringId ResearchStageNames[] = { STR_RESEARCH_STAGE_UNKNOWN, }; -static void WindowResearchSetPage(rct_window* w, int32_t page); -static void WindowResearchSetPressedTab(rct_window* w); -static void WindowResearchDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w); +static void WindowResearchSetPage(WindowBase* w, int32_t page); +static void WindowResearchSetPressedTab(WindowBase* w); +static void WindowResearchDrawTabImages(DrawPixelInfo* dpi, WindowBase* w); -rct_window* WindowResearchOpen() +WindowBase* WindowResearchOpen() { - rct_window* w; + WindowBase* w; - w = window_bring_to_front_by_class(WindowClass::Research); + w = WindowBringToFrontByClass(WindowClass::Research); if (w == nullptr) { w = WindowCreateAutoPos(WW_FUNDING, WH_FUNDING, window_research_page_events[0], WindowClass::Research, WF_10); @@ -196,12 +196,12 @@ rct_window* WindowResearchOpen() * * rct2: 0x006B6B38 */ -static void WindowResearchDevelopmentMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowResearchDevelopmentMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -217,19 +217,19 @@ static void WindowResearchDevelopmentMouseup(rct_window* w, WidgetIndex widgetIn * * rct2: 0x0069CBA6 */ -static void WindowResearchDevelopmentUpdate(rct_window* w) +static void WindowResearchDevelopmentUpdate(WindowBase* w) { // Tab animation if (++w->frame_no >= window_research_tab_animation_loops[w->page]) w->frame_no = 0; - widget_invalidate(*w, WIDX_TAB_1); + WidgetInvalidate(*w, WIDX_TAB_1); } /** * * rct2: 0x006B6819 */ -static void WindowResearchDevelopmentInvalidate(rct_window* w) +static void WindowResearchDevelopmentInvalidate(WindowBase* w) { if (w->widgets != window_research_page_widgets[WINDOW_RESEARCH_PAGE_DEVELOPMENT]) { @@ -244,9 +244,8 @@ static void WindowResearchDevelopmentInvalidate(rct_window* w) { auto type = gResearchLastItem->type; window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WindowWidgetType::FlatBtn; - window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = type == Research::EntryType::Ride - ? SPR_NEW_RIDE - : SPR_NEW_SCENERY; + const auto image = type == Research::EntryType::Ride ? SPR_NEW_RIDE : SPR_NEW_SCENERY; + window_research_development_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].image = ImageId(image); } } @@ -254,7 +253,7 @@ static void WindowResearchDevelopmentInvalidate(rct_window* w) * * rct2: 0x006B689B */ -static void WindowResearchDevelopmentPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowResearchDevelopmentPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowResearchDrawTabImages(dpi, w); @@ -262,7 +261,7 @@ static void WindowResearchDevelopmentPaint(rct_window* w, rct_drawpixelinfo* dpi WindowResearchDevelopmentPagePaint(w, dpi, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP); } -void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, WidgetIndex baseWidgetIndex) +void WindowResearchDevelopmentPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex) { baseWidgetIndex = baseWidgetIndex - WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP; @@ -274,19 +273,19 @@ void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, W // Research type auto ft = Formatter(); ft.Add(STR_RESEARCH_UNKNOWN); - DrawTextWrapped(dpi, screenCoords, 296, STR_RESEARCH_TYPE_LABEL, ft); + DrawTextWrapped(*dpi, screenCoords, 296, STR_RESEARCH_TYPE_LABEL, ft); screenCoords.y += 25; // Progress ft = Formatter(); ft.Add(STR_RESEARCH_COMPLETED_AL); - DrawTextWrapped(dpi, screenCoords, 296, STR_RESEARCH_PROGRESS_LABEL, ft); + DrawTextWrapped(*dpi, screenCoords, 296, STR_RESEARCH_PROGRESS_LABEL, ft); screenCoords.y += 15; // Expected ft = Formatter(); ft.Add(STR_RESEARCH_STAGE_UNKNOWN); - DrawTextBasic(dpi, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); + DrawTextBasic(*dpi, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); } else { @@ -323,13 +322,13 @@ void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, W { ft.Add(gResearchNextItem->GetName()); } - DrawTextWrapped(dpi, screenCoords, 296, label, ft); + DrawTextWrapped(*dpi, screenCoords, 296, label, ft); screenCoords.y += 25; // Progress ft = Formatter(); ft.Add(ResearchStageNames[gResearchProgressStage]); - DrawTextWrapped(dpi, screenCoords, 296, STR_RESEARCH_PROGRESS_LABEL, ft); + DrawTextWrapped(*dpi, screenCoords, 296, STR_RESEARCH_PROGRESS_LABEL, ft); screenCoords.y += 15; // Expected @@ -345,7 +344,7 @@ void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, W { ft.Add(STR_RESEARCH_STAGE_UNKNOWN); } - DrawTextBasic(dpi, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); + DrawTextBasic(*dpi, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); } // Last development @@ -380,7 +379,7 @@ void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, W } } - DrawTextWrapped(dpi, screenCoords, 266, lastDevelopmentFormat, ft); + DrawTextWrapped(*dpi, screenCoords, 266, lastDevelopmentFormat, ft); } } @@ -392,12 +391,12 @@ void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, W * * rct2: 0x0069DB3F */ -static void WindowResearchFundingMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowResearchFundingMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -424,12 +423,12 @@ static void WindowResearchFundingMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x0069DB66 */ -static void WindowResearchFundingMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowResearchFundingMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON) return; - rct_widget* dropdownWidget = widget - 1; + Widget* dropdownWidget = widget - 1; for (std::size_t i = 0; i < std::size(ResearchFundingLevelNames); i++) { @@ -448,7 +447,7 @@ static void WindowResearchFundingMousedown(rct_window* w, WidgetIndex widgetInde * * rct2: 0x0069DB6D */ -static void WindowResearchFundingDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowResearchFundingDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON || dropdownIndex == -1) return; @@ -461,19 +460,19 @@ static void WindowResearchFundingDropdown(rct_window* w, WidgetIndex widgetIndex * * rct2: 0x0069DC23 */ -static void WindowResearchFundingUpdate(rct_window* w) +static void WindowResearchFundingUpdate(WindowBase* w) { // Tab animation if (++w->frame_no >= window_research_tab_animation_loops[w->page]) w->frame_no = 0; - widget_invalidate(*w, WIDX_TAB_2); + WidgetInvalidate(*w, WIDX_TAB_2); } /** * * rct2: 0x0069DA64 */ -static void WindowResearchFundingInvalidate(rct_window* w) +static void WindowResearchFundingInvalidate(WindowBase* w) { if (w->widgets != window_research_page_widgets[WINDOW_RESEARCH_PAGE_FUNDING]) { @@ -529,7 +528,7 @@ static void WindowResearchFundingInvalidate(rct_window* w) * * rct2: 0x0069DAF0 */ -static void WindowResearchFundingPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowResearchFundingPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowResearchDrawTabImages(dpi, w); @@ -537,7 +536,7 @@ static void WindowResearchFundingPaint(rct_window* w, rct_drawpixelinfo* dpi) WindowResearchFundingPagePaint(w, dpi, WIDX_RESEARCH_FUNDING); } -void WindowResearchFundingPagePaint(rct_window* w, rct_drawpixelinfo* dpi, WidgetIndex baseWidgetIndex) +void WindowResearchFundingPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex) { if (gParkFlags & PARK_FLAGS_NO_MONEY) return; @@ -545,7 +544,7 @@ void WindowResearchFundingPagePaint(rct_window* w, rct_drawpixelinfo* dpi, Widge int32_t currentResearchLevel = gResearchFundingLevel; auto ft = Formatter(); ft.Add(research_cost_table[currentResearchLevel]); - DrawTextBasic(dpi, w->windowPos + ScreenCoordsXY{ 10, 77 }, STR_RESEARCH_COST_PER_MONTH, ft); + DrawTextBasic(*dpi, w->windowPos + ScreenCoordsXY{ 10, 77 }, STR_RESEARCH_COST_PER_MONTH, ft); } #pragma endregion @@ -556,7 +555,7 @@ void WindowResearchFundingPagePaint(rct_window* w, rct_drawpixelinfo* dpi, Widge * * rct2: 0x0069CAC5 */ -static void WindowResearchSetPage(rct_window* w, int32_t page) +static void WindowResearchSetPage(WindowBase* w, int32_t page) { w->page = page; w->frame_no = 0; @@ -579,14 +578,14 @@ static void WindowResearchSetPage(rct_window* w, int32_t page) w->width = WW_FUNDING; w->height = WH_FUNDING; } - window_event_resize_call(w); - window_event_invalidate_call(w); + WindowEventResizeCall(w); + WindowEventInvalidateCall(w); WindowInitScrollWidgets(*w); w->Invalidate(); } -static void WindowResearchSetPressedTab(rct_window* w) +static void WindowResearchSetPressedTab(WindowBase* w) { int32_t i; for (i = 0; i < WINDOW_RESEARCH_PAGE_COUNT; i++) @@ -594,7 +593,7 @@ static void WindowResearchSetPressedTab(rct_window* w) w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void WindowResearchDrawTabImage(rct_drawpixelinfo* dpi, rct_window* w, int32_t page, int32_t spriteIndex) +static void WindowResearchDrawTabImage(DrawPixelInfo* dpi, WindowBase* w, int32_t page, int32_t spriteIndex) { WidgetIndex widgetIndex = WIDX_TAB_1 + page; @@ -608,13 +607,13 @@ static void WindowResearchDrawTabImage(rct_drawpixelinfo* dpi, rct_window* w, in spriteIndex += frame; } - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ w->widgets[widgetIndex].left, w->widgets[widgetIndex].top }); } } -static void WindowResearchDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowResearchDrawTabImages(DrawPixelInfo* dpi, WindowBase* w) { WindowResearchDrawTabImage(dpi, w, WINDOW_RESEARCH_PAGE_DEVELOPMENT, SPR_TAB_FINANCES_RESEARCH_0); WindowResearchDrawTabImage(dpi, w, WINDOW_RESEARCH_PAGE_FUNDING, SPR_TAB_FINANCES_SUMMARY_0); diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 932ad46643..e35cfcc001 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -72,7 +72,7 @@ static constexpr const StringId WINDOW_TITLE = STR_RIDE_WINDOW_TITLE; static constexpr const int32_t WH = 207; static constexpr const int32_t WW = 316; -static void PopulateVehicleTypeDropdown(Ride* ride, bool forceRefresh = false); +static void PopulateVehicleTypeDropdown(const Ride& ride, bool forceRefresh = false); enum { @@ -239,28 +239,28 @@ constexpr int32_t RCT1_LIGHT_OFFSET = 4; MakeTab ({282, 17}, STR_CUSTOMER_INFORMATION_TIP ) // 0x009ADC34 -static rct_widget window_ride_main_widgets[] = { +static Widget window_ride_main_widgets[] = { 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({291, 70}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CONSTRUCTION, STR_CONSTRUCTION ), - MakeWidget({291, 94}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RENAME, STR_NAME_RIDE_TIP ), - MakeWidget({291, 118}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP ), - MakeWidget({291, 142}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_DEMOLISH_RIDE_TIP ), - MakeWidget({296, 48}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_CLOSE_BUTTON_0, STR_CLOSE_RIDE_TIP ), - MakeWidget({296, 62}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_TEST_BUTTON_0, STR_SIMULATE_RIDE_TIP ), - MakeWidget({296, 62}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_TEST_BUTTON_0, STR_TEST_RIDE_TIP ), - MakeWidget({296, 76}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_OPEN_BUTTON_0, STR_OPEN_RIDE_TIP ), + 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 ), + MakeWidget({291, 142}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_DEMOLISH_RIDE_TIP ), + MakeWidget({296, 48}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_CLOSE_BUTTON_0), STR_CLOSE_RIDE_TIP ), + MakeWidget({296, 62}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_TEST_BUTTON_0), STR_SIMULATE_RIDE_TIP ), + MakeWidget({296, 62}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_TEST_BUTTON_0), STR_TEST_RIDE_TIP ), + MakeWidget({296, 76}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_OPEN_BUTTON_0), STR_OPEN_RIDE_TIP ), MakeWidget({ 3, 180}, {305, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_ARG_6_STRINGID ), MakeWidget({297, 180}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), WIDGETS_END, }; // 0x009ADDA8 -static rct_widget window_ride_vehicle_widgets[] = { +static Widget window_ride_vehicle_widgets[] = { MAIN_RIDE_WIDGETS, MakeWidget ({ 7, 50}, {302, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), MakeWidget ({297, 51}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), @@ -271,7 +271,7 @@ static rct_widget window_ride_vehicle_widgets[] = { }; // 0x009ADEFC -static rct_widget window_ride_operating_widgets[] = { +static Widget window_ride_operating_widgets[] = { MAIN_RIDE_WIDGETS, MakeSpinnerWidgets({157, 61}, {152, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_ARG_18_STRINGID ), // NB: 3 widgets MakeSpinnerWidgets({157, 75}, {152, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_LIFT_HILL_CHAIN_SPEED_VALUE ), // NB: 3 widgets @@ -294,18 +294,18 @@ static rct_widget window_ride_operating_widgets[] = { }; // 0x009AE190 -static rct_widget window_ride_maintenance_widgets[] = { +static Widget window_ride_maintenance_widgets[] = { MAIN_RIDE_WIDGETS, MakeWidget({107, 71}, {202, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_EMPTY, STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE), MakeWidget({297, 72}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_HOW_OFTEN_A_MECHANIC_SHOULD_CHECK_THIS_RIDE), 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, SPR_CONSTRUCTION, STR_REFURBISH_RIDE_TIP ), - MakeWidget({241, 108}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_NO_ENTRY, STR_DEBUG_FORCE_BREAKDOWN_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 ), WIDGETS_END, }; // 0x009AE2A4 -static rct_widget window_ride_colour_widgets[] = { +static Widget window_ride_colour_widgets[] = { MAIN_RIDE_WIDGETS, MakeWidget({ 3, 47}, { 68, 47}, WindowWidgetType::Spinner, WindowColour::Secondary ), MakeWidget({ 74, 49}, {239, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_ARG_14_STRINGID ), @@ -315,7 +315,7 @@ static rct_widget window_ride_colour_widgets[] = { MakeWidget({119, 74}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_SUPPORT_STRUCTURE_COLOUR_TIP ), MakeWidget({ 74, 49}, {239, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), MakeWidget({301, 50}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), - MakeWidget({289, 68}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PAINTBRUSH, STR_PAINT_INDIVIDUAL_AREA_TIP ), + MakeWidget({289, 68}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PAINTBRUSH), STR_PAINT_INDIVIDUAL_AREA_TIP ), MakeWidget({245, 101}, { 68, 47}, WindowWidgetType::Spinner, WindowColour::Secondary ), MakeWidget({103, 103}, {139, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_EMPTY ), MakeWidget({230, 104}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_STYLE_OF_ENTRANCE_EXIT_STATION_TIP), @@ -332,7 +332,7 @@ static rct_widget window_ride_colour_widgets[] = { }; // 0x009AE4C8 -static rct_widget window_ride_music_widgets[] = { +static Widget window_ride_music_widgets[] = { MAIN_RIDE_WIDGETS, MakeWidget({ 7, 47}, {302, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_PLAY_MUSIC, STR_SELECT_MUSIC_TIP ), MakeWidget({ 7, 62}, {302, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_EMPTY ), @@ -341,9 +341,9 @@ static rct_widget window_ride_music_widgets[] = { }; // 0x009AE5DC -static rct_widget window_ride_measurements_widgets[] = { +static Widget window_ride_measurements_widgets[] = { MAIN_RIDE_WIDGETS, - MakeWidget({288, 194}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_FLOPPY, STR_SAVE_TRACK_DESIGN), + MakeWidget({288, 194}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_FLOPPY), STR_SAVE_TRACK_DESIGN), MakeWidget({ 4, 127}, {154, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_SELECT_NEARBY_SCENERY ), MakeWidget({158, 127}, {154, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_RESET_SELECTION ), MakeWidget({ 4, 177}, {154, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_DESIGN_SAVE ), @@ -352,7 +352,7 @@ static rct_widget window_ride_measurements_widgets[] = { }; // 0x009AE710 -static rct_widget window_ride_graphs_widgets[] = { +static Widget window_ride_graphs_widgets[] = { MAIN_RIDE_WIDGETS, MakeWidget({ 3, 46}, {306, 112}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_HORIZONTAL, STR_LOGGING_DATA_FROM_TIP ), MakeWidget({ 3, 163}, { 73, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_STATS_VELOCITY, STR_SHOW_GRAPH_OF_VELOCITY_AGAINST_TIME_TIP ), @@ -363,7 +363,7 @@ static rct_widget window_ride_graphs_widgets[] = { }; // 0x009AE844 -static rct_widget window_ride_income_widgets[] = { +static Widget window_ride_income_widgets[] = { MAIN_RIDE_WIDGETS, MakeWidget ({ 19, 50}, {126, 14}, WindowWidgetType::Label, WindowColour::Secondary ), MakeSpinnerWidgets({147, 50}, {162, 14}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_ARG_6_CURRENCY2DP ), // NB: 3 widgets @@ -375,15 +375,15 @@ static rct_widget window_ride_income_widgets[] = { }; // 0x009AE9C8 -static rct_widget window_ride_customer_widgets[] = { +static Widget window_ride_customer_widgets[] = { MAIN_RIDE_WIDGETS, - MakeWidget({289, 54}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_SHOW_GUESTS_THOUGHTS_ABOUT_THIS_RIDE_ATTRACTION, STR_SHOW_GUESTS_THOUGHTS_ABOUT_THIS_RIDE_ATTRACTION_TIP), - MakeWidget({289, 78}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_SHOW_GUESTS_ON_THIS_RIDE_ATTRACTION, STR_SHOW_GUESTS_ON_THIS_RIDE_ATTRACTION_TIP ), - MakeWidget({289, 102}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_SHOW_GUESTS_QUEUING_FOR_THIS_RIDE_ATTRACTION, STR_SHOW_GUESTS_QUEUING_FOR_THIS_RIDE_ATTRACTION_TIP ), + MakeWidget({289, 54}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_SHOW_GUESTS_THOUGHTS_ABOUT_THIS_RIDE_ATTRACTION), STR_SHOW_GUESTS_THOUGHTS_ABOUT_THIS_RIDE_ATTRACTION_TIP), + MakeWidget({289, 78}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_SHOW_GUESTS_ON_THIS_RIDE_ATTRACTION), STR_SHOW_GUESTS_ON_THIS_RIDE_ATTRACTION_TIP ), + MakeWidget({289, 102}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_SHOW_GUESTS_QUEUING_FOR_THIS_RIDE_ATTRACTION), STR_SHOW_GUESTS_QUEUING_FOR_THIS_RIDE_ATTRACTION_TIP ), WIDGETS_END, }; -static rct_widget *window_ride_page_widgets[] = { +static Widget *window_ride_page_widgets[] = { window_ride_main_widgets, window_ride_vehicle_widgets, window_ride_operating_widgets, @@ -429,107 +429,107 @@ static constexpr const uint64_t window_ride_page_hold_down_widgets[] = { #pragma region Events -static void WindowRideInitViewport(rct_window* w); +static void WindowRideInitViewport(WindowBase* w); -static void WindowRideMainMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideMainResize(rct_window* w); -static void WindowRideMainMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideMainUpdate(rct_window* w); -static void WindowRideMainTextinput(rct_window* w, WidgetIndex widgetIndex, char* text); -static void WindowRideMainViewportRotate(rct_window* w); -static void WindowRideMainInvalidate(rct_window* w); -static void WindowRideMainPaint(rct_window* w, rct_drawpixelinfo* dpi); -static void WindowRideMainFollowRide(rct_window* w); +static void WindowRideMainMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideMainResize(WindowBase* w); +static void WindowRideMainMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideMainDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideMainUpdate(WindowBase* w); +static void WindowRideMainTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text); +static void WindowRideMainViewportRotate(WindowBase* w); +static void WindowRideMainInvalidate(WindowBase* w); +static void WindowRideMainPaint(WindowBase* w, DrawPixelInfo* dpi); +static void WindowRideMainFollowRide(WindowBase* w); -static void WindowRideVehicleMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideVehicleResize(rct_window* w); -static void WindowRideVehicleMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideVehicleDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideVehicleUpdate(rct_window* w); -static OpenRCT2String WindowRideVehicleTooltip(rct_window* const w, const WidgetIndex widgetIndex, StringId fallback); -static void WindowRideVehicleInvalidate(rct_window* w); -static void WindowRideVehiclePaint(rct_window* w, rct_drawpixelinfo* dpi); -static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex); +static void WindowRideVehicleMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideVehicleResize(WindowBase* w); +static void WindowRideVehicleMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideVehicleDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideVehicleUpdate(WindowBase* w); +static OpenRCT2String WindowRideVehicleTooltip(WindowBase* const w, const WidgetIndex widgetIndex, StringId fallback); +static void WindowRideVehicleInvalidate(WindowBase* w); +static void WindowRideVehiclePaint(WindowBase* w, DrawPixelInfo* dpi); +static void WindowRideVehicleScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex); -static void WindowRideOperatingMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideOperatingResize(rct_window* w); -static void WindowRideOperatingMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideOperatingLengthWindow(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideOperatingTweakTextInput(rct_window* w, const Ride& ride); -static void WindowRideOperatingDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideOperatingUpdate(rct_window* w); -static void WindowRideOperatingTextinput(rct_window* w, WidgetIndex widgetIndex, char* text); -static void WindowRideOperatingInvalidate(rct_window* w); -static void WindowRideOperatingPaint(rct_window* w, rct_drawpixelinfo* dpi); +static void WindowRideOperatingMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideOperatingResize(WindowBase* w); +static void WindowRideOperatingMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideOperatingLengthWindow(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideOperatingTweakTextInput(WindowBase* w, const Ride& ride); +static void WindowRideOperatingDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideOperatingUpdate(WindowBase* w); +static void WindowRideOperatingTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text); +static void WindowRideOperatingInvalidate(WindowBase* w); +static void WindowRideOperatingPaint(WindowBase* w, DrawPixelInfo* dpi); -static void WindowRideMaintenanceMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideMaintenanceResize(rct_window* w); -static void WindowRideMaintenanceMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideMaintenanceUpdate(rct_window* w); -static void WindowRideMaintenanceInvalidate(rct_window* w); -static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi); +static void WindowRideMaintenanceMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideMaintenanceResize(WindowBase* w); +static void WindowRideMaintenanceMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideMaintenanceDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideMaintenanceUpdate(WindowBase* w); +static void WindowRideMaintenanceInvalidate(WindowBase* w); +static void WindowRideMaintenancePaint(WindowBase* w, DrawPixelInfo* dpi); -static void WindowRideColourClose(rct_window* w); -static void WindowRideColourMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideColourResize(rct_window* w); -static void WindowRideColourMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideColourDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideColourUpdate(rct_window* w); -static void WindowRideColourTooldown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowRideColourTooldrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowRideColourInvalidate(rct_window* w); -static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi); -static void WindowRideColourScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex); +static void WindowRideColourClose(WindowBase* w); +static void WindowRideColourMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideColourResize(WindowBase* w); +static void WindowRideColourMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideColourDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideColourUpdate(WindowBase* w); +static void WindowRideColourTooldown(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void WindowRideColourTooldrag(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void WindowRideColourInvalidate(WindowBase* w); +static void WindowRideColourPaint(WindowBase* w, DrawPixelInfo* dpi); +static void WindowRideColourScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex); -static void WindowRideMusicMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideMusicResize(rct_window* w); -static void WindowRideMusicMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideMusicDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideMusicUpdate(rct_window* w); -static void WindowRideMusicInvalidate(rct_window* w); -static void WindowRideMusicPaint(rct_window* w, rct_drawpixelinfo* dpi); +static void WindowRideMusicMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideMusicResize(WindowBase* w); +static void WindowRideMusicMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideMusicDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideMusicUpdate(WindowBase* w); +static void WindowRideMusicInvalidate(WindowBase* w); +static void WindowRideMusicPaint(WindowBase* w, DrawPixelInfo* dpi); -static void WindowRideMeasurementsClose(rct_window* w); -static void WindowRideMeasurementsMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideMeasurementsResize(rct_window* w); -static void WindowRideMeasurementsMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideMeasurementsDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowRideMeasurementsUpdate(rct_window* w); -static void WindowRideMeasurementsTooldown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowRideMeasurementsTooldrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowRideMeasurementsToolabort(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideMeasurementsInvalidate(rct_window* w); -static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi); +static void WindowRideMeasurementsClose(WindowBase* w); +static void WindowRideMeasurementsMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideMeasurementsResize(WindowBase* w); +static void WindowRideMeasurementsMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideMeasurementsDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowRideMeasurementsUpdate(WindowBase* w); +static void WindowRideMeasurementsTooldown(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void WindowRideMeasurementsTooldrag(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +static void WindowRideMeasurementsToolabort(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideMeasurementsInvalidate(WindowBase* w); +static void WindowRideMeasurementsPaint(WindowBase* w, DrawPixelInfo* dpi); -static void WindowRideGraphsMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideGraphsResize(rct_window* w); -static void WindowRideGraphsMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideGraphsUpdate(rct_window* w); -static void WindowRideGraphsScrollgetheight(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height); -static void WindowRideGraphs15(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType); -static OpenRCT2String WindowRideGraphsTooltip(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback); -static void WindowRideGraphsInvalidate(rct_window* w); -static void WindowRideGraphsPaint(rct_window* w, rct_drawpixelinfo* dpi); -static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex); +static void WindowRideGraphsMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideGraphsResize(WindowBase* w); +static void WindowRideGraphsMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideGraphsUpdate(WindowBase* w); +static void WindowRideGraphsScrollgetheight(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height); +static void WindowRideGraphs15(WindowBase* w, int32_t scrollIndex, int32_t scrollAreaType); +static OpenRCT2String WindowRideGraphsTooltip(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback); +static void WindowRideGraphsInvalidate(WindowBase* w); +static void WindowRideGraphsPaint(WindowBase* w, DrawPixelInfo* dpi); +static void WindowRideGraphsScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex); -static void WindowRideIncomeMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideIncomeResize(rct_window* w); -static void WindowRideIncomeMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowRideIncomeUpdate(rct_window* w); -static void WindowRideIncomeTextinput(rct_window* w, WidgetIndex widgetIndex, char* text); -static void WindowRideIncomeInvalidate(rct_window* w); -static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi); -static bool WindowRideIncomeCanModifyPrimaryPrice(rct_window* w); +static void WindowRideIncomeMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideIncomeResize(WindowBase* w); +static void WindowRideIncomeMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget); +static void WindowRideIncomeUpdate(WindowBase* w); +static void WindowRideIncomeTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text); +static void WindowRideIncomeInvalidate(WindowBase* w); +static void WindowRideIncomePaint(WindowBase* w, DrawPixelInfo* dpi); +static bool WindowRideIncomeCanModifyPrimaryPrice(WindowBase* w); -static void WindowRideCustomerMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowRideCustomerResize(rct_window* w); -static void WindowRideCustomerUpdate(rct_window* w); -static void WindowRideCustomerInvalidate(rct_window* w); -static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi); +static void WindowRideCustomerMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowRideCustomerResize(WindowBase* w); +static void WindowRideCustomerUpdate(WindowBase* w); +static void WindowRideCustomerInvalidate(WindowBase* w); +static void WindowRideCustomerPaint(WindowBase* w, DrawPixelInfo* dpi); -static void WindowRideSetPage(rct_window* w, int32_t page); +static void WindowRideSetPage(WindowBase* w, int32_t page); // 0x0098DFD4 static WindowEventList window_ride_main_events([](auto& events) { @@ -858,11 +858,11 @@ struct VehicleTypeLabel }; static int32_t VehicleDropdownDataLanguage = LANGUAGE_UNDEFINED; -static rct_ride_entry* VehicleDropdownRideType = nullptr; +static const RideObjectEntry* VehicleDropdownRideType = nullptr; static bool VehicleDropdownExpanded = false; static std::vector VehicleDropdownData; -static void WindowRideDrawTabImage(rct_drawpixelinfo* dpi, rct_window* w, int32_t page, int32_t spriteIndex) +static void WindowRideDrawTabImage(DrawPixelInfo* dpi, WindowBase* w, int32_t page, int32_t spriteIndex) { WidgetIndex widgetIndex = WIDX_TAB_1 + page; @@ -875,7 +875,7 @@ static void WindowRideDrawTabImage(rct_drawpixelinfo* dpi, rct_window* w, int32_ } const auto& widget = w->widgets[widgetIndex]; - gfx_draw_sprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget.left, widget.top }); + GfxDrawSprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget.left, widget.top }); } } @@ -883,12 +883,12 @@ static void WindowRideDrawTabImage(rct_drawpixelinfo* dpi, rct_window* w, int32_ * * rct2: 0x006B2E88 */ -static void WindowRideDrawTabMain(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowRideDrawTabMain(DrawPixelInfo* dpi, WindowBase* w) { - WidgetIndex widgetIndex = WIDX_TAB_1 + WINDOW_RIDE_PAGE_MAIN; + WidgetIndex widgetIndex = WIDX_TAB_1 + static_cast(WINDOW_RIDE_PAGE_MAIN); if (!WidgetIsDisabled(*w, widgetIndex)) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { int32_t spriteIndex = 0; @@ -912,7 +912,7 @@ static void WindowRideDrawTabMain(rct_drawpixelinfo* dpi, rct_window* w) } const auto& widget = w->widgets[widgetIndex]; - gfx_draw_sprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget.left, widget.top }); + GfxDrawSprite(dpi, ImageId(spriteIndex), w->windowPos + ScreenCoordsXY{ widget.left, widget.top }); } } } @@ -921,9 +921,9 @@ static void WindowRideDrawTabMain(rct_drawpixelinfo* dpi, rct_window* w) * * rct2: 0x006B2B68 */ -static void WindowRideDrawTabVehicle(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowRideDrawTabVehicle(DrawPixelInfo* dpi, WindowBase* w) { - WidgetIndex widgetIndex = WIDX_TAB_1 + WINDOW_RIDE_PAGE_VEHICLE; + WidgetIndex widgetIndex = WIDX_TAB_1 + static_cast(WINDOW_RIDE_PAGE_VEHICLE); const auto& widget = w->widgets[widgetIndex]; if (!WidgetIsDisabled(*w, widgetIndex)) @@ -936,15 +936,15 @@ static void WindowRideDrawTabVehicle(rct_drawpixelinfo* dpi, rct_window* w) screenCoords += w->windowPos; - rct_drawpixelinfo clipDPI; - if (!clip_drawpixelinfo(&clipDPI, dpi, screenCoords, width, height)) + DrawPixelInfo clipDPI; + if (!ClipDrawPixelInfo(&clipDPI, dpi, screenCoords, width, height)) { return; } screenCoords = ScreenCoordsXY{ widget.width() / 2, widget.height() - 12 }; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -969,22 +969,22 @@ static void WindowRideDrawTabVehicle(rct_drawpixelinfo* dpi, rct_window* w) screenCoords.y /= 4; } - const auto vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, rideEntry->TabCar); - CarEntry* carEntry = &rideEntry->Cars[vehicle]; + 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; - VehicleColour vehicleColour = ride_get_vehicle_colour(ride, vehicleId); + VehicleColour vehicleColour = RideGetVehicleColour(*ride, vehicleId); // imageIndex represents a precision of 64 auto imageIndex = OpenRCT2::Entity::Yaw::YawFrom4(2) * 2; if (w->page == WINDOW_RIDE_PAGE_VEHICLE) imageIndex += w->frame_no; - imageIndex = carEntry->SpriteByYaw(imageIndex / 2, SpriteGroupType::SlopeFlat); - imageIndex &= carEntry->TabRotationMask; - imageIndex *= carEntry->base_num_frames; - imageIndex += carEntry->base_image_id; + imageIndex = carEntry.SpriteByYaw(imageIndex / 2, SpriteGroupType::SlopeFlat); + imageIndex &= carEntry.TabRotationMask; + imageIndex *= carEntry.base_num_frames; + imageIndex += carEntry.base_image_id; auto imageId = ImageId(imageIndex, vehicleColour.Body, vehicleColour.Trim, vehicleColour.Tertiary); - gfx_draw_sprite(&clipDPI, imageId, screenCoords); + GfxDrawSprite(&clipDPI, imageId, screenCoords); } } @@ -992,9 +992,9 @@ static void WindowRideDrawTabVehicle(rct_drawpixelinfo* dpi, rct_window* w) * * rct2: 0x006B2F42 */ -static void WindowRideDrawTabCustomer(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowRideDrawTabCustomer(DrawPixelInfo* dpi, WindowBase* w) { - WidgetIndex widgetIndex = WIDX_TAB_1 + WINDOW_RIDE_PAGE_CUSTOMER; + WidgetIndex widgetIndex = WIDX_TAB_1 + static_cast(WINDOW_RIDE_PAGE_CUSTOMER); if (!WidgetIsDisabled(*w, widgetIndex)) { @@ -1005,7 +1005,7 @@ static void WindowRideDrawTabCustomer(rct_drawpixelinfo* dpi, rct_window* w) spriteIndex += GetPeepAnimation(PeepSpriteType::Normal).base_image + 1; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(spriteIndex, COLOUR_BRIGHT_RED, COLOUR_TEAL), w->windowPos + ScreenCoordsXY{ widget.midX(), widget.bottom - 6 }); } @@ -1015,7 +1015,7 @@ static void WindowRideDrawTabCustomer(rct_drawpixelinfo* dpi, rct_window* w) * * rct2: 0x006B2B35 */ -static void WindowRideDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w) +static void WindowRideDrawTabImages(DrawPixelInfo* dpi, WindowBase* w) { WindowRideDrawTabVehicle(dpi, w); WindowRideDrawTabImage(dpi, w, WINDOW_RIDE_PAGE_OPERATING, SPR_TAB_GEARS_0); @@ -1033,10 +1033,10 @@ static void WindowRideDrawTabImages(rct_drawpixelinfo* dpi, rct_window* w) * * rct2: 0x006AEB9F */ -static void WindowRideDisableTabs(rct_window* w) +static void WindowRideDisableTabs(WindowBase* w) { uint32_t disabled_tabs = 0; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -1073,7 +1073,7 @@ static void WindowRideDisableTabs(rct_window* w) if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) != 0) disabled_tabs |= (1uLL << WIDX_TAB_4 | 1uLL << WIDX_TAB_6 | 1uLL << WIDX_TAB_9 | 1uLL << WIDX_TAB_10); // 0x3280 - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { @@ -1088,10 +1088,10 @@ static void WindowRideDisableTabs(rct_window* w) w->disabled_widgets = disabled_tabs; } -static void WindowRideUpdateOverallView(Ride* ride) +static void WindowRideUpdateOverallView(const Ride& ride) { // Calculate x, y, z bounds of the entire ride using its track elements - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); @@ -1105,7 +1105,7 @@ static void WindowRideUpdateOverallView(Ride* ride) if (it.element->GetType() != TileElementType::Track) continue; - if (it.element->AsTrack()->GetRideIndex() != ride->id) + if (it.element->AsTrack()->GetRideIndex() != ride.id) continue; auto location = TileCoordsXY(it.x, it.y).ToCoordsXY(); @@ -1121,7 +1121,7 @@ static void WindowRideUpdateOverallView(Ride* ride) max.z = std::max(max.z, clearZ); } - const auto rideIndex = ride->id.ToUnderlying(); + const auto rideIndex = ride.id.ToUnderlying(); if (rideIndex >= ride_overall_views.size()) { ride_overall_views.resize(rideIndex + 1); @@ -1153,14 +1153,14 @@ static void WindowRideUpdateOverallView(Ride* ride) * * rct2: 0x006AEAB4 */ -static rct_window* WindowRideOpen(Ride* ride) +static WindowBase* WindowRideOpen(const Ride& ride) { - rct_window* w; + WindowBase* w; w = WindowCreateAutoPos(316, 207, window_ride_page_events[0], WindowClass::Ride, WF_10 | WF_RESIZABLE); w->widgets = window_ride_page_widgets[WINDOW_RIDE_PAGE_MAIN]; w->hold_down_widgets = window_ride_page_hold_down_widgets[WINDOW_RIDE_PAGE_MAIN]; - w->rideId = ride->id; + w->rideId = ride.id; w->page = WINDOW_RIDE_PAGE_MAIN; w->vehicleIndex = 0; @@ -1185,30 +1185,30 @@ static rct_window* WindowRideOpen(Ride* ride) * * rct2: 0x006ACC28 */ -rct_window* WindowRideMainOpen(Ride* ride) +WindowBase* WindowRideMainOpen(const Ride& ride) { - if (ride->type >= RIDE_TYPE_COUNT) + if (ride.type >= RIDE_TYPE_COUNT) { return nullptr; } - rct_window* w = window_bring_to_front_by_number(WindowClass::Ride, ride->id.ToUnderlying()); + WindowBase* w = WindowBringToFrontByNumber(WindowClass::Ride, ride.id.ToUnderlying()); if (w == nullptr) { w = WindowRideOpen(ride); w->ride.var_482 = -1; w->ride.view = 0; } - else if (w->ride.view >= (1 + ride->NumTrains + ride->num_stations)) + else if (w->ride.view >= (1 + ride.NumTrains + ride.num_stations)) { w->ride.view = 0; } - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { if (w->classification == gCurrentToolWidget.window_classification && w->number == gCurrentToolWidget.window_number) { - tool_cancel(); + ToolCancel(); } } @@ -1225,25 +1225,25 @@ rct_window* WindowRideMainOpen(Ride* ride) * * rct2: 0x006ACCCE */ -static rct_window* WindowRideOpenStation(Ride* ride, StationIndex stationIndex) +static WindowBase* WindowRideOpenStation(const Ride& ride, StationIndex stationIndex) { - if (ride->type >= RIDE_TYPE_COUNT) + if (ride.type >= RIDE_TYPE_COUNT) return nullptr; - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) return WindowRideMainOpen(ride); - auto w = window_bring_to_front_by_number(WindowClass::Ride, ride->id.ToUnderlying()); + auto w = WindowBringToFrontByNumber(WindowClass::Ride, ride.id.ToUnderlying()); if (w == nullptr) { w = WindowRideOpen(ride); w->ride.var_482 = -1; } - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == w->classification + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == w->classification && gCurrentToolWidget.window_number == w->number) { - tool_cancel(); + ToolCancel(); } w->page = WINDOW_RIDE_PAGE_MAIN; @@ -1261,25 +1261,25 @@ static rct_window* WindowRideOpenStation(Ride* ride, StationIndex stationIndex) // View for (int32_t i = stationIndex.ToUnderlying(); i >= 0; i--) { - if (ride->GetStations()[i].Start.IsNull()) + if (ride.GetStations()[i].Start.IsNull()) { stationIndex = StationIndex::FromUnderlying(stationIndex.ToUnderlying() - 1); } } - w->ride.view = 1 + ride->NumTrains + stationIndex.ToUnderlying(); + w->ride.view = 1 + ride.NumTrains + stationIndex.ToUnderlying(); WindowRideInitViewport(w); return w; } -rct_window* WindowRideOpenTrack(TileElement* tileElement) +WindowBase* WindowRideOpenTrack(TileElement* tileElement) { assert(tileElement != nullptr); auto rideIndex = tileElement->GetRideIndex(); if (!rideIndex.IsNull()) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { const auto type = tileElement->GetType(); @@ -1288,7 +1288,7 @@ rct_window* WindowRideOpenTrack(TileElement* tileElement) // Open ride window in station view auto entranceElement = tileElement->AsEntrance(); auto stationIndex = entranceElement->GetStationIndex(); - return WindowRideOpenStation(ride, stationIndex); + return WindowRideOpenStation(*ride, stationIndex); } else if (type == TileElementType::Track) { @@ -1299,12 +1299,12 @@ rct_window* WindowRideOpenTrack(TileElement* tileElement) if (ted.SequenceProperties[0] & TRACK_SEQUENCE_FLAG_ORIGIN) { auto stationIndex = trackElement->GetStationIndex(); - return WindowRideOpenStation(ride, stationIndex); + return WindowRideOpenStation(*ride, stationIndex); } } // Open ride window in overview mode - return WindowRideMainOpen(ride); + return WindowRideMainOpen(*ride); } } return nullptr; @@ -1314,7 +1314,7 @@ rct_window* WindowRideOpenTrack(TileElement* tileElement) * * rct2: 0x006ACAC2 */ -rct_window* WindowRideOpenVehicle(Vehicle* vehicle) +WindowBase* WindowRideOpenVehicle(Vehicle* vehicle) { if (vehicle == nullptr) return nullptr; @@ -1323,7 +1323,7 @@ rct_window* WindowRideOpenVehicle(Vehicle* vehicle) if (headVehicle == nullptr) return nullptr; - EntityId headVehicleSpriteIndex = headVehicle->sprite_index; + EntityId headVehicleSpriteIndex = headVehicle->Id; auto ride = headVehicle->GetRide(); if (ride == nullptr) return nullptr; @@ -1338,15 +1338,15 @@ rct_window* WindowRideOpenVehicle(Vehicle* vehicle) view++; } - rct_window* w = window_find_by_number(WindowClass::Ride, ride->id.ToUnderlying()); + WindowBase* w = WindowFindByNumber(WindowClass::Ride, ride->id.ToUnderlying()); if (w != nullptr) { w->Invalidate(); - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == w->classification + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == w->classification && gCurrentToolWidget.window_number == w->number) { - tool_cancel(); + ToolCancel(); } int32_t openedPeepWindow = 0; @@ -1360,11 +1360,11 @@ rct_window* WindowRideOpenVehicle(Vehicle* vehicle) continue; numPeepsLeft--; - rct_window* w2 = window_find_by_number(WindowClass::Peep, vehicle->peep[i]); + WindowBase* w2 = WindowFindByNumber(WindowClass::Peep, vehicle->peep[i]); if (w2 == nullptr) { auto intent = Intent(WindowClass::Peep); - intent.putExtra(INTENT_EXTRA_PEEP, peep); + intent.PutExtra(INTENT_EXTRA_PEEP, peep); ContextOpenIntent(&intent); openedPeepWindow = 1; @@ -1373,13 +1373,13 @@ rct_window* WindowRideOpenVehicle(Vehicle* vehicle) } } - w = openedPeepWindow ? window_find_by_number(WindowClass::Ride, ride->id.ToUnderlying()) - : window_bring_to_front_by_number(WindowClass::Ride, ride->id.ToUnderlying()); + w = openedPeepWindow ? WindowFindByNumber(WindowClass::Ride, ride->id.ToUnderlying()) + : WindowBringToFrontByNumber(WindowClass::Ride, ride->id.ToUnderlying()); } if (w == nullptr) { - w = WindowRideOpen(ride); + w = WindowRideOpen(*ride); w->ride.var_482 = -1; } @@ -1406,20 +1406,20 @@ rct_window* WindowRideOpenVehicle(Vehicle* vehicle) * * rct2: 0x006AF1D2 */ -static void WindowRideSetPage(rct_window* w, int32_t page) +static void WindowRideSetPage(WindowBase* w, int32_t page) { int32_t listen; - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) if (w->classification == gCurrentToolWidget.window_classification && w->number == gCurrentToolWidget.window_number) - tool_cancel(); + ToolCancel(); if (page == WINDOW_RIDE_PAGE_VEHICLE) { - auto constructionWindow = window_find_by_class(WindowClass::RideConstruction); + auto constructionWindow = WindowFindByClass(WindowClass::RideConstruction); if (constructionWindow != nullptr && constructionWindow->number == w->number) { - window_close_by_class(WindowClass::RideConstruction); + WindowCloseByClass(WindowClass::RideConstruction); // Closing the construction window sets the tab to the first page, which we don't want here, // as user just clicked the Vehicle page WindowRideSetPage(w, WINDOW_RIDE_PAGE_VEHICLE); @@ -1449,8 +1449,8 @@ static void WindowRideSetPage(rct_window* w, int32_t page) WindowRideDisableTabs(w); w->Invalidate(); - window_event_resize_call(w); - window_event_invalidate_call(w); + WindowEventResizeCall(w); + WindowEventInvalidateCall(w); WindowInitScrollWidgets(*w); w->Invalidate(); @@ -1458,7 +1458,7 @@ static void WindowRideSetPage(rct_window* w, int32_t page) w->viewport->flags |= VIEWPORT_FLAG_SOUND_ON; } -static void WindowRideSetPressedTab(rct_window* w) +static void WindowRideSetPressedTab(WindowBase* w) { int32_t i; for (i = 0; i < WINDOW_RIDE_PAGE_COUNT; i++) @@ -1466,16 +1466,16 @@ static void WindowRideSetPressedTab(rct_window* w) w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page); } -static void WindowRideAnchorBorderWidgets(rct_window* w) +static void WindowRideAnchorBorderWidgets(WindowBase* w) { w->ResizeFrameWithPage(); } #pragma region Main -static std::optional GetStationIndexFromViewSelection(const rct_window& w) +static std::optional GetStationIndexFromViewSelection(const WindowBase& w) { - const auto* ride = get_ride(RideId::FromUnderlying(w.number)); + const auto* ride = GetRide(RideId::FromUnderlying(w.number)); if (ride == nullptr) return std::nullopt; @@ -1500,12 +1500,12 @@ static std::optional GetStationIndexFromViewSelection(const rct_wi * * rct2: 0x006AF994 */ -static void WindowRideInitViewport(rct_window* w) +static void WindowRideInitViewport(WindowBase* w) { if (w->page != WINDOW_RIDE_PAGE_MAIN) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -1516,8 +1516,8 @@ static void WindowRideInitViewport(rct_window* w) if (viewSelectionIndex >= 0 && viewSelectionIndex < ride->NumTrains && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { auto vehId = ride->vehicles[viewSelectionIndex]; - rct_ride_entry* ride_entry = ride->GetRideEntry(); - if (ride_entry != nullptr && ride_entry->TabCar != 0) + const auto* rideEntry = ride->GetRideEntry(); + if (rideEntry != nullptr && rideEntry->TabCar != 0) { Vehicle* vehicle = GetEntity(vehId); if (vehicle == nullptr) @@ -1571,7 +1571,7 @@ static void WindowRideInitViewport(rct_window* w) viewport_flags |= VIEWPORT_FLAG_GRIDLINES; } - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); w->focus = focus; @@ -1584,7 +1584,7 @@ static void WindowRideInitViewport(rct_window* w) int32_t width = view_widget.width() - 1; int32_t height = view_widget.height() - 1; - viewport_create(w, screenPos, width, height, w->focus.value()); + ViewportCreate(w, screenPos, width, height, w->focus.value()); w->flags |= WF_NO_SCROLLING; w->Invalidate(); @@ -1600,9 +1600,9 @@ static void WindowRideInitViewport(rct_window* w) * * rct2: 0x006AF315 */ -static void WindowRideRename(rct_window* w) +static void WindowRideRename(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { auto rideName = ride->GetName(); @@ -1615,12 +1615,12 @@ static void WindowRideRename(rct_window* w) * * rct2: 0x006AF17E */ -static void WindowRideMainMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideMainMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -1636,13 +1636,13 @@ static void WindowRideMainMouseup(rct_window* w, WidgetIndex widgetIndex) break; case WIDX_CONSTRUCTION: { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { - ride_construct(ride); - if (window_find_by_number(WindowClass::RideConstruction, ride->id.ToUnderlying()) != nullptr) + RideConstructionStart(*ride); + if (WindowFindByNumber(WindowClass::RideConstruction, ride->id.ToUnderlying()) != nullptr) { - window_close(*w); + WindowClose(*w); } } break; @@ -1658,7 +1658,7 @@ static void WindowRideMainMouseup(rct_window* w, WidgetIndex widgetIndex) case WIDX_TEST_LIGHT: case WIDX_OPEN_LIGHT: { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { RideStatus status; @@ -1690,14 +1690,14 @@ static void WindowRideMainMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006AF4A2 */ -static void WindowRideMainResize(rct_window* w) +static void WindowRideMainResize(WindowBase* w) { int32_t minHeight = 180; if (ThemeGetFlags() & UITHEME_FLAG_USE_LIGHTS_RIDE) { minHeight += 20 + RCT1_LIGHT_OFFSET; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { #ifdef __SIMULATE_IN_RIDE_WINDOW__ @@ -1718,25 +1718,54 @@ static void WindowRideMainResize(rct_window* w) } w->flags |= WF_RESIZABLE; - window_set_resize(*w, 316, minHeight, 500, 450); + WindowSetResize(*w, 316, minHeight, 500, 450); // Unlike with other windows, the focus needs to be recentred so it’s best to just reset it. w->focus = std::nullopt; WindowRideInitViewport(w); } +static size_t GetNumPeepsInTrain(const Ride& ride, int32_t trainIndex) +{ + auto numPeepsInTrain = 0; + const auto* vehicle = TryGetVehicle(ride.vehicles[trainIndex]); + while (vehicle != nullptr) + { + numPeepsInTrain += vehicle->num_peeps; + vehicle = TryGetVehicle(vehicle->next_vehicle_on_train); + } + return numPeepsInTrain; +} + +static bool TrainMustBeHidden(const Ride& ride, int32_t trainIndex) +{ + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + return true; + + const auto* rideEntry = ride.GetRideEntry(); + if (rideEntry == nullptr) + return false; + + if (!(rideEntry->flags & RIDE_ENTRY_FLAG_HIDE_EMPTY_TRAINS)) + return false; + + return GetNumPeepsInTrain(ride, trainIndex) == 0; +} + /** * * rct2: 0x006AF825 */ -static void WindowRideShowViewDropdown(rct_window* w, rct_widget* widget) +static void WindowRideShowViewDropdown(WindowBase* w, Widget* widget) { - rct_widget* dropdownWidget = widget - 1; - auto ride = get_ride(w->rideId); + Widget* dropdownWidget = widget - 1; + auto ride = GetRide(w->rideId); if (ride == nullptr) return; + const auto& rtd = ride->GetRideTypeDescriptor(); + int32_t numItems = 1; - if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) + if (!rtd.HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) { numItems += ride->num_stations; numItems += ride->NumTrains; @@ -1751,14 +1780,16 @@ static void WindowRideShowViewDropdown(rct_window* w, rct_widget* widget) gDropdownItems[0].Args = STR_OVERALL_VIEW; int32_t currentItem = 1; - const auto& rtd = ride->GetRideTypeDescriptor(); - // Vehicles int32_t name = GetRideComponentName(rtd.NameConvention.vehicle).number; - for (int32_t i = 1; i <= ride->NumTrains; i++) + for (int32_t i = 0; i < ride->NumTrains; i++) { gDropdownItems[currentItem].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[currentItem].Args = name | (currentItem << 16); + if (TrainMustBeHidden(*ride, i)) + { + Dropdown::SetDisabled(currentItem, true); + } currentItem++; } @@ -1771,32 +1802,21 @@ static void WindowRideShowViewDropdown(rct_window* w, rct_widget* widget) currentItem++; } - // Set highlighted item - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) - { - for (int32_t i = 0; i < ride->NumTrains; i++) - { - // The +1 is to skip 'Overall view' - Dropdown::SetDisabled(i + 1, true); - } - } - // Set checked item Dropdown::SetChecked(w->ride.view, true); } -static RideStatus WindowRideGetNextDefaultStatus(const Ride* ride) +static RideStatus WindowRideGetNextDefaultStatus(const Ride& ride) { - switch (ride->status) + switch (ride.status) { default: case RideStatus::Closed: - if ((ride->lifecycle_flags & RIDE_LIFECYCLE_CRASHED) - || (ride->lifecycle_flags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE)) + if ((ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED) || (ride.lifecycle_flags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE)) { return RideStatus::Closed; } - if (ride->SupportsStatus(RideStatus::Testing) && !(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (ride.SupportsStatus(RideStatus::Testing) && !(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) { return RideStatus::Testing; } @@ -1804,7 +1824,7 @@ static RideStatus WindowRideGetNextDefaultStatus(const Ride* ride) case RideStatus::Simulating: return RideStatus::Testing; case RideStatus::Testing: - return (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) ? RideStatus::Open : RideStatus::Closed; + return (ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED) ? RideStatus::Open : RideStatus::Closed; case RideStatus::Open: return RideStatus::Closed; } @@ -1840,15 +1860,15 @@ static void WindowRideSetDropdown(RideStatusDropdownInfo& info, RideStatus statu } } -static void WindowRideShowOpenDropdown(rct_window* w, rct_widget* widget) +static void WindowRideShowOpenDropdown(WindowBase* w, Widget* widget) { RideStatusDropdownInfo info; - info.Ride = get_ride(w->rideId); + info.Ride = GetRide(w->rideId); if (info.Ride == nullptr) return; info.CurrentStatus = info.Ride->status; - info.DefaultStatus = WindowRideGetNextDefaultStatus(info.Ride); + info.DefaultStatus = WindowRideGetNextDefaultStatus(*info.Ride); WindowRideSetDropdown(info, RideStatus::Closed, STR_CLOSE_RIDE); #ifdef __SIMULATE_IN_RIDE_WINDOW__ window_ride_set_dropdown(info, RideStatus::Simulating, STR_SIMULATE_RIDE); @@ -1909,9 +1929,9 @@ static void PopulateRideTypeDropdown() RideDropdownDataLanguage = ls.GetCurrentLanguage(); } -static void WindowRideShowRideTypeDropdown(rct_window* w, rct_widget* widget) +static void WindowRideShowRideTypeDropdown(WindowBase* w, Widget* widget) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -1923,7 +1943,7 @@ static void WindowRideShowRideTypeDropdown(rct_window* w, rct_widget* widget) gDropdownItems[i].Args = RideDropdownData[i].label_id; } - rct_widget* dropdownWidget = widget - 1; + Widget* dropdownWidget = widget - 1; WindowDropdownShowText( { w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, w->colours[1], Dropdown::Flag::StayOpen, RIDE_TYPE_COUNT); @@ -1944,9 +1964,9 @@ static void WindowRideShowRideTypeDropdown(rct_window* w, rct_widget* widget) Dropdown::SetChecked(pos, true); } -static void WindowRideShowLocateDropdown(rct_window* w, rct_widget* widget) +static void WindowRideShowLocateDropdown(WindowBase* w, Widget* widget) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -1963,9 +1983,9 @@ static void WindowRideShowLocateDropdown(rct_window* w, rct_widget* widget) } } -static void WindowRideMainFollowRide(rct_window* w) +static void WindowRideMainFollowRide(WindowBase* w) { - auto* ride = get_ride(w->rideId); + auto* ride = GetRide(w->rideId); if (ride != nullptr) { if (!(ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MAIN)) @@ -1977,9 +1997,9 @@ static void WindowRideMainFollowRide(rct_window* w) Vehicle* vehicle = GetEntity(ride->vehicles[w->ride.view - 1]); if (vehicle != nullptr) { - auto headVehicleSpriteIndex = vehicle->sprite_index; - rct_window* w_main = window_get_main(); - window_follow_sprite(*w_main, headVehicleSpriteIndex); + auto headVehicleSpriteIndex = vehicle->Id; + WindowBase* w_main = WindowGetMain(); + WindowFollowSprite(*w_main, headVehicleSpriteIndex); } } } @@ -1987,17 +2007,17 @@ static void WindowRideMainFollowRide(rct_window* w) } } -static void PopulateVehicleTypeDropdown(Ride* ride, bool forceRefresh) +static void PopulateVehicleTypeDropdown(const Ride& ride, bool forceRefresh) { auto& objManager = GetContext()->GetObjectManager(); - rct_ride_entry* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride.GetRideEntry(); bool selectionShouldBeExpanded; int32_t rideTypeIterator, rideTypeIteratorMax; + + const auto& rtd = ride.GetRideTypeDescriptor(); if (gCheatsShowVehiclesFromOtherTrackTypes - && !( - ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) || ride->type == RIDE_TYPE_MAZE - || ride->type == RIDE_TYPE_MINI_GOLF)) + && !(rtd.HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) || rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE) || ride.type == RIDE_TYPE_MINI_GOLF)) { selectionShouldBeExpanded = true; rideTypeIterator = 0; @@ -2006,8 +2026,8 @@ static void PopulateVehicleTypeDropdown(Ride* ride, bool forceRefresh) else { selectionShouldBeExpanded = false; - rideTypeIterator = ride->type; - rideTypeIteratorMax = ride->type; + rideTypeIterator = ride.type; + rideTypeIteratorMax = ride.type; } // Don't repopulate the list if we just did. @@ -2020,20 +2040,22 @@ static void PopulateVehicleTypeDropdown(Ride* ride, bool forceRefresh) for (; rideTypeIterator <= rideTypeIteratorMax; rideTypeIterator++) { - if (selectionShouldBeExpanded && GetRideTypeDescriptor(rideTypeIterator).HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) + const auto& rtdIterator = GetRideTypeDescriptor(rideTypeIterator); + if (selectionShouldBeExpanded && rtdIterator.HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) continue; - if (selectionShouldBeExpanded && (rideTypeIterator == RIDE_TYPE_MAZE || rideTypeIterator == RIDE_TYPE_MINI_GOLF)) + if (selectionShouldBeExpanded + && (rtdIterator.HasFlag(RIDE_TYPE_FLAG_IS_MAZE) || rideTypeIterator == RIDE_TYPE_MINI_GOLF)) continue; auto& rideEntries = objManager.GetAllRideEntries(rideTypeIterator); for (auto rideEntryIndex : rideEntries) { - const auto* currentRideEntry = get_ride_entry(rideEntryIndex); + const auto* currentRideEntry = GetRideEntryByIndex(rideEntryIndex); if (currentRideEntry == nullptr) continue; // Skip if vehicle type has not been invented yet - if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) continue; VehicleDropdownData.push_back( @@ -2050,13 +2072,13 @@ static void PopulateVehicleTypeDropdown(Ride* ride, bool forceRefresh) VehicleDropdownDataLanguage = ls.GetCurrentLanguage(); } -static void WindowRideShowVehicleTypeDropdown(rct_window* w, rct_widget* widget) +static void WindowRideShowVehicleTypeDropdown(WindowBase* w, Widget* widget) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; - PopulateVehicleTypeDropdown(ride); + PopulateVehicleTypeDropdown(*ride); size_t numItems = std::min(VehicleDropdownData.size(), Dropdown::ItemsMaxSize); @@ -2066,7 +2088,7 @@ static void WindowRideShowVehicleTypeDropdown(rct_window* w, rct_widget* widget) gDropdownItems[i].Args = VehicleDropdownData[i].label_id; } - rct_widget* dropdownWidget = widget - 1; + Widget* dropdownWidget = widget - 1; auto width = WindowDropDownHasMultipleColumns(numItems) ? dropdownWidget->width() - 24 : dropdownWidget->width(); WindowDropdownShowTextCustomWidth( { w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, @@ -2092,7 +2114,7 @@ static void WindowRideShowVehicleTypeDropdown(rct_window* w, rct_widget* widget) * * rct2: 0x006AF1BD */ -static void WindowRideMainMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideMainMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { switch (widgetIndex) { @@ -2115,7 +2137,7 @@ static void WindowRideMainMousedown(rct_window* w, WidgetIndex widgetIndex, rct_ * * rct2: 0x006AF300 */ -static void WindowRideMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideMainDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { switch (widgetIndex) { @@ -2123,7 +2145,7 @@ static void WindowRideMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32 if (dropdownIndex == -1) { dropdownIndex = w->ride.view + 1; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { if (dropdownIndex != 0 && dropdownIndex <= ride->NumTrains @@ -2144,7 +2166,7 @@ static void WindowRideMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32 break; case WIDX_OPEN: { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { auto status = RideStatus::Closed; @@ -2188,7 +2210,7 @@ static void WindowRideMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32 // Will get set to the correct Alternative variable during set_default_next_piece. // TODO: Rework construction window to prevent the need for this. _currentTrackAlternative = RIDE_TYPE_NO_ALTERNATIVES; - ride_construction_set_default_next_piece(); + RideConstructionSetDefaultNextPiece(); }); GameActions::Execute(&rideSetSetting); } @@ -2213,15 +2235,15 @@ static void WindowRideMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32 * * rct2: 0x006AF40F */ -static void WindowRideMainUpdate(rct_window* w) +static void WindowRideMainUpdate(WindowBase* w) { // Update tab animation w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_1); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_1); // Update status - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { if (!(ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MAIN)) @@ -2244,19 +2266,19 @@ static void WindowRideMainUpdate(rct_window* w) } ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_MAIN; } - widget_invalidate(*w, WIDX_STATUS); + WidgetInvalidate(*w, WIDX_STATUS); } /** * * rct2: 0x006AF2F9 */ -static void WindowRideMainTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) +static void WindowRideMainTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text) { if (widgetIndex != WIDX_RENAME || text == nullptr) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { auto gameAction = RideSetNameAction(ride->id, text); @@ -2268,7 +2290,7 @@ static void WindowRideMainTextinput(rct_window* w, WidgetIndex widgetIndex, char * * rct2: 0x006AF55A */ -static void WindowRideMainViewportRotate(rct_window* w) +static void WindowRideMainViewportRotate(WindowBase* w) { WindowRideInitViewport(w); } @@ -2277,9 +2299,9 @@ static void WindowRideMainViewportRotate(rct_window* w) * * rct2: 0x006AECF6 */ -static void WindowRideMainInvalidate(rct_window* w) +static void WindowRideMainInvalidate(WindowBase* w) { - rct_widget* widgets; + Widget* widgets; int32_t i, height; widgets = window_ride_page_widgets[w->page]; @@ -2291,7 +2313,7 @@ static void WindowRideMainInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -2308,7 +2330,7 @@ static void WindowRideMainInvalidate(rct_window* w) SPR_TESTING, SPR_G2_SIMULATE, }; - window_ride_main_widgets[WIDX_OPEN].image = spriteIds[EnumValue(ride->status)]; + window_ride_main_widgets[WIDX_OPEN].image = ImageId(spriteIds[EnumValue(ride->status)]); #ifdef __SIMULATE_IN_RIDE_WINDOW__ window_ride_main_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::Closed) * 2 @@ -2318,16 +2340,18 @@ static void WindowRideMainInvalidate(rct_window* w) window_ride_main_widgets[WIDX_TEST_LIGHT].image = SPR_G2_RCT1_TEST_BUTTON_0 + (ride->status == RideStatus::Testing) * 2 + WidgetIsPressed(*w, WIDX_TEST_LIGHT); #else - window_ride_main_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::Closed) * 2 + const auto closeLightImage = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::Closed) * 2 + WidgetIsPressed(*w, WIDX_CLOSE_LIGHT); + window_ride_main_widgets[WIDX_CLOSE_LIGHT].image = ImageId(closeLightImage); auto baseSprite = ride->status == RideStatus::Simulating ? SPR_G2_RCT1_SIMULATE_BUTTON_0 : SPR_G2_RCT1_TEST_BUTTON_0; - window_ride_main_widgets[WIDX_TEST_LIGHT].image = baseSprite - + (ride->status == RideStatus::Testing || ride->status == RideStatus::Simulating) * 2 + const auto testLightImage = baseSprite + (ride->status == RideStatus::Testing || ride->status == RideStatus::Simulating) * 2 + WidgetIsPressed(*w, WIDX_TEST_LIGHT); + window_ride_main_widgets[WIDX_TEST_LIGHT].image = ImageId(testLightImage); #endif - window_ride_main_widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + (ride->status == RideStatus::Open) * 2 + const auto openLightImage = SPR_G2_RCT1_OPEN_BUTTON_0 + (ride->status == RideStatus::Open) * 2 + WidgetIsPressed(*w, WIDX_OPEN_LIGHT); + window_ride_main_widgets[WIDX_OPEN_LIGHT].image = ImageId(openLightImage); WindowRideAnchorBorderWidgets(w); @@ -2361,7 +2385,7 @@ static void WindowRideMainInvalidate(rct_window* w) window_ride_main_widgets[WIDX_RIDE_TYPE_DROPDOWN].type = WindowWidgetType::Button; } - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); if (ThemeGetFlags() & UITHEME_FLAG_USE_LIGHTS_RIDE) { @@ -2420,10 +2444,10 @@ static void WindowRideMainInvalidate(rct_window* w) * * rct2: 0x006AF10A */ -static StringId WindowRideGetStatusOverallView(rct_window* w, Formatter& ft) +static StringId WindowRideGetStatusOverallView(WindowBase* w, Formatter& ft) { auto stringId = STR_NONE; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { ride->FormatStatusTo(ft); @@ -2440,9 +2464,9 @@ static StringId WindowRideGetStatusOverallView(rct_window* w, Formatter& ft) * * rct2: 0x006AEFEF */ -static StringId WindowRideGetStatusVehicle(rct_window* w, Formatter& ft) +static StringId WindowRideGetStatusVehicle(WindowBase* w, Formatter& ft) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return STR_EMPTY; @@ -2488,9 +2512,9 @@ static StringId WindowRideGetStatusVehicle(rct_window* w, Formatter& ft) * * rct2: 0x006AEF65 */ -static StringId WindowRideGetStatusStation(rct_window* w, Formatter& ft) +static StringId WindowRideGetStatusStation(WindowBase* w, Formatter& ft) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return STR_NONE; @@ -2540,9 +2564,9 @@ static StringId WindowRideGetStatusStation(rct_window* w, Formatter& ft) * * rct2: 0x006AEE73 */ -static StringId WindowRideGetStatus(rct_window* w, Formatter& ft) +static StringId WindowRideGetStatus(WindowBase* w, Formatter& ft) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (w->ride.view == 0) return WindowRideGetStatusOverallView(w, ft); if (ride != nullptr && w->ride.view <= ride->NumTrains) @@ -2556,9 +2580,9 @@ static StringId WindowRideGetStatus(rct_window* w, Formatter& ft) * * rct2: 0x006AEE73 */ -static void WindowRideMainPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideMainPaint(WindowBase* w, DrawPixelInfo* dpi) { - rct_widget* widget; + Widget* widget; WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); @@ -2566,13 +2590,13 @@ static void WindowRideMainPaint(rct_window* w, rct_drawpixelinfo* dpi) // Viewport and ear icon if (w->viewport != nullptr) { - window_draw_viewport(dpi, *w); + WindowDrawViewport(dpi, *w); if (w->viewport->flags & VIEWPORT_FLAG_SOUND_ON) - gfx_draw_sprite(dpi, ImageId(SPR_HEARING_VIEWPORT), w->windowPos + ScreenCoordsXY{ 2, 2 }); + GfxDrawSprite(dpi, ImageId(SPR_HEARING_VIEWPORT), w->windowPos + ScreenCoordsXY{ 2, 2 }); } // View dropdown - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -2597,7 +2621,7 @@ static void WindowRideMainPaint(rct_window* w, rct_drawpixelinfo* dpi) widget = &window_ride_main_widgets[WIDX_VIEW]; DrawTextBasic( - dpi, { w->windowPos.x + (widget->left + widget->right - 11) / 2, w->windowPos.y + widget->top }, + *dpi, { w->windowPos.x + (widget->left + widget->right - 11) / 2, w->windowPos.y + widget->top }, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); // Status @@ -2605,7 +2629,7 @@ static void WindowRideMainPaint(rct_window* w, rct_drawpixelinfo* dpi) widget = &window_ride_main_widgets[WIDX_STATUS]; StringId rideStatus = WindowRideGetStatus(w, ft); DrawTextEllipsised( - dpi, w->windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2, widget->top }, widget->width(), rideStatus, ft, + *dpi, w->windowPos + ScreenCoordsXY{ (widget->left + widget->right) / 2, widget->top }, widget->width(), rideStatus, ft, { TextAlignment::CENTRE }); } @@ -2617,12 +2641,12 @@ static void WindowRideMainPaint(rct_window* w, rct_drawpixelinfo* dpi) * * rct2: 0x006B272D */ -static void WindowRideVehicleMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideVehicleMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -2643,18 +2667,18 @@ static void WindowRideVehicleMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006B2ABB */ -static void WindowRideVehicleResize(rct_window* w) +static void WindowRideVehicleResize(WindowBase* w) { - window_set_resize(*w, 316, 214, 316, 214); + WindowSetResize(*w, 316, 214, 316, 214); } /** * * rct2: 0x006B2748 */ -static void WindowRideVehicleMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideVehicleMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -2686,7 +2710,7 @@ static void WindowRideVehicleMousedown(rct_window* w, WidgetIndex widgetIndex, r * * rct2: 0x006B2767 */ -static void WindowRideVehicleDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideVehicleDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -2696,7 +2720,7 @@ static void WindowRideVehicleDropdown(rct_window* w, WidgetIndex widgetIndex, in case WIDX_VEHICLE_TYPE_DROPDOWN: if (dropdownIndex >= 0 && static_cast(dropdownIndex) < VehicleDropdownData.size()) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { auto newRideType = VehicleDropdownData[dropdownIndex].subtype_id; @@ -2711,16 +2735,16 @@ static void WindowRideVehicleDropdown(rct_window* w, WidgetIndex widgetIndex, in * * rct2: 0x006B2AA1 */ -static void WindowRideVehicleUpdate(rct_window* w) +static void WindowRideVehicleUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_2); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_2); } -static OpenRCT2String WindowRideVehicleTooltip(rct_window* const w, const WidgetIndex widgetIndex, StringId fallback) +static OpenRCT2String WindowRideVehicleTooltip(WindowBase* const w, const WidgetIndex widgetIndex, StringId fallback) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return { STR_NONE, {} }; @@ -2771,10 +2795,9 @@ static OpenRCT2String WindowRideVehicleTooltip(rct_window* const w, const Widget * * rct2: 0x006B222C */ -static void WindowRideVehicleInvalidate(rct_window* w) +static void WindowRideVehicleInvalidate(WindowBase* w) { - rct_widget* widgets; - rct_ride_entry* rideEntry; + Widget* widgets; StringId stringId; int32_t carsPerTrain; @@ -2787,11 +2810,11 @@ static void WindowRideVehicleInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; - rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->GetRideEntry(); w->widgets[WIDX_TITLE].text = STR_ARG_20_STRINGID; @@ -2846,7 +2869,7 @@ static void WindowRideVehicleInvalidate(rct_window* w) ride->FormatNameTo(ft); WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); if (abs(ride->num_cars_per_train - rideEntry->zero_cars) == 1) { @@ -2862,12 +2885,12 @@ static void WindowRideVehicleInvalidate(rct_window* w) * * rct2: 0x006B23DC */ -static void WindowRideVehiclePaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideVehiclePaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -2880,13 +2903,13 @@ static void WindowRideVehiclePaint(rct_window* w, rct_drawpixelinfo* dpi) // Description auto ft = Formatter(); ft.Add(rideEntry->naming.Description); - screenCoords.y += DrawTextWrapped(dpi, screenCoords, 300, STR_BLACK_STRING, ft, { TextAlignment::LEFT }); + screenCoords.y += DrawTextWrapped(*dpi, screenCoords, 300, STR_BLACK_STRING, ft, { TextAlignment::LEFT }); screenCoords.y += 2; // Capacity ft = Formatter(); ft.Add(rideEntry->capacity); - DrawTextBasic(dpi, screenCoords, STR_CAPACITY, ft); + DrawTextBasic(*dpi, screenCoords, STR_CAPACITY, ft); // Excitement Factor if (rideEntry->excitement_multiplier != 0) @@ -2896,13 +2919,13 @@ static void WindowRideVehiclePaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(abs(rideEntry->excitement_multiplier)); StringId stringId = rideEntry->excitement_multiplier > 0 ? STR_EXCITEMENT_FACTOR : STR_EXCITEMENT_FACTOR_NEGATIVE; - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); } // Intensity Factor if (rideEntry->intensity_multiplier != 0) { - int32_t lineHeight = font_get_line_height(FontStyle::Medium); + int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); if (lineHeight != 10) screenCoords.x += 150; else @@ -2911,7 +2934,7 @@ static void WindowRideVehiclePaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(abs(rideEntry->intensity_multiplier)); StringId stringId = rideEntry->intensity_multiplier > 0 ? STR_INTENSITY_FACTOR : STR_INTENSITY_FACTOR_NEGATIVE; - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); if (lineHeight != 10) screenCoords.x -= 150; @@ -2925,7 +2948,7 @@ static void WindowRideVehiclePaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(abs(rideEntry->nausea_multiplier)); StringId stringId = rideEntry->nausea_multiplier > 0 ? STR_NAUSEA_FACTOR : STR_NAUSEA_FACTOR_NEGATIVE; - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); } } @@ -2940,23 +2963,23 @@ struct VehicleDrawInfo * * rct2: 0x006B2502 */ -static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowRideVehicleScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; - rct_ride_entry* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->GetRideEntry(); // Background - gfx_fill_rect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }, PALETTE_INDEX_12); + GfxFillRect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }, PALETTE_INDEX_12); - rct_widget* widget = &window_ride_vehicle_widgets[WIDX_VEHICLE_TRAINS_PREVIEW]; + Widget* widget = &window_ride_vehicle_widgets[WIDX_VEHICLE_TRAINS_PREVIEW]; int32_t startX = std::max(2, (widget->width() - ((ride->NumTrains - 1) * 36)) / 2 - 25); int32_t startY = widget->height() - 4; - CarEntry* carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, 0)]; - startY += carEntry->tab_height; + const auto& firstCarEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, 0)]; + startY += firstCarEntry.tab_height; // For each train for (int32_t i = 0; i < ride->NumTrains; i++) @@ -2970,9 +2993,9 @@ static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, static_assert(std::numeric_limitsnum_cars_per_train)>::max() <= std::size(trainCarImages)); for (int32_t j = 0; j < ride->num_cars_per_train; j++) { - carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, j)]; - x += carEntry->spacing / 17432; - y -= (carEntry->spacing / 2) / 17432; + const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, j)]; + x += carEntry.spacing / 17432; + y -= (carEntry.spacing / 2) / 17432; // Get colour of vehicle int32_t vehicleColourIndex = 0; @@ -2988,12 +3011,12 @@ static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, vehicleColourIndex = j; break; } - VehicleColour vehicleColour = ride_get_vehicle_colour(ride, vehicleColourIndex); + VehicleColour vehicleColour = RideGetVehicleColour(*ride, vehicleColourIndex); - ImageIndex imageIndex = carEntry->SpriteByYaw(OpenRCT2::Entity::Yaw::BaseRotation / 2, SpriteGroupType::SlopeFlat); - imageIndex &= carEntry->TabRotationMask; - imageIndex *= carEntry->base_num_frames; - imageIndex += carEntry->base_image_id; + ImageIndex imageIndex = carEntry.SpriteByYaw(OpenRCT2::Entity::Yaw::BaseRotation / 2, SpriteGroupType::SlopeFlat); + imageIndex &= carEntry.TabRotationMask; + imageIndex *= carEntry.base_num_frames; + imageIndex += carEntry.base_image_id; auto imageId = ImageId(imageIndex, vehicleColour.Body, vehicleColour.Trim, vehicleColour.Tertiary); @@ -3002,8 +3025,8 @@ static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, nextSpriteToDraw->imageId = imageId; nextSpriteToDraw++; - x += carEntry->spacing / 17432; - y -= (carEntry->spacing / 2) / 17432; + x += carEntry.spacing / 17432; + y -= (carEntry.spacing / 2) / 17432; } if (ride->type == RIDE_TYPE_REVERSER_ROLLER_COASTER) @@ -3015,7 +3038,7 @@ static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, VehicleDrawInfo* current = nextSpriteToDraw; while (--current >= trainCarImages) - gfx_draw_sprite(dpi, current->imageId, { current->x, current->y }); + GfxDrawSprite(dpi, current->imageId, { current->x, current->y }); startX += 36; } @@ -3029,9 +3052,9 @@ static void WindowRideVehicleScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, * * rct2: 0x006B11D5 */ -static void WindowRideModeTweakIncrease(rct_window* w) +static void WindowRideModeTweakIncrease(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3046,7 +3069,7 @@ static void WindowRideModeTweakIncrease(rct_window* w) uint8_t increment = ride->mode == RideMode::Dodgems ? 10 : 1; - set_operating_setting( + SetOperatingSetting( w->rideId, RideSetSetting::Operation, std::clamp(ride->operation_option + increment, minValue, maxValue)); } @@ -3054,9 +3077,9 @@ static void WindowRideModeTweakIncrease(rct_window* w) * * rct2: 0x006B120A */ -static void WindowRideModeTweakDecrease(rct_window* w) +static void WindowRideModeTweakDecrease(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3070,7 +3093,7 @@ static void WindowRideModeTweakDecrease(rct_window* w) uint8_t decrement = ride->mode == RideMode::Dodgems ? 10 : 1; - set_operating_setting( + SetOperatingSetting( w->rideId, RideSetSetting::Operation, std::clamp(ride->operation_option - decrement, minValue, maxValue)); } @@ -3078,12 +3101,12 @@ static void WindowRideModeTweakDecrease(rct_window* w) * * rct2: 0x006B1631 */ -static void WindowRideModeDropdown(rct_window* w, rct_widget* widget) +static void WindowRideModeDropdown(WindowBase* w, Widget* widget) { - rct_widget* dropdownWidget; + Widget* dropdownWidget; dropdownWidget = widget - 1; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3120,9 +3143,9 @@ static void WindowRideModeDropdown(rct_window* w, rct_widget* widget) * * rct2: 0x006B15C0 */ -static void WindowRideLoadDropdown(rct_window* w, rct_widget* widget) +static void WindowRideLoadDropdown(WindowBase* w, Widget* widget) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3143,17 +3166,17 @@ static void WindowRideLoadDropdown(rct_window* w, rct_widget* widget) * * rct2: 0x006B10A7 */ -static void WindowRideOperatingMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideOperatingMouseup(WindowBase* w, WidgetIndex widgetIndex) { const auto rideId = w->rideId; - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride == nullptr) return; switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -3168,20 +3191,19 @@ static void WindowRideOperatingMouseup(rct_window* w, WidgetIndex widgetIndex) WindowRideSetPage(w, widgetIndex - WIDX_TAB_1); break; case WIDX_LOAD_CHECKBOX: - set_operating_setting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_LOAD); + SetOperatingSetting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_LOAD); break; case WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX: - set_operating_setting( - rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES); + SetOperatingSetting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES); break; case WIDX_MINIMUM_LENGTH_CHECKBOX: - set_operating_setting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH); + SetOperatingSetting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH); break; case WIDX_MAXIMUM_LENGTH_CHECKBOX: - set_operating_setting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH); + SetOperatingSetting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH); break; case WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX: - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS); break; } @@ -3191,19 +3213,19 @@ static void WindowRideOperatingMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006B1715 */ -static void WindowRideOperatingResize(rct_window* w) +static void WindowRideOperatingResize(WindowBase* w) { - window_set_resize(*w, 316, 186, 316, 186); + WindowSetResize(*w, 316, 186, 316, 186); } /** * * rct2: 0x006B10F4 */ -static void WindowRideOperatingMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideOperatingMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { const auto rideId = w->rideId; - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride == nullptr) return; @@ -3223,7 +3245,7 @@ static void WindowRideOperatingMousedown(rct_window* w, WidgetIndex widgetIndex, upper_bound = gCheatsUnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit : ride->GetRideTypeDescriptor().LiftData.maximum_speed; lower_bound = gCheatsUnlockOperatingLimits ? 0 : ride->GetRideTypeDescriptor().LiftData.minimum_speed; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::LiftHillSpeed, std::clamp(ride->lift_hill_speed + 1, lower_bound, upper_bound)); break; @@ -3231,7 +3253,7 @@ static void WindowRideOperatingMousedown(rct_window* w, WidgetIndex widgetIndex, upper_bound = gCheatsUnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit : ride->GetRideTypeDescriptor().LiftData.maximum_speed; lower_bound = gCheatsUnlockOperatingLimits ? 0 : ride->GetRideTypeDescriptor().LiftData.minimum_speed; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::LiftHillSpeed, std::clamp(ride->lift_hill_speed - 1, lower_bound, upper_bound)); break; @@ -3244,28 +3266,28 @@ static void WindowRideOperatingMousedown(rct_window* w, WidgetIndex widgetIndex, case WIDX_MINIMUM_LENGTH_INCREASE: upper_bound = OpenRCT2::Limits::MaxWaitingTime; lower_bound = 0; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::MinWaitingTime, std::clamp(ride->min_waiting_time + 1, lower_bound, upper_bound)); break; case WIDX_MINIMUM_LENGTH_DECREASE: upper_bound = OpenRCT2::Limits::MaxWaitingTime; lower_bound = 0; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::MinWaitingTime, std::clamp(ride->min_waiting_time - 1, lower_bound, upper_bound)); break; case WIDX_MAXIMUM_LENGTH_INCREASE: upper_bound = OpenRCT2::Limits::MaxWaitingTime; lower_bound = 0; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::MaxWaitingTime, std::clamp(ride->max_waiting_time + 1, lower_bound, upper_bound)); break; case WIDX_MAXIMUM_LENGTH_DECREASE: upper_bound = OpenRCT2::Limits::MaxWaitingTime; lower_bound = 0; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::MaxWaitingTime, std::clamp(ride->max_waiting_time - 1, lower_bound, upper_bound)); break; @@ -3279,22 +3301,22 @@ static void WindowRideOperatingMousedown(rct_window* w, WidgetIndex widgetIndex, upper_bound = gCheatsUnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit : OpenRCT2::Limits::MaxCircuitsPerRide; lower_bound = 1; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::NumCircuits, std::clamp(ride->num_circuits + 1, lower_bound, upper_bound)); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE: upper_bound = gCheatsUnlockOperatingLimits ? OpenRCT2::Limits::CheatsMaxOperatingLimit : OpenRCT2::Limits::MaxCircuitsPerRide; lower_bound = 1; - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::NumCircuits, std::clamp(ride->num_circuits - 1, lower_bound, upper_bound)); break; } } -static void WindowRideOperatingLengthWindow(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideOperatingLengthWindow(WindowBase* w, WidgetIndex widgetIndex) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3310,7 +3332,7 @@ static void WindowRideOperatingLengthWindow(rct_window* w, WidgetIndex widgetInd WindowTextInputRawOpen(w, widgetIndex, title, STR_ENTER_VALUE, ft, buffer, 4); } -static void WindowRideOperatingTweakTextInput(rct_window* w, const Ride& ride) +static void WindowRideOperatingTweakTextInput(WindowBase* w, const Ride& ride) { switch (ride.mode) { @@ -3345,13 +3367,13 @@ static void WindowRideOperatingTweakTextInput(rct_window* w, const Ride& ride) * * rct2: 0x006B1165 */ -static void WindowRideOperatingDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideOperatingDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; const auto rideId = w->rideId; - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride == nullptr) return; @@ -3375,11 +3397,11 @@ static void WindowRideOperatingDropdown(rct_window* w, WidgetIndex widgetIndex, } } if (rideMode != RideMode::NullMode) - set_operating_setting(rideId, RideSetSetting::Mode, static_cast(rideMode)); + SetOperatingSetting(rideId, RideSetSetting::Mode, static_cast(rideMode)); break; } case WIDX_LOAD_DROPDOWN: - set_operating_setting( + SetOperatingSetting( rideId, RideSetSetting::Departure, (ride->depart_flags & ~RIDE_DEPART_WAIT_FOR_LOAD_MASK) | dropdownIndex); break; } @@ -3389,13 +3411,13 @@ static void WindowRideOperatingDropdown(rct_window* w, WidgetIndex widgetIndex, * * rct2: 0x006B178E */ -static void WindowRideOperatingUpdate(rct_window* w) +static void WindowRideOperatingUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_3); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_3); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_OPERATING) { ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_OPERATING; @@ -3403,12 +3425,12 @@ static void WindowRideOperatingUpdate(rct_window* w) } } -static void WindowRideOperatingTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) +static void WindowRideOperatingTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text) { if (text == nullptr) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3424,7 +3446,7 @@ static void WindowRideOperatingTextinput(rct_window* w, WidgetIndex widgetIndex, { uint32_t origSize = std::stol(std::string(text)) / multiplier; uint8_t size = static_cast(std::clamp(origSize, minValue, maxValue)); - set_operating_setting(ride->id, RideSetSetting::Operation, size); + SetOperatingSetting(ride->id, RideSetSetting::Operation, size); } catch (const std::logic_error&) { @@ -3442,7 +3464,7 @@ static void WindowRideOperatingTextinput(rct_window* w, WidgetIndex widgetIndex, uint16_t lowerBound = 0; uint16_t size = std::stol(std::string(text)); size = std::clamp(size, lowerBound, upperBound); - set_operating_setting(ride->id, rideSetSetting, size); + SetOperatingSetting(ride->id, rideSetSetting, size); } catch (const std::logic_error&) { @@ -3455,9 +3477,9 @@ static void WindowRideOperatingTextinput(rct_window* w, WidgetIndex widgetIndex, * * rct2: 0x006B0B30 */ -static void WindowRideOperatingInvalidate(rct_window* w) +static void WindowRideOperatingInvalidate(WindowBase* w) { - rct_widget* widgets; + Widget* widgets; StringId format, caption, tooltip; widgets = window_ride_page_widgets[w->page]; @@ -3469,7 +3491,7 @@ static void WindowRideOperatingInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3545,7 +3567,7 @@ static void WindowRideOperatingInvalidate(rct_window* w) if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS)) { window_ride_operating_widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].type = WindowWidgetType::Checkbox; - window_ride_operating_widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].image + window_ride_operating_widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].text = STR_SYNCHRONISE_WITH_ADJACENT_STATIONS; window_ride_operating_widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].tooltip = STR_SYNCHRONISE_WITH_ADJACENT_STATIONS_TIP; @@ -3692,24 +3714,24 @@ static void WindowRideOperatingInvalidate(rct_window* w) } WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } /** * * rct2: 0x006B1001 */ -static void WindowRideOperatingPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideOperatingPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; // Horizontal rule between mode settings and depart settings - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { w->windowPos + ScreenCoordsXY{ window_ride_operating_widgets[WIDX_PAGE_BACKGROUND].left + 4, 103 }, w->windowPos + ScreenCoordsXY{ window_ride_operating_widgets[WIDX_PAGE_BACKGROUND].right - 5, 104 } }, @@ -3721,7 +3743,7 @@ static void WindowRideOperatingPaint(rct_window* w, rct_drawpixelinfo* dpi) auto ft = Formatter(); ft.Add(ride->num_block_brakes + ride->num_stations); DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 21, ride->mode == RideMode::PoweredLaunchBlockSectioned ? 89 : 61 }, + *dpi, w->windowPos + ScreenCoordsXY{ 21, ride->mode == RideMode::PoweredLaunchBlockSectioned ? 89 : 61 }, STR_BLOCK_SECTIONS, ft, COLOUR_BLACK); } } @@ -3734,25 +3756,25 @@ static void WindowRideOperatingPaint(rct_window* w, rct_drawpixelinfo* dpi) * * rct2: 0x006B1AE4 */ -static void WindowRideLocateMechanic(rct_window* w) +static void WindowRideLocateMechanic(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; // First check if there is a mechanic assigned - Peep* mechanic = ride_get_assigned_mechanic(ride); + Peep* mechanic = RideGetAssignedMechanic(*ride); // Otherwise find the closest mechanic if (mechanic == nullptr) - mechanic = ride_find_closest_mechanic(ride, 1); + mechanic = RideFindClosestMechanic(*ride, 1); if (mechanic == nullptr) ContextShowError(STR_UNABLE_TO_LOCATE_MECHANIC, STR_NONE, {}); else { auto intent = Intent(WindowClass::Peep); - intent.putExtra(INTENT_EXTRA_PEEP, mechanic); + intent.PutExtra(INTENT_EXTRA_PEEP, mechanic); ContextOpenIntent(&intent); } } @@ -3762,20 +3784,20 @@ static void WindowRideLocateMechanic(rct_window* w) * rct2: 0x006B7D08 */ static void WindowRideMaintenanceDrawBar( - rct_window* w, rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t value, int32_t colour) + WindowBase* w, DrawPixelInfo* dpi, const ScreenCoordsXY& coords, int32_t value, int32_t colour) { - gfx_fill_rect_inset(dpi, { coords, coords + ScreenCoordsXY{ 149, 8 } }, w->colours[1], INSET_RECT_F_30); + GfxFillRectInset(dpi, { coords, coords + ScreenCoordsXY{ 149, 8 } }, w->colours[1], INSET_RECT_F_30); if (colour & BAR_BLINK) { colour &= ~BAR_BLINK; - if (game_is_not_paused() && (gCurrentRealTimeTicks & 8)) + if (GameIsNotPaused() && (gCurrentRealTimeTicks & 8)) return; } value = ((186 * ((value * 2) & 0xFF)) >> 8) & 0xFF; if (value > 2) { - gfx_fill_rect_inset(dpi, { coords + ScreenCoordsXY{ 2, 1 }, coords + ScreenCoordsXY{ value + 1, 7 } }, colour, 0); + GfxFillRectInset(dpi, { coords + ScreenCoordsXY{ 2, 1 }, coords + ScreenCoordsXY{ value + 1, 7 } }, colour, 0); } } @@ -3783,12 +3805,12 @@ static void WindowRideMaintenanceDrawBar( * * rct2: 0x006B1AAD */ -static void WindowRideMaintenanceMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideMaintenanceMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -3815,18 +3837,18 @@ static void WindowRideMaintenanceMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006B1D70 */ -static void WindowRideMaintenanceResize(rct_window* w) +static void WindowRideMaintenanceResize(WindowBase* w) { - window_set_resize(*w, 316, 135, 316, 135); + WindowSetResize(*w, 316, 135, 316, 135); } /** * * rct2: 0x006B1ACE */ -static void WindowRideMaintenanceMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideMaintenanceMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3834,7 +3856,7 @@ static void WindowRideMaintenanceMousedown(rct_window* w, WidgetIndex widgetInde if (rideEntry == nullptr) return; - rct_widget* dropdownWidget = widget; + Widget* dropdownWidget = widget; int32_t j, num_items; switch (widgetIndex) @@ -3925,12 +3947,12 @@ static void WindowRideMaintenanceMousedown(rct_window* w, WidgetIndex widgetInde * * rct2: 0x006B1AD9 */ -static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideMaintenanceDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -3941,7 +3963,7 @@ static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex switch (widgetIndex) { case WIDX_INSPECTION_INTERVAL_DROPDOWN: - set_operating_setting(w->rideId, RideSetSetting::InspectionInterval, dropdownIndex); + SetOperatingSetting(w->rideId, RideSetSetting::InspectionInterval, dropdownIndex); break; case WIDX_FORCE_BREAKDOWN: @@ -3958,9 +3980,8 @@ static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex for (vehicle = GetEntity(ride->vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { - vehicle->ClearUpdateFlag( - VEHICLE_UPDATE_FLAG_BROKEN_CAR | VEHICLE_UPDATE_FLAG_ZERO_VELOCITY - | VEHICLE_UPDATE_FLAG_BROKEN_TRAIN); + vehicle->ClearFlag( + VehicleFlags::CarIsBroken | VehicleFlags::StoppedOnLift | VehicleFlags::TrainIsBroken); } } break; @@ -3971,19 +3992,19 @@ static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex vehicle = GetEntity(ride->vehicles[ride->broken_vehicle]); if (vehicle != nullptr) { - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_CAR); + vehicle->ClearFlag(VehicleFlags::CarIsBroken); } break; case BREAKDOWN_VEHICLE_MALFUNCTION: vehicle = GetEntity(ride->vehicles[ride->broken_vehicle]); if (vehicle != nullptr) { - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN); + vehicle->ClearFlag(VehicleFlags::TrainIsBroken); } break; } ride->lifecycle_flags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); - window_invalidate_by_number(WindowClass::Ride, w->number); + WindowInvalidateByNumber(WindowClass::Ride, w->number); break; } if (ride->lifecycle_flags @@ -4020,7 +4041,7 @@ static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex num_items++; } } - ride_prepare_breakdown(ride, i); + RidePrepareBreakdown(*ride, i); } break; } @@ -4030,13 +4051,13 @@ static void WindowRideMaintenanceDropdown(rct_window* w, WidgetIndex widgetIndex * * rct2: 0x006B1D37 */ -static void WindowRideMaintenanceUpdate(rct_window* w) +static void WindowRideMaintenanceUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_4); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_4); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MAINTENANCE) { ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_MAINTENANCE; @@ -4048,7 +4069,7 @@ static void WindowRideMaintenanceUpdate(rct_window* w) * * rct2: 0x006B17C8 */ -static void WindowRideMaintenanceInvalidate(rct_window* w) +static void WindowRideMaintenanceInvalidate(WindowBase* w) { auto widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) @@ -4059,7 +4080,7 @@ static void WindowRideMaintenanceInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -4069,9 +4090,9 @@ static void WindowRideMaintenanceInvalidate(rct_window* w) window_ride_maintenance_widgets[WIDX_INSPECTION_INTERVAL].text = RideInspectionIntervalNames[ride->inspection_interval]; WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); - if (gConfigGeneral.DebuggingTools && network_get_mode() == NETWORK_MODE_NONE) + if (gConfigGeneral.DebuggingTools && NetworkGetMode() == NETWORK_MODE_NONE) { window_ride_maintenance_widgets[WIDX_FORCE_BREAKDOWN].type = WindowWidgetType::FlatBtn; } @@ -4096,25 +4117,25 @@ static void WindowRideMaintenanceInvalidate(rct_window* w) * * rct2: 0x006B1877 */ -static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideMaintenancePaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; // Locate mechanic button image - rct_widget* widget = &window_ride_maintenance_widgets[WIDX_LOCATE_MECHANIC]; + Widget* widget = &window_ride_maintenance_widgets[WIDX_LOCATE_MECHANIC]; auto screenCoords = w->windowPos + ScreenCoordsXY{ widget->left, widget->top }; auto image = ImageId(SPR_MECHANIC, COLOUR_BLACK, gStaffMechanicColour); - gfx_draw_sprite(dpi, image, screenCoords); + GfxDrawSprite(dpi, image, screenCoords); // Inspection label widget = &window_ride_maintenance_widgets[WIDX_INSPECTION_INTERVAL]; screenCoords = w->windowPos + ScreenCoordsXY{ 4, widget->top + 1 }; - DrawTextBasic(dpi, screenCoords, STR_INSPECTION); + DrawTextBasic(*dpi, screenCoords, STR_INSPECTION); // Reliability widget = &window_ride_maintenance_widgets[WIDX_PAGE_BACKGROUND]; @@ -4123,7 +4144,7 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) uint16_t reliability = ride->reliability_percentage; auto ft = Formatter(); ft.Add(reliability); - DrawTextBasic(dpi, screenCoords, STR_RELIABILITY_LABEL_1757, ft); + DrawTextBasic(*dpi, screenCoords, STR_RELIABILITY_LABEL_1757, ft); WindowRideMaintenanceDrawBar( w, dpi, screenCoords + ScreenCoordsXY{ 103, 0 }, std::max(10, reliability), COLOUR_BRIGHT_GREEN); screenCoords.y += 11; @@ -4131,7 +4152,7 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) uint16_t downTime = ride->downtime; ft = Formatter(); ft.Add(downTime); - DrawTextBasic(dpi, screenCoords, STR_DOWN_TIME_LABEL_1889, ft); + DrawTextBasic(*dpi, screenCoords, STR_DOWN_TIME_LABEL_1889, ft); WindowRideMaintenanceDrawBar(w, dpi, screenCoords + ScreenCoordsXY{ 103, 0 }, downTime, COLOUR_BRIGHT_RED); screenCoords.y += 26; @@ -4146,7 +4167,7 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(ride->last_inspection); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += 12; // Last / current breakdown @@ -4156,7 +4177,7 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) stringId = (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) ? STR_CURRENT_BREAKDOWN : STR_LAST_BREAKDOWN; ft = Formatter(); ft.Add(RideBreakdownReasonNames[ride->breakdown_reason]); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += 12; // Mechanic status @@ -4194,7 +4215,7 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) { if (stringId == STR_CALLING_MECHANIC || stringId == STR_NO_MECHANICS_ARE_HIRED_MESSAGE) { - DrawTextWrapped(dpi, screenCoords, 280, stringId, {}, { TextAlignment::LEFT }); + DrawTextWrapped(*dpi, screenCoords, 280, stringId, {}, { TextAlignment::LEFT }); } else { @@ -4203,7 +4224,7 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) { ft = Formatter(); staff->FormatNameTo(ft); - DrawTextWrapped(dpi, screenCoords, 280, stringId, ft, { TextAlignment::LEFT }); + DrawTextWrapped(*dpi, screenCoords, 280, stringId, ft, { TextAlignment::LEFT }); } } } @@ -4214,13 +4235,13 @@ static void WindowRideMaintenancePaint(rct_window* w, rct_drawpixelinfo* dpi) #pragma region Colour -static int32_t WindowRideHasTrackColour(Ride* ride, int32_t trackColour) +static int32_t WindowRideHasTrackColour(const Ride& ride, int32_t trackColour) { // Get station flags (shops don't have them) auto stationObjFlags = 0; - if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) + if (!ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) { - auto stationObj = ride->GetStationObject(); + auto stationObj = ride.GetStationObject(); if (stationObj != nullptr) { stationObjFlags = stationObj->Flags; @@ -4231,21 +4252,21 @@ static int32_t WindowRideHasTrackColour(Ride* ride, int32_t trackColour) { case 0: return (stationObjFlags & STATION_OBJECT_FLAGS::HAS_PRIMARY_COLOUR) - || ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN); + || ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN); case 1: return (stationObjFlags & STATION_OBJECT_FLAGS::HAS_SECONDARY_COLOUR) - || ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_ADDITIONAL); + || ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_ADDITIONAL); case 2: - return ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS); + return ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS); default: return 0; } } -static void WindowRideSetTrackColourScheme(rct_window* w, const ScreenCoordsXY& screenPos) +static void WindowRideSetTrackColourScheme(WindowBase* w, const ScreenCoordsXY& screenPos) { auto newColourScheme = static_cast(w->ride_colour); - auto info = get_map_coordinates_from_pos(screenPos, EnumsToFlags(ViewportInteractionItem::Ride)); + auto info = GetMapCoordinatesFromPos(screenPos, EnumsToFlags(ViewportInteractionItem::Ride)); if (info.SpriteType != ViewportInteractionItem::Ride) return; @@ -4267,9 +4288,9 @@ static void WindowRideSetTrackColourScheme(rct_window* w, const ScreenCoordsXY& * * rct2: 0x006B04FA */ -static void WindowRideColourClose(rct_window* w) +static void WindowRideColourClose(WindowBase* w) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) return; if (gCurrentToolWidget.window_classification != w->classification) @@ -4278,19 +4299,19 @@ static void WindowRideColourClose(rct_window* w) if (gCurrentToolWidget.window_number != w->number) return; - tool_cancel(); + ToolCancel(); } /** * * rct2: 0x006B02A1 */ -static void WindowRideColourMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideColourMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -4305,10 +4326,10 @@ static void WindowRideColourMouseup(rct_window* w, WidgetIndex widgetIndex) WindowRideSetPage(w, widgetIndex - WIDX_TAB_1); break; case WIDX_PAINT_INDIVIDUAL_AREA: - tool_set(*w, WIDX_PAINT_INDIVIDUAL_AREA, Tool::PaintDown); + ToolSet(*w, WIDX_PAINT_INDIVIDUAL_AREA, Tool::PaintDown); break; case WIDX_SELL_ITEM_RANDOM_COLOUR_CHECKBOX: - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { const bool currentlyEnabled = ride->HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); @@ -4324,22 +4345,22 @@ static void WindowRideColourMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006B0AB6 */ -static void WindowRideColourResize(rct_window* w) +static void WindowRideColourResize(WindowBase* w) { - window_set_resize(*w, 316, 207, 316, 207); + WindowSetResize(*w, 316, 207, 316, 207); } /** * * rct2: 0x006B02C6 */ -static void WindowRideColourMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideColourMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { VehicleColour vehicleColour; int32_t i, numItems; StringId stringId; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -4449,15 +4470,15 @@ static void WindowRideColourMousedown(rct_window* w, WidgetIndex widgetIndex, rc Dropdown::SetChecked(w->vehicleIndex, true); break; case WIDX_VEHICLE_BODY_COLOUR: - vehicleColour = ride_get_vehicle_colour(ride, w->vehicleIndex); + vehicleColour = RideGetVehicleColour(*ride, w->vehicleIndex); WindowDropdownShowColour(w, widget, w->colours[1], vehicleColour.Body); break; case WIDX_VEHICLE_TRIM_COLOUR: - vehicleColour = ride_get_vehicle_colour(ride, w->vehicleIndex); + vehicleColour = RideGetVehicleColour(*ride, w->vehicleIndex); WindowDropdownShowColour(w, widget, w->colours[1], vehicleColour.Trim); break; case WIDX_VEHICLE_TERNARY_COLOUR: - vehicleColour = ride_get_vehicle_colour(ride, w->vehicleIndex); + vehicleColour = RideGetVehicleColour(*ride, w->vehicleIndex); WindowDropdownShowColour(w, widget, w->colours[1], vehicleColour.Tertiary); break; } @@ -4467,7 +4488,7 @@ static void WindowRideColourMousedown(rct_window* w, WidgetIndex widgetIndex, rc * * rct2: 0x006B0331 */ -static void WindowRideColourDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideColourDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (dropdownIndex == -1) return; @@ -4573,19 +4594,19 @@ static void WindowRideColourDropdown(rct_window* w, WidgetIndex widgetIndex, int * * rct2: 0x006B0A8F */ -static void WindowRideColourUpdate(rct_window* w) +static void WindowRideColourUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_5); - widget_invalidate(*w, WIDX_VEHICLE_PREVIEW); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_5); + WidgetInvalidate(*w, WIDX_VEHICLE_PREVIEW); } /** * * rct2: 0x006B04EC */ -static void WindowRideColourTooldown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void WindowRideColourTooldown(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (widgetIndex == WIDX_PAINT_INDIVIDUAL_AREA) WindowRideSetTrackColourScheme(w, screenCoords); @@ -4595,7 +4616,7 @@ static void WindowRideColourTooldown(rct_window* w, WidgetIndex widgetIndex, con * * rct2: 0x006B04F3 */ -static void WindowRideColourTooldrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void WindowRideColourTooldrag(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (widgetIndex == WIDX_PAINT_INDIVIDUAL_AREA) WindowRideSetTrackColourScheme(w, screenCoords); @@ -4605,7 +4626,7 @@ static void WindowRideColourTooldrag(rct_window* w, WidgetIndex widgetIndex, con * * rct2: 0x006AFB36 */ -static void WindowRideColourInvalidate(rct_window* w) +static void WindowRideColourInvalidate(WindowBase* w) { TrackColour trackColour; VehicleColour vehicleColour; @@ -4619,7 +4640,7 @@ static void WindowRideColourInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -4634,10 +4655,11 @@ static void WindowRideColourInvalidate(rct_window* w) // Track colours int32_t colourScheme = w->ride_colour; - trackColour = ride_get_track_colour(ride, colourScheme); + trackColour = ride->track_colour[colourScheme]; // Maze style - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { window_ride_colour_widgets[WIDX_MAZE_STYLE].type = WindowWidgetType::DropdownMenu; window_ride_colour_widgets[WIDX_MAZE_STYLE_DROPDOWN].type = WindowWidgetType::Button; @@ -4664,10 +4686,10 @@ static void WindowRideColourInvalidate(rct_window* w) } // Track main colour - if (WindowRideHasTrackColour(ride, 0)) + if (WindowRideHasTrackColour(*ride, 0)) { window_ride_colour_widgets[WIDX_TRACK_MAIN_COLOUR].type = WindowWidgetType::ColourBtn; - window_ride_colour_widgets[WIDX_TRACK_MAIN_COLOUR].image = GetColourButtonImage(trackColour.main).ToUInt32(); + window_ride_colour_widgets[WIDX_TRACK_MAIN_COLOUR].image = GetColourButtonImage(trackColour.main); } else { @@ -4675,11 +4697,10 @@ static void WindowRideColourInvalidate(rct_window* w) } // Track additional colour - if (WindowRideHasTrackColour(ride, 1)) + if (WindowRideHasTrackColour(*ride, 1)) { window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].type = WindowWidgetType::ColourBtn; - window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].image = GetColourButtonImage(trackColour.additional) - .ToUInt32(); + window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].image = GetColourButtonImage(trackColour.additional); } else { @@ -4705,10 +4726,10 @@ static void WindowRideColourInvalidate(rct_window* w) } // Track supports colour - if (WindowRideHasTrackColour(ride, 2) && ride->type != RIDE_TYPE_MAZE) + if (WindowRideHasTrackColour(*ride, 2) && !rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { window_ride_colour_widgets[WIDX_TRACK_SUPPORT_COLOUR].type = WindowWidgetType::ColourBtn; - window_ride_colour_widgets[WIDX_TRACK_SUPPORT_COLOUR].image = GetColourButtonImage(trackColour.supports).ToUInt32(); + window_ride_colour_widgets[WIDX_TRACK_SUPPORT_COLOUR].image = GetColourButtonImage(trackColour.supports); } else { @@ -4753,18 +4774,18 @@ static void WindowRideColourInvalidate(rct_window* w) if (vehicleColourSchemeType == 0) w->vehicleIndex = 0; - vehicleColour = ride_get_vehicle_colour(ride, w->vehicleIndex); + vehicleColour = RideGetVehicleColour(*ride, w->vehicleIndex); window_ride_colour_widgets[WIDX_VEHICLE_PREVIEW].type = WindowWidgetType::Scroll; window_ride_colour_widgets[WIDX_VEHICLE_BODY_COLOUR].type = WindowWidgetType::ColourBtn; - window_ride_colour_widgets[WIDX_VEHICLE_BODY_COLOUR].image = GetColourButtonImage(vehicleColour.Body).ToUInt32(); + window_ride_colour_widgets[WIDX_VEHICLE_BODY_COLOUR].image = GetColourButtonImage(vehicleColour.Body); bool allowChangingTrimColour = false; bool allowChangingTernaryColour = false; for (int32_t i = 0; i < ride->num_cars_per_train; i++) { - uint8_t vehicleTypeIndex = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, i); + uint8_t vehicleTypeIndex = RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, i); if (rideEntry->Cars[vehicleTypeIndex].flags & CAR_ENTRY_FLAG_ENABLE_TRIM_COLOUR) { @@ -4780,12 +4801,11 @@ static void WindowRideColourInvalidate(rct_window* w) if (allowChangingTrimColour) { window_ride_colour_widgets[WIDX_VEHICLE_TRIM_COLOUR].type = WindowWidgetType::ColourBtn; - window_ride_colour_widgets[WIDX_VEHICLE_TRIM_COLOUR].image = GetColourButtonImage(vehicleColour.Trim).ToUInt32(); + window_ride_colour_widgets[WIDX_VEHICLE_TRIM_COLOUR].image = GetColourButtonImage(vehicleColour.Trim); if (allowChangingTernaryColour) { window_ride_colour_widgets[WIDX_VEHICLE_TERNARY_COLOUR].type = WindowWidgetType::ColourBtn; - window_ride_colour_widgets[WIDX_VEHICLE_TERNARY_COLOUR].image = GetColourButtonImage(vehicleColour.Tertiary) - .ToUInt32(); + window_ride_colour_widgets[WIDX_VEHICLE_TERNARY_COLOUR].image = GetColourButtonImage(vehicleColour.Tertiary); } else { @@ -4849,19 +4869,19 @@ static void WindowRideColourInvalidate(rct_window* w) ft.Add(ColourSchemeNames[colourScheme]); WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } /** * * rct2: 0x006AFF3E */ -static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideColourPaint(WindowBase* w, DrawPixelInfo* dpi) { // TODO: This should use lists and identified sprites - rct_drawpixelinfo clippedDpi; + DrawPixelInfo clippedDpi; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -4871,13 +4891,13 @@ static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) // Track / shop item preview const auto& trackPreviewWidget = window_ride_colour_widgets[WIDX_TRACK_PREVIEW]; if (trackPreviewWidget.type != WindowWidgetType::Empty) - gfx_fill_rect( + GfxFillRect( dpi, { { w->windowPos + ScreenCoordsXY{ trackPreviewWidget.left + 1, trackPreviewWidget.top + 1 } }, { w->windowPos + ScreenCoordsXY{ trackPreviewWidget.right - 1, trackPreviewWidget.bottom - 1 } } }, PALETTE_INDEX_12); - auto trackColour = ride_get_track_colour(ride, w->ride_colour); + auto trackColour = ride->track_colour[w->ride_colour]; // auto rideEntry = ride->GetRideEntry(); @@ -4886,9 +4906,10 @@ static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) auto screenCoords = w->windowPos + ScreenCoordsXY{ trackPreviewWidget.left, trackPreviewWidget.top }; // Track - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - gfx_draw_sprite(dpi, ImageId(MazeOptions[trackColour.supports].sprite), screenCoords); + GfxDrawSprite(dpi, ImageId(MazeOptions[trackColour.supports].sprite), screenCoords); } else { @@ -4896,14 +4917,14 @@ static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) int32_t spriteIndex = typeDescriptor.ColourPreview.Track; if (spriteIndex != 0) { - gfx_draw_sprite(dpi, ImageId(spriteIndex, trackColour.main, trackColour.additional), screenCoords); + GfxDrawSprite(dpi, ImageId(spriteIndex, trackColour.main, trackColour.additional), screenCoords); } // Supports spriteIndex = typeDescriptor.ColourPreview.Supports; if (spriteIndex != 0) { - gfx_draw_sprite(dpi, ImageId(spriteIndex, trackColour.supports), screenCoords); + GfxDrawSprite(dpi, ImageId(spriteIndex, trackColour.supports), screenCoords); } } } @@ -4927,25 +4948,25 @@ static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) } } - gfx_draw_sprite(dpi, ImageId(GetShopItemDescriptor(shopItem).Image, spriteColour), screenCoords); + GfxDrawSprite(dpi, ImageId(GetShopItemDescriptor(shopItem).Image, spriteColour), screenCoords); } else { - gfx_draw_sprite(dpi, ImageId(GetShopItemDescriptor(shopItem).Image, ride->track_colour[0].main), screenCoords); + GfxDrawSprite(dpi, ImageId(GetShopItemDescriptor(shopItem).Image, ride->track_colour[0].main), screenCoords); } } // Entrance preview - trackColour = ride_get_track_colour(ride, 0); + trackColour = ride->track_colour[0]; const auto& entrancePreviewWidget = w->widgets[WIDX_ENTRANCE_PREVIEW]; if (entrancePreviewWidget.type != WindowWidgetType::Empty) { - if (clip_drawpixelinfo( + if (ClipDrawPixelInfo( &clippedDpi, dpi, w->windowPos + ScreenCoordsXY{ entrancePreviewWidget.left + 1, entrancePreviewWidget.top + 1 }, entrancePreviewWidget.width(), entrancePreviewWidget.height())) { - gfx_clear(&clippedDpi, PALETTE_INDEX_12); + GfxClear(&clippedDpi, PALETTE_INDEX_12); auto stationObj = ride->GetStationObject(); if (stationObj != nullptr && stationObj->BaseImageId != ImageIndexUndefined) @@ -4953,21 +4974,21 @@ static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) auto imageId = ImageId(stationObj->BaseImageId, trackColour.main, trackColour.additional); // Back - gfx_draw_sprite(&clippedDpi, imageId, { 34, 20 }); + GfxDrawSprite(&clippedDpi, imageId, { 34, 20 }); // Front - gfx_draw_sprite(&clippedDpi, imageId.WithIndexOffset(4), { 34, 20 }); + GfxDrawSprite(&clippedDpi, imageId.WithIndexOffset(4), { 34, 20 }); // Glass if (stationObj->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) { auto glassImageId = ImageId(stationObj->BaseImageId + 20).WithTransparency(trackColour.main); - gfx_draw_sprite(&clippedDpi, glassImageId, { 34, 20 }); + GfxDrawSprite(&clippedDpi, glassImageId, { 34, 20 }); } } } - DrawTextEllipsised(dpi, { w->windowPos.x + 3, w->windowPos.y + 103 }, 97, STR_STATION_STYLE, {}); + DrawTextEllipsised(*dpi, { w->windowPos.x + 3, w->windowPos.y + 103 }, 97, STR_STATION_STYLE, {}); } } @@ -4975,9 +4996,9 @@ static void WindowRideColourPaint(rct_window* w, rct_drawpixelinfo* dpi) * * rct2: 0x006B0192 */ -static void WindowRideColourScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowRideColourScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -4986,10 +5007,10 @@ static void WindowRideColourScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i return; auto vehiclePreviewWidget = &window_ride_colour_widgets[WIDX_VEHICLE_PREVIEW]; - auto vehicleColour = ride_get_vehicle_colour(ride, w->vehicleIndex); + auto vehicleColour = RideGetVehicleColour(*ride, w->vehicleIndex); // Background colour - gfx_fill_rect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width - 1, dpi->y + dpi->height - 1 } }, PALETTE_INDEX_12); + GfxFillRect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width - 1, dpi->y + dpi->height - 1 } }, PALETTE_INDEX_12); // ? auto screenCoords = ScreenCoordsXY{ vehiclePreviewWidget->width() / 2, vehiclePreviewWidget->height() - 15 }; @@ -4998,19 +5019,19 @@ static void WindowRideColourScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i auto trainCarIndex = (ride->colour_scheme_type & 3) == RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR ? w->vehicleIndex : rideEntry->TabCar; - CarEntry* carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position( - ride->subtype, ride->num_cars_per_train, trainCarIndex)]; + const auto& carEntry = rideEntry + ->Cars[RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, trainCarIndex)]; - screenCoords.y += carEntry->tab_height; + screenCoords.y += carEntry.tab_height; // Draw the coloured spinning vehicle // w->frame_no represents a SpritePrecision of 64 - ImageIndex imageIndex = carEntry->SpriteByYaw(w->frame_no / 2, SpriteGroupType::SlopeFlat); - imageIndex &= carEntry->TabRotationMask; - imageIndex *= carEntry->base_num_frames; - imageIndex += carEntry->base_image_id; + ImageIndex imageIndex = carEntry.SpriteByYaw(w->frame_no / 2, SpriteGroupType::SlopeFlat); + imageIndex &= carEntry.TabRotationMask; + imageIndex *= carEntry.base_num_frames; + imageIndex += carEntry.base_image_id; auto imageId = ImageId(imageIndex, vehicleColour.Body, vehicleColour.Trim, vehicleColour.Tertiary); - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(dpi, imageId, screenCoords); } #pragma endregion @@ -5022,13 +5043,13 @@ static std::vector window_ride_current_music_style_order; * * rct2: 0x006B215D */ -static void WindowRideToggleMusic(rct_window* w) +static void WindowRideToggleMusic(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { int32_t activateMusic = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) ? 0 : 1; - set_operating_setting(w->rideId, RideSetSetting::Music, activateMusic); + SetOperatingSetting(w->rideId, RideSetSetting::Music, activateMusic); } } @@ -5036,12 +5057,12 @@ static void WindowRideToggleMusic(rct_window* w) * * rct2: 0x006B1ED7 */ -static void WindowRideMusicMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideMusicMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -5065,10 +5086,10 @@ static void WindowRideMusicMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006AF4A2 */ -static void WindowRideMusicResize(rct_window* w) +static void WindowRideMusicResize(WindowBase* w) { w->flags |= WF_RESIZABLE; - window_set_resize(*w, 316, 81, 316, 81); + WindowSetResize(*w, 316, 81, 316, 81); } static std::string GetMusicString(ObjectEntryIndex musicObjectIndex) @@ -5077,20 +5098,20 @@ static std::string GetMusicString(ObjectEntryIndex musicObjectIndex) auto musicObj = static_cast(objManager.GetLoadedObject(ObjectType::Music, musicObjectIndex)); auto name = musicObj->NameStringId; - return format_string(name, {}); + return FormatStringID(name, {}); } /** * * rct2: 0x006B1EFC */ -static void WindowRideMusicMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideMusicMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { if (widgetIndex != WIDX_MUSIC_DROPDOWN) return; auto dropdownWidget = widget - 1; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -5162,13 +5183,13 @@ static void WindowRideMusicMousedown(rct_window* w, WidgetIndex widgetIndex, rct * * rct2: 0x006B1F03 */ -static void WindowRideMusicDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideMusicDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (widgetIndex == WIDX_MUSIC_DROPDOWN && dropdownIndex >= 0 && static_cast(dropdownIndex) < window_ride_current_music_style_order.size()) { auto musicStyle = window_ride_current_music_style_order[dropdownIndex]; - set_operating_setting(w->rideId, RideSetSetting::MusicType, musicStyle); + SetOperatingSetting(w->rideId, RideSetSetting::MusicType, musicStyle); } } @@ -5176,18 +5197,18 @@ static void WindowRideMusicDropdown(rct_window* w, WidgetIndex widgetIndex, int3 * * rct2: 0x006B2198 */ -static void WindowRideMusicUpdate(rct_window* w) +static void WindowRideMusicUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_6); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_6); } /** * * rct2: 0x006B1DEA */ -static void WindowRideMusicInvalidate(rct_window* w) +static void WindowRideMusicInvalidate(WindowBase* w) { auto widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) @@ -5198,7 +5219,7 @@ static void WindowRideMusicInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -5231,14 +5252,14 @@ static void WindowRideMusicInvalidate(rct_window* w) } WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } /** * * rct2: 0x006B1ECC */ -static void WindowRideMusicPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideMusicPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); @@ -5264,45 +5285,45 @@ static void CancelScenerySelection() gTrackDesignSaveMode = false; OpenRCT2::Audio::Resume(); - rct_window* main_w = window_get_main(); + WindowBase* main_w = WindowGetMain(); if (main_w != nullptr) { main_w->viewport->flags &= ~(VIEWPORT_FLAG_HIDE_VERTICAL | VIEWPORT_FLAG_HIDE_BASE); } - gfx_invalidate_screen(); - tool_cancel(); + GfxInvalidateScreen(); + ToolCancel(); } /** * * rct2: 0x006D27A3 */ -static void SetupScenerySelection(rct_window* w) +static void SetupScenerySelection(WindowBase* w) { if (gTrackDesignSaveMode) { CancelScenerySelection(); } - while (tool_set(*w, WIDX_BACKGROUND, Tool::Crosshair)) + while (ToolSet(*w, WIDX_BACKGROUND, Tool::Crosshair)) ; gTrackDesignSaveRideIndex = w->rideId; - track_design_save_init(); + TrackDesignSaveInit(); gGamePaused |= GAME_PAUSED_SAVING_TRACK; gTrackDesignSaveMode = true; OpenRCT2::Audio::StopAll(); - rct_window* w_main = window_get_main(); + WindowBase* w_main = WindowGetMain(); if (w_main != nullptr) { w_main->viewport->flags |= (VIEWPORT_FLAG_HIDE_VERTICAL | VIEWPORT_FLAG_HIDE_BASE); } - gfx_invalidate_screen(); + GfxInvalidateScreen(); } /** @@ -5311,7 +5332,7 @@ static void SetupScenerySelection(rct_window* w) */ static void WindowRideMeasurementsDesignReset() { - track_design_save_reset_scenery(); + TrackDesignSaveResetScenery(); } /** @@ -5320,7 +5341,7 @@ static void WindowRideMeasurementsDesignReset() */ static void WindowRideMeasurementsDesignSelectNearbyScenery() { - track_design_save_select_nearby_scenery(gTrackDesignSaveRideIndex); + TrackDesignSaveSelectNearbyScenery(gTrackDesignSaveRideIndex); } /** @@ -5339,20 +5360,20 @@ static void TrackDesignCallback(int32_t result, [[maybe_unused]] const utf8* pat { if (result == MODAL_RESULT_OK) { - track_repository_scan(); + TrackRepositoryScan(); } - gfx_invalidate_screen(); + GfxInvalidateScreen(); }; /** * * rct2: 0x006AD4CD */ -static void WindowRideMeasurementsDesignSave(rct_window* w) +static void WindowRideMeasurementsDesignSave(WindowBase* w) { TrackDesignState tds{}; - Ride* ride = get_ride(w->rideId); + Ride* ride = GetRide(w->rideId); _trackDesign = ride->SaveToTrackDesign(tds); if (!_trackDesign) { @@ -5362,19 +5383,23 @@ static void WindowRideMeasurementsDesignSave(rct_window* w) if (gTrackDesignSaveMode) { auto errMessage = _trackDesign->CreateTrackDesignScenery(tds); - if (errMessage != STR_NONE) + if (!errMessage.Successful) { - ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, errMessage, {}); + ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, errMessage.Message, {}); return; } + if (errMessage.HasMessage()) + { + ContextShowError(errMessage.Message, STR_EMPTY, {}); + } } auto trackName = ride->GetName(); auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK); - intent.putExtra(INTENT_EXTRA_TRACK_DESIGN, _trackDesign.get()); - intent.putExtra(INTENT_EXTRA_PATH, trackName); - intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(&TrackDesignCallback)); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK); + intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, _trackDesign.get()); + intent.PutExtra(INTENT_EXTRA_PATH, trackName); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(&TrackDesignCallback)); ContextOpenIntent(&intent); } @@ -5383,7 +5408,7 @@ static void WindowRideMeasurementsDesignSave(rct_window* w) * * rct2: 0x006AD4DA */ -static void WindowRideMeasurementsClose(rct_window* w) +static void WindowRideMeasurementsClose(WindowBase* w) { WindowRideMeasurementsDesignCancel(); } @@ -5392,12 +5417,12 @@ static void WindowRideMeasurementsClose(rct_window* w) * * rct2: 0x006AD478 */ -static void WindowRideMeasurementsMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideMeasurementsMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -5430,21 +5455,21 @@ static void WindowRideMeasurementsMouseup(rct_window* w, WidgetIndex widgetIndex * * rct2: 0x006AD564 */ -static void WindowRideMeasurementsResize(rct_window* w) +static void WindowRideMeasurementsResize(WindowBase* w) { - window_set_resize(*w, 316, 234, 316, 234); + WindowSetResize(*w, 316, 234, 316, 234); } /** * * rct2: 0x006AD4AB */ -static void WindowRideMeasurementsMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideMeasurementsMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { if (widgetIndex != WIDX_SAVE_TRACK_DESIGN) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -5467,7 +5492,7 @@ static void WindowRideMeasurementsMousedown(rct_window* w, WidgetIndex widgetInd * * rct2: 0x006AD4B2 */ -static void WindowRideMeasurementsDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowRideMeasurementsDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (widgetIndex != WIDX_SAVE_TRACK_DESIGN) return; @@ -5487,18 +5512,18 @@ static void WindowRideMeasurementsDropdown(rct_window* w, WidgetIndex widgetInde * * rct2: 0x006AD5DD */ -static void WindowRideMeasurementsUpdate(rct_window* w) +static void WindowRideMeasurementsUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_7); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_7); } /** * * rct2: 0x006D2AE7 */ -static void WindowRideMeasurementsTooldown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void WindowRideMeasurementsTooldown(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { _lastSceneryX = screenCoords.x; _lastSceneryY = screenCoords.y; @@ -5507,22 +5532,22 @@ static void WindowRideMeasurementsTooldown(rct_window* w, WidgetIndex widgetInde constexpr auto flags = EnumsToFlags( ViewportInteractionItem::Scenery, ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery); - auto info = get_map_coordinates_from_pos(screenCoords, flags); + auto info = GetMapCoordinatesFromPos(screenCoords, flags); switch (info.SpriteType) { case ViewportInteractionItem::Scenery: case ViewportInteractionItem::LargeScenery: case ViewportInteractionItem::Wall: case ViewportInteractionItem::Footpath: - _collectTrackDesignScenery = !track_design_save_contains_tile_element(info.Element); - track_design_save_select_tile_element(info.SpriteType, info.Loc, info.Element, _collectTrackDesignScenery); + _collectTrackDesignScenery = !TrackDesignSaveContainsTileElement(info.Element); + TrackDesignSaveSelectTileElement(info.SpriteType, info.Loc, info.Element, _collectTrackDesignScenery); break; default: break; } } -static void WindowRideMeasurementsTooldrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +static void WindowRideMeasurementsTooldrag(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (screenCoords.x == _lastSceneryX && screenCoords.y == _lastSceneryY) return; @@ -5532,14 +5557,14 @@ static void WindowRideMeasurementsTooldrag(rct_window* w, WidgetIndex widgetInde auto flags = EnumsToFlags( ViewportInteractionItem::Scenery, ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery); - auto info = get_map_coordinates_from_pos(screenCoords, flags); + auto info = GetMapCoordinatesFromPos(screenCoords, flags); switch (info.SpriteType) { case ViewportInteractionItem::Scenery: case ViewportInteractionItem::LargeScenery: case ViewportInteractionItem::Wall: case ViewportInteractionItem::Footpath: - track_design_save_select_tile_element(info.SpriteType, info.Loc, info.Element, _collectTrackDesignScenery); + TrackDesignSaveSelectTileElement(info.SpriteType, info.Loc, info.Element, _collectTrackDesignScenery); break; default: break; @@ -5550,7 +5575,7 @@ static void WindowRideMeasurementsTooldrag(rct_window* w, WidgetIndex widgetInde * * rct2: 0x006AD4DA */ -static void WindowRideMeasurementsToolabort(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideMeasurementsToolabort(WindowBase* w, WidgetIndex widgetIndex) { WindowRideMeasurementsDesignCancel(); } @@ -5559,7 +5584,7 @@ static void WindowRideMeasurementsToolabort(rct_window* w, WidgetIndex widgetInd * * rct2: 0x006ACDBC */ -static void WindowRideMeasurementsInvalidate(rct_window* w) +static void WindowRideMeasurementsInvalidate(WindowBase* w) { auto widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) @@ -5571,7 +5596,7 @@ static void WindowRideMeasurementsInvalidate(rct_window* w) WindowRideSetPressedTab(w); const auto rideId = w->rideId; - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride == nullptr) return; @@ -5607,33 +5632,33 @@ static void WindowRideMeasurementsInvalidate(rct_window* w) } WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } /** * * rct2: 0x006ACF07 */ -static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideMeasurementsPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); if (window_ride_measurements_widgets[WIDX_SAVE_DESIGN].type == WindowWidgetType::Button) { - rct_widget* widget = &window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND]; + Widget* widget = &window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND]; ScreenCoordsXY widgetCoords(w->windowPos.x + widget->width() / 2, w->windowPos.y + widget->top + 40); - DrawTextWrapped(dpi, widgetCoords, w->width - 8, STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT, {}, { TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, widgetCoords, w->width - 8, STR_CLICK_ITEMS_OF_SCENERY_TO_SELECT, {}, { TextAlignment::CENTRE }); widgetCoords.x = w->windowPos.x + 4; widgetCoords.y = w->windowPos.y + window_ride_measurements_widgets[WIDX_SELECT_NEARBY_SCENERY].bottom + 17; - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { widgetCoords, { w->windowPos.x + 312, widgetCoords.y + 1 } }, w->colours[1], INSET_RECT_FLAG_BORDER_INSET); } else { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -5648,8 +5673,8 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) auto ft = Formatter(); ft.Add(ride->excitement); ft.Add(ratingName); - StringId stringId = !ride_has_ratings(ride) ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING; - DrawTextBasic(dpi, screenCoords, stringId, ft); + StringId stringId = !RideHasRatings(*ride) ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING; + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Intensity @@ -5659,12 +5684,12 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) ft.Add(ratingName); stringId = STR_INTENSITY_RATING; - if (!ride_has_ratings(ride)) + if (!RideHasRatings(*ride)) stringId = STR_INTENSITY_RATING_NOT_YET_AVAILABLE; else if (ride->intensity >= RIDE_RATING(10, 00)) stringId = STR_INTENSITY_RATING_RED; - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Nausea @@ -5672,12 +5697,12 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(ride->nausea); ft.Add(ratingName); - stringId = !ride_has_ratings(ride) ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING; - DrawTextBasic(dpi, screenCoords, stringId, ft); + stringId = !RideHasRatings(*ride) ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING; + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += 2 * LIST_ROW_HEIGHT; // Horizontal rule - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { screenCoords - ScreenCoordsXY{ 0, 6 }, screenCoords + ScreenCoordsXY{ 303, -5 } }, w->colours[1], INSET_RECT_FLAG_BORDER_INSET); @@ -5688,7 +5713,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) // Holes ft = Formatter(); ft.Add(ride->holes); - DrawTextBasic(dpi, screenCoords, STR_HOLES, ft); + DrawTextBasic(*dpi, screenCoords, STR_HOLES, ft); screenCoords.y += LIST_ROW_HEIGHT; } else @@ -5696,13 +5721,13 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) // Max speed ft = Formatter(); ft.Add((ride->max_speed * 9) >> 18); - DrawTextBasic(dpi, screenCoords, STR_MAX_SPEED, ft); + DrawTextBasic(*dpi, screenCoords, STR_MAX_SPEED, ft); screenCoords.y += LIST_ROW_HEIGHT; // Average speed ft = Formatter(); ft.Add((ride->average_speed * 9) >> 18); - DrawTextBasic(dpi, screenCoords, STR_AVERAGE_SPEED, ft); + DrawTextBasic(*dpi, screenCoords, STR_AVERAGE_SPEED, ft); screenCoords.y += LIST_ROW_HEIGHT; // Ride time @@ -5739,7 +5764,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) ft.Add(0); ft.Add(0); ft.Add(0); - DrawTextEllipsised(dpi, screenCoords, 308, STR_RIDE_TIME, ft); + DrawTextEllipsised(*dpi, screenCoords, 308, STR_RIDE_TIME, ft); screenCoords.y += LIST_ROW_HEIGHT; } @@ -5778,7 +5803,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) ft.Add(0); ft.Add(0); ft.Add(0); - DrawTextEllipsised(dpi, screenCoords, 308, STR_RIDE_LENGTH, ft); + DrawTextEllipsised(*dpi, screenCoords, 308, STR_RIDE_LENGTH, ft); screenCoords.y += LIST_ROW_HEIGHT; @@ -5789,7 +5814,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(ride->max_positive_vertical_g); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Max. negative vertical G's @@ -5797,20 +5822,20 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) : STR_MAX_NEGATIVE_VERTICAL_G; ft = Formatter(); ft.Add(ride->max_negative_vertical_g); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Max lateral G's stringId = ride->max_lateral_g > RIDE_G_FORCES_RED_LATERAL ? STR_MAX_LATERAL_G_RED : STR_MAX_LATERAL_G; ft = Formatter(); ft.Add(ride->max_lateral_g); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Total 'air' time ft = Formatter(); ft.Add(ride->total_air_time * 3); - DrawTextBasic(dpi, screenCoords, STR_TOTAL_AIR_TIME, ft); + DrawTextBasic(*dpi, screenCoords, STR_TOTAL_AIR_TIME, ft); screenCoords.y += LIST_ROW_HEIGHT; } @@ -5820,14 +5845,14 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) auto drops = ride->drops & 0x3F; ft = Formatter(); ft.Add(drops); - DrawTextBasic(dpi, screenCoords, STR_DROPS, ft); + DrawTextBasic(*dpi, screenCoords, STR_DROPS, ft); screenCoords.y += LIST_ROW_HEIGHT; // Highest drop height auto highestDropHeight = (ride->highest_drop_height * 3) / 4; ft = Formatter(); ft.Add(highestDropHeight); - DrawTextBasic(dpi, screenCoords, STR_HIGHEST_DROP_HEIGHT, ft); + DrawTextBasic(*dpi, screenCoords, STR_HIGHEST_DROP_HEIGHT, ft); screenCoords.y += LIST_ROW_HEIGHT; } @@ -5838,7 +5863,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) { ft = Formatter(); ft.Add(ride->inversions); - DrawTextBasic(dpi, screenCoords, STR_INVERSIONS, ft); + DrawTextBasic(*dpi, screenCoords, STR_INVERSIONS, ft); screenCoords.y += LIST_ROW_HEIGHT; } } @@ -5846,7 +5871,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi) } else { - DrawTextBasic(dpi, screenCoords, STR_NO_TEST_RESULTS_YET); + DrawTextBasic(*dpi, screenCoords, STR_NO_TEST_RESULTS_YET); } } } @@ -5867,7 +5892,7 @@ enum * * rct2: 0x006AE8A6 */ -static void WindowRideSetGraph(rct_window* w, int32_t type) +static void WindowRideSetGraph(WindowBase* w, int32_t type) { if ((w->list_information_type & 0xFF) == type) { @@ -5885,12 +5910,12 @@ static void WindowRideSetGraph(rct_window* w, int32_t type) * * rct2: 0x006AE85D */ -static void WindowRideGraphsMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideGraphsMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -5911,16 +5936,16 @@ static void WindowRideGraphsMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006AE8DA */ -static void WindowRideGraphsResize(rct_window* w) +static void WindowRideGraphsResize(WindowBase* w) { - window_set_resize(*w, 316, 182, 500, 450); + WindowSetResize(*w, 316, 182, 500, 450); } /** * * rct2: 0x006AE878 */ -static void WindowRideGraphsMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideGraphsMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { switch (widgetIndex) { @@ -5943,22 +5968,22 @@ static void WindowRideGraphsMousedown(rct_window* w, WidgetIndex widgetIndex, rc * * rct2: 0x006AE95D */ -static void WindowRideGraphsUpdate(rct_window* w) +static void WindowRideGraphsUpdate(WindowBase* w) { - rct_widget* widget; + Widget* widget; int32_t x; w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_8); - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_GRAPH); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_8); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_GRAPH); widget = &window_ride_graphs_widgets[WIDX_GRAPH]; x = w->scrolls[0].h_left; if (!(w->list_information_type & 0x8000)) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { RideMeasurement* measurement{}; @@ -5975,15 +6000,15 @@ static void WindowRideGraphsUpdate(rct_window* w) * * rct2: 0x006AEA75 */ -static void WindowRideGraphsScrollgetheight(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +static void WindowRideGraphsScrollgetheight(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); // Set minimum size *width = window_ride_graphs_widgets[WIDX_GRAPH].width() - 2; // Get measurement size - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { RideMeasurement* measurement{}; @@ -5999,7 +6024,7 @@ static void WindowRideGraphsScrollgetheight(rct_window* w, int32_t scrollIndex, * * rct2: 0x006AE953 */ -static void WindowRideGraphs15(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType) +static void WindowRideGraphs15(WindowBase* w, int32_t scrollIndex, int32_t scrollAreaType) { w->list_information_type |= 0x8000; } @@ -6008,11 +6033,11 @@ static void WindowRideGraphs15(rct_window* w, int32_t scrollIndex, int32_t scrol * * rct2: 0x006AEA05 */ -static OpenRCT2String WindowRideGraphsTooltip(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback) +static OpenRCT2String WindowRideGraphsTooltip(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback) { if (widgetIndex == WIDX_GRAPH) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { auto [measurement, message] = ride->GetMeasurement(); @@ -6039,7 +6064,7 @@ static OpenRCT2String WindowRideGraphsTooltip(rct_window* w, const WidgetIndex w * * rct2: 0x006AE372 */ -static void WindowRideGraphsInvalidate(rct_window* w) +static void WindowRideGraphsInvalidate(WindowBase* w) { auto widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) @@ -6050,7 +6075,7 @@ static void WindowRideGraphsInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -6094,14 +6119,14 @@ static void WindowRideGraphsInvalidate(rct_window* w) window_ride_graphs_widgets[WIDX_GRAPH_LATERAL].bottom = y; WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } /** * * rct2: 0x006AE4BC */ -static void WindowRideGraphsPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideGraphsPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); @@ -6111,12 +6136,12 @@ static void WindowRideGraphsPaint(rct_window* w, rct_drawpixelinfo* dpi) * * rct2: 0x006AE4C7 */ -static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowRideGraphsScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { - gfx_clear(dpi, ColourMapA[COLOUR_SATURATED_GREEN].darker); + GfxClear(dpi, ColourMapA[COLOUR_SATURATED_GREEN].darker); auto widget = &window_ride_graphs_widgets[WIDX_GRAPH]; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) { return; @@ -6129,7 +6154,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i // No measurement message ScreenCoordsXY stringCoords(widget->width() / 2, widget->height() / 2 - 5); int32_t width = widget->width() - 2; - DrawTextWrapped(dpi, stringCoords, width, message.str, message.args, { TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, stringCoords, width, message.str, message.args, { TextAlignment::CENTRE }); return; } @@ -6144,11 +6169,11 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i { auto coord1 = ScreenCoordsXY{ x, dpi->y }; auto coord2 = ScreenCoordsXY{ x, dpi->y + dpi->height - 1 }; - gfx_fill_rect(dpi, { coord1, coord2 }, lightColour); - gfx_fill_rect(dpi, { coord1 + ScreenCoordsXY{ 16, 0 }, coord2 + ScreenCoordsXY{ 16, 0 } }, darkColour); - gfx_fill_rect(dpi, { coord1 + ScreenCoordsXY{ 32, 0 }, coord2 + ScreenCoordsXY{ 32, 0 } }, darkColour); - gfx_fill_rect(dpi, { coord1 + ScreenCoordsXY{ 48, 0 }, coord2 + ScreenCoordsXY{ 48, 0 } }, darkColour); - gfx_fill_rect(dpi, { coord1 + ScreenCoordsXY{ 64, 0 }, coord2 + ScreenCoordsXY{ 64, 0 } }, darkColour); + GfxFillRect(dpi, { coord1, coord2 }, lightColour); + GfxFillRect(dpi, { coord1 + ScreenCoordsXY{ 16, 0 }, coord2 + ScreenCoordsXY{ 16, 0 } }, darkColour); + GfxFillRect(dpi, { coord1 + ScreenCoordsXY{ 32, 0 }, coord2 + ScreenCoordsXY{ 32, 0 } }, darkColour); + GfxFillRect(dpi, { coord1 + ScreenCoordsXY{ 48, 0 }, coord2 + ScreenCoordsXY{ 48, 0 } }, darkColour); + GfxFillRect(dpi, { coord1 + ScreenCoordsXY{ 64, 0 }, coord2 + ScreenCoordsXY{ 64, 0 } }, darkColour); } time += 5; } @@ -6170,7 +6195,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i { // Minor / major line int32_t colour = yUnit == 0 ? lightColour : darkColour; - gfx_fill_rect(dpi, { { dpi->x, y }, { dpi->x + dpi->width - 1, y } }, colour); + GfxFillRect(dpi, { { dpi->x, y }, { dpi->x + dpi->width - 1, y } }, colour); int16_t scaled_yUnit = yUnit; // Scale modifier @@ -6180,7 +6205,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i auto ft = Formatter(); ft.Add(scaled_yUnit); - DrawTextBasic(dpi, { w->scrolls[0].h_left + 1, y - 4 }, stringID, ft, { FontStyle::Small }); + DrawTextBasic(*dpi, { w->scrolls[0].h_left + 1, y - 4 }, stringID, ft, { FontStyle::Small }); } // Time marks @@ -6190,7 +6215,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i auto ft = Formatter(); ft.Add(time); if (x + 80 >= dpi->x) - DrawTextBasic(dpi, { x + 2, 1 }, STR_RIDE_STATS_TIME, ft, { FontStyle::Small }); + DrawTextBasic(*dpi, { x + 2, 1 }, STR_RIDE_STATS_TIME, ft, { FontStyle::Small }); time += 5; } @@ -6230,7 +6255,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i intensityThresholdNegative = -(RIDE_G_FORCES_RED_LATERAL / 8) + LateralGraphHeightOffset; break; default: - log_error("Wrong graph type %d", listType); + LOG_ERROR("Wrong graph type %d", listType); firstPoint = secondPoint = 0; break; } @@ -6253,8 +6278,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i const bool previousMeasurement = x > measurement->current_item; // Draw the current line in grey. - gfx_fill_rect( - dpi, { { x, firstPoint }, { x, secondPoint } }, previousMeasurement ? PALETTE_INDEX_17 : PALETTE_INDEX_21); + GfxFillRect(dpi, { { x, firstPoint }, { x, secondPoint } }, previousMeasurement ? PALETTE_INDEX_17 : PALETTE_INDEX_21); // Draw red over extreme values (if supported by graph type). if (listType == GRAPH_VERTICAL || listType == GRAPH_LATERAL) @@ -6266,7 +6290,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i { const auto redLineTop = ScreenCoordsXY{ x, std::max(firstPoint, intensityThresholdNegative) }; const auto redLineBottom = ScreenCoordsXY{ x, std::max(secondPoint, intensityThresholdNegative) }; - gfx_fill_rect(dpi, { redLineTop, redLineBottom }, redLineColour); + GfxFillRect(dpi, { redLineTop, redLineBottom }, redLineColour); } // Line exceeds positive threshold (at top of graph). @@ -6274,7 +6298,7 @@ static void WindowRideGraphsScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i { const auto redLineTop = ScreenCoordsXY{ x, std::min(firstPoint, intensityThresholdPositive) }; const auto redLineBottom = ScreenCoordsXY{ x, std::min(secondPoint, intensityThresholdPositive) }; - gfx_fill_rect(dpi, { redLineTop, redLineBottom }, redLineColour); + GfxFillRect(dpi, { redLineTop, redLineBottom }, redLineColour); } } } @@ -6311,10 +6335,10 @@ static void UpdateSamePriceThroughoutFlags(ShopItem shop_item) * * rct2: 0x006ADEFD */ -static void WindowRideIncomeTogglePrimaryPrice(rct_window* w) +static void WindowRideIncomeTogglePrimaryPrice(WindowBase* w) { const auto rideId = w->rideId; - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride == nullptr) return; @@ -6326,7 +6350,7 @@ static void WindowRideIncomeTogglePrimaryPrice(rct_window* w) } else { - auto rideEntry = get_ride_entry(ride->subtype); + auto rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry != nullptr) { shop_item = rideEntry->shop_item[0]; @@ -6349,14 +6373,14 @@ static void WindowRideIncomeTogglePrimaryPrice(rct_window* w) * * rct2: 0x006AE06E */ -static void WindowRideIncomeToggleSecondaryPrice(rct_window* w) +static void WindowRideIncomeToggleSecondaryPrice(WindowBase* w) { const auto rideId = w->rideId; - auto ride = get_ride(rideId); + auto ride = GetRide(rideId); if (ride == nullptr) return; - auto rideEntry = get_ride_entry(ride->subtype); + auto rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) return; @@ -6370,7 +6394,7 @@ static void WindowRideIncomeToggleSecondaryPrice(rct_window* w) GameActions::Execute(&rideSetPriceAction); } -static void WindowRideIncomeSetPrimaryPrice(rct_window* w, money16 price) +static void WindowRideIncomeSetPrimaryPrice(WindowBase* w, money64 price) { auto rideSetPriceAction = RideSetPriceAction(w->rideId, price, true); GameActions::Execute(&rideSetPriceAction); @@ -6380,16 +6404,16 @@ static void WindowRideIncomeSetPrimaryPrice(rct_window* w, money16 price) * * rct2: 0x006AE1E4 */ -static void WindowRideIncomeIncreasePrimaryPrice(rct_window* w) +static void WindowRideIncomeIncreasePrimaryPrice(WindowBase* w) { if (!WindowRideIncomeCanModifyPrimaryPrice(w)) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; - money16 price = ride->price[0]; + auto price = ride->price[0]; if (price < 20.00_GBP) price++; @@ -6400,41 +6424,40 @@ static void WindowRideIncomeIncreasePrimaryPrice(rct_window* w) * * rct2: 0x006AE237 */ -static void WindowRideIncomeDecreasePrimaryPrice(rct_window* w) +static void WindowRideIncomeDecreasePrimaryPrice(WindowBase* w) { if (!WindowRideIncomeCanModifyPrimaryPrice(w)) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; - money16 price = ride->price[0]; + auto price = ride->price[0]; if (price > 0.00_GBP) price--; WindowRideIncomeSetPrimaryPrice(w, price); } -static money16 WindowRideIncomeGetSecondaryPrice(rct_window* w) +static money64 WindowRideIncomeGetSecondaryPrice(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return 0; - money16 price = ride->price[1]; - return price; + return ride->price[1]; } -static void WindowRideIncomeSetSecondaryPrice(rct_window* w, money16 price) +static void WindowRideIncomeSetSecondaryPrice(WindowBase* w, money64 price) { auto rideSetPriceAction = RideSetPriceAction(w->rideId, price, false); GameActions::Execute(&rideSetPriceAction); } -static bool WindowRideIncomeCanModifyPrimaryPrice(rct_window* w) +static bool WindowRideIncomeCanModifyPrimaryPrice(WindowBase* w) { - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return false; @@ -6448,9 +6471,9 @@ static bool WindowRideIncomeCanModifyPrimaryPrice(rct_window* w) * * rct2: 0x006AE269 */ -static void WindowRideIncomeIncreaseSecondaryPrice(rct_window* w) +static void WindowRideIncomeIncreaseSecondaryPrice(WindowBase* w) { - money16 price = WindowRideIncomeGetSecondaryPrice(w); + auto price = WindowRideIncomeGetSecondaryPrice(w); if (price < 20.00_GBP) price++; @@ -6462,9 +6485,9 @@ static void WindowRideIncomeIncreaseSecondaryPrice(rct_window* w) * * rct2: 0x006AE28D */ -static void WindowRideIncomeDecreaseSecondaryPrice(rct_window* w) +static void WindowRideIncomeDecreaseSecondaryPrice(WindowBase* w) { - money16 price = WindowRideIncomeGetSecondaryPrice(w); + auto price = WindowRideIncomeGetSecondaryPrice(w); if (price > 0.00_GBP) price--; @@ -6476,12 +6499,12 @@ static void WindowRideIncomeDecreaseSecondaryPrice(rct_window* w) * * rct2: 0x006ADEA9 */ -static void WindowRideIncomeMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideIncomeMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -6500,10 +6523,10 @@ static void WindowRideIncomeMouseup(rct_window* w, WidgetIndex widgetIndex) if (!WindowRideIncomeCanModifyPrimaryPrice(w)) return; - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { - money_to_string(static_cast(ride->price[0]), _moneyInputText, MONEY_STRING_MAXLENGTH, true); + MoneyToString(ride->price[0], _moneyInputText, MONEY_STRING_MAXLENGTH, true); WindowTextInputRawOpen( w, WIDX_PRIMARY_PRICE, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneyInputText, MONEY_STRING_MAXLENGTH); @@ -6515,9 +6538,9 @@ static void WindowRideIncomeMouseup(rct_window* w, WidgetIndex widgetIndex) break; case WIDX_SECONDARY_PRICE: { - money32 price32 = static_cast(WindowRideIncomeGetSecondaryPrice(w)); + auto price64 = WindowRideIncomeGetSecondaryPrice(w); - money_to_string(price32, _moneyInputText, MONEY_STRING_MAXLENGTH, true); + MoneyToString(price64, _moneyInputText, MONEY_STRING_MAXLENGTH, true); WindowTextInputRawOpen( w, WIDX_SECONDARY_PRICE, STR_ENTER_NEW_VALUE, STR_ENTER_NEW_VALUE, {}, _moneyInputText, MONEY_STRING_MAXLENGTH); } @@ -6532,16 +6555,16 @@ static void WindowRideIncomeMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006AE2F8 */ -static void WindowRideIncomeResize(rct_window* w) +static void WindowRideIncomeResize(WindowBase* w) { - window_set_resize(*w, 316, 194, 316, 194); + WindowSetResize(*w, 316, 194, 316, 194); } /** * * rct2: 0x006ADED4 */ -static void WindowRideIncomeMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowRideIncomeMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { switch (widgetIndex) { @@ -6564,13 +6587,13 @@ static void WindowRideIncomeMousedown(rct_window* w, WidgetIndex widgetIndex, rc * * rct2: 0x006AE2BF */ -static void WindowRideIncomeUpdate(rct_window* w) +static void WindowRideIncomeUpdate(WindowBase* w) { w->frame_no++; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_9); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_9); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_INCOME) { ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_INCOME; @@ -6578,27 +6601,26 @@ static void WindowRideIncomeUpdate(rct_window* w) } } -static void WindowRideIncomeTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) +static void WindowRideIncomeTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text) { if ((widgetIndex != WIDX_PRIMARY_PRICE && widgetIndex != WIDX_SECONDARY_PRICE) || text == nullptr) return; - money32 price = string_to_money(text); - if (price == MONEY32_UNDEFINED) + money64 price = StringToMoney(text); + if (price == MONEY64_UNDEFINED) { return; } price = std::clamp(price, 0.00_GBP, 20.00_GBP); - money16 price16 = static_cast(price); if (widgetIndex == WIDX_PRIMARY_PRICE) { - WindowRideIncomeSetPrimaryPrice(w, price16); + WindowRideIncomeSetPrimaryPrice(w, price); } else { - WindowRideIncomeSetSecondaryPrice(w, price16); + WindowRideIncomeSetSecondaryPrice(w, price); } } @@ -6606,7 +6628,7 @@ static void WindowRideIncomeTextinput(rct_window* w, WidgetIndex widgetIndex, ch * * rct2: 0x006ADAA3 */ -static void WindowRideIncomeInvalidate(rct_window* w) +static void WindowRideIncomeInvalidate(WindowBase* w) { auto widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) @@ -6617,7 +6639,7 @@ static void WindowRideIncomeInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -6652,7 +6674,7 @@ static void WindowRideIncomeInvalidate(rct_window* w) window_ride_income_widgets[WIDX_PRIMARY_PRICE_SAME_THROUGHOUT_PARK].type = WindowWidgetType::Empty; window_ride_income_widgets[WIDX_PRIMARY_PRICE].text = STR_BOTTOM_TOOLBAR_CASH; - money16 ridePrimaryPrice = ride_get_price(ride); + auto ridePrimaryPrice = RideGetPrice(*ride); ft.Rewind(); ft.Add(ridePrimaryPrice); if (ridePrimaryPrice == 0) @@ -6663,7 +6685,7 @@ static void WindowRideIncomeInvalidate(rct_window* w) { window_ride_income_widgets[WIDX_PRIMARY_PRICE_SAME_THROUGHOUT_PARK].type = WindowWidgetType::Checkbox; - if (shop_item_has_common_price(primaryItem)) + if (ShopItemHasCommonPrice(primaryItem)) w->pressed_widgets |= (1uLL << WIDX_PRIMARY_PRICE_SAME_THROUGHOUT_PARK); window_ride_income_widgets[WIDX_PRIMARY_PRICE_LABEL].text = GetShopItemDescriptor(primaryItem).Naming.PriceLabel; @@ -6693,7 +6715,7 @@ static void WindowRideIncomeInvalidate(rct_window* w) { // Set same price throughout park checkbox w->pressed_widgets &= ~(1uLL << WIDX_SECONDARY_PRICE_SAME_THROUGHOUT_PARK); - if (shop_item_has_common_price(secondaryItem)) + if (ShopItemHasCommonPrice(secondaryItem)) w->pressed_widgets |= (1uLL << WIDX_SECONDARY_PRICE_SAME_THROUGHOUT_PARK); // Show widgets @@ -6713,14 +6735,14 @@ static void WindowRideIncomeInvalidate(rct_window* w) } WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } /** * * rct2: 0x006ADCE5 */ -static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideIncomePaint(WindowBase* w, DrawPixelInfo* dpi) { StringId stringId; money64 profit; @@ -6729,7 +6751,7 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -6758,7 +6780,7 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) auto ft = Formatter(); ft.Add(profit); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); } screenCoords.y += 44; @@ -6782,7 +6804,7 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) auto ft = Formatter(); ft.Add(profit); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); } screenCoords.y += 18; @@ -6792,16 +6814,16 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) auto ft = Formatter(); ft.Add(ride->income_per_hour); - DrawTextBasic(dpi, screenCoords, STR_INCOME_PER_HOUR, ft); + DrawTextBasic(*dpi, screenCoords, STR_INCOME_PER_HOUR, ft); screenCoords.y += LIST_ROW_HEIGHT; } // Running cost per hour money64 costPerHour = ride->upkeep_cost * 16; - stringId = ride->upkeep_cost == MONEY16_UNDEFINED ? STR_RUNNING_COST_UNKNOWN : STR_RUNNING_COST_PER_HOUR; + stringId = ride->upkeep_cost == MONEY64_UNDEFINED ? STR_RUNNING_COST_UNKNOWN : STR_RUNNING_COST_PER_HOUR; auto ft = Formatter(); ft.Add(costPerHour); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Profit per hour @@ -6809,7 +6831,7 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) { ft = Formatter(); ft.Add(ride->profit); - DrawTextBasic(dpi, screenCoords, STR_PROFIT_PER_HOUR, ft); + DrawTextBasic(*dpi, screenCoords, STR_PROFIT_PER_HOUR, ft); screenCoords.y += LIST_ROW_HEIGHT; } screenCoords.y += 5; @@ -6817,7 +6839,7 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) // Total profit ft = Formatter(); ft.Add(ride->total_profit); - DrawTextBasic(dpi, screenCoords, STR_TOTAL_PROFIT, ft); + DrawTextBasic(*dpi, screenCoords, STR_TOTAL_PROFIT, ft); } #pragma endregion @@ -6828,12 +6850,12 @@ static void WindowRideIncomePaint(rct_window* w, rct_drawpixelinfo* dpi) * * rct2: 0x006AD986 */ -static void WindowRideCustomerMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowRideCustomerMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_TAB_1: case WIDX_TAB_2: @@ -6850,24 +6872,24 @@ static void WindowRideCustomerMouseup(rct_window* w, WidgetIndex widgetIndex) case WIDX_SHOW_GUESTS_THOUGHTS: { auto intent = Intent(WindowClass::GuestList); - intent.putExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsThinkingAboutRide)); - intent.putExtra(INTENT_EXTRA_RIDE_ID, w->number); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsThinkingAboutRide)); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, w->number); ContextOpenIntent(&intent); break; } case WIDX_SHOW_GUESTS_ON_RIDE: { auto intent = Intent(WindowClass::GuestList); - intent.putExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsOnRide)); - intent.putExtra(INTENT_EXTRA_RIDE_ID, w->number); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsOnRide)); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, w->number); ContextOpenIntent(&intent); break; } case WIDX_SHOW_GUESTS_QUEUING: { auto intent = Intent(WindowClass::GuestList); - intent.putExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsInQueue)); - intent.putExtra(INTENT_EXTRA_RIDE_ID, w->number); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsInQueue)); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, w->number); ContextOpenIntent(&intent); break; } @@ -6878,26 +6900,26 @@ static void WindowRideCustomerMouseup(rct_window* w, WidgetIndex widgetIndex) * * rct2: 0x006ADA29 */ -static void WindowRideCustomerResize(rct_window* w) +static void WindowRideCustomerResize(WindowBase* w) { w->flags |= WF_RESIZABLE; - window_set_resize(*w, 316, 163, 316, 163); + WindowSetResize(*w, 316, 163, 316, 163); } /** * * rct2: 0x006AD9DD */ -static void WindowRideCustomerUpdate(rct_window* w) +static void WindowRideCustomerUpdate(WindowBase* w) { w->picked_peep_frame++; if (w->picked_peep_frame >= 24) w->picked_peep_frame = 0; - window_event_invalidate_call(w); - widget_invalidate(*w, WIDX_TAB_10); + WindowEventInvalidateCall(w); + WidgetInvalidate(*w, WIDX_TAB_10); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_CUSTOMER) { ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_CUSTOMER; @@ -6909,7 +6931,7 @@ static void WindowRideCustomerUpdate(rct_window* w) * * rct2: 0x006AD5F8 */ -static void WindowRideCustomerInvalidate(rct_window* w) +static void WindowRideCustomerInvalidate(WindowBase* w) { auto widgets = window_ride_page_widgets[w->page]; if (w->widgets != widgets) @@ -6920,7 +6942,7 @@ static void WindowRideCustomerInvalidate(rct_window* w) WindowRideSetPressedTab(w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride != nullptr) { auto ft = Formatter::Common(); @@ -6939,7 +6961,7 @@ static void WindowRideCustomerInvalidate(rct_window* w) } WindowRideAnchorBorderWidgets(w); - window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10); + WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_10); } } @@ -6947,7 +6969,7 @@ static void WindowRideCustomerInvalidate(rct_window* w) * * rct2: 0x006AD6CD */ -static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowRideCustomerPaint(WindowBase* w, DrawPixelInfo* dpi) { ShopItem shopItem; int16_t popularity, satisfaction, queueTime; @@ -6956,7 +6978,7 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) WindowDrawWidgets(*w, dpi); WindowRideDrawTabImages(dpi, w); - auto ride = get_ride(w->rideId); + auto ride = GetRide(w->rideId); if (ride == nullptr) return; @@ -6969,14 +6991,14 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) { auto ft = Formatter(); ft.Add(ride->num_riders); - DrawTextBasic(dpi, screenCoords, STR_CUSTOMERS_ON_RIDE, ft); + DrawTextBasic(*dpi, screenCoords, STR_CUSTOMERS_ON_RIDE, ft); screenCoords.y += LIST_ROW_HEIGHT; } // Customers per hour auto ft = Formatter(); - ft.Add(ride_customers_per_hour(ride)); - DrawTextBasic(dpi, screenCoords, STR_CUSTOMERS_PER_HOUR, ft); + ft.Add(RideCustomersPerHour(*ride)); + DrawTextBasic(*dpi, screenCoords, STR_CUSTOMERS_PER_HOUR, ft); screenCoords.y += LIST_ROW_HEIGHT; // Popularity @@ -6992,7 +7014,7 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) } ft = Formatter(); ft.Add(popularity); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Satisfaction @@ -7008,7 +7030,7 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) } ft = Formatter(); ft.Add(satisfaction); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; // Queue time @@ -7018,7 +7040,7 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) stringId = queueTime == 1 ? STR_QUEUE_TIME_MINUTE : STR_QUEUE_TIME_MINUTES; ft = Formatter(); ft.Add(queueTime); - screenCoords.y += DrawTextWrapped(dpi, screenCoords, 308, stringId, ft, { TextAlignment::LEFT }); + screenCoords.y += DrawTextWrapped(*dpi, screenCoords, 308, stringId, ft, { TextAlignment::LEFT }); screenCoords.y += 5; } @@ -7029,7 +7051,7 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(GetShopItemDescriptor(shopItem).Naming.Plural); ft.Add(ride->no_primary_items_sold); - DrawTextBasic(dpi, screenCoords, STR_ITEMS_SOLD, ft); + DrawTextBasic(*dpi, screenCoords, STR_ITEMS_SOLD, ft); screenCoords.y += LIST_ROW_HEIGHT; } @@ -7041,14 +7063,14 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(GetShopItemDescriptor(shopItem).Naming.Plural); ft.Add(ride->no_secondary_items_sold); - DrawTextBasic(dpi, screenCoords, STR_ITEMS_SOLD, ft); + DrawTextBasic(*dpi, screenCoords, STR_ITEMS_SOLD, ft); screenCoords.y += LIST_ROW_HEIGHT; } // Total customers ft = Formatter(); ft.Add(ride->total_customers); - DrawTextBasic(dpi, screenCoords, STR_TOTAL_CUSTOMERS, ft); + DrawTextBasic(*dpi, screenCoords, STR_TOTAL_CUSTOMERS, ft); screenCoords.y += LIST_ROW_HEIGHT; // Guests favourite @@ -7057,18 +7079,18 @@ static void WindowRideCustomerPaint(rct_window* w, rct_drawpixelinfo* dpi) ft = Formatter(); ft.Add(ride->guests_favourite); stringId = ride->guests_favourite == 1 ? STR_FAVOURITE_RIDE_OF_GUEST : STR_FAVOURITE_RIDE_OF_GUESTS; - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); screenCoords.y += LIST_ROW_HEIGHT; } screenCoords.y += 2; // Age // If the ride has a build date that is in the future, show it as built this year. - int16_t age = std::max(date_get_year(ride->GetAge()), 0); + int16_t age = std::max(DateGetYear(ride->GetAge()), 0); stringId = age == 0 ? STR_BUILT_THIS_YEAR : age == 1 ? STR_BUILT_LAST_YEAR : STR_BUILT_YEARS_AGO; ft = Formatter(); ft.Add(age); - DrawTextBasic(dpi, screenCoords, stringId, ft); + DrawTextBasic(*dpi, screenCoords, stringId, ft); } #pragma endregion diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 4f98dcfb4a..b0719fed0a 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,7 +47,10 @@ static constexpr const StringId WINDOW_TITLE = STR_RIDE_CONSTRUCTION_WINDOW_TITLE; static constexpr const int32_t WH = 394; static constexpr const int32_t WW = 166; + static constexpr const uint16_t ARROW_PULSE_DURATION = 200; +// Width of the group boxes, e.g. “Banking” +static constexpr const int32_t GW = WW - 6; using namespace OpenRCT2::TrackMetaData; @@ -64,7 +67,9 @@ enum WIDX_LEFT_CURVE_VERY_SMALL, WIDX_LEFT_CURVE_SMALL, WIDX_LEFT_CURVE, + WIDX_LEFT_CURVE_LARGE, WIDX_STRAIGHT, + WIDX_RIGHT_CURVE_LARGE, WIDX_RIGHT_CURVE, WIDX_RIGHT_CURVE_SMALL, WIDX_RIGHT_CURVE_VERY_SMALL, @@ -80,13 +85,11 @@ enum WIDX_BANK_RIGHT, WIDX_CONSTRUCT, WIDX_DEMOLISH, - WIDX_LEFT_CURVE_LARGE, WIDX_PREVIOUS_SECTION, WIDX_NEXT_SECTION, WIDX_ENTRANCE_EXIT_GROUPBOX, WIDX_ENTRANCE, WIDX_EXIT, - WIDX_RIGHT_CURVE_LARGE, WIDX_ROTATE, WIDX_U_TRACK, WIDX_O_TRACK, @@ -95,6 +98,10 @@ enum WIDX_SEAT_ROTATION_ANGLE_SPINNER_UP, WIDX_SEAT_ROTATION_ANGLE_SPINNER_DOWN, WIDX_SIMULATE, + WIDX_SPEED_GROUPBOX = WIDX_BANKING_GROUPBOX, + WIDX_SPEED_SETTING_SPINNER = WIDX_BANK_LEFT, + WIDX_SPEED_SETTING_SPINNER_UP = WIDX_BANK_STRAIGHT, + WIDX_SPEED_SETTING_SPINNER_DOWN = WIDX_BANK_RIGHT, }; validate_global_widx(WC_RIDE_CONSTRUCTION, WIDX_CONSTRUCT); @@ -103,43 +110,43 @@ validate_global_widx(WC_RIDE_CONSTRUCTION, WIDX_EXIT); validate_global_widx(WC_RIDE_CONSTRUCTION, WIDX_ROTATE); // clang-format off -static rct_widget window_ride_construction_widgets[] = { +static Widget window_ride_construction_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget ({ 3, 17}, {160, 57}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_DIRECTION ), - MakeWidget ({ 3, 76}, {160, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SLOPE ), - MakeWidget ({ 3, 120}, {160, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_ROLL_BANKING ), - MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL, STR_RIDE_CONSTRUCTION_LEFT_CURVE_VERY_SMALL_TIP ), - MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL, STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP ), - MakeWidget ({ 28, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_LEFT_CURVE, STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP ), - MakeWidget ({ 72, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_STRAIGHT, STR_RIDE_CONSTRUCTION_STRAIGHT_TIP ), - MakeWidget ({116, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_RIGHT_CURVE, STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP ), - MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL, STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP ), - MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL, STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP ), - MakeWidget ({ 6, 55}, {154, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_YELLOW_STRING, STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP), - MakeWidget ({ 23, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP, STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP ), - MakeWidget ({ 47, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_DOWN, STR_RIDE_CONSTRUCTION_SLOPE_DOWN_TIP ), - MakeWidget ({ 71, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_LEVEL, STR_RIDE_CONSTRUCTION_LEVEL_TIP ), - MakeWidget ({ 95, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_UP, STR_RIDE_CONSTRUCTION_SLOPE_UP_TIP ), - MakeWidget ({119, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP, STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP ), - MakeWidget ({134, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_CHAIN_LIFT, STR_RIDE_CONSTRUCTION_CHAIN_LIFT_TIP ), - MakeWidget ({ 47, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_LEFT_BANK, STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP ), - MakeWidget ({ 71, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_NO_BANK, STR_RIDE_CONSTRUCTION_NO_ROLL_TIP ), - MakeWidget ({ 95, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_RIGHT_BANK, STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP ), - MakeWidget ({ 3, 164}, {160, 170}, WindowWidgetType::ImgBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_RIDE_CONSTRUCTION_CONSTRUCT_SELECTED_SECTION_TIP), - MakeWidget ({ 60, 338}, { 46, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH_CURRENT_SECTION, STR_RIDE_CONSTRUCTION_REMOVE_HIGHLIGHTED_SECTION_TIP), - MakeWidget ({ 50, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE, STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP ), - MakeWidget ({ 30, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PREVIOUS, STR_RIDE_CONSTRUCTION_MOVE_TO_PREVIOUS_SECTION_TIP ), - MakeWidget ({112, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_NEXT, STR_RIDE_CONSTRUCTION_MOVE_TO_NEXT_SECTION_TIP ), - MakeWidget ({ 3, 362}, {160, 28}, WindowWidgetType::Groupbox, WindowColour::Primary ), - MakeWidget ({ 9, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_ENTRANCE, STR_RIDE_CONSTRUCTION_ENTRANCE_TIP ), - MakeWidget ({ 87, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_EXIT, STR_RIDE_CONSTRUCTION_EXIT_TIP ), - MakeWidget ({ 94, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE, STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP ), - MakeWidget ({ 72, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_ROTATE_ARROW, STR_ROTATE_90_TIP ), - MakeWidget ({ 19, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK, STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP ), - MakeWidget ({123, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK, STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP ), - MakeWidget ({ 96, 120}, { 67, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SEAT_ROT ), - MakeSpinnerWidgets({101, 138}, { 58, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, 0, STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP), - MakeWidget ({139, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_SIMULATE, STR_SIMULATE_RIDE_TIP ), + MakeWidget ({ 3, 17}, { GW, 57}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_DIRECTION ), + MakeWidget ({ 3, 76}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SLOPE ), + MakeWidget ({ 3, 120}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_ROLL_BANKING ), + MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_VERY_SMALL_TIP ), + MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP ), + MakeWidget ({ 28, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP ), + MakeWidget ({ 50, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP ), + MakeWidget ({ 72, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_STRAIGHT), STR_RIDE_CONSTRUCTION_STRAIGHT_TIP ), + MakeWidget ({ 94, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP ), + MakeWidget ({116, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP ), + MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP ), + MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP ), + MakeWidget ({ 6, 55}, { GW - 6, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_YELLOW_STRING, STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP), + MakeWidget ({ 23, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP ), + MakeWidget ({ 47, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN), STR_RIDE_CONSTRUCTION_SLOPE_DOWN_TIP ), + MakeWidget ({ 71, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_LEVEL), STR_RIDE_CONSTRUCTION_LEVEL_TIP ), + MakeWidget ({ 95, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP), STR_RIDE_CONSTRUCTION_SLOPE_UP_TIP ), + MakeWidget ({119, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP ), + MakeWidget ({134, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CHAIN_LIFT), STR_RIDE_CONSTRUCTION_CHAIN_LIFT_TIP ), + MakeWidget ({ 47, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_BANK), STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP ), + MakeWidget ({ 71, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_NO_BANK), STR_RIDE_CONSTRUCTION_NO_ROLL_TIP ), + MakeWidget ({ 95, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_BANK), STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP ), + MakeWidget ({ 3, 164}, { GW, 170}, WindowWidgetType::ImgBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_RIDE_CONSTRUCTION_CONSTRUCT_SELECTED_SECTION_TIP), + MakeWidget ({ 60, 338}, { 46, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH_CURRENT_SECTION), STR_RIDE_CONSTRUCTION_REMOVE_HIGHLIGHTED_SECTION_TIP), + MakeWidget ({ 30, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PREVIOUS), STR_RIDE_CONSTRUCTION_MOVE_TO_PREVIOUS_SECTION_TIP ), + MakeWidget ({112, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_NEXT), STR_RIDE_CONSTRUCTION_MOVE_TO_NEXT_SECTION_TIP ), + MakeWidget ({ 3, 362}, { GW, 28}, WindowWidgetType::Groupbox, WindowColour::Primary ), + MakeWidget ({ 9, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_ENTRANCE, STR_RIDE_CONSTRUCTION_ENTRANCE_TIP ), + MakeWidget ({ 87, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_EXIT, STR_RIDE_CONSTRUCTION_EXIT_TIP ), + MakeWidget ({ 72, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_90_TIP ), + MakeWidget ({ 19, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK), STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP ), + MakeWidget ({123, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK), STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP ), + MakeWidget ({ 96, 120}, { 67, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SEAT_ROT ), + MakeSpinnerWidgets({101, 138}, { 58, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, 0, STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP), + MakeWidget ({139, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_SIMULATE), STR_SIMULATE_RIDE_TIP ), WIDGETS_END, }; // clang-format on @@ -152,7 +159,7 @@ static bool _trackPlaceShiftState; static ScreenCoordsXY _trackPlaceShiftStart; static int32_t _trackPlaceShiftZ; static int32_t _trackPlaceZ; -static money32 _trackPlaceCost; +static money64 _trackPlaceCost; static StringId _trackPlaceErrorMessage; static bool _autoRotatingShop; static bool _gotoStartPlacementMode = false; @@ -168,25 +175,25 @@ static constexpr const StringId RideConstructionSeatAngleRotationStrings[] = { STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_450, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_495, }; -static void window_ride_construction_mouseup_demolish_next_piece(const CoordsXYZD& piecePos, int32_t type); +static void WindowRideConstructionMouseUpDemolishNextPiece(const CoordsXYZD& piecePos, int32_t type); -static int32_t RideGetAlternativeType(Ride* ride) +static int32_t RideGetAlternativeType(const Ride& ride) { - return (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? ride->GetRideTypeDescriptor().AlternateType - : ride->type; + return (_currentTrackAlternative & RIDE_TYPE_ALTERNATIVE_TRACK_TYPE) ? ride.GetRideTypeDescriptor().AlternateType + : ride.type; } /* move to ride.c */ static void CloseRideWindowForConstruction(RideId rideId) { - rct_window* w = window_find_by_number(WindowClass::Ride, rideId.ToUnderlying()); + WindowBase* w = WindowFindByNumber(WindowClass::Ride, rideId.ToUnderlying()); if (w != nullptr && w->page == 1) - window_close(*w); + WindowClose(*w); } static void RideConstructPlacedForwardGameActionCallback(const GameAction* ga, const GameActions::Result* result); static void RideConstructPlacedBackwardGameActionCallback(const GameAction* ga, const GameActions::Result* result); -static void CloseConstructWindowOnCompletion(Ride* ride); +static void CloseConstructWindowOnCompletion(const Ride& ride); class RideConstructionWindow final : public Window { @@ -201,7 +208,7 @@ private: public: void OnOpen() override { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; @@ -212,14 +219,10 @@ public: InitScrollWidgets(); - colours[0] = COLOUR_DARK_BROWN; - colours[1] = COLOUR_DARK_BROWN; - colours[2] = COLOUR_DARK_BROWN; + WindowPushOthersRight(*this); + ShowGridlines(); - window_push_others_right(*this); - show_gridlines(); - - _currentTrackPrice = MONEY32_UNDEFINED; + _currentTrackPrice = MONEY64_UNDEFINED; _currentBrakeSpeed2 = 8; _currentSeatRotationAngle = 4; @@ -246,8 +249,8 @@ public: void OnClose() override { - ride_construction_invalidate_current_track(); - viewport_set_visibility(0); + RideConstructionInvalidateCurrentTrack(); + ViewportSetVisibility(0); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; @@ -257,19 +260,19 @@ public: // selection tool should be cancelled. Don't do a tool cancel if // another window has already taken control of tool. if (classification == gCurrentToolWidget.window_classification && number == gCurrentToolWidget.window_number) - tool_cancel(); + ToolCancel(); - hide_gridlines(); + HideGridlines(); // If we demolish a currentRide all windows will be closed including the construction window, // the currentRide at this point is already gone. - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; } - if (ride_try_get_origin_element(currentRide, nullptr)) + if (RideTryGetOriginElement(*currentRide, nullptr)) { // Auto open shops if required. if (currentRide->mode == RideMode::ShopStall && gConfigGeneral.AutoOpenShops) @@ -287,7 +290,7 @@ public: currentRide->SetToDefaultInspectionInterval(); auto intent = Intent(WindowClass::Ride); - intent.putExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); ContextOpenIntent(&intent); } else @@ -304,13 +307,13 @@ public: { WindowRideConstructionUpdateEnabledTrackPieces(); - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; } - int32_t rideType = RideGetAlternativeType(currentRide); + int32_t rideType = RideGetAlternativeType(*currentRide); uint64_t disabledWidgets = 0; @@ -806,7 +809,7 @@ public: if (_rideConstructionState == RideConstructionState::Front) { disabledWidgets |= (1uLL << WIDX_NEXT_SECTION); - if (window_ride_construction_update_state(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)) + if (WindowRideConstructionUpdateState(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)) { disabledWidgets |= (1uLL << WIDX_CONSTRUCT); } @@ -814,7 +817,7 @@ public: else if (_rideConstructionState == RideConstructionState::Back) { disabledWidgets |= (1uLL << WIDX_PREVIOUS_SECTION); - if (window_ride_construction_update_state(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)) + if (WindowRideConstructionUpdateState(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)) { disabledWidgets |= (1uLL << WIDX_CONSTRUCT); } @@ -858,7 +861,7 @@ public: { if ((disabledWidgets & (1uLL << i)) != (currentDisabledWidgets & (1uLL << i))) { - widget_invalidate(*this, i); + WidgetInvalidate(*this, i); } } disabled_widgets = disabledWidgets; @@ -866,7 +869,7 @@ public: void OnUpdate() override { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; @@ -886,7 +889,7 @@ public: case TrackElemType::Whirlpool | RideConstructionSpecialPieceSelected: case TrackElemType::Rapids | RideConstructionSpecialPieceSelected: case TrackElemType::Waterfall | RideConstructionSpecialPieceSelected: - widget_invalidate(*this, WIDX_CONSTRUCT); + WidgetInvalidate(*this, WIDX_CONSTRUCT); break; } @@ -904,7 +907,7 @@ public: if (!WidgetIsActiveTool(*this, WIDX_ENTRANCE) && !WidgetIsActiveTool(*this, WIDX_EXIT)) { _rideConstructionState = gRideEntranceExitPlacePreviousRideConstructionState; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } @@ -913,10 +916,10 @@ public: case RideConstructionState::Front: case RideConstructionState::Back: case RideConstructionState::Selected: - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::RideConstruction) { - tool_cancel(); + ToolCancel(); } break; default: @@ -935,10 +938,10 @@ public: Close(); break; case WIDX_NEXT_SECTION: - ride_select_next_section(); + RideSelectNextSection(); break; case WIDX_PREVIOUS_SECTION: - ride_select_previous_section(); + RideSelectPreviousSection(); break; case WIDX_CONSTRUCT: Construct(); @@ -959,7 +962,7 @@ public: break; case WIDX_SIMULATE: { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { auto status = currentRide->status == RideStatus::Simulating ? RideStatus::Closed : RideStatus::Simulating; @@ -973,7 +976,7 @@ public: void OnMouseDown(WidgetIndex widgetIndex) override { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; @@ -983,93 +986,93 @@ public: switch (widgetIndex) { case WIDX_LEFT_CURVE: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_LEFT; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_RIGHT_CURVE: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_RIGHT; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_LEFT_CURVE_SMALL: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_LEFT_SMALL; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_RIGHT_CURVE_SMALL: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_RIGHT_SMALL; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_LEFT_CURVE_VERY_SMALL: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_LEFT_VERY_SMALL; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_RIGHT_CURVE_VERY_SMALL: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_RIGHT_VERY_SMALL; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_LEFT_CURVE_LARGE: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_LEFT_LARGE; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_RIGHT_CURVE_LARGE: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackCurve = TRACK_CURVE_RIGHT_LARGE; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_STRAIGHT: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (_currentTrackCurve != TRACK_CURVE_NONE) _currentTrackBankEnd = TRACK_BANK_NONE; _currentTrackCurve = TRACK_CURVE_NONE; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_SLOPE_DOWN_STEEP: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (IsTrackEnabled(TRACK_HELIX_SMALL)) { if (_currentTrackCurve == TRACK_CURVE_LEFT && _currentTrackBankEnd == TRACK_BANK_LEFT) { _currentTrackCurve = TrackElemType::LeftHalfBankedHelixDownLarge | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) { _currentTrackCurve = TrackElemType::RightHalfBankedHelixDownLarge | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_LEFT_SMALL && _currentTrackBankEnd == TRACK_BANK_LEFT) { _currentTrackCurve = TrackElemType::LeftHalfBankedHelixDownSmall | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT_SMALL && _currentTrackBankEnd == TRACK_BANK_RIGHT) { _currentTrackCurve = TrackElemType::RightHalfBankedHelixDownSmall | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } } @@ -1079,16 +1082,16 @@ public: { _currentTrackCurve = TrackElemType::LeftQuarterBankedHelixLargeDown | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) { _currentTrackCurve = TrackElemType::RightQuarterBankedHelixLargeDown | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } } @@ -1100,16 +1103,16 @@ public: { _currentTrackCurve = TrackElemType::LeftQuarterHelixLargeDown | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT) { _currentTrackCurve = TrackElemType::RightQuarterHelixLargeDown | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } } @@ -1124,7 +1127,7 @@ public: } break; case WIDX_SLOPE_DOWN: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState == RideConstructionState::Back && _currentTrackBankEnd != TRACK_BANK_NONE) { _currentTrackBankEnd = TRACK_BANK_NONE; @@ -1132,7 +1135,7 @@ public: UpdateLiftHillSelected(TRACK_SLOPE_DOWN_25); break; case WIDX_LEVEL: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState == RideConstructionState::Front && _previousTrackSlopeEnd == 6) { if (_currentTrackCurve == TRACK_CURVE_LEFT_SMALL) @@ -1158,7 +1161,7 @@ public: UpdateLiftHillSelected(TRACK_SLOPE_NONE); break; case WIDX_SLOPE_UP: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState == RideConstructionState::Front && _currentTrackBankEnd != TRACK_BANK_NONE) { _currentTrackBankEnd = TRACK_BANK_NONE; @@ -1168,7 +1171,7 @@ public: if (_rideConstructionState == RideConstructionState::Front && _currentTrackCurve == TRACK_CURVE_NONE) { _currentTrackCurve = TrackElemType::ReverseFreefallSlope | RideConstructionSpecialPieceSelected; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } else @@ -1177,35 +1180,35 @@ public: } break; case WIDX_SLOPE_UP_STEEP: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (IsTrackEnabled(TRACK_HELIX_SMALL)) { if (_currentTrackCurve == TRACK_CURVE_LEFT && _currentTrackBankEnd == TRACK_BANK_LEFT) { _currentTrackCurve = TrackElemType::LeftHalfBankedHelixUpLarge | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) { _currentTrackCurve = TrackElemType::RightHalfBankedHelixUpLarge | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_LEFT_SMALL && _currentTrackBankEnd == TRACK_BANK_LEFT) { _currentTrackCurve = TrackElemType::LeftHalfBankedHelixUpSmall | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT_SMALL && _currentTrackBankEnd == TRACK_BANK_RIGHT) { _currentTrackCurve = TrackElemType::RightHalfBankedHelixUpSmall | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } } @@ -1215,16 +1218,16 @@ public: { _currentTrackCurve = TrackElemType::LeftQuarterBankedHelixLargeUp | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) { _currentTrackCurve = TrackElemType::RightQuarterBankedHelixLargeUp | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } } @@ -1235,15 +1238,15 @@ public: if (_currentTrackCurve == TRACK_CURVE_LEFT) { _currentTrackCurve = TrackElemType::LeftQuarterHelixLargeUp | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } if (_currentTrackCurve == TRACK_CURVE_RIGHT) { _currentTrackCurve = TrackElemType::RightQuarterHelixLargeUp | RideConstructionSpecialPieceSelected; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; } } @@ -1258,29 +1261,29 @@ public: } break; case WIDX_CHAIN_LIFT: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackLiftHill ^= CONSTRUCTION_LIFT_HILL_SELECTED; if ((_currentTrackLiftHill & CONSTRUCTION_LIFT_HILL_SELECTED) && !gCheatsEnableChainLiftOnAllTrack) _currentTrackAlternative &= ~RIDE_TYPE_ALTERNATIVE_TRACK_PIECES; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_BANK_LEFT: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (!_currentlyShowingBrakeOrBoosterSpeed) { _currentTrackBankEnd = TRACK_BANK_LEFT; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); } break; case WIDX_BANK_STRAIGHT: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (!_currentlyShowingBrakeOrBoosterSpeed) { _currentTrackBankEnd = TRACK_BANK_NONE; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); } else { @@ -1296,18 +1299,18 @@ public: else { *brakesSpeedPtr = brakesSpeed; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } } break; case WIDX_BANK_RIGHT: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); if (!_currentlyShowingBrakeOrBoosterSpeed) { _currentTrackBankEnd = TRACK_BANK_RIGHT; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); } else { @@ -1322,7 +1325,7 @@ public: else { *brakesSpeedPtr = brakesSpeed; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } } @@ -1331,18 +1334,18 @@ public: ShowSpecialTrackDropdown(&widgets[widgetIndex]); break; case WIDX_U_TRACK: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackAlternative &= ~RIDE_TYPE_ALTERNATIVE_TRACK_PIECES; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_O_TRACK: - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackAlternative |= RIDE_TYPE_ALTERNATIVE_TRACK_PIECES; if (!gCheatsEnableChainLiftOnAllTrack) _currentTrackLiftHill &= ~CONSTRUCTION_LIFT_HILL_SELECTED; - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); break; case WIDX_SEAT_ROTATION_ANGLE_SPINNER_UP: if (_currentSeatRotationAngle < 15) @@ -1354,7 +1357,7 @@ public: else { _currentSeatRotationAngle++; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } break; @@ -1368,7 +1371,7 @@ public: else { _currentSeatRotationAngle--; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } break; @@ -1382,8 +1385,8 @@ public: if (selectedIndex == -1) return; - ride_construction_invalidate_current_track(); - _currentTrackPrice = MONEY32_UNDEFINED; + RideConstructionInvalidateCurrentTrack(); + _currentTrackPrice = MONEY64_UNDEFINED; track_type_t trackPiece = _currentPossibleRideConfigurations[selectedIndex]; switch (trackPiece) { @@ -1399,7 +1402,7 @@ public: break; } _currentTrackCurve = trackPiece | RideConstructionSpecialPieceSelected; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } void OnToolUpdate(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override @@ -1407,11 +1410,11 @@ public: switch (widgetIndex) { case WIDX_CONSTRUCT: - ride_construction_toolupdate_construct(screenCoords); + RideConstructionToolupdateConstruct(screenCoords); break; case WIDX_ENTRANCE: case WIDX_EXIT: - ride_construction_toolupdate_entrance_exit(screenCoords); + RideConstructionToolupdateEntranceExit(screenCoords); break; } } @@ -1421,7 +1424,7 @@ public: switch (widgetIndex) { case WIDX_CONSTRUCT: - ride_construction_tooldown_construct(screenCoords); + RideConstructionTooldownConstruct(screenCoords); break; case WIDX_ENTRANCE: case WIDX_EXIT: @@ -1432,7 +1435,7 @@ public: void OnPrepareDraw() override { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; @@ -1458,7 +1461,7 @@ public: if (_selectedTrackType == TrackElemType::Booster || _currentTrackCurve == (RideConstructionSpecialPieceSelected | TrackElemType::Booster)) { - brakeSpeed2 = get_booster_speed(currentRide->type, brakeSpeed2); + brakeSpeed2 = GetBoosterSpeed(currentRide->type, brakeSpeed2); } ft.Add(brakeSpeed2); } @@ -1487,10 +1490,10 @@ public: currentRide->FormatNameTo(ft); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { - rct_drawpixelinfo clipdpi; - rct_widget* widget; + DrawPixelInfo clipdpi; + Widget* widget; int32_t widgetWidth, widgetHeight; DrawWidgets(dpi); @@ -1501,7 +1504,7 @@ public: RideId rideIndex; int32_t trackType, trackDirection, liftHillAndInvertedState; - if (window_ride_construction_update_state( + if (WindowRideConstructionUpdateState( &trackType, &trackDirection, &rideIndex, &liftHillAndInvertedState, nullptr, nullptr)) return; @@ -1509,7 +1512,7 @@ public: auto screenCoords = ScreenCoordsXY{ windowPos.x + widget->left + 1, windowPos.y + widget->top + 1 }; widgetWidth = widget->width() - 1; widgetHeight = widget->height() - 1; - if (clip_drawpixelinfo(&clipdpi, &dpi, screenCoords, widgetWidth, widgetHeight)) + if (ClipDrawPixelInfo(&clipdpi, &dpi, screenCoords, widgetWidth, widgetHeight)) { DrawTrackPiece(&clipdpi, rideIndex, trackType, trackDirection, liftHillAndInvertedState, widgetWidth, widgetHeight); } @@ -1517,25 +1520,25 @@ public: // Draw cost screenCoords = { windowPos.x + widget->midX(), windowPos.y + widget->bottom - 23 }; if (_rideConstructionState != RideConstructionState::Place) - DrawTextBasic(&dpi, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE }); screenCoords.y += 11; - if (_currentTrackPrice != MONEY32_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) + if (_currentTrackPrice != MONEY64_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_currentTrackPrice); - DrawTextBasic(&dpi, screenCoords, STR_COST_LABEL, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_COST_LABEL, ft, { TextAlignment::CENTRE }); } } void UpdateWidgets() { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; } - int32_t rideType = RideGetAlternativeType(currentRide); + int32_t rideType = RideGetAlternativeType(*currentRide); hold_down_widgets = 0; if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY) || !currentRide->HasStation()) @@ -1590,18 +1593,18 @@ public: widgets[WIDX_LEFT_CURVE_SMALL].right = 49; widgets[WIDX_RIGHT_CURVE_SMALL].left = 116; widgets[WIDX_RIGHT_CURVE_SMALL].right = 137; - widgets[WIDX_LEFT_CURVE_SMALL].image = SPR_RIDE_CONSTRUCTION_LEFT_CURVE; - widgets[WIDX_RIGHT_CURVE_SMALL].image = SPR_RIDE_CONSTRUCTION_RIGHT_CURVE; + widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE); + widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE); if (IsTrackEnabled(TRACK_CURVE_VERTICAL)) { widgets[WIDX_LEFT_CURVE_SMALL].type = WindowWidgetType::FlatBtn; widgets[WIDX_LEFT_CURVE_SMALL].left = 6; widgets[WIDX_LEFT_CURVE_SMALL].right = 27; - widgets[WIDX_LEFT_CURVE_SMALL].image = SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL; + widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL); widgets[WIDX_RIGHT_CURVE_SMALL].type = WindowWidgetType::FlatBtn; widgets[WIDX_RIGHT_CURVE_SMALL].left = 138; widgets[WIDX_RIGHT_CURVE_SMALL].right = 159; - widgets[WIDX_RIGHT_CURVE_SMALL].image = SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL; + widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL); } if (IsTrackEnabled(TRACK_CURVE)) { @@ -1609,10 +1612,10 @@ public: widgets[WIDX_RIGHT_CURVE].type = WindowWidgetType::FlatBtn; widgets[WIDX_LEFT_CURVE_SMALL].left = 6; widgets[WIDX_LEFT_CURVE_SMALL].right = 27; - widgets[WIDX_LEFT_CURVE_SMALL].image = SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL; + widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL); widgets[WIDX_RIGHT_CURVE_SMALL].left = 138; widgets[WIDX_RIGHT_CURVE_SMALL].right = 159; - widgets[WIDX_RIGHT_CURVE_SMALL].image = SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL; + widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL); } if (IsTrackEnabled(TRACK_CURVE_SMALL)) { @@ -1630,9 +1633,9 @@ public: widgets[WIDX_LEVEL].type = WindowWidgetType::Empty; widgets[WIDX_SLOPE_UP].type = WindowWidgetType::Empty; widgets[WIDX_SLOPE_UP_STEEP].type = WindowWidgetType::Empty; - widgets[WIDX_SLOPE_DOWN_STEEP].image = SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP; + widgets[WIDX_SLOPE_DOWN_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP); widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP; - widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP; + widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP); widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP; if (GetRideTypeDescriptor(rideType).SupportsTrackPiece(TRACK_REVERSE_FREEFALL)) { @@ -1696,9 +1699,9 @@ public: x += 24; } - widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP; + widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP); widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP; - widgets[WIDX_SLOPE_DOWN_STEEP].image = SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP; + widgets[WIDX_SLOPE_DOWN_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP); widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP; if (IsTrackEnabled(TRACK_SLOPE_VERTICAL)) { @@ -1713,7 +1716,7 @@ public: } widgets[WIDX_SLOPE_DOWN_STEEP].left = originalSlopeUpSteepLeft; widgets[WIDX_SLOPE_DOWN_STEEP].right = originalSlopeUpSteepRight; - widgets[WIDX_SLOPE_DOWN_STEEP].image = SPR_RIDE_CONSTRUCTION_VERTICAL_RISE; + widgets[WIDX_SLOPE_DOWN_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_VERTICAL_RISE); widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_VERTICAL_RISE_TIP; } else if (_previousTrackSlopeEnd == TRACK_SLOPE_DOWN_60 || _previousTrackSlopeEnd == TRACK_SLOPE_DOWN_90) @@ -1727,7 +1730,7 @@ public: } widgets[WIDX_SLOPE_UP_STEEP].left = originalSlopeDownSteepLeft; widgets[WIDX_SLOPE_UP_STEEP].right = originalSlopeDownSteepRight; - widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_VERTICAL_DROP; + widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_VERTICAL_DROP); widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_VERTICAL_DROP_TIP; } } @@ -1736,9 +1739,9 @@ public: && _currentTrackBankEnd == TRACK_BANK_NONE && (_currentTrackCurve == TRACK_CURVE_LEFT || _currentTrackCurve == TRACK_CURVE_RIGHT)) { - widgets[WIDX_SLOPE_DOWN_STEEP].image = SPR_RIDE_CONSTRUCTION_HELIX_DOWN; + widgets[WIDX_SLOPE_DOWN_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_HELIX_DOWN); widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_HELIX_DOWN_TIP; - widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_HELIX_UP; + widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_HELIX_UP); widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_HELIX_UP_TIP; int32_t tmp = widgets[WIDX_SLOPE_DOWN_STEEP].left; @@ -1762,9 +1765,9 @@ public: && (_currentTrackCurve >= TRACK_CURVE_LEFT && _currentTrackCurve <= TRACK_CURVE_RIGHT_SMALL) && _currentTrackSlopeEnd == TRACK_SLOPE_NONE && _currentTrackBankEnd != TRACK_BANK_NONE) { - widgets[WIDX_SLOPE_DOWN_STEEP].image = SPR_RIDE_CONSTRUCTION_HELIX_DOWN; + widgets[WIDX_SLOPE_DOWN_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_HELIX_DOWN); widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_HELIX_DOWN_TIP; - widgets[WIDX_SLOPE_UP_STEEP].image = SPR_RIDE_CONSTRUCTION_HELIX_UP; + widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_HELIX_UP); widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_HELIX_UP_TIP; int32_t tmp = widgets[WIDX_SLOPE_DOWN_STEEP].left; @@ -1784,20 +1787,20 @@ public: widgets[WIDX_SLOPE_UP].right = tmp; } - widgets[WIDX_BANKING_GROUPBOX].image = STR_RIDE_CONSTRUCTION_ROLL_BANKING; - widgets[WIDX_BANK_LEFT].image = SPR_RIDE_CONSTRUCTION_LEFT_BANK; + widgets[WIDX_BANKING_GROUPBOX].image = ImageId(STR_RIDE_CONSTRUCTION_ROLL_BANKING); + widgets[WIDX_BANK_LEFT].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_BANK); widgets[WIDX_BANK_LEFT].tooltip = STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP; widgets[WIDX_BANK_LEFT].left = 47; widgets[WIDX_BANK_LEFT].right = 70; widgets[WIDX_BANK_LEFT].top = 132; widgets[WIDX_BANK_LEFT].bottom = 155; - widgets[WIDX_BANK_STRAIGHT].image = SPR_RIDE_CONSTRUCTION_NO_BANK; + widgets[WIDX_BANK_STRAIGHT].image = ImageId(SPR_RIDE_CONSTRUCTION_NO_BANK); widgets[WIDX_BANK_STRAIGHT].tooltip = STR_RIDE_CONSTRUCTION_NO_ROLL_TIP; widgets[WIDX_BANK_STRAIGHT].left = 71; widgets[WIDX_BANK_STRAIGHT].right = 94; widgets[WIDX_BANK_STRAIGHT].top = 132; widgets[WIDX_BANK_STRAIGHT].bottom = 155; - widgets[WIDX_BANK_RIGHT].image = SPR_RIDE_CONSTRUCTION_RIGHT_BANK; + widgets[WIDX_BANK_RIGHT].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_BANK); widgets[WIDX_BANK_RIGHT].tooltip = STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP; widgets[WIDX_BANK_RIGHT].left = 95; widgets[WIDX_BANK_RIGHT].right = 118; @@ -1809,12 +1812,21 @@ public: widgets[WIDX_U_TRACK].type = WindowWidgetType::Empty; widgets[WIDX_O_TRACK].type = WindowWidgetType::Empty; - bool brakesSelected = _selectedTrackType == TrackElemType::Brakes - || _currentTrackCurve == (RideConstructionSpecialPieceSelected | TrackElemType::Brakes); + bool trackHasSpeedSetting = TrackTypeHasSpeedSetting(_selectedTrackType) + || TrackTypeHasSpeedSetting(_currentTrackCurve & ~RideConstructionSpecialPieceSelected); bool boosterTrackSelected = _selectedTrackType == TrackElemType::Booster || _currentTrackCurve == (RideConstructionSpecialPieceSelected | TrackElemType::Booster); - if (!brakesSelected && !boosterTrackSelected) + // Only necessary because TD6 writes speed and seat rotation to the same bits. Remove for new track design format. + bool trackHasSpeedAndSeatRotation = _selectedTrackType == TrackElemType::BlockBrakes + || _currentTrackCurve == (RideConstructionSpecialPieceSelected | TrackElemType::BlockBrakes) + || _selectedTrackType > TrackElemType::HighestAlias + || _currentTrackCurve > (RideConstructionSpecialPieceSelected | TrackElemType::HighestAlias); + + const auto& rtd = GetRideTypeDescriptor(rideType); + bool rideHasSeatRotation = rtd.HasFlag(RIDE_TYPE_FLAG_HAS_SEAT_ROTATION); + + if (!trackHasSpeedSetting) { if (IsTrackEnabled(TRACK_FLAT_ROLL_BANKING)) { @@ -1826,8 +1838,8 @@ public: { if (rideType == RIDE_TYPE_WATER_COASTER) { - widgets[WIDX_U_TRACK].image = SPR_RIDE_CONSTRUCTION_RC_TRACK; - widgets[WIDX_O_TRACK].image = SPR_RIDE_CONSTRUCTION_WATER_CHANNEL; + widgets[WIDX_U_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_RC_TRACK); + widgets[WIDX_O_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_WATER_CHANNEL); widgets[WIDX_U_TRACK].tooltip = STR_RIDE_CONSTRUCTION_STANDARD_RC_TRACK_TIP; widgets[WIDX_O_TRACK].tooltip = STR_RIDE_CONSTRUCTION_WATER_CHANNEL_TIP; if ((_currentTrackCurve < TRACK_CURVE_LEFT_SMALL @@ -1842,8 +1854,8 @@ public: } else { - widgets[WIDX_U_TRACK].image = SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK; - widgets[WIDX_O_TRACK].image = SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK; + widgets[WIDX_U_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK); + widgets[WIDX_O_TRACK].image = ImageId(SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK); widgets[WIDX_U_TRACK].tooltip = STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP; widgets[WIDX_O_TRACK].tooltip = STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP; widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_TRACK_STYLE; @@ -1854,60 +1866,75 @@ public: } else { - if (brakesSelected) + if (!boosterTrackSelected) { - widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED; - widgets[WIDX_BANK_LEFT].tooltip = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP; - widgets[WIDX_BANK_STRAIGHT].tooltip = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP; - widgets[WIDX_BANK_RIGHT].tooltip = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP; + widgets[WIDX_SPEED_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED; + widgets[WIDX_SPEED_SETTING_SPINNER].tooltip = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].tooltip = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].tooltip = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_LIMIT_TIP; } else { - widgets[WIDX_BANKING_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED; - widgets[WIDX_BANK_LEFT].tooltip = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP; - widgets[WIDX_BANK_STRAIGHT].tooltip = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP; - widgets[WIDX_BANK_RIGHT].tooltip = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP; + widgets[WIDX_SPEED_GROUPBOX].text = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED; + widgets[WIDX_SPEED_SETTING_SPINNER].tooltip = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].tooltip = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].tooltip = STR_RIDE_CONSTRUCTION_BOOSTER_SPEED_LIMIT_TIP; } _currentlyShowingBrakeOrBoosterSpeed = true; - widgets[WIDX_BANK_LEFT].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_VELOCITY; + widgets[WIDX_SPEED_SETTING_SPINNER].text = STR_RIDE_CONSTRUCTION_BRAKE_SPEED_VELOCITY; - widgets[WIDX_BANK_LEFT].type = WindowWidgetType::Spinner; - widgets[WIDX_BANK_LEFT].left = 12; - widgets[WIDX_BANK_LEFT].right = 96; - widgets[WIDX_BANK_LEFT].top = 138; - widgets[WIDX_BANK_LEFT].bottom = 149; - widgets[WIDX_BANK_STRAIGHT].type = WindowWidgetType::Button; - widgets[WIDX_BANK_STRAIGHT].text = STR_NUMERIC_UP; - widgets[WIDX_BANK_STRAIGHT].left = 84; - widgets[WIDX_BANK_STRAIGHT].right = 95; - widgets[WIDX_BANK_STRAIGHT].top = 139; - widgets[WIDX_BANK_STRAIGHT].bottom = 148; - widgets[WIDX_BANK_RIGHT].type = WindowWidgetType::Button; - widgets[WIDX_BANK_RIGHT].text = STR_NUMERIC_DOWN; - widgets[WIDX_BANK_RIGHT].left = 72; - widgets[WIDX_BANK_RIGHT].right = 83; - widgets[WIDX_BANK_RIGHT].top = 139; - widgets[WIDX_BANK_RIGHT].bottom = 148; - hold_down_widgets |= (1uLL << WIDX_BANK_STRAIGHT) | (1uLL << WIDX_BANK_RIGHT); + widgets[WIDX_SPEED_SETTING_SPINNER].type = WindowWidgetType::Spinner; + widgets[WIDX_SPEED_SETTING_SPINNER].left = 12; + widgets[WIDX_SPEED_SETTING_SPINNER].right = 96; + widgets[WIDX_SPEED_SETTING_SPINNER].top = 138; + widgets[WIDX_SPEED_SETTING_SPINNER].bottom = 149; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].type = WindowWidgetType::Button; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].text = STR_NUMERIC_UP; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].left = 84; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].right = 95; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].top = 139; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].bottom = 148; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].type = WindowWidgetType::Button; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].text = STR_NUMERIC_DOWN; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].left = 72; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].right = 83; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].top = 139; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].bottom = 148; + hold_down_widgets |= (1uLL << WIDX_SPEED_SETTING_SPINNER_UP) | (1uLL << WIDX_SPEED_SETTING_SPINNER_DOWN); } - widgets[WIDX_BANKING_GROUPBOX].right = 162; + static constexpr const int16_t bankingGroupboxRightNoSeatRotation = 162; + static constexpr const int16_t bankingGroupboxRightWithSeatRotation = 92; + + widgets[WIDX_BANKING_GROUPBOX].right = bankingGroupboxRightNoSeatRotation; widgets[WIDX_SEAT_ROTATION_GROUPBOX].type = WindowWidgetType::Empty; widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].type = WindowWidgetType::Empty; widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER_UP].type = WindowWidgetType::Empty; widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER_DOWN].type = WindowWidgetType::Empty; - const auto& rtd = GetRideTypeDescriptor(rideType); - if (rtd.HasFlag(RIDE_TYPE_FLAG_HAS_SEAT_ROTATION) && _selectedTrackType != TrackElemType::Brakes - && _currentTrackCurve != (RideConstructionSpecialPieceSelected | TrackElemType::Brakes)) + // Simplify this condition to "rideHasSeatRotation" for new track design format + if ((rideHasSeatRotation && !trackHasSpeedSetting) + || (rideHasSeatRotation && trackHasSpeedSetting && trackHasSpeedAndSeatRotation)) { widgets[WIDX_SEAT_ROTATION_GROUPBOX].type = WindowWidgetType::Groupbox; widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].type = WindowWidgetType::Spinner; widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER_UP].type = WindowWidgetType::Button; widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER_DOWN].type = WindowWidgetType::Button; - widgets[WIDX_BANKING_GROUPBOX].right = 92; - if (widgets[WIDX_BANK_LEFT].type != WindowWidgetType::Spinner) + widgets[WIDX_BANKING_GROUPBOX].right = bankingGroupboxRightWithSeatRotation; + + // squishes the track speed spinner slightly to make room for the seat rotation widgets + if (trackHasSpeedSetting) + { + widgets[WIDX_SPEED_SETTING_SPINNER].left -= 4; + widgets[WIDX_SPEED_SETTING_SPINNER].right -= 8; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].right -= 8; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].right -= 8; + widgets[WIDX_SPEED_SETTING_SPINNER_UP].left -= 8; + widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].left -= 8; + } + // moves banking buttons to the left to make room for the seat rotation widgets + else if (IsTrackEnabled(TRACK_FLAT_ROLL_BANKING)) { for (int32_t i = WIDX_BANK_LEFT; i <= WIDX_BANK_RIGHT; i++) { @@ -2061,7 +2088,7 @@ public: void UpdatePossibleRideConfigurations() { int32_t trackType; - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; @@ -2085,16 +2112,19 @@ public: } int32_t slope, bank; + bool buildDirectionIsDiagonal = false; if (_rideConstructionState == RideConstructionState::Front || _rideConstructionState == RideConstructionState::Place) { slope = ted.Definition.vangle_start; bank = ted.Definition.bank_start; + buildDirectionIsDiagonal = TrackPieceDirectionIsDiagonal(ted.Coordinates.rotation_begin); } else if (_rideConstructionState == RideConstructionState::Back) { slope = ted.Definition.vangle_end; bank = ted.Definition.bank_end; + buildDirectionIsDiagonal = TrackPieceDirectionIsDiagonal(ted.Coordinates.rotation_end); } else { @@ -2130,7 +2160,8 @@ public: _currentPossibleRideConfigurations[currentPossibleRideConfigurationIndex] = trackType; _currentDisabledSpecialTrackPieces |= (1uLL << currentPossibleRideConfigurationIndex); - if (_currentTrackPieceDirection < 4 && slope == _previousTrackSlopeEnd && bank == _previousTrackBankEnd + if (TrackPieceDirectionIsDiagonal(_currentTrackPieceDirection) == buildDirectionIsDiagonal + && slope == _previousTrackSlopeEnd && bank == _previousTrackBankEnd && (trackType != TrackElemType::TowerBase || currentRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_ALLOW_EXTRA_TOWER_BASES))) { @@ -2167,7 +2198,7 @@ public: gMapSelectionTiles.clear(); return; default: - if (window_ride_construction_update_state(&trackType, &trackDirection, nullptr, nullptr, &trackPos, nullptr)) + if (WindowRideConstructionUpdateState(&trackType, &trackDirection, nullptr, nullptr, &trackPos, nullptr)) { trackDirection = _currentTrackPieceDirection; trackType = 0; @@ -2176,7 +2207,7 @@ public: break; } - if (get_ride(_currentRideIndex)) + if (GetRide(_currentRideIndex)) { SelectMapTiles(trackType, trackDirection, trackPos); MapInvalidateMapSelectionTiles(); @@ -2187,12 +2218,12 @@ public: { // If the scenery tool is active, we do not display our tiles as it // will conflict with larger scenery objects selecting tiles - if (scenery_tool_is_active()) + if (SceneryToolIsActive()) { return; } - const rct_preview_track* trackBlock; + const PreviewTrack* trackBlock; const auto& ted = GetTrackElementDescriptor(trackType); trackBlock = ted.Block; @@ -2211,7 +2242,7 @@ public: private: bool TrackPieceDirectionIsDiagonal(const uint8_t direction) { - return direction >= 4; + return direction >= NumOrthogonalDirections; } void Construct() @@ -2220,18 +2251,18 @@ private: int32_t trackType, trackDirection, liftHillAndAlternativeState, properties; CoordsXYZ trackPos{}; - _currentTrackPrice = MONEY32_UNDEFINED; - _trackPlaceCost = MONEY32_UNDEFINED; + _currentTrackPrice = MONEY64_UNDEFINED; + _trackPlaceCost = MONEY64_UNDEFINED; _trackPlaceErrorMessage = STR_NONE; - ride_construction_invalidate_current_track(); - if (window_ride_construction_update_state( + RideConstructionInvalidateCurrentTrack(); + if (WindowRideConstructionUpdateState( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &trackPos, &properties)) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide == nullptr) { return; @@ -2252,7 +2283,7 @@ private: // Used by some functions if (res.Error != GameActions::Status::Ok) { - _trackPlaceCost = MONEY32_UNDEFINED; + _trackPlaceCost = MONEY64_UNDEFINED; _trackPlaceErrorMessage = std::get(res.ErrorMessage); } else @@ -2267,7 +2298,7 @@ private: } OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, trackPos); - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK_PLACE_ACTION_QUEUED; } @@ -2275,16 +2306,14 @@ private: const auto resultData = res.GetData(); if (resultData.GroundFlags & ELEMENT_IS_UNDERGROUND) { - viewport_set_visibility(1); + ViewportSetVisibility(1); } - if ((_currentTrackCurve >= (TrackElemType::LeftHalfBankedHelixUpSmall | RideConstructionSpecialPieceSelected) - && _currentTrackCurve <= (TrackElemType::RightHalfBankedHelixDownLarge | RideConstructionSpecialPieceSelected)) - || (_currentTrackCurve >= (TrackElemType::LeftQuarterBankedHelixLargeUp | RideConstructionSpecialPieceSelected) - && _currentTrackCurve <= (TrackElemType::RightQuarterHelixLargeDown | RideConstructionSpecialPieceSelected)) - || (_currentTrackSlopeEnd != TRACK_SLOPE_NONE)) + const bool helixSelected = (_currentTrackCurve & RideConstructionSpecialPieceSelected) + && TrackTypeIsHelix(_currentTrackCurve & ~RideConstructionSpecialPieceSelected); + if (helixSelected || (_currentTrackSlopeEnd != TRACK_SLOPE_NONE)) { - viewport_set_visibility(2); + ViewportSetVisibility(2); } } @@ -2293,27 +2322,27 @@ private: int32_t direction; TileElement* tileElement; CoordsXYE inputElement, outputElement; - track_begin_end trackBeginEnd; + TrackBeginEnd trackBeginEnd; - _currentTrackPrice = MONEY32_UNDEFINED; - ride_construction_invalidate_current_track(); + _currentTrackPrice = MONEY64_UNDEFINED; + RideConstructionInvalidateCurrentTrack(); // Select the track element that is to be deleted _rideConstructionState2 = RideConstructionState::Selected; if (_rideConstructionState == RideConstructionState::Front) { - if (!ride_select_backwards_from_front()) + if (!RideSelectBackwardsFromFront()) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } _rideConstructionState2 = RideConstructionState::Front; } else if (_rideConstructionState == RideConstructionState::Back) { - if (!ride_select_forwards_from_back()) + if (!RideSelectForwardsFromBack()) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } _rideConstructionState2 = RideConstructionState::Back; @@ -2328,7 +2357,7 @@ private: { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, 0); if (!newCoords.has_value()) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } @@ -2336,14 +2365,14 @@ private: inputElement.x = newCoords->x; inputElement.y = newCoords->y; inputElement.element = tileElement; - if (track_block_get_previous({ *newCoords, tileElement }, &trackBeginEnd)) + if (TrackBlockGetPrevious({ *newCoords, tileElement }, &trackBeginEnd)) { *newCoords = { trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z }; direction = trackBeginEnd.begin_direction; type = trackBeginEnd.begin_element->AsTrack()->GetTrackType(); _gotoStartPlacementMode = false; } - else if (track_block_get_next(&inputElement, &outputElement, &newCoords->z, &direction)) + else if (TrackBlockGetNext(&inputElement, &outputElement, &newCoords->z, &direction)) { newCoords->x = outputElement.x; newCoords->y = outputElement.y; @@ -2360,21 +2389,21 @@ private: if (!newCoords.has_value()) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } const auto& ted = GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType()); - const rct_preview_track* trackBlock = ted.Block; + const PreviewTrack* trackBlock = ted.Block; newCoords->z = (tileElement->GetBaseZ()) - trackBlock->z; _gotoStartPlacementMode = true; // When flat rides are deleted, the window should be reset so the currentRide can be placed again. - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); const auto& rtd = currentRide->GetRideTypeDescriptor(); if (rtd.HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) && !rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) { - ride_initialise_construction_window(currentRide); + RideInitialiseConstructionWindow(*currentRide); } } @@ -2384,15 +2413,14 @@ private: trackRemoveAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } else { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { - window_ride_construction_mouseup_demolish_next_piece( - { *newCoords, static_cast(direction) }, type); + WindowRideConstructionMouseUpDemolishNextPiece({ *newCoords, static_cast(direction) }, type); } } }); @@ -2404,19 +2432,19 @@ private: { _autoRotatingShop = false; _currentTrackPieceDirection = (_currentTrackPieceDirection + 1) & 3; - ride_construction_invalidate_current_track(); - _currentTrackPrice = MONEY32_UNDEFINED; - window_ride_construction_update_active_elements(); + RideConstructionInvalidateCurrentTrack(); + _currentTrackPrice = MONEY64_UNDEFINED; + WindowRideConstructionUpdateActiveElements(); } void EntranceClick() { - if (tool_set(*this, WIDX_ENTRANCE, Tool::Crosshair)) + if (ToolSet(*this, WIDX_ENTRANCE, Tool::Crosshair)) { - auto currentRide = get_ride(_currentRideIndex); - if (currentRide != nullptr && !ride_try_get_origin_element(currentRide, nullptr)) + auto currentRide = GetRide(_currentRideIndex); + if (currentRide != nullptr && !RideTryGetOriginElement(*currentRide, nullptr)) { - ride_initialise_construction_window(currentRide); + RideInitialiseConstructionWindow(*currentRide); } } else @@ -2424,25 +2452,25 @@ private: gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_ENTRANCE; gRideEntranceExitPlaceRideIndex = _currentRideIndex; gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); - input_set_flag(INPUT_FLAG_6, true); - ride_construction_invalidate_current_track(); + InputSetFlag(INPUT_FLAG_6, true); + RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState != RideConstructionState::EntranceExit) { gRideEntranceExitPlacePreviousRideConstructionState = _rideConstructionState; _rideConstructionState = RideConstructionState::EntranceExit; } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } void ExitClick() { - if (tool_set(*this, WIDX_EXIT, Tool::Crosshair)) + if (ToolSet(*this, WIDX_EXIT, Tool::Crosshair)) { - auto currentRide = get_ride(_currentRideIndex); - if (!ride_try_get_origin_element(currentRide, nullptr)) + auto currentRide = GetRide(_currentRideIndex); + if (!RideTryGetOriginElement(*currentRide, nullptr)) { - ride_initialise_construction_window(currentRide); + RideInitialiseConstructionWindow(*currentRide); } } else @@ -2450,21 +2478,21 @@ private: gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_EXIT; gRideEntranceExitPlaceRideIndex = _currentRideIndex; gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); - input_set_flag(INPUT_FLAG_6, true); - ride_construction_invalidate_current_track(); + InputSetFlag(INPUT_FLAG_6, true); + RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState != RideConstructionState::EntranceExit) { gRideEntranceExitPlacePreviousRideConstructionState = _rideConstructionState; _rideConstructionState = RideConstructionState::EntranceExit; } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } void UpdateLiftHillSelected(int32_t slope) { _currentTrackSlopeEnd = slope; - _currentTrackPrice = MONEY32_UNDEFINED; + _currentTrackPrice = MONEY64_UNDEFINED; if (_rideConstructionState == RideConstructionState::Front && !gCheatsEnableChainLiftOnAllTrack) { switch (slope) @@ -2478,7 +2506,7 @@ private: break; } } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } void SetBrakeSpeed(int32_t brakesSpeed) @@ -2492,16 +2520,15 @@ private: { auto trackSetBrakeSpeed = TrackSetBrakeSpeedAction( _currentTrackBegin, tileElement->AsTrack()->GetTrackType(), brakesSpeed); - trackSetBrakeSpeed.SetCallback([](const GameAction* ga, const GameActions::Result* result) { - window_ride_construction_update_active_elements(); - }); + trackSetBrakeSpeed.SetCallback( + [](const GameAction* ga, const GameActions::Result* result) { WindowRideConstructionUpdateActiveElements(); }); GameActions::Execute(&trackSetBrakeSpeed); return; } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } - void ShowSpecialTrackDropdown(rct_widget* widget) + void ShowSpecialTrackDropdown(Widget* widget) { int32_t defaultIndex = -1; for (int32_t i = 0; i < _numCurrentPossibleRideConfigurations; i++) @@ -2512,7 +2539,7 @@ private: StringId trackPieceStringId = ted.Description; if (trackPieceStringId == STR_RAPIDS) { - auto currentRide = get_ride(_currentRideIndex); + auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { const auto& rtd = currentRide->GetRideTypeDescriptor(); @@ -2546,17 +2573,17 @@ private: GetTrackElementOriginAndApplyChanges( { _currentTrackBegin, static_cast(_currentTrackPieceDirection & 3) }, _currentTrackPieceType, seatRotation, nullptr, TRACK_ELEMENT_SET_SEAT_ROTATION); - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } void ToolDownEntranceExit(const ScreenCoordsXY& screenCoords) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - CoordsXYZD entranceOrExitCoords = ride_get_entrance_or_exit_position_from_screen_position(screenCoords); + CoordsXYZD entranceOrExitCoords = RideGetEntranceOrExitPositionFromScreenPosition(screenCoords); if (gRideEntranceExitPlaceDirection == INVALID_DIRECTION) return; @@ -2570,19 +2597,19 @@ private: OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); - auto currentRide = get_ride(gRideEntranceExitPlaceRideIndex); - if (currentRide != nullptr && ride_are_all_possible_entrances_and_exits_built(currentRide).Successful) + auto currentRide = GetRide(gRideEntranceExitPlaceRideIndex); + if (currentRide != nullptr && RideAreAllPossibleEntrancesAndExitsBuilt(*currentRide).Successful) { - tool_cancel(); + ToolCancel(); if (currentRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_NO_TRACK)) { - window_close_by_class(WindowClass::RideConstruction); + WindowCloseByClass(WindowClass::RideConstruction); } } else { gRideEntranceExitPlaceType = gRideEntranceExitPlaceType ^ 1; - window_invalidate_by_class(WindowClass::RideConstruction); + WindowInvalidateByClass(WindowClass::RideConstruction); gCurrentToolWidget.widget_index = (gRideEntranceExitPlaceType == ENTRANCE_TYPE_RIDE_ENTRANCE) ? WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE : WC_RIDE_CONSTRUCTION__WIDX_EXIT; @@ -2592,10 +2619,10 @@ private: } void DrawTrackPiece( - rct_drawpixelinfo* dpi, RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndInvertedState, + DrawPixelInfo* dpi, RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndInvertedState, int32_t widgetWidth, int32_t widgetHeight) { - auto currentRide = get_ride(rideIndex); + auto currentRide = GetRide(rideIndex); if (currentRide == nullptr) { return; @@ -2622,7 +2649,7 @@ private: int16_t previewZOffset = ted.Definition.preview_z_offset; mapCoords.z -= previewZOffset; - const ScreenCoordsXY rotatedScreenCoords = Translate3DTo2DWithZ(get_current_rotation(), mapCoords); + const ScreenCoordsXY rotatedScreenCoords = Translate3DTo2DWithZ(GetCurrentRotation(), mapCoords); dpi->x += rotatedScreenCoords.x - widgetWidth / 2; dpi->y += rotatedScreenCoords.y - widgetHeight / 2 - 16; @@ -2631,7 +2658,7 @@ private: } void DrawTrackPieceHelper( - rct_drawpixelinfo* dpi, RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndInvertedState, + DrawPixelInfo* dpi, RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndInvertedState, const CoordsXY& originCoords, int32_t originZ) { TileElement tempSideTrackTileElement{ 0x80, 0x8F, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -2640,7 +2667,7 @@ private: PaintSession* session = PaintSessionAlloc(dpi, 0); trackDirection &= 3; - auto currentRide = get_ride(rideIndex); + auto currentRide = GetRide(rideIndex); if (currentRide == nullptr) { return; @@ -2665,6 +2692,10 @@ private: const auto& ted = GetTrackElementDescriptor(trackType); const auto* trackBlock = ted.Block; + const auto* rideEntry = currentRide->GetRideEntry(); + auto clearanceHeight = (rideEntry != nullptr) ? rideEntry->Clearance + : currentRide->GetRideTypeDescriptor().Heights.ClearanceHeight; + while (trackBlock->index != 255) { auto quarterTile = trackBlock->var_08.Rotate(trackDirection); @@ -2672,8 +2703,7 @@ private: CoordsXY coords = originCoords + offsets.Rotate(trackDirection); int32_t baseZ = originZ + trackBlock->z; - int32_t clearanceZ = trackBlock->var_07 + currentRide->GetRideTypeDescriptor().Heights.ClearanceHeight + baseZ - + (4 * COORDS_Z_STEP); + int32_t clearanceZ = trackBlock->var_07 + clearanceHeight + baseZ + (4 * COORDS_Z_STEP); auto centreTileCoords = TileCoordsXY{ coords }; auto eastTileCoords = centreTileCoords + TileDirectionDelta[TILE_ELEMENT_DIRECTION_EAST]; @@ -2740,7 +2770,7 @@ static void WindowRideConstructionUpdateDisabledPieces(ObjectEntryIndex rideType for (auto rideEntryIndex : rideEntries) { - const auto* currentRideEntry = get_ride_entry(rideEntryIndex); + const auto* currentRideEntry = GetRideEntryByIndex(rideEntryIndex); if (currentRideEntry == nullptr) continue; @@ -2753,7 +2783,7 @@ static void WindowRideConstructionUpdateDisabledPieces(ObjectEntryIndex rideType } // Any pieces that this ride entry supports must be taken out of the array. - auto supportedPieces = ride_entry_get_supported_track_pieces(currentRideEntry); + auto supportedPieces = RideEntryGetSupportedTrackPieces(*currentRideEntry); disabledPieces &= supportedPieces.flip(); } } @@ -2765,12 +2795,12 @@ static void WindowRideConstructionUpdateDisabledPieces(ObjectEntryIndex rideType * * rct2: 0x006CB481 */ -rct_window* WindowRideConstructionOpen() +WindowBase* WindowRideConstructionOpen() { RideId rideIndex = _currentRideIndex; CloseRideWindowForConstruction(rideIndex); - auto currentRide = get_ride(rideIndex); + auto currentRide = GetRide(rideIndex); if (currentRide == nullptr) { return nullptr; @@ -2785,35 +2815,34 @@ rct_window* WindowRideConstructionOpen() return ContextOpenWindowView(WV_MAZE_CONSTRUCTION); case RideConstructionWindowContext::Default: return WindowCreate( - WindowClass::RideConstruction, ScreenCoordsXY(0, 29), 166, 394, WF_NO_AUTO_CLOSE); + WindowClass::RideConstruction, ScreenCoordsXY(0, 29), WW, WH, WF_NO_AUTO_CLOSE); } - return WindowCreate( - WindowClass::RideConstruction, ScreenCoordsXY(0, 29), 166, 394, WF_NO_AUTO_CLOSE); + return WindowCreate(WindowClass::RideConstruction, ScreenCoordsXY(0, 29), WW, WH, WF_NO_AUTO_CLOSE); } -static void CloseConstructWindowOnCompletion(Ride* ride) +static void CloseConstructWindowOnCompletion(const Ride& ride) { if (_rideConstructionState == RideConstructionState::State0) { - auto w = window_find_by_class(WindowClass::RideConstruction); + auto w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr) { - if (ride_are_all_possible_entrances_and_exits_built(ride).Successful) + if (RideAreAllPossibleEntrancesAndExitsBuilt(ride).Successful) { - window_close(*w); + WindowClose(*w); } else { - window_event_mouse_up_call(w, WIDX_ENTRANCE); + WindowEventMouseUpCall(w, WIDX_ENTRANCE); } } } } -static void window_ride_construction_do_entrance_exit_check() +static void WindowRideConstructionDoEntranceExitCheck() { - auto w = window_find_by_class(WindowClass::RideConstruction); - auto ride = get_ride(_currentRideIndex); + auto w = WindowFindByClass(WindowClass::RideConstruction); + auto ride = GetRide(_currentRideIndex); if (w == nullptr || ride == nullptr) { return; @@ -2821,12 +2850,12 @@ static void window_ride_construction_do_entrance_exit_check() if (_rideConstructionState == RideConstructionState::State0) { - w = window_find_by_class(WindowClass::RideConstruction); + w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr) { - if (!ride_are_all_possible_entrances_and_exits_built(ride).Successful) + if (!RideAreAllPossibleEntrancesAndExitsBuilt(*ride).Successful) { - window_event_mouse_up_call(w, WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE); + WindowEventMouseUpCall(w, WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE); } } } @@ -2836,10 +2865,10 @@ static void RideConstructPlacedForwardGameActionCallback(const GameAction* ga, c { if (result->Error != GameActions::Status::Ok) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride != nullptr) { int32_t trackDirection = _currentTrackPieceDirection; @@ -2850,7 +2879,7 @@ static void RideConstructPlacedForwardGameActionCallback(const GameAction* ga, c } CoordsXYE next_track; - if (track_block_get_next_from_zero(trackPos, ride, trackDirection, &next_track, &trackPos.z, &trackDirection, false)) + if (TrackBlockGetNextFromZero(trackPos, *ride, trackDirection, &next_track, &trackPos.z, &trackDirection, false)) { _currentTrackBegin.x = next_track.x; _currentTrackBegin.y = next_track.y; @@ -2861,29 +2890,30 @@ static void RideConstructPlacedForwardGameActionCallback(const GameAction* ga, c _rideConstructionState = RideConstructionState::Selected; _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - ride_select_next_section(); + RideSelectNextSection(); } else { _rideConstructionState = RideConstructionState::State0; } - window_ride_construction_do_entrance_exit_check(); - window_ride_construction_update_active_elements(); + WindowRideConstructionDoEntranceExitCheck(); + WindowRideConstructionUpdateActiveElements(); } - window_close_by_class(WindowClass::Error); - CloseConstructWindowOnCompletion(ride); + WindowCloseByClass(WindowClass::Error); + if (ride != nullptr) + CloseConstructWindowOnCompletion(*ride); } static void RideConstructPlacedBackwardGameActionCallback(const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride != nullptr) { auto trackDirection = DirectionReverse(_currentTrackPieceDirection); @@ -2893,8 +2923,8 @@ static void RideConstructPlacedBackwardGameActionCallback(const GameAction* ga, trackPos += CoordsDirectionDelta[trackDirection]; } - track_begin_end trackBeginEnd; - if (track_block_get_previous_from_zero(trackPos, ride, trackDirection, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + if (TrackBlockGetPreviousFromZero(trackPos, *ride, trackDirection, &trackBeginEnd)) { _currentTrackBegin.x = trackBeginEnd.begin_x; _currentTrackBegin.y = trackBeginEnd.begin_y; @@ -2905,18 +2935,19 @@ static void RideConstructPlacedBackwardGameActionCallback(const GameAction* ga, _rideConstructionState = RideConstructionState::Selected; _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - ride_select_previous_section(); + RideSelectPreviousSection(); } else { _rideConstructionState = RideConstructionState::State0; } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } - window_close_by_class(WindowClass::Error); - CloseConstructWindowOnCompletion(ride); + WindowCloseByClass(WindowClass::Error); + if (ride != nullptr) + CloseConstructWindowOnCompletion(*ride); } /** @@ -2931,7 +2962,7 @@ static std::optional RideGetPlacePositionFromScreenPosition(ScreenCoor { if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_COPY_Z) { - auto info = get_map_coordinates_from_pos(screenCoords, 0xFCCA); + auto info = GetMapCoordinatesFromPos(screenCoords, 0xFCCA); if (info.SpriteType != ViewportInteractionItem::None) { _trackPlaceCtrlZ = info.Element->GetBaseZ(); @@ -2960,18 +2991,18 @@ static std::optional RideGetPlacePositionFromScreenPosition(ScreenCoor { if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z) { - uint16_t maxHeight = ZoomLevel::max().ApplyTo(std::numeric_limits::max() - 32); + uint16_t maxHeight = ZoomLevel::max().ApplyTo(std::numeric_limits::max() - 32); _trackPlaceShiftZ = _trackPlaceShiftStart.y - screenCoords.y + 4; // Scale delta by zoom to match mouse position. - auto* mainWnd = window_get_main(); + auto* mainWnd = WindowGetMain(); if (mainWnd != nullptr && mainWnd->viewport != nullptr) { _trackPlaceShiftZ = mainWnd->viewport->zoom.ApplyTo(_trackPlaceShiftZ); } - _trackPlaceShiftZ = floor2(_trackPlaceShiftZ, 8); + _trackPlaceShiftZ = Floor2(_trackPlaceShiftZ, 8); - // Clamp to maximum possible value of base_height can offer. + // Clamp to maximum possible value of BaseHeight can offer. _trackPlaceShiftZ = std::min(_trackPlaceShiftZ, maxHeight); screenCoords = _trackPlaceShiftStart; @@ -2994,7 +3025,7 @@ static std::optional RideGetPlacePositionFromScreenPosition(ScreenCoor auto surfaceElement = MapGetSurfaceElementAt(mapCoords); if (surfaceElement == nullptr) return std::nullopt; - auto mapZ = floor2(surfaceElement->GetBaseZ(), 16); + auto mapZ = Floor2(surfaceElement->GetBaseZ(), 16); mapZ += _trackPlaceShiftZ; mapZ = std::max(mapZ, 16); _trackPlaceZ = mapZ; @@ -3003,7 +3034,7 @@ static std::optional RideGetPlacePositionFromScreenPosition(ScreenCoor else { auto mapZ = _trackPlaceCtrlZ; - auto mapXYCoords = screen_get_map_xy_with_z(screenCoords, mapZ); + auto mapXYCoords = ScreenGetMapXYWithZ(screenCoords, mapZ); if (mapXYCoords.has_value()) { mapCoords = mapXYCoords.value(); @@ -3033,13 +3064,13 @@ static std::optional RideGetPlacePositionFromScreenPosition(ScreenCoor void WindowRideConstructionUpdateActiveElementsImpl() { WindowRideConstructionUpdateEnabledTrackPieces(); - - if (auto currentRide = get_ride(_currentRideIndex); !currentRide || currentRide->type == RIDE_TYPE_MAZE) + if (auto currentRide = GetRide(_currentRideIndex); + !currentRide || currentRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { return; } - auto window = static_cast(window_find_by_class(WindowClass::RideConstruction)); + auto window = static_cast(WindowFindByClass(WindowClass::RideConstruction)); if (!window) { return; @@ -3073,7 +3104,7 @@ void WindowRideConstructionUpdateActiveElementsImpl() */ void WindowRideConstructionUpdateEnabledTrackPieces() { - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride == nullptr) return; @@ -3081,7 +3112,7 @@ void WindowRideConstructionUpdateEnabledTrackPieces() if (rideEntry == nullptr) return; - int32_t rideType = RideGetAlternativeType(ride); + int32_t rideType = RideGetAlternativeType(*ride); UpdateEnabledRidePieces(rideType); } @@ -3104,7 +3135,7 @@ void UpdateGhostTrackAndArrow() // Set by footpath placement if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_RECHECK) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_RECHECK; } @@ -3116,16 +3147,16 @@ void UpdateGhostTrackAndArrow() // place ghost piece if (!(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)) { - if (window_ride_construction_update_state( + if (WindowRideConstructionUpdateState( &type, &direction, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr)) { - ride_construction_remove_ghosts(); + RideConstructionRemoveGhosts(); } else { - _currentTrackPrice = place_provisional_track_piece( + _currentTrackPrice = PlaceProvisionalTrackPiece( rideIndex, type, direction, liftHillAndAlternativeState, trackPos); - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } // update flashing arrow @@ -3167,7 +3198,7 @@ void UpdateGhostTrackAndArrow() { _currentTrackBegin, static_cast(direction) }, type, 0, nullptr, flags); if (!newCoords.has_value()) { - ride_construction_remove_ghosts(); + RideConstructionRemoveGhosts(); _rideConstructionState = RideConstructionState::State0; } break; @@ -3210,10 +3241,10 @@ void UpdateGhostTrackAndArrow() * * rct2: 0x006CC6A8 */ -void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) +void RideConstructionToolupdateConstruct(const ScreenCoordsXY& screenCoords) { int32_t z; - const rct_preview_track* trackBlock; + const PreviewTrack* trackBlock; MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; @@ -3222,7 +3253,7 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) auto mapCoords = RideGetPlacePositionFromScreenPosition(screenCoords); if (!mapCoords) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); MapInvalidateMapSelectionTiles(); return; } @@ -3241,23 +3272,24 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) RideId rideIndex; int32_t trackType, trackDirection, liftHillAndAlternativeState; - if (window_ride_construction_update_state( + if (WindowRideConstructionUpdateState( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, nullptr, nullptr)) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); MapInvalidateMapSelectionTiles(); return; } _currentTrackPieceType = trackType; - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (!ride) { return; } - if (ride->type != RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - auto window = static_cast(window_find_by_class(WindowClass::RideConstruction)); + auto window = static_cast(WindowFindByClass(WindowClass::RideConstruction)); if (!window) { return; @@ -3285,10 +3317,10 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) } } } - // loc_6CC8BF: + // Loc6CC8BF: // z = MapGetHighestZ(x >> 5, y >> 5); } - // loc_6CC91B: + // Loc6CC91B: const auto& ted = GetTrackElementDescriptor(trackType); trackBlock = ted.Block; int32_t bx = 0; @@ -3313,16 +3345,16 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) // search for appropriate z value for ghost, up to max ride height int numAttempts = (z <= MAX_TRACK_HEIGHT ? ((MAX_TRACK_HEIGHT - z) / COORDS_Z_STEP + 1) : 2); - if (ride->type == RIDE_TYPE_MAZE) + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { for (int zAttempts = 0; zAttempts < numAttempts; ++zAttempts) { CoordsXYZ trackPos{}; - window_ride_construction_update_state( + WindowRideConstructionUpdateState( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr); - _currentTrackPrice = place_provisional_track_piece( + _currentTrackPrice = PlaceProvisionalTrackPiece( rideIndex, trackType, trackDirection, liftHillAndAlternativeState, trackPos); - if (_currentTrackPrice != MONEY32_UNDEFINED) + if (_currentTrackPrice != MONEY64_UNDEFINED) break; _currentTrackBegin.z -= 8; @@ -3341,13 +3373,13 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) for (int zAttempts = 0; zAttempts < numAttempts; ++zAttempts) { CoordsXYZ trackPos{}; - window_ride_construction_update_state( + WindowRideConstructionUpdateState( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr); - _currentTrackPrice = place_provisional_track_piece( + _currentTrackPrice = PlaceProvisionalTrackPiece( rideIndex, trackType, trackDirection, liftHillAndAlternativeState, trackPos); mapCoords = trackPos; z = trackPos.z; - if (_currentTrackPrice != MONEY32_UNDEFINED) + if (_currentTrackPrice != MONEY64_UNDEFINED) break; _currentTrackBegin.z -= 8; @@ -3414,9 +3446,9 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) _currentTrackPieceDirection = i; CoordsXYZ trackPos{}; - window_ride_construction_update_state( + WindowRideConstructionUpdateState( &trackType, &trackDirection, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr); - place_provisional_track_piece(rideIndex, trackType, trackDirection, liftHillAndAlternativeState, trackPos); + PlaceProvisionalTrackPiece(rideIndex, trackType, trackDirection, liftHillAndAlternativeState, trackPos); gMapSelectArrowDirection = _currentTrackPieceDirection; break; } @@ -3424,7 +3456,7 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) } } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); MapInvalidateMapSelectionTiles(); } @@ -3432,17 +3464,17 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords) * * rct2: 0x006CD354 */ -void ride_construction_toolupdate_entrance_exit(const ScreenCoordsXY& screenCoords) +void RideConstructionToolupdateEntranceExit(const ScreenCoordsXY& screenCoords) { MapInvalidateSelectionRect(); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - CoordsXYZD entranceOrExitCoords = ride_get_entrance_or_exit_position_from_screen_position(screenCoords); + CoordsXYZD entranceOrExitCoords = RideGetEntranceOrExitPositionFromScreenPosition(screenCoords); if (gRideEntranceExitPlaceDirection == INVALID_DIRECTION) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); return; } gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -3459,13 +3491,13 @@ void ride_construction_toolupdate_entrance_exit(const ScreenCoordsXY& screenCoor if (!(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) || entranceOrExitCoords != gRideEntranceExitGhostPosition || stationNum != gRideEntranceExitGhostStationIndex) { - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride != nullptr) { _currentTrackPrice = RideEntranceExitPlaceGhost( - ride, entranceOrExitCoords, entranceOrExitCoords.direction, gRideEntranceExitPlaceType, stationNum); + *ride, entranceOrExitCoords, entranceOrExitCoords.direction, gRideEntranceExitPlaceType, stationNum); } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } @@ -3473,19 +3505,19 @@ void ride_construction_toolupdate_entrance_exit(const ScreenCoordsXY& screenCoor * * rct2: 0x006CCA73 */ -void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) +void RideConstructionTooldownConstruct(const ScreenCoordsXY& screenCoords) { const CursorState* state = ContextGetCursorState(); - rct_window* w; + WindowBase* w; MapInvalidateMapSelectionTiles(); - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); CoordsXYZ mapCoords{}; int32_t trackType, z, highestZ; - if (window_ride_construction_update_state(&trackType, nullptr, nullptr, nullptr, nullptr, nullptr)) + if (WindowRideConstructionUpdateState(&trackType, nullptr, nullptr, nullptr, nullptr, nullptr)) return; z = mapCoords.z; @@ -3519,16 +3551,16 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) if (z == 0) z = MapGetHighestZ(mapCoords); - tool_cancel(); + ToolCancel(); - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride == nullptr) return; if (_trackPlaceZ == 0) { const auto& ted = GetTrackElementDescriptor(_currentTrackPieceType); - const rct_preview_track* trackBlock = ted.Block; + const PreviewTrack* trackBlock = ted.Block; int32_t bx = 0; do { @@ -3551,7 +3583,8 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) // search for z value to build at, up to max ride height int numAttempts = (z <= MAX_TRACK_HEIGHT ? ((MAX_TRACK_HEIGHT - z) / COORDS_Z_STEP + 1) : 2); - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { for (int32_t zAttempts = 0; zAttempts < numAttempts; ++zAttempts) { @@ -3562,7 +3595,7 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) _currentTrackSelectionFlags = 0; auto intent = Intent(INTENT_ACTION_UPDATE_MAZE_CONSTRUCTION); ContextBroadcastIntent(&intent); - w = window_find_by_class(WindowClass::RideConstruction); + w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr) break; @@ -3578,7 +3611,7 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) } else { - _trackPlaceCost = MONEY32_UNDEFINED; + _trackPlaceCost = MONEY64_UNDEFINED; _trackPlaceErrorMessage = std::get(mazeSetTrackResult.ErrorMessage); } @@ -3595,11 +3628,11 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) || zAttempts == (numAttempts - 1) || z < 0) { OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::Error, 0, state->position.x); - w = window_find_by_class(WindowClass::RideConstruction); + w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr) { - tool_set(*w, WIDX_CONSTRUCT, Tool::Crosshair); - input_set_flag(INPUT_FLAG_6, true); + ToolSet(*w, WIDX_CONSTRUCT, Tool::Crosshair); + InputSetFlag(INPUT_FLAG_6, true); _trackPlaceCtrlState = false; _trackPlaceShiftState = false; } @@ -3611,7 +3644,7 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) } else { - window_close_by_class(WindowClass::Error); + WindowCloseByClass(WindowClass::Error); OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, _currentTrackBegin); break; } @@ -3626,16 +3659,16 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) _currentTrackBegin.y = mapCoords.y; _currentTrackBegin.z = z; _currentTrackSelectionFlags = 0; - window_ride_construction_update_active_elements(); - w = window_find_by_class(WindowClass::RideConstruction); + WindowRideConstructionUpdateActiveElements(); + w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr) break; gDisableErrorWindowSound = true; - window_event_mouse_up_call(w, WIDX_CONSTRUCT); + WindowEventMouseUpCall(w, WIDX_CONSTRUCT); gDisableErrorWindowSound = false; - if (_trackPlaceCost == MONEY32_UNDEFINED) + if (_trackPlaceCost == MONEY64_UNDEFINED) { StringId errorText = _trackPlaceErrorMessage; z -= 8; @@ -3654,7 +3687,7 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) int32_t saveCurrentTrackAlternative = _currentTrackAlternative; int32_t saveCurrentTrackLiftHill = _currentTrackLiftHill; - ride_initialise_construction_window(ride); + RideInitialiseConstructionWindow(*ride); _currentTrackPieceDirection = saveTrackDirection; _currentTrackCurve = saveCurrentTrackCurve; @@ -3678,9 +3711,9 @@ void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords) } } -void window_ride_construction_keyboard_shortcut_turn_left() +void WindowRideConstructionKeyboardShortcutTurnLeft() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty) { return; @@ -3692,20 +3725,20 @@ void window_ride_construction_keyboard_shortcut_turn_left() if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } break; case TRACK_CURVE_LEFT: if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3715,19 +3748,19 @@ void window_ride_construction_keyboard_shortcut_turn_left() case TRACK_CURVE_LEFT_LARGE: if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3738,23 +3771,23 @@ void window_ride_construction_keyboard_shortcut_turn_left() if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3764,29 +3797,29 @@ void window_ride_construction_keyboard_shortcut_turn_left() case TRACK_CURVE_RIGHT_LARGE: if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3797,33 +3830,33 @@ void window_ride_construction_keyboard_shortcut_turn_left() if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3833,39 +3866,39 @@ void window_ride_construction_keyboard_shortcut_turn_left() case TRACK_CURVE_RIGHT_SMALL: if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3876,43 +3909,43 @@ void window_ride_construction_keyboard_shortcut_turn_left() if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_VERY_SMALL) && w->widgets[WIDX_LEFT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_VERY_SMALL); } else { @@ -3924,9 +3957,9 @@ void window_ride_construction_keyboard_shortcut_turn_left() } } -void window_ride_construction_keyboard_shortcut_turn_right() +void WindowRideConstructionKeyboardShortcutTurnRight() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty) { return; @@ -3938,20 +3971,20 @@ void window_ride_construction_keyboard_shortcut_turn_right() if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } break; case TRACK_CURVE_RIGHT: if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -3961,19 +3994,19 @@ void window_ride_construction_keyboard_shortcut_turn_right() case TRACK_CURVE_RIGHT_LARGE: if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -3984,23 +4017,23 @@ void window_ride_construction_keyboard_shortcut_turn_right() if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -4010,29 +4043,29 @@ void window_ride_construction_keyboard_shortcut_turn_right() case TRACK_CURVE_LEFT_LARGE: if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -4043,33 +4076,33 @@ void window_ride_construction_keyboard_shortcut_turn_right() if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -4079,39 +4112,39 @@ void window_ride_construction_keyboard_shortcut_turn_right() case TRACK_CURVE_LEFT_SMALL: if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -4122,43 +4155,43 @@ void window_ride_construction_keyboard_shortcut_turn_right() if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE_SMALL) && w->widgets[WIDX_LEFT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_SMALL); } else if (!WidgetIsDisabled(*w, WIDX_LEFT_CURVE) && w->widgets[WIDX_LEFT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_LEFT_CURVE_LARGE) && w->widgets[WIDX_LEFT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEFT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_LEFT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_LARGE) && w->widgets[WIDX_RIGHT_CURVE_LARGE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_LARGE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_LARGE); } else if (!WidgetIsDisabled(*w, WIDX_RIGHT_CURVE) && w->widgets[WIDX_RIGHT_CURVE].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_SMALL) && w->widgets[WIDX_RIGHT_CURVE_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_SMALL); } else if ( !WidgetIsDisabled(*w, WIDX_RIGHT_CURVE_VERY_SMALL) && w->widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_RIGHT_CURVE_VERY_SMALL); + WindowEventMouseDownCall(w, WIDX_RIGHT_CURVE_VERY_SMALL); } else { @@ -4170,9 +4203,9 @@ void window_ride_construction_keyboard_shortcut_turn_right() } } -void window_ride_construction_keyboard_shortcut_use_track_default() +void WindowRideConstructionKeyboardShortcutUseTrackDefault() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty) { return; @@ -4180,29 +4213,29 @@ void window_ride_construction_keyboard_shortcut_use_track_default() if (!WidgetIsDisabled(*w, WIDX_STRAIGHT) && w->widgets[WIDX_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_STRAIGHT); } if (!WidgetIsDisabled(*w, WIDX_LEVEL) && w->widgets[WIDX_LEVEL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEVEL); + WindowEventMouseDownCall(w, WIDX_LEVEL); } if (!WidgetIsDisabled(*w, WIDX_CHAIN_LIFT) && w->widgets[WIDX_CHAIN_LIFT].type != WindowWidgetType::Empty && _currentTrackLiftHill & CONSTRUCTION_LIFT_HILL_SELECTED) { - window_event_mouse_down_call(w, WIDX_CHAIN_LIFT); + WindowEventMouseDownCall(w, WIDX_CHAIN_LIFT); } if (!WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT) && w->widgets[WIDX_BANK_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_BANK_STRAIGHT); } } -void window_ride_construction_keyboard_shortcut_slope_down() +void WindowRideConstructionKeyboardShortcutSlopeDown() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty) { return; @@ -4212,27 +4245,27 @@ void window_ride_construction_keyboard_shortcut_slope_down() { case TRACK_SLOPE_DOWN_60: if (IsTrackEnabled(TRACK_SLOPE_VERTICAL) && !WidgetIsDisabled(*w, WIDX_SLOPE_UP_STEEP) - && w->widgets[WIDX_SLOPE_UP_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP + && w->widgets[WIDX_SLOPE_UP_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP && w->widgets[WIDX_SLOPE_UP_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP_STEEP); } break; case TRACK_SLOPE_DOWN_25: if (!WidgetIsDisabled(*w, WIDX_SLOPE_DOWN_STEEP) && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN_STEEP); } break; case TRACK_SLOPE_NONE: if (!WidgetIsDisabled(*w, WIDX_SLOPE_DOWN) && w->widgets[WIDX_SLOPE_DOWN].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN); } else if ( IsTrackEnabled(TRACK_SLOPE_VERTICAL) - && w->widgets[WIDX_SLOPE_DOWN_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE) + && w->widgets[WIDX_SLOPE_DOWN_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE) { return; } @@ -4240,7 +4273,7 @@ void window_ride_construction_keyboard_shortcut_slope_down() !WidgetIsDisabled(*w, WIDX_SLOPE_DOWN_STEEP) && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN_STEEP); } else { @@ -4250,17 +4283,17 @@ void window_ride_construction_keyboard_shortcut_slope_down() case TRACK_SLOPE_UP_25: if (!WidgetIsDisabled(*w, WIDX_LEVEL) && w->widgets[WIDX_LEVEL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEVEL); + WindowEventMouseDownCall(w, WIDX_LEVEL); } else if (!WidgetIsDisabled(*w, WIDX_SLOPE_DOWN) && w->widgets[WIDX_SLOPE_DOWN].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN); } else if ( !WidgetIsDisabled(*w, WIDX_SLOPE_DOWN_STEEP) && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN_STEEP); } else { @@ -4270,19 +4303,19 @@ void window_ride_construction_keyboard_shortcut_slope_down() case TRACK_SLOPE_UP_60: if (!WidgetIsDisabled(*w, WIDX_SLOPE_UP) && w->widgets[WIDX_SLOPE_UP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP); } else if (!WidgetIsDisabled(*w, WIDX_LEVEL) && w->widgets[WIDX_LEVEL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEVEL); + WindowEventMouseDownCall(w, WIDX_LEVEL); } else if (!WidgetIsDisabled(*w, WIDX_SLOPE_DOWN) && w->widgets[WIDX_SLOPE_DOWN].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN); } else if ( IsTrackEnabled(TRACK_SLOPE_VERTICAL) - && w->widgets[WIDX_SLOPE_DOWN_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE) + && w->widgets[WIDX_SLOPE_DOWN_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE) { return; } @@ -4290,7 +4323,7 @@ void window_ride_construction_keyboard_shortcut_slope_down() !WidgetIsDisabled(*w, WIDX_SLOPE_DOWN_STEEP) && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN_STEEP); } else { @@ -4299,10 +4332,10 @@ void window_ride_construction_keyboard_shortcut_slope_down() break; case TRACK_SLOPE_UP_90: if (IsTrackEnabled(TRACK_SLOPE_VERTICAL) && !WidgetIsDisabled(*w, WIDX_SLOPE_UP_STEEP) - && w->widgets[WIDX_SLOPE_DOWN_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE + && w->widgets[WIDX_SLOPE_DOWN_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP_STEEP); } break; default: @@ -4310,9 +4343,9 @@ void window_ride_construction_keyboard_shortcut_slope_down() } } -void window_ride_construction_keyboard_shortcut_slope_up() +void WindowRideConstructionKeyboardShortcutSlopeUp() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty) { return; @@ -4322,33 +4355,33 @@ void window_ride_construction_keyboard_shortcut_slope_up() { case TRACK_SLOPE_UP_60: if (IsTrackEnabled(TRACK_SLOPE_VERTICAL) && !WidgetIsDisabled(*w, WIDX_SLOPE_DOWN_STEEP) - && w->widgets[WIDX_SLOPE_DOWN_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE + && w->widgets[WIDX_SLOPE_DOWN_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_RISE && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN_STEEP); } break; case TRACK_SLOPE_UP_25: if (!WidgetIsDisabled(*w, WIDX_SLOPE_UP_STEEP) && w->widgets[WIDX_SLOPE_UP_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP_STEEP); } break; case TRACK_SLOPE_NONE: if (!WidgetIsDisabled(*w, WIDX_SLOPE_UP) && w->widgets[WIDX_SLOPE_UP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP); } else if ( IsTrackEnabled(TRACK_SLOPE_VERTICAL) - && w->widgets[WIDX_SLOPE_UP_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP) + && w->widgets[WIDX_SLOPE_UP_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP) { return; } else if ( !WidgetIsDisabled(*w, WIDX_SLOPE_UP_STEEP) && w->widgets[WIDX_SLOPE_UP_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP_STEEP); } else { @@ -4358,16 +4391,16 @@ void window_ride_construction_keyboard_shortcut_slope_up() case TRACK_SLOPE_DOWN_25: if (!WidgetIsDisabled(*w, WIDX_LEVEL) && w->widgets[WIDX_LEVEL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEVEL); + WindowEventMouseDownCall(w, WIDX_LEVEL); } else if (!WidgetIsDisabled(*w, WIDX_SLOPE_UP) && w->widgets[WIDX_SLOPE_UP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP); } else if ( !WidgetIsDisabled(*w, WIDX_SLOPE_UP_STEEP) && w->widgets[WIDX_SLOPE_UP_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP_STEEP); } else { @@ -4377,26 +4410,26 @@ void window_ride_construction_keyboard_shortcut_slope_up() case TRACK_SLOPE_DOWN_60: if (!WidgetIsDisabled(*w, WIDX_SLOPE_DOWN) && w->widgets[WIDX_SLOPE_DOWN].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN); } else if (!WidgetIsDisabled(*w, WIDX_LEVEL) && w->widgets[WIDX_LEVEL].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_LEVEL); + WindowEventMouseDownCall(w, WIDX_LEVEL); } else if (!WidgetIsDisabled(*w, WIDX_SLOPE_UP) && w->widgets[WIDX_SLOPE_UP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP); } else if ( IsTrackEnabled(TRACK_SLOPE_VERTICAL) - && w->widgets[WIDX_SLOPE_UP_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP) + && w->widgets[WIDX_SLOPE_UP_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP) { return; } else if ( !WidgetIsDisabled(*w, WIDX_SLOPE_UP_STEEP) && w->widgets[WIDX_SLOPE_UP_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_UP_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_UP_STEEP); } else { @@ -4405,10 +4438,10 @@ void window_ride_construction_keyboard_shortcut_slope_up() break; case TRACK_SLOPE_DOWN_90: if (IsTrackEnabled(TRACK_SLOPE_VERTICAL) && !WidgetIsDisabled(*w, WIDX_SLOPE_DOWN_STEEP) - && w->widgets[WIDX_SLOPE_UP_STEEP].image == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP + && w->widgets[WIDX_SLOPE_UP_STEEP].image.GetIndex() == SPR_RIDE_CONSTRUCTION_VERTICAL_DROP && w->widgets[WIDX_SLOPE_DOWN_STEEP].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_SLOPE_DOWN_STEEP); + WindowEventMouseDownCall(w, WIDX_SLOPE_DOWN_STEEP); } break; default: @@ -4416,20 +4449,20 @@ void window_ride_construction_keyboard_shortcut_slope_up() } } -void window_ride_construction_keyboard_shortcut_chain_lift_toggle() +void WindowRideConstructionKeyboardShortcutChainLiftToggle() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_CHAIN_LIFT) || w->widgets[WIDX_CHAIN_LIFT].type == WindowWidgetType::Empty) { return; } - window_event_mouse_down_call(w, WIDX_CHAIN_LIFT); + WindowEventMouseDownCall(w, WIDX_CHAIN_LIFT); } -void window_ride_construction_keyboard_shortcut_bank_left() +void WindowRideConstructionKeyboardShortcutBankLeft() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT) || w->widgets[WIDX_BANK_STRAIGHT].type == WindowWidgetType::Empty) { @@ -4441,17 +4474,17 @@ void window_ride_construction_keyboard_shortcut_bank_left() case TRACK_BANK_NONE: if (!WidgetIsDisabled(*w, WIDX_BANK_LEFT) && w->widgets[WIDX_BANK_LEFT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_LEFT); + WindowEventMouseDownCall(w, WIDX_BANK_LEFT); } break; case TRACK_BANK_RIGHT: if (!WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT) && w->widgets[WIDX_BANK_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_BANK_STRAIGHT); } else if (!WidgetIsDisabled(*w, WIDX_BANK_LEFT) && w->widgets[WIDX_BANK_LEFT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_LEFT); + WindowEventMouseDownCall(w, WIDX_BANK_LEFT); } else { @@ -4463,9 +4496,9 @@ void window_ride_construction_keyboard_shortcut_bank_left() } } -void window_ride_construction_keyboard_shortcut_bank_right() +void WindowRideConstructionKeyboardShortcutBankRight() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT) || w->widgets[WIDX_BANK_STRAIGHT].type == WindowWidgetType::Empty) { @@ -4477,17 +4510,17 @@ void window_ride_construction_keyboard_shortcut_bank_right() case TRACK_BANK_NONE: if (!WidgetIsDisabled(*w, WIDX_BANK_RIGHT) && w->widgets[WIDX_BANK_RIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_RIGHT); + WindowEventMouseDownCall(w, WIDX_BANK_RIGHT); } break; case TRACK_BANK_LEFT: if (!WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT) && w->widgets[WIDX_BANK_STRAIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_STRAIGHT); + WindowEventMouseDownCall(w, WIDX_BANK_STRAIGHT); } else if (!WidgetIsDisabled(*w, WIDX_BANK_RIGHT) && w->widgets[WIDX_BANK_RIGHT].type != WindowWidgetType::Empty) { - window_event_mouse_down_call(w, WIDX_BANK_RIGHT); + WindowEventMouseDownCall(w, WIDX_BANK_RIGHT); } else { @@ -4499,57 +4532,57 @@ void window_ride_construction_keyboard_shortcut_bank_right() } } -void window_ride_construction_keyboard_shortcut_previous_track() +void WindowRideConstructionKeyboardShortcutPreviousTrack() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_PREVIOUS_SECTION) || w->widgets[WIDX_PREVIOUS_SECTION].type == WindowWidgetType::Empty) { return; } - window_event_mouse_up_call(w, WIDX_PREVIOUS_SECTION); + WindowEventMouseUpCall(w, WIDX_PREVIOUS_SECTION); } -void window_ride_construction_keyboard_shortcut_next_track() +void WindowRideConstructionKeyboardShortcutNextTrack() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_NEXT_SECTION) || w->widgets[WIDX_NEXT_SECTION].type == WindowWidgetType::Empty) { return; } - window_event_mouse_up_call(w, WIDX_NEXT_SECTION); + WindowEventMouseUpCall(w, WIDX_NEXT_SECTION); } -void window_ride_construction_keyboard_shortcut_build_current() +void WindowRideConstructionKeyboardShortcutBuildCurrent() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_CONSTRUCT) || w->widgets[WIDX_CONSTRUCT].type == WindowWidgetType::Empty) { return; } - window_event_mouse_up_call(w, WIDX_CONSTRUCT); + WindowEventMouseUpCall(w, WIDX_CONSTRUCT); } -void window_ride_construction_keyboard_shortcut_demolish_current() +void WindowRideConstructionKeyboardShortcutDemolishCurrent() { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w == nullptr || WidgetIsDisabled(*w, WIDX_DEMOLISH) || w->widgets[WIDX_DEMOLISH].type == WindowWidgetType::Empty) { return; } - window_event_mouse_up_call(w, WIDX_DEMOLISH); + WindowEventMouseUpCall(w, WIDX_DEMOLISH); } -static void window_ride_construction_mouseup_demolish_next_piece(const CoordsXYZD& piecePos, int32_t type) +static void WindowRideConstructionMouseUpDemolishNextPiece(const CoordsXYZD& piecePos, int32_t type) { if (_gotoStartPlacementMode) { - _currentTrackBegin.z = floor2(piecePos.z, COORDS_Z_STEP); + _currentTrackBegin.z = Floor2(piecePos.z, COORDS_Z_STEP); _rideConstructionState = RideConstructionState::Front; _currentTrackSelectionFlags = 0; _currentTrackPieceDirection = piecePos.direction & 3; @@ -4560,12 +4593,12 @@ static void window_ride_construction_mouseup_demolish_next_piece(const CoordsXYZ int32_t savedCurrentTrackBankEnd = _currentTrackBankEnd; int32_t savedCurrentTrackAlternative = _currentTrackAlternative; int32_t savedCurrentTrackLiftHill = _currentTrackLiftHill; - ride_construction_set_default_next_piece(); - window_ride_construction_update_active_elements(); - auto ride = get_ride(_currentRideIndex); - if (!ride_try_get_origin_element(ride, nullptr)) + RideConstructionSetDefaultNextPiece(); + WindowRideConstructionUpdateActiveElements(); + auto ride = GetRide(_currentRideIndex); + if (!RideTryGetOriginElement(*ride, nullptr)) { - ride_initialise_construction_window(ride); + RideInitialiseConstructionWindow(*ride); _currentTrackPieceDirection = piecePos.direction & 3; if (!(savedCurrentTrackCurve & RideConstructionSpecialPieceSelected)) { @@ -4576,7 +4609,7 @@ static void window_ride_construction_mouseup_demolish_next_piece(const CoordsXYZ _currentTrackBankEnd = savedCurrentTrackBankEnd; _currentTrackAlternative = savedCurrentTrackAlternative; _currentTrackLiftHill = savedCurrentTrackLiftHill; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } } @@ -4597,7 +4630,7 @@ static void window_ride_construction_mouseup_demolish_next_piece(const CoordsXYZ type = TrackElemType::BeginStation; } } - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) { // rideConstructionState needs to be set again to the proper value, this only affects the client _rideConstructionState = RideConstructionState::Selected; @@ -4608,12 +4641,12 @@ static void window_ride_construction_mouseup_demolish_next_piece(const CoordsXYZ _currentTrackSelectionFlags = 0; if (_rideConstructionState2 == RideConstructionState::Front) { - ride_select_next_section(); + RideSelectNextSection(); } else if (_rideConstructionState2 == RideConstructionState::Back) { - ride_select_previous_section(); + RideSelectPreviousSection(); } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index b40fc4778c..5e220cbf07 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,10 +60,10 @@ enum WindowRideListWidgetIdx }; // clang-format off -static rct_widget window_ride_list_widgets[] = { +static Widget window_ride_list_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, {340, 197}, WindowWidgetType::Resize, WindowColour::Secondary ), // tab page background - MakeWidget({315, 60}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_TOGGLE_OPEN_CLOSE, STR_OPEN_OR_CLOSE_ALL_RIDES ), // open / close all toggle + MakeWidget({315, 60}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_TOGGLE_OPEN_CLOSE), STR_OPEN_OR_CLOSE_ALL_RIDES ), // open / close all toggle MakeWidget({150, 46}, {124, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // current information type MakeWidget({262, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_RIDE_LIST_INFORMATION_TYPE_TIP), // information type dropdown button MakeWidget({280, 46}, { 54, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_SORT, STR_RIDE_LIST_SORT_TIP ), // sort button @@ -71,9 +71,9 @@ static rct_widget window_ride_list_widgets[] = { MakeTab ({ 34, 17}, STR_LIST_SHOPS_AND_STALLS_TIP ), // tab 2 MakeTab ({ 65, 17}, STR_LIST_KIOSKS_AND_FACILITIES_TIP), // tab 3 MakeWidget({ 3, 60}, {334, 177}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ), // list - MakeWidget({320, 62}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_CLOSE_BUTTON_0 ), - MakeWidget({320, 76}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_G2_RCT1_OPEN_BUTTON_0 ), - MakeWidget({315, 90}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_QUICK_DEMOLISH_RIDE ), + MakeWidget({320, 62}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_CLOSE_BUTTON_0) ), + MakeWidget({320, 76}, { 14, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_G2_RCT1_OPEN_BUTTON_0) ), + MakeWidget({315, 90}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_QUICK_DEMOLISH_RIDE ), WIDGETS_END, }; // clang-format on @@ -217,7 +217,7 @@ public: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_SORT: list_information_type = _windowRideListInformationType; @@ -246,7 +246,7 @@ public: OpenAllRides(); break; case WIDX_QUICK_DEMOLISH: - if (network_get_mode() != NETWORK_MODE_CLIENT) + if (NetworkGetMode() != NETWORK_MODE_CLIENT) { _quickDemolishMode = !_quickDemolishMode; } @@ -360,7 +360,7 @@ public: void OnUpdate() override { frame_no = (frame_no + 1) % 64; - widget_invalidate(*this, WIDX_TAB_1 + page); + WidgetInvalidate(*this, WIDX_TAB_1 + page); if (_windowRideListInformationType != INFORMATION_TYPE_STATUS) Invalidate(); } @@ -402,7 +402,7 @@ public: // Open ride window const auto rideIndex = _rideList[index]; - if (_quickDemolishMode && network_get_mode() != NETWORK_MODE_CLIENT) + if (_quickDemolishMode && NetworkGetMode() != NETWORK_MODE_CLIENT) { auto gameAction = RideDemolishAction(rideIndex, RIDE_MODIFY_DEMOLISH); GameActions::Execute(&gameAction); @@ -411,7 +411,7 @@ public: else { auto intent = Intent(WindowClass::Ride); - intent.putExtra(INTENT_EXTRA_RIDE_ID, rideIndex.ToUnderlying()); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, rideIndex.ToUnderlying()); ContextOpenIntent(&intent); } } @@ -483,10 +483,12 @@ public: }); } - widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (allClosed ? 1 : 0) * 2 - + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT); - widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + (allOpen ? 1 : 0) * 2 + const auto closeLightImage( + SPR_G2_RCT1_CLOSE_BUTTON_0 + (allClosed ? 1 : 0) * 2 + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT)); + widgets[WIDX_CLOSE_LIGHT].image = ImageId(closeLightImage); + const auto openLightImage = SPR_G2_RCT1_OPEN_BUTTON_0 + (allOpen ? 1 : 0) * 2 + WidgetIsPressed(*this, WIDX_OPEN_LIGHT); + widgets[WIDX_OPEN_LIGHT].image = ImageId(openLightImage); widgets[WIDX_QUICK_DEMOLISH].top = widgets[WIDX_OPEN_LIGHT].bottom + 3; } else @@ -497,15 +499,15 @@ public: widgets[WIDX_QUICK_DEMOLISH].top = widgets[WIDX_OPEN_CLOSE_ALL].bottom + 3; } widgets[WIDX_QUICK_DEMOLISH].bottom = widgets[WIDX_QUICK_DEMOLISH].top + 23; - widgets[WIDX_QUICK_DEMOLISH].type = network_get_mode() != NETWORK_MODE_CLIENT ? WindowWidgetType::FlatBtn - : WindowWidgetType::Empty; + widgets[WIDX_QUICK_DEMOLISH].type = NetworkGetMode() != NETWORK_MODE_CLIENT ? WindowWidgetType::FlatBtn + : WindowWidgetType::Empty; } /** * * rct2: 0x006B3235 */ - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); DrawTabImages(&dpi); @@ -514,18 +516,17 @@ public: auto ft = Formatter(); ft.Add(static_cast(_rideList.size())); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_LIST].bottom + 2 }, ride_list_statusbar_count_strings[page], ft); + dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_LIST].bottom + 2 }, ride_list_statusbar_count_strings[page], ft); } /** * * rct2: 0x006B3240 */ - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; - gfx_fill_rect( - &dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width, dpi.height } }, ColourMapA[colours[1]].mid_light); + GfxFillRect(&dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width, dpi.height } }, ColourMapA[colours[1]].mid_light); auto y = 0; for (size_t i = 0; i < _rideList.size(); i++) @@ -534,19 +535,19 @@ public: if (i == static_cast(selected_list_item)) { // Background highlight - gfx_filter_rect(&dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1 }, FilterPaletteID::PaletteDarken1); format = (_quickDemolishMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID); } // Get ride - const auto* ridePtr = get_ride(_rideList[i]); + const auto* ridePtr = GetRide(_rideList[i]); if (ridePtr == nullptr) continue; // Ride name auto ft = Formatter(); ridePtr->FormatNameTo(ft); - DrawTextEllipsised(&dpi, { 0, y - 1 }, 159, format, ft); + DrawTextEllipsised(dpi, { 0, y - 1 }, 159, format, ft); // Ride information ft = Formatter(); @@ -605,11 +606,11 @@ public: break; case INFORMATION_TYPE_CUSTOMERS: formatSecondary = STR_RIDE_LIST_CUSTOMERS_PER_HOUR_LABEL; - ft.Add(ride_customers_per_hour(ridePtr)); + ft.Add(RideCustomersPerHour(*ridePtr)); break; case INFORMATION_TYPE_AGE: { - const auto age = date_get_year(ridePtr->GetAge()); + const auto age = DateGetYear(ridePtr->GetAge()); switch (age) { case 0: @@ -635,7 +636,7 @@ public: break; case INFORMATION_TYPE_RUNNING_COST: formatSecondary = STR_RIDE_LIST_RUNNING_COST_UNKNOWN; - if (ridePtr->upkeep_cost != MONEY16_UNDEFINED) + if (ridePtr->upkeep_cost != MONEY64_UNDEFINED) { formatSecondary = STR_RIDE_LIST_RUNNING_COST_LABEL; ft.Add(ridePtr->upkeep_cost * 16); @@ -694,7 +695,7 @@ public: break; case INFORMATION_TYPE_EXCITEMENT: formatSecondary = STR_RATING_UKNOWN_LABEL; - if (ride_has_ratings(ridePtr)) + if (RideHasRatings(*ridePtr)) { formatSecondary = STR_EXCITEMENT_LABEL; ft.Add(ridePtr->excitement); @@ -702,7 +703,7 @@ public: break; case INFORMATION_TYPE_INTENSITY: formatSecondary = STR_RATING_UKNOWN_LABEL; - if (ride_has_ratings(ridePtr)) + if (RideHasRatings(*ridePtr)) { formatSecondary = STR_INTENSITY_LABEL; ft.Add(ridePtr->intensity); @@ -710,7 +711,7 @@ public: break; case INFORMATION_TYPE_NAUSEA: formatSecondary = STR_RATING_UKNOWN_LABEL; - if (ride_has_ratings(ridePtr)) + if (RideHasRatings(*ridePtr)) { formatSecondary = STR_NAUSEA_LABEL; ft.Add(ridePtr->nausea); @@ -723,7 +724,7 @@ public: ft.Rewind(); ft.Add(formatSecondary); } - DrawTextEllipsised(&dpi, { 160, y - 1 }, 157, format, ft); + DrawTextEllipsised(dpi, { 160, y - 1 }, 157, format, ft); y += SCROLLABLE_ROW_HEIGHT; } } @@ -738,7 +739,7 @@ private: * * rct2: 0x006B38EA */ - void DrawTabImages(rct_drawpixelinfo* dpi) + void DrawTabImages(DrawPixelInfo* dpi) { int32_t sprite_idx; @@ -746,21 +747,21 @@ private: sprite_idx = SPR_TAB_RIDE_0; if (page == PAGE_RIDES) sprite_idx += frame_no / 4; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_1].left, widgets[WIDX_TAB_1].top }); // Shops and stalls tab sprite_idx = SPR_TAB_SHOPS_AND_STALLS_0; if (page == PAGE_SHOPS_AND_STALLS) sprite_idx += frame_no / 4; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_2].left, widgets[WIDX_TAB_2].top }); // Information kiosks and facilities tab sprite_idx = SPR_TAB_KIOSKS_AND_FACILITIES_0; if (page == PAGE_KIOSKS_AND_FACILITIES) sprite_idx += (frame_no / 4) % 8; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_TAB_3].left, widgets[WIDX_TAB_3].top }); } @@ -772,7 +773,7 @@ private: { while (--currentListPosition >= 0) { - const auto* otherRide = get_ride(_rideList[currentListPosition]); + const auto* otherRide = GetRide(_rideList[currentListPosition]); if (otherRide != nullptr) { if (pred(thisRide, *otherRide)) @@ -794,7 +795,7 @@ private: for (auto& rideRef : GetRideManager()) { if (rideRef.GetClassification() != static_cast(page) - || (rideRef.status == RideStatus::Closed && !ride_has_any_track_elements(&rideRef))) + || (rideRef.status == RideStatus::Closed && !RideHasAnyTrackElements(rideRef))) continue; if (rideRef.window_invalidate_flags & RIDE_INVALIDATE_RIDE_LIST) @@ -809,7 +810,7 @@ private: case INFORMATION_TYPE_STATUS: currentListPosition = SortList( currentListPosition, rideRef, [](const Ride& thisRide, const Ride& otherRide) -> bool { - return 0 <= strlogicalcmp(thisRide.GetName().c_str(), otherRide.GetName().c_str()); + return 0 <= StrLogicalCmp(thisRide.GetName().c_str(), otherRide.GetName().c_str()); }); break; case INFORMATION_TYPE_POPULARITY: @@ -845,7 +846,7 @@ private: case INFORMATION_TYPE_CUSTOMERS: currentListPosition = SortList( currentListPosition, rideRef, [](const Ride& thisRide, const Ride& otherRide) -> bool { - return ride_customers_per_hour(&thisRide) <= ride_customers_per_hour(&otherRide); + return RideCustomersPerHour(thisRide) <= RideCustomersPerHour(otherRide); }); break; case INFORMATION_TYPE_AGE: @@ -953,10 +954,10 @@ private: * * rct2: 0x006B30BC */ -rct_window* WindowRideListOpen() +WindowBase* WindowRideListOpen() { // Check if window is already open - auto* window = window_bring_to_front_by_class(WindowClass::RideList); + auto* window = WindowBringToFrontByClass(WindowClass::RideList); if (window == nullptr) { window = WindowCreate(WindowClass::RideList, ScreenCoordsXY(32, 32), WW, WH, WF_10 | WF_RESIZABLE); @@ -964,7 +965,7 @@ rct_window* WindowRideListOpen() return window; } -void WindowRideListRefreshList(rct_window* w) +void WindowRideListRefreshList(WindowBase* w) { dynamic_cast(w)->RefreshListWrapper(); } diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index 2492be7fd7..61797f8cfc 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,7 +36,7 @@ enum WindowSavePromptWidgetIdx { WIDX_CANCEL }; -static rct_widget window_save_prompt_widgets[] = { +static Widget window_save_prompt_widgets[] = { WINDOW_SHIM_WHITE(STR_NONE, WW_SAVE, WH_SAVE), MakeWidget({ 2, 19}, {256, 12}, WindowWidgetType::LabelCentred, WindowColour::Primary, STR_EMPTY ), // question/label MakeWidget({ 8, 35}, { 78, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_SAVE_PROMPT_SAVE ), // save @@ -53,7 +53,7 @@ enum WindowQuitPromptWidgetIdx { WQIDX_CANCEL }; -static rct_widget window_quit_prompt_widgets[] = { +static Widget window_quit_prompt_widgets[] = { WINDOW_SHIM_WHITE(STR_QUIT_GAME_PROMPT_TITLE, WW_QUIT, WH_QUIT), MakeWidget({ 8, 19}, {78, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_OK ), // ok MakeWidget({91, 19}, {78, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_CANCEL), // cancel @@ -64,6 +64,7 @@ static constexpr const StringId window_save_prompt_labels[][2] = { { STR_LOAD_GAME_PROMPT_TITLE, STR_SAVE_BEFORE_LOADING }, { STR_QUIT_GAME_PROMPT_TITLE, STR_SAVE_BEFORE_QUITTING }, { STR_QUIT_GAME_2_PROMPT_TITLE, STR_SAVE_BEFORE_QUITTING_2 }, + { STR_NEW_GAME, STR_SAVE_BEFORE_QUITTING }, }; // clang-format on @@ -71,7 +72,7 @@ static void WindowSavePromptCallback(int32_t result, const utf8* path) { if (result == MODAL_RESULT_OK) { - game_load_or_quit_no_save_prompt(); + GameLoadOrQuitNoSavePrompt(); } } @@ -99,13 +100,13 @@ public: InitScrollWidgets(); // Pause the game if not network play. - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) { gGamePaused |= GAME_PAUSED_MODAL; OpenRCT2::Audio::StopAll(); } - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); StringId stringId = window_save_prompt_labels[EnumValue(_promptMode)][0]; if (stringId == STR_LOAD_GAME_PROMPT_TITLE && gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) @@ -123,13 +124,13 @@ public: void OnClose() override { // Unpause the game - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) { gGamePaused &= ~GAME_PAUSED_MODAL; OpenRCT2::Audio::Resume(); } - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); } void OnMouseUp(WidgetIndex widgetIndex) override @@ -139,7 +140,7 @@ public: switch (widgetIndex) { case WQIDX_OK: - game_load_or_quit_no_save_prompt(); + GameLoadOrQuitNoSavePrompt(); break; case WQIDX_CLOSE: case WQIDX_CANCEL: @@ -158,20 +159,20 @@ public: if (gScreenFlags & (SCREEN_FLAGS_EDITOR)) { intent = std::make_unique(WindowClass::Loadsave); - intent->putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); - intent->putExtra(INTENT_EXTRA_PATH, gScenarioName); + intent->PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); + intent->PutExtra(INTENT_EXTRA_PATH, gScenarioName); } else { - intent = create_save_game_as_intent(); + intent = CreateSaveGameAsIntent(); } Close(); - intent->putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(WindowSavePromptCallback)); + intent->PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(WindowSavePromptCallback)); ContextOpenIntent(intent.get()); break; } case WIDX_DONT_SAVE: - game_load_or_quit_no_save_prompt(); + GameLoadOrQuitNoSavePrompt(); return; case WIDX_CLOSE: case WIDX_CANCEL: @@ -180,13 +181,13 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } }; -rct_window* WindowSavePromptOpen() +WindowBase* WindowSavePromptOpen() { PromptMode prompt_mode = gSavePromptMode; if (prompt_mode == PromptMode::Quit) @@ -197,7 +198,7 @@ rct_window* WindowSavePromptOpen() // do not show save prompt if we're in the title demo and click on load game if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) { - game_load_or_quit_no_save_prompt(); + GameLoadOrQuitNoSavePrompt(); return nullptr; } @@ -209,23 +210,23 @@ rct_window* WindowSavePromptOpen() * and game_load_or_quit() are not called by the original binary anymore. */ - if (gScreenAge < 3840 && network_get_mode() == NETWORK_MODE_NONE) + if (gScreenAge < 3840 && NetworkGetMode() == NETWORK_MODE_NONE) { - game_load_or_quit_no_save_prompt(); + GameLoadOrQuitNoSavePrompt(); return nullptr; } } // Check if window is already open - rct_window* window = window_bring_to_front_by_class(WindowClass::SavePrompt); + WindowBase* window = WindowBringToFrontByClass(WindowClass::SavePrompt); if (window != nullptr) { - window_close(*window); + WindowClose(*window); } if (EnumValue(prompt_mode) >= std::size(window_save_prompt_labels)) { - log_warning("Invalid save prompt mode %u", prompt_mode); + LOG_WARNING("Invalid save prompt mode %u", prompt_mode); return nullptr; } diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index 64ecb49d6b..112b861958 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,7 @@ struct ScenarioListItem } heading; struct { - const scenario_index_entry * scenario; + const ScenarioIndexEntry * scenario; bool is_locked; } scenario; }; @@ -81,7 +82,7 @@ enum { WIDX_SCENARIOLIST }; -static rct_widget window_scenarioselect_widgets[] = { +static Widget window_scenarioselect_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget ({ TabWidth + 1, WidgetsStart }, { WW, 284}, WindowWidgetType::Resize, WindowColour::Secondary), // tab content panel MakeRemapWidget({ 3, TabsStart + (TabHeight * 0) }, { TabWidth, TabHeight}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_G2_SIDEWAYS_TAB), // tab 01 @@ -111,17 +112,17 @@ static constexpr const StringId ScenarioOriginStringIds[] = { STR_SCENARIO_CATEGORY_OTHER_PARKS, }; -static void WindowScenarioselectInitTabs(rct_window *w); +static void WindowScenarioselectInitTabs(WindowBase *w); -static void WindowScenarioselectClose(rct_window *w); -static void WindowScenarioselectMouseup(rct_window *w, WidgetIndex widgetIndex); -static void WindowScenarioselectMousedown(rct_window *w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowScenarioselectScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height); -static void WindowScenarioselectScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowScenarioselectScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowScenarioselectInvalidate(rct_window *w); -static void WindowScenarioselectPaint(rct_window *w, rct_drawpixelinfo *dpi); -static void WindowScenarioselectScrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex); +static void WindowScenarioselectClose(WindowBase *w); +static void WindowScenarioselectMouseup(WindowBase *w, WidgetIndex widgetIndex); +static void WindowScenarioselectMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget); +static void WindowScenarioselectScrollgetsize(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height); +static void WindowScenarioselectScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowScenarioselectScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowScenarioselectInvalidate(WindowBase *w); +static void WindowScenarioselectPaint(WindowBase *w, DrawPixelInfo *dpi); +static void WindowScenarioselectScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex); static bool ScenarioSelectUseSmallFont() { @@ -142,26 +143,25 @@ static WindowEventList window_scenarioselect_events([](auto& events) }); // clang-format on -static void DrawCategoryHeading( - rct_window* w, rct_drawpixelinfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId); -static void InitialiseListItems(rct_window* w); -static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenario); -static bool IsLockingEnabled(rct_window* w); +static void DrawCategoryHeading(WindowBase* w, DrawPixelInfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId); +static void InitialiseListItems(WindowBase* w); +static bool IsScenarioVisible(WindowBase* w, const ScenarioIndexEntry* scenario); +static bool IsLockingEnabled(WindowBase* w); static std::function _callback; static bool _showLockedInformation = false; static bool _titleEditor = false; static bool _disableLocking{}; -rct_window* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor) +WindowBase* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor) { if (_titleEditor != titleEditor) { _titleEditor = titleEditor; - window_close_by_class(WindowClass::ScenarioSelect); + WindowCloseByClass(WindowClass::ScenarioSelect); } - auto window = window_bring_to_front_by_class(WindowClass::ScenarioSelect); + auto window = WindowBringToFrontByClass(WindowClass::ScenarioSelect); if (window != nullptr) return window; @@ -173,15 +173,15 @@ rct_window* WindowScenarioselectOpen(scenarioselect_callback callback, bool titl * * rct2: 0x006781B5 */ -rct_window* WindowScenarioselectOpen(std::function callback, bool titleEditor, bool disableLocking) +WindowBase* WindowScenarioselectOpen(std::function callback, bool titleEditor, bool disableLocking) { - rct_window* window; + WindowBase* window; _callback = callback; _disableLocking = disableLocking; // Load scenario list - scenario_repository_scan(); + ScenarioRepositoryScan(); window = WindowCreateCentred( WW, WH, &window_scenarioselect_events, WindowClass::ScenarioSelect, WF_10 | (titleEditor ? WF_STICK_TO_FRONT : 0)); @@ -200,22 +200,22 @@ rct_window* WindowScenarioselectOpen(std::function callb * * rct2: 0x00677C8A */ -static void WindowScenarioselectInitTabs(rct_window* w) +static void WindowScenarioselectInitTabs(WindowBase* w) { int32_t showPages = 0; - size_t numScenarios = scenario_repository_get_count(); + size_t numScenarios = ScenarioRepositoryGetCount(); for (size_t i = 0; i < numScenarios; i++) { - const scenario_index_entry* scenario = scenario_repository_get_by_index(i); + const ScenarioIndexEntry* scenario = ScenarioRepositoryGetByIndex(i); if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor) { - if (_titleEditor && scenario->source_game == ScenarioSource::Other) + if (_titleEditor && scenario->SourceGame == ScenarioSource::Other) continue; - showPages |= 1 << static_cast(scenario->source_game); + showPages |= 1 << static_cast(scenario->SourceGame); } else { - int32_t category = scenario->category; + int32_t category = scenario->Category; if (category > SCENARIO_CATEGORY_OTHER) { category = SCENARIO_CATEGORY_OTHER; @@ -230,7 +230,7 @@ static void WindowScenarioselectInitTabs(rct_window* w) } else { - int32_t firstPage = bitscanforward(showPages); + int32_t firstPage = UtilBitScanForward(showPages); if (firstPage != -1) { w->selected_tab = firstPage; @@ -254,21 +254,21 @@ static void WindowScenarioselectInitTabs(rct_window* w) } } -static void WindowScenarioselectClose(rct_window* w) +static void WindowScenarioselectClose(WindowBase* w) { _listItems.clear(); _listItems.shrink_to_fit(); } -static void WindowScenarioselectMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowScenarioselectMouseup(WindowBase* w, WidgetIndex widgetIndex) { if (widgetIndex == WIDX_CLOSE) { - window_close(*w); + WindowClose(*w); } } -static void WindowScenarioselectMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) +static void WindowScenarioselectMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget) { if (widgetIndex >= WIDX_TAB1 && widgetIndex <= WIDX_TAB10) { @@ -278,8 +278,8 @@ static void WindowScenarioselectMousedown(rct_window* w, WidgetIndex widgetIndex ConfigSaveDefault(); InitialiseListItems(w); w->Invalidate(); - window_event_resize_call(w); - window_event_invalidate_call(w); + WindowEventResizeCall(w); + WindowEventInvalidateCall(w); WindowInitScrollWidgets(*w); w->Invalidate(); } @@ -291,15 +291,15 @@ static int32_t GetScenarioListItemSize() return 24; // Scenario title - int32_t lineHeight = font_get_line_height(FontStyle::Medium); + int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); // 'Completed by' line - lineHeight += font_get_line_height(FontStyle::Small); + lineHeight += FontGetLineHeight(FontStyle::Small); return lineHeight; } -static void WindowScenarioselectScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +static void WindowScenarioselectScrollgetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { const int32_t scenarioItemHeight = GetScenarioListItemSize(); @@ -323,7 +323,7 @@ static void WindowScenarioselectScrollgetsize(rct_window* w, int32_t scrollIndex * * rct2: 0x6780FE */ -static void WindowScenarioselectScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowScenarioselectScrollmousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { const int32_t scenarioItemHeight = GetScenarioListItemSize(); @@ -341,10 +341,10 @@ static void WindowScenarioselectScrollmousedown(rct_window* w, int32_t scrollInd { OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::Click1, 0, w->windowPos.x + (w->width / 2)); gFirstTimeSaving = true; - _callback(listItem.scenario.scenario->path); + _callback(listItem.scenario.scenario->Path); if (_titleEditor) { - window_close(*w); + WindowClose(*w); } } break; @@ -360,13 +360,13 @@ static void WindowScenarioselectScrollmousedown(rct_window* w, int32_t scrollInd * * rct2: 0x678162 */ -static void WindowScenarioselectScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowScenarioselectScrollmouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { const int32_t scenarioItemHeight = GetScenarioListItemSize(); bool originalShowLockedInformation = _showLockedInformation; _showLockedInformation = false; - const scenario_index_entry* selected = nullptr; + const ScenarioIndexEntry* selected = nullptr; auto mutableScreenCoords = screenCoords; for (const auto& listItem : _listItems) { @@ -407,7 +407,7 @@ static void WindowScenarioselectScrollmouseover(rct_window* w, int32_t scrollInd } } -static void WindowScenarioselectInvalidate(rct_window* w) +static void WindowScenarioselectInvalidate(WindowBase* w) { w->pressed_widgets &= ~( (1uLL << WIDX_CLOSE) | (1uLL << WIDX_TAB1) | (1uLL << WIDX_TAB2) | (1uLL << WIDX_TAB3) | (1uLL << WIDX_TAB4) @@ -423,10 +423,10 @@ static void WindowScenarioselectInvalidate(rct_window* w) window_scenarioselect_widgets[WIDX_SCENARIOLIST].bottom = w->height - bottomMargin; } -static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowScenarioselectPaint(WindowBase* w, DrawPixelInfo* dpi) { int32_t format; - const scenario_index_entry* scenario; + const ScenarioIndexEntry* scenario; WindowDrawWidgets(*w, dpi); @@ -436,7 +436,7 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) // Text for each tab for (uint32_t i = 0; i < std::size(ScenarioOriginStringIds); i++) { - rct_widget* widget = &window_scenarioselect_widgets[WIDX_TAB1 + i]; + Widget* widget = &window_scenarioselect_widgets[WIDX_TAB1 + i]; if (widget->type == WindowWidgetType::Empty) continue; @@ -451,7 +451,7 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) } ScreenCoordsXY stringCoords(widget->midX() + w->windowPos.x, widget->midY() + w->windowPos.y - 3); - DrawTextWrapped(dpi, stringCoords, 87, format, ft, { COLOUR_AQUAMARINE, fontStyle, TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, stringCoords, 87, format, ft, { COLOUR_AQUAMARINE, fontStyle, TextAlignment::CENTRE }); } // Return if no scenario highlighted @@ -465,8 +465,8 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) + ScreenCoordsXY{ window_scenarioselect_widgets[WIDX_SCENARIOLIST].right + 4, window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5 }; DrawTextEllipsised( - dpi, screenPos + ScreenCoordsXY{ 85, 0 }, 170, STR_SCENARIO_LOCKED, {}, { TextAlignment::CENTRE }); - DrawTextWrapped(dpi, screenPos + ScreenCoordsXY{ 0, 15 }, 170, STR_SCENARIO_LOCKED_DESC); + *dpi, screenPos + ScreenCoordsXY{ 85, 0 }, 170, STR_SCENARIO_LOCKED, {}, { TextAlignment::CENTRE }); + DrawTextWrapped(*dpi, screenPos + ScreenCoordsXY{ 0, 15 }, 170, STR_SCENARIO_LOCKED_DESC); } else { @@ -475,7 +475,7 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) + ScreenCoordsXY{ window_scenarioselect_widgets[WIDX_SCENARIOLIST].right + 4, window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5 }; - DrawTextWrapped(dpi, screenPos + ScreenCoordsXY{ 0, 15 }, 170, STR_SCENARIO_HOVER_HINT); + DrawTextWrapped(*dpi, screenPos + ScreenCoordsXY{ 0, 15 }, 170, STR_SCENARIO_HOVER_HINT); } return; } @@ -485,13 +485,13 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) { utf8 path[MAX_PATH]; - shorten_path(path, sizeof(path), scenario->path, w->width - 6 - TabWidth, FontStyle::Medium); + ShortenPath(path, sizeof(path), scenario->Path, w->width - 6 - TabWidth, FontStyle::Medium); const utf8* pathPtr = path; auto ft = Formatter(); ft.Add(pathPtr); DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ TabWidth + 3, w->height - 3 - 11 }, STR_STRING, ft, { w->colours[1] }); + *dpi, w->windowPos + ScreenCoordsXY{ TabWidth + 3, w->height - 3 - 11 }, STR_STRING, ft, { w->colours[1] }); } // Scenario name @@ -500,24 +500,24 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) window_scenarioselect_widgets[WIDX_TABCONTENT].top + 5 }; auto ft = Formatter(); ft.Add(STR_STRING); - ft.Add(scenario->name); + ft.Add(scenario->Name); DrawTextEllipsised( - dpi, screenPos + ScreenCoordsXY{ 85, 0 }, 170, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); + *dpi, screenPos + ScreenCoordsXY{ 85, 0 }, 170, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); screenPos.y += 15; // Scenario details ft = Formatter(); ft.Add(STR_STRING); - ft.Add(scenario->details); - screenPos.y += DrawTextWrapped(dpi, screenPos, 170, STR_BLACK_STRING, ft) + 5; + ft.Add(scenario->Details); + screenPos.y += DrawTextWrapped(*dpi, screenPos, 170, STR_BLACK_STRING, ft) + 5; // Scenario objective ft = Formatter(); - ft.Add(ObjectiveNames[scenario->objective_type]); - if (scenario->objective_type == OBJECTIVE_BUILD_THE_BEST) + ft.Add(ObjectiveNames[scenario->ObjectiveType]); + if (scenario->ObjectiveType == OBJECTIVE_BUILD_THE_BEST) { StringId rideTypeString = STR_NONE; - auto rideTypeId = scenario->objective_arg_3; + auto rideTypeId = scenario->ObjectiveArg3; if (rideTypeId != RIDE_TYPE_NULL && rideTypeId < RIDE_TYPE_COUNT) { rideTypeString = GetRideTypeDescriptor(rideTypeId).Naming.Name; @@ -526,36 +526,36 @@ static void WindowScenarioselectPaint(rct_window* w, rct_drawpixelinfo* dpi) } else { - ft.Add(scenario->objective_arg_3); - ft.Add(date_get_total_months(MONTH_OCTOBER, scenario->objective_arg_1)); - if (scenario->objective_type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) - ft.Add(scenario->objective_arg_2); + ft.Add(scenario->ObjectiveArg3); + ft.Add(DateGetTotalMonths(MONTH_OCTOBER, scenario->ObjectiveArg1)); + if (scenario->ObjectiveType == OBJECTIVE_FINISH_5_ROLLERCOASTERS) + ft.Add(scenario->ObjectiveArg2); else - ft.Add(scenario->objective_arg_2); + ft.Add(scenario->ObjectiveArg2); } - screenPos.y += DrawTextWrapped(dpi, screenPos, 170, STR_OBJECTIVE, ft) + 5; + screenPos.y += DrawTextWrapped(*dpi, screenPos, 170, STR_OBJECTIVE, ft) + 5; // Scenario score - if (scenario->highscore != nullptr) + if (scenario->Highscore != nullptr) { // TODO: Should probably be translatable - const utf8* completedByName = "???"; - if (!str_is_null_or_empty(scenario->highscore->name)) + u8string completedByName = "???"; + if (!scenario->Highscore->name.empty()) { - completedByName = scenario->highscore->name; + completedByName = scenario->Highscore->name; } ft = Formatter(); ft.Add(STR_STRING); - ft.Add(completedByName); - ft.Add(scenario->highscore->company_value); - screenPos.y += DrawTextWrapped(dpi, screenPos, 170, STR_COMPLETED_BY_WITH_COMPANY_VALUE, ft); + ft.Add(completedByName.c_str()); + ft.Add(scenario->Highscore->company_value); + screenPos.y += DrawTextWrapped(*dpi, screenPos, 170, STR_COMPLETED_BY_WITH_COMPANY_VALUE, ft); } } -static void WindowScenarioselectScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowScenarioselectScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light; - gfx_clear(dpi, paletteIndex); + 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; @@ -566,7 +566,7 @@ static void WindowScenarioselectScrollpaint(rct_window* w, rct_drawpixelinfo* dp const int32_t scenarioItemHeight = GetScenarioListItemSize(); // Scenario title - int32_t scenarioTitleHeight = font_get_line_height(FontStyle::Medium); + int32_t scenarioTitleHeight = FontGetLineHeight(FontStyle::Medium); int32_t y = 0; for (const auto& listItem : _listItems) @@ -589,19 +589,19 @@ static void WindowScenarioselectScrollpaint(rct_window* w, rct_drawpixelinfo* dp case ListItemType::Scenario: { // Draw hover highlight - const scenario_index_entry* scenario = listItem.scenario.scenario; + const ScenarioIndexEntry* scenario = listItem.scenario.scenario; bool isHighlighted = w->highlighted_scenario == scenario; if (isHighlighted) { - gfx_filter_rect(dpi, { 0, y, w->width, y + scenarioItemHeight - 1 }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(dpi, { 0, y, w->width, y + scenarioItemHeight - 1 }, FilterPaletteID::PaletteDarken1); } - bool isCompleted = scenario->highscore != nullptr; + bool isCompleted = scenario->Highscore != nullptr; bool isDisabled = listItem.scenario.is_locked; // Draw scenario name char buffer[64]; - safe_strcpy(buffer, scenario->name, sizeof(buffer)); + SafeStrCpy(buffer, scenario->Name, sizeof(buffer)); StringId format = isDisabled ? static_cast(STR_STRINGID) : (isHighlighted ? highlighted_format : unhighlighted_format); auto ft = Formatter(); @@ -612,29 +612,28 @@ static void WindowScenarioselectScrollpaint(rct_window* w, rct_drawpixelinfo* dp const auto scrollCentre = window_scenarioselect_widgets[WIDX_SCENARIOLIST].width() / 2; DrawTextBasic( - dpi, { scrollCentre, y + 1 }, format, ft, { colour, FontStyle::Medium, TextAlignment::CENTRE, darkness }); + *dpi, { scrollCentre, y + 1 }, format, ft, { colour, FontStyle::Medium, TextAlignment::CENTRE, darkness }); // Check if scenario is completed if (isCompleted) { // Draw completion tick - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(SPR_MENU_CHECKMARK), { window_scenarioselect_widgets[WIDX_SCENARIOLIST].width() - 45, y + 1 }); // Draw completion score - const utf8* completedByName = "???"; - if (!str_is_null_or_empty(scenario->highscore->name)) + u8string completedByName = "???"; + if (!scenario->Highscore->name.empty()) { - completedByName = scenario->highscore->name; + completedByName = scenario->Highscore->name; } - safe_strcpy(buffer, completedByName, 64); ft = Formatter(); ft.Add(STR_COMPLETED_BY); ft.Add(STR_STRING); - ft.Add(buffer); + ft.Add(completedByName.c_str()); DrawTextBasic( - dpi, { scrollCentre, y + scenarioTitleHeight + 1 }, format, ft, + *dpi, { scrollCentre, y + scenarioTitleHeight + 1 }, format, ft, { FontStyle::Small, TextAlignment::CENTRE }); } @@ -645,8 +644,7 @@ static void WindowScenarioselectScrollpaint(rct_window* w, rct_drawpixelinfo* dp } } -static void DrawCategoryHeading( - rct_window* w, rct_drawpixelinfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId) +static void DrawCategoryHeading(WindowBase* w, DrawPixelInfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId) { colour_t baseColour = w->colours[1]; colour_t lightColour = ColourMapA[baseColour].lighter; @@ -654,13 +652,13 @@ static void DrawCategoryHeading( // Draw string int32_t centreX = (left + right) / 2; - DrawTextBasic(dpi, { centreX, y }, stringId, {}, { baseColour, TextAlignment::CENTRE }); + DrawTextBasic(*dpi, { centreX, y }, stringId, {}, { baseColour, TextAlignment::CENTRE }); // Get string dimensions utf8 buffer[CommonTextBufferSize]; auto bufferPtr = buffer; - format_string(bufferPtr, sizeof(buffer), stringId, nullptr); - int32_t categoryStringHalfWidth = (gfx_get_string_width(bufferPtr, FontStyle::Medium) / 2) + 4; + OpenRCT2::FormatStringLegacy(bufferPtr, sizeof(buffer), stringId, nullptr); + int32_t categoryStringHalfWidth = (GfxGetStringWidth(bufferPtr, FontStyle::Medium) / 2) + 4; int32_t strLeft = centreX - categoryStringHalfWidth; int32_t strRight = centreX + categoryStringHalfWidth; @@ -668,26 +666,26 @@ static void DrawCategoryHeading( int32_t lineY = y + 4; auto lightLineLeftTop1 = ScreenCoordsXY{ left, lineY }; auto lightLineRightBottom1 = ScreenCoordsXY{ strLeft, lineY }; - gfx_draw_line(dpi, { lightLineLeftTop1, lightLineRightBottom1 }, lightColour); + GfxDrawLine(dpi, { lightLineLeftTop1, lightLineRightBottom1 }, lightColour); auto lightLineLeftTop2 = ScreenCoordsXY{ strRight, lineY }; auto lightLineRightBottom2 = ScreenCoordsXY{ right, lineY }; - gfx_draw_line(dpi, { lightLineLeftTop2, lightLineRightBottom2 }, lightColour); + GfxDrawLine(dpi, { lightLineLeftTop2, lightLineRightBottom2 }, lightColour); // Draw dark horizontal rule lineY++; auto darkLineLeftTop1 = ScreenCoordsXY{ left, lineY }; auto darkLineRightBottom1 = ScreenCoordsXY{ strLeft, lineY }; - gfx_draw_line(dpi, { darkLineLeftTop1, darkLineRightBottom1 }, darkColour); + GfxDrawLine(dpi, { darkLineLeftTop1, darkLineRightBottom1 }, darkColour); auto darkLineLeftTop2 = ScreenCoordsXY{ strRight, lineY }; auto darkLineRightBottom2 = ScreenCoordsXY{ right, lineY }; - gfx_draw_line(dpi, { darkLineLeftTop2, darkLineRightBottom2 }, darkColour); + GfxDrawLine(dpi, { darkLineLeftTop2, darkLineRightBottom2 }, darkColour); } -static void InitialiseListItems(rct_window* w) +static void InitialiseListItems(WindowBase* w) { - size_t numScenarios = scenario_repository_get_count(); + size_t numScenarios = ScenarioRepositoryGetCount(); _listItems.clear(); // Mega park unlock @@ -699,20 +697,20 @@ static void InitialiseListItems(rct_window* w) uint8_t currentHeading = UINT8_MAX; for (size_t i = 0; i < numScenarios; i++) { - const scenario_index_entry* scenario = scenario_repository_get_by_index(i); + const ScenarioIndexEntry* scenario = ScenarioRepositoryGetByIndex(i); if (!IsScenarioVisible(w, scenario)) continue; - if (_titleEditor && scenario->source_game == ScenarioSource::Other) + if (_titleEditor && scenario->SourceGame == ScenarioSource::Other) continue; // Category heading StringId headingStringId = STR_NONE; if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor) { - if (w->selected_tab != static_cast(ScenarioSource::Real) && currentHeading != scenario->category) + if (w->selected_tab != static_cast(ScenarioSource::Real) && currentHeading != scenario->Category) { - currentHeading = scenario->category; + currentHeading = scenario->Category; headingStringId = ScenarioCategoryStringIds[currentHeading]; } } @@ -720,15 +718,15 @@ static void InitialiseListItems(rct_window* w) { if (w->selected_tab <= SCENARIO_CATEGORY_EXPERT) { - if (currentHeading != static_cast(scenario->source_game)) + if (currentHeading != static_cast(scenario->SourceGame)) { - currentHeading = static_cast(scenario->source_game); + currentHeading = static_cast(scenario->SourceGame); headingStringId = ScenarioOriginStringIds[currentHeading]; } } else if (w->selected_tab == SCENARIO_CATEGORY_OTHER) { - int32_t category = scenario->category; + int32_t category = scenario->Category; if (category <= SCENARIO_CATEGORY_REAL) { category = SCENARIO_CATEGORY_OTHER; @@ -756,21 +754,21 @@ static void InitialiseListItems(rct_window* w) if (IsLockingEnabled(w)) { scenarioItem.scenario.is_locked = numUnlocks <= 0; - if (scenario->highscore == nullptr) + if (scenario->Highscore == nullptr) { numUnlocks--; } else { // Mark RCT1 scenario as completed - if (scenario->sc_id < SC_MEGA_PARK) + if (scenario->ScenarioId < SC_MEGA_PARK) { - rct1CompletedScenarios |= 1 << scenario->sc_id; + rct1CompletedScenarios |= 1 << scenario->ScenarioId; } } // If scenario is Mega Park, keep a reference to it - if (scenario->sc_id == SC_MEGA_PARK) + if (scenario->ScenarioId == SC_MEGA_PARK) { megaParkListItemIndex = _listItems.size() - 1; } @@ -811,18 +809,18 @@ static void InitialiseListItems(rct_window* w) } } -static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenario) +static bool IsScenarioVisible(WindowBase* w, const ScenarioIndexEntry* scenario) { if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor) { - if (static_cast(scenario->source_game) != w->selected_tab) + if (static_cast(scenario->SourceGame) != w->selected_tab) { return false; } } else { - int32_t category = scenario->category; + int32_t category = scenario->Category; if (category > SCENARIO_CATEGORY_OTHER) { category = SCENARIO_CATEGORY_OTHER; @@ -835,7 +833,7 @@ static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenari return true; } -static bool IsLockingEnabled(rct_window* w) +static bool IsLockingEnabled(WindowBase* w) { if (gConfigGeneral.ScenarioSelectMode != SCENARIO_SELECT_MODE_ORIGIN) return false; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 8b2d12d5df..c0de26e1b7 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -8,6 +8,7 @@ *****************************************************************************/ #include +#include #include #include #include @@ -20,20 +21,34 @@ #include #include #include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include #include -#include #include #include -#include + +using namespace OpenRCT2; static constexpr const StringId WINDOW_TITLE = STR_NONE; constexpr int32_t WINDOW_SCENERY_MIN_WIDTH = 634; -constexpr int32_t WINDOW_SCENERY_MIN_HEIGHT = 180; +constexpr int32_t WINDOW_SCENERY_MIN_HEIGHT = 195; constexpr int32_t SCENERY_BUTTON_WIDTH = 66; constexpr int32_t SCENERY_BUTTON_HEIGHT = 80; +constexpr int32_t InitTabPosX = 3; +constexpr int32_t InitTabPosY = 17; constexpr int32_t TabWidth = 31; -constexpr int32_t MaxTabs = 32; +constexpr int32_t TabHeight = 28; +constexpr int32_t ReservedTabCount = 2; +constexpr int32_t MaxTabs = 257; // 255 selected tabs + misc + all +constexpr int32_t MaxTabsPerRow = 19; constexpr uint8_t SceneryContentScrollIndex = 0; @@ -51,6 +66,8 @@ enum WindowSceneryListWidgetIdx WIDX_SCENERY_TERTIARY_COLOUR_BUTTON, WIDX_SCENERY_EYEDROPPER_BUTTON, WIDX_SCENERY_BUILD_CLUSTER_BUTTON, + WIDX_FILTER_TEXT_BOX, + WIDX_FILTER_CLEAR_BUTTON, WIDX_SCENERY_TAB_1, }; @@ -59,17 +76,19 @@ validate_global_widx(WC_SCENERY, WIDX_SCENERY_ROTATE_OBJECTS_BUTTON); validate_global_widx(WC_SCENERY, WIDX_SCENERY_EYEDROPPER_BUTTON); // clang-format off -static rct_widget WindowSceneryBaseWidgets[] = { +static Widget WindowSceneryBaseWidgets[] = { WINDOW_SHIM(WINDOW_TITLE, WINDOW_SCENERY_MIN_WIDTH, WINDOW_SCENERY_MIN_HEIGHT), MakeWidget ({ 0, 43}, {634, 99}, WindowWidgetType::Resize, WindowColour::Secondary ), // 8 0x009DE2C8 - MakeWidget ({ 2, 47}, {607, 80}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ), // 1000000 0x009DE418 - MakeWidget ({609, 44}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_ROTATE_ARROW, STR_ROTATE_OBJECTS_90 ), // 2000000 0x009DE428 - MakeWidget ({609, 68}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PAINTBRUSH, STR_SCENERY_PAINTBRUSH_TIP ), // 4000000 0x009DE438 - MakeWidget ({615, 93}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_COLOUR ), // 8000000 0x009DE448 - MakeWidget ({615, 105}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_SECONDARY_COLOUR), // 10000000 0x009DE458 - MakeWidget ({615, 117}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_TERNARY_COLOUR ), // 20000000 0x009DE468 - MakeWidget ({609, 130}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_EYEDROPPER, STR_SCENERY_EYEDROPPER_TIP ), // 40000000 0x009DE478 - MakeWidget ({609, 154}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_SCENERY_CLUSTER, STR_SCENERY_CLUSTER_TIP ), // 40000000 0x009DE478 + MakeWidget ({ 2, 62}, {607, 80}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ), // 1000000 0x009DE418 + MakeWidget ({609, 59}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_OBJECTS_90 ), // 2000000 0x009DE428 + MakeWidget ({609, 83}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PAINTBRUSH), STR_SCENERY_PAINTBRUSH_TIP ), // 4000000 0x009DE438 + MakeWidget ({615, 108}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_COLOUR ), // 8000000 0x009DE448 + MakeWidget ({615, 120}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_SECONDARY_COLOUR), // 10000000 0x009DE458 + MakeWidget ({615, 132}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SELECT_TERNARY_COLOUR ), // 20000000 0x009DE468 + MakeWidget ({609, 145}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_EYEDROPPER), STR_SCENERY_EYEDROPPER_TIP ), // 40000000 0x009DE478 + MakeWidget ({609, 169}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_SCENERY_CLUSTER), STR_SCENERY_CLUSTER_TIP ), // 40000000 0x009DE478 + MakeWidget ({ 4, 46}, {211, 14}, WindowWidgetType::TextBox, WindowColour::Secondary ), + MakeWidget ({218, 46}, { 70, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_OBJECT_SEARCH_CLEAR ), WIDGETS_END, }; // clang-format on @@ -88,6 +107,13 @@ bool gWindowSceneryEyedropperEnabled; class SceneryWindow final : public Window { private: + enum SceneryTabType + { + SCENERY_TAB_TYPE_GROUP, + SCENERY_TAB_TYPE_MISC, + SCENERY_TAB_TYPE_ALL, + }; + struct SceneryItem { int32_t allRows; @@ -97,12 +123,24 @@ private: struct SceneryTabInfo { + SceneryTabType Type = SCENERY_TAB_TYPE_GROUP; ObjectEntryIndex SceneryGroupIndex = OBJECT_ENTRY_INDEX_NULL; - std::vector Entries; + std::deque Entries{}; + u8string Filter = ""; bool IsMisc() const { - return SceneryGroupIndex == OBJECT_ENTRY_INDEX_NULL; + return Type == SCENERY_TAB_TYPE_MISC; + } + + bool IsAll() const + { + return Type == SCENERY_TAB_TYPE_ALL; + } + + bool IsSceneryGroup() const + { + return Type == SCENERY_TAB_TYPE_GROUP; } bool Contains(const ScenerySelection& entry) const @@ -110,7 +148,7 @@ private: return std::find(std::begin(Entries), std::end(Entries), entry) != std::end(Entries); } - void AddEntry(const ScenerySelection& entry) + void AddEntryToBack(const ScenerySelection& entry) { if (!Contains(entry)) { @@ -118,17 +156,27 @@ private: } } - const rct_scenery_group_entry* GetSceneryGroupEntry() const + void AddEntryToFront(const ScenerySelection& entry) { - return ::GetSceneryGroupEntry(SceneryGroupIndex); + if (!Contains(entry)) + { + Entries.push_front(entry); + } + } + + const SceneryGroupEntry* GetSceneryGroupEntry() const + { + return OpenRCT2::ObjectManager::GetObjectEntry(SceneryGroupIndex); } }; std::vector _tabEntries; - std::vector _widgets; + std::vector _widgets; int32_t _requiredWidth; + int32_t _actualMinHeight; ScenerySelection _selectedScenery; int16_t _hoverCounter; + SceneryTabInfo _filteredSceneryTab; public: void OnOpen() override @@ -137,14 +185,14 @@ public: InitScrollWidgets(); ContentUpdateScroll(); - show_gridlines(); + ShowGridlines(); gWindowSceneryRotation = 3; gSceneryCtrlPressed = false; gSceneryShiftPressed = false; _selectedScenery = {}; _hoverCounter = 0; gSceneryGhostType = 0; - gSceneryPlaceCost = MONEY32_UNDEFINED; + gSceneryPlaceCost = MONEY64_UNDEFINED; gSceneryPlaceRotation = 0; gWindowSceneryPaintEnabled = 0; // repaint coloured scenery tool state gWindowSceneryEyedropperEnabled = false; @@ -152,7 +200,7 @@ public: width = GetRequiredWidth(); min_width = width; max_width = width; - height = WINDOW_SCENERY_MIN_HEIGHT; + height = _actualMinHeight; min_height = height; max_height = height; if (_activeTabIndex > _tabSelections.size()) @@ -160,21 +208,21 @@ public: _activeTabIndex = 0; } - window_move_position(*this, { ContextGetWidth() - GetRequiredWidth(), 0x1D }); - window_push_others_below(*this); + WindowMovePosition(*this, { ContextGetWidth() - GetRequiredWidth(), 0x1D }); + WindowPushOthersBelow(*this); } void OnClose() override { SceneryRemoveGhostToolPlacement(); - hide_gridlines(); - viewport_set_visibility(0); + HideGridlines(); + ViewportSetVisibility(0); if (gWindowSceneryScatterEnabled) - window_close_by_class(WindowClass::SceneryScatter); + WindowCloseByClass(WindowClass::SceneryScatter); - if (scenery_tool_is_active()) - tool_cancel(); + if (SceneryToolIsActive()) + ToolCancel(); } void OnMouseUp(WidgetIndex widgetIndex) override @@ -182,8 +230,6 @@ public: switch (widgetIndex) { case WIDX_SCENERY_CLOSE: - if (gWindowSceneryScatterEnabled) - window_close_by_class(WindowClass::SceneryScatter); Close(); break; case WIDX_SCENERY_ROTATE_OBJECTS_BUTTON: @@ -196,14 +242,14 @@ public: gWindowSceneryPaintEnabled ^= 1; gWindowSceneryEyedropperEnabled = false; if (gWindowSceneryScatterEnabled) - window_close_by_class(WindowClass::SceneryScatter); + WindowCloseByClass(WindowClass::SceneryScatter); Invalidate(); break; case WIDX_SCENERY_EYEDROPPER_BUTTON: gWindowSceneryPaintEnabled = 0; gWindowSceneryEyedropperEnabled = !gWindowSceneryEyedropperEnabled; if (gWindowSceneryScatterEnabled) - window_close_by_class(WindowClass::SceneryScatter); + WindowCloseByClass(WindowClass::SceneryScatter); SceneryRemoveGhostToolPlacement(); Invalidate(); break; @@ -211,10 +257,10 @@ public: gWindowSceneryPaintEnabled = 0; gWindowSceneryEyedropperEnabled = false; if (gWindowSceneryScatterEnabled) - window_close_by_class(WindowClass::SceneryScatter); + WindowCloseByClass(WindowClass::SceneryScatter); else if ( - network_get_mode() != NETWORK_MODE_CLIENT - || network_can_perform_command(network_get_current_player_group_index(), -2)) + NetworkGetMode() != NETWORK_MODE_CLIENT + || NetworkCanPerformCommand(NetworkGetCurrentPlayerGroupIndex(), -2)) { WindowSceneryScatterOpen(); } @@ -224,6 +270,15 @@ public: } Invalidate(); break; + case WIDX_FILTER_TEXT_BOX: + WindowStartTextbox(*this, widgetIndex, STR_STRING, _filteredSceneryTab.Filter.data(), MAX_PATH); + break; + case WIDX_FILTER_CLEAR_BUTTON: + _tabEntries[_activeTabIndex].Filter.clear(); + ContentUpdateScroll(); + scrolls->v_top = 0; + Invalidate(); + break; } } @@ -249,7 +304,7 @@ public: height = min_height; Invalidate(); // HACK: For some reason invalidate has not been called - window_event_invalidate_call(this); + WindowEventInvalidateCall(this); ContentUpdateScroll(); } @@ -259,7 +314,7 @@ public: height = max_height; Invalidate(); // HACK: For some reason invalidate has not been called - window_event_invalidate_call(this); + WindowEventInvalidateCall(this); ContentUpdateScroll(); } } @@ -283,7 +338,7 @@ public: { _activeTabIndex = widgetIndex - WIDX_SCENERY_TAB_1; Invalidate(); - gSceneryPlaceCost = MONEY32_UNDEFINED; + gSceneryPlaceCost = MONEY64_UNDEFINED; ContentUpdateScroll(); } @@ -316,7 +371,7 @@ public: { // Find out what scenery the cursor is over const CursorState* state = ContextGetCursorState(); - WidgetIndex widgetIndex = window_find_widget_from_point(*this, state->position); + WidgetIndex widgetIndex = WindowFindWidgetFromPoint(*this, state->position); if (widgetIndex == WIDX_SCENERY_LIST) { ScreenCoordsXY scrollPos = {}; @@ -343,23 +398,23 @@ public: void OnUpdate() override { const CursorState* state = ContextGetCursorState(); - rct_window* other = window_find_from_point(state->position); + WindowBase* other = WindowFindFromPoint(state->position); if (other == this) { ScreenCoordsXY window = state->position - ScreenCoordsXY{ windowPos.x - 26, windowPos.y }; if (window.y < 44 || window.x <= width) { - WidgetIndex widgetIndex = window_find_widget_from_point(*this, state->position); + WidgetIndex widgetIndex = WindowFindWidgetFromPoint(*this, state->position); if (widgetIndex >= WIDX_SCENERY_TAB_CONTENT_PANEL) { _hoverCounter++; if (_hoverCounter < 8) { - if (input_get_state() != InputState::ScrollLeft) + if (InputGetState() != InputState::ScrollLeft) { - min_height = WINDOW_SCENERY_MIN_HEIGHT; - max_height = WINDOW_SCENERY_MIN_HEIGHT; + min_height = _actualMinHeight; + max_height = _actualMinHeight; } } else @@ -370,7 +425,7 @@ public: const auto numRows = static_cast(CountRows()); const auto maxContentHeight = numRows * SCENERY_BUTTON_HEIGHT; const auto maxWindowHeight = maxContentHeight + nonListHeight; - const auto windowHeight = std::clamp(maxWindowHeight, WINDOW_SCENERY_MIN_HEIGHT, 463); + const auto windowHeight = std::clamp(maxWindowHeight, _actualMinHeight, 463); min_height = windowHeight; max_height = windowHeight; @@ -381,16 +436,22 @@ public: else { _hoverCounter = 0; - if (input_get_state() != InputState::ScrollLeft) + if (InputGetState() != InputState::ScrollLeft) { - min_height = WINDOW_SCENERY_MIN_HEIGHT; - max_height = WINDOW_SCENERY_MIN_HEIGHT; + min_height = _actualMinHeight; + max_height = _actualMinHeight; } } + if (gCurrentTextBox.window.classification == classification && gCurrentTextBox.window.number == number) + { + WindowUpdateTextboxCaret(); + WidgetInvalidate(*this, WIDX_FILTER_TEXT_BOX); + } + Invalidate(); - if (!scenery_tool_is_active()) + if (!SceneryToolIsActive()) { Close(); return; @@ -416,24 +477,47 @@ public: } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_LARGE) { - gCurrentToolId = static_cast(GetLargeSceneryEntry(tabSelectedScenery.EntryIndex)->tool_id); + gCurrentToolId = static_cast( + OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex)->tool_id); } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_WALL) { - gCurrentToolId = static_cast(GetWallEntry(tabSelectedScenery.EntryIndex)->tool_id); + gCurrentToolId = static_cast( + OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex)->tool_id); } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_PATH_ITEM) { // path bit - gCurrentToolId = static_cast(GetFootpathItemEntry(tabSelectedScenery.EntryIndex)->tool_id); + gCurrentToolId = static_cast( + OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex)->tool_id); } else { // small scenery - gCurrentToolId = static_cast(GetSmallSceneryEntry(tabSelectedScenery.EntryIndex)->tool_id); + gCurrentToolId = static_cast( + OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex)->tool_id); } } + else + { + gCurrentToolId = Tool::Arrow; + } } } + void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override + { + if (widgetIndex != WIDX_FILTER_TEXT_BOX) + return; + + if (text == _tabEntries[_activeTabIndex].Filter) + return; + + _tabEntries[_activeTabIndex].Filter.assign(text); + ContentUpdateScroll(); + + scrolls->v_top = 0; + Invalidate(); + } + ScreenSize OnScrollGetSize(int32_t scrollIndex) override { if (scrollIndex == SceneryContentScrollIndex) @@ -474,6 +558,13 @@ public: return { fallback, ft }; } + if (tabInfo.IsAll()) + { + auto ft = Formatter(); + ft.Add(STR_ALL_SCENERY); + return { fallback, ft }; + } + const auto* sceneryEntry = tabInfo.GetSceneryGroupEntry(); if (sceneryEntry != nullptr) { @@ -494,13 +585,21 @@ public: if (tabIndex < _tabEntries.size()) { const auto& tabInfo = _tabEntries[tabIndex]; - const auto* sgEntry = tabInfo.GetSceneryGroupEntry(); - if (sgEntry != nullptr) + if (tabInfo.IsAll()) { - titleStringId = sgEntry->name; + titleStringId = STR_ALL_SCENERY; + } + else + { + const auto* sgEntry = tabInfo.GetSceneryGroupEntry(); + if (sgEntry != nullptr) + { + titleStringId = sgEntry->name; + } } } widgets[WIDX_SCENERY_TITLE].text = titleStringId; + widgets[WIDX_FILTER_TEXT_BOX].string = _filteredSceneryTab.Filter.data(); pressed_widgets = 0; pressed_widgets |= 1uLL << (tabIndex + WIDX_SCENERY_TAB_1); @@ -530,7 +629,7 @@ public: widgets[WIDX_SCENERY_BUILD_CLUSTER_BUTTON].type = WindowWidgetType::FlatBtn; } - auto* sceneryEntry = GetSmallSceneryEntry(tabSelectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex); if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) { widgets[WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type = WindowWidgetType::FlatBtn; @@ -542,9 +641,9 @@ public: } } - widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].image = GetColourButtonImage(gWindowSceneryPrimaryColour).ToUInt32(); - widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].image = GetColourButtonImage(gWindowScenerySecondaryColour).ToUInt32(); - widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].image = GetColourButtonImage(gWindowSceneryTertiaryColour).ToUInt32(); + widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].image = GetColourButtonImage(gWindowSceneryPrimaryColour); + widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].image = GetColourButtonImage(gWindowScenerySecondaryColour); + widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].image = GetColourButtonImage(gWindowSceneryTertiaryColour); widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WindowWidgetType::Empty; widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].type = WindowWidgetType::Empty; @@ -561,7 +660,7 @@ public: { if (tabSelectedScenery.SceneryType == SCENERY_TYPE_BANNER) { - auto* bannerEntry = GetBannerEntry(tabSelectedScenery.EntryIndex); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex); if (bannerEntry->flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR) { widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WindowWidgetType::ColourBtn; @@ -569,18 +668,20 @@ public: } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_LARGE) { - auto* sceneryEntry = GetLargeSceneryEntry(tabSelectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex); - if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR) + if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR + && !(sceneryEntry->flags & LARGE_SCENERY_FLAG_HIDE_PRIMARY_REMAP_BUTTON)) widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WindowWidgetType::ColourBtn; - if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR) + if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR + && !(sceneryEntry->flags & LARGE_SCENERY_FLAG_HIDE_SECONDARY_REMAP_BUTTON)) widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].type = WindowWidgetType::ColourBtn; if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_TERTIARY_COLOUR) widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].type = WindowWidgetType::ColourBtn; } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_WALL) { - auto* wallEntry = GetWallEntry(tabSelectedScenery.EntryIndex); + auto* wallEntry = OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex); if (wallEntry->flags & (WALL_SCENERY_HAS_PRIMARY_COLOUR | WALL_SCENERY_HAS_GLASS)) { widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WindowWidgetType::ColourBtn; @@ -598,7 +699,7 @@ public: } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_SMALL) { - auto* sceneryEntry = GetSmallSceneryEntry(tabSelectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(tabSelectedScenery.EntryIndex); if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR | SMALL_SCENERY_FLAG_HAS_GLASS)) { @@ -615,9 +716,18 @@ public: auto windowWidth = width; if (_tabEntries.size() > 0) { - const auto lastTabIndex = _tabEntries.size() - 1; + const auto lastTabIndex = GetMaxTabCountInARow() == MaxTabsPerRow ? MaxTabsPerRow - 1 : _tabEntries.size() - 1; const auto lastTabWidget = &widgets[WIDX_SCENERY_TAB_1 + lastTabIndex]; windowWidth = std::max(windowWidth, lastTabWidget->right + 3); + + if (_tabEntries.back().IsAll()) + { + auto allTabWidget = &widgets[WIDX_SCENERY_TAB_1 + _tabEntries.size() - 1]; + allTabWidget->left = windowWidth - TabWidth - 6; + allTabWidget->right = windowWidth - 7; + allTabWidget->top = InitTabPosY; + allTabWidget->bottom = InitTabPosY + TabHeight; + } } widgets[WIDX_SCENERY_BACKGROUND].right = windowWidth - 1; @@ -647,7 +757,7 @@ public: widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].right = windowWidth - 8; } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabs(dpi, windowPos); @@ -666,22 +776,22 @@ public: } auto [name, price] = GetNameAndPrice(selectedSceneryEntry); - if (price != MONEY32_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) + if (price != MONEY64_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(price); // -14 DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ width - 0x1A, height - 13 }, STR_COST_LABEL, ft, { TextAlignment::RIGHT }); + dpi, windowPos + ScreenCoordsXY{ width - 0x1A, height - 13 }, STR_COST_LABEL, ft, { TextAlignment::RIGHT }); } auto ft = Formatter(); ft.Add(name); - DrawTextEllipsised(&dpi, { windowPos.x + 3, windowPos.y + height - 13 }, width - 19, STR_BLACK_STRING, ft); + DrawTextEllipsised(dpi, { windowPos.x + 3, windowPos.y + height - 13 }, width - 19, STR_BLACK_STRING, ft); } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { if (scrollIndex == SceneryContentScrollIndex) { @@ -720,7 +830,7 @@ public: gWindowSceneryEyedropperEnabled = false; OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::Click1, 0, ContextGetWidth() / 2); _hoverCounter = -16; - gSceneryPlaceCost = MONEY32_UNDEFINED; + gSceneryPlaceCost = MONEY64_UNDEFINED; Invalidate(); } @@ -745,10 +855,10 @@ public: { _tabEntries.clear(); - for (ObjectEntryIndex scenerySetIndex = 0; scenerySetIndex < MaxTabs - 1; scenerySetIndex++) + for (ObjectEntryIndex scenerySetIndex = 0; scenerySetIndex < MaxTabs - ReservedTabCount; scenerySetIndex++) { - const auto* sceneryGroupEntry = GetSceneryGroupEntry(scenerySetIndex); - if (sceneryGroupEntry != nullptr && scenery_group_is_invented(scenerySetIndex)) + const auto* sceneryGroupEntry = OpenRCT2::ObjectManager::GetObjectEntry(scenerySetIndex); + if (sceneryGroupEntry != nullptr && SceneryGroupIsInvented(scenerySetIndex)) { SceneryTabInfo tabInfo; tabInfo.SceneryGroupIndex = scenerySetIndex; @@ -756,7 +866,7 @@ public: { if (IsSceneryAvailableToBuild(sceneryEntry)) { - tabInfo.Entries.push_back(sceneryEntry); + tabInfo.AddEntryToBack(sceneryEntry); } } if (tabInfo.Entries.size() > 0) @@ -766,13 +876,17 @@ public: } } - // Add misc tab - _tabEntries.emplace_back(); + // Sort scenery group tabs before adding other tabs + SortTabs(); + + // Add misc and all tab + _tabEntries.emplace_back(SceneryWindow::SceneryTabInfo{ SCENERY_TAB_TYPE_MISC }); + _tabEntries.emplace_back(SceneryWindow::SceneryTabInfo{ SCENERY_TAB_TYPE_ALL }); // small scenery for (ObjectEntryIndex sceneryId = 0; sceneryId < MAX_SMALL_SCENERY_OBJECTS; sceneryId++) { - const auto* sceneryEntry = GetSmallSceneryEntry(sceneryId); + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryId); if (sceneryEntry != nullptr) { InitSceneryEntry({ SCENERY_TYPE_SMALL, sceneryId }, sceneryEntry->scenery_tab_id); @@ -782,7 +896,7 @@ public: // large scenery for (ObjectEntryIndex sceneryId = 0; sceneryId < MAX_LARGE_SCENERY_OBJECTS; sceneryId++) { - const auto* sceneryEntry = GetLargeSceneryEntry(sceneryId); + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryId); if (sceneryEntry != nullptr) { InitSceneryEntry({ SCENERY_TYPE_LARGE, sceneryId }, sceneryEntry->scenery_tab_id); @@ -792,7 +906,7 @@ public: // walls for (ObjectEntryIndex sceneryId = 0; sceneryId < MAX_WALL_SCENERY_OBJECTS; sceneryId++) { - const auto* sceneryEntry = GetWallEntry(sceneryId); + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryId); if (sceneryEntry != nullptr) { InitSceneryEntry({ SCENERY_TYPE_WALL, sceneryId }, sceneryEntry->scenery_tab_id); @@ -802,7 +916,7 @@ public: // banners for (ObjectEntryIndex sceneryId = 0; sceneryId < MAX_BANNER_OBJECTS; sceneryId++) { - const auto* sceneryEntry = GetBannerEntry(sceneryId); + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryId); if (sceneryEntry != nullptr) { InitSceneryEntry({ SCENERY_TYPE_BANNER, sceneryId }, sceneryEntry->scenery_tab_id); @@ -812,25 +926,24 @@ public: // path bits for (ObjectEntryIndex sceneryId = 0; sceneryId < MAX_PATH_ADDITION_OBJECTS; sceneryId++) { - const auto* sceneryEntry = GetFootpathItemEntry(sceneryId); + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryId); if (sceneryEntry != nullptr) { InitSceneryEntry({ SCENERY_TYPE_PATH_ITEM, sceneryId }, sceneryEntry->scenery_tab_id); } } - // Remove misc tab if empty - if (_tabEntries.back().Entries.size() == 0) - { - _tabEntries.pop_back(); - } + // Remove empty tabs + _tabEntries.erase( + std::remove_if( + _tabEntries.begin(), _tabEntries.end(), [](const SceneryTabInfo& tabInfo) { return tabInfo.Entries.empty(); }), + _tabEntries.end()); // Set required width - _requiredWidth = static_cast(_tabEntries.size()) * TabWidth + 5; + _requiredWidth = std::min(static_cast(_tabEntries.size()), MaxTabsPerRow) * TabWidth + 5; - SortTabs(); PrepareWidgets(); - window_invalidate_by_class(WindowClass::Scenery); + WindowInvalidateByClass(WindowClass::Scenery); } int32_t GetRequiredWidth() const @@ -860,7 +973,7 @@ private: return 0; } - const auto totalItems = _tabEntries[tabIndex].Entries.size(); + const auto totalItems = _filteredSceneryTab.Entries.size(); const auto numColumns = GetNumColumns(); const auto rows = CountRows(totalItems + numColumns - 1); return rows; @@ -879,6 +992,8 @@ private: return; } + SetFilteredScenery(tabIndex); + const int32_t listHeight = height - 14 - widgets[WIDX_SCENERY_LIST].top - 1; const auto sceneryItem = ContentCountRowsWithSelectedItem(tabIndex); @@ -888,11 +1003,26 @@ private: auto rowSelected = CountRows(sceneryItem.selected_item); if (sceneryItem.scenerySelection.IsUndefined()) { - rowSelected = 0; - const auto& scenery = _tabEntries[tabIndex].Entries[0]; - if (!scenery.IsUndefined()) + auto& oldScenery = GetSelectedScenery(tabIndex); + if (!oldScenery.IsUndefined()) { - SetSelectedScenery(tabIndex, scenery); + // Make sure last selected scenery for tab is always present + _filteredSceneryTab.AddEntryToFront(oldScenery); + } + else + { + // No last selection was made, use blank ScenerySelection + SetSelectedScenery(tabIndex, ScenerySelection()); + rowSelected = 0; + if (!_filteredSceneryTab.Entries.empty()) + { + // Select first item in current filtered tab if available + const auto& scenery = _filteredSceneryTab.Entries.front(); + if (!scenery.IsUndefined()) + { + SetSelectedScenery(tabIndex, scenery); + } + } } } @@ -906,17 +1036,16 @@ private: { SceneryItem sceneryItem = { 0, 0, ScenerySelection() }; const auto scenerySelection = GetSelectedScenery(tabIndex); - const auto& tabInfo = _tabEntries[tabIndex]; - for (size_t i = 0; i < tabInfo.Entries.size(); i++) + for (size_t i = 0; i < _filteredSceneryTab.Entries.size(); i++) { - const auto& currentEntry = tabInfo.Entries[i]; + const auto& currentEntry = _filteredSceneryTab.Entries[i]; if (currentEntry == scenerySelection) { sceneryItem.selected_item = static_cast(i); sceneryItem.scenerySelection = scenerySelection; } } - sceneryItem.allRows = static_cast(CountRows(tabInfo.Entries.size() + 8)); + sceneryItem.allRows = static_cast(CountRows(_filteredSceneryTab.Entries.size() + 8)); return sceneryItem; } @@ -938,13 +1067,30 @@ private: _tabSelections[tabIndex] = value; } - SceneryTabInfo* GetSceneryTabInfoForGroup(const ObjectEntryIndex sceneryGroupIndex) + SceneryTabInfo* GetSceneryTabInfoForMisc() { - if (sceneryGroupIndex == OBJECT_ENTRY_INDEX_NULL) + if (_tabEntries.size() >= 2) { - return &_tabEntries[_tabEntries.size() - 1]; + if (_tabEntries[_tabEntries.size() - 2].IsMisc()) + return &_tabEntries[_tabEntries.size() - 2]; } + return nullptr; + } + + SceneryTabInfo* GetSceneryTabInfoForAll() + { + if (!_tabEntries.empty()) + { + if (_tabEntries.back().IsAll()) + return &_tabEntries.back(); + } + + return nullptr; + } + + SceneryTabInfo* GetSceneryTabInfoForGroup(const ObjectEntryIndex sceneryGroupIndex) + { for (auto& tabEntry : _tabEntries) { if (tabEntry.SceneryGroupIndex == sceneryGroupIndex) @@ -982,7 +1128,7 @@ private: auto* tabInfo = GetSceneryTabInfoForGroup(sceneryGroupIndex); if (tabInfo != nullptr) { - tabInfo->AddEntry(selection); + tabInfo->AddEntryToBack(selection); return; } } @@ -990,15 +1136,74 @@ private: // If scenery is no tab, add it to misc if (!tabIndex.has_value()) { - auto* tabInfo = GetSceneryTabInfoForGroup(OBJECT_ENTRY_INDEX_NULL); + auto* tabInfo = GetSceneryTabInfoForMisc(); if (tabInfo != nullptr) { - tabInfo->AddEntry(selection); + tabInfo->AddEntryToBack(selection); } } + + // Add all scenery to all tab + auto tabInfo = GetSceneryTabInfoForAll(); + if (tabInfo != nullptr) + { + tabInfo->AddEntryToBack(selection); + } } } + void SetFilteredScenery(const size_t tabIndex) + { + auto currentTab = _tabEntries[tabIndex]; + + _filteredSceneryTab.Entries.clear(); + _filteredSceneryTab.Filter = currentTab.Filter; + + for (auto selection : currentTab.Entries) + { + if (MatchFilter(selection)) + _filteredSceneryTab.AddEntryToBack(selection); + } + } + + bool MatchFilter(const ScenerySelection& selection) + { + if (_filteredSceneryTab.Filter.empty()) + return true; + + auto& objManager = GetContext()->GetObjectManager(); + auto sceneryObjectType = GetObjectTypeFromSceneryType(selection.SceneryType); + auto sceneryObject = objManager.GetLoadedObject(sceneryObjectType, selection.EntryIndex); + + return IsFilterInName(*sceneryObject) || IsFilterInAuthors(*sceneryObject) || IsFilterInIdentifier(*sceneryObject) + || IsFilterInFilename(*sceneryObject); + } + + bool IsFilterInName(const Object& object) + { + return String::Contains(object.GetName(), _filteredSceneryTab.Filter, true); + } + + bool IsFilterInAuthors(const Object& object) + { + for (auto author : object.GetAuthors()) + if (String::Contains(author, _filteredSceneryTab.Filter, true)) + return true; + + return false; + } + + bool IsFilterInIdentifier(const Object& object) + { + return String::Contains(object.GetIdentifier(), _filteredSceneryTab.Filter, true); + } + + bool IsFilterInFilename(const Object& object) + { + auto repoItem = ObjectRepositoryFindObjectByEntry(&(object.GetObjectEntry())); + return String::Contains(repoItem->Path, _filteredSceneryTab.Filter, true); + } + void SortTabs() { std::sort(_tabEntries.begin(), _tabEntries.end(), [](const SceneryTabInfo& a, const SceneryTabInfo& b) { @@ -1016,6 +1221,18 @@ private: }); } + int32_t GetTabRowCount() + { + int32_t tabEntries = static_cast(_tabEntries.size() - 1); + return std::max((tabEntries + MaxTabsPerRow - 1) / MaxTabsPerRow, 0); + } + + int32_t GetMaxTabCountInARow() + { + int32_t tabEntries = static_cast(_tabEntries.size()); + return std::min(tabEntries, MaxTabsPerRow); + } + void PrepareWidgets() { // Add the base widgets @@ -1030,22 +1247,77 @@ private: _widgets.pop_back(); // Add tabs - ScreenCoordsXY pos = { 3, 17 }; + _actualMinHeight = WINDOW_SCENERY_MIN_HEIGHT; + int32_t xInit = InitTabPosX; + int32_t tabsInThisRow = 0; + + ScreenCoordsXY pos = { xInit, InitTabPosY }; for (const auto& tabInfo : _tabEntries) { auto widget = MakeTab(pos, STR_STRING_DEFINED_TOOLTIP); pos.x += TabWidth; - if (tabInfo.SceneryGroupIndex == OBJECT_ENTRY_INDEX_NULL) + if (tabInfo.IsMisc()) { - widget.image = SPR_TAB_QUESTION | IMAGE_TYPE_REMAP; + widget.image = ImageId(SPR_TAB_QUESTION, FilterPaletteID::PaletteNull); + } + else if (tabInfo.IsAll()) + { + widget.image = ImageId(SPR_TAB, FilterPaletteID::PaletteNull); + } + else if (tabInfo.IsSceneryGroup()) + { + // Default tab image + widget.image = ImageId(SPR_TAB_QUESTION, FilterPaletteID::PaletteNull); + + // Scenery Group image + auto scgEntry = tabInfo.GetSceneryGroupEntry(); + if (scgEntry != nullptr) + { + widget.image = ImageId(scgEntry->image, colours[1]); + } } _widgets.push_back(widget); + + tabsInThisRow++; + if (tabsInThisRow >= MaxTabsPerRow) + { + pos.x = xInit; + pos.y += TabHeight; + tabsInThisRow = 0; + _actualMinHeight += TabHeight; + } } _widgets.push_back(lastWidget); + // Shift base widgets based on number of tab rows + int32_t shiftAmount = (GetTabRowCount() - 1) * TabHeight; + if (shiftAmount > 0) + { + _widgets[WIDX_SCENERY_LIST].top += shiftAmount; + _widgets[WIDX_SCENERY_LIST].bottom += shiftAmount; + _widgets[WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].bottom += shiftAmount; + _widgets[WIDX_SCENERY_REPAINT_SCENERY_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_REPAINT_SCENERY_BUTTON].bottom += shiftAmount; + _widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].bottom += shiftAmount; + _widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].bottom += shiftAmount; + _widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].bottom += shiftAmount; + _widgets[WIDX_SCENERY_EYEDROPPER_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_EYEDROPPER_BUTTON].bottom += shiftAmount; + _widgets[WIDX_SCENERY_BUILD_CLUSTER_BUTTON].top += shiftAmount; + _widgets[WIDX_SCENERY_BUILD_CLUSTER_BUTTON].bottom += shiftAmount; + _widgets[WIDX_FILTER_TEXT_BOX].top += shiftAmount; + _widgets[WIDX_FILTER_TEXT_BOX].bottom += shiftAmount; + _widgets[WIDX_FILTER_CLEAR_BUTTON].top += shiftAmount; + _widgets[WIDX_FILTER_CLEAR_BUTTON].bottom += shiftAmount; + } + widgets = _widgets.data(); } @@ -1059,14 +1331,9 @@ private: if (colIndex >= 0 && colIndex < numColumns && rowIndex >= 0) { const auto tabSceneryIndex = static_cast((rowIndex * numColumns) + colIndex); - const auto tabIndex = _activeTabIndex; - if (tabIndex < _tabEntries.size()) + if (tabSceneryIndex < _filteredSceneryTab.Entries.size()) { - auto& tabInfo = _tabEntries[tabIndex]; - if (tabSceneryIndex < tabInfo.Entries.size()) - { - return tabInfo.Entries[tabSceneryIndex]; - } + return _filteredSceneryTab.Entries[tabSceneryIndex]; } } return scenery; @@ -1084,13 +1351,18 @@ private: if (scenery.IsUndefined()) return; + auto lastScenery = GetSelectedScenery(_activeTabIndex); + if (lastScenery != scenery && !MatchFilter(lastScenery)) + { + _filteredSceneryTab.Entries.pop_front(); + } SetSelectedScenery(_activeTabIndex, scenery); gWindowSceneryPaintEnabled &= 0xFE; gWindowSceneryEyedropperEnabled = false; OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::Click1, 0, windowPos.x + (width / 2)); _hoverCounter = -16; - gSceneryPlaceCost = MONEY32_UNDEFINED; + gSceneryPlaceCost = MONEY64_UNDEFINED; Invalidate(); } @@ -1104,11 +1376,11 @@ private: } } - std::pair GetNameAndPrice(ScenerySelection selectedScenery) + std::pair GetNameAndPrice(ScenerySelection selectedScenery) { StringId name = STR_UNKNOWN_OBJECT_TYPE; - money32 price = MONEY32_UNDEFINED; - if (selectedScenery.IsUndefined() && gSceneryPlaceCost != MONEY32_UNDEFINED) + money64 price = MONEY64_UNDEFINED; + if (selectedScenery.IsUndefined() && gSceneryPlaceCost != MONEY64_UNDEFINED) { price = gSceneryPlaceCost; } @@ -1118,7 +1390,7 @@ private: { case SCENERY_TYPE_SMALL: { - auto* sceneryEntry = GetSmallSceneryEntry(selectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selectedScenery.EntryIndex); if (sceneryEntry != nullptr) { price = sceneryEntry->price; @@ -1128,7 +1400,7 @@ private: } case SCENERY_TYPE_PATH_ITEM: { - auto* sceneryEntry = GetFootpathItemEntry(selectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selectedScenery.EntryIndex); if (sceneryEntry != nullptr) { price = sceneryEntry->price; @@ -1138,7 +1410,7 @@ private: } case SCENERY_TYPE_WALL: { - auto* sceneryEntry = GetWallEntry(selectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selectedScenery.EntryIndex); if (sceneryEntry != nullptr) { price = sceneryEntry->price; @@ -1148,7 +1420,7 @@ private: } case SCENERY_TYPE_LARGE: { - auto* sceneryEntry = GetLargeSceneryEntry(selectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selectedScenery.EntryIndex); if (sceneryEntry != nullptr) { price = sceneryEntry->price; @@ -1158,7 +1430,8 @@ private: } case SCENERY_TYPE_BANNER: { - auto* sceneryEntry = GetBannerEntry(selectedScenery.EntryIndex); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry( + selectedScenery.EntryIndex); if (sceneryEntry != nullptr) { price = sceneryEntry->price; @@ -1171,33 +1444,33 @@ private: return { name, price }; } - void DrawTabs(rct_drawpixelinfo& dpi, const ScreenCoordsXY& offset) + void DrawTabs(DrawPixelInfo& dpi, const ScreenCoordsXY& offset) { for (size_t tabIndex = 0; tabIndex < _tabEntries.size(); tabIndex++) { auto widgetIndex = static_cast(WIDX_SCENERY_TAB_1 + tabIndex); - auto scgEntry = _tabEntries[tabIndex].GetSceneryGroupEntry(); - if (scgEntry != nullptr) + auto widgetCoordsXY = ScreenCoordsXY(widgets[widgetIndex].left, widgets[widgetIndex].top); + + if (_tabEntries[tabIndex].IsAll()) { - auto imageOffset = tabIndex == _activeTabIndex ? 1 : 0; - auto imageId = ImageId(scgEntry->image + imageOffset, colours[1]); - gfx_draw_sprite(&dpi, imageId, offset + ScreenCoordsXY{ widgets[widgetIndex].left, widgets[widgetIndex].top }); + auto imageId = ImageId(SPR_G2_INFINITY, FilterPaletteID::PaletteNull); + GfxDrawSprite(&dpi, imageId, offset + widgetCoordsXY + ScreenCoordsXY(2, 6)); } } } - void DrawSceneryItem(rct_drawpixelinfo& dpi, ScenerySelection scenerySelection) + void DrawSceneryItem(DrawPixelInfo& dpi, ScenerySelection scenerySelection) { if (scenerySelection.SceneryType == SCENERY_TYPE_BANNER) { - auto bannerEntry = GetBannerEntry(scenerySelection.EntryIndex); + auto bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(scenerySelection.EntryIndex); auto imageId = ImageId(bannerEntry->image + gWindowSceneryRotation * 2, gWindowSceneryPrimaryColour); - gfx_draw_sprite(&dpi, imageId, { 33, 40 }); - gfx_draw_sprite(&dpi, imageId.WithIndexOffset(1), { 33, 40 }); + GfxDrawSprite(&dpi, imageId, { 33, 40 }); + GfxDrawSprite(&dpi, imageId.WithIndexOffset(1), { 33, 40 }); } else if (scenerySelection.SceneryType == SCENERY_TYPE_LARGE) { - auto sceneryEntry = GetLargeSceneryEntry(scenerySelection.EntryIndex); + auto sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(scenerySelection.EntryIndex); auto imageId = ImageId(sceneryEntry->image + gWindowSceneryRotation); if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR) imageId = imageId.WithPrimary(gWindowSceneryPrimaryColour); @@ -1205,11 +1478,11 @@ private: imageId = imageId.WithSecondary(gWindowScenerySecondaryColour); if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_TERTIARY_COLOUR) imageId = imageId.WithTertiary(gWindowSceneryTertiaryColour); - gfx_draw_sprite(&dpi, imageId, { 33, 0 }); + GfxDrawSprite(&dpi, imageId, { 33, 0 }); } else if (scenerySelection.SceneryType == SCENERY_TYPE_WALL) { - auto wallEntry = GetWallEntry(scenerySelection.EntryIndex); + auto wallEntry = OpenRCT2::ObjectManager::GetObjectEntry(scenerySelection.EntryIndex); auto imageId = ImageId(wallEntry->image); auto spriteTop = (wallEntry->height * 2) + 0x32; if (wallEntry->flags & WALL_SCENERY_HAS_GLASS) @@ -1219,10 +1492,10 @@ private: { imageId = imageId.WithSecondary(gWindowScenerySecondaryColour); } - gfx_draw_sprite(&dpi, imageId, { 47, spriteTop }); + GfxDrawSprite(&dpi, imageId, { 47, spriteTop }); auto glassImageId = ImageId(wallEntry->image + 6).WithTransparency(gWindowSceneryPrimaryColour); - gfx_draw_sprite(&dpi, glassImageId, { 47, spriteTop }); + GfxDrawSprite(&dpi, glassImageId, { 47, spriteTop }); } else { @@ -1235,23 +1508,23 @@ private: imageId = imageId.WithTertiary(gWindowSceneryTertiaryColour); } } - gfx_draw_sprite(&dpi, imageId, { 47, spriteTop }); + GfxDrawSprite(&dpi, imageId, { 47, spriteTop }); if (wallEntry->flags & WALL_SCENERY_IS_DOOR) { - gfx_draw_sprite(&dpi, imageId.WithIndexOffset(1), { 47, spriteTop }); + GfxDrawSprite(&dpi, imageId.WithIndexOffset(1), { 47, spriteTop }); } } } else if (scenerySelection.SceneryType == SCENERY_TYPE_PATH_ITEM) { - auto* pathBitEntry = GetFootpathItemEntry(scenerySelection.EntryIndex); + auto* pathBitEntry = OpenRCT2::ObjectManager::GetObjectEntry(scenerySelection.EntryIndex); auto imageId = ImageId(pathBitEntry->image); - gfx_draw_sprite(&dpi, imageId, { 11, 16 }); + GfxDrawSprite(&dpi, imageId, { 11, 16 }); } else { - auto sceneryEntry = GetSmallSceneryEntry(scenerySelection.EntryIndex); + auto sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(scenerySelection.EntryIndex); auto imageId = ImageId(sceneryEntry->image + gWindowSceneryRotation); if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) { @@ -1272,26 +1545,26 @@ private: spriteTop -= 12; } - gfx_draw_sprite(&dpi, imageId, { 32, spriteTop }); + GfxDrawSprite(&dpi, imageId, { 32, spriteTop }); if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_HAS_GLASS)) { imageId = ImageId(sceneryEntry->image + 4 + gWindowSceneryRotation) .WithTransparency(gWindowSceneryPrimaryColour); - gfx_draw_sprite(&dpi, imageId, { 32, spriteTop }); + GfxDrawSprite(&dpi, imageId, { 32, spriteTop }); } if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ANIMATED_FG)) { imageId = ImageId(sceneryEntry->image + 4 + gWindowSceneryRotation); - gfx_draw_sprite(&dpi, imageId, { 32, spriteTop }); + GfxDrawSprite(&dpi, imageId, { 32, spriteTop }); } } } - void ContentScrollDraw(rct_drawpixelinfo& dpi) + void ContentScrollDraw(DrawPixelInfo& dpi) { - gfx_clear(&dpi, ColourMapA[colours[1]].mid_light); + GfxClear(&dpi, ColourMapA[colours[1]].mid_light); auto numColumns = GetNumColumns(); auto tabIndex = _activeTabIndex; @@ -1302,16 +1575,15 @@ private: ScreenCoordsXY topLeft{ 0, 0 }; - const auto& tabInfo = _tabEntries[tabIndex]; - for (size_t sceneryTabItemIndex = 0; sceneryTabItemIndex < tabInfo.Entries.size(); sceneryTabItemIndex++) + for (size_t sceneryTabItemIndex = 0; sceneryTabItemIndex < _filteredSceneryTab.Entries.size(); sceneryTabItemIndex++) { - const auto& currentSceneryGlobal = tabInfo.Entries[sceneryTabItemIndex]; + const auto& currentSceneryGlobal = _filteredSceneryTab.Entries[sceneryTabItemIndex]; const auto tabSelectedScenery = GetSelectedScenery(tabIndex); if (gWindowSceneryPaintEnabled == 1 || gWindowSceneryEyedropperEnabled) { if (_selectedScenery == currentSceneryGlobal) { - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { topLeft, topLeft + ScreenCoordsXY{ SCENERY_BUTTON_WIDTH - 1, SCENERY_BUTTON_HEIGHT - 1 } }, colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT); } @@ -1320,20 +1592,20 @@ private: { if (tabSelectedScenery == currentSceneryGlobal) { - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { topLeft, topLeft + ScreenCoordsXY{ SCENERY_BUTTON_WIDTH - 1, SCENERY_BUTTON_HEIGHT - 1 } }, colours[1], (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_MID_LIGHT)); } else if (_selectedScenery == currentSceneryGlobal) { - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { topLeft, topLeft + ScreenCoordsXY{ SCENERY_BUTTON_WIDTH - 1, SCENERY_BUTTON_HEIGHT - 1 } }, colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT); } } - rct_drawpixelinfo clipdpi; - if (clip_drawpixelinfo( + DrawPixelInfo clipdpi; + if (ClipDrawPixelInfo( &clipdpi, &dpi, topLeft + ScreenCoordsXY{ 1, 1 }, SCENERY_BUTTON_WIDTH - 2, SCENERY_BUTTON_HEIGHT - 2)) { DrawSceneryItem(clipdpi, currentSceneryGlobal); @@ -1349,9 +1621,9 @@ private: } }; -rct_window* WindowSceneryOpen() +WindowBase* WindowSceneryOpen() { - auto* w = static_cast(window_bring_to_front_by_class(WindowClass::Scenery)); + auto* w = static_cast(WindowBringToFrontByClass(WindowClass::Scenery)); if (w == nullptr) { w = WindowCreate(WindowClass::Scenery); @@ -1363,7 +1635,7 @@ void WindowScenerySetSelectedItem( const ScenerySelection& scenery, const std::optional primary, const std::optional secondary, const std::optional tertiary, const std::optional rotation) { - auto* w = static_cast(window_bring_to_front_by_class(WindowClass::Scenery)); + auto* w = static_cast(WindowBringToFrontByClass(WindowClass::Scenery)); if (w != nullptr) { w->SetSelectedItem(scenery, primary, secondary, tertiary, rotation); @@ -1373,7 +1645,7 @@ void WindowScenerySetSelectedItem( void WindowScenerySetSelectedTab(const ObjectEntryIndex sceneryGroupIndex) { // Should this bring to front? - auto* w = static_cast(window_find_by_class(WindowClass::Scenery)); + auto* w = static_cast(WindowFindByClass(WindowClass::Scenery)); if (w != nullptr) { return w->SetSelectedTab(sceneryGroupIndex); @@ -1399,7 +1671,7 @@ void WindowScenerySetDefaultPlacementConfiguration() const ScenerySelection WindowSceneryGetTabSelection() { - auto* w = static_cast(window_find_by_class(WindowClass::Scenery)); + auto* w = static_cast(WindowFindByClass(WindowClass::Scenery)); if (w != nullptr) { return w->GetTabSelection(); @@ -1412,7 +1684,7 @@ const ScenerySelection WindowSceneryGetTabSelection() void WindowSceneryInit() { - auto* w = static_cast(window_find_by_class(WindowClass::Scenery)); + auto* w = static_cast(WindowFindByClass(WindowClass::Scenery)); if (w != nullptr) { w->Init(); diff --git a/src/openrct2-ui/windows/SceneryScatter.cpp b/src/openrct2-ui/windows/SceneryScatter.cpp index 6e9a21947d..4ad66748ad 100644 --- a/src/openrct2-ui/windows/SceneryScatter.cpp +++ b/src/openrct2-ui/windows/SceneryScatter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,12 +35,12 @@ uint16_t gWindowSceneryScatterSize; ScatterToolDensity gWindowSceneryScatterDensity; // clang-format off -static rct_widget window_scenery_scatter_widgets[] = { +static Widget window_scenery_scatter_widgets[] = { MakeWidget ({ 0, 0}, {86, 100}, WindowWidgetType::Frame, WindowColour::Secondary ), // panel / background MakeWidget ({ 1, 1}, {84, 14}, WindowWidgetType::Caption, WindowColour::Primary , STR_SCENERY_SCATTER, STR_WINDOW_TITLE_TIP ), // title bar MakeWidget ({73, 2}, {11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary , STR_CLOSE_X, STR_CLOSE_WINDOW_TIP ), // close x button - MakeWidget ({20, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Secondary, SPR_LAND_TOOL_SIZE_0 ), // preview box + MakeWidget ({20, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Secondary, ImageId(SPR_LAND_TOOL_SIZE_0) ), // preview box MakeRemapWidget({21, 18}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP ), // decrement size MakeRemapWidget({47, 32}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Secondary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP ), // increment size @@ -52,7 +52,7 @@ static rct_widget window_scenery_scatter_widgets[] = { }; // clang-format on -class SceneryScatterWindow final : public rct_window +class SceneryScatterWindow final : public WindowBase { public: void OnOpen() override @@ -60,7 +60,7 @@ public: widgets = window_scenery_scatter_widgets; hold_down_widgets = (1uLL << WIDX_INCREMENT) | (1uLL << WIDX_DECREMENT); WindowInitScrollWidgets(*this); - window_push_others_below(*this); + WindowPushOthersBelow(*this); gWindowSceneryScatterEnabled = true; gWindowSceneryScatterSize = 16; @@ -93,7 +93,7 @@ public: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_PREVIEW: @@ -173,10 +173,10 @@ public: } // Update the preview image (for tool sizes up to 7) - widgets[WIDX_PREVIEW].image = LandTool::SizeToSpriteIndex(gWindowSceneryScatterSize); + widgets[WIDX_PREVIEW].image = ImageId(LandTool::SizeToSpriteIndex(gWindowSceneryScatterSize)); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); @@ -187,15 +187,15 @@ public: const auto screenCoords = ScreenCoordsXY{ windowPos.x + preview.midX(), windowPos.y + preview.midY() }; auto ft = Formatter(); ft.Add(gWindowSceneryScatterSize); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } } }; -rct_window* WindowSceneryScatterOpen() +WindowBase* WindowSceneryScatterOpen() { // Check if window is already open - auto* window = window_find_by_class(WindowClass::SceneryScatter); + auto* window = WindowFindByClass(WindowClass::SceneryScatter); if (window == nullptr) { window = WindowCreate(WindowClass::SceneryScatter, 86, 100); diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index dd8496bb89..479afa176d 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,7 +60,7 @@ enum }; // clang-format off -static rct_widget window_server_list_widgets[] = { +static Widget window_server_list_widgets[] = { MakeWidget({ 0, 0}, {341, 91}, WindowWidgetType::Frame, WindowColour::Primary ), // panel / background MakeWidget({ 1, 1}, {338, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_SERVER_LIST, STR_WINDOW_TITLE_TIP), // title bar MakeWidget({327, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), // close x button @@ -73,19 +73,19 @@ static rct_widget window_server_list_widgets[] = { }; // clang-format on -static void WindowServerListClose(rct_window* w); -static void WindowServerListMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowServerListResize(rct_window* w); -static void WindowServerListDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowServerListUpdate(rct_window* w); -static void WindowServerListScrollGetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height); -static void WindowServerListScrollMousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowServerListScrollMouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, char* text); -static OpenRCT2String WindowServerListTooltip(rct_window* const w, const WidgetIndex widgetIndex, StringId fallback); -static void WindowServerListInvalidate(rct_window* w); -static void WindowServerListPaint(rct_window* w, rct_drawpixelinfo* dpi); -static void WindowServerListScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex); +static void WindowServerListClose(WindowBase* w); +static void WindowServerListMouseup(WindowBase* w, WidgetIndex widgetIndex); +static void WindowServerListResize(WindowBase* w); +static void WindowServerListDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +static void WindowServerListUpdate(WindowBase* w); +static void WindowServerListScrollGetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height); +static void WindowServerListScrollMousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowServerListScrollMouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +static void WindowServerListTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text); +static OpenRCT2String WindowServerListTooltip(WindowBase* const w, const WidgetIndex widgetIndex, StringId fallback); +static void WindowServerListInvalidate(WindowBase* w); +static void WindowServerListPaint(WindowBase* w, DrawPixelInfo* dpi); +static void WindowServerListScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex); static WindowEventList window_server_list_events([](auto& events) { events.close = &WindowServerListClose; @@ -114,14 +114,14 @@ static std::string _version; static void JoinServer(std::string address); static void ServerListFetchServersBegin(); -static void ServerListFetchServersCheck(rct_window* w); +static void ServerListFetchServersCheck(WindowBase* w); -rct_window* WindowServerListOpen() +WindowBase* WindowServerListOpen() { - rct_window* window; + WindowBase* window; // Check if window is already open - window = window_bring_to_front_by_class(WindowClass::ServerList); + window = WindowBringToFrontByClass(WindowClass::ServerList); if (window != nullptr) return window; @@ -142,9 +142,9 @@ rct_window* WindowServerListOpen() window->page = 0; window->list_information_type = 0; - window_set_resize(*window, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); + WindowSetResize(*window, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); - safe_strcpy(_playerName, gConfigNetwork.PlayerName.c_str(), sizeof(_playerName)); + SafeStrCpy(_playerName, gConfigNetwork.PlayerName.c_str(), sizeof(_playerName)); window->no_list_items = static_cast(_serverList.GetCount()); @@ -153,21 +153,21 @@ rct_window* WindowServerListOpen() return window; } -static void WindowServerListClose(rct_window* w) +static void WindowServerListClose(WindowBase* w) { _serverList = {}; _fetchFuture = {}; } -static void WindowServerListMouseup(rct_window* w, WidgetIndex widgetIndex) +static void WindowServerListMouseup(WindowBase* w, WidgetIndex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: - window_close(*w); + WindowClose(*w); break; case WIDX_PLAYER_NAME_INPUT: - window_start_textbox(*w, widgetIndex, STR_STRING, _playerName, 63); + WindowStartTextbox(*w, widgetIndex, STR_STRING, _playerName, 63); break; case WIDX_LIST: { @@ -200,12 +200,12 @@ static void WindowServerListMouseup(rct_window* w, WidgetIndex widgetIndex) } } -static void WindowServerListResize(rct_window* w) +static void WindowServerListResize(WindowBase* w) { - window_set_resize(*w, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); + WindowSetResize(*w, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); } -static void WindowServerListDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +static void WindowServerListDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { auto serverIndex = w->selected_list_item; if (serverIndex >= 0 && serverIndex < static_cast(_serverList.GetCount())) @@ -235,23 +235,23 @@ static void WindowServerListDropdown(rct_window* w, WidgetIndex widgetIndex, int } } -static void WindowServerListUpdate(rct_window* w) +static void WindowServerListUpdate(WindowBase* w) { if (gCurrentTextBox.window.classification == w->classification && gCurrentTextBox.window.number == w->number) { - window_update_textbox_caret(); - widget_invalidate(*w, WIDX_PLAYER_NAME_INPUT); + WindowUpdateTextboxCaret(); + WidgetInvalidate(*w, WIDX_PLAYER_NAME_INPUT); } ServerListFetchServersCheck(w); } -static void WindowServerListScrollGetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +static void WindowServerListScrollGetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { *width = 0; *height = w->no_list_items * ITEM_HEIGHT; } -static void WindowServerListScrollMousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowServerListScrollMousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { int32_t serverIndex = w->selected_list_item; if (serverIndex >= 0 && serverIndex < static_cast(_serverList.GetCount())) @@ -275,7 +275,7 @@ static void WindowServerListScrollMousedown(rct_window* w, int32_t scrollIndex, } } -static void WindowServerListScrollMouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +static void WindowServerListScrollMouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { auto& listWidget = w->widgets[WIDX_LIST]; @@ -303,9 +303,9 @@ static void WindowServerListScrollMouseover(rct_window* w, int32_t scrollIndex, } } -static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, char* text) +static void WindowServerListTextinput(WindowBase* w, WidgetIndex widgetIndex, const char* text) { - if (text == nullptr || text[0] == 0) + if (text == nullptr) return; switch (widgetIndex) @@ -314,19 +314,16 @@ static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, ch if (strcmp(_playerName, text) == 0) return; - std::fill_n(_playerName, sizeof(_playerName), 0x00); - if (text[0] != '\0') - { - safe_strcpy(_playerName, text, sizeof(_playerName)); - } + SafeStrCpy(_playerName, text, sizeof(_playerName)); + // Don't allow empty player names if (_playerName[0] != '\0') { gConfigNetwork.PlayerName = _playerName; ConfigSaveDefault(); } - widget_invalidate(*w, WIDX_PLAYER_NAME_INPUT); + WidgetInvalidate(*w, WIDX_PLAYER_NAME_INPUT); break; case WIDX_ADD_SERVER: @@ -343,14 +340,14 @@ static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, ch } } -static OpenRCT2String WindowServerListTooltip(rct_window* const w, const WidgetIndex widgetIndex, StringId fallback) +static OpenRCT2String WindowServerListTooltip(WindowBase* const w, const WidgetIndex widgetIndex, StringId fallback) { auto ft = Formatter(); ft.Add(_version.c_str()); return { fallback, ft }; } -static void WindowServerListInvalidate(rct_window* w) +static void WindowServerListInvalidate(WindowBase* w) { w->ResizeFrame(); @@ -374,30 +371,31 @@ static void WindowServerListInvalidate(rct_window* w) w->no_list_items = static_cast(_serverList.GetCount()); } -static void WindowServerListPaint(rct_window* w, rct_drawpixelinfo* dpi) +static void WindowServerListPaint(WindowBase* w, DrawPixelInfo* dpi) { WindowDrawWidgets(*w, dpi); DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 6, w->widgets[WIDX_PLAYER_NAME_INPUT].top }, STR_PLAYER_NAME, {}, { COLOUR_WHITE }); + *dpi, w->windowPos + ScreenCoordsXY{ 6, w->widgets[WIDX_PLAYER_NAME_INPUT].top }, STR_PLAYER_NAME, {}, + { COLOUR_WHITE }); // Draw version number - std::string version = network_get_version(); + std::string version = NetworkGetVersion(); auto ft = Formatter(); ft.Add(version.c_str()); DrawTextBasic( - dpi, w->windowPos + ScreenCoordsXY{ 324, w->widgets[WIDX_START_SERVER].top + 1 }, STR_NETWORK_VERSION, ft, + *dpi, w->windowPos + ScreenCoordsXY{ 324, w->widgets[WIDX_START_SERVER].top + 1 }, STR_NETWORK_VERSION, ft, { COLOUR_WHITE }); ft = Formatter(); ft.Add(_numPlayersOnline); - DrawTextBasic(dpi, w->windowPos + ScreenCoordsXY{ 8, w->height - 15 }, _statusText, ft, { COLOUR_WHITE }); + DrawTextBasic(*dpi, w->windowPos + ScreenCoordsXY{ 8, w->height - 15 }, _statusText, ft, { COLOUR_WHITE }); } -static void WindowServerListScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +static void WindowServerListScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light; - gfx_clear(dpi, paletteIndex); + GfxClear(dpi, paletteIndex); auto& listWidget = w->widgets[WIDX_LIST]; int32_t width = listWidget.width(); @@ -415,7 +413,7 @@ static void WindowServerListScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i // Draw hover highlight if (highlighted) { - gfx_filter_rect(dpi, { 0, screenCoords.y, width, screenCoords.y + ITEM_HEIGHT }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(dpi, { 0, screenCoords.y, width, screenCoords.y + ITEM_HEIGHT }, FilterPaletteID::PaletteDarken1); _version = serverDetails.Version; } @@ -437,7 +435,7 @@ static void WindowServerListScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i { snprintf(players, sizeof(players), "%d/%d", serverDetails.Players, serverDetails.MaxPlayers); } - const int16_t numPlayersStringWidth = gfx_get_string_width(players, FontStyle::Medium); + const int16_t numPlayersStringWidth = GfxGetStringWidth(players, FontStyle::Medium); // How much space we have for the server info depends on the size of everything rendered after. const int16_t spaceAvailableForInfo = width - numPlayersStringWidth - SCROLLBAR_WIDTH - 35; @@ -452,7 +450,7 @@ static void WindowServerListScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i // Finally, draw the server information. auto ft = Formatter(); ft.Add(serverInfoToShow); - DrawTextEllipsised(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, spaceAvailableForInfo, STR_STRING, ft, { colour }); + DrawTextEllipsised(*dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, spaceAvailableForInfo, STR_STRING, ft, { colour }); int32_t right = width - 7 - SCROLLBAR_WIDTH; @@ -467,23 +465,23 @@ static void WindowServerListScrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i else { // Server online... check version - bool correctVersion = serverDetails.Version == network_get_version(); + bool correctVersion = serverDetails.Version == NetworkGetVersion(); compatibilitySpriteId = correctVersion ? SPR_G2_RCT1_OPEN_BUTTON_2 : SPR_G2_RCT1_CLOSE_BUTTON_2; } - gfx_draw_sprite(dpi, ImageId(compatibilitySpriteId), { right, screenCoords.y + 1 }); + GfxDrawSprite(dpi, ImageId(compatibilitySpriteId), { right, screenCoords.y + 1 }); right -= 4; // Draw lock icon right -= 8; if (serverDetails.RequiresPassword) { - gfx_draw_sprite(dpi, ImageId(SPR_G2_LOCKED), { right, screenCoords.y + 4 }); + GfxDrawSprite(dpi, ImageId(SPR_G2_LOCKED), { right, screenCoords.y + 4 }); } right -= 6; // Draw number of players screenCoords.x = right - numPlayersStringWidth; - gfx_draw_string(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, players, { w->colours[1] }); + GfxDrawString(*dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, players, { w->colours[1] }); screenCoords.y += ITEM_HEIGHT; } @@ -514,7 +512,7 @@ static void JoinServer(std::string address) address = address.substr(beginBracketIndex + 1, endBracketIndex - beginBracketIndex - 1); } - if (!network_begin_client(address, port)) + if (!NetworkBeginClient(address, port)) { ContextShowError(STR_UNABLE_TO_CONNECT_TO_SERVER, STR_NONE, {}); } @@ -566,7 +564,7 @@ static void ServerListFetchServersBegin() }); } -static void ServerListFetchServersCheck(rct_window* w) +static void ServerListFetchServersCheck(WindowBase* w) { if (_fetchFuture.valid()) { @@ -592,7 +590,7 @@ static void ServerListFetchServersCheck(rct_window* w) catch (const std::exception& e) { _statusText = STR_SERVER_LIST_NO_CONNECTION; - log_warning("Unable to connect to master server: %s", e.what()); + LOG_WARNING("Unable to connect to master server: %s", e.what()); } _fetchFuture = {}; w->Invalidate(); diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index c6bba0558c..bf9d4f934d 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -45,7 +45,7 @@ enum { static constexpr const int32_t WW = 300; static constexpr const int32_t WH = 154; -static rct_widget _windowServerStartWidgets[] = { +static Widget _windowServerStartWidgets[] = { MakeWidget({ 0, 0 }, { WW, WH }, WindowWidgetType::Frame, WindowColour::Primary), // panel / background MakeWidget({ 1, 1 }, { 298, 14 }, WindowWidgetType::Caption, WindowColour::Primary, STR_START_SERVER,STR_WINDOW_TITLE_TIP), // title bar MakeWidget({ WW - 13, 2 }, { 11, 12 }, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X,STR_CLOSE_WINDOW_TIP), // close x button @@ -85,9 +85,9 @@ public: list_information_type = 0; snprintf(_port, 7, "%u", gConfigNetwork.DefaultPort); - safe_strcpy(_name, gConfigNetwork.ServerName.c_str(), sizeof(_name)); - safe_strcpy(_description, gConfigNetwork.ServerDescription.c_str(), sizeof(_description)); - safe_strcpy(_greeting, gConfigNetwork.ServerGreeting.c_str(), sizeof(_greeting)); + SafeStrCpy(_name, gConfigNetwork.ServerName.c_str(), sizeof(_name)); + SafeStrCpy(_description, gConfigNetwork.ServerDescription.c_str(), sizeof(_description)); + SafeStrCpy(_greeting, gConfigNetwork.ServerGreeting.c_str(), sizeof(_greeting)); } void OnMouseUp(WidgetIndex widgetIndex) override { @@ -97,19 +97,19 @@ public: Close(); break; case WIDX_PORT_INPUT: - window_start_textbox(*this, widgetIndex, STR_STRING, _port, 6); + WindowStartTextbox(*this, widgetIndex, STR_STRING, _port, 6); break; case WIDX_NAME_INPUT: - window_start_textbox(*this, widgetIndex, STR_STRING, _name, 64); + WindowStartTextbox(*this, widgetIndex, STR_STRING, _name, 64); break; case WIDX_DESCRIPTION_INPUT: - window_start_textbox(*this, widgetIndex, STR_STRING, _description, MAX_SERVER_DESCRIPTION_LENGTH); + WindowStartTextbox(*this, widgetIndex, STR_STRING, _description, MAX_SERVER_DESCRIPTION_LENGTH); break; case WIDX_GREETING_INPUT: - window_start_textbox(*this, widgetIndex, STR_STRING, _greeting, CHAT_INPUT_SIZE); + WindowStartTextbox(*this, widgetIndex, STR_STRING, _greeting, CHAT_INPUT_SIZE); break; case WIDX_PASSWORD_INPUT: - window_start_textbox(*this, widgetIndex, STR_STRING, _password, 32); + WindowStartTextbox(*this, widgetIndex, STR_STRING, _password, 32); break; case WIDX_MAXPLAYERS_INCREASE: if (gConfigNetwork.Maxplayers < 255) @@ -133,14 +133,14 @@ public: Invalidate(); break; case WIDX_START_SERVER: - network_set_password(_password); + NetworkSetPassword(_password); WindowScenarioselectOpen(ScenarioSelectCallback, false); break; case WIDX_LOAD_SERVER: - network_set_password(_password); + NetworkSetPassword(_password); auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); - intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(LoadSaveCallback)); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(LoadSaveCallback)); ContextOpenIntent(&intent); break; } @@ -158,19 +158,17 @@ public: { if (gCurrentTextBox.window.classification == classification && gCurrentTextBox.window.number == number) { - window_update_textbox_caret(); - widget_invalidate(*this, WIDX_NAME_INPUT); - widget_invalidate(*this, WIDX_DESCRIPTION_INPUT); - widget_invalidate(*this, WIDX_GREETING_INPUT); - widget_invalidate(*this, WIDX_PASSWORD_INPUT); + WindowUpdateTextboxCaret(); + WidgetInvalidate(*this, WIDX_NAME_INPUT); + WidgetInvalidate(*this, WIDX_DESCRIPTION_INPUT); + WidgetInvalidate(*this, WIDX_GREETING_INPUT); + WidgetInvalidate(*this, WIDX_PASSWORD_INPUT); } } void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override { - if (text.empty()) - return; - std::string temp = static_cast(text); + int tempPort = 0; switch (widgetIndex) { @@ -178,99 +176,76 @@ public: if (strcmp(_port, temp.c_str()) == 0) return; - std::fill_n(_port, sizeof(_port), 0x00); - if (text[0] != '\0') + SafeStrCpy(_port, temp.c_str(), sizeof(_port)); + + // Don't allow negative/zero for port number + tempPort = atoi(_port); + if (tempPort > 0) { - safe_strcpy(_port, temp.c_str(), sizeof(_port)); + gConfigNetwork.DefaultPort = tempPort; + ConfigSaveDefault(); } - gConfigNetwork.DefaultPort = atoi(_port); - ConfigSaveDefault(); - - widget_invalidate(*this, WIDX_NAME_INPUT); + WidgetInvalidate(*this, WIDX_PORT_INPUT); break; case WIDX_NAME_INPUT: if (strcmp(_name, temp.c_str()) == 0) return; - std::fill_n(_name, sizeof(_name), 0x00); - if (text[0] != '\0') - { - safe_strcpy(_name, temp.c_str(), sizeof(_name)); - } + SafeStrCpy(_name, temp.c_str(), sizeof(_name)); + // Don't allow empty server names if (_name[0] != '\0') { gConfigNetwork.ServerName = _name; ConfigSaveDefault(); } - widget_invalidate(*this, WIDX_NAME_INPUT); + WidgetInvalidate(*this, WIDX_NAME_INPUT); break; case WIDX_DESCRIPTION_INPUT: if (strcmp(_description, temp.c_str()) == 0) return; - std::fill_n(_description, sizeof(_description), 0x00); - if (text[0] != '\0') - { - safe_strcpy(_description, temp.c_str(), sizeof(_description)); - } + SafeStrCpy(_description, temp.c_str(), sizeof(_description)); + gConfigNetwork.ServerDescription = _description; + ConfigSaveDefault(); - if (_description[0] != '\0') - { - gConfigNetwork.ServerDescription = _description; - ConfigSaveDefault(); - } - - widget_invalidate(*this, WIDX_DESCRIPTION_INPUT); + WidgetInvalidate(*this, WIDX_DESCRIPTION_INPUT); break; case WIDX_GREETING_INPUT: if (strcmp(_greeting, temp.c_str()) == 0) return; - std::fill_n(_greeting, sizeof(_greeting), 0x00); - if (text[0] != '\0') - { - safe_strcpy(_greeting, temp.c_str(), sizeof(_greeting)); - } + SafeStrCpy(_greeting, temp.c_str(), sizeof(_greeting)); + gConfigNetwork.ServerGreeting = _greeting; + ConfigSaveDefault(); - if (_greeting[0] != '\0') - { - gConfigNetwork.ServerGreeting = _greeting; - ConfigSaveDefault(); - } - - widget_invalidate(*this, WIDX_GREETING_INPUT); + WidgetInvalidate(*this, WIDX_GREETING_INPUT); break; case WIDX_PASSWORD_INPUT: if (strcmp(_password, temp.c_str()) == 0) return; - std::fill_n(_password, sizeof(_password), 0x00); - if (text[0] != '\0') - { - safe_strcpy(_password, temp.c_str(), sizeof(_password)); - } + SafeStrCpy(_password, temp.c_str(), sizeof(_password)); - widget_invalidate(*this, WIDX_PASSWORD_INPUT); + WidgetInvalidate(*this, WIDX_PASSWORD_INPUT); break; } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PORT_INPUT].top }, STR_PORT, {}, { colours[1] }); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_NAME_INPUT].top }, STR_SERVER_NAME, {}, { colours[1] }); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PORT_INPUT].top }, STR_PORT, {}, { colours[1] }); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_NAME_INPUT].top }, STR_SERVER_NAME, {}, { colours[1] }); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_DESCRIPTION_INPUT].top }, STR_SERVER_DESCRIPTION, {}, + dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_DESCRIPTION_INPUT].top }, STR_SERVER_DESCRIPTION, {}, { colours[1] }); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_GREETING_INPUT].top }, STR_SERVER_GREETING, {}, { colours[1] }); - DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PASSWORD_INPUT].top }, STR_PASSWORD, {}, { colours[1] }); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_MAXPLAYERS].top }, STR_MAX_PLAYERS, {}, { colours[1] }); + dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_GREETING_INPUT].top }, STR_SERVER_GREETING, {}, { colours[1] }); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PASSWORD_INPUT].top }, STR_PASSWORD, {}, { colours[1] }); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_MAXPLAYERS].top }, STR_MAX_PLAYERS, {}, { colours[1] }); } private: @@ -281,10 +256,10 @@ private: char _password[33]; static void ScenarioSelectCallback(const utf8* path) { - game_notify_map_change(); + GameNotifyMapChange(); if (GetContext()->LoadParkFromFile(path, false, true)) { - network_begin_server(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress); + NetworkBeginServer(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress); } } @@ -292,14 +267,14 @@ private: { if (result == MODAL_RESULT_OK) { - game_notify_map_change(); + GameNotifyMapChange(); GetContext()->LoadParkFromFile(path); - network_begin_server(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress); + NetworkBeginServer(gConfigNetwork.DefaultPort, gConfigNetwork.ListenAddress); } } }; -rct_window* WindowServerStartOpen() +WindowBase* WindowServerStartOpen() { return WindowFocusOrCreate(WindowClass::ServerStart, WW, WH, WF_CENTRE_SCREEN); } diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index 9fa5a71bd6..f82e403bd9 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ enum WindowShortcutWidgetIdx }; // clang-format off -static rct_widget window_shortcut_widgets[] = { +static Widget window_shortcut_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({0, 43}, {350, 287}, WindowWidgetType::Resize, WindowColour::Secondary), MakeWidget({4, 47}, {412, 245}, WindowWidgetType::Scroll, WindowColour::Primary, SCROLL_VERTICAL, STR_SHORTCUT_LIST_TIP ), @@ -57,7 +57,7 @@ enum }; // clang-format off -static rct_widget window_shortcut_change_widgets[] = { +static Widget window_shortcut_change_widgets[] = { WINDOW_SHIM(CHANGE_WINDOW_TITLE, CHANGE_WW, CHANGE_WH), MakeWidget({ 75, 56 }, { 100, 14 }, WindowWidgetType::Button, WindowColour::Primary, STR_SHORTCUT_REMOVE, STR_SHORTCUT_REMOVE_TIP), WIDGETS_END, @@ -78,7 +78,7 @@ public: auto registeredShortcut = shortcutManager.GetShortcut(shortcutId); if (registeredShortcut != nullptr) { - window_close_by_class(WindowClass::ChangeKeyboardShortcut); + WindowCloseByClass(WindowClass::ChangeKeyboardShortcut); auto w = WindowCreate( WindowClass::ChangeKeyboardShortcut, CHANGE_WW, CHANGE_WH, WF_CENTRE_SCREEN); if (w != nullptr) @@ -119,7 +119,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -135,7 +135,7 @@ public: ft.Add(STR_STRING); ft.Add(_shortcutCustomName.c_str()); } - DrawTextWrapped(&dpi, stringCoords, 242, STR_SHORTCUT_CHANGE_PROMPT, ft, { TextAlignment::CENTRE }); + DrawTextWrapped(dpi, stringCoords, 242, STR_SHORTCUT_CHANGE_PROMPT, ft, { TextAlignment::CENTRE }); } private: @@ -174,7 +174,7 @@ private: }; std::vector _tabs; - std::vector _widgets; + std::vector _widgets; std::vector _list; int_fast16_t _highlightedItem; size_t _currentTabIndex{}; @@ -195,7 +195,7 @@ public: void OnResize() override { - window_set_resize(*this, min_width, min_height, max_width, max_height); + WindowSetResize(*this, min_width, min_height, max_width, max_height); } void OnUpdate() override @@ -239,7 +239,7 @@ public: widgets[WIDX_SCROLL].bottom = height - 19; widgets[WIDX_RESET].top = height - 16; widgets[WIDX_RESET].bottom = height - 5; - window_align_tabs(this, WIDX_TAB_0, static_cast(WIDX_TAB_0 + _tabs.size())); + WindowAlignTabs(this, WIDX_TAB_0, static_cast(WIDX_TAB_0 + _tabs.size())); // Set selected tab for (size_t i = 0; i < _tabs.size(); i++) @@ -249,7 +249,7 @@ public: SetWidgetPressed(static_cast(WIDX_TAB_0 + _currentTabIndex), true); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(dpi); @@ -295,10 +295,10 @@ public: } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; - gfx_fill_rect( + GfxFillRect( &dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); // TODO: the line below is a workaround for what is presumably a bug with dpi->width @@ -365,12 +365,11 @@ private: // Get shortcuts and sort by group auto shortcuts = GetShortcutsForCurrentTab(); std::stable_sort(shortcuts.begin(), shortcuts.end(), [](const RegisteredShortcut* a, const RegisteredShortcut* b) { - return a->GetGroup().compare(b->GetGroup()) < 0; + return a->OrderIndex < b->OrderIndex; }); // Create list items with a separator between each group _list.clear(); - size_t index = 0; std::string group; for (const auto* shortcut : shortcuts) { @@ -395,7 +394,6 @@ private: ssp.CustomString = shortcut->CustomName; ssp.Binding = shortcut->GetDisplayString(); _list.push_back(std::move(ssp)); - index++; } Invalidate(); @@ -468,7 +466,7 @@ private: RefreshBindings(); } - void DrawTabImages(rct_drawpixelinfo& dpi) const + void DrawTabImages(DrawPixelInfo& dpi) const { for (size_t i = 0; i < _tabs.size(); i++) { @@ -476,7 +474,7 @@ private: } } - void DrawTabImage(rct_drawpixelinfo& dpi, size_t tabIndex) const + void DrawTabImage(DrawPixelInfo& dpi, size_t tabIndex) const { const auto& tabDesc = _tabs[tabIndex]; auto widgetIndex = static_cast(WIDX_TAB_0 + tabIndex); @@ -492,26 +490,25 @@ private: } const auto& widget = widgets[widgetIndex]; - gfx_draw_sprite(&dpi, ImageId(imageId), windowPos + ScreenCoordsXY{ widget.left, widget.top }); + GfxDrawSprite(&dpi, ImageId(imageId), windowPos + ScreenCoordsXY{ widget.left, widget.top }); } } } - void DrawSeparator(rct_drawpixelinfo& dpi, int32_t y, int32_t scrollWidth) + void DrawSeparator(DrawPixelInfo& dpi, int32_t y, int32_t scrollWidth) { const int32_t top = y + (SCROLLABLE_ROW_HEIGHT / 2) - 1; - gfx_fill_rect(&dpi, { { 0, top }, { scrollWidth, top } }, ColourMapA[colours[0]].mid_dark); - gfx_fill_rect(&dpi, { { 0, top + 1 }, { scrollWidth, top + 1 } }, ColourMapA[colours[0]].lightest); + GfxFillRect(&dpi, { { 0, top }, { scrollWidth, top } }, ColourMapA[colours[0]].mid_dark); + GfxFillRect(&dpi, { { 0, top + 1 }, { scrollWidth, top + 1 } }, ColourMapA[colours[0]].lightest); } - void DrawItem( - rct_drawpixelinfo& dpi, int32_t y, int32_t scrollWidth, const ShortcutStringPair& shortcut, bool isHighlighted) + void DrawItem(DrawPixelInfo& dpi, int32_t y, int32_t scrollWidth, const ShortcutStringPair& shortcut, bool isHighlighted) { auto format = STR_BLACK_STRING; if (isHighlighted) { format = STR_WINDOW_COLOUR_2_STRINGID; - gfx_filter_rect(&dpi, { 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2) }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2) }, FilterPaletteID::PaletteDarken1); } auto bindingOffset = (scrollWidth * 2) / 3; @@ -526,30 +523,30 @@ private: ft.Add(STR_STRING); ft.Add(shortcut.CustomString.c_str()); } - DrawTextEllipsised(&dpi, { 0, y - 1 }, bindingOffset, format, ft); + DrawTextEllipsised(dpi, { 0, y - 1 }, bindingOffset, format, ft); if (!shortcut.Binding.empty()) { ft = Formatter(); ft.Add(STR_STRING); ft.Add(shortcut.Binding.c_str()); - DrawTextEllipsised(&dpi, { bindingOffset, y - 1 }, 150, format, ft); + DrawTextEllipsised(dpi, { bindingOffset, y - 1 }, 150, format, ft); } } }; void ChangeShortcutWindow::NotifyShortcutKeysWindow() { - auto w = window_find_by_class(WindowClass::KeyboardShortcutList); + auto w = WindowFindByClass(WindowClass::KeyboardShortcutList); if (w != nullptr) { static_cast(w)->RefreshBindings(); } } -rct_window* WindowShortcutKeysOpen() +WindowBase* WindowShortcutKeysOpen() { - auto w = window_bring_to_front_by_class(WindowClass::KeyboardShortcutList); + auto w = WindowBringToFrontByClass(WindowClass::KeyboardShortcutList); if (w == nullptr) { w = WindowCreate(WindowClass::KeyboardShortcutList, WW, WH, WF_RESIZABLE); diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index effa0e64f9..036b9f4be0 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,9 +19,11 @@ #include #include #include +#include +#include +#include #include #include -#include #include #include @@ -42,11 +44,11 @@ enum WindowSignWidgetIdx { }; // 0x9AEE00 -static rct_widget window_sign_widgets[] = { +static Widget window_sign_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 3, 17}, {85, 60}, WindowWidgetType::Viewport, WindowColour::Secondary, STR_VIEWPORT ), // Viewport - MakeWidget({WW - 25, 19}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RENAME, STR_CHANGE_SIGN_TEXT_TIP ), // change sign button - MakeWidget({WW - 25, 67}, {24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_DEMOLISH_SIGN_TIP ), // demolish button + 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 WIDGETS_END, @@ -130,8 +132,8 @@ public: } // Create viewport - rct_widget& viewportWidget = window_sign_widgets[WIDX_VIEWPORT]; - viewport_create( + Widget& viewportWidget = window_sign_widgets[WIDX_VIEWPORT]; + ViewportCreate( this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 }, viewportWidget.width() - 1, viewportWidget.height() - 1, Focus(CoordsXYZ{ signViewPosition, viewZ })); @@ -187,7 +189,7 @@ public: void OnMouseDown(WidgetIndex widgetIndex) override { - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; switch (widgetIndex) { case WIDX_MAIN_COLOUR: @@ -239,12 +241,12 @@ public: void OnPrepareDraw() override { - rct_widget* main_colour_btn = &window_sign_widgets[WIDX_MAIN_COLOUR]; - rct_widget* text_colour_btn = &window_sign_widgets[WIDX_TEXT_COLOUR]; + Widget* main_colour_btn = &window_sign_widgets[WIDX_MAIN_COLOUR]; + Widget* text_colour_btn = &window_sign_widgets[WIDX_TEXT_COLOUR]; if (_isSmall) { - auto* wallEntry = GetWallEntry(_sceneryEntry); + auto* wallEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryEntry); main_colour_btn->type = WindowWidgetType::Empty; text_colour_btn->type = WindowWidgetType::Empty; @@ -260,7 +262,7 @@ public: } else { - auto* sceneryEntry = GetLargeSceneryEntry(_sceneryEntry); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryEntry); main_colour_btn->type = WindowWidgetType::Empty; text_colour_btn->type = WindowWidgetType::Empty; @@ -275,17 +277,17 @@ public: } } - main_colour_btn->image = GetColourButtonImage(_mainColour).ToUInt32(); - text_colour_btn->image = GetColourButtonImage(_textColour).ToUInt32(); + main_colour_btn->image = GetColourButtonImage(_mainColour); + text_colour_btn->image = GetColourButtonImage(_textColour); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); if (viewport != nullptr) { - window_draw_viewport(&dpi, *this); + WindowDrawViewport(&dpi, *this); } } @@ -302,8 +304,8 @@ public: auto signViewPos = CoordsXYZ{ banner->position.ToCoordsXY().ToTileCentre(), frame_no }; // Create viewport - rct_widget* viewportWidget = &window_sign_widgets[WIDX_VIEWPORT]; - viewport_create( + Widget* viewportWidget = &window_sign_widgets[WIDX_VIEWPORT]; + ViewportCreate( this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, viewportWidget->width() - 1, viewportWidget->height() - 1, Focus(CoordsXYZ{ signViewPos })); if (viewport != nullptr) @@ -316,9 +318,9 @@ public: * * rct2: 0x006BA305 */ -rct_window* WindowSignOpen(rct_windownumber number) +WindowBase* WindowSignOpen(rct_windownumber number) { - auto* w = static_cast(window_bring_to_front_by_number(WindowClass::Banner, number)); + auto* w = static_cast(WindowBringToFrontByNumber(WindowClass::Banner, number)); if (w != nullptr) return w; @@ -339,9 +341,9 @@ rct_window* WindowSignOpen(rct_windownumber number) * * rct2: 0x6E5F52 */ -rct_window* WindowSignSmallOpen(rct_windownumber number) +WindowBase* WindowSignSmallOpen(rct_windownumber number) { - auto* w = static_cast(window_bring_to_front_by_number(WindowClass::Banner, number)); + auto* w = static_cast(WindowBringToFrontByNumber(WindowClass::Banner, number)); if (w != nullptr) return w; diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index bb8f709ec2..0512c09a40 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -84,20 +84,20 @@ validate_global_widx(WC_STAFF, WIDX_PICKUP); MakeTab ({34, 17}, STR_STAFF_OPTIONS_TIP ), /* Tab 2 */ \ MakeTab ({65, 17}, STR_STAFF_STATS_TIP ) /* Tab 3 */ -static rct_widget window_staff_overview_widgets[] = { +static Widget window_staff_overview_widgets[] = { MAIN_STAFF_WIDGETS, MakeWidget ({ 3, 47}, {162, 120}, WindowWidgetType::Viewport, WindowColour::Secondary ), // Viewport MakeWidget ({ 3, WH - 13}, {162, 11}, WindowWidgetType::LabelCentred, WindowColour::Secondary ), // Label at bottom of viewport - MakeWidget ({WW - 25, 45}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PICKUP_BTN, STR_PICKUP_TIP ), // Pickup Button - MakeWidget ({WW - 25, 69}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PATROL_BTN, STR_SET_PATROL_TIP ), // Patrol Button - MakeWidget ({WW - 25, 93}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RENAME, STR_NAME_STAFF_TIP ), // Rename Button - MakeWidget ({WW - 25, 117}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_LOCATE, STR_LOCATE_SUBJECT_TIP), // Locate Button - MakeWidget ({WW - 25, 141}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_FIRE_STAFF_TIP ), // Fire Button + MakeWidget ({WW - 25, 45}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PICKUP_BTN), STR_PICKUP_TIP ), // Pickup Button + MakeWidget ({WW - 25, 69}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PATROL_BTN), STR_SET_PATROL_TIP ), // Patrol Button + MakeWidget ({WW - 25, 93}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RENAME), STR_NAME_STAFF_TIP ), // Rename Button + MakeWidget ({WW - 25, 117}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP), // Locate Button + MakeWidget ({WW - 25, 141}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_FIRE_STAFF_TIP ), // Fire Button WIDGETS_END, }; //0x9AF910 -static rct_widget window_staff_options_widgets[] = { +static Widget window_staff_options_widgets[] = { MAIN_STAFF_WIDGETS, MakeWidget ({ 5, 50}, {180, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary ), // Checkbox 1 MakeWidget ({ 5, 67}, {180, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary ), // Checkbox 2 @@ -110,12 +110,12 @@ static rct_widget window_staff_options_widgets[] = { // clang-format on // 0x9AF9F4 -static rct_widget window_staff_stats_widgets[] = { +static Widget window_staff_stats_widgets[] = { MAIN_STAFF_WIDGETS, WIDGETS_END, }; -static rct_widget* window_staff_page_widgets[] = { +static Widget* window_staff_page_widgets[] = { window_staff_overview_widgets, window_staff_options_widgets, window_staff_stats_widgets, @@ -203,7 +203,7 @@ public: CommonPrepareDrawAfter(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(&dpi); @@ -344,7 +344,7 @@ private: void CommonPrepareDrawAfter() { - window_align_tabs(this, WIDX_TAB_1, WIDX_TAB_3); + WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_3); } #pragma endregion @@ -365,14 +365,14 @@ private: CoordsXYZ nullLoc{}; nullLoc.SetNull(); PeepPickupAction pickupAction{ PeepPickupType::Pickup, EntityId::FromUnderlying(number), nullLoc, - network_get_current_player_id() }; + NetworkGetCurrentPlayerId() }; pickupAction.SetCallback([peepnum = number](const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) return; - rct_window* wind = window_find_by_number(WindowClass::Peep, peepnum); + WindowBase* wind = WindowFindByNumber(WindowClass::Peep, peepnum); if (wind != nullptr) { - tool_set(*wind, WC_STAFF__WIDX_PICKUP, Tool::Picker); + ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::Picker); } }); GameActions::Execute(&pickupAction); @@ -381,7 +381,7 @@ private: case WIDX_FIRE: { auto intent = Intent(WindowClass::FirePrompt); - intent.putExtra(INTENT_EXTRA_PEEP, staff); + intent.PutExtra(INTENT_EXTRA_PEEP, staff); ContextOpenIntent(&intent); break; } @@ -398,7 +398,7 @@ private: void OverviewOnMouseDown(WidgetIndex widgetIndex) { - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; switch (widgetIndex) { @@ -458,10 +458,9 @@ private: return; } - window_close_by_class(WindowClass::PatrolArea); + WindowCloseByClass(WindowClass::PatrolArea); - auto staffSetPatrolAreaAction = StaffSetPatrolAreaAction( - staff->sprite_index, {}, StaffSetPatrolAreaMode::ClearAll); + auto staffSetPatrolAreaAction = StaffSetPatrolAreaAction(staff->Id, {}, StaffSetPatrolAreaMode::ClearAll); GameActions::Execute(&staffSetPatrolAreaAction); } else @@ -469,7 +468,7 @@ private: auto staffId = EntityId::FromUnderlying(number); if (WindowPatrolAreaGetCurrentStaffId() == staffId) { - window_close_by_class(WindowClass::PatrolArea); + WindowCloseByClass(WindowClass::PatrolArea); } else { @@ -499,7 +498,7 @@ private: widgets[WIDX_PICKUP].left = width - 25; widgets[WIDX_PICKUP].right = width - 2; - SetWidgetPressed(WIDX_PATROL, WindowPatrolAreaGetCurrentStaffId() == staff->sprite_index); + SetWidgetPressed(WIDX_PATROL, WindowPatrolAreaGetCurrentStaffId() == staff->Id); widgets[WIDX_PATROL].left = width - 25; widgets[WIDX_PATROL].right = width - 2; @@ -514,16 +513,16 @@ private: widgets[WIDX_FIRE].right = width - 2; } - void OverviewDraw(rct_drawpixelinfo* dpi) + void OverviewDraw(DrawPixelInfo* dpi) { // Draw the viewport no sound sprite if (viewport != nullptr) { - window_draw_viewport(dpi, *this); + WindowDrawViewport(dpi, *this); if (viewport->flags & VIEWPORT_FLAG_SOUND_ON) { - gfx_draw_sprite(dpi, ImageId(SPR_HEARING_VIEWPORT), windowPos + ScreenCoordsXY{ 2, 2 }); + GfxDrawSprite(dpi, ImageId(SPR_HEARING_VIEWPORT), windowPos + ScreenCoordsXY{ 2, 2 }); } } @@ -538,10 +537,10 @@ private: const auto& widget = widgets[WIDX_BTM_LABEL]; auto screenPos = windowPos + ScreenCoordsXY{ widget.midX(), widget.top }; int32_t widgetWidth = widget.width(); - DrawTextEllipsised(dpi, screenPos, widgetWidth, STR_BLACK_STRING, ft, { TextAlignment::CENTRE }); + DrawTextEllipsised(*dpi, screenPos, widgetWidth, STR_BLACK_STRING, ft, { TextAlignment::CENTRE }); } - void DrawOverviewTabImage(rct_drawpixelinfo* dpi) + void DrawOverviewTabImage(DrawPixelInfo* dpi) { if (IsWidgetDisabled(WIDX_TAB_1)) return; @@ -553,8 +552,8 @@ private: if (page == WINDOW_STAFF_OVERVIEW) widgetHeight++; - rct_drawpixelinfo clip_dpi; - if (!clip_drawpixelinfo(&clip_dpi, dpi, screenCoords, widgetWidth, widgetHeight)) + DrawPixelInfo clip_dpi; + if (!ClipDrawPixelInfo(&clip_dpi, dpi, screenCoords, widgetWidth, widgetHeight)) { return; } @@ -577,11 +576,11 @@ private: if (page == WINDOW_STAFF_OVERVIEW) { offset = _tabAnimationOffset; - offset = floor2(offset, 4); + offset = Floor2(offset, 4); } imageIndex += offset; - gfx_draw_sprite(&clip_dpi, ImageId(imageIndex, staff->TshirtColour, staff->TrousersColour), screenCoords); + GfxDrawSprite(&clip_dpi, ImageId(imageIndex, staff->TshirtColour, staff->TrousersColour), screenCoords); } void OverviewResize() @@ -658,7 +657,7 @@ private: gPickupPeepImage = ImageId(); - auto info = get_map_coordinates_from_pos(screenCoords, ViewportInteractionItemAll); + auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionItemAll); if (info.SpriteType == ViewportInteractionItem::None) return; @@ -692,12 +691,12 @@ private: return; PeepPickupAction pickupAction{ - PeepPickupType::Place, staffEntityId, { destCoords, tileElement->GetBaseZ() }, network_get_current_player_id() + PeepPickupType::Place, staffEntityId, { destCoords, tileElement->GetBaseZ() }, NetworkGetCurrentPlayerId() }; pickupAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) return; - tool_cancel(); + ToolCancel(); gPickupPeepImage = ImageId(); }); GameActions::Execute(&pickupAction); @@ -708,10 +707,9 @@ private: if (widgetIndex != WIDX_PICKUP) return; - PeepPickupAction pickupAction{ PeepPickupType::Cancel, - EntityId::FromUnderlying(number), - { picked_peep_old_x, 0, 0 }, - network_get_current_player_id() }; + PeepPickupAction pickupAction{ + PeepPickupType::Cancel, EntityId::FromUnderlying(number), { picked_peep_old_x, 0, 0 }, NetworkGetCurrentPlayerId() + }; GameActions::Execute(&pickupAction); } @@ -766,7 +764,7 @@ private: // This will be moved below where Items Checked is when all // of dropdown related functions are finished. This prevents // the dropdown from not working on first click. - int32_t numCostumes = staff_get_available_entertainer_costume_list(_availableCostumes); + int32_t numCostumes = StaffGetAvailableEntertainerCostumeList(_availableCostumes); for (int32_t i = 0; i < numCostumes; i++) { EntertainerCostume costume = _availableCostumes[i]; @@ -872,7 +870,7 @@ private: auto staffOrders = staff->StaffOrders; - for (auto index = bitscanforward(staffOrders); index != -1; index = bitscanforward(staffOrders)) + for (auto index = UtilBitScanForward(staffOrders); index != -1; index = UtilBitScanForward(staffOrders)) { staffOrders &= ~(1 << index); SetCheckboxValue(WIDX_CHECKBOX_1 + index, true); @@ -916,7 +914,7 @@ private: #pragma endregion #pragma region Statistics tab events - void StatsDraw(rct_drawpixelinfo* dpi) + void StatsDraw(DrawPixelInfo* dpi) { auto staff = GetStaff(); if (staff == nullptr) @@ -930,13 +928,13 @@ private: { auto ft = Formatter(); ft.Add(GetStaffWage(staff->AssignedStaffType)); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_WAGES, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_WAGES, ft); screenCoords.y += LIST_ROW_HEIGHT; } auto ft = Formatter(); ft.Add(staff->GetHireDate()); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_EMPLOYED_FOR, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_EMPLOYED_FOR, ft); screenCoords.y += LIST_ROW_HEIGHT; switch (staff->AssignedStaffType) @@ -944,37 +942,37 @@ private: case StaffType::Handyman: ft = Formatter(); ft.Add(staff->StaffLawnsMown); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_LAWNS_MOWN, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_LAWNS_MOWN, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(staff->StaffGardensWatered); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_GARDENS_WATERED, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_GARDENS_WATERED, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(staff->StaffLitterSwept); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_LITTER_SWEPT, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_LITTER_SWEPT, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(staff->StaffBinsEmptied); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_BINS_EMPTIED, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_BINS_EMPTIED, ft); break; case StaffType::Mechanic: ft = Formatter(); ft.Add(staff->StaffRidesInspected); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_RIDES_INSPECTED, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_RIDES_INSPECTED, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(staff->StaffRidesFixed); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_RIDES_FIXED, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_RIDES_FIXED, ft); break; case StaffType::Security: ft = Formatter(); ft.Add(staff->StaffVandalsStopped); - DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft); + DrawTextBasic(*dpi, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft); break; case StaffType::Entertainer: case StaffType::Count: @@ -1062,10 +1060,10 @@ private: void CancelTools() { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { if (number == gCurrentToolWidget.window_number && classification == gCurrentToolWidget.window_classification) - tool_cancel(); + ToolCancel(); } } @@ -1089,8 +1087,8 @@ private: RemoveViewport(); Invalidate(); - window_event_resize_call(this); - window_event_invalidate_call(this); + WindowEventResizeCall(this); + WindowEventInvalidateCall(this); InitScrollWidgets(); ViewportInit(); Invalidate(); @@ -1133,7 +1131,7 @@ private: std::optional tempFocus; if (staff->State != PeepState::Picked) { - tempFocus = Focus(staff->sprite_index); + tempFocus = Focus(staff->Id); } uint16_t viewport_flags; @@ -1153,7 +1151,7 @@ private: viewport_flags |= VIEWPORT_FLAG_GRIDLINES; } - window_event_invalidate_call(this); + WindowEventInvalidateCall(this); focus = tempFocus; @@ -1167,7 +1165,7 @@ private: int32_t viewportWidth = viewWidget.width() - 1; int32_t viewportHeight = viewWidget.height() - 1; - viewport_create(this, screenPos, viewportWidth, viewportHeight, focus.value()); + ViewportCreate(this, screenPos, viewportWidth, viewportHeight, focus.value()); flags |= WF_NO_SCROLLING; Invalidate(); } @@ -1178,7 +1176,7 @@ private: Invalidate(); } - void ShowLocateDropdown(rct_widget* widget) + void ShowLocateDropdown(Widget* widget) { gDropdownItems[0].Format = STR_LOCATE_SUBJECT_TIP; gDropdownItems[1].Format = STR_FOLLOW_SUBJECT_TIP; @@ -1190,21 +1188,21 @@ private: void FollowPeep() { - rct_window* main = window_get_main(); - window_follow_sprite(*main, EntityId::FromUnderlying(number)); + WindowBase* main = WindowGetMain(); + WindowFollowSprite(*main, EntityId::FromUnderlying(number)); } - void DrawTabImages(rct_drawpixelinfo* dpi) + void DrawTabImages(DrawPixelInfo* dpi) { DrawOverviewTabImage(dpi); DrawTabImage(dpi, WINDOW_STAFF_OPTIONS, SPR_TAB_STAFF_OPTIONS_0); DrawTabImage(dpi, WINDOW_STAFF_STATISTICS, SPR_TAB_STATS_0); } - void DrawTabImage(rct_drawpixelinfo* dpi, int32_t p, int32_t baseImageId) + void DrawTabImage(DrawPixelInfo* dpi, int32_t p, int32_t baseImageId) { WidgetIndex widgetIndex = WIDX_TAB_1 + p; - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; auto screenCoords = windowPos + ScreenCoordsXY{ widget->left, widget->top }; @@ -1217,7 +1215,7 @@ private: } // Draw normal, enabled sprite. - gfx_draw_sprite(dpi, ImageId(baseImageId), screenCoords); + GfxDrawSprite(dpi, ImageId(baseImageId), screenCoords); } } @@ -1234,9 +1232,9 @@ private: static constexpr int32_t TabAnimationFrames = 7; }; -rct_window* WindowStaffOpen(Peep* peep) +WindowBase* WindowStaffOpen(Peep* peep) { - auto w = static_cast(window_bring_to_front_by_number(WindowClass::Peep, peep->sprite_index.ToUnderlying())); + auto w = static_cast(WindowBringToFrontByNumber(WindowClass::Peep, peep->Id.ToUnderlying())); if (w != nullptr) return w; @@ -1247,7 +1245,7 @@ rct_window* WindowStaffOpen(Peep* peep) return nullptr; if (w != nullptr) - w->Initialise(peep->sprite_index); + w->Initialise(peep->Id); return w; } diff --git a/src/openrct2-ui/windows/StaffFirePrompt.cpp b/src/openrct2-ui/windows/StaffFirePrompt.cpp index 1b0e406877..ae6157f776 100644 --- a/src/openrct2-ui/windows/StaffFirePrompt.cpp +++ b/src/openrct2-ui/windows/StaffFirePrompt.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,7 +32,7 @@ enum WindowStaffFireWidgetIdx { }; // 0x9AFB4C -static rct_widget window_staff_fire_widgets[] = { +static Widget window_staff_fire_widgets[] = { WINDOW_SHIM_WHITE(WINDOW_TITLE, WW, WH), MakeWidget({ 10, WH - 20}, {85, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_YES ), MakeWidget({WW - 95, WH - 20}, {85, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_SAVE_PROMPT_CANCEL), @@ -72,7 +72,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -81,15 +81,15 @@ public: peep->FormatNameTo(ft); ScreenCoordsXY textCoords(windowPos + ScreenCoordsXY{ WW / 2, (WH / 2) - 3 }); - DrawTextWrapped(&dpi, textCoords, WW - 4, STR_FIRE_STAFF_ID, ft, { TextAlignment::CENTRE }); + DrawTextWrapped(dpi, textCoords, WW - 4, STR_FIRE_STAFF_ID, ft, { TextAlignment::CENTRE }); } }; -rct_window* WindowStaffFirePromptOpen(Peep* peep) +WindowBase* WindowStaffFirePromptOpen(Peep* peep) { // Check if the confirm window already exists auto* window = WindowFocusOrCreate( WindowClass::FirePrompt, WW, WH, WF_CENTRE_SCREEN | WF_TRANSPARENT); - window->SetWindowNumber(peep->sprite_index.ToUnderlying()); + window->SetWindowNumber(peep->Id.ToUnderlying()); return window; } diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 862e3d2a52..cb842d195b 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ constexpr int32_t MAX_WW = 500; constexpr int32_t MAX_WH = 450; // clang-format off -static rct_widget window_staff_list_widgets[] = { +static Widget window_staff_list_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, { WW, WH - 43}, WindowWidgetType::Resize, WindowColour::Secondary ), // tab content panel MakeTab ({ 3, 17}, STR_STAFF_HANDYMEN_TAB_TIP ), // handymen tab @@ -77,9 +78,9 @@ static rct_widget window_staff_list_widgets[] = { MakeWidget({ 3, 72}, {WW - 6, 195}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ), // staff list MakeWidget({130, 58}, { 12, 12}, WindowWidgetType::ColourBtn, WindowColour::Secondary, STR_NONE, STR_UNIFORM_COLOUR_TIP ), // uniform colour picker MakeWidget({165, 17}, { 145, 13}, WindowWidgetType::Button, WindowColour::Primary , STR_NONE, STR_HIRE_STAFF_TIP ), // hire button - MakeWidget({243, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_QUICK_FIRE_STAFF ), // quick fire staff - MakeWidget({267, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_PATROL_BTN, STR_SHOW_PATROL_AREA_TIP ), // show staff patrol area tool - MakeWidget({291, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_MAP, STR_SHOW_STAFF_ON_MAP_TIP ), // show staff on map button + MakeWidget({243, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_QUICK_FIRE_STAFF ), // quick fire staff + MakeWidget({267, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PATROL_BTN), STR_SHOW_PATROL_AREA_TIP ), // show staff patrol area tool + MakeWidget({291, 46}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_MAP), STR_SHOW_STAFF_ON_MAP_TIP ), // show staff on map button WIDGETS_END, }; // clang-format on @@ -94,7 +95,13 @@ private: StringId ActionHire; }; - std::vector _staffList; + struct StaffEntry + { + EntityId Id; + u8string Name; + }; + + std::vector _staffList; bool _quickFireMode{}; std::optional _highlightedIndex{}; int32_t _selectedTab{}; @@ -139,11 +146,11 @@ public: break; } case WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON: - if (!tool_set(*this, WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON, Tool::Crosshair)) + if (!ToolSet(*this, WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON, Tool::Crosshair)) { - show_gridlines(); + ShowGridlines(); SetPatrolAreaToRender(GetSelectedStaffType()); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } break; case WIDX_STAFF_LIST_MAP: @@ -184,7 +191,7 @@ public: InvalidateWidget(WIDX_STAFF_LIST_HANDYMEN_TAB + _selectedTab); // Enable highlighting of these staff members in map window - if (window_find_by_class(WindowClass::Map) != nullptr) + if (WindowFindByClass(WindowClass::Map) != nullptr) { gWindowMapFlashingFlags |= MapFlashingFlags::StaffListOpen; for (auto peep : EntityList()) @@ -223,7 +230,7 @@ public: break; } case WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER: - WindowDropdownShowColour(this, &widgets[widgetIndex], colours[1], staff_get_colour(GetSelectedStaffType())); + WindowDropdownShowColour(this, &widgets[widgetIndex], colours[1], StaffGetColour(GetSelectedStaffType())); break; } } @@ -252,9 +259,7 @@ public: if (GetSelectedStaffType() != StaffType::Entertainer) { widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].type = WindowWidgetType::ColourBtn; - widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].image = GetColourButtonImage( - staff_get_colour(GetSelectedStaffType())) - .ToUInt32(); + widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].image = GetColourButtonImage(StaffGetColour(GetSelectedStaffType())); } SetWidgetPressed(WIDX_STAFF_LIST_QUICK_FIRE, _quickFireMode); @@ -277,7 +282,7 @@ public: widgets[WIDX_STAFF_LIST_HIRE_BUTTON].right = width - 11; } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); DrawTabImages(dpi); @@ -286,13 +291,13 @@ public: { auto ft = Formatter(); ft.Add(GetStaffWage(GetSelectedStaffType())); - DrawTextBasic(&dpi, windowPos + ScreenCoordsXY{ width - 155, 32 }, STR_COST_PER_MONTH, ft); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ width - 155, 32 }, STR_COST_PER_MONTH, ft); } if (GetSelectedStaffType() != StaffType::Entertainer) { DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].top + 1 }, + dpi, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].top + 1 }, STR_UNIFORM_COLOUR); } @@ -300,11 +305,11 @@ public: auto staffTypeStringId = _staffList.size() == 1 ? namingConvention.Singular : namingConvention.Plural; auto ft = Formatter(); - ft.Add(_staffList.size()); + ft.Add(_staffList.size()); ft.Add(staffTypeStringId); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_STAFF_LIST_LIST].bottom + 2 }, STR_STAFF_LIST_COUNTER, ft); + dpi, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_STAFF_LIST_LIST].bottom + 2 }, STR_STAFF_LIST_COUNTER, ft); } ScreenSize OnScrollGetSize(int32_t scrollIndex) override @@ -315,7 +320,7 @@ public: Invalidate(); } - auto scrollHeight = static_cast(_staffList.size()) * SCROLLABLE_ROW_HEIGHT; + auto scrollHeight = static_cast(_staffList.size()) * SCROLLABLE_ROW_HEIGHT; auto i = scrollHeight - widgets[WIDX_STAFF_LIST_LIST].bottom + widgets[WIDX_STAFF_LIST_LIST].top + 21; if (i < 0) i = 0; @@ -342,22 +347,22 @@ public: void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { int32_t i = screenCoords.y / SCROLLABLE_ROW_HEIGHT; - for (auto spriteIndex : _staffList) + for (const auto& entry : _staffList) { if (i == 0) { if (_quickFireMode) { - auto staffFireAction = StaffFireAction(spriteIndex); + auto staffFireAction = StaffFireAction(entry.Id); GameActions::Execute(&staffFireAction); } else { - auto peep = GetEntity(spriteIndex); + auto peep = GetEntity(entry.Id); if (peep != nullptr) { auto intent = Intent(WindowClass::Peep); - intent.putExtra(INTENT_EXTRA_PEEP, peep); + intent.PutExtra(INTENT_EXTRA_PEEP, peep); ContextOpenIntent(&intent); } } @@ -368,10 +373,10 @@ public: } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { auto dpiCoords = ScreenCoordsXY{ dpi.x, dpi.y }; - gfx_fill_rect( + GfxFillRect( &dpi, { dpiCoords, dpiCoords + ScreenCoordsXY{ dpi.width - 1, dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); // How much space do we have for the name and action columns? (Discount scroll area and icons.) @@ -382,7 +387,7 @@ public: auto y = 0; size_t i = 0; - for (auto spriteIndex : _staffList) + for (const auto& entry : _staffList) { if (y > dpi.y + dpi.height) { @@ -391,7 +396,7 @@ public: if (y + 11 >= dpi.y) { - auto peep = GetEntity(spriteIndex); + const auto* peep = GetEntity(entry.Id); if (peep == nullptr) { continue; @@ -400,22 +405,22 @@ public: if (i == _highlightedIndex) { - gfx_filter_rect(&dpi, { 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1) }, FilterPaletteID::PaletteDarken1); + GfxFilterRect(&dpi, { 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1) }, FilterPaletteID::PaletteDarken1); format = (_quickFireMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID); } auto ft = Formatter(); peep->FormatNameTo(ft); - DrawTextEllipsised(&dpi, { 0, y }, nameColumnSize, format, ft); + DrawTextEllipsised(dpi, { 0, y }, nameColumnSize, format, ft); ft = Formatter(); peep->FormatActionTo(ft); - DrawTextEllipsised(&dpi, { actionOffset, y }, actionColumnSize, format, ft); + DrawTextEllipsised(dpi, { actionOffset, y }, actionColumnSize, format, ft); // True if a patrol path is set for the worker if (peep->HasPatrolArea()) { - gfx_draw_sprite(&dpi, ImageId(SPR_STAFF_PATROL_PATH), { nameColumnSize + 5, y }); + GfxDrawSprite(&dpi, ImageId(SPR_STAFF_PATROL_PATH), { nameColumnSize + 5, y }); } auto staffOrderIcon_x = nameColumnSize + 20; @@ -428,7 +433,7 @@ public: { if (staffOrders & 1) { - gfx_draw_sprite(&dpi, ImageId(staffOrderSprite), { staffOrderIcon_x, y }); + GfxDrawSprite(&dpi, ImageId(staffOrderSprite), { staffOrderIcon_x, y }); } staffOrders = staffOrders >> 1; staffOrderIcon_x += 9; @@ -438,7 +443,7 @@ public: } else { - gfx_draw_sprite(&dpi, ImageId(GetEntertainerCostumeSprite(peep->SpriteType)), { staffOrderIcon_x, y }); + GfxDrawSprite(&dpi, ImageId(GetEntertainerCostumeSprite(peep->SpriteType)), { staffOrderIcon_x, y }); } } @@ -454,9 +459,9 @@ public: auto closestStaffMember = GetClosestStaffMemberTo(screenCoords); if (closestStaffMember != nullptr) { - tool_cancel(); + ToolCancel(); auto* staffWindow = WindowStaffOpen(closestStaffMember); - window_event_dropdown_call(staffWindow, WC_PEEP__WIDX_PATROL, 0); + WindowEventDropdownCall(staffWindow, WC_PEEP__WIDX_PATROL, 0); } else { @@ -471,10 +476,10 @@ public: { if (widgetIndex == WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON) { - hide_gridlines(); - tool_cancel(); + HideGridlines(); + ToolCancel(); ClearPatrolAreaToRender(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } @@ -482,17 +487,24 @@ public: { _staffList.clear(); - for (auto peep : EntityList()) + for (auto* peep : EntityList()) { EntitySetFlashing(peep, false); if (peep->AssignedStaffType == GetSelectedStaffType()) { EntitySetFlashing(peep, true); - _staffList.push_back(peep->sprite_index); + + StaffEntry entry; + entry.Id = peep->Id; + entry.Name = peep->GetName(); + + _staffList.push_back(std::move(entry)); } } - std::sort(_staffList.begin(), _staffList.end(), [](const auto a, const auto b) { return peep_compare(a, b) < 0; }); + std::sort(_staffList.begin(), _staffList.end(), [](const auto& a, const auto& b) { + return StrLogicalCmp(a.Name.c_str(), b.Name.c_str()) < 0; + }); } private: @@ -528,11 +540,40 @@ private: return; auto actionResult = res->GetData(); - // Open window for new staff. auto* staff = GetEntity(actionResult.StaffEntityId); - auto intent = Intent(WindowClass::Peep); - intent.putExtra(INTENT_EXTRA_PEEP, staff); - ContextOpenIntent(&intent); + if (staff == nullptr) + return; + + // If autoposition of staff is disabled, pickup peep and then open the staff window + if (staff->State == PeepState::Picked) + { + picked_peep_old_x = staff->x; + CoordsXYZ nullLoc{}; + nullLoc.SetNull(); + + PeepPickupAction pickupAction{ PeepPickupType::Pickup, staff->Id, nullLoc, NetworkGetCurrentPlayerId() }; + pickupAction.SetCallback([staffId = staff->Id](const GameAction* ga, const GameActions::Result* result) { + if (result->Error != GameActions::Status::Ok) + return; + + auto* staff2 = GetEntity(staffId); + auto intent = Intent(WindowClass::Peep); + intent.PutExtra(INTENT_EXTRA_PEEP, staff2); + auto* wind = ContextOpenIntent(&intent); + if (wind != nullptr) + { + ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::Picker); + } + }); + GameActions::Execute(&pickupAction); + } + else + { + // Open window for new staff. + auto intent = Intent(WindowClass::Peep); + intent.PutExtra(INTENT_EXTRA_PEEP, staff); + ContextOpenIntent(&intent); + } }); GameActions::Execute(&hireStaffAction); @@ -543,7 +584,7 @@ private: return static_cast(_selectedTab); } - void DrawTabImages(rct_drawpixelinfo& dpi) const + void DrawTabImages(DrawPixelInfo& dpi) const { DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_HANDYMEN, PeepSpriteType::Handyman, gStaffHandymanColour); DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_MECHANICS, PeepSpriteType::Mechanic, gStaffMechanicColour); @@ -551,38 +592,38 @@ private: DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_ENTERTAINERS, PeepSpriteType::EntertainerElephant); } - void DrawTabImage(rct_drawpixelinfo& dpi, int32_t tabIndex, PeepSpriteType type, colour_t colour) const + void DrawTabImage(DrawPixelInfo& dpi, int32_t tabIndex, PeepSpriteType type, colour_t colour) const { auto widgetIndex = WIDX_STAFF_LIST_HANDYMEN_TAB + tabIndex; const auto& widget = widgets[widgetIndex]; auto imageId = (_selectedTab == tabIndex ? (_tabAnimationIndex & ~3) : 0); imageId += GetPeepAnimation(type).base_image + 1; - gfx_draw_sprite( + GfxDrawSprite( &dpi, ImageId(imageId, colour), windowPos + ScreenCoordsXY{ (widget.left + widget.right) / 2, widget.bottom - 6 }); } - void DrawTabImage(rct_drawpixelinfo& dpi, int32_t tabIndex, PeepSpriteType type) const + void DrawTabImage(DrawPixelInfo& dpi, int32_t tabIndex, PeepSpriteType type) const { auto widgetIndex = WIDX_STAFF_LIST_HANDYMEN_TAB + tabIndex; const auto& widget = widgets[widgetIndex]; - rct_drawpixelinfo clippedDpi; - if (clip_drawpixelinfo( + DrawPixelInfo clippedDpi; + if (ClipDrawPixelInfo( &clippedDpi, &dpi, windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 }, widget.right - widget.left - 1, widget.bottom - widget.top - 1)) { auto imageId = (_selectedTab == 3 ? (_tabAnimationIndex & ~3) : 0); imageId += GetPeepAnimation(type).base_image + 1; - gfx_draw_sprite(&clippedDpi, ImageId(imageId), { 15, 23 }); + GfxDrawSprite(&clippedDpi, ImageId(imageId), { 15, 23 }); } } void CancelTools() { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { if (classification == gCurrentToolWidget.window_classification && number == gCurrentToolWidget.window_number) { - tool_cancel(); + ToolCancel(); } } } @@ -635,10 +676,10 @@ private: { auto result = EntertainerCostume::Panda; EntertainerCostume costumeList[static_cast(EntertainerCostume::Count)]; - int32_t numCostumes = staff_get_available_entertainer_costume_list(costumeList); + int32_t numCostumes = StaffGetAvailableEntertainerCostumeList(costumeList); if (numCostumes > 0) { - int32_t index = util_rand() % numCostumes; + int32_t index = UtilRand() % numCostumes; result = costumeList[index]; } return result; @@ -704,14 +745,14 @@ private: } }; -rct_window* WindowStaffListOpen() +WindowBase* WindowStaffListOpen() { return WindowFocusOrCreate(WindowClass::StaffList, WW, WH, WF_10 | WF_RESIZABLE); } void WindowStaffListRefresh() { - auto* window = window_find_by_class(WindowClass::StaffList); + auto* window = WindowFindByClass(WindowClass::StaffList); if (window != nullptr) { static_cast(window)->RefreshList(); diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index e9a205cfdd..f1a0ce2339 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,7 +32,7 @@ enum WindowTextInputWidgetIdx WIDX_OKAY }; -static rct_widget window_text_input_widgets[] = { +static Widget window_text_input_widgets[] = { WINDOW_SHIM(STR_NONE, WW, WH), MakeWidget({ 170, 68 }, { 71, 14 }, WindowWidgetType::Button, WindowColour::Secondary, STR_CANCEL), MakeWidget({ 10, 68 }, { 71, 14 }, WindowWidgetType::Button, WindowColour::Secondary, STR_OK), @@ -42,7 +42,7 @@ static rct_widget window_text_input_widgets[] = { class TextInputWindow final : public Window { private: - widget_identifier _parentWidget{}; + WidgetIdentifier _parentWidget{}; std::string _title; StringId _titleStringId = STR_NONE; @@ -56,7 +56,7 @@ private: int32_t _cursorBlink{}; size_t _maxInputLength{}; - std::vector _buffer; + u8string _buffer; public: void OnOpen() override @@ -66,7 +66,7 @@ public: SetParentWindow(nullptr, 0); } - void SetParentWindow(rct_window* parentWindow, WidgetIndex widgetIndex) + void SetParentWindow(WindowBase* parentWindow, WidgetIndex widgetIndex) { // Save calling window details so that the information can be passed back to the correct window & widget if (parentWindow == nullptr) @@ -108,10 +108,13 @@ public: void SetText(std::string_view text, size_t maxLength) { - _buffer.resize(maxLength); - safe_strcpy(_buffer.data(), std::string(text).c_str(), maxLength); + _buffer = u8string{ text }; + if (_buffer.size() > maxLength) + { + _buffer.resize(maxLength); + } _maxInputLength = maxLength; - gTextInput = ContextStartTextInput(_buffer.data(), maxLength); + gTextInput = ContextStartTextInput(_buffer, maxLength); } void SetCallback(std::function callback, std::function cancelCallback) @@ -135,7 +138,7 @@ public: auto parentWindow = GetParentWindow(); if (parentWindow == nullptr) { - window_close(*this); + WindowClose(*this); return; } } @@ -156,12 +159,12 @@ public: case WIDX_CLOSE: ContextStopTextInput(); ExecuteCallback(false); - window_close(*this); + WindowClose(*this); break; case WIDX_OKAY: ContextStopTextInput(); ExecuteCallback(true); - window_close(*this); + WindowClose(*this); } } @@ -171,7 +174,7 @@ public: int32_t newHeight = CalculateWindowHeight(_buffer.data()); if (newHeight != height) { - window_set_resize(*this, WW, newHeight, WW, newHeight); + WindowSetResize(*this, WW, newHeight, WW, newHeight); } widgets[WIDX_OKAY].top = newHeight - 22; @@ -193,7 +196,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -207,31 +210,30 @@ public: auto ft = Formatter(); ft.Add(_description.c_str()); DrawTextWrapped( - &dpi, { windowPos.x + WW / 2, screenCoords.y }, WW, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); + dpi, { windowPos.x + WW / 2, screenCoords.y }, WW, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); } else { DrawTextWrapped( - &dpi, { windowPos.x + WW / 2, screenCoords.y }, WW, _descriptionStringId, _descriptionArgs, + dpi, { windowPos.x + WW / 2, screenCoords.y }, WW, _descriptionStringId, _descriptionArgs, { colours[1], TextAlignment::CENTRE }); } screenCoords.y += 25; - char wrapped_string[TEXT_INPUT_SIZE]; - safe_strcpy(wrapped_string, _buffer.data(), _buffer.size()); - // String length needs to add 12 either side of box // +13 for cursor when max length. - gfx_wrap_string(wrapped_string, WW - (24 + 13), FontStyle::Medium, &no_lines); + u8string wrappedString; + GfxWrapString( + u8string_view{ _buffer.data(), _buffer.size() }, WW - (24 + 13), FontStyle::Medium, &wrappedString, &no_lines); - gfx_fill_rect_inset( + GfxFillRectInset( &dpi, { { windowPos.x + 10, screenCoords.y }, { windowPos.x + WW - 10, screenCoords.y + 10 * (no_lines + 1) + 3 } }, colours[1], INSET_RECT_F_60); screenCoords.y += 1; - char* wrap_pointer = wrapped_string; + const utf8* wrapPointer = wrappedString.data(); size_t char_count = 0; uint8_t cur_drawn = 0; @@ -240,16 +242,16 @@ public: for (int32_t line = 0; line <= no_lines; line++) { screenCoords.x = windowPos.x + 12; - gfx_draw_string_no_formatting(&dpi, screenCoords, wrap_pointer, { colours[1], FontStyle::Medium }); + DrawText(dpi, screenCoords, { colours[1], FontStyle::Medium, TextAlignment::LEFT }, wrapPointer, true); - size_t string_length = get_string_size(wrap_pointer) - 1; + size_t string_length = GetStringSize(wrapPointer) - 1; if (!cur_drawn && (gTextInput->SelectionStart <= char_count + string_length)) { - // Make a copy of the string for measuring the width. - char temp_string[TEXT_INPUT_SIZE] = { 0 }; - std::memcpy(temp_string, wrap_pointer, gTextInput->SelectionStart - char_count); - cursorX = windowPos.x + 13 + gfx_get_string_width_no_formatting(temp_string, FontStyle::Medium); + // Make a view of the string for measuring the width. + cursorX = windowPos.x + 13 + + GfxGetStringWidthNoFormatting( + u8string_view{ wrapPointer, gTextInput->SelectionStart - char_count }, FontStyle::Medium); cursorY = screenCoords.y; int32_t textWidth = 6; @@ -257,24 +259,24 @@ public: { // Make a 1 utf8-character wide string for measuring the width // of the currently selected character. - utf8 tmp[5] = { 0 }; // This is easier than setting temp_string[0..5] - uint32_t codepoint = utf8_get_next(_buffer.data() + gTextInput->SelectionStart, nullptr); - utf8_write_codepoint(tmp, codepoint); - textWidth = std::max(gfx_get_string_width_no_formatting(tmp, FontStyle::Medium) - 2, 4); + utf8 tmp[5] = {}; // This is easier than setting temp_string[0..5] + uint32_t codepoint = UTF8GetNext(_buffer.data() + gTextInput->SelectionStart, nullptr); + UTF8WriteCodepoint(tmp, codepoint); + textWidth = std::max(GfxGetStringWidthNoFormatting(tmp, FontStyle::Medium) - 2, 4); } if (_cursorBlink > 15) { uint8_t colour = ColourMapA[colours[1]].mid_light; // TODO: palette index addition - gfx_fill_rect( + GfxFillRect( &dpi, { { cursorX, screenCoords.y + 9 }, { cursorX + textWidth, screenCoords.y + 9 } }, colour + 5); } cur_drawn++; } - wrap_pointer += string_length + 1; + wrapPointer += string_length + 1; if (_buffer[char_count + string_length] == ' ') char_count++; @@ -290,7 +292,7 @@ public: } // IME composition - if (!str_is_null_or_empty(gTextInput->ImeBuffer)) + if (!String::IsNullOrEmpty(gTextInput->ImeBuffer)) { DrawIMEComposition(dpi, cursorX, cursorY); } @@ -300,33 +302,30 @@ public: { ContextStopTextInput(); ExecuteCallback(true); - window_close(*this); + WindowClose(*this); } static int32_t CalculateWindowHeight(std::string_view text) { - std::string wrappedString(text); - wrappedString.resize(TEXT_INPUT_SIZE); - // String length needs to add 12 either side of box +13 for cursor when max length. int32_t numLines{}; - gfx_wrap_string(wrappedString.data(), WW - (24 + 13), FontStyle::Medium, &numLines); + GfxWrapString(text, WW - (24 + 13), FontStyle::Medium, nullptr, &numLines); return numLines * 10 + WH; } private: - static void DrawIMEComposition(rct_drawpixelinfo& dpi, int32_t cursorX, int32_t cursorY) + static void DrawIMEComposition(DrawPixelInfo& dpi, int32_t cursorX, int32_t cursorY) { - int compositionWidth = gfx_get_string_width(gTextInput->ImeBuffer, FontStyle::Medium); + int compositionWidth = GfxGetStringWidth(gTextInput->ImeBuffer, FontStyle::Medium); ScreenCoordsXY screenCoords(cursorX - (compositionWidth / 2), cursorY + 13); int width = compositionWidth; int height = 10; - gfx_fill_rect( + GfxFillRect( &dpi, { screenCoords - ScreenCoordsXY{ 1, 1 }, screenCoords + ScreenCoordsXY{ width + 1, height + 1 } }, PALETTE_INDEX_12); - gfx_fill_rect(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ width, height } }, PALETTE_INDEX_0); - gfx_draw_string(&dpi, screenCoords, static_cast(gTextInput->ImeBuffer), { COLOUR_DARK_GREEN }); + GfxFillRect(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ width, height } }, PALETTE_INDEX_0); + GfxDrawString(dpi, screenCoords, static_cast(gTextInput->ImeBuffer), { COLOUR_DARK_GREEN }); } void ExecuteCallback(bool hasValue) @@ -337,7 +336,7 @@ private: if (w != nullptr) { auto value = hasValue ? _buffer.data() : nullptr; - window_event_textinput_call(w, _parentWidget.widget_index, value); + WindowEventTextinputCall(w, _parentWidget.widget_index, value); } } else @@ -364,18 +363,18 @@ private: return _parentWidget.window.classification != WindowClass::Null; } - rct_window* GetParentWindow() const + WindowBase* GetParentWindow() const { - return HasParentWindow() ? window_find_by_number(_parentWidget.window.classification, _parentWidget.window.number) + return HasParentWindow() ? WindowFindByNumber(_parentWidget.window.classification, _parentWidget.window.number) : nullptr; } }; void WindowTextInputRawOpen( - rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, + WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, const_utf8string existing_text, int32_t maxLength) { - window_close_by_class(WindowClass::Textinput); + WindowCloseByClass(WindowClass::Textinput); auto height = TextInputWindow::CalculateWindowHeight(existing_text); auto w = WindowCreate(WindowClass::Textinput, WW, height, WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); @@ -402,14 +401,14 @@ void WindowTextInputOpen( } void WindowTextInputOpen( - rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, + WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, StringId existing_text, uintptr_t existing_args, int32_t maxLength) { - auto existingText = format_string(existing_text, &existing_args); + auto existingText = FormatStringID(existing_text, &existing_args); WindowTextInputRawOpen(call_w, call_widget, title, description, descriptionArgs, existingText.c_str(), maxLength); } -void WindowTextInputKey(rct_window* w, uint32_t keycode) +void WindowTextInputKey(WindowBase* w, uint32_t keycode) { const auto wndNumber = w->number; const auto wndClass = w->classification; @@ -425,7 +424,7 @@ void WindowTextInputKey(rct_window* w, uint32_t keycode) } // The window can be potentially closed within a callback, we need to check if its still alive. - w = window_find_by_number(wndClass, wndNumber); + w = WindowFindByNumber(wndClass, wndNumber); if (w != nullptr) w->Invalidate(); } diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index c2fde36cc6..db06190513 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -71,7 +71,7 @@ static constexpr const int32_t WW = 320; static constexpr const int32_t WH = 107; // clang-format off -static rct_widget window_themes_widgets[] = { +static Widget window_themes_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 43}, {320, 64}, WindowWidgetType::Resize, WindowColour::Secondary ), // tab content panel MakeTab ({ 3, 17}, STR_THEMES_TAB_SETTINGS_TIP ), // settings tab @@ -276,22 +276,22 @@ public: if (width < min_width) { width = min_width; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } if (height < min_height) { height = min_height; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } if (width > max_width) { width = max_width; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } if (height > max_height) { height = max_height; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } else if (_selected_tab == WINDOW_THEMES_TAB_FEATURES) @@ -304,22 +304,22 @@ public: if (width < min_width) { width = min_width; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } if (height < min_height) { height = min_height; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } if (width > max_width) { width = max_width; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } if (height > max_height) { height = max_height; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } else @@ -358,7 +358,7 @@ public: if (frame_no >= window_themes_tab_animation_loops[_selected_tab]) frame_no = 0; - widget_invalidate(*this, WIDX_THEMES_SETTINGS_TAB + _selected_tab); + WidgetInvalidate(*this, WIDX_THEMES_SETTINGS_TAB + _selected_tab); } void OnPrepareDraw() override @@ -371,7 +371,7 @@ public: pressed_widgets = pressedWidgets | (1 << widgetIndex); - if (window_find_by_class(WindowClass::Dropdown) == nullptr) + if (WindowFindByClass(WindowClass::Dropdown) == nullptr) { _colour_index_1 = -1; _colour_index_2 = -1; @@ -444,7 +444,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { // Widgets WindowDrawWidgets(*this, &dpi); @@ -453,7 +453,7 @@ public: if (_selected_tab == WINDOW_THEMES_TAB_SETTINGS) { DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 10, window_themes_widgets[WIDX_THEMES_PRESETS].top + 1 }, + dpi, windowPos + ScreenCoordsXY{ 10, window_themes_widgets[WIDX_THEMES_PRESETS].top + 1 }, STR_THEMES_LABEL_CURRENT_THEME, {}, { colours[1] }); size_t activeAvailableThemeIndex = ThemeManagerGetAvailableThemeIndex(); @@ -467,7 +467,7 @@ public: auto newWidth = windowPos.x + window_themes_widgets[WIDX_THEMES_PRESETS_DROPDOWN].left - window_themes_widgets[WIDX_THEMES_PRESETS].left - 4; - DrawTextEllipsised(&dpi, screenPos, newWidth, STR_STRING, ft, { colours[1] }); + DrawTextEllipsised(dpi, screenPos, newWidth, STR_STRING, ft, { colours[1] }); } } @@ -494,7 +494,7 @@ public: _selected_tab = static_cast(newSelectedTab); scrolls[0].v_top = 0; frame_no = 0; - window_event_resize_call(this); + WindowEventResizeCall(this); Invalidate(); break; case WIDX_THEMES_PRESETS_DROPDOWN: @@ -523,7 +523,7 @@ public: { ThemeSetFlags(ThemeGetFlags() ^ UITHEME_FLAG_USE_LIGHTS_RIDE); ThemeSave(); - window_invalidate_all(); + WindowInvalidateAll(); } break; case WIDX_THEMES_RCT1_PARK_LIGHTS: @@ -533,9 +533,9 @@ public: } else { - ThemeSetFlags(ThemeGetFlags() ^ UITHEME_FLAG_USE_LIGHTS_PARK); + ThemeSetFlags(ThemeGetFlags() ^ static_cast(UITHEME_FLAG_USE_LIGHTS_PARK)); ThemeSave(); - window_invalidate_all(); + WindowInvalidateAll(); } break; case WIDX_THEMES_RCT1_SCENARIO_FONT: @@ -545,9 +545,9 @@ public: } else { - ThemeSetFlags(ThemeGetFlags() ^ UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT); + ThemeSetFlags(ThemeGetFlags() ^ static_cast(UITHEME_FLAG_USE_ALTERNATIVE_SCENARIO_SELECT_FONT)); ThemeSave(); - window_invalidate_all(); + WindowInvalidateAll(); } break; case WIDX_THEMES_RCT1_BOTTOM_TOOLBAR: @@ -557,9 +557,9 @@ public: } else { - ThemeSetFlags(ThemeGetFlags() ^ UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR); + ThemeSetFlags(ThemeGetFlags() ^ static_cast(UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR)); ThemeSave(); - window_invalidate_all(); + WindowInvalidateAll(); } } } @@ -620,7 +620,7 @@ public: colour = (colour & COLOUR_FLAG_TRANSLUCENT) | selectedIndex; ThemeSetColour(wc, _colour_index_2, colour); ColourSchemeUpdateAll(); - window_invalidate_all(); + WindowInvalidateAll(); _colour_index_1 = -1; _colour_index_2 = -1; } @@ -727,7 +727,7 @@ public: uint8_t colour = ThemeGetColour(wc, _colour_index_2); WindowDropdownShowColour( this, &(window_themes_widgets[WIDX_THEMES_COLOURBTN_MASK]), colours[1], colour); - widget_invalidate(*this, WIDX_THEMES_LIST); + WidgetInvalidate(*this, WIDX_THEMES_LIST); } } else if ( @@ -751,14 +751,14 @@ public: } ThemeSetColour(wc, _colour_index_2, colour); ColourSchemeUpdateAll(); - window_invalidate_all(); + WindowInvalidateAll(); } } } } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { ScreenCoordsXY screenCoords; @@ -766,9 +766,9 @@ public: return; if ((colours[1] & 0x80) == 0) - // gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, + // GfxFillRect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, // ColourMapA[colours[1]].mid_light); - gfx_clear(&dpi, ColourMapA[colours[1]].mid_light); + GfxClear(&dpi, ColourMapA[colours[1]].mid_light); screenCoords.y = 0; for (int32_t i = 0; i < GetColourSchemeTabCount(); i++) { @@ -789,18 +789,18 @@ public: if (colour & COLOUR_FLAG_TRANSLUCENT) { - translucent_window_palette windowPalette = TranslucentWindowPalettes[BASE_COLOUR(colour)]; + TranslucentWindowPalette windowPalette = TranslucentWindowPalettes[BASE_COLOUR(colour)]; - gfx_filter_rect(&dpi, { leftTop, rightBottom }, windowPalette.highlight); - gfx_filter_rect(&dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, windowPalette.shadow); + GfxFilterRect(&dpi, { leftTop, rightBottom }, windowPalette.highlight); + GfxFilterRect(&dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, windowPalette.shadow); } else { colour = ColourMapA[colours[1]].mid_dark; - gfx_fill_rect(&dpi, { leftTop, rightBottom }, colour); + GfxFillRect(&dpi, { leftTop, rightBottom }, colour); colour = ColourMapA[colours[1]].lightest; - gfx_fill_rect(&dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, colour); + GfxFillRect(&dpi, { leftTop + yPixelOffset, rightBottom + yPixelOffset }, colour); } } @@ -808,21 +808,21 @@ public: int32_t numColours = ThemeDescGetNumColours(wc); for (uint8_t j = 0; j < numColours; j++) { - DrawTextBasic(&dpi, { 2, screenCoords.y + 4 }, ThemeDescGetName(wc), {}, { colours[1] }); + DrawTextBasic(dpi, { 2, screenCoords.y + 4 }, ThemeDescGetName(wc), {}, { colours[1] }); uint8_t 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); - gfx_draw_sprite(&dpi, image, { _button_offset_x + 12 * j, screenCoords.y + _button_offset_y }); + 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 }; - gfx_fill_rect_inset(&dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_E0); + GfxFillRectInset(&dpi, { topLeft, bottomRight }, colours[1], INSET_RECT_F_E0); if (colour & COLOUR_FLAG_TRANSLUCENT) { - gfx_draw_string( - &dpi, topLeft, static_cast(CheckBoxMarkString), + GfxDrawString( + dpi, topLeft, static_cast(CheckBoxMarkString), { static_cast(colours[1] & 0x7F), FontStyle::Medium, TextDarkness::Dark }); } } @@ -867,14 +867,14 @@ public: return 0; } - void WindowThemesDrawTabImages(rct_drawpixelinfo* dpi) + void WindowThemesDrawTabImages(DrawPixelInfo* dpi) { for (int32_t i = 0; i < WINDOW_THEMES_TAB_COUNT; i++) { int32_t sprite_idx = window_themes_tab_sprites[i]; if (_selected_tab == i) sprite_idx += frame_no / window_themes_tab_animation_divisor[_selected_tab]; - gfx_draw_sprite( + GfxDrawSprite( dpi, ImageId(sprite_idx), windowPos + ScreenCoordsXY{ widgets[WIDX_THEMES_SETTINGS_TAB + i].left, widgets[WIDX_THEMES_SETTINGS_TAB + i].top }); @@ -882,12 +882,12 @@ public: } }; -rct_window* WindowThemesOpen() +WindowBase* WindowThemesOpen() { - rct_window* window; + WindowBase* window; // Check if window is already open - window = window_bring_to_front_by_class(WindowClass::Themes); + window = WindowBringToFrontByClass(WindowClass::Themes); if (window != nullptr) return window; diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index a88a612163..2a58f56d4f 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,21 +20,24 @@ #include #include #include +#include #include #include #include +#include +#include +#include #include #include +#include #include #include #include -#include +#include #include #include -#include #include #include -#include #include #include @@ -106,6 +109,7 @@ enum WindowTileInspectorWidgetIdx WIDX_PATH_SPINNER_HEIGHT_DECREASE, WIDX_PATH_CHECK_BROKEN, WIDX_PATH_CHECK_SLOPED, + WIDX_PATH_CHECK_JUNCTION_RAILINGS, WIDX_PATH_CHECK_EDGE_NE, // Note: This is NOT named after the world orientation, but after the way WIDX_PATH_CHECK_EDGE_E, // it looks in the window (top corner is north). Their order is important, WIDX_PATH_CHECK_EDGE_SE, // as this is the same order paths use for their corners / edges. @@ -121,7 +125,7 @@ enum WindowTileInspectorWidgetIdx WIDX_TRACK_SPINNER_HEIGHT_INCREASE, WIDX_TRACK_SPINNER_HEIGHT_DECREASE, WIDX_TRACK_CHECK_CHAIN_LIFT, - WIDX_TRACK_CHECK_BLOCK_BRAKE_CLOSED, + WIDX_TRACK_CHECK_BRAKE_CLOSED, WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE, // Scenery @@ -246,13 +250,13 @@ constexpr ScreenCoordsXY CheckboxGroupOffset( MakeSpinnerWidgets({20, 23}, {51, 12}, WindowWidgetType::Spinner, WindowColour::Secondary), /* Spinner X (3 widgets) */ \ MakeSpinnerWidgets({90, 23}, {51, 12}, WindowWidgetType::Spinner, WindowColour::Secondary), /* Spinner Y (3 widgets) */ \ /* Top buttons */ \ - MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 0, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_DEMOLISH, STR_REMOVE_SELECTED_ELEMENT_TIP ), /* Remove button */ \ + MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 0, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_REMOVE_SELECTED_ELEMENT_TIP ), /* Remove button */ \ MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 1, ToolbarButtonHalfSize, WindowWidgetType::Button, WindowColour::Secondary, STR_UP, STR_MOVE_SELECTED_ELEMENT_UP_TIP), /* Move up */ \ MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 1 + ScreenSize{0, 12}, ToolbarButtonHalfSize, WindowWidgetType::Button, WindowColour::Secondary, STR_DOWN, STR_MOVE_SELECTED_ELEMENT_DOWN_TIP), /* Move down */ \ - MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 2, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_ROTATE_ARROW, STR_ROTATE_SELECTED_ELEMENT_TIP), /* Rotate button */ \ - MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 3, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_SORT, STR_TILE_INSPECTOR_SORT_TIP), /* Sort button */ \ - MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 4, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_PASTE, STR_TILE_INSPECTOR_PASTE_TIP), /* Paste button */ \ - MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 5, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_COPY, STR_TILE_INSPECTOR_COPY_TIP), /* Copy button */ \ + MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 2, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_SELECTED_ELEMENT_TIP), /* Rotate button */ \ + MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 3, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_SORT), STR_TILE_INSPECTOR_SORT_TIP), /* Sort button */ \ + MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 4, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_PASTE), STR_TILE_INSPECTOR_PASTE_TIP), /* Paste button */ \ + MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 5, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_COPY), STR_TILE_INSPECTOR_COPY_TIP), /* Copy button */ \ /* Column headers */ \ MakeWidget(InvisibleFlagColumnXY, InvisibleFlagColumnSize, WindowWidgetType::TableHeader, WindowColour::Secondary, STR_TILE_INSPECTOR_INVISIBLE_SHORT, STR_TILE_INSPECTOR_FLAG_INVISIBLE), /* Invisible flag */ \ MakeWidget(TypeColumnXY, TypeColumnSize, WindowWidgetType::TableHeader, WindowColour::Secondary, STR_TILE_INSPECTOR_ELEMENT_TYPE), /* Type */ \ @@ -265,7 +269,7 @@ constexpr ScreenCoordsXY CheckboxGroupOffset( MakeWidget({6, 0}, {WW - 12, 0}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_NONE, STR_NONE ), /* Details group box */ \ MakeWidget({6, 0}, {WW - 12, 0}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES, STR_NONE ) /* Properties group box */ -static rct_widget DefaultWidgets[] = { +static Widget DefaultWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, WIDGETS_END, }; @@ -274,7 +278,7 @@ constexpr int32_t NumSurfaceProperties = 4; constexpr int32_t NumSurfaceDetails = 4; constexpr int32_t SurfacePropertiesHeight = 16 + NumSurfaceProperties * 21; constexpr int32_t SurfaceDetailsHeight = 20 + NumSurfaceDetails * 11; -static rct_widget SurfaceWidgets[] = { +static Widget SurfaceWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_SURFACE_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(PropertyRowCol({ 12, 0 }, 1, 0), PropertyButtonSize, WindowWidgetType::Button, WindowColour::Secondary, STR_TILE_INSPECTOR_SURFACE_REMOVE_FENCES), // WIDX_SURFACE_BUTTON_REMOVE_FENCES @@ -287,23 +291,24 @@ static rct_widget SurfaceWidgets[] = { WIDGETS_END, }; -constexpr int32_t NumPathProperties = 5; +constexpr int32_t NumPathProperties = 6; constexpr int32_t NumPathDetails = 3; constexpr int32_t PathPropertiesHeight = 16 + NumPathProperties * 21; constexpr int32_t PathDetailsHeight = 20 + NumPathDetails * 11; -static rct_widget PathWidgets[] = { +static Widget PathWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_PATH_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(PropertyRowCol({ 12, 0 }, 1, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_PATH_BROKEN), // WIDX_PATH_CHECK_BROKEN MakeWidget(PropertyRowCol({ 12, 0 }, 2, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_PATH_SLOPED), // WIDX_PATH_CHECK_SLOPED - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 3, 1), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_NE - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 4, 2), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_E - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 3, 3), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_SE - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 2, 4), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_S - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 1, 3), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_SW - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 0, 2), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_W - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 1, 1), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_NW - MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 3, 1), 2, 0), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_N + MakeWidget(PropertyRowCol({ 12, 0 }, 3, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_PATH_JUNCTION_RAILINGS), // WIDX_PATH_CHECK_JUNCTION_RAILINGS + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 3, 1), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_NE + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 4, 2), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_E + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 3, 3), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_SE + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 2, 4), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_S + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 1, 3), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_SW + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 0, 2), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_W + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 1, 1), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_NW + MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 4, 1), 2, 0), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_PATH_CHECK_EDGE_N WIDGETS_END, }; @@ -311,12 +316,12 @@ constexpr int32_t NumTrackProperties = 5; constexpr int32_t NumTrackDetails = 7; constexpr int32_t TrackPropertiesHeight = 16 + NumTrackProperties * 21; constexpr int32_t TrackDetailsHeight = 20 + NumTrackDetails * 11; -static rct_widget TrackWidgets[] = { +static Widget TrackWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeWidget(PropertyRowCol({ 12, 0}, 0, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_TRACK_ENTIRE_TRACK_PIECE), // WIDX_TRACK_CHECK_APPLY_TO_ALL MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 1, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_TRACK_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(PropertyRowCol({ 12, 0}, 2, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_TRACK_CHAIN_LIFT), // WIDX_TRACK_CHECK_CHAIN_LIFT - MakeWidget(PropertyRowCol({ 12, 0}, 3, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_TRACK_BLOCK_BRAKE), // WIDX_TRACK_CHECK_BLOCK_BRAKE_CLOSED + MakeWidget(PropertyRowCol({ 12, 0}, 3, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_TRACK_BRAKE_CLOSED), // WIDX_TRACK_CHECK_BRAKE_CLOSED MakeWidget(PropertyRowCol({ 12, 0}, 4, 0), PropertyFullWidth, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_TILE_INSPECTOR_TRACK_IS_INDESTRUCTIBLE), // WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE WIDGETS_END, }; @@ -325,7 +330,7 @@ constexpr int32_t NumSceneryProperties = 4; // The checkbox groups both count fo constexpr int32_t NumSceneryDetails = 4; constexpr int32_t SceneryPropertiesHeight = 16 + NumSceneryProperties * 21; constexpr int32_t SceneryDetailsHeight = 20 + NumSceneryDetails * 11; -static rct_widget SceneryWidgets[] = { +static Widget SceneryWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_SCENERY_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 1, 1), 1, 0), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_SCENERY_CHECK_QUARTER_N @@ -343,7 +348,7 @@ constexpr int32_t NumEntranceProperties = 2; constexpr int32_t NumEntranceDetails = 4; constexpr int32_t EntrancePropertiesHeight = 16 + NumEntranceProperties * 21; constexpr int32_t EntranceDetailsHeight = 20 + NumEntranceDetails * 11; -static rct_widget EntranceWidgets[] = { +static Widget EntranceWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_ENTRANCE_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(PropertyRowCol({ 12, 0 }, 1, 0), PropertyButtonSize, WindowWidgetType::Button, WindowColour::Secondary, STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE, STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE_TIP), // WIDX_ENTRANCE_BUTTON_MAKE_USABLE @@ -354,7 +359,7 @@ constexpr int32_t NumWallProperties = 3; constexpr int32_t NumWallDetails = 2; constexpr int32_t WallPropertiesHeight = 16 + NumWallProperties * 21; constexpr int32_t WallDetailsHeight = 20 + NumWallDetails * 11; -static rct_widget WallWidgets[] = { +static Widget WallWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_WALL_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(PropertyRowCol({ 12, 0 }, 1, 1), PropertyButtonSize, WindowWidgetType::DropdownMenu, WindowColour::Secondary), // WIDX_WALL_DROPDOWN_SLOPE @@ -367,7 +372,7 @@ constexpr int32_t NumLargeSceneryProperties = 1; constexpr int32_t NumLargeSceneryDetails = 3; constexpr int32_t LargeSceneryPropertiesHeight = 16 + NumLargeSceneryProperties * 21; constexpr int32_t LargeSceneryDetailsHeight = 20 + NumLargeSceneryDetails * 11; -static rct_widget LargeSceneryWidgets[] = { +static Widget LargeSceneryWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_LARGE_SCENERY_SPINNER_HEIGHT{,_INCREASE,_DECREASE} WIDGETS_END, @@ -377,7 +382,7 @@ constexpr int32_t NumBannerProperties = 3; constexpr int32_t NumBannerDetails = 1; constexpr int32_t BannerPropertiesHeight = 16 + NumBannerProperties * 21; constexpr int32_t BannerDetailsHeight = 20 + NumBannerDetails * 11; -static rct_widget BannerWidgets[] = { +static Widget BannerWidgets[] = { MAIN_TILE_INSPECTOR_WIDGETS, MakeSpinnerWidgets(PropertyRowCol({ 12, 0 }, 0, 1), PropertyButtonSize, WindowWidgetType::Spinner, WindowColour::Secondary), // WIDX_BANNER_SPINNER_HEIGHT{,_INCREASE,_DECREASE} MakeWidget(CheckboxGroupOffset(PropertyRowCol({ 12, 0 }, 1, 1), 3, 1), { 12, 12 }, WindowWidgetType::Checkbox, WindowColour::Secondary), // WIDX_BANNER_CHECK_BLOCK_NE @@ -388,7 +393,7 @@ static rct_widget BannerWidgets[] = { WIDGETS_END, }; -static rct_widget *PageWidgets[] = { +static Widget *PageWidgets[] = { DefaultWidgets, SurfaceWidgets, PathWidgets, @@ -492,7 +497,7 @@ public: WindowInitScrollWidgets(*this); _tileSelected = false; - tool_set(*this, WIDX_BACKGROUND, Tool::Crosshair); + ToolSet(*this, WIDX_BACKGROUND, Tool::Crosshair); } void OnUpdate() override @@ -512,7 +517,7 @@ public: switch (widgetIndex) { case WIDX_CLOSE: - tool_cancel(); + ToolCancel(); Close(); return; @@ -579,7 +584,7 @@ public: case WIDX_SURFACE_CHECK_CORNER_E: case WIDX_SURFACE_CHECK_CORNER_S: case WIDX_SURFACE_CHECK_CORNER_W: - SurfaceToggleCorner(((widgetIndex - WIDX_SURFACE_CHECK_CORNER_N) + 2 - get_current_rotation()) & 3); + SurfaceToggleCorner(((widgetIndex - WIDX_SURFACE_CHECK_CORNER_N) + 2 - GetCurrentRotation()) & 3); break; case WIDX_SURFACE_CHECK_DIAGONAL: @@ -593,6 +598,10 @@ public: case WIDX_PATH_CHECK_SLOPED: PathSetSloped(windowTileInspectorSelectedIndex, !tileElement->AsPath()->IsSloped()); break; + case WIDX_PATH_CHECK_JUNCTION_RAILINGS: + PathSetJunctionRailings( + windowTileInspectorSelectedIndex, !tileElement->AsPath()->HasJunctionRailings()); + break; case WIDX_PATH_CHECK_BROKEN: PathSetBroken(windowTileInspectorSelectedIndex, !tileElement->AsPath()->IsBroken()); @@ -606,7 +615,7 @@ public: // 0 = east/right, 1 = south/bottom, 2 = west/left, 3 = north/top const int32_t eswn = (widgetIndex - WIDX_PATH_CHECK_EDGE_E) / 2; // Transform to world orientation - const int32_t index = (eswn - get_current_rotation()) & 3; + const int32_t index = (eswn - GetCurrentRotation()) & 3; PathToggleEdge( windowTileInspectorSelectedIndex, index + 4); // The corners are stored in the 4 most significant bits, hence the + 4 @@ -621,7 +630,7 @@ public: // 0 = NE, 1 = SE, 2 = SW, 3 = NW const int32_t neseswnw = (widgetIndex - WIDX_PATH_CHECK_EDGE_NE) / 2; // Transform to world orientation - const int32_t index = (neseswnw - get_current_rotation()) & 3; + const int32_t index = (neseswnw - GetCurrentRotation()) & 3; PathToggleEdge(windowTileInspectorSelectedIndex, index); break; } @@ -644,8 +653,8 @@ public: break; } - case WIDX_TRACK_CHECK_BLOCK_BRAKE_CLOSED: - TrackSetBlockBrake(windowTileInspectorSelectedIndex, !tileElement->AsTrack()->BlockBrakeClosed()); + case WIDX_TRACK_CHECK_BRAKE_CLOSED: + TrackSetBrakeClosed(windowTileInspectorSelectedIndex, !tileElement->AsTrack()->IsBrakeClosed()); break; case WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE: @@ -847,7 +856,7 @@ public: case WIDX_WALL_DROPDOWN_SLOPE_BUTTON: { - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; // Use dropdown instead of dropdown button widget--; // Fill dropdown list @@ -931,14 +940,14 @@ public: bool mouseOnViewport = false; if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z)) { - auto info = get_map_coordinates_from_pos(screenCoords, ViewportInteractionFlags); + auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionFlags); clickedElement = info.Element; mapCoords = info.Loc; } // Even if Ctrl was pressed, fall back to normal selection when there was nothing under the cursor if (clickedElement == nullptr) { - auto mouseCoords = screen_pos_to_map_pos(screenCoords, nullptr); + auto mouseCoords = ScreenPosToMapPos(screenCoords, nullptr); if (mouseCoords.has_value()) { mouseOnViewport = true; @@ -1000,30 +1009,30 @@ public: InvalidateWidget(WIDX_LIST); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); ScreenCoordsXY screenCoords(windowPos.x, windowPos.y); // Draw coordinates - gfx_draw_string(&dpi, screenCoords + ScreenCoordsXY(5, 24), "X:", { colours[1] }); - gfx_draw_string(&dpi, screenCoords + ScreenCoordsXY(74, 24), "Y:", { colours[1] }); + GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 24), "X:", { colours[1] }); + GfxDrawString(dpi, screenCoords + ScreenCoordsXY(74, 24), "Y:", { colours[1] }); if (_tileSelected) { auto tileCoords = TileCoordsXY{ _toolMap }; auto ft = Formatter(); ft.Add(tileCoords.x); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 43, 24 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); + dpi, screenCoords + ScreenCoordsXY{ 43, 24 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); ft = Formatter(); ft.Add(tileCoords.y); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 113, 24 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); + dpi, screenCoords + ScreenCoordsXY{ 113, 24 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT }); } else { - gfx_draw_string(&dpi, screenCoords + ScreenCoordsXY(43 - 7, 24), "-", { colours[1] }); - gfx_draw_string(&dpi, screenCoords + ScreenCoordsXY(113 - 7, 24), "-", { colours[1] }); + GfxDrawString(dpi, screenCoords + ScreenCoordsXY(43 - 7, 24), "-", { colours[1] }); + GfxDrawString(dpi, screenCoords + ScreenCoordsXY(113 - 7, 24), "-", { colours[1] }); } if (windowTileInspectorSelectedIndex != -1) @@ -1049,7 +1058,7 @@ public: terrainNameId = surfaceStyle->NameStringId; auto ft = Formatter(); ft.Add(terrainNameId); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_SURFACE_TERAIN, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_SURFACE_TERAIN, ft, { colours[1] }); // Edge texture name StringId terrainEdgeNameId = STR_EMPTY; @@ -1059,7 +1068,7 @@ public: ft = Formatter(); ft.Add(terrainEdgeNameId); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_SURFACE_EDGE, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_SURFACE_EDGE, ft, { colours[1] }); // Land ownership StringId landOwnership; @@ -1077,31 +1086,31 @@ public: ft = Formatter(); ft.Add(landOwnership); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SURFACE_OWNERSHIP, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SURFACE_OWNERSHIP, ft, { colours[1] }); // Water level ft = Formatter(); ft.Add(tileElement->AsSurface()->GetWaterHeight()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL, ft, { colours[1] }); // Properties // Raise / lower label screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_SURFACE_SPINNER_HEIGHT].top }; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_SURFACE_SPINNER_HEIGHT].left + 3; ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Raised corners screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_SURFACE_CHECK_CORNER_E].top }; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_SURFACE_CORNERS, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_SURFACE_CORNERS, {}, { colours[1] }); break; } case TileElementType::Path: @@ -1117,7 +1126,7 @@ public: { auto ft = Formatter(); ft.Add(surfaceObj->NameStringId); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_FOOTPATH_SURFACE_NAME, ft, { COLOUR_WHITE }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_FOOTPATH_SURFACE_NAME, ft, { COLOUR_WHITE }); } // Railings name @@ -1127,36 +1136,35 @@ public: auto ft = Formatter(); ft.Add(railingsObj->NameStringId); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_FOOTPATH_RAILINGS_NAME, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_FOOTPATH_RAILINGS_NAME, ft, { COLOUR_WHITE }); } } else { // Legacy path name - auto footpathEntry = reinterpret_cast(footpathObj->GetLegacyData()); + auto footpathEntry = reinterpret_cast(footpathObj->GetLegacyData()); auto ft = Formatter(); ft.Add(footpathEntry->string_idx); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_PATH_NAME, ft, { COLOUR_WHITE }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_PATH_NAME, ft, { COLOUR_WHITE }); } // Path addition if (tileElement->AsPath()->HasAddition()) { - const auto pathAdditionType = tileElement->AsPath()->GetAdditionEntryIndex(); - const auto* pathBitEntry = GetFootpathItemEntry(pathAdditionType); + const auto pathBitEntry = tileElement->AsPath()->GetAdditionEntry(); StringId additionNameId = pathBitEntry != nullptr ? pathBitEntry->name : static_cast(STR_UNKNOWN_OBJECT_TYPE); auto ft = Formatter(); ft.Add(additionNameId); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 2 * 11 }, STR_TILE_INSPECTOR_PATH_ADDITIONS, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 2 * 11 }, STR_TILE_INSPECTOR_PATH_ADDITIONS, ft, { COLOUR_WHITE }); } else { DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 2 * 11 }, STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE, {}, + dpi, screenCoords + ScreenCoordsXY{ 0, 2 * 11 }, STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE, {}, { COLOUR_WHITE }); } @@ -1164,18 +1172,18 @@ public: // Raise / lower label screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_PATH_SPINNER_HEIGHT].top }; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_PATH_SPINNER_HEIGHT].left + 3; auto ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Path connections screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_PATH_CHECK_EDGE_W].top }; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_PATH_CONNECTED_EDGES, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_PATH_CONNECTED_EDGES, {}, { colours[1] }); break; } @@ -1183,12 +1191,12 @@ public: { auto trackElement = tileElement->AsTrack(); RideId id = trackElement->GetRideIndex(); - auto rideTile = get_ride(id); + auto rideTile = GetRide(id); // Ride ID auto ft = Formatter(); ft.Add(id); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_TRACK_RIDE_ID, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_TRACK_RIDE_ID, ft, { colours[1] }); // Ride name if (rideTile != nullptr) @@ -1196,7 +1204,7 @@ public: ft = Formatter(); rideTile->FormatNameTo(ft); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_TRACK_RIDE_NAME, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_TRACK_RIDE_NAME, ft, { colours[1] }); } @@ -1205,18 +1213,18 @@ public: ft = Formatter(); ft.Add(rtd.Naming.Name); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_TRACK_RIDE_TYPE, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_TRACK_RIDE_TYPE, ft, { colours[1] }); // Track ft = Formatter(); ft.Add(trackElement->GetTrackType()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_TRACK_PIECE_ID, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_TRACK_PIECE_ID, ft, { colours[1] }); ft = Formatter(); ft.Add(trackElement->GetSequenceIndex()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 44 }, STR_TILE_INSPECTOR_TRACK_SEQUENCE, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 44 }, STR_TILE_INSPECTOR_TRACK_SEQUENCE, ft, { colours[1] }); if (trackElement->IsStation()) { auto stationIndex = trackElement->GetStationIndex(); @@ -1224,7 +1232,7 @@ public: ft.Add(STR_COMMA16); ft.Add(stationIndex.ToUnderlying()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); } else { @@ -1233,24 +1241,24 @@ public: ft.Add(STR_STRING); ft.Add(stationNone); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); } ft = Formatter(); ft.Add(ColourSchemeNames[trackElement->GetColourScheme()]); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 66 }, STR_TILE_INSPECTOR_COLOUR_SCHEME, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 66 }, STR_TILE_INSPECTOR_COLOUR_SCHEME, ft, { colours[1] }); // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_TRACK_SPINNER_HEIGHT].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_TRACK_SPINNER_HEIGHT].left + 3; ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); break; } @@ -1260,7 +1268,7 @@ public: // Age auto ft = Formatter(); ft.Add(tileElement->AsSmallScenery()->GetAge()); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_SCENERY_AGE, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_SCENERY_AGE, ft, { colours[1] }); // Quadrant value const auto* sceneryEntry = tileElement->AsSmallScenery()->GetEntry(); @@ -1276,7 +1284,7 @@ public: ft = Formatter(); ft.Add(_quadrantStringIdx[quadrant]); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_SCENERY_QUADRANT, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_SCENERY_QUADRANT, ft, { colours[1] }); } @@ -1284,27 +1292,27 @@ public: ft = Formatter(); ft.Add(tileElement->AsSmallScenery()->GetEntryIndex()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX, ft, { colours[1] }); // Properties // Raise / Lower screenCoords.y = windowPos.y + widgets[WIDX_SCENERY_SPINNER_HEIGHT].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_SCENERY_SPINNER_HEIGHT].left + 3; ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Quarter tile screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_SCENERY_CHECK_QUARTER_E].top }; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL, {}, { colours[1] }); // Collision screenCoords.y = windowPos.y + widgets[WIDX_SCENERY_CHECK_COLLISION_E].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_COLLISSION, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_COLLISSION, {}, { colours[1] }); break; } @@ -1314,7 +1322,7 @@ public: // Entrance type auto ft = Formatter(); ft.Add(EntranceTypeStringIds[tileElement->AsEntrance()->GetEntranceType()]); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_ENTRANCE_TYPE, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_ENTRANCE_TYPE, ft, { colours[1] }); if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE) { @@ -1322,7 +1330,7 @@ public: ft = Formatter(); ft.Add(ParkEntranceGetIndex({ _toolMap, tileElement->GetBaseZ() })); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft, { colours[1] }); } else @@ -1333,14 +1341,14 @@ public: { // Ride entrance ID DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft, { colours[1] }); } else { // Ride exit ID DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID, ft, { colours[1] }); } } @@ -1351,7 +1359,7 @@ public: ft = Formatter(); ft.Add(ParkEntrancePartStringIds[tileElement->AsEntrance()->GetSequenceIndex()]); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRANCE_PART, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRANCE_PART, ft, { colours[1] }); } else { @@ -1359,7 +1367,7 @@ public: ft = Formatter(); ft.Add(tileElement->AsEntrance()->GetRideIndex()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID, ft, { colours[1] }); // Station index auto stationIndex = tileElement->AsEntrance()->GetStationIndex(); @@ -1367,19 +1375,19 @@ public: ft.Add(STR_COMMA16); ft.Add(stationIndex.ToUnderlying()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); + dpi, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); } // Properties // Raise / Lower screenCoords.y = windowPos.y + widgets[WIDX_ENTRANCE_SPINNER_HEIGHT].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_ENTRANCE_SPINNER_HEIGHT].left + 3; ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); break; } @@ -1389,7 +1397,7 @@ public: // Type auto ft = Formatter(); ft.Add(tileElement->AsWall()->GetEntryIndex()); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_WALL_TYPE, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_WALL_TYPE, ft, { colours[1] }); // Banner info auto banner = tileElement->AsWall()->GetBanner(); @@ -1398,35 +1406,35 @@ public: ft = Formatter(); banner->FormatTextTo(ft); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); } else { DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, {}, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, {}, { colours[1] }); } // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_WALL_SPINNER_HEIGHT].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_WALL_SPINNER_HEIGHT].left + 3; ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Slope label screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_WALL_DROPDOWN_SLOPE].top }; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_WALL_SLOPE, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_WALL_SLOPE, {}, { colours[1] }); // Animation frame label screenCoords.y = windowPos.y + widgets[WIDX_WALL_SPINNER_ANIMATION_FRAME].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME, {}, { colours[1] }); // Current animation frame colour_t colour = colours[1]; @@ -1437,7 +1445,7 @@ public: screenCoords.x = windowPos.x + widgets[WIDX_WALL_SPINNER_ANIMATION_FRAME].left + 3; ft = Formatter(); ft.Add(tileElement->AsWall()->GetAnimationFrame()); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colour }); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colour }); break; } @@ -1449,17 +1457,17 @@ public: ObjectEntryIndex largeSceneryType = sceneryElement->GetEntryIndex(); auto ft = Formatter(); ft.Add(largeSceneryType); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE, ft, { colours[1] }); // Part ID ft = Formatter(); ft.Add(sceneryElement->GetSequenceIndex()); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_LARGE_SCENERY_PIECE_ID, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_LARGE_SCENERY_PIECE_ID, ft, { colours[1] }); // Banner info - auto* largeSceneryEntry = GetLargeSceneryEntry(largeSceneryType); + auto* largeSceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(largeSceneryType); if (largeSceneryEntry != nullptr && largeSceneryEntry->scrolling_mode != SCROLLING_MODE_NONE) { auto banner = sceneryElement->GetBanner(); @@ -1468,27 +1476,27 @@ public: ft = Formatter(); banner->FormatTextTo(ft); DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); } } else { DrawTextBasic( - &dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, {}, + dpi, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, {}, { colours[1] }); } // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_LARGE_SCENERY_SPINNER_HEIGHT].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_LARGE_SCENERY_SPINNER_HEIGHT].left + 3; ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); break; } @@ -1501,24 +1509,24 @@ public: { Formatter ft; banner->FormatTextTo(ft); - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); } // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_BANNER_SPINNER_HEIGHT].top; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_BANNER_SPINNER_HEIGHT].left + 3; auto ft = Formatter(); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Blocked paths screenCoords.y += 28; screenCoords.x = windowPos.x + widgets[WIDX_GROUPBOX_DETAILS].left + 7; - DrawTextBasic(&dpi, screenCoords, STR_TILE_INSPECTOR_BANNER_BLOCKED_PATHS, {}, { colours[1] }); + DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_BANNER_BLOCKED_PATHS, {}, { colours[1] }); break; } @@ -1528,10 +1536,10 @@ public: } } - void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { const int32_t listWidth = widgets[WIDX_LIST].width(); - gfx_fill_rect( + GfxFillRect( &dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, ColourMapA[colours[1]].mid_light); // Show usage hint when nothing is selected @@ -1539,10 +1547,10 @@ public: { auto& listWidget = widgets[WIDX_LIST]; auto centrePos = ScreenCoordsXY{ listWidget.width() / 2, - (listWidget.height() - font_get_line_height(FontStyle::Medium)) / 2 }; + (listWidget.height() - FontGetLineHeight(FontStyle::Medium)) / 2 }; auto ft = Formatter{}; auto textPaint = TextPaint{ colours[1], TextAlignment::CENTRE }; - DrawTextWrapped(&dpi, centrePos, listWidth, STR_TILE_INSPECTOR_SELECT_TILE_HINT, ft, textPaint); + DrawTextWrapped(dpi, centrePos, listWidth, STR_TILE_INSPECTOR_SELECT_TILE_HINT, ft, textPaint); return; } @@ -1565,12 +1573,12 @@ public: // Draw row background colour auto fillRectangle = ScreenRect{ { 0, screenCoords.y }, { listWidth, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }; if (selectedRow) - gfx_fill_rect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); + GfxFillRect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark); else if (hoveredRow) - gfx_fill_rect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark | 0x1000000); + GfxFillRect(&dpi, fillRectangle, ColourMapA[colours[1]].mid_dark | 0x1000000); // Zebra stripes else if (((windowTileInspectorElementCount - i) & 1) == 0) - gfx_fill_rect(&dpi, fillRectangle, ColourMapA[colours[1]].light | 0x1000000); + GfxFillRect(&dpi, fillRectangle, ColourMapA[colours[1]].light | 0x1000000); const StringId stringFormat = (selectedRow || hoveredRow) ? STR_WHITE_STRING : STR_WINDOW_COLOUR_2_STRINGID; auto checkboxFormatter = Formatter(); @@ -1578,72 +1586,72 @@ public: checkboxFormatter.Add(CheckBoxMarkString); // Draw checkbox and check if visible - gfx_fill_rect_inset(&dpi, { { 2, screenCoords.y }, { 15, screenCoords.y + 11 } }, colours[1], INSET_RECT_F_E0); + GfxFillRectInset(&dpi, { { 2, screenCoords.y }, { 15, screenCoords.y + 11 } }, colours[1], INSET_RECT_F_E0); if (!tileElement->IsInvisible()) { auto eyeFormatter = Formatter(); eyeFormatter.Add(STR_STRING); eyeFormatter.Add(EyeString); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ 2, 1 }, stringFormat, eyeFormatter); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 2, 1 }, stringFormat, eyeFormatter); } const auto type = tileElement->GetType(); switch (type) { case TileElementType::Surface: - typeName = language_get_string(STR_TILE_INSPECTOR_SURFACE); + typeName = LanguageGetString(STR_TILE_INSPECTOR_SURFACE); break; case TileElementType::Path: - typeName = tileElement->AsPath()->IsQueue() ? language_get_string(STR_QUEUE_LINE_MAP_TIP) - : language_get_string(STR_FOOTPATH_MAP_TIP); + typeName = tileElement->AsPath()->IsQueue() ? LanguageGetString(STR_QUEUE_LINE_MAP_TIP) + : LanguageGetString(STR_FOOTPATH_MAP_TIP); break; case TileElementType::Track: - typeName = language_get_string(STR_RIDE_COMPONENT_TRACK_CAPITALISED); + typeName = LanguageGetString(STR_RIDE_COMPONENT_TRACK_CAPITALISED); break; case TileElementType::SmallScenery: { const auto* sceneryEntry = tileElement->AsSmallScenery()->GetEntry(); snprintf( - buffer, sizeof(buffer), "%s (%s)", language_get_string(STR_OBJECT_SELECTION_SMALL_SCENERY), - sceneryEntry != nullptr ? language_get_string(sceneryEntry->name) : ""); + buffer, sizeof(buffer), "%s (%s)", LanguageGetString(STR_OBJECT_SELECTION_SMALL_SCENERY), + sceneryEntry != nullptr ? LanguageGetString(sceneryEntry->name) : ""); typeName = buffer; break; } case TileElementType::Entrance: - typeName = language_get_string(STR_RIDE_CONSTRUCTION_ENTRANCE); + typeName = LanguageGetString(STR_RIDE_CONSTRUCTION_ENTRANCE); break; case TileElementType::Wall: { const auto* entry = tileElement->AsWall()->GetEntry(); snprintf( - buffer, sizeof(buffer), "%s (%s)", language_get_string(STR_TILE_INSPECTOR_WALL), - entry != nullptr ? language_get_string(entry->name) : ""); + buffer, sizeof(buffer), "%s (%s)", LanguageGetString(STR_TILE_INSPECTOR_WALL), + entry != nullptr ? LanguageGetString(entry->name) : ""); typeName = buffer; break; } case TileElementType::LargeScenery: - typeName = language_get_string(STR_OBJECT_SELECTION_LARGE_SCENERY); + typeName = LanguageGetString(STR_OBJECT_SELECTION_LARGE_SCENERY); break; case TileElementType::Banner: snprintf( - buffer, sizeof(buffer), "%s (%u)", language_get_string(STR_BANNER_WINDOW_TITLE), + buffer, sizeof(buffer), "%s (%u)", LanguageGetString(STR_BANNER_WINDOW_TITLE), tileElement->AsBanner()->GetIndex().ToUnderlying()); typeName = buffer; break; default: - snprintf(buffer, sizeof(buffer), "%s (%d)", language_get_string(STR_UNKNOWN_OBJECT_TYPE), EnumValue(type)); + snprintf(buffer, sizeof(buffer), "%s (%d)", LanguageGetString(STR_UNKNOWN_OBJECT_TYPE), EnumValue(type)); typeName = buffer; } - const int32_t clearanceHeight = tileElement->clearance_height; + const int32_t clearanceHeight = tileElement->ClearanceHeight; const bool ghost = tileElement->IsGhost(); const bool last = tileElement->IsLastForTile(); @@ -1651,32 +1659,31 @@ public: auto ft = Formatter(); ft.Add(STR_STRING); ft.Add(typeName); - DrawTextEllipsised( - &dpi, screenCoords + ScreenCoordsXY{ TypeColumnXY.x, 0 }, TypeColumnSize.width, stringFormat, ft); + DrawTextEllipsised(dpi, screenCoords + ScreenCoordsXY{ TypeColumnXY.x, 0 }, TypeColumnSize.width, stringFormat, ft); // Base height ft = Formatter(); ft.Add(STR_FORMAT_INTEGER); - ft.Add(tileElement->base_height); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ BaseHeightColumnXY.x, 0 }, stringFormat, ft); + ft.Add(tileElement->BaseHeight); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ BaseHeightColumnXY.x, 0 }, stringFormat, ft); // Clearance height ft = Formatter(); ft.Add(STR_FORMAT_INTEGER); ft.Add(clearanceHeight); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ ClearanceHeightColumnXY.x, 0 }, stringFormat, ft); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ ClearanceHeightColumnXY.x, 0 }, stringFormat, ft); // Direction ft = Formatter(); ft.Add(STR_FORMAT_INTEGER); ft.Add(tileElement->GetDirection()); - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ DirectionColumnXY.x, 0 }, stringFormat, ft); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ DirectionColumnXY.x, 0 }, stringFormat, ft); // Checkmarks for ghost and last for tile if (ghost) - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ GhostFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ GhostFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); if (last) - DrawTextBasic(&dpi, screenCoords + ScreenCoordsXY{ LastFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ LastFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); screenCoords.y -= SCROLLABLE_ROW_HEIGHT; i++; @@ -1729,7 +1736,7 @@ private: TileElement* clickedElement = nullptr; if (ctrlIsHeldDown) { - auto info = get_map_coordinates_from_pos(screenCoords, ViewportInteractionFlags); + auto info = GetMapCoordinatesFromPos(screenCoords, ViewportInteractionFlags); clickedElement = info.Element; mapCoords = info.Loc; } @@ -1737,7 +1744,7 @@ private: // Even if Ctrl was pressed, fall back to normal selection when there was nothing under the cursor if (clickedElement == nullptr) { - auto mouseCoords = screen_pos_to_map_pos(screenCoords, nullptr); + auto mouseCoords = ScreenPosToMapPos(screenCoords, nullptr); if (!mouseCoords.has_value()) return; @@ -1867,6 +1874,13 @@ private: GameActions::Execute(&modifyTile); } + void PathSetJunctionRailings(int32_t elementIndex, bool hasJunctionRailings) + { + auto modifyTile = TileModifyAction( + _toolMap, TileModifyType::PathSetJunctionRailings, elementIndex, hasJunctionRailings); + GameActions::Execute(&modifyTile); + } + void PathSetBroken(int32_t elementIndex, bool broken) { auto modifyTile = TileModifyAction(_toolMap, TileModifyType::PathSetBroken, elementIndex, broken); @@ -1916,9 +1930,9 @@ private: GameActions::Execute(&modifyTile); } - void TrackSetBlockBrake(int32_t elementIndex, bool blockBrake) + void TrackSetBrakeClosed(int32_t elementIndex, bool isClosed) { - auto modifyTile = TileModifyAction(_toolMap, TileModifyType::TrackSetBlockBrake, elementIndex, blockBrake); + auto modifyTile = TileModifyAction(_toolMap, TileModifyType::TrackSetBrake, elementIndex, isClosed); GameActions::Execute(&modifyTile); } @@ -1933,7 +1947,7 @@ private: // quarterIndex is widget index relative to WIDX_SCENERY_CHECK_QUARTER_N, so a value from 0-3 openrct2_assert(quarterIndex >= 0 && quarterIndex < 4, "quarterIndex out of range"); auto modifyTile = TileModifyAction( - _toolMap, TileModifyType::ScenerySetQuarterLocation, elementIndex, (quarterIndex - get_current_rotation()) & 3); + _toolMap, TileModifyType::ScenerySetQuarterLocation, elementIndex, (quarterIndex - GetCurrentRotation()) & 3); GameActions::Execute(&modifyTile); } @@ -1941,8 +1955,7 @@ private: void ToggleQuadrantCollosion(int32_t elementIndex, const int32_t quadrantIndex) { auto modifyTile = TileModifyAction( - _toolMap, TileModifyType::ScenerySetQuarterCollision, elementIndex, - (quadrantIndex + 2 - get_current_rotation()) & 3); + _toolMap, TileModifyType::ScenerySetQuarterCollision, elementIndex, (quadrantIndex + 2 - GetCurrentRotation()) & 3); GameActions::Execute(&modifyTile); } @@ -1950,7 +1963,7 @@ private: { openrct2_assert(edgeIndex >= 0 && edgeIndex < 4, "edgeIndex out of range"); // Make edgeIndex abstract - edgeIndex = (edgeIndex - get_current_rotation()) & 3; + edgeIndex = (edgeIndex - GetCurrentRotation()) & 3; auto modifyTile = TileModifyAction(_toolMap, TileModifyType::BannerToggleBlockingEdge, elementIndex, edgeIndex); GameActions::Execute(&modifyTile); } @@ -2104,16 +2117,16 @@ private: widgets[WIDX_SURFACE_CHECK_DIAGONAL].bottom = widgets[WIDX_SURFACE_CHECK_DIAGONAL].top + 13; SetCheckboxValue( WIDX_SURFACE_CHECK_CORNER_N, - tileElement->AsSurface()->GetSlope() & (1 << ((2 - get_current_rotation()) & 3))); + tileElement->AsSurface()->GetSlope() & (1 << ((2 - GetCurrentRotation()) & 3))); SetCheckboxValue( WIDX_SURFACE_CHECK_CORNER_E, - tileElement->AsSurface()->GetSlope() & (1 << ((3 - get_current_rotation()) & 3))); + tileElement->AsSurface()->GetSlope() & (1 << ((3 - GetCurrentRotation()) & 3))); SetCheckboxValue( WIDX_SURFACE_CHECK_CORNER_S, - tileElement->AsSurface()->GetSlope() & (1 << ((0 - get_current_rotation()) & 3))); + tileElement->AsSurface()->GetSlope() & (1 << ((0 - GetCurrentRotation()) & 3))); SetCheckboxValue( WIDX_SURFACE_CHECK_CORNER_W, - tileElement->AsSurface()->GetSlope() & (1 << ((1 - get_current_rotation()) & 3))); + tileElement->AsSurface()->GetSlope() & (1 << ((1 - GetCurrentRotation()) & 3))); SetCheckboxValue( WIDX_SURFACE_CHECK_DIAGONAL, tileElement->AsSurface()->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT); break; @@ -2129,40 +2142,43 @@ private: widgets[WIDX_PATH_CHECK_BROKEN].bottom = GBBB(propertiesAnchor, 1); widgets[WIDX_PATH_CHECK_SLOPED].top = GBBT(propertiesAnchor, 2); widgets[WIDX_PATH_CHECK_SLOPED].bottom = GBBB(propertiesAnchor, 2); - widgets[WIDX_PATH_CHECK_EDGE_N].top = GBBT(propertiesAnchor, 3) + 7 * 0; + widgets[WIDX_PATH_CHECK_JUNCTION_RAILINGS].top = GBBT(propertiesAnchor, 3); + widgets[WIDX_PATH_CHECK_JUNCTION_RAILINGS].bottom = GBBB(propertiesAnchor, 3); + widgets[WIDX_PATH_CHECK_EDGE_N].top = GBBT(propertiesAnchor, 4) + 7 * 0; widgets[WIDX_PATH_CHECK_EDGE_N].bottom = widgets[WIDX_PATH_CHECK_EDGE_N].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_NE].top = GBBT(propertiesAnchor, 3) + 7 * 1; + widgets[WIDX_PATH_CHECK_EDGE_NE].top = GBBT(propertiesAnchor, 4) + 7 * 1; widgets[WIDX_PATH_CHECK_EDGE_NE].bottom = widgets[WIDX_PATH_CHECK_EDGE_NE].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_E].top = GBBT(propertiesAnchor, 3) + 7 * 2; + widgets[WIDX_PATH_CHECK_EDGE_E].top = GBBT(propertiesAnchor, 4) + 7 * 2; widgets[WIDX_PATH_CHECK_EDGE_E].bottom = widgets[WIDX_PATH_CHECK_EDGE_E].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_SE].top = GBBT(propertiesAnchor, 3) + 7 * 3; + widgets[WIDX_PATH_CHECK_EDGE_SE].top = GBBT(propertiesAnchor, 4) + 7 * 3; widgets[WIDX_PATH_CHECK_EDGE_SE].bottom = widgets[WIDX_PATH_CHECK_EDGE_SE].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_S].top = GBBT(propertiesAnchor, 3) + 7 * 4; + widgets[WIDX_PATH_CHECK_EDGE_S].top = GBBT(propertiesAnchor, 4) + 7 * 4; widgets[WIDX_PATH_CHECK_EDGE_S].bottom = widgets[WIDX_PATH_CHECK_EDGE_S].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_SW].top = GBBT(propertiesAnchor, 3) + 7 * 3; + widgets[WIDX_PATH_CHECK_EDGE_SW].top = GBBT(propertiesAnchor, 4) + 7 * 3; widgets[WIDX_PATH_CHECK_EDGE_SW].bottom = widgets[WIDX_PATH_CHECK_EDGE_SW].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_W].top = GBBT(propertiesAnchor, 3) + 7 * 2; + widgets[WIDX_PATH_CHECK_EDGE_W].top = GBBT(propertiesAnchor, 4) + 7 * 2; widgets[WIDX_PATH_CHECK_EDGE_W].bottom = widgets[WIDX_PATH_CHECK_EDGE_W].top + 13; - widgets[WIDX_PATH_CHECK_EDGE_NW].top = GBBT(propertiesAnchor, 3) + 7 * 1; + widgets[WIDX_PATH_CHECK_EDGE_NW].top = GBBT(propertiesAnchor, 4) + 7 * 1; widgets[WIDX_PATH_CHECK_EDGE_NW].bottom = widgets[WIDX_PATH_CHECK_EDGE_NW].top + 13; SetCheckboxValue(WIDX_PATH_CHECK_SLOPED, tileElement->AsPath()->IsSloped()); + SetCheckboxValue(WIDX_PATH_CHECK_JUNCTION_RAILINGS, tileElement->AsPath()->HasJunctionRailings()); SetCheckboxValue(WIDX_PATH_CHECK_BROKEN, tileElement->AsPath()->IsBroken()); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_NE, tileElement->AsPath()->GetEdges() & (1 << ((0 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_NE, tileElement->AsPath()->GetEdges() & (1 << ((0 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_SE, tileElement->AsPath()->GetEdges() & (1 << ((1 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_SE, tileElement->AsPath()->GetEdges() & (1 << ((1 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_SW, tileElement->AsPath()->GetEdges() & (1 << ((2 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_SW, tileElement->AsPath()->GetEdges() & (1 << ((2 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_NW, tileElement->AsPath()->GetEdges() & (1 << ((3 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_NW, tileElement->AsPath()->GetEdges() & (1 << ((3 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_E, tileElement->AsPath()->GetCorners() & (1 << ((0 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_E, tileElement->AsPath()->GetCorners() & (1 << ((0 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_S, tileElement->AsPath()->GetCorners() & (1 << ((1 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_S, tileElement->AsPath()->GetCorners() & (1 << ((1 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_W, tileElement->AsPath()->GetCorners() & (1 << ((2 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_W, tileElement->AsPath()->GetCorners() & (1 << ((2 - GetCurrentRotation()) & 3))); SetCheckboxValue( - WIDX_PATH_CHECK_EDGE_N, tileElement->AsPath()->GetCorners() & (1 << ((3 - get_current_rotation()) & 3))); + WIDX_PATH_CHECK_EDGE_N, tileElement->AsPath()->GetCorners() & (1 << ((3 - GetCurrentRotation()) & 3))); break; case TileElementType::Track: @@ -2176,13 +2192,16 @@ private: widgets[WIDX_TRACK_SPINNER_HEIGHT_DECREASE].bottom = GBBB(propertiesAnchor, 1) - 4; widgets[WIDX_TRACK_CHECK_CHAIN_LIFT].top = GBBT(propertiesAnchor, 2); widgets[WIDX_TRACK_CHECK_CHAIN_LIFT].bottom = GBBB(propertiesAnchor, 2); - widgets[WIDX_TRACK_CHECK_BLOCK_BRAKE_CLOSED].top = GBBT(propertiesAnchor, 3); - widgets[WIDX_TRACK_CHECK_BLOCK_BRAKE_CLOSED].bottom = GBBB(propertiesAnchor, 3); + widgets[WIDX_TRACK_CHECK_BRAKE_CLOSED].top = GBBT(propertiesAnchor, 3); + widgets[WIDX_TRACK_CHECK_BRAKE_CLOSED].bottom = GBBB(propertiesAnchor, 3); widgets[WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE].top = GBBT(propertiesAnchor, 4); widgets[WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE].bottom = GBBB(propertiesAnchor, 4); SetCheckboxValue(WIDX_TRACK_CHECK_APPLY_TO_ALL, _applyToAll); SetCheckboxValue(WIDX_TRACK_CHECK_CHAIN_LIFT, tileElement->AsTrack()->HasChain()); - SetCheckboxValue(WIDX_TRACK_CHECK_BLOCK_BRAKE_CLOSED, tileElement->AsTrack()->BlockBrakeClosed()); + SetCheckboxValue(WIDX_TRACK_CHECK_BRAKE_CLOSED, tileElement->AsTrack()->IsBrakeClosed()); + widgets[WIDX_TRACK_CHECK_BRAKE_CLOSED].content = tileElement->AsTrack()->IsBlockStart() + ? STR_TILE_INSPECTOR_TRACK_BLOCK_BRAKE + : STR_TILE_INSPECTOR_TRACK_BRAKE_CLOSED; SetCheckboxValue(WIDX_TRACK_CHECK_IS_INDESTRUCTIBLE, tileElement->AsTrack()->IsIndestructible()); break; @@ -2206,10 +2225,10 @@ private: widgets[WIDX_SCENERY_CHECK_QUARTER_W].top = GBBT(propertiesAnchor, 1) - 5 + 7 * 1; widgets[WIDX_SCENERY_CHECK_QUARTER_W].bottom = widgets[WIDX_SCENERY_CHECK_QUARTER_W].top + 13; // This gets the relative rotation, by subtracting the camera's rotation, and wrapping it between 0-3 inclusive - bool N = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((0 - get_current_rotation()) & 3); - bool E = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((1 - get_current_rotation()) & 3); - bool S = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((2 - get_current_rotation()) & 3); - bool W = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((3 - get_current_rotation()) & 3); + bool N = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((0 - GetCurrentRotation()) & 3); + bool E = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((1 - GetCurrentRotation()) & 3); + bool S = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((2 - GetCurrentRotation()) & 3); + bool W = tileElement->AsSmallScenery()->GetSceneryQuadrant() == ((3 - GetCurrentRotation()) & 3); SetCheckboxValue(WIDX_SCENERY_CHECK_QUARTER_N, N); SetCheckboxValue(WIDX_SCENERY_CHECK_QUARTER_E, E); SetCheckboxValue(WIDX_SCENERY_CHECK_QUARTER_S, S); @@ -2225,10 +2244,10 @@ private: widgets[WIDX_SCENERY_CHECK_COLLISION_W].top = GBBT(propertiesAnchor, 2) + 5 + 7 * 1; widgets[WIDX_SCENERY_CHECK_COLLISION_W].bottom = widgets[WIDX_SCENERY_CHECK_COLLISION_W].top + 13; auto occupiedQuadrants = tileElement->GetOccupiedQuadrants(); - N = (occupiedQuadrants & (1 << ((2 - get_current_rotation()) & 3))) != 0; - E = (occupiedQuadrants & (1 << ((3 - get_current_rotation()) & 3))) != 0; - S = (occupiedQuadrants & (1 << ((0 - get_current_rotation()) & 3))) != 0; - W = (occupiedQuadrants & (1 << ((1 - get_current_rotation()) & 3))) != 0; + N = (occupiedQuadrants & (1 << ((2 - GetCurrentRotation()) & 3))) != 0; + E = (occupiedQuadrants & (1 << ((3 - GetCurrentRotation()) & 3))) != 0; + S = (occupiedQuadrants & (1 << ((0 - GetCurrentRotation()) & 3))) != 0; + W = (occupiedQuadrants & (1 << ((1 - GetCurrentRotation()) & 3))) != 0; SetCheckboxValue(WIDX_SCENERY_CHECK_COLLISION_N, N); SetCheckboxValue(WIDX_SCENERY_CHECK_COLLISION_E, E); SetCheckboxValue(WIDX_SCENERY_CHECK_COLLISION_S, S); @@ -2317,16 +2336,16 @@ private: widgets[WIDX_BANNER_CHECK_BLOCK_NW].bottom = GBBB(propertiesAnchor, 1); SetCheckboxValue( WIDX_BANNER_CHECK_BLOCK_NE, - (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((0 - get_current_rotation()) & 3)))); + (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((0 - GetCurrentRotation()) & 3)))); SetCheckboxValue( WIDX_BANNER_CHECK_BLOCK_SE, - (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((1 - get_current_rotation()) & 3)))); + (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((1 - GetCurrentRotation()) & 3)))); SetCheckboxValue( WIDX_BANNER_CHECK_BLOCK_SW, - (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((2 - get_current_rotation()) & 3)))); + (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((2 - GetCurrentRotation()) & 3)))); SetCheckboxValue( WIDX_BANNER_CHECK_BLOCK_NW, - (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((3 - get_current_rotation()) & 3)))); + (tileElement->AsBanner()->GetAllowedEdges() & (1 << ((3 - GetCurrentRotation()) & 3)))); break; default: @@ -2335,9 +2354,9 @@ private: } }; -rct_window* WindowTileInspectorOpen() +WindowBase* WindowTileInspectorOpen() { - rct_window* window = window_bring_to_front_by_class(WindowClass::TileInspector); + WindowBase* window = WindowBringToFrontByClass(WindowClass::TileInspector); if (window == nullptr) window = WindowCreate(WindowClass::TileInspector, ScreenCoordsXY(0, 29), WW, WH, WF_RESIZABLE); return window; @@ -2345,7 +2364,7 @@ rct_window* WindowTileInspectorOpen() void WindowTileInspectorClearClipboard() { - auto* window = window_find_by_class(WindowClass::TileInspector); + auto* window = WindowFindByClass(WindowClass::TileInspector); if (window != nullptr) static_cast(window)->ClearClipboard(); } diff --git a/src/openrct2-ui/windows/TitleExit.cpp b/src/openrct2-ui/windows/TitleExit.cpp index cb0c5ea687..dad768100f 100644 --- a/src/openrct2-ui/windows/TitleExit.cpp +++ b/src/openrct2-ui/windows/TitleExit.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,8 +20,8 @@ enum WindowTitleExitWidgetIdx { WIDX_EXIT, }; -static rct_widget window_title_exit_widgets[] = { - MakeWidget({0, 0}, {40, 64}, WindowWidgetType::ImgBtn, WindowColour::Tertiary, SPR_MENU_EXIT, STR_EXIT), +static Widget window_title_exit_widgets[] = { + MakeWidget({0, 0}, {40, 64}, WindowWidgetType::ImgBtn, WindowColour::Tertiary, ImageId(SPR_MENU_EXIT), STR_EXIT), WIDGETS_END, }; // clang-format on @@ -48,7 +48,7 @@ class TitleExitWindow final : public Window }; } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } @@ -58,7 +58,7 @@ class TitleExitWindow final : public Window * Creates the window containing the exit button on the title screen. * rct2: 0x0066B624 (part of 0x0066B3E8) */ -rct_window* WindowTitleExitOpen() +WindowBase* WindowTitleExitOpen() { return WindowCreate( WindowClass::TitleExit, ScreenCoordsXY(ContextGetWidth() - 40, ContextGetHeight() - 64), 40, 64, diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 2c6e35d30d..d1f87e3c0f 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ enum WIDX_LOGO }; -static rct_widget window_title_logo_widgets[] = { +static Widget window_title_logo_widgets[] = { MakeWidget({ 0, 0 }, { WW + 1, WH + 1 }, WindowWidgetType::ImgBtn, WindowColour::Primary), WIDGETS_END, }; @@ -57,17 +57,17 @@ public: * * rct2: 0x0066B872 */ - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto screenCoords = windowPos + ScreenCoordsXY{ 2, 2 }; - gfx_draw_sprite(&dpi, ImageId(SPR_G2_LOGO), screenCoords); - gfx_draw_sprite(&dpi, ImageId(SPR_G2_TITLE), screenCoords + ScreenCoordsXY{ 104, 18 }); + GfxDrawSprite(&dpi, ImageId(SPR_G2_LOGO), screenCoords); + GfxDrawSprite(&dpi, ImageId(SPR_G2_TITLE), screenCoords + ScreenCoordsXY{ 104, 18 }); } }; -rct_window* WindowTitleLogoOpen() +WindowBase* WindowTitleLogoOpen() { - auto* window = window_bring_to_front_by_class(WindowClass::TitleLogo); + auto* window = WindowBringToFrontByClass(WindowClass::TitleLogo); if (window == nullptr) { window = WindowCreate( diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index afb857395a..9458186e26 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -45,11 +45,11 @@ enum static constexpr ScreenSize MenuButtonDims = { 82, 82 }; static constexpr ScreenSize UpdateButtonDims = { MenuButtonDims.width * 4, 28 }; -static rct_widget window_title_menu_widgets[] = { - MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, SPR_MENU_NEW_GAME, STR_START_NEW_GAME_TIP), - MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, SPR_MENU_LOAD_GAME, STR_CONTINUE_SAVED_GAME_TIP), - MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, SPR_G2_MENU_MULTIPLAYER, STR_SHOW_MULTIPLAYER_TIP), - MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, SPR_MENU_TOOLBOX, STR_GAME_TOOLS_TIP), +static Widget window_title_menu_widgets[] = { + MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, ImageId(SPR_MENU_NEW_GAME), STR_START_NEW_GAME_TIP), + MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, ImageId(SPR_MENU_LOAD_GAME), STR_CONTINUE_SAVED_GAME_TIP), + MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, ImageId(SPR_G2_MENU_MULTIPLAYER), STR_SHOW_MULTIPLAYER_TIP), + MakeWidget({0, UpdateButtonDims.height}, MenuButtonDims, WindowWidgetType::ImgBtn, WindowColour::Tertiary, ImageId(SPR_MENU_TOOLBOX), STR_GAME_TOOLS_TIP), MakeWidget({0, 0}, UpdateButtonDims, WindowWidgetType::Empty, WindowColour::Secondary, STR_UPDATE_AVAILABLE), WIDGETS_END, }; @@ -57,10 +57,10 @@ static rct_widget window_title_menu_widgets[] = { static void WindowTitleMenuScenarioselectCallback(const utf8* path) { - game_notify_map_change(); + GameNotifyMapChange(); OpenRCT2::GetContext()->LoadParkFromFile(path, false, true); - game_load_scripts(); - game_notify_map_changed(); + GameLoadScripts(); + GameNotifyMapChanged(); } static void InvokeCustomToolboxMenuItem(size_t index) @@ -97,9 +97,8 @@ public: widgets[WIDX_MULTIPLAYER].type = WindowWidgetType::Empty; #endif - WidgetIndex i = 0; int32_t x = 0; - for (rct_widget* widget = widgets; widget != &widgets[WIDX_NEW_VERSION]; widget++) + for (Widget* widget = widgets; widget != &widgets[WIDX_NEW_VERSION]; widget++) { if (widget->type != WindowWidgetType::Empty) { @@ -108,7 +107,6 @@ public: x += MenuButtonDims.width; } - i++; } width = x; widgets[WIDX_NEW_VERSION].right = width; @@ -120,47 +118,47 @@ public: void OnMouseUp(WidgetIndex widgetIndex) override { - rct_window* windowToOpen = nullptr; + WindowBase* windowToOpen = nullptr; switch (widgetIndex) { case WIDX_START_NEW_GAME: - windowToOpen = window_find_by_class(WindowClass::ScenarioSelect); + windowToOpen = WindowFindByClass(WindowClass::ScenarioSelect); if (windowToOpen != nullptr) { - window_bring_to_front(*windowToOpen); + WindowBringToFront(*windowToOpen); } else { - window_close_by_class(WindowClass::Loadsave); - window_close_by_class(WindowClass::ServerList); + WindowCloseByClass(WindowClass::Loadsave); + WindowCloseByClass(WindowClass::ServerList); WindowScenarioselectOpen(WindowTitleMenuScenarioselectCallback, false); } break; case WIDX_CONTINUE_SAVED_GAME: - windowToOpen = window_find_by_class(WindowClass::Loadsave); + windowToOpen = WindowFindByClass(WindowClass::Loadsave); if (windowToOpen != nullptr) { - window_bring_to_front(*windowToOpen); + WindowBringToFront(*windowToOpen); } else { - window_close_by_class(WindowClass::ScenarioSelect); - window_close_by_class(WindowClass::ServerList); + WindowCloseByClass(WindowClass::ScenarioSelect); + WindowCloseByClass(WindowClass::ServerList); auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt); GameActions::Execute(&loadOrQuitAction); } break; case WIDX_MULTIPLAYER: - windowToOpen = window_find_by_class(WindowClass::ServerList); + windowToOpen = WindowFindByClass(WindowClass::ServerList); if (windowToOpen != nullptr) { - window_bring_to_front(*windowToOpen); + WindowBringToFront(*windowToOpen); } else { - window_close_by_class(WindowClass::ScenarioSelect); - window_close_by_class(WindowClass::Loadsave); + WindowCloseByClass(WindowClass::ScenarioSelect); + WindowCloseByClass(WindowClass::Loadsave); ContextOpenWindow(WindowClass::ServerList); } break; @@ -206,7 +204,7 @@ public: } #endif - rct_widget* widget = &widgets[widgetIndex]; + Widget* widget = &widgets[widgetIndex]; int32_t yOffset = 0; if (i > 5) { @@ -269,9 +267,9 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { - gfx_filter_rect(&dpi, _filterRect, FilterPaletteID::Palette51); + GfxFilterRect(&dpi, _filterRect, FilterPaletteID::Palette51); DrawWidgets(dpi); } }; @@ -279,7 +277,7 @@ public: /** * Creates the window containing the menu buttons on the title screen. */ -rct_window* WindowTitleMenuOpen() +WindowBase* WindowTitleMenuOpen() { const uint16_t windowHeight = MenuButtonDims.height + UpdateButtonDims.height; return WindowCreate( diff --git a/src/openrct2-ui/windows/TitleOptions.cpp b/src/openrct2-ui/windows/TitleOptions.cpp index 6161f68ed4..5a189720ff 100644 --- a/src/openrct2-ui/windows/TitleOptions.cpp +++ b/src/openrct2-ui/windows/TitleOptions.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ enum WindowTitleOptionsWidgetIdx { WIDX_OPTIONS, }; -static rct_widget _windowTitleOptionsWidgets[] = { +static Widget _windowTitleOptionsWidgets[] = { MakeWidget({0, 0}, {80, 15}, WindowWidgetType::Button, WindowColour::Tertiary, STR_OPTIONS, STR_OPTIONS_TIP), WIDGETS_END, }; @@ -44,7 +44,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); } @@ -53,9 +53,9 @@ public: /** * Creates the window containing the options button on the title screen. */ -rct_window* WindowTitleOptionsOpen() +WindowBase* WindowTitleOptionsOpen() { - auto* window = window_bring_to_front_by_class(WindowClass::TitleOptions); + auto* window = WindowBringToFrontByClass(WindowClass::TitleOptions); if (window == nullptr) { window = WindowCreate( diff --git a/src/openrct2-ui/windows/Tooltip.cpp b/src/openrct2-ui/windows/Tooltip.cpp index 255b4ffe30..12bb804365 100644 --- a/src/openrct2-ui/windows/Tooltip.cpp +++ b/src/openrct2-ui/windows/Tooltip.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,6 +14,7 @@ #include #include #include +#include #include // clang-format off @@ -21,7 +22,7 @@ enum { WIDX_BACKGROUND }; -static rct_widget window_tooltip_widgets[] = { +static Widget window_tooltip_widgets[] = { MakeWidget({0, 0}, {200, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary), WIDGETS_END, }; @@ -31,7 +32,7 @@ static rct_widget window_tooltip_widgets[] = { class TooltipWindow final : public Window { private: - utf8 _tooltipText[CommonTextBufferSize]{}; + u8string _tooltipText; int16_t _tooltipNumLines = 1; public: @@ -39,7 +40,7 @@ public: { int32_t textWidth = FormatTextForTooltip(message); width = textWidth + 3; - height = ((_tooltipNumLines + 1) * font_get_line_height(FontStyle::Small)) + 4; + height = ((_tooltipNumLines + 1) * FontGetLineHeight(FontStyle::Small)) + 4; window_tooltip_widgets[WIDX_BACKGROUND].right = width; window_tooltip_widgets[WIDX_BACKGROUND].bottom = height; @@ -65,15 +66,15 @@ public: void OnOpen() override { widgets = window_tooltip_widgets; - reset_tooltip_not_shown(); + ResetTooltipNotShown(); } void OnUpdate() override { - reset_tooltip_not_shown(); + ResetTooltipNotShown(); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { int32_t left = windowPos.x; int32_t top = windowPos.y; @@ -81,43 +82,42 @@ public: int32_t bottom = windowPos.y + height - 1; // Background - gfx_filter_rect(&dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, FilterPaletteID::Palette45); - gfx_filter_rect(&dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, FilterPaletteID::PaletteGlassLightOrange); + GfxFilterRect(&dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, FilterPaletteID::Palette45); + GfxFilterRect(&dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, FilterPaletteID::PaletteGlassLightOrange); // Sides - gfx_filter_rect(&dpi, { { left + 0, top + 2 }, { left + 0, bottom - 2 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect(&dpi, { { right + 0, top + 2 }, { right + 0, bottom - 2 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect(&dpi, { { left + 2, bottom + 0 }, { right - 2, bottom + 0 } }, FilterPaletteID::PaletteDarken3); - gfx_filter_rect(&dpi, { { left + 2, top + 0 }, { right - 2, top + 0 } }, FilterPaletteID::PaletteDarken3); + GfxFilterRect(&dpi, { { left + 0, top + 2 }, { left + 0, bottom - 2 } }, FilterPaletteID::PaletteDarken3); + GfxFilterRect(&dpi, { { right + 0, top + 2 }, { right + 0, bottom - 2 } }, FilterPaletteID::PaletteDarken3); + GfxFilterRect(&dpi, { { left + 2, bottom + 0 }, { right - 2, bottom + 0 } }, FilterPaletteID::PaletteDarken3); + GfxFilterRect(&dpi, { { left + 2, top + 0 }, { right - 2, top + 0 } }, FilterPaletteID::PaletteDarken3); // Corners - gfx_filter_pixel(&dpi, { left + 1, top + 1 }, FilterPaletteID::PaletteDarken3); - gfx_filter_pixel(&dpi, { right - 1, top + 1 }, FilterPaletteID::PaletteDarken3); - gfx_filter_pixel(&dpi, { left + 1, bottom - 1 }, FilterPaletteID::PaletteDarken3); - gfx_filter_pixel(&dpi, { right - 1, bottom - 1 }, FilterPaletteID::PaletteDarken3); + GfxFilterPixel(&dpi, { left + 1, top + 1 }, FilterPaletteID::PaletteDarken3); + GfxFilterPixel(&dpi, { right - 1, top + 1 }, FilterPaletteID::PaletteDarken3); + GfxFilterPixel(&dpi, { left + 1, bottom - 1 }, FilterPaletteID::PaletteDarken3); + GfxFilterPixel(&dpi, { right - 1, bottom - 1 }, FilterPaletteID::PaletteDarken3); // Text left = windowPos.x + ((width + 1) / 2) - 1; top = windowPos.y + 1; - draw_string_centred_raw(&dpi, { left, top }, _tooltipNumLines, _tooltipText, FontStyle::Small); + DrawStringCentredRaw(dpi, { left, top }, _tooltipNumLines, _tooltipText.data(), FontStyle::Small); } private: // Returns the width of the new tooltip text int32_t FormatTextForTooltip(const OpenRCT2String& message) { - utf8 tempBuffer[CommonTextBufferSize]; - format_string(tempBuffer, sizeof(tempBuffer), message.str, message.args.Data()); + const u8string tempString = FormatStringID(message.str, message.args.Data()); OpenRCT2String formattedMessage{ STR_STRING_TOOLTIP, Formatter() }; - formattedMessage.args.Add(tempBuffer); - format_string(_tooltipText, sizeof(_tooltipText), formattedMessage.str, formattedMessage.args.Data()); + formattedMessage.args.Add(tempString.c_str()); + const u8string tooltipTextUnwrapped = FormatStringID(formattedMessage.str, formattedMessage.args.Data()); - auto textWidth = gfx_get_string_width_new_lined(_tooltipText, FontStyle::Small); + auto textWidth = GfxGetStringWidthNewLined(tooltipTextUnwrapped, FontStyle::Small); textWidth = std::min(textWidth, 196); int32_t numLines; - textWidth = gfx_wrap_string(_tooltipText, textWidth + 1, FontStyle::Small, &numLines); + textWidth = GfxWrapString(tooltipTextUnwrapped, textWidth + 1, FontStyle::Small, &_tooltipText, &numLines); _tooltipNumLines = numLines; return textWidth; } @@ -128,13 +128,13 @@ void WindowTooltipReset(const ScreenCoordsXY& screenCoords) gTooltipCursor = screenCoords; gTooltipTimeout = 0; gTooltipWidget.window_classification = WindowClass::Null; - input_set_state(InputState::Normal); - input_set_flag(INPUT_FLAG_4, false); + InputSetState(InputState::Normal); + InputSetFlag(INPUT_FLAG_4, false); } void WindowTooltipShow(const OpenRCT2String& message, ScreenCoordsXY screenCoords) { - auto* w = window_find_by_class(WindowClass::Error); + auto* w = WindowFindByClass(WindowClass::Error); if (w != nullptr) return; @@ -145,13 +145,13 @@ void WindowTooltipShow(const OpenRCT2String& message, ScreenCoordsXY screenCoord WindowCreate(std::move(tooltipWindow), WindowClass::Tooltip, windowPos, width, height, WF_TRANSPARENT | WF_STICK_TO_FRONT); } -void WindowTooltipOpen(rct_window* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (widgetWindow == nullptr || widgetIndex == -1) return; auto widget = &widgetWindow->widgets[widgetIndex]; - window_event_invalidate_call(widgetWindow); + WindowEventInvalidateCall(widgetWindow); OpenRCT2String result; if (widget->flags & WIDGET_FLAGS::TOOLTIP_IS_STRING) @@ -177,7 +177,7 @@ void WindowTooltipOpen(rct_window* widgetWindow, WidgetIndex widgetIndex, const gTooltipWidget.window_classification = widgetWindow->classification; gTooltipWidget.window_number = widgetWindow->number; gTooltipWidget.widget_index = widgetIndex; - result = window_event_tooltip_call(widgetWindow, widgetIndex, stringId); + result = WindowEventTooltipCall(widgetWindow, widgetIndex, stringId); if (result.str == STR_NONE) return; } @@ -187,7 +187,7 @@ void WindowTooltipOpen(rct_window* widgetWindow, WidgetIndex widgetIndex, const void WindowTooltipClose() { - window_close_by_class(WindowClass::Tooltip); + WindowCloseByClass(WindowClass::Tooltip); gTooltipTimeout = 0; gTooltipWidget.window_classification = WindowClass::Null; } diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 026010de8d..97cc2a00fa 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -53,16 +53,20 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include #include #include -#include #include #include #include @@ -246,7 +250,7 @@ static constexpr const int32_t right_aligned_widgets_order[] = { #pragma endregion -static rct_widget window_top_toolbar_widgets[] = { +static Widget window_top_toolbar_widgets[] = { MakeRemapWidget({ 0, 0}, {30, TOP_TOOLBAR_HEIGHT + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TOOLBAR_PAUSE, STR_PAUSE_GAME_TIP ), // Pause MakeRemapWidget({ 60, 0}, {30, TOP_TOOLBAR_HEIGHT + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_TOOLBAR_FILE, STR_DISC_AND_GAME_OPTIONS_TIP ), // File menu MakeRemapWidget({250, 0}, {30, TOP_TOOLBAR_HEIGHT + 1}, WindowWidgetType::TrnBtn, WindowColour::Primary , SPR_G2_TOOLBAR_MUTE, STR_TOOLBAR_MUTE_TIP ), // Mute @@ -278,1008 +282,1668 @@ static rct_widget window_top_toolbar_widgets[] = { }; // clang-format on -static void WindowTopToolbarMouseup(rct_window* w, WidgetIndex widgetIndex); -static void WindowTopToolbarMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget); -static void WindowTopToolbarDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -static void WindowTopToolbarToolUpdate(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowTopToolbarToolDown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowTopToolbarToolDrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -static void WindowTopToolbarToolUp(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoordsy); -static void WindowTopToolbarToolAbort(rct_window* w, WidgetIndex widgetIndex); -static void WindowTopToolbarInvalidate(rct_window* w); -static void WindowTopToolbarPaint(rct_window* w, rct_drawpixelinfo* dpi); +static void ScenarioSelectCallback(const utf8* path); -static WindowEventList window_top_toolbar_events([](auto& events) { - events.mouse_up = &WindowTopToolbarMouseup; - events.mouse_down = &WindowTopToolbarMousedown; - events.dropdown = &WindowTopToolbarDropdown; - events.tool_update = &WindowTopToolbarToolUpdate; - events.tool_down = &WindowTopToolbarToolDown; - events.tool_drag = &WindowTopToolbarToolDrag; - events.tool_up = &WindowTopToolbarToolUp; - events.tool_abort = &WindowTopToolbarToolAbort; - events.invalidate = &WindowTopToolbarInvalidate; - events.paint = &WindowTopToolbarPaint; -}); - -static void TopToolbarInitViewMenu(rct_window* window, rct_widget* widget); -static void TopToolbarViewMenuDropdown(int16_t dropdownIndex); -static void TopToolbarInitMapMenu(rct_window* window, rct_widget* widget); -static void TopToolbarMapMenuDropdown(int16_t dropdownIndex); -static void TopToolbarInitFastforwardMenu(rct_window* window, rct_widget* widget); -static void TopToolbarFastforwardMenuDropdown(int16_t dropdownIndex); -static void TopToolbarInitRotateMenu(rct_window* window, rct_widget* widget); -static void TopToolbarRotateMenuDropdown(int16_t dropdownIndex); -static void TopToolbarInitCheatsMenu(rct_window* window, rct_widget* widget); -static void TopToolbarCheatsMenuDropdown(int16_t dropdownIndex); -static void TopToolbarInitDebugMenu(rct_window* window, rct_widget* widget); -static void TopToolbarDebugMenuDropdown(int16_t dropdownIndex); -static void TopToolbarInitNetworkMenu(rct_window* window, rct_widget* widget); -static void TopToolbarNetworkMenuDropdown(int16_t dropdownIndex); - -static void ToggleFootpathWindow(); -static void ToggleLandWindow(rct_window* topToolbar, WidgetIndex widgetIndex); -static void ToggleClearSceneryWindow(rct_window* topToolbar, WidgetIndex widgetIndex); -static void ToggleWaterWindow(rct_window* topToolbar, WidgetIndex widgetIndex); - -static money64 SelectionLowerLand(uint8_t flags); -static money64 SelectionRaiseLand(uint8_t flags); - -static ClearAction GetClearAction(); - -static bool _landToolBlocked; -static uint8_t _unkF64F0E; -static int16_t _unkF64F0A; - -/** - * Creates the main game top toolbar window. - * rct2: 0x0066B485 (part of 0x0066B3E8) - */ -rct_window* WindowTopToolbarOpen() +class TopToolbar final : public Window { - rct_window* window = WindowCreate( - ScreenCoordsXY(0, 0), ContextGetWidth(), TOP_TOOLBAR_HEIGHT + 1, &window_top_toolbar_events, WindowClass::TopToolbar, - WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); - window->widgets = window_top_toolbar_widgets; +private: + bool _landToolBlocked{ false }; + uint8_t _unkF64F0E{ 0 }; + int16_t _unkF64F0A{ 0 }; - WindowInitScrollWidgets(*window); + void InitViewMenu(Widget& widget); - return window; -} + void ViewMenuDropdown(int16_t dropdownIndex); -/** - * - * rct2: 0x0066C957 - */ -static void WindowTopToolbarMouseup(rct_window* w, WidgetIndex widgetIndex) -{ - rct_window* mainWindow; + void InitMapMenu(Widget& widget); - switch (widgetIndex) + void MapMenuDropdown(int16_t dropdownIndex); + + void InitFastforwardMenu(Widget& widget); + + void FastforwardMenuDropdown(int16_t dropdownIndex); + + void InitRotateMenu(Widget& widget); + + void RotateMenuDropdown(int16_t dropdownIndex); + + void InitCheatsMenu(Widget& widget); + + void CheatsMenuDropdown(int16_t dropdownIndex); + + void InitDebugMenu(Widget& widget); + + void DebugMenuDropdown(int16_t dropdownIndex); + + void InitNetworkMenu(Widget& widget); + + void NetworkMenuDropdown(int16_t dropdownIndex); + + /** + * + * rct2: 0x0066CCE7 + */ + void ToggleFootpathWindow() { - case WIDX_PAUSE: - if (network_get_mode() != NETWORK_MODE_CLIENT) - { - auto pauseToggleAction = PauseToggleAction(); - GameActions::Execute(&pauseToggleAction); - } - break; - case WIDX_ZOOM_OUT: - if ((mainWindow = window_get_main()) != nullptr) - window_zoom_out(*mainWindow, false); - break; - case WIDX_ZOOM_IN: - if ((mainWindow = window_get_main()) != nullptr) - window_zoom_in(*mainWindow, false); - break; - case WIDX_CLEAR_SCENERY: - ToggleClearSceneryWindow(w, WIDX_CLEAR_SCENERY); - break; - case WIDX_LAND: - ToggleLandWindow(w, WIDX_LAND); - break; - case WIDX_WATER: - ToggleWaterWindow(w, WIDX_WATER); - break; - case WIDX_SCENERY: - if (!tool_set(*w, WIDX_SCENERY, Tool::Arrow)) - { - input_set_flag(INPUT_FLAG_6, true); - ContextOpenWindow(WindowClass::Scenery); - } - break; - case WIDX_PATH: - ToggleFootpathWindow(); - break; - case WIDX_CONSTRUCT_RIDE: - ContextOpenWindow(WindowClass::ConstructRide); - break; - case WIDX_RIDES: - ContextOpenWindow(WindowClass::RideList); - break; - case WIDX_PARK: - ContextOpenWindow(WindowClass::ParkInformation); - break; - case WIDX_STAFF: - ContextOpenWindow(WindowClass::StaffList); - break; - case WIDX_GUESTS: - ContextOpenWindow(WindowClass::GuestList); - break; - case WIDX_FINANCES: - ContextOpenWindow(WindowClass::Finances); - break; - case WIDX_RESEARCH: - ContextOpenWindow(WindowClass::Research); - break; - case WIDX_NEWS: - ContextOpenWindow(WindowClass::RecentNews); - break; - case WIDX_MUTE: - OpenRCT2::Audio::ToggleAllSounds(); - break; - case WIDX_CHAT: - if (chat_available()) - { - chat_toggle(); - } - else - { - ContextShowError(STR_CHAT_UNAVAILABLE, STR_NONE, {}); - } - break; + if (WindowFindByClass(WindowClass::Footpath) == nullptr) + { + ContextOpenWindow(WindowClass::Footpath); + } + else + { + ToolCancel(); + WindowCloseByClass(WindowClass::Footpath); + } } -} -/** - * - * rct2: 0x0066CA3B - */ -static void WindowTopToolbarMousedown(rct_window* w, WidgetIndex widgetIndex, rct_widget* widget) -{ - int32_t numItems = 0; - - switch (widgetIndex) + /** + * + * rct2: 0x0066CD54 + */ + void ToggleLandWindow(WidgetIndex widgetIndex) { - case WIDX_FILE_MENU: - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar + && gCurrentToolWidget.widget_index == WIDX_LAND) + { + ToolCancel(); + } + else + { + _landToolBlocked = false; + ShowGridlines(); + ToolSet(*this, widgetIndex, Tool::DigDown); + InputSetFlag(INPUT_FLAG_6, true); + ContextOpenWindow(WindowClass::Land); + } + } + + /** + * + * rct2: 0x0066CD0C + */ + void ToggleClearSceneryWindow(WidgetIndex widgetIndex) + { + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar + && gCurrentToolWidget.widget_index == WIDX_CLEAR_SCENERY)) + { + ToolCancel(); + } + else + { + ShowGridlines(); + ToolSet(*this, widgetIndex, Tool::Crosshair); + InputSetFlag(INPUT_FLAG_6, true); + ContextOpenWindow(WindowClass::ClearScenery); + } + } + + /** + * + * rct2: 0x0066CD9C + */ + void ToggleWaterWindow(WidgetIndex widgetIndex) + { + if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar + && gCurrentToolWidget.widget_index == WIDX_WATER) + { + ToolCancel(); + } + else + { + _landToolBlocked = false; + ShowGridlines(); + ToolSet(*this, widgetIndex, Tool::WaterDown); + InputSetFlag(INPUT_FLAG_6, true); + ContextOpenWindow(WindowClass::Water); + } + } + + /** + * + * rct2: 0x0068E213 + */ + void ToolUpdateSceneryClear(const ScreenCoordsXY& screenPos) + { + if (!ToolUpdateLandPaint(screenPos)) + return; + + auto action = GetClearAction(); + auto result = GameActions::Query(&action); + auto cost = (result.Error == GameActions::Status::Ok ? result.Cost : MONEY64_UNDEFINED); + if (gClearSceneryCost != cost) + { + gClearSceneryCost = cost; + WindowInvalidateByClass(WindowClass::ClearScenery); + } + } + + int8_t ToolUpdateLandPaint(const ScreenCoordsXY& screenPos) + { + uint8_t state_changed = 0; + + MapInvalidateSelectionRect(); + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + + auto mapTile = ScreenGetMapXY(screenPos, nullptr); + + if (!mapTile.has_value()) + { + if (gClearSceneryCost != MONEY64_UNDEFINED) { - 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_FILE_BUG_ON_GITHUB; + gClearSceneryCost = MONEY64_UNDEFINED; + WindowInvalidateByClass(WindowClass::ClearScenery); + } + return state_changed; + } - if (OpenRCT2::GetContext()->HasNewVersionInfo()) - gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + { + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + state_changed++; + } - gDropdownItems[numItems++].Format = STR_EMPTY; + if (gMapSelectType != MAP_SELECT_TYPE_FULL) + { + gMapSelectType = MAP_SELECT_TYPE_FULL; + state_changed++; + } - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) - gDropdownItems[numItems++].Format = STR_QUIT_ROLLERCOASTER_DESIGNER; + int16_t tool_size = std::max(1, gLandToolSize); + int16_t tool_length = (tool_size - 1) * 32; + + // Move to tool bottom left + mapTile->x -= (tool_size - 1) * 16; + mapTile->y -= (tool_size - 1) * 16; + mapTile = mapTile->ToTileStart(); + + if (gMapSelectPositionA.x != mapTile->x) + { + gMapSelectPositionA.x = mapTile->x; + state_changed++; + } + + if (gMapSelectPositionA.y != mapTile->y) + { + gMapSelectPositionA.y = mapTile->y; + state_changed++; + } + + mapTile->x += tool_length; + mapTile->y += tool_length; + + if (gMapSelectPositionB.x != mapTile->x) + { + gMapSelectPositionB.x = mapTile->x; + state_changed++; + } + + if (gMapSelectPositionB.y != mapTile->y) + { + gMapSelectPositionB.y = mapTile->y; + state_changed++; + } + + MapInvalidateSelectionRect(); + return state_changed; + } + + /** + * + * rct2: 0x00664280 + */ + void ToolUpdateLand(const ScreenCoordsXY& screenPos) + { + const bool mapCtrlPressed = InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z); + + MapInvalidateSelectionRect(); + + if (gCurrentToolId == Tool::UpDownArrow) + { + if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + return; + + money64 lower_cost = SelectionLowerLand(0); + money64 raise_cost = SelectionRaiseLand(0); + + if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) + { + gLandToolRaiseCost = raise_cost; + gLandToolLowerCost = lower_cost; + WindowInvalidateByClass(WindowClass::Land); + } + return; + } + + int16_t tool_size = gLandToolSize; + std::optional mapTile; + uint8_t side{}; + + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + if (tool_size == 1) + { + int32_t selectionType; + // Get selection type and map coordinates from mouse x,y position + ScreenPosToMapPos(screenPos, &selectionType); + mapTile = ScreenGetMapXYSide(screenPos, &side); + + if (!mapTile.has_value()) + { + money64 lower_cost = MONEY64_UNDEFINED; + money64 raise_cost = MONEY64_UNDEFINED; + + if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) + { + gLandToolRaiseCost = raise_cost; + gLandToolLowerCost = lower_cost; + WindowInvalidateByClass(WindowClass::Land); + } + return; + } + + uint8_t state_changed = 0; + + if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + { + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + state_changed++; + } + + if (gMapSelectType != selectionType) + { + gMapSelectType = selectionType; + state_changed++; + } + + if ((gMapSelectType != MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF)) && mapCtrlPressed) + { + gMapSelectType = MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF); + state_changed++; + } + + if (gMapSelectPositionA.x != mapTile->x) + { + gMapSelectPositionA.x = mapTile->x; + state_changed++; + } + + if (gMapSelectPositionA.y != mapTile->y) + { + gMapSelectPositionA.y = mapTile->y; + state_changed++; + } + + if (gMapSelectPositionB.x != mapTile->x) + { + gMapSelectPositionB.x = mapTile->x; + state_changed++; + } + + if (gMapSelectPositionB.y != mapTile->y) + { + gMapSelectPositionB.y = mapTile->y; + state_changed++; + } + + MapInvalidateSelectionRect(); + if (!state_changed) + return; + + money64 lower_cost = SelectionLowerLand(0); + money64 raise_cost = SelectionRaiseLand(0); + + if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) + { + gLandToolRaiseCost = raise_cost; + gLandToolLowerCost = lower_cost; + WindowInvalidateByClass(WindowClass::Land); + } + return; + } + + // Get map coordinates and the side of the tile that is being hovered over + mapTile = ScreenGetMapXYSide(screenPos, &side); + + if (!mapTile.has_value()) + { + money64 lower_cost = MONEY64_UNDEFINED; + money64 raise_cost = MONEY64_UNDEFINED; + + if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) + { + gLandToolRaiseCost = raise_cost; + gLandToolLowerCost = lower_cost; + WindowInvalidateByClass(WindowClass::Land); + } + return; + } + + uint8_t state_changed = 0; + + if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + { + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + state_changed++; + } + + if (gMapSelectType != MAP_SELECT_TYPE_FULL) + { + gMapSelectType = MAP_SELECT_TYPE_FULL; + state_changed++; + } + + if ((gMapSelectType != MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF)) && mapCtrlPressed) + { + gMapSelectType = MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF); + state_changed++; + } + + if (tool_size == 0) + tool_size = 1; + + int16_t tool_length = (tool_size - 1) * 32; + + // Decide on shape of the brush for bigger selection size + switch (gMapSelectType) + { + case MAP_SELECT_TYPE_EDGE_0: + case MAP_SELECT_TYPE_EDGE_2: + // Line + mapTile->y -= (tool_size - 1) * 16; + mapTile->y = mapTile->ToTileStart().y; + break; + case MAP_SELECT_TYPE_EDGE_1: + case MAP_SELECT_TYPE_EDGE_3: + // Line + mapTile->x -= (tool_size - 1) * 16; + mapTile->x = mapTile->ToTileStart().x; + break; + default: + // Move to tool bottom left + mapTile->x -= (tool_size - 1) * 16; + mapTile->y -= (tool_size - 1) * 16; + mapTile = mapTile->ToTileStart(); + break; + } + + if (gMapSelectPositionA.x != mapTile->x) + { + gMapSelectPositionA.x = mapTile->x; + state_changed++; + } + + if (gMapSelectPositionA.y != mapTile->y) + { + gMapSelectPositionA.y = mapTile->y; + state_changed++; + } + + // Go to other side + switch (gMapSelectType) + { + case MAP_SELECT_TYPE_EDGE_0: + case MAP_SELECT_TYPE_EDGE_2: + // Line + mapTile->y += tool_length; + gMapSelectType = MAP_SELECT_TYPE_FULL; + break; + case MAP_SELECT_TYPE_EDGE_1: + case MAP_SELECT_TYPE_EDGE_3: + // Line + mapTile->x += tool_length; + gMapSelectType = MAP_SELECT_TYPE_FULL; + break; + default: + mapTile->x += tool_length; + mapTile->y += tool_length; + break; + } + + if (gMapSelectPositionB.x != mapTile->x) + { + gMapSelectPositionB.x = mapTile->x; + state_changed++; + } + + if (gMapSelectPositionB.y != mapTile->y) + { + gMapSelectPositionB.y = mapTile->y; + state_changed++; + } + + MapInvalidateSelectionRect(); + if (!state_changed) + return; + + money64 lower_cost = SelectionLowerLand(0); + money64 raise_cost = SelectionRaiseLand(0); + + if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) + { + gLandToolRaiseCost = raise_cost; + gLandToolLowerCost = lower_cost; + WindowInvalidateByClass(WindowClass::Land); + } + } + + /** + * + * rct2: 0x006E6BDC + */ + void ToolUpdateWater(const ScreenCoordsXY& screenPos) + { + MapInvalidateSelectionRect(); + + if (gCurrentToolId == Tool::UpDownArrow) + { + if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + return; + + auto waterLowerAction = WaterLowerAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); + auto waterRaiseAction = WaterRaiseAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); + + auto res = GameActions::Query(&waterLowerAction); + money64 lowerCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + + res = GameActions::Query(&waterRaiseAction); + money64 raiseCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + + if (gWaterToolRaiseCost != raiseCost || gWaterToolLowerCost != lowerCost) + { + gWaterToolRaiseCost = raiseCost; + gWaterToolLowerCost = lowerCost; + WindowInvalidateByClass(WindowClass::Water); + } + return; + } + + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + + auto info = GetMapCoordinatesFromPos( + screenPos, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); + + if (info.SpriteType == ViewportInteractionItem::None) + { + if (gWaterToolRaiseCost != MONEY64_UNDEFINED || gWaterToolLowerCost != MONEY64_UNDEFINED) + { + gWaterToolRaiseCost = MONEY64_UNDEFINED; + gWaterToolLowerCost = MONEY64_UNDEFINED; + WindowInvalidateByClass(WindowClass::Water); + } + return; + } + + auto mapTile = info.Loc.ToTileCentre(); + + uint8_t state_changed = 0; + + if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + { + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + state_changed++; + } + + if (gMapSelectType != MAP_SELECT_TYPE_FULL_WATER) + { + gMapSelectType = MAP_SELECT_TYPE_FULL_WATER; + state_changed++; + } + + int16_t tool_size = std::max(1, gLandToolSize); + int16_t tool_length = (tool_size - 1) * 32; + + // Move to tool bottom left + mapTile.x -= (tool_size - 1) * 16; + mapTile.y -= (tool_size - 1) * 16; + mapTile.x &= 0xFFE0; + mapTile.y &= 0xFFE0; + + if (gMapSelectPositionA.x != mapTile.x) + { + gMapSelectPositionA.x = mapTile.x; + state_changed++; + } + + if (gMapSelectPositionA.y != mapTile.y) + { + gMapSelectPositionA.y = mapTile.y; + state_changed++; + } + + mapTile.x += tool_length; + mapTile.y += tool_length; + + if (gMapSelectPositionB.x != mapTile.x) + { + gMapSelectPositionB.x = mapTile.x; + state_changed++; + } + + if (gMapSelectPositionB.y != mapTile.y) + { + gMapSelectPositionB.y = mapTile.y; + state_changed++; + } + + MapInvalidateSelectionRect(); + if (!state_changed) + return; + + auto waterLowerAction = WaterLowerAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); + auto waterRaiseAction = WaterRaiseAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); + + auto res = GameActions::Query(&waterLowerAction); + money64 lowerCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + + res = GameActions::Query(&waterRaiseAction); + money64 raiseCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + + if (gWaterToolRaiseCost != raiseCost || gWaterToolLowerCost != lowerCost) + { + gWaterToolRaiseCost = raiseCost; + gWaterToolLowerCost = lowerCost; + WindowInvalidateByClass(WindowClass::Water); + } + } + + /** + * + * rct2: 0x006E287B + */ + void ToolUpdateScenery(const ScreenCoordsXY& screenPos) + { + MapInvalidateSelectionRect(); + MapInvalidateMapSelectionTiles(); + + if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + { + VirtualFloorInvalidate(); + } + + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; + + if (gWindowSceneryPaintEnabled) + return; + if (gWindowSceneryEyedropperEnabled) + return; + + const auto selection = WindowSceneryGetTabSelection(); + if (selection.IsUndefined()) + { + SceneryRemoveGhostToolPlacement(); + return; + } + + money64 cost = 0; + + switch (selection.SceneryType) + { + case SCENERY_TYPE_SMALL: + { + CoordsXY mapTile = {}; + uint8_t quadrant; + Direction rotation; + + Sub6E1F34SmallScenery(screenPos, selection.EntryIndex, mapTile, &quadrant, &rotation); + + if (mapTile.IsNull()) + { + SceneryRemoveGhostToolPlacement(); + return; + } + + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + if (gWindowSceneryScatterEnabled) + { + uint16_t cluster_size = (gWindowSceneryScatterSize - 1) * COORDS_XY_STEP; + gMapSelectPositionA.x = mapTile.x - cluster_size / 2; + gMapSelectPositionA.y = mapTile.y - cluster_size / 2; + gMapSelectPositionB.x = mapTile.x + cluster_size / 2; + gMapSelectPositionB.y = mapTile.y + cluster_size / 2; + if (gWindowSceneryScatterSize % 2 == 0) + { + gMapSelectPositionB.x += COORDS_XY_STEP; + gMapSelectPositionB.y += COORDS_XY_STEP; + } + } else - gDropdownItems[numItems++].Format = STR_QUIT_TRACK_DESIGNS_MANAGER; + { + gMapSelectPositionA.x = mapTile.x; + gMapSelectPositionA.y = mapTile.y; + gMapSelectPositionB.x = mapTile.x; + gMapSelectPositionB.y = mapTile.y; + } - gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selection.EntryIndex); + + gMapSelectType = MAP_SELECT_TYPE_FULL; + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE) && !gWindowSceneryScatterEnabled) + { + gMapSelectType = MAP_SELECT_TYPE_QUARTER_0 + (quadrant ^ 2); + } + + MapInvalidateSelectionRect(); + + // If no change in ghost placement + if ((gSceneryGhostType & SCENERY_GHOST_FLAG_0) && mapTile == gSceneryGhostPosition && quadrant == _unkF64F0E + && gSceneryPlaceZ == _unkF64F0A && gSceneryPlaceObject.SceneryType == SCENERY_TYPE_SMALL + && gSceneryPlaceObject.EntryIndex == selection.EntryIndex) + { + return; + } + + SceneryRemoveGhostToolPlacement(); + + _unkF64F0E = quadrant; + _unkF64F0A = gSceneryPlaceZ; + + uint8_t attemptsLeft = 1; + if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) + { + attemptsLeft = 20; + } + + for (; attemptsLeft != 0; attemptsLeft--) + { + cost = TryPlaceGhostSmallScenery( + { mapTile, gSceneryPlaceZ, rotation }, quadrant, selection.EntryIndex, gWindowSceneryPrimaryColour, + gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + if (cost != MONEY64_UNDEFINED) + break; + gSceneryPlaceZ += 8; + } + + gSceneryPlaceCost = cost; + break; } - else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + case SCENERY_TYPE_PATH_ITEM: { - gDropdownItems[numItems++].Format = STR_LOAD_LANDSCAPE; - 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_FILE_BUG_ON_GITHUB; + CoordsXY mapTile = {}; + int32_t z; - if (OpenRCT2::GetContext()->HasNewVersionInfo()) - gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + Sub6E1F34PathItem(screenPos, selection.EntryIndex, mapTile, &z); - gDropdownItems[numItems++].Format = STR_EMPTY; - gDropdownItems[numItems++].Format = STR_QUIT_SCENARIO_EDITOR; - gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; + if (mapTile.IsNull()) + { + SceneryRemoveGhostToolPlacement(); + return; + } + + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + gMapSelectPositionA.x = mapTile.x; + gMapSelectPositionA.y = mapTile.y; + gMapSelectPositionB.x = mapTile.x; + gMapSelectPositionB.y = mapTile.y; + gMapSelectType = MAP_SELECT_TYPE_FULL; + + MapInvalidateSelectionRect(); + + // If no change in ghost placement + if ((gSceneryGhostType & SCENERY_GHOST_FLAG_1) && mapTile == gSceneryGhostPosition + && z == gSceneryGhostPosition.z) + { + return; + } + + SceneryRemoveGhostToolPlacement(); + + cost = TryPlaceGhostPathAddition({ mapTile, z }, selection.EntryIndex); + + gSceneryPlaceCost = cost; + break; } - else + case SCENERY_TYPE_WALL: { - gDropdownItems[numItems++].Format = STR_NEW_GAME; - gDropdownItems[numItems++].Format = STR_LOAD_GAME; - 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_FILE_BUG_ON_GITHUB; + CoordsXY mapTile = {}; + uint8_t edge; - if (OpenRCT2::GetContext()->HasNewVersionInfo()) - gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + Sub6E1F34Wall(screenPos, selection.EntryIndex, mapTile, &edge); - gDropdownItems[numItems++].Format = STR_EMPTY; - gDropdownItems[numItems++].Format = STR_QUIT_TO_MENU; - gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; + if (mapTile.IsNull()) + { + SceneryRemoveGhostToolPlacement(); + return; + } + + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + gMapSelectPositionA.x = mapTile.x; + gMapSelectPositionA.y = mapTile.y; + gMapSelectPositionB.x = mapTile.x; + gMapSelectPositionB.y = mapTile.y; + gMapSelectType = MAP_SELECT_TYPE_EDGE_0 + edge; + + MapInvalidateSelectionRect(); + + // If no change in ghost placement + if ((gSceneryGhostType & SCENERY_GHOST_FLAG_2) && mapTile == gSceneryGhostPosition + && edge == gSceneryGhostWallRotation && gSceneryPlaceZ == _unkF64F0A) + { + return; + } + + SceneryRemoveGhostToolPlacement(); + + gSceneryGhostWallRotation = edge; + _unkF64F0A = gSceneryPlaceZ; + + uint8_t attemptsLeft = 1; + if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) + { + attemptsLeft = 20; + } + + cost = 0; + for (; attemptsLeft != 0; attemptsLeft--) + { + cost = TryPlaceGhostWall( + { mapTile, gSceneryPlaceZ }, edge, selection.EntryIndex, gWindowSceneryPrimaryColour, + gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + if (cost != MONEY64_UNDEFINED) + break; + gSceneryPlaceZ += 8; + } + + gSceneryPlaceCost = cost; + break; } + case SCENERY_TYPE_LARGE: + { + CoordsXY mapTile = {}; + Direction direction; - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[0] | 0x80, - Dropdown::Flag::StayOpen, numItems); - break; - case WIDX_CHEATS: - TopToolbarInitCheatsMenu(w, widget); - break; - case WIDX_VIEW_MENU: - TopToolbarInitViewMenu(w, widget); - break; - case WIDX_MAP: - TopToolbarInitMapMenu(w, widget); - break; - case WIDX_FASTFORWARD: - TopToolbarInitFastforwardMenu(w, widget); - break; - case WIDX_ROTATE: - TopToolbarInitRotateMenu(w, widget); - break; - case WIDX_DEBUG: - TopToolbarInitDebugMenu(w, widget); - break; - case WIDX_NETWORK: - TopToolbarInitNetworkMenu(w, widget); - break; + Sub6E1F34LargeScenery(screenPos, selection.EntryIndex, mapTile, &direction); + + if (mapTile.IsNull()) + { + SceneryRemoveGhostToolPlacement(); + return; + } + + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selection.EntryIndex); + gMapSelectionTiles.clear(); + + for (auto* tile = sceneryEntry->tiles; tile->x_offset != static_cast(static_cast(0xFFFF)); + tile++) + { + CoordsXY tileLocation = { tile->x_offset, tile->y_offset }; + auto rotatedTileCoords = tileLocation.Rotate(direction); + + rotatedTileCoords.x += mapTile.x; + rotatedTileCoords.y += mapTile.y; + + gMapSelectionTiles.push_back(rotatedTileCoords); + } + + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_CONSTRUCT; + MapInvalidateMapSelectionTiles(); + + // If no change in ghost placement + if ((gSceneryGhostType & SCENERY_GHOST_FLAG_3) && mapTile == gSceneryGhostPosition + && gSceneryPlaceZ == _unkF64F0A && gSceneryPlaceObject.SceneryType == SCENERY_TYPE_LARGE + && gSceneryPlaceObject.EntryIndex == selection.EntryIndex) + { + return; + } + + SceneryRemoveGhostToolPlacement(); + + gSceneryPlaceObject.SceneryType = SCENERY_TYPE_LARGE; + gSceneryPlaceObject.EntryIndex = selection.EntryIndex; + _unkF64F0A = gSceneryPlaceZ; + + uint8_t attemptsLeft = 1; + if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) + { + attemptsLeft = 20; + } + + cost = 0; + for (; attemptsLeft != 0; attemptsLeft--) + { + cost = TryPlaceGhostLargeScenery( + { mapTile, gSceneryPlaceZ, direction }, selection.EntryIndex, gWindowSceneryPrimaryColour, + gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + if (cost != MONEY64_UNDEFINED) + break; + gSceneryPlaceZ += COORDS_Z_STEP; + } + + gSceneryPlaceCost = cost; + break; + } + case SCENERY_TYPE_BANNER: + { + CoordsXY mapTile = {}; + Direction direction; + int32_t z; + + Sub6E1F34Banner(screenPos, selection.EntryIndex, mapTile, &z, &direction); + + if (mapTile.IsNull()) + { + SceneryRemoveGhostToolPlacement(); + return; + } + + gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; + gMapSelectPositionA.x = mapTile.x; + gMapSelectPositionA.y = mapTile.y; + gMapSelectPositionB.x = mapTile.x; + gMapSelectPositionB.y = mapTile.y; + gMapSelectType = MAP_SELECT_TYPE_FULL; + + MapInvalidateSelectionRect(); + + // If no change in ghost placement + if ((gSceneryGhostType & SCENERY_GHOST_FLAG_4) && mapTile == gSceneryGhostPosition + && z == gSceneryGhostPosition.z && direction == gSceneryPlaceRotation) + { + return; + } + + SceneryRemoveGhostToolPlacement(); + + cost = TryPlaceGhostBanner({ mapTile, z, direction }, selection.EntryIndex); + + gSceneryPlaceCost = cost; + break; + } + } } -} -static void WindowTopToolbarScenarioselectCallback(const utf8* path) -{ - window_close_by_class(WindowClass::EditorObjectSelection); - game_notify_map_change(); - GetContext()->LoadParkFromFile(path, false, true); - game_load_scripts(); - game_notify_map_changed(); -} - -/** - * - * rct2: 0x0066C9EA - */ -static void WindowTopToolbarDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) -{ - switch (widgetIndex) + /** + * + * rct2: 0x006644DD + */ + money64 SelectionRaiseLand(uint8_t flag) { - case WIDX_FILE_MENU: + int32_t centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; + int32_t centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; + centreX += 16; + centreY += 16; - // New game is only available in the normal game. Skip one position to avoid incorrect mappings in the menus of the - // other modes. - if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR)) - dropdownIndex += 1; + if (gLandMountainMode) + { + auto landSmoothAction = LandSmoothAction( + { centreX, centreY }, + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, gMapSelectType, + false); + auto res = (flag & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSmoothAction) + : GameActions::Query(&landSmoothAction); + return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + } - // Quicksave is only available in the normal game. Skip one position to avoid incorrect mappings in the menus of the - // other modes. - if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR) && dropdownIndex > DDIDX_LOAD_GAME) - dropdownIndex += 1; + auto landRaiseAction = LandRaiseAction( + { centreX, centreY }, + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, gMapSelectType); + auto res = (flag & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landRaiseAction) + : GameActions::Query(&landRaiseAction); - // Track designer and track designs manager start with About, not Load/save - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) - dropdownIndex += DDIDX_ABOUT; + return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + } - // The "Update available" menu item is only available when there is one - if (dropdownIndex >= DDIDX_UPDATE_AVAILABLE && !OpenRCT2::GetContext()->HasNewVersionInfo()) - dropdownIndex += 1; + /** + * + * rct2: 0x006645B3 + */ + money64 SelectionLowerLand(uint8_t flag) + { + int32_t centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; + int32_t centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; + centreX += 16; + centreY += 16; - switch (dropdownIndex) + if (gLandMountainMode) + { + auto landSmoothAction = LandSmoothAction( + { centreX, centreY }, + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, gMapSelectType, + true); + auto res = (flag & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSmoothAction) + : GameActions::Query(&landSmoothAction); + return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + } + + auto landLowerAction = LandLowerAction( + { centreX, centreY }, + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, gMapSelectType); + auto res = (flag & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landLowerAction) + : GameActions::Query(&landLowerAction); + + return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + } + + /** + * part of window_top_toolbar_tool_drag(0x0066CB4E) + * rct2: 0x00664454 + */ + void LandToolDrag(const ScreenCoordsXY& screenPos) + { + auto* window = WindowFindFromPoint(screenPos); + if (window == nullptr) + return; + WidgetIndex widget_index = WindowFindWidgetFromPoint(*window, screenPos); + if (widget_index == -1) + return; + const auto& widget = window->widgets[widget_index]; + if (widget.type != WindowWidgetType::Viewport) + return; + const auto* selectedViewport = window->viewport; + if (selectedViewport == nullptr) + return; + + int16_t tile_height = selectedViewport->zoom.ApplyInversedTo(-16); + + int32_t y_diff = screenPos.y - gInputDragLast.y; + + if (y_diff <= tile_height) + { + gInputDragLast.y += tile_height; + + SelectionRaiseLand(GAME_COMMAND_FLAG_APPLY); + + gLandToolRaiseCost = MONEY64_UNDEFINED; + gLandToolLowerCost = MONEY64_UNDEFINED; + } + else if (y_diff >= -tile_height) + { + gInputDragLast.y -= tile_height; + + SelectionLowerLand(GAME_COMMAND_FLAG_APPLY); + + gLandToolRaiseCost = MONEY64_UNDEFINED; + gLandToolLowerCost = MONEY64_UNDEFINED; + } + } + + /** + * part of window_top_toolbar_tool_drag(0x0066CB4E) + * rct2: 0x006E6D4B + */ + void WaterToolDrag(const ScreenCoordsXY& screenPos) + { + auto* window = WindowFindFromPoint(screenPos); + if (window == nullptr || window->viewport == nullptr) + return; + + int16_t dx = window->viewport->zoom.ApplyInversedTo(-16); + + auto offsetPos = screenPos - ScreenCoordsXY{ 0, gInputDragLast.y }; + + if (offsetPos.y <= dx) + { + gInputDragLast.y += dx; + + auto waterRaiseAction = WaterRaiseAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); + GameActions::Execute(&waterRaiseAction); + + gWaterToolRaiseCost = MONEY64_UNDEFINED; + gWaterToolLowerCost = MONEY64_UNDEFINED; + + return; + } + + dx = -dx; + + if (offsetPos.y >= dx) + { + gInputDragLast.y += dx; + + auto waterLowerAction = WaterLowerAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); + GameActions::Execute(&waterLowerAction); + gWaterToolRaiseCost = MONEY64_UNDEFINED; + gWaterToolLowerCost = MONEY64_UNDEFINED; + + return; + } + } + + /** + * + * rct2: 0x006E24F6 + * On failure returns MONEY64_UNDEFINED + * On success places ghost scenery and returns cost to place proper + */ + money64 TryPlaceGhostSmallScenery( + CoordsXYZD loc, uint8_t quadrant, ObjectEntryIndex entryIndex, colour_t primaryColour, colour_t secondaryColour, + colour_t tertiaryColour) + { + SceneryRemoveGhostToolPlacement(); + + // 6e252b + auto smallSceneryPlaceAction = SmallSceneryPlaceAction( + loc, quadrant, entryIndex, primaryColour, secondaryColour, tertiaryColour); + smallSceneryPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); + auto res = GameActions::Execute(&smallSceneryPlaceAction); + if (res.Error != GameActions::Status::Ok) + return MONEY64_UNDEFINED; + + const auto placementData = res.GetData(); + + gSceneryPlaceRotation = loc.direction; + gSceneryPlaceObject.SceneryType = SCENERY_TYPE_SMALL; + gSceneryPlaceObject.EntryIndex = entryIndex; + + gSceneryGhostPosition = { loc, placementData.BaseHeight }; + gSceneryQuadrant = placementData.SceneryQuadrant; + if (placementData.GroundFlags & ELEMENT_IS_UNDERGROUND) + { + // Set underground on + ViewportSetVisibility(4); + } + else + { + // Set underground off + ViewportSetVisibility(5); + } + + gSceneryGhostType |= SCENERY_GHOST_FLAG_0; + return res.Cost; + } + + money64 TryPlaceGhostPathAddition(CoordsXYZ loc, ObjectEntryIndex entryIndex) + { + SceneryRemoveGhostToolPlacement(); + + // 6e265b + auto footpathAdditionPlaceAction = FootpathAdditionPlaceAction(loc, entryIndex + 1); + footpathAdditionPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); + footpathAdditionPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { + if (result->Error != GameActions::Status::Ok) { - case DDIDX_NEW_GAME: + return; + } + gSceneryGhostPosition = loc; + gSceneryGhostType |= SCENERY_GHOST_FLAG_1; + }); + auto res = GameActions::Execute(&footpathAdditionPlaceAction); + if (res.Error != GameActions::Status::Ok) + return MONEY64_UNDEFINED; + + return res.Cost; + } + + money64 TryPlaceGhostWall( + CoordsXYZ loc, uint8_t edge, ObjectEntryIndex entryIndex, colour_t primaryColour, colour_t secondaryColour, + colour_t tertiaryColour) + { + SceneryRemoveGhostToolPlacement(); + + // 6e26b0 + auto wallPlaceAction = WallPlaceAction(entryIndex, loc, edge, primaryColour, secondaryColour, tertiaryColour); + wallPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND); + wallPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { + if (result->Error != GameActions::Status::Ok) + return; + + const auto placementData = result->GetData(); + gSceneryGhostPosition = { loc, placementData.BaseHeight }; + gSceneryGhostWallRotation = edge; + + gSceneryGhostType |= SCENERY_GHOST_FLAG_2; + }); + + auto res = GameActions::Execute(&wallPlaceAction); + if (res.Error != GameActions::Status::Ok) + return MONEY64_UNDEFINED; + + return res.Cost; + } + + money64 TryPlaceGhostLargeScenery( + CoordsXYZD loc, ObjectEntryIndex entryIndex, colour_t primaryColour, colour_t secondaryColour, colour_t tertiaryColour) + { + SceneryRemoveGhostToolPlacement(); + + // 6e25a7 + auto sceneryPlaceAction = LargeSceneryPlaceAction(loc, entryIndex, primaryColour, secondaryColour, tertiaryColour); + sceneryPlaceAction.SetFlags( + GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND); + auto res = GameActions::Execute(&sceneryPlaceAction); + if (res.Error != GameActions::Status::Ok) + return MONEY64_UNDEFINED; + + const auto placementData = res.GetData(); + + gSceneryPlaceRotation = loc.direction; + + gSceneryGhostPosition = { loc, placementData.firstTileHeight }; + if (placementData.GroundFlags & ELEMENT_IS_UNDERGROUND) + { + // Set underground on + ViewportSetVisibility(4); + } + else + { + // Set underground off + ViewportSetVisibility(5); + } + + gSceneryGhostType |= SCENERY_GHOST_FLAG_3; + return res.Cost; + } + + money64 TryPlaceGhostBanner(CoordsXYZD loc, ObjectEntryIndex entryIndex) + { + SceneryRemoveGhostToolPlacement(); + + // 6e2612 + auto primaryColour = gWindowSceneryPrimaryColour; + auto bannerPlaceAction = BannerPlaceAction(loc, entryIndex, primaryColour); + bannerPlaceAction.SetFlags( + GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND); + auto res = GameActions::Execute(&bannerPlaceAction); + if (res.Error != GameActions::Status::Ok) + return MONEY64_UNDEFINED; + + gSceneryGhostPosition = loc; + gSceneryGhostPosition.z += PATH_HEIGHT_STEP; + gSceneryPlaceRotation = loc.direction; + gSceneryGhostType |= SCENERY_GHOST_FLAG_4; + return res.Cost; + } + + /** + * + * rct2: 0x006E3158 + */ + void RepaintSceneryToolDown(const ScreenCoordsXY& screenCoords, WidgetIndex widgetIndex) + { + auto flag = EnumsToFlags( + ViewportInteractionItem::Scenery, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery, + ViewportInteractionItem::Banner); + auto info = GetMapCoordinatesFromPos(screenCoords, flag); + switch (info.SpriteType) + { + case ViewportInteractionItem::Scenery: + { + auto* sceneryEntry = info.Element->AsSmallScenery()->GetEntry(); + + // If can't repaint + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR | SMALL_SCENERY_FLAG_HAS_GLASS)) + return; + + uint8_t quadrant = info.Element->AsSmallScenery()->GetSceneryQuadrant(); + auto repaintScenery = SmallScenerySetColourAction( + { info.Loc, info.Element->GetBaseZ() }, quadrant, info.Element->AsSmallScenery()->GetEntryIndex(), + gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + GameActions::Execute(&repaintScenery); + break; + } + case ViewportInteractionItem::Wall: + { + auto* scenery_entry = info.Element->AsWall()->GetEntry(); + + // If can't repaint + if (!(scenery_entry->flags & (WALL_SCENERY_HAS_PRIMARY_COLOUR | WALL_SCENERY_HAS_GLASS))) + return; + + auto repaintScenery = WallSetColourAction( + { info.Loc, info.Element->GetBaseZ(), info.Element->GetDirection() }, gWindowSceneryPrimaryColour, + gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + GameActions::Execute(&repaintScenery); + break; + } + case ViewportInteractionItem::LargeScenery: + { + auto* sceneryEntry = info.Element->AsLargeScenery()->GetEntry(); + + // If can't repaint + if (!(sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) + return; + + auto repaintScenery = LargeScenerySetColourAction( + { info.Loc, info.Element->GetBaseZ(), info.Element->GetDirection() }, + info.Element->AsLargeScenery()->GetSequenceIndex(), gWindowSceneryPrimaryColour, + gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + GameActions::Execute(&repaintScenery); + break; + } + case ViewportInteractionItem::Banner: + { + auto banner = info.Element->AsBanner()->GetBanner(); + if (banner != nullptr) { - auto intent = Intent(WindowClass::ScenarioSelect); - intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(WindowTopToolbarScenarioselectCallback)); - ContextOpenIntent(&intent); - break; - } - case DDIDX_LOAD_GAME: - { - auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt); - GameActions::Execute(&loadOrQuitAction); - break; - } - case DDIDX_SAVE_GAME: - tool_cancel(); - save_game(); - break; - case DDIDX_SAVE_GAME_AS: - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); + if (bannerEntry->flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR) { - auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); - intent.putExtra(INTENT_EXTRA_PATH, gScenarioName); - ContextOpenIntent(&intent); + auto repaintScenery = BannerSetColourAction( + { info.Loc, info.Element->GetBaseZ(), info.Element->AsBanner()->GetPosition() }, + gWindowSceneryPrimaryColour); + + GameActions::Execute(&repaintScenery); } - else - { - tool_cancel(); - save_game_as(); - } - break; - case DDIDX_ABOUT: - ContextOpenWindow(WindowClass::About); - break; - case DDIDX_OPTIONS: - ContextOpenWindow(WindowClass::Options); - break; - case DDIDX_SCREENSHOT: - gScreenshotCountdown = 10; - break; - case DDIDX_GIANT_SCREENSHOT: - screenshot_giant(); - break; - case DDIDX_FILE_BUG_ON_GITHUB: - { - std::string url = "https://github.com/OpenRCT2/OpenRCT2/issues/" - "new?assignees=&labels=bug&template=bug_report.yaml"; - auto versionStr = String::URLEncode(gVersionInfoFull); - url.append("&openrct2_build=" + versionStr); - OpenRCT2::GetContext()->GetUiContext()->OpenURL(url); } break; - case DDIDX_UPDATE_AVAILABLE: - ContextOpenWindowView(WV_NEW_VERSION_INFO); - break; - case DDIDX_QUIT_TO_MENU: - { - window_close_by_class(WindowClass::ManageTrackDesign); - window_close_by_class(WindowClass::TrackDeletePrompt); - auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeQuit); - GameActions::Execute(&loadOrQuitAction); - break; - } - case DDIDX_EXIT_OPENRCT2: - ContextQuit(); - break; } - break; - case WIDX_CHEATS: - TopToolbarCheatsMenuDropdown(dropdownIndex); - break; - case WIDX_VIEW_MENU: - TopToolbarViewMenuDropdown(dropdownIndex); - break; - case WIDX_MAP: - TopToolbarMapMenuDropdown(dropdownIndex); - break; - case WIDX_FASTFORWARD: - TopToolbarFastforwardMenuDropdown(dropdownIndex); - break; - case WIDX_ROTATE: - TopToolbarRotateMenuDropdown(dropdownIndex); - break; - case WIDX_DEBUG: - TopToolbarDebugMenuDropdown(dropdownIndex); - break; - case WIDX_NETWORK: - TopToolbarNetworkMenuDropdown(dropdownIndex); - break; - } -} - -/** - * - * rct2: 0x0066C810 - */ -static void WindowTopToolbarInvalidate(rct_window* w) -{ - int32_t x, widgetIndex, widgetWidth, firstAlignment; - rct_widget* widget; - - // Enable / disable buttons - window_top_toolbar_widgets[WIDX_PAUSE].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_FILE_MENU].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_ZOOM_IN].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_ROTATE].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_VIEW_MENU].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_MAP].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_MUTE].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_CHAT].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_LAND].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_WATER].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_SCENERY].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_PATH].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_CONSTRUCT_RIDE].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_RIDES].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_PARK].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_STAFF].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_GUESTS].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_FINANCES].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_RESEARCH].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_CHEATS].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_DEBUG].type = gConfigGeneral.DebuggingTools ? WindowWidgetType::TrnBtn - : WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_NEWS].type = WindowWidgetType::TrnBtn; - window_top_toolbar_widgets[WIDX_NETWORK].type = WindowWidgetType::TrnBtn; - - if (!gConfigInterface.ToolbarShowMute) - window_top_toolbar_widgets[WIDX_MUTE].type = WindowWidgetType::Empty; - - if (!gConfigInterface.ToolbarShowChat) - window_top_toolbar_widgets[WIDX_CHAT].type = WindowWidgetType::Empty; - - if (!gConfigInterface.ToolbarShowResearch) - window_top_toolbar_widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty; - - if (!gConfigInterface.ToolbarShowCheats) - window_top_toolbar_widgets[WIDX_CHEATS].type = WindowWidgetType::Empty; - - if (!gConfigInterface.ToolbarShowNews) - window_top_toolbar_widgets[WIDX_NEWS].type = WindowWidgetType::Empty; - - if (!gConfigInterface.ToolbarShowZoom) - { - window_top_toolbar_widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty; - } - - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR || gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) - { - window_top_toolbar_widgets[WIDX_PAUSE].type = WindowWidgetType::Empty; - } - - if ((gParkFlags & PARK_FLAGS_NO_MONEY) || !gConfigInterface.ToolbarShowFinances) - window_top_toolbar_widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; - - if (gScreenFlags & SCREEN_FLAGS_EDITOR) - { - window_top_toolbar_widgets[WIDX_PARK].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_STAFF].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_GUESTS].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_NEWS].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_NETWORK].type = WindowWidgetType::Empty; - - if (gEditorStep != EditorStep::LandscapeEditor) - { - window_top_toolbar_widgets[WIDX_LAND].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_WATER].type = WindowWidgetType::Empty; - } - - if (gEditorStep != EditorStep::RollercoasterDesigner) - { - window_top_toolbar_widgets[WIDX_RIDES].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_CONSTRUCT_RIDE].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WindowWidgetType::Empty; - } - - if (gEditorStep != EditorStep::LandscapeEditor && gEditorStep != EditorStep::RollercoasterDesigner) - { - window_top_toolbar_widgets[WIDX_MAP].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_SCENERY].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_PATH].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::Empty; - - window_top_toolbar_widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_ROTATE].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_VIEW_MENU].type = WindowWidgetType::Empty; - } - } - - switch (network_get_mode()) - { - case NETWORK_MODE_NONE: - window_top_toolbar_widgets[WIDX_NETWORK].type = WindowWidgetType::Empty; - window_top_toolbar_widgets[WIDX_CHAT].type = WindowWidgetType::Empty; - break; - case NETWORK_MODE_CLIENT: - window_top_toolbar_widgets[WIDX_PAUSE].type = WindowWidgetType::Empty; - [[fallthrough]]; - case NETWORK_MODE_SERVER: - window_top_toolbar_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 = &window_top_toolbar_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 - 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 = &window_top_toolbar_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 (window_find_by_class(WindowClass::Footpath) == nullptr) - w->pressed_widgets &= ~(1uLL << WIDX_PATH); - else - w->pressed_widgets |= (1uLL << WIDX_PATH); - - if (gGamePaused & GAME_PAUSED_NORMAL) - w->pressed_widgets |= (1uLL << WIDX_PAUSE); - else - w->pressed_widgets &= ~(1uLL << WIDX_PAUSE); - - if (!OpenRCT2::Audio::gGameSoundsOff) - window_top_toolbar_widgets[WIDX_MUTE].image = IMAGE_TYPE_REMAP | SPR_G2_TOOLBAR_MUTE; - else - window_top_toolbar_widgets[WIDX_MUTE].image = IMAGE_TYPE_REMAP | SPR_G2_TOOLBAR_UNMUTE; - - // Set map button to the right image. - if (window_top_toolbar_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[get_current_rotation()]; - window_top_toolbar_widgets[WIDX_MAP].image = IMAGE_TYPE_REMAP | mapImageId; - } - - // Zoomed out/in disable. Not sure where this code is in the original. - const auto* mainWindow = window_get_main(); - if (mainWindow == nullptr || mainWindow->viewport == nullptr) - { - log_error("mainWindow or mainWindow->viewport is null!"); - return; - } - - if (mainWindow->viewport->zoom == ZoomLevel::min()) - { - w->disabled_widgets |= (1uLL << WIDX_ZOOM_IN); - } - else if (mainWindow->viewport->zoom >= ZoomLevel::max()) - { - w->disabled_widgets |= (1uLL << WIDX_ZOOM_OUT); - } - else - { - w->disabled_widgets &= ~((1uLL << WIDX_ZOOM_IN) | (1uLL << WIDX_ZOOM_OUT)); - } -} - -/** - * - * rct2: 0x0066C8EC - */ -static void WindowTopToolbarPaint(rct_window* w, rct_drawpixelinfo* dpi) -{ - int32_t imgId; - - WindowDrawWidgets(*w, dpi); - - ScreenCoordsXY screenPos{}; - // Draw staff button image (setting masks to the staff colours) - if (window_top_toolbar_widgets[WIDX_STAFF].type != WindowWidgetType::Empty) - { - screenPos = { w->windowPos.x + window_top_toolbar_widgets[WIDX_STAFF].left, - w->windowPos.y + window_top_toolbar_widgets[WIDX_STAFF].top }; - imgId = SPR_TOOLBAR_STAFF; - if (WidgetIsPressed(*w, WIDX_STAFF)) - imgId++; - gfx_draw_sprite(dpi, ImageId(imgId, gStaffHandymanColour, gStaffMechanicColour), screenPos); - } - - // Draw fast forward button - if (window_top_toolbar_widgets[WIDX_FASTFORWARD].type != WindowWidgetType::Empty) - { - screenPos = { w->windowPos.x + window_top_toolbar_widgets[WIDX_FASTFORWARD].left + 0, - w->windowPos.y + window_top_toolbar_widgets[WIDX_FASTFORWARD].top + 0 }; - if (WidgetIsPressed(*w, WIDX_FASTFORWARD)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_G2_FASTFORWARD), screenPos + ScreenCoordsXY{ 6, 3 }); - - for (int32_t i = 0; i < gGameSpeed && gGameSpeed <= 4; i++) - { - gfx_draw_sprite(dpi, ImageId(SPR_G2_SPEED_ARROW), screenPos + ScreenCoordsXY{ 5 + i * 5, 15 }); - } - for (int32_t i = 0; i < 3 && i < gGameSpeed - 4 && gGameSpeed >= 5; i++) - { - gfx_draw_sprite(dpi, ImageId(SPR_G2_HYPER_ARROW), screenPos + ScreenCoordsXY{ 5 + i * 6, 15 }); - } - } - - // Draw cheats button - if (window_top_toolbar_widgets[WIDX_CHEATS].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_CHEATS].left - 1, - window_top_toolbar_widgets[WIDX_CHEATS].top - 1 }; - if (WidgetIsPressed(*w, WIDX_CHEATS)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_G2_SANDBOX), screenPos); - - // Draw an overlay if clearance checks are disabled - if (gCheatsDisableClearanceChecks) - { - DrawTextBasic( - dpi, screenPos + ScreenCoordsXY{ 26, 2 }, STR_OVERLAY_CLEARANCE_CHECKS_DISABLED, {}, - { COLOUR_DARK_ORANGE | COLOUR_FLAG_OUTLINE, TextAlignment::RIGHT }); - } - } - - // Draw chat button - if (window_top_toolbar_widgets[WIDX_CHAT].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_CHAT].left, window_top_toolbar_widgets[WIDX_CHAT].top - 2 }; - if (WidgetIsPressed(*w, WIDX_CHAT)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_G2_CHAT), screenPos); - } - - // Draw debug button - if (window_top_toolbar_widgets[WIDX_DEBUG].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_DEBUG].left, window_top_toolbar_widgets[WIDX_DEBUG].top - 1 }; - if (WidgetIsPressed(*w, WIDX_DEBUG)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_TAB_GEARS_0), screenPos); - } - - // Draw research button - if (window_top_toolbar_widgets[WIDX_RESEARCH].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_RESEARCH].left - 1, - window_top_toolbar_widgets[WIDX_RESEARCH].top }; - if (WidgetIsPressed(*w, WIDX_RESEARCH)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_TAB_FINANCES_RESEARCH_0), screenPos); - } - - // Draw finances button - if (window_top_toolbar_widgets[WIDX_FINANCES].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_FINANCES].left + 3, - window_top_toolbar_widgets[WIDX_FINANCES].top + 1 }; - if (WidgetIsPressed(*w, WIDX_FINANCES)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_FINANCE), screenPos); - } - - // Draw news button - if (window_top_toolbar_widgets[WIDX_NEWS].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_NEWS].left + 3, window_top_toolbar_widgets[WIDX_NEWS].top + 0 }; - if (WidgetIsPressed(*w, WIDX_NEWS)) - screenPos.y++; - gfx_draw_sprite(dpi, ImageId(SPR_G2_TAB_NEWS), screenPos); - } - - // Draw network button - if (window_top_toolbar_widgets[WIDX_NETWORK].type != WindowWidgetType::Empty) - { - screenPos = w->windowPos - + ScreenCoordsXY{ window_top_toolbar_widgets[WIDX_NETWORK].left + 3, - window_top_toolbar_widgets[WIDX_NETWORK].top + 0 }; - if (WidgetIsPressed(*w, WIDX_NETWORK)) - screenPos.y++; - - // Draw (de)sync icon. - imgId = (network_is_desynchronised() ? SPR_G2_MULTIPLAYER_DESYNC : SPR_G2_MULTIPLAYER_SYNC); - gfx_draw_sprite(dpi, ImageId(imgId), screenPos + ScreenCoordsXY{ 3, 11 }); - - // Draw number of players. - auto ft = Formatter(); - ft.Add(network_get_num_visible_players()); - DrawTextBasic( - dpi, screenPos + ScreenCoordsXY{ 23, 1 }, STR_COMMA16, ft, - { COLOUR_WHITE | COLOUR_FLAG_OUTLINE, TextAlignment::RIGHT }); - } -} - -/** - * - * rct2: 0x006E3158 - */ -static void RepaintSceneryToolDown(const ScreenCoordsXY& windowPos, WidgetIndex widgetIndex) -{ - auto flags = EnumsToFlags( - ViewportInteractionItem::Scenery, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery, - ViewportInteractionItem::Banner); - auto info = get_map_coordinates_from_pos(windowPos, flags); - switch (info.SpriteType) - { - case ViewportInteractionItem::Scenery: - { - auto* sceneryEntry = info.Element->AsSmallScenery()->GetEntry(); - - // If can't repaint - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR | SMALL_SCENERY_FLAG_HAS_GLASS)) + default: return; - - uint8_t quadrant = info.Element->AsSmallScenery()->GetSceneryQuadrant(); - auto repaintScenery = SmallScenerySetColourAction( - { info.Loc, info.Element->GetBaseZ() }, quadrant, info.Element->AsSmallScenery()->GetEntryIndex(), - gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - GameActions::Execute(&repaintScenery); - break; } - case ViewportInteractionItem::Wall: - { - auto* scenery_entry = info.Element->AsWall()->GetEntry(); - - // If can't repaint - if (!(scenery_entry->flags & (WALL_SCENERY_HAS_PRIMARY_COLOUR | WALL_SCENERY_HAS_GLASS))) - return; - - auto repaintScenery = WallSetColourAction( - { info.Loc, info.Element->GetBaseZ(), info.Element->GetDirection() }, gWindowSceneryPrimaryColour, - gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - GameActions::Execute(&repaintScenery); - break; - } - case ViewportInteractionItem::LargeScenery: - { - auto* sceneryEntry = info.Element->AsLargeScenery()->GetEntry(); - - // If can't repaint - if (!(sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) - return; - - auto repaintScenery = LargeScenerySetColourAction( - { info.Loc, info.Element->GetBaseZ(), info.Element->GetDirection() }, - info.Element->AsLargeScenery()->GetSequenceIndex(), gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, - gWindowSceneryTertiaryColour); - - GameActions::Execute(&repaintScenery); - break; - } - case ViewportInteractionItem::Banner: - { - auto banner = info.Element->AsBanner()->GetBanner(); - if (banner != nullptr) - { - auto* bannerEntry = GetBannerEntry(banner->type); - if (bannerEntry->flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR) - { - auto repaintScenery = BannerSetColourAction( - { info.Loc, info.Element->GetBaseZ(), info.Element->AsBanner()->GetPosition() }, - gWindowSceneryPrimaryColour); - - GameActions::Execute(&repaintScenery); - } - } - break; - } - default: - return; } -} -static void SceneryEyedropperToolDown(const ScreenCoordsXY& windowPos, WidgetIndex widgetIndex) -{ - auto flags = EnumsToFlags( - ViewportInteractionItem::Scenery, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery, - ViewportInteractionItem::Banner, ViewportInteractionItem::FootpathItem); - auto info = get_map_coordinates_from_pos(windowPos, flags); - switch (info.SpriteType) + void SceneryEyedropperToolDown(const ScreenCoordsXY& screenCoords, WidgetIndex widgetIndex) { - case ViewportInteractionItem::Scenery: + auto flag = EnumsToFlags( + ViewportInteractionItem::Scenery, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery, + ViewportInteractionItem::Banner, ViewportInteractionItem::FootpathItem); + auto info = GetMapCoordinatesFromPos(screenCoords, flag); + switch (info.SpriteType) { - SmallSceneryElement* sceneryElement = info.Element->AsSmallScenery(); - auto entryIndex = sceneryElement->GetEntryIndex(); - auto* sceneryEntry = GetSmallSceneryEntry(entryIndex); - if (sceneryEntry != nullptr) + case ViewportInteractionItem::Scenery: { - WindowScenerySetSelectedItem( - { SCENERY_TYPE_SMALL, entryIndex }, sceneryElement->GetPrimaryColour(), - sceneryElement->GetSecondaryColour(), std::nullopt, - sceneryElement->GetDirectionWithOffset(get_current_rotation())); - } - break; - } - case ViewportInteractionItem::Wall: - { - auto entryIndex = info.Element->AsWall()->GetEntryIndex(); - auto* sceneryEntry = GetWallEntry(entryIndex); - if (sceneryEntry != nullptr) - { - WindowScenerySetSelectedItem( - { SCENERY_TYPE_WALL, entryIndex }, info.Element->AsWall()->GetPrimaryColour(), - info.Element->AsWall()->GetSecondaryColour(), info.Element->AsWall()->GetTertiaryColour(), std::nullopt); - } - break; - } - case ViewportInteractionItem::LargeScenery: - { - auto entryIndex = info.Element->AsLargeScenery()->GetEntryIndex(); - auto* sceneryEntry = GetLargeSceneryEntry(entryIndex); - if (sceneryEntry != nullptr) - { - WindowScenerySetSelectedItem( - { SCENERY_TYPE_LARGE, entryIndex }, info.Element->AsLargeScenery()->GetPrimaryColour(), - info.Element->AsLargeScenery()->GetSecondaryColour(), std::nullopt, - (get_current_rotation() + info.Element->GetDirection()) & 3); - } - break; - } - case ViewportInteractionItem::Banner: - { - auto banner = info.Element->AsBanner()->GetBanner(); - if (banner != nullptr) - { - auto sceneryEntry = GetBannerEntry(banner->type); + SmallSceneryElement* sceneryElement = info.Element->AsSmallScenery(); + auto entryIndex = sceneryElement->GetEntryIndex(); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); if (sceneryEntry != nullptr) { WindowScenerySetSelectedItem( - { SCENERY_TYPE_BANNER, banner->type }, std::nullopt, std::nullopt, std::nullopt, std::nullopt); + { SCENERY_TYPE_SMALL, entryIndex }, sceneryElement->GetPrimaryColour(), + sceneryElement->GetSecondaryColour(), std::nullopt, + sceneryElement->GetDirectionWithOffset(GetCurrentRotation())); } + break; } - break; - } - case ViewportInteractionItem::FootpathItem: - { - auto entryIndex = info.Element->AsPath()->GetAdditionEntryIndex(); - auto* pathBitEntry = GetFootpathItemEntry(entryIndex); - if (pathBitEntry != nullptr) + case ViewportInteractionItem::Wall: { - WindowScenerySetSelectedItem( - { SCENERY_TYPE_PATH_ITEM, entryIndex }, std::nullopt, std::nullopt, std::nullopt, std::nullopt); - } - break; - } - default: - break; - } -} - -static void Sub6E1F34UpdateScreenCoordsAndButtonsPressed(bool canRaiseItem, ScreenCoordsXY& screenPos) -{ - if (!canRaiseItem && !gCheatsDisableSupportLimits) - { - gSceneryCtrlPressed = false; - gSceneryShiftPressed = false; - } - else - { - if (!gSceneryCtrlPressed) - { - if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z)) - { - // CTRL pressed - constexpr auto flags = EnumsToFlags( - ViewportInteractionItem::Terrain, ViewportInteractionItem::Ride, ViewportInteractionItem::Scenery, - ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, ViewportInteractionItem::LargeScenery); - auto info = get_map_coordinates_from_pos(screenPos, flags); - - if (info.SpriteType != ViewportInteractionItem::None) + auto entryIndex = info.Element->AsWall()->GetEntryIndex(); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); + if (sceneryEntry != nullptr) { - gSceneryCtrlPressed = true; - gSceneryCtrlPressZ = info.Element->GetBaseZ(); + WindowScenerySetSelectedItem( + { SCENERY_TYPE_WALL, entryIndex }, info.Element->AsWall()->GetPrimaryColour(), + info.Element->AsWall()->GetSecondaryColour(), info.Element->AsWall()->GetTertiaryColour(), + std::nullopt); } + break; } + case ViewportInteractionItem::LargeScenery: + { + auto entryIndex = info.Element->AsLargeScenery()->GetEntryIndex(); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); + if (sceneryEntry != nullptr) + { + WindowScenerySetSelectedItem( + { SCENERY_TYPE_LARGE, entryIndex }, info.Element->AsLargeScenery()->GetPrimaryColour(), + info.Element->AsLargeScenery()->GetSecondaryColour(), std::nullopt, + (GetCurrentRotation() + info.Element->GetDirection()) & 3); + } + break; + } + case ViewportInteractionItem::Banner: + { + auto banner = info.Element->AsBanner()->GetBanner(); + if (banner != nullptr) + { + auto sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); + if (sceneryEntry != nullptr) + { + WindowScenerySetSelectedItem( + { SCENERY_TYPE_BANNER, banner->type }, std::nullopt, std::nullopt, std::nullopt, std::nullopt); + } + } + break; + } + case ViewportInteractionItem::FootpathItem: + { + auto entryIndex = info.Element->AsPath()->GetAdditionEntryIndex(); + auto* pathBitEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); + if (pathBitEntry != nullptr) + { + WindowScenerySetSelectedItem( + { SCENERY_TYPE_PATH_ITEM, entryIndex }, std::nullopt, std::nullopt, std::nullopt, std::nullopt); + } + break; + } + default: + break; + } + } + + void Sub6E1F34UpdateScreenCoordsAndButtonsPressed(bool canRaiseItem, ScreenCoordsXY& screenPos) + { + if (!canRaiseItem && !gCheatsDisableSupportLimits) + { + gSceneryCtrlPressed = false; + gSceneryShiftPressed = false; } else { - if (!(InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z))) + if (!gSceneryCtrlPressed) { - // CTRL not pressed - gSceneryCtrlPressed = false; - } - } - - if (!gSceneryShiftPressed) - { - if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_SHIFT_Z)) - { - // SHIFT pressed - gSceneryShiftPressed = true; - gSceneryShiftPressX = screenPos.x; - gSceneryShiftPressY = screenPos.y; - gSceneryShiftPressZOffset = 0; - } - } - else - { - if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_SHIFT_Z)) - { - // SHIFT pressed - gSceneryShiftPressZOffset = (gSceneryShiftPressY - screenPos.y + 4); - // Scale delta by zoom to match mouse position. - auto* mainWnd = window_get_main(); - if (mainWnd != nullptr && mainWnd->viewport != nullptr) + if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z)) { - gSceneryShiftPressZOffset = mainWnd->viewport->zoom.ApplyTo(gSceneryShiftPressZOffset); - } - gSceneryShiftPressZOffset = floor2(gSceneryShiftPressZOffset, 8); + // CTRL pressed + constexpr auto flag = EnumsToFlags( + ViewportInteractionItem::Terrain, ViewportInteractionItem::Ride, ViewportInteractionItem::Scenery, + ViewportInteractionItem::Footpath, ViewportInteractionItem::Wall, + ViewportInteractionItem::LargeScenery); + auto info = GetMapCoordinatesFromPos(screenPos, flag); - screenPos.x = gSceneryShiftPressX; - screenPos.y = gSceneryShiftPressY; + if (info.SpriteType != ViewportInteractionItem::None) + { + gSceneryCtrlPressed = true; + gSceneryCtrlPressZ = info.Element->GetBaseZ(); + } + } } else { - // SHIFT not pressed - gSceneryShiftPressed = false; + if (!(InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z))) + { + // CTRL not pressed + gSceneryCtrlPressed = false; + } + } + + if (!gSceneryShiftPressed) + { + if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_SHIFT_Z)) + { + // SHIFT pressed + gSceneryShiftPressed = true; + gSceneryShiftPressX = screenPos.x; + gSceneryShiftPressY = screenPos.y; + gSceneryShiftPressZOffset = 0; + } + } + else + { + if (InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_SHIFT_Z)) + { + // SHIFT pressed + gSceneryShiftPressZOffset = (gSceneryShiftPressY - screenPos.y + 4); + // Scale delta by zoom to match mouse position. + auto* mainWnd = WindowGetMain(); + if (mainWnd != nullptr && mainWnd->viewport != nullptr) + { + gSceneryShiftPressZOffset = mainWnd->viewport->zoom.ApplyTo(gSceneryShiftPressZOffset); + } + gSceneryShiftPressZOffset = Floor2(gSceneryShiftPressZOffset, 8); + + screenPos.x = gSceneryShiftPressX; + screenPos.y = gSceneryShiftPressY; + } + else + { + // SHIFT not pressed + gSceneryShiftPressed = false; + } } } } -} -static void Sub6E1F34SmallScenery( - const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outQuadrant, - Direction* outRotation) -{ - rct_window* w = window_find_by_class(WindowClass::Scenery); - - if (w == nullptr) + void Sub6E1F34SmallScenery( + const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outQuadrant, + Direction* outRotation) { - gridPos.SetNull(); - return; - } + auto* w = WindowFindByClass(WindowClass::Scenery); - auto screenPos = sourceScreenPos; - uint16_t maxPossibleHeight = ZoomLevel::max().ApplyTo(std::numeric_limits::max() - 32); - bool can_raise_item = false; + if (w == nullptr) + { + gridPos.SetNull(); + return; + } - const auto* sceneryEntry = GetSmallSceneryEntry(sceneryIndex); - if (sceneryEntry == nullptr) - { - gridPos.SetNull(); - return; - } + auto screenPos = sourceScreenPos; + uint16_t maxPossibleHeight = ZoomLevel::max().ApplyTo( + std::numeric_limits::max() - 32); + bool can_raise_item = false; - maxPossibleHeight -= sceneryEntry->height; - if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE)) - { - can_raise_item = true; - } + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryIndex); + if (sceneryEntry == nullptr) + { + gridPos.SetNull(); + return; + } - Sub6E1F34UpdateScreenCoordsAndButtonsPressed(can_raise_item, screenPos); + maxPossibleHeight -= sceneryEntry->height; + if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE)) + { + can_raise_item = true; + } - // Small scenery - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) - { - uint8_t quadrant = 0; + Sub6E1F34UpdateScreenCoordsAndButtonsPressed(can_raise_item, screenPos); + + // Small scenery + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) + { + uint8_t quadrant = 0; + + // If CTRL not pressed + if (!gSceneryCtrlPressed) + { + auto gridCoords = ScreenGetMapXYQuadrant(screenPos, &quadrant); + if (!gridCoords.has_value()) + { + gridPos.SetNull(); + return; + } + gridPos = gridCoords.value(); + + gSceneryPlaceZ = 0; + + // If SHIFT pressed + if (gSceneryShiftPressed) + { + auto* surfaceElement = MapGetSurfaceElementAt(gridPos); + + if (surfaceElement == nullptr) + { + gridPos.SetNull(); + return; + } + + int16_t z = (surfaceElement->GetBaseZ()) & 0xFFF0; + z += gSceneryShiftPressZOffset; + + z = std::clamp(z, 16, maxPossibleHeight); + + gSceneryPlaceZ = z; + } + } + else + { + int16_t z = gSceneryCtrlPressZ; + + auto mapCoords = ScreenGetMapXYQuadrantWithZ(screenPos, z, &quadrant); + if (!mapCoords.has_value()) + { + gridPos.SetNull(); + return; + } + gridPos = mapCoords.value(); + + // If SHIFT pressed + if (gSceneryShiftPressed) + { + z += gSceneryShiftPressZOffset; + } + + z = std::clamp(z, 16, maxPossibleHeight); + + gSceneryPlaceZ = z; + } + + if (gridPos.IsNull()) + return; + + uint8_t rotation = gWindowSceneryRotation; + + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) + { + rotation = UtilRand() & 0xFF; + } + + rotation -= GetCurrentRotation(); + rotation &= 0x3; + + if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + { + VirtualFloorSetHeight(gSceneryPlaceZ); + } + + *outQuadrant = quadrant ^ 2; + *outRotation = rotation; + + return; + } // If CTRL not pressed if (!gSceneryCtrlPressed) { - auto gridCoords = screen_get_map_xy_quadrant(screenPos, &quadrant); + constexpr auto flag = EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water); + + auto info = GetMapCoordinatesFromPos(screenPos, flag); + gridPos = info.Loc; + + if (info.SpriteType == ViewportInteractionItem::None) + { + gridPos.SetNull(); + return; + } + + // If CTRL and SHIFT not pressed + gSceneryPlaceZ = 0; + + // If SHIFT pressed + if (gSceneryShiftPressed) + { + auto surfaceElement = MapGetSurfaceElementAt(gridPos); + + if (surfaceElement == nullptr) + { + gridPos.SetNull(); + return; + } + + int16_t z = (surfaceElement->GetBaseZ()) & 0xFFF0; + z += gSceneryShiftPressZOffset; + + z = std::clamp(z, 16, maxPossibleHeight); + + gSceneryPlaceZ = z; + } + } + else + { + int16_t z = gSceneryCtrlPressZ; + auto coords = ScreenGetMapXYWithZ(screenPos, z); + if (coords.has_value()) + { + gridPos = *coords; + } + else + { + gridPos.SetNull(); + } + // If SHIFT pressed + if (gSceneryShiftPressed) + { + z += gSceneryShiftPressZOffset; + } + + z = std::clamp(z, 16, maxPossibleHeight); + + gSceneryPlaceZ = z; + } + + if (gridPos.IsNull()) + return; + + gridPos = gridPos.ToTileStart(); + uint8_t rotation = gWindowSceneryRotation; + + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) + { + rotation = UtilRand() & 0xFF; + } + + rotation -= GetCurrentRotation(); + rotation &= 0x3; + + if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + { + VirtualFloorSetHeight(gSceneryPlaceZ); + } + + *outQuadrant = 0; + *outRotation = rotation; + } + + void Sub6E1F34PathItem( + const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ) + { + auto* w = WindowFindByClass(WindowClass::Scenery); + + if (w == nullptr) + { + gridPos.SetNull(); + return; + } + + auto screenPos = sourceScreenPos; + Sub6E1F34UpdateScreenCoordsAndButtonsPressed(false, screenPos); + + // Path bits + constexpr auto flag = EnumsToFlags(ViewportInteractionItem::Footpath, ViewportInteractionItem::FootpathItem); + auto info = GetMapCoordinatesFromPos(screenPos, flag); + gridPos = info.Loc; + + if (info.SpriteType == ViewportInteractionItem::None) + { + gridPos.SetNull(); + return; + } + + if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) + { + VirtualFloorSetHeight(gSceneryPlaceZ); + } + + *outZ = info.Element->GetBaseZ(); + } + + void Sub6E1F34Wall( + const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outEdges) + { + auto* w = WindowFindByClass(WindowClass::Scenery); + + if (w == nullptr) + { + gridPos.SetNull(); + return; + } + + auto screenPos = sourceScreenPos; + uint16_t maxPossibleHeight = ZoomLevel::max().ApplyTo( + std::numeric_limits::max() - 32); + + auto* wallEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryIndex); + if (wallEntry != nullptr) + { + maxPossibleHeight -= wallEntry->height; + } + + Sub6E1F34UpdateScreenCoordsAndButtonsPressed(true, screenPos); + + // Walls + uint8_t edge; + // If CTRL not pressed + if (!gSceneryCtrlPressed) + { + auto gridCoords = ScreenGetMapXYSide(screenPos, &edge); if (!gridCoords.has_value()) { gridPos.SetNull(); @@ -1311,8 +1975,7 @@ static void Sub6E1F34SmallScenery( else { int16_t z = gSceneryCtrlPressZ; - - auto mapCoords = screen_get_map_xy_quadrant_with_z(screenPos, z, &quadrant); + auto mapCoords = ScreenGetMapXYSideWithZ(screenPos, z, &edge); if (!mapCoords.has_value()) { gridPos.SetNull(); @@ -1334,14 +1997,104 @@ static void Sub6E1F34SmallScenery( if (gridPos.IsNull()) return; - uint8_t rotation = gWindowSceneryRotation; - - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) + if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) { - rotation = util_rand() & 0xFF; + VirtualFloorSetHeight(gSceneryPlaceZ); } - rotation -= get_current_rotation(); + *outEdges = edge; + } + + void Sub6E1F34LargeScenery( + const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, Direction* outDirection) + { + auto* w = WindowFindByClass(WindowClass::Scenery); + + if (w == nullptr) + { + gridPos.SetNull(); + return; + } + + auto screenPos = sourceScreenPos; + uint16_t maxPossibleHeight = ZoomLevel::max().ApplyTo( + std::numeric_limits::max() - 32); + + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(sceneryIndex); + if (sceneryEntry) + { + int16_t maxClearZ = 0; + for (int32_t i = 0; sceneryEntry->tiles[i].x_offset != -1; ++i) + { + maxClearZ = std::max(maxClearZ, sceneryEntry->tiles[i].z_clearance); + } + maxPossibleHeight = std::max(0, maxPossibleHeight - maxClearZ); + } + + Sub6E1F34UpdateScreenCoordsAndButtonsPressed(true, screenPos); + + // Large scenery + // If CTRL not pressed + if (!gSceneryCtrlPressed) + { + const CoordsXY mapCoords = ViewportInteractionGetTileStartAtCursor(screenPos); + gridPos = mapCoords; + + if (gridPos.IsNull()) + return; + + gSceneryPlaceZ = 0; + + // If SHIFT pressed + if (gSceneryShiftPressed) + { + auto* surfaceElement = MapGetSurfaceElementAt(gridPos); + + if (surfaceElement == nullptr) + { + gridPos.SetNull(); + return; + } + + int16_t z = (surfaceElement->GetBaseZ()) & 0xFFF0; + z += gSceneryShiftPressZOffset; + + z = std::clamp(z, 16, maxPossibleHeight); + + gSceneryPlaceZ = z; + } + } + else + { + int16_t z = gSceneryCtrlPressZ; + auto coords = ScreenGetMapXYWithZ(screenPos, z); + if (coords.has_value()) + { + gridPos = *coords; + } + else + { + gridPos.SetNull(); + } + + // If SHIFT pressed + if (gSceneryShiftPressed) + { + z += gSceneryShiftPressZOffset; + } + + z = std::clamp(z, 16, maxPossibleHeight); + + gSceneryPlaceZ = z; + } + + if (gridPos.IsNull()) + return; + + gridPos = gridPos.ToTileStart(); + + Direction rotation = gWindowSceneryRotation; + rotation -= GetCurrentRotation(); rotation &= 0x3; if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) @@ -1349,18 +2102,27 @@ static void Sub6E1F34SmallScenery( VirtualFloorSetHeight(gSceneryPlaceZ); } - *outQuadrant = quadrant ^ 2; - *outRotation = rotation; - - return; + *outDirection = rotation; } - // If CTRL not pressed - if (!gSceneryCtrlPressed) + void Sub6E1F34Banner( + const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ, + Direction* outDirection) { - constexpr auto flags = EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water); + auto* w = WindowFindByClass(WindowClass::Scenery); - auto info = get_map_coordinates_from_pos(screenPos, flags); + if (w == nullptr) + { + gridPos.SetNull(); + return; + } + + auto screenPos = sourceScreenPos; + Sub6E1F34UpdateScreenCoordsAndButtonsPressed(false, screenPos); + + // Banner + constexpr auto flag = EnumsToFlags(ViewportInteractionItem::Footpath, ViewportInteractionItem::FootpathItem); + auto info = GetMapCoordinatesFromPos(screenPos, flag); gridPos = info.Loc; if (info.SpriteType == ViewportInteractionItem::None) @@ -1369,1817 +2131,688 @@ static void Sub6E1F34SmallScenery( return; } - // If CTRL and SHIFT not pressed - gSceneryPlaceZ = 0; + uint8_t rotation = gWindowSceneryRotation; + rotation -= GetCurrentRotation(); + rotation &= 0x3; - // If SHIFT pressed - if (gSceneryShiftPressed) + auto z = info.Element->GetBaseZ(); + + if (info.Element->AsPath()->IsSloped()) { - auto surfaceElement = MapGetSurfaceElementAt(gridPos); - - if (surfaceElement == nullptr) + if (rotation != DirectionReverse(info.Element->AsPath()->GetSlopeDirection())) { - gridPos.SetNull(); - return; + z += (2 * COORDS_Z_STEP); } - - int16_t z = (surfaceElement->GetBaseZ()) & 0xFFF0; - z += gSceneryShiftPressZOffset; - - z = std::clamp(z, 16, maxPossibleHeight); - - gSceneryPlaceZ = z; - } - } - else - { - int16_t z = gSceneryCtrlPressZ; - auto coords = screen_get_map_xy_with_z(screenPos, z); - if (coords.has_value()) - { - gridPos = *coords; - } - else - { - gridPos.SetNull(); - } - // If SHIFT pressed - if (gSceneryShiftPressed) - { - z += gSceneryShiftPressZOffset; } - z = std::clamp(z, 16, maxPossibleHeight); - - gSceneryPlaceZ = z; - } - - if (gridPos.IsNull()) - return; - - gridPos = gridPos.ToTileStart(); - uint8_t rotation = gWindowSceneryRotation; - - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) - { - rotation = util_rand() & 0xFF; - } - - rotation -= get_current_rotation(); - rotation &= 0x3; - - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) - { - VirtualFloorSetHeight(gSceneryPlaceZ); - } - - *outQuadrant = 0; - *outRotation = rotation; -} - -static void Sub6E1F34PathItem( - const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ) -{ - rct_window* w = window_find_by_class(WindowClass::Scenery); - - if (w == nullptr) - { - gridPos.SetNull(); - return; - } - - auto screenPos = sourceScreenPos; - Sub6E1F34UpdateScreenCoordsAndButtonsPressed(false, screenPos); - - // Path bits - constexpr auto flags = EnumsToFlags(ViewportInteractionItem::Footpath, ViewportInteractionItem::FootpathItem); - auto info = get_map_coordinates_from_pos(screenPos, flags); - gridPos = info.Loc; - - if (info.SpriteType == ViewportInteractionItem::None) - { - gridPos.SetNull(); - return; - } - - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) - { - VirtualFloorSetHeight(gSceneryPlaceZ); - } - - *outZ = info.Element->GetBaseZ(); -} - -static void Sub6E1F34Wall( - const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outEdges) -{ - rct_window* w = window_find_by_class(WindowClass::Scenery); - - if (w == nullptr) - { - gridPos.SetNull(); - return; - } - - auto screenPos = sourceScreenPos; - uint16_t maxPossibleHeight = ZoomLevel::max().ApplyTo(std::numeric_limits::max() - 32); - - auto* wallEntry = GetWallEntry(sceneryIndex); - if (wallEntry != nullptr) - { - maxPossibleHeight -= wallEntry->height; - } - - Sub6E1F34UpdateScreenCoordsAndButtonsPressed(true, screenPos); - - // Walls - uint8_t edge; - // If CTRL not pressed - if (!gSceneryCtrlPressed) - { - auto gridCoords = screen_get_map_xy_side(screenPos, &edge); - if (!gridCoords.has_value()) + if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) { - gridPos.SetNull(); + VirtualFloorSetHeight(gSceneryPlaceZ); + } + + *outDirection = rotation; + *outZ = z; + } + + /** + * + * rct2: 0x006E2CC6 + */ + void SceneryToolDown(const ScreenCoordsXY& screenCoords, WidgetIndex widgetIndex) + { + SceneryRemoveGhostToolPlacement(); + if (gWindowSceneryPaintEnabled & 1) + { + RepaintSceneryToolDown(screenCoords, widgetIndex); return; } - gridPos = gridCoords.value(); - gSceneryPlaceZ = 0; - - // If SHIFT pressed - if (gSceneryShiftPressed) + if (gWindowSceneryEyedropperEnabled) { - auto* surfaceElement = MapGetSurfaceElementAt(gridPos); - - if (surfaceElement == nullptr) - { - gridPos.SetNull(); - return; - } - - int16_t z = (surfaceElement->GetBaseZ()) & 0xFFF0; - z += gSceneryShiftPressZOffset; - - z = std::clamp(z, 16, maxPossibleHeight); - - gSceneryPlaceZ = z; - } - } - else - { - int16_t z = gSceneryCtrlPressZ; - auto mapCoords = screen_get_map_xy_side_with_z(screenPos, z, &edge); - if (!mapCoords.has_value()) - { - gridPos.SetNull(); + SceneryEyedropperToolDown(screenCoords, widgetIndex); return; } - gridPos = mapCoords.value(); - // If SHIFT pressed - if (gSceneryShiftPressed) + auto selectedTab = WindowSceneryGetTabSelection(); + uint8_t sceneryType = selectedTab.SceneryType; + uint16_t selectedScenery = selectedTab.EntryIndex; + CoordsXY gridPos; + + switch (sceneryType) { - z += gSceneryShiftPressZOffset; - } - - z = std::clamp(z, 16, maxPossibleHeight); - - gSceneryPlaceZ = z; - } - - if (gridPos.IsNull()) - return; - - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) - { - VirtualFloorSetHeight(gSceneryPlaceZ); - } - - *outEdges = edge; -} - -static void Sub6E1F34LargeScenery( - const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, Direction* outDirection) -{ - rct_window* w = window_find_by_class(WindowClass::Scenery); - - if (w == nullptr) - { - gridPos.SetNull(); - return; - } - - auto screenPos = sourceScreenPos; - uint16_t maxPossibleHeight = ZoomLevel::max().ApplyTo(std::numeric_limits::max() - 32); - - auto* sceneryEntry = GetLargeSceneryEntry(sceneryIndex); - if (sceneryEntry) - { - int16_t maxClearZ = 0; - for (int32_t i = 0; sceneryEntry->tiles[i].x_offset != -1; ++i) - { - maxClearZ = std::max(maxClearZ, sceneryEntry->tiles[i].z_clearance); - } - maxPossibleHeight = std::max(0, maxPossibleHeight - maxClearZ); - } - - Sub6E1F34UpdateScreenCoordsAndButtonsPressed(true, screenPos); - - // Large scenery - // If CTRL not pressed - if (!gSceneryCtrlPressed) - { - const CoordsXY mapCoords = ViewportInteractionGetTileStartAtCursor(screenPos); - gridPos = mapCoords; - - if (gridPos.IsNull()) - return; - - gSceneryPlaceZ = 0; - - // If SHIFT pressed - if (gSceneryShiftPressed) - { - auto* surfaceElement = MapGetSurfaceElementAt(gridPos); - - if (surfaceElement == nullptr) + case SCENERY_TYPE_SMALL: { - gridPos.SetNull(); - return; - } + uint8_t quadrant; + Direction rotation; + Sub6E1F34SmallScenery(screenCoords, selectedScenery, gridPos, &quadrant, &rotation); + if (gridPos.IsNull()) + return; - int16_t z = (surfaceElement->GetBaseZ()) & 0xFFF0; - z += gSceneryShiftPressZOffset; - - z = std::clamp(z, 16, maxPossibleHeight); - - gSceneryPlaceZ = z; - } - } - else - { - int16_t z = gSceneryCtrlPressZ; - auto coords = screen_get_map_xy_with_z(screenPos, z); - if (coords.has_value()) - { - gridPos = *coords; - } - else - { - gridPos.SetNull(); - } - - // If SHIFT pressed - if (gSceneryShiftPressed) - { - z += gSceneryShiftPressZOffset; - } - - z = std::clamp(z, 16, maxPossibleHeight); - - gSceneryPlaceZ = z; - } - - if (gridPos.IsNull()) - return; - - gridPos = gridPos.ToTileStart(); - - Direction rotation = gWindowSceneryRotation; - rotation -= get_current_rotation(); - rotation &= 0x3; - - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) - { - VirtualFloorSetHeight(gSceneryPlaceZ); - } - - *outDirection = rotation; -} - -static void Sub6E1F34Banner( - const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ, - Direction* outDirection) -{ - rct_window* w = window_find_by_class(WindowClass::Scenery); - - if (w == nullptr) - { - gridPos.SetNull(); - return; - } - - auto screenPos = sourceScreenPos; - Sub6E1F34UpdateScreenCoordsAndButtonsPressed(false, screenPos); - - // Banner - constexpr auto flags = EnumsToFlags(ViewportInteractionItem::Footpath, ViewportInteractionItem::FootpathItem); - auto info = get_map_coordinates_from_pos(screenPos, flags); - gridPos = info.Loc; - - if (info.SpriteType == ViewportInteractionItem::None) - { - gridPos.SetNull(); - return; - } - - uint8_t rotation = gWindowSceneryRotation; - rotation -= get_current_rotation(); - rotation &= 0x3; - - auto z = info.Element->GetBaseZ(); - - if (info.Element->AsPath()->IsSloped()) - { - if (rotation != DirectionReverse(info.Element->AsPath()->GetSlopeDirection())) - { - z += (2 * COORDS_Z_STEP); - } - } - - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) - { - VirtualFloorSetHeight(gSceneryPlaceZ); - } - - *outDirection = rotation; - *outZ = z; -} - -/** - * - * rct2: 0x006E2CC6 - */ -static void WindowTopToolbarSceneryToolDown(const ScreenCoordsXY& windowPos, rct_window* w, WidgetIndex widgetIndex) -{ - SceneryRemoveGhostToolPlacement(); - if (gWindowSceneryPaintEnabled & 1) - { - RepaintSceneryToolDown(windowPos, widgetIndex); - return; - } - - if (gWindowSceneryEyedropperEnabled) - { - SceneryEyedropperToolDown(windowPos, widgetIndex); - return; - } - - auto selectedTab = WindowSceneryGetTabSelection(); - uint8_t sceneryType = selectedTab.SceneryType; - uint16_t selectedScenery = selectedTab.EntryIndex; - CoordsXY gridPos; - - switch (sceneryType) - { - case SCENERY_TYPE_SMALL: - { - uint8_t quadrant; - Direction rotation; - Sub6E1F34SmallScenery(windowPos, selectedScenery, gridPos, &quadrant, &rotation); - if (gridPos.IsNull()) - return; - - int32_t quantity = 1; - bool isCluster = gWindowSceneryScatterEnabled - && (network_get_mode() != NETWORK_MODE_CLIENT - || network_can_perform_command(network_get_current_player_group_index(), -2)); - - if (isCluster) - { - switch (gWindowSceneryScatterDensity) - { - case ScatterToolDensity::LowDensity: - quantity = gWindowSceneryScatterSize; - break; - - case ScatterToolDensity::MediumDensity: - quantity = gWindowSceneryScatterSize * 2; - break; - - case ScatterToolDensity::HighDensity: - quantity = gWindowSceneryScatterSize * 3; - break; - } - } - - bool forceError = true; - for (int32_t q = 0; q < quantity; q++) - { - int32_t zCoordinate = gSceneryPlaceZ; - auto* sceneryEntry = GetSmallSceneryEntry(selectedScenery); - - int16_t cur_grid_x = gridPos.x; - int16_t cur_grid_y = gridPos.y; + int32_t quantity = 1; + bool isCluster = gWindowSceneryScatterEnabled + && (NetworkGetMode() != NETWORK_MODE_CLIENT + || NetworkCanPerformCommand(NetworkGetCurrentPlayerGroupIndex(), -2)); if (isCluster) { - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) + switch (gWindowSceneryScatterDensity) { - quadrant = util_rand() & 3; - } + case ScatterToolDensity::LowDensity: + quantity = gWindowSceneryScatterSize; + break; - int16_t grid_x_offset = (util_rand() % gWindowSceneryScatterSize) - (gWindowSceneryScatterSize / 2); - int16_t grid_y_offset = (util_rand() % gWindowSceneryScatterSize) - (gWindowSceneryScatterSize / 2); - if (gWindowSceneryScatterSize % 2 == 0) - { - grid_x_offset += 1; - grid_y_offset += 1; - } - cur_grid_x += grid_x_offset * COORDS_XY_STEP; - cur_grid_y += grid_y_offset * COORDS_XY_STEP; + case ScatterToolDensity::MediumDensity: + quantity = gWindowSceneryScatterSize * 2; + break; - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) - { - gSceneryPlaceRotation = (gSceneryPlaceRotation + 1) & 3; + case ScatterToolDensity::HighDensity: + quantity = gWindowSceneryScatterSize * 3; + break; } } + bool forceError = true; + for (int32_t q = 0; q < quantity; q++) + { + int32_t zCoordinate = gSceneryPlaceZ; + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(selectedScenery); + + int16_t cur_grid_x = gridPos.x; + int16_t cur_grid_y = gridPos.y; + + if (isCluster) + { + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) + { + quadrant = UtilRand() & 3; + } + + int16_t grid_x_offset = (UtilRand() % gWindowSceneryScatterSize) - (gWindowSceneryScatterSize / 2); + int16_t grid_y_offset = (UtilRand() % gWindowSceneryScatterSize) - (gWindowSceneryScatterSize / 2); + if (gWindowSceneryScatterSize % 2 == 0) + { + grid_x_offset += 1; + grid_y_offset += 1; + } + cur_grid_x += grid_x_offset * COORDS_XY_STEP; + cur_grid_y += grid_y_offset * COORDS_XY_STEP; + + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ROTATABLE)) + { + gSceneryPlaceRotation = (gSceneryPlaceRotation + 1) & 3; + } + } + + uint8_t zAttemptRange = 1; + if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) + { + zAttemptRange = 20; + } + + auto success = GameActions::Status::Unknown; + // Try find a valid z coordinate + for (; zAttemptRange != 0; zAttemptRange--) + { + auto smallSceneryPlaceAction = SmallSceneryPlaceAction( + { cur_grid_x, cur_grid_y, gSceneryPlaceZ, gSceneryPlaceRotation }, quadrant, selectedScenery, + gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + auto res = GameActions::Query(&smallSceneryPlaceAction); + success = res.Error; + if (res.Error == GameActions::Status::Ok) + { + break; + } + + if (res.Error == GameActions::Status::InsufficientFunds) + { + break; + } + if (zAttemptRange != 1) + { + gSceneryPlaceZ += 8; + } + } + + // Actually place + if (success == GameActions::Status::Ok || ((q + 1 == quantity) && forceError)) + { + auto smallSceneryPlaceAction = SmallSceneryPlaceAction( + { cur_grid_x, cur_grid_y, gSceneryPlaceZ, gSceneryPlaceRotation }, quadrant, selectedScenery, + gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + smallSceneryPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { + if (result->Error == GameActions::Status::Ok) + { + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); + } + }); + auto res = GameActions::Execute(&smallSceneryPlaceAction); + if (res.Error == GameActions::Status::Ok) + { + forceError = false; + } + + if (res.Error == GameActions::Status::InsufficientFunds) + { + break; + } + } + gSceneryPlaceZ = zCoordinate; + } + break; + } + case SCENERY_TYPE_PATH_ITEM: + { + int32_t z; + Sub6E1F34PathItem(screenCoords, selectedScenery, gridPos, &z); + if (gridPos.IsNull()) + return; + + auto footpathAdditionPlaceAction = FootpathAdditionPlaceAction({ gridPos, z }, selectedScenery + 1); + + footpathAdditionPlaceAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { + if (result->Error != GameActions::Status::Ok) + { + return; + } + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); + }); + auto res = GameActions::Execute(&footpathAdditionPlaceAction); + break; + } + case SCENERY_TYPE_WALL: + { + uint8_t edges; + Sub6E1F34Wall(screenCoords, selectedScenery, gridPos, &edges); + if (gridPos.IsNull()) + return; + uint8_t zAttemptRange = 1; if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) { zAttemptRange = 20; } - auto success = GameActions::Status::Unknown; - // Try find a valid z coordinate for (; zAttemptRange != 0; zAttemptRange--) { - auto smallSceneryPlaceAction = SmallSceneryPlaceAction( - { cur_grid_x, cur_grid_y, gSceneryPlaceZ, gSceneryPlaceRotation }, quadrant, selectedScenery, - gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - auto res = GameActions::Query(&smallSceneryPlaceAction); - success = res.Error; + auto wallPlaceAction = WallPlaceAction( + selectedScenery, { gridPos, gSceneryPlaceZ }, edges, gWindowSceneryPrimaryColour, + gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); + + auto res = GameActions::Query(&wallPlaceAction); if (res.Error == GameActions::Status::Ok) { break; } - if (res.Error == GameActions::Status::InsufficientFunds) + if (const auto* message = std::get_if(&res.ErrorMessage)) { - break; + if (*message == STR_NOT_ENOUGH_CASH_REQUIRES || *message == STR_CAN_ONLY_BUILD_THIS_ON_WATER) + { + break; + } } + if (zAttemptRange != 1) { gSceneryPlaceZ += 8; } } - // Actually place - if (success == GameActions::Status::Ok || ((q + 1 == quantity) && forceError)) - { - auto smallSceneryPlaceAction = SmallSceneryPlaceAction( - { cur_grid_x, cur_grid_y, gSceneryPlaceZ, gSceneryPlaceRotation }, quadrant, selectedScenery, - gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - smallSceneryPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { - if (result->Error == GameActions::Status::Ok) - { - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); - } - }); - auto res = GameActions::Execute(&smallSceneryPlaceAction); - if (res.Error == GameActions::Status::Ok) - { - forceError = false; - } - - if (res.Error == GameActions::Status::InsufficientFunds) - { - break; - } - } - gSceneryPlaceZ = zCoordinate; - } - break; - } - case SCENERY_TYPE_PATH_ITEM: - { - int32_t z; - Sub6E1F34PathItem(windowPos, selectedScenery, gridPos, &z); - if (gridPos.IsNull()) - return; - - auto footpathAdditionPlaceAction = FootpathAdditionPlaceAction({ gridPos, z }, selectedScenery + 1); - - footpathAdditionPlaceAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { - if (result->Error != GameActions::Status::Ok) - { - return; - } - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); - }); - auto res = GameActions::Execute(&footpathAdditionPlaceAction); - break; - } - case SCENERY_TYPE_WALL: - { - uint8_t edges; - Sub6E1F34Wall(windowPos, selectedScenery, gridPos, &edges); - if (gridPos.IsNull()) - return; - - uint8_t zAttemptRange = 1; - if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) - { - zAttemptRange = 20; - } - - for (; zAttemptRange != 0; zAttemptRange--) - { auto wallPlaceAction = WallPlaceAction( selectedScenery, { gridPos, gSceneryPlaceZ }, edges, gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - auto res = GameActions::Query(&wallPlaceAction); - if (res.Error == GameActions::Status::Ok) + wallPlaceAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { + if (result->Error == GameActions::Status::Ok) + { + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); + } + }); + auto res = GameActions::Execute(&wallPlaceAction); + break; + } + case SCENERY_TYPE_LARGE: + { + Direction direction; + Sub6E1F34LargeScenery(screenCoords, selectedScenery, gridPos, &direction); + if (gridPos.IsNull()) + return; + + uint8_t zAttemptRange = 1; + if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) { - break; + zAttemptRange = 20; } - if (const auto* message = std::get_if(&res.ErrorMessage)) + for (; zAttemptRange != 0; zAttemptRange--) { - if (*message == STR_NOT_ENOUGH_CASH_REQUIRES || *message == STR_CAN_ONLY_BUILD_THIS_ON_WATER) + CoordsXYZD loc = { gridPos, gSceneryPlaceZ, direction }; + + auto sceneryPlaceAction = LargeSceneryPlaceAction( + loc, selectedScenery, gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, + gWindowSceneryTertiaryColour); + + auto res = GameActions::Query(&sceneryPlaceAction); + if (res.Error == GameActions::Status::Ok) { break; } + + if (const auto* message = std::get_if(&res.ErrorMessage)) + { + if (*message == STR_NOT_ENOUGH_CASH_REQUIRES || *message == STR_CAN_ONLY_BUILD_THIS_ON_WATER) + { + break; + } + } + + if (zAttemptRange != 1) + { + gSceneryPlaceZ += 8; + } } - if (zAttemptRange != 1) - { - gSceneryPlaceZ += 8; - } - } - - auto wallPlaceAction = WallPlaceAction( - selectedScenery, { gridPos, gSceneryPlaceZ }, edges, gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, - gWindowSceneryTertiaryColour); - - wallPlaceAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { - if (result->Error == GameActions::Status::Ok) - { - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); - } - }); - auto res = GameActions::Execute(&wallPlaceAction); - break; - } - case SCENERY_TYPE_LARGE: - { - Direction direction; - Sub6E1F34LargeScenery(windowPos, selectedScenery, gridPos, &direction); - if (gridPos.IsNull()) - return; - - uint8_t zAttemptRange = 1; - if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) - { - zAttemptRange = 20; - } - - for (; zAttemptRange != 0; zAttemptRange--) - { CoordsXYZD loc = { gridPos, gSceneryPlaceZ, direction }; auto sceneryPlaceAction = LargeSceneryPlaceAction( loc, selectedScenery, gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - auto res = GameActions::Query(&sceneryPlaceAction); - if (res.Error == GameActions::Status::Ok) - { - break; - } - - if (const auto* message = std::get_if(&res.ErrorMessage)) - { - if (*message == STR_NOT_ENOUGH_CASH_REQUIRES || *message == STR_CAN_ONLY_BUILD_THIS_ON_WATER) + sceneryPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { + if (result->Error == GameActions::Status::Ok) { - break; + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); } - } - - if (zAttemptRange != 1) - { - gSceneryPlaceZ += 8; - } + else + { + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::Error, { loc.x, loc.y, gSceneryPlaceZ }); + } + }); + auto res = GameActions::Execute(&sceneryPlaceAction); + break; } + case SCENERY_TYPE_BANNER: + { + int32_t z; + Direction direction; + Sub6E1F34Banner(screenCoords, selectedScenery, gridPos, &z, &direction); + if (gridPos.IsNull()) + return; - CoordsXYZD loc = { gridPos, gSceneryPlaceZ, direction }; + CoordsXYZD loc{ gridPos, z, direction }; + auto primaryColour = gWindowSceneryPrimaryColour; + auto bannerPlaceAction = BannerPlaceAction(loc, selectedScenery, primaryColour); + bannerPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { + if (result->Error == GameActions::Status::Ok) + { + auto data = result->GetData(); + OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); + ContextOpenDetailWindow(WD_BANNER, data.bannerId.ToUnderlying()); + } + }); + GameActions::Execute(&bannerPlaceAction); + break; + } + } + } - auto sceneryPlaceAction = LargeSceneryPlaceAction( - loc, selectedScenery, gWindowSceneryPrimaryColour, gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - sceneryPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { - if (result->Error == GameActions::Status::Ok) + ClearAction GetClearAction() + { + auto range = MapRange(gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y); + + ClearableItems itemsToClear = 0; + + if (gClearSmallScenery) + itemsToClear |= CLEARABLE_ITEMS::SCENERY_SMALL; + if (gClearLargeScenery) + itemsToClear |= CLEARABLE_ITEMS::SCENERY_LARGE; + if (gClearFootpath) + itemsToClear |= CLEARABLE_ITEMS::SCENERY_FOOTPATH; + + return ClearAction(range, itemsToClear); + } + +public: + void OnMouseUp(WidgetIndex widgetIndex) override + { + WindowBase* mainWindow; + + switch (widgetIndex) + { + case WIDX_PAUSE: + if (NetworkGetMode() != NETWORK_MODE_CLIENT) { - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); + auto pauseToggleAction = PauseToggleAction(); + GameActions::Execute(&pauseToggleAction); + } + break; + case WIDX_ZOOM_OUT: + if ((mainWindow = WindowGetMain()) != nullptr) + WindowZoomOut(*mainWindow, false); + break; + case WIDX_ZOOM_IN: + if ((mainWindow = WindowGetMain()) != nullptr) + WindowZoomIn(*mainWindow, false); + break; + case WIDX_CLEAR_SCENERY: + ToggleClearSceneryWindow(WIDX_CLEAR_SCENERY); + break; + case WIDX_LAND: + ToggleLandWindow(WIDX_LAND); + break; + case WIDX_WATER: + ToggleWaterWindow(WIDX_WATER); + break; + case WIDX_SCENERY: + if (!ToolSet(*this, WIDX_SCENERY, Tool::Arrow)) + { + InputSetFlag(INPUT_FLAG_6, true); + ContextOpenWindow(WindowClass::Scenery); + } + break; + case WIDX_PATH: + ToggleFootpathWindow(); + break; + case WIDX_CONSTRUCT_RIDE: + ContextOpenWindow(WindowClass::ConstructRide); + break; + case WIDX_RIDES: + ContextOpenWindow(WindowClass::RideList); + break; + case WIDX_PARK: + ContextOpenWindow(WindowClass::ParkInformation); + break; + case WIDX_STAFF: + ContextOpenWindow(WindowClass::StaffList); + break; + case WIDX_GUESTS: + ContextOpenWindow(WindowClass::GuestList); + break; + case WIDX_FINANCES: + ContextOpenWindow(WindowClass::Finances); + break; + case WIDX_RESEARCH: + ContextOpenWindow(WindowClass::Research); + break; + case WIDX_NEWS: + ContextOpenWindow(WindowClass::RecentNews); + break; + case WIDX_MUTE: + OpenRCT2::Audio::ToggleAllSounds(); + break; + case WIDX_CHAT: + if (ChatAvailable()) + { + ChatToggle(); } else { - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::Error, { loc.x, loc.y, gSceneryPlaceZ }); + ContextShowError(STR_CHAT_UNAVAILABLE, STR_NONE, {}); } - }); - auto res = GameActions::Execute(&sceneryPlaceAction); - break; + break; } - case SCENERY_TYPE_BANNER: - { - int32_t z; - Direction direction; - Sub6E1F34Banner(windowPos, selectedScenery, gridPos, &z, &direction); - if (gridPos.IsNull()) - return; + } - CoordsXYZD loc{ gridPos, z, direction }; - auto primaryColour = gWindowSceneryPrimaryColour; - auto bannerPlaceAction = BannerPlaceAction(loc, selectedScenery, primaryColour); - bannerPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { - if (result->Error == GameActions::Status::Ok) + void OnMouseDown(WidgetIndex widgetIndex) override + { + int32_t numItems = 0; + Widget& widget = widgets[widgetIndex]; + + switch (widgetIndex) + { + case WIDX_FILE_MENU: + if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) { - auto data = result->GetData(); - OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, result->Position); - ContextOpenDetailWindow(WD_BANNER, data.bannerId.ToUnderlying()); + 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_FILE_BUG_ON_GITHUB; + + if (OpenRCT2::GetContext()->HasNewVersionInfo()) + gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + + gDropdownItems[numItems++].Format = STR_EMPTY; + + if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + gDropdownItems[numItems++].Format = STR_QUIT_ROLLERCOASTER_DESIGNER; + else + gDropdownItems[numItems++].Format = STR_QUIT_TRACK_DESIGNS_MANAGER; + + gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; } - }); - GameActions::Execute(&bannerPlaceAction); - break; - } - } -} - -static uint8_t TopToolbarToolUpdateLandPaint(const ScreenCoordsXY& screenPos) -{ - uint8_t state_changed = 0; - - MapInvalidateSelectionRect(); - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - - auto mapTile = screen_get_map_xy(screenPos, nullptr); - - if (!mapTile.has_value()) - { - if (gClearSceneryCost != MONEY64_UNDEFINED) - { - gClearSceneryCost = MONEY64_UNDEFINED; - window_invalidate_by_class(WindowClass::ClearScenery); - } - return state_changed; - } - - if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - { - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - state_changed++; - } - - if (gMapSelectType != MAP_SELECT_TYPE_FULL) - { - gMapSelectType = MAP_SELECT_TYPE_FULL; - state_changed++; - } - - int16_t tool_size = std::max(1, gLandToolSize); - int16_t tool_length = (tool_size - 1) * 32; - - // Move to tool bottom left - mapTile->x -= (tool_size - 1) * 16; - mapTile->y -= (tool_size - 1) * 16; - mapTile = mapTile->ToTileStart(); - - if (gMapSelectPositionA.x != mapTile->x) - { - gMapSelectPositionA.x = mapTile->x; - state_changed++; - } - - if (gMapSelectPositionA.y != mapTile->y) - { - gMapSelectPositionA.y = mapTile->y; - state_changed++; - } - - mapTile->x += tool_length; - mapTile->y += tool_length; - - if (gMapSelectPositionB.x != mapTile->x) - { - gMapSelectPositionB.x = mapTile->x; - state_changed++; - } - - if (gMapSelectPositionB.y != mapTile->y) - { - gMapSelectPositionB.y = mapTile->y; - state_changed++; - } - - MapInvalidateSelectionRect(); - return state_changed; -} - -/** - * - * rct2: 0x0068E213 - */ -static void TopToolbarToolUpdateSceneryClear(const ScreenCoordsXY& screenPos) -{ - if (!TopToolbarToolUpdateLandPaint(screenPos)) - return; - - auto action = GetClearAction(); - auto result = GameActions::Query(&action); - auto cost = (result.Error == GameActions::Status::Ok ? result.Cost : MONEY64_UNDEFINED); - if (gClearSceneryCost != cost) - { - gClearSceneryCost = cost; - window_invalidate_by_class(WindowClass::ClearScenery); - } -} - -/** - * - * rct2: 0x00664280 - */ -static void TopToolbarToolUpdateLand(const ScreenCoordsXY& screenPos) -{ - const bool mapCtrlPressed = InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER_COPY_Z); - - MapInvalidateSelectionRect(); - - if (gCurrentToolId == Tool::UpDownArrow) - { - if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - return; - - money64 lower_cost = SelectionLowerLand(0); - money64 raise_cost = SelectionRaiseLand(0); - - if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) - { - gLandToolRaiseCost = raise_cost; - gLandToolLowerCost = lower_cost; - window_invalidate_by_class(WindowClass::Land); - } - return; - } - - int16_t tool_size = gLandToolSize; - std::optional mapTile; - uint8_t side{}; - - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - if (tool_size == 1) - { - int32_t selectionType; - // Get selection type and map coordinates from mouse x,y position - screen_pos_to_map_pos(screenPos, &selectionType); - mapTile = screen_get_map_xy_side(screenPos, &side); - - if (!mapTile.has_value()) - { - money64 lower_cost = MONEY64_UNDEFINED; - money64 raise_cost = MONEY64_UNDEFINED; - - if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) - { - gLandToolRaiseCost = raise_cost; - gLandToolLowerCost = lower_cost; - window_invalidate_by_class(WindowClass::Land); - } - return; - } - - uint8_t state_changed = 0; - - if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - { - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - state_changed++; - } - - if (gMapSelectType != selectionType) - { - gMapSelectType = selectionType; - state_changed++; - } - - if ((gMapSelectType != MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF)) && mapCtrlPressed) - { - gMapSelectType = MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF); - state_changed++; - } - - if (gMapSelectPositionA.x != mapTile->x) - { - gMapSelectPositionA.x = mapTile->x; - state_changed++; - } - - if (gMapSelectPositionA.y != mapTile->y) - { - gMapSelectPositionA.y = mapTile->y; - state_changed++; - } - - if (gMapSelectPositionB.x != mapTile->x) - { - gMapSelectPositionB.x = mapTile->x; - state_changed++; - } - - if (gMapSelectPositionB.y != mapTile->y) - { - gMapSelectPositionB.y = mapTile->y; - state_changed++; - } - - MapInvalidateSelectionRect(); - if (!state_changed) - return; - - money64 lower_cost = SelectionLowerLand(0); - money64 raise_cost = SelectionRaiseLand(0); - - if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) - { - gLandToolRaiseCost = raise_cost; - gLandToolLowerCost = lower_cost; - window_invalidate_by_class(WindowClass::Land); - } - return; - } - - // Get map coordinates and the side of the tile that is being hovered over - mapTile = screen_get_map_xy_side(screenPos, &side); - - if (!mapTile.has_value()) - { - money64 lower_cost = MONEY64_UNDEFINED; - money64 raise_cost = MONEY64_UNDEFINED; - - if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) - { - gLandToolRaiseCost = raise_cost; - gLandToolLowerCost = lower_cost; - window_invalidate_by_class(WindowClass::Land); - } - return; - } - - uint8_t state_changed = 0; - - if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - { - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - state_changed++; - } - - if (gMapSelectType != MAP_SELECT_TYPE_FULL) - { - gMapSelectType = MAP_SELECT_TYPE_FULL; - state_changed++; - } - - if ((gMapSelectType != MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF)) && mapCtrlPressed) - { - gMapSelectType = MAP_SELECT_TYPE_EDGE_0 + (side & 0xFF); - state_changed++; - } - - if (tool_size == 0) - tool_size = 1; - - int16_t tool_length = (tool_size - 1) * 32; - - // Decide on shape of the brush for bigger selection size - switch (gMapSelectType) - { - case MAP_SELECT_TYPE_EDGE_0: - case MAP_SELECT_TYPE_EDGE_2: - // Line - mapTile->y -= (tool_size - 1) * 16; - mapTile->y = mapTile->ToTileStart().y; - break; - case MAP_SELECT_TYPE_EDGE_1: - case MAP_SELECT_TYPE_EDGE_3: - // Line - mapTile->x -= (tool_size - 1) * 16; - mapTile->x = mapTile->ToTileStart().x; - break; - default: - // Move to tool bottom left - mapTile->x -= (tool_size - 1) * 16; - mapTile->y -= (tool_size - 1) * 16; - mapTile = mapTile->ToTileStart(); - break; - } - - if (gMapSelectPositionA.x != mapTile->x) - { - gMapSelectPositionA.x = mapTile->x; - state_changed++; - } - - if (gMapSelectPositionA.y != mapTile->y) - { - gMapSelectPositionA.y = mapTile->y; - state_changed++; - } - - // Go to other side - switch (gMapSelectType) - { - case MAP_SELECT_TYPE_EDGE_0: - case MAP_SELECT_TYPE_EDGE_2: - // Line - mapTile->y += tool_length; - gMapSelectType = MAP_SELECT_TYPE_FULL; - break; - case MAP_SELECT_TYPE_EDGE_1: - case MAP_SELECT_TYPE_EDGE_3: - // Line - mapTile->x += tool_length; - gMapSelectType = MAP_SELECT_TYPE_FULL; - break; - default: - mapTile->x += tool_length; - mapTile->y += tool_length; - break; - } - - if (gMapSelectPositionB.x != mapTile->x) - { - gMapSelectPositionB.x = mapTile->x; - state_changed++; - } - - if (gMapSelectPositionB.y != mapTile->y) - { - gMapSelectPositionB.y = mapTile->y; - state_changed++; - } - - MapInvalidateSelectionRect(); - if (!state_changed) - return; - - money64 lower_cost = SelectionLowerLand(0); - money64 raise_cost = SelectionRaiseLand(0); - - if (gLandToolRaiseCost != raise_cost || gLandToolLowerCost != lower_cost) - { - gLandToolRaiseCost = raise_cost; - gLandToolLowerCost = lower_cost; - window_invalidate_by_class(WindowClass::Land); - } -} - -/** - * - * rct2: 0x006E6BDC - */ -static void TopToolbarToolUpdateWater(const ScreenCoordsXY& screenPos) -{ - MapInvalidateSelectionRect(); - - if (gCurrentToolId == Tool::UpDownArrow) - { - if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - return; - - auto waterLowerAction = WaterLowerAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); - auto waterRaiseAction = WaterRaiseAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); - - auto res = GameActions::Query(&waterLowerAction); - money64 lowerCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; - - res = GameActions::Query(&waterRaiseAction); - money64 raiseCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; - - if (gWaterToolRaiseCost != raiseCost || gWaterToolLowerCost != lowerCost) - { - gWaterToolRaiseCost = raiseCost; - gWaterToolLowerCost = lowerCost; - window_invalidate_by_class(WindowClass::Water); - } - return; - } - - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - - auto info = get_map_coordinates_from_pos( - screenPos, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Water)); - - if (info.SpriteType == ViewportInteractionItem::None) - { - if (gWaterToolRaiseCost != MONEY64_UNDEFINED || gWaterToolLowerCost != MONEY64_UNDEFINED) - { - gWaterToolRaiseCost = MONEY64_UNDEFINED; - gWaterToolLowerCost = MONEY64_UNDEFINED; - window_invalidate_by_class(WindowClass::Water); - } - return; - } - - auto mapTile = info.Loc.ToTileCentre(); - - uint8_t state_changed = 0; - - if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - { - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - state_changed++; - } - - if (gMapSelectType != MAP_SELECT_TYPE_FULL_WATER) - { - gMapSelectType = MAP_SELECT_TYPE_FULL_WATER; - state_changed++; - } - - int16_t tool_size = std::max(1, gLandToolSize); - int16_t tool_length = (tool_size - 1) * 32; - - // Move to tool bottom left - mapTile.x -= (tool_size - 1) * 16; - mapTile.y -= (tool_size - 1) * 16; - mapTile.x &= 0xFFE0; - mapTile.y &= 0xFFE0; - - if (gMapSelectPositionA.x != mapTile.x) - { - gMapSelectPositionA.x = mapTile.x; - state_changed++; - } - - if (gMapSelectPositionA.y != mapTile.y) - { - gMapSelectPositionA.y = mapTile.y; - state_changed++; - } - - mapTile.x += tool_length; - mapTile.y += tool_length; - - if (gMapSelectPositionB.x != mapTile.x) - { - gMapSelectPositionB.x = mapTile.x; - state_changed++; - } - - if (gMapSelectPositionB.y != mapTile.y) - { - gMapSelectPositionB.y = mapTile.y; - state_changed++; - } - - MapInvalidateSelectionRect(); - if (!state_changed) - return; - - auto waterLowerAction = WaterLowerAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); - auto waterRaiseAction = WaterRaiseAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); - - auto res = GameActions::Query(&waterLowerAction); - money64 lowerCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; - - res = GameActions::Query(&waterRaiseAction); - money64 raiseCost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; - - if (gWaterToolRaiseCost != raiseCost || gWaterToolLowerCost != lowerCost) - { - gWaterToolRaiseCost = raiseCost; - gWaterToolLowerCost = lowerCost; - window_invalidate_by_class(WindowClass::Water); - } -} - -/** - * - * rct2: 0x006E24F6 - * On failure returns MONEY64_UNDEFINED - * On success places ghost scenery and returns cost to place proper - */ -static money64 TryPlaceGhostSmallScenery( - CoordsXYZD loc, uint8_t quadrant, ObjectEntryIndex entryIndex, colour_t primaryColour, colour_t secondaryColour, - colour_t tertiaryColour) -{ - SceneryRemoveGhostToolPlacement(); - - // 6e252b - auto smallSceneryPlaceAction = SmallSceneryPlaceAction( - loc, quadrant, entryIndex, primaryColour, secondaryColour, tertiaryColour); - smallSceneryPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); - auto res = GameActions::Execute(&smallSceneryPlaceAction); - if (res.Error != GameActions::Status::Ok) - return MONEY64_UNDEFINED; - - const auto placementData = res.GetData(); - - gSceneryPlaceRotation = loc.direction; - gSceneryPlaceObject.SceneryType = SCENERY_TYPE_SMALL; - gSceneryPlaceObject.EntryIndex = entryIndex; - - gSceneryGhostPosition = { loc, placementData.BaseHeight }; - gSceneryQuadrant = placementData.SceneryQuadrant; - if (placementData.GroundFlags & ELEMENT_IS_UNDERGROUND) - { - // Set underground on - viewport_set_visibility(4); - } - else - { - // Set underground off - viewport_set_visibility(5); - } - - gSceneryGhostType |= SCENERY_GHOST_FLAG_0; - return res.Cost; -} - -static money64 TryPlaceGhostPathAddition(CoordsXYZ loc, ObjectEntryIndex entryIndex) -{ - SceneryRemoveGhostToolPlacement(); - - // 6e265b - auto footpathAdditionPlaceAction = FootpathAdditionPlaceAction(loc, entryIndex + 1); - footpathAdditionPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); - footpathAdditionPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { - if (result->Error != GameActions::Status::Ok) - { - return; - } - gSceneryGhostPosition = loc; - gSceneryGhostType |= SCENERY_GHOST_FLAG_1; - }); - auto res = GameActions::Execute(&footpathAdditionPlaceAction); - if (res.Error != GameActions::Status::Ok) - return MONEY64_UNDEFINED; - - return res.Cost; -} - -static money64 TryPlaceGhostWall( - CoordsXYZ loc, uint8_t edge, ObjectEntryIndex entryIndex, colour_t primaryColour, colour_t secondaryColour, - colour_t tertiaryColour) -{ - SceneryRemoveGhostToolPlacement(); - - // 6e26b0 - auto wallPlaceAction = WallPlaceAction(entryIndex, loc, edge, primaryColour, secondaryColour, tertiaryColour); - wallPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND); - wallPlaceAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) { - if (result->Error != GameActions::Status::Ok) - return; - - const auto placementData = result->GetData(); - gSceneryGhostPosition = { loc, placementData.BaseHeight }; - gSceneryGhostWallRotation = edge; - - gSceneryGhostType |= SCENERY_GHOST_FLAG_2; - }); - - auto res = GameActions::Execute(&wallPlaceAction); - if (res.Error != GameActions::Status::Ok) - return MONEY64_UNDEFINED; - - return res.Cost; -} - -static money64 TryPlaceGhostLargeScenery( - CoordsXYZD loc, ObjectEntryIndex entryIndex, colour_t primaryColour, colour_t secondaryColour, colour_t tertiaryColour) -{ - SceneryRemoveGhostToolPlacement(); - - // 6e25a7 - auto sceneryPlaceAction = LargeSceneryPlaceAction(loc, entryIndex, primaryColour, secondaryColour, tertiaryColour); - sceneryPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND); - auto res = GameActions::Execute(&sceneryPlaceAction); - if (res.Error != GameActions::Status::Ok) - return MONEY64_UNDEFINED; - - const auto placementData = res.GetData(); - - gSceneryPlaceRotation = loc.direction; - - gSceneryGhostPosition = { loc, placementData.firstTileHeight }; - if (placementData.GroundFlags & ELEMENT_IS_UNDERGROUND) - { - // Set underground on - viewport_set_visibility(4); - } - else - { - // Set underground off - viewport_set_visibility(5); - } - - gSceneryGhostType |= SCENERY_GHOST_FLAG_3; - return res.Cost; -} - -static money64 TryPlaceGhostBanner(CoordsXYZD loc, ObjectEntryIndex entryIndex) -{ - SceneryRemoveGhostToolPlacement(); - - // 6e2612 - auto primaryColour = gWindowSceneryPrimaryColour; - auto bannerPlaceAction = BannerPlaceAction(loc, entryIndex, primaryColour); - bannerPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND); - auto res = GameActions::Execute(&bannerPlaceAction); - if (res.Error != GameActions::Status::Ok) - return MONEY64_UNDEFINED; - - gSceneryGhostPosition = loc; - gSceneryGhostPosition.z += PATH_HEIGHT_STEP; - gSceneryPlaceRotation = loc.direction; - gSceneryGhostType |= SCENERY_GHOST_FLAG_4; - return res.Cost; -} - -/** - * - * rct2: 0x006E287B - */ -static void TopToolbarToolUpdateScenery(const ScreenCoordsXY& screenPos) -{ - MapInvalidateSelectionRect(); - MapInvalidateMapSelectionTiles(); - - if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Off) - { - VirtualFloorInvalidate(); - } - - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; - - if (gWindowSceneryPaintEnabled) - return; - if (gWindowSceneryEyedropperEnabled) - return; - - const auto selection = WindowSceneryGetTabSelection(); - if (selection.IsUndefined()) - { - SceneryRemoveGhostToolPlacement(); - return; - } - - money64 cost = 0; - - switch (selection.SceneryType) - { - case SCENERY_TYPE_SMALL: - { - CoordsXY mapTile = {}; - uint8_t quadrant; - Direction rotation; - - Sub6E1F34SmallScenery(screenPos, selection.EntryIndex, mapTile, &quadrant, &rotation); - - if (mapTile.IsNull()) - { - SceneryRemoveGhostToolPlacement(); - return; - } - - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - if (gWindowSceneryScatterEnabled) - { - uint16_t cluster_size = (gWindowSceneryScatterSize - 1) * COORDS_XY_STEP; - gMapSelectPositionA.x = mapTile.x - cluster_size / 2; - gMapSelectPositionA.y = mapTile.y - cluster_size / 2; - gMapSelectPositionB.x = mapTile.x + cluster_size / 2; - gMapSelectPositionB.y = mapTile.y + cluster_size / 2; - if (gWindowSceneryScatterSize % 2 == 0) + else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { - gMapSelectPositionB.x += COORDS_XY_STEP; - gMapSelectPositionB.y += COORDS_XY_STEP; + gDropdownItems[numItems++].Format = STR_LOAD_LANDSCAPE; + 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_FILE_BUG_ON_GITHUB; + + if (OpenRCT2::GetContext()->HasNewVersionInfo()) + gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; + + gDropdownItems[numItems++].Format = STR_EMPTY; + gDropdownItems[numItems++].Format = STR_QUIT_SCENARIO_EDITOR; + gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; } - } - else - { - gMapSelectPositionA.x = mapTile.x; - gMapSelectPositionA.y = mapTile.y; - gMapSelectPositionB.x = mapTile.x; - gMapSelectPositionB.y = mapTile.y; - } + else + { + gDropdownItems[numItems++].Format = STR_NEW_GAME; + gDropdownItems[numItems++].Format = STR_LOAD_GAME; + 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_FILE_BUG_ON_GITHUB; - auto* sceneryEntry = GetSmallSceneryEntry(selection.EntryIndex); + if (OpenRCT2::GetContext()->HasNewVersionInfo()) + gDropdownItems[numItems++].Format = STR_UPDATE_AVAILABLE; - gMapSelectType = MAP_SELECT_TYPE_FULL; - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE) && !gWindowSceneryScatterEnabled) - { - gMapSelectType = MAP_SELECT_TYPE_QUARTER_0 + (quadrant ^ 2); - } + gDropdownItems[numItems++].Format = STR_EMPTY; + gDropdownItems[numItems++].Format = STR_QUIT_TO_MENU; + gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; + } - MapInvalidateSelectionRect(); - - // If no change in ghost placement - if ((gSceneryGhostType & SCENERY_GHOST_FLAG_0) && mapTile == gSceneryGhostPosition && quadrant == _unkF64F0E - && gSceneryPlaceZ == _unkF64F0A && gSceneryPlaceObject.SceneryType == SCENERY_TYPE_SMALL - && gSceneryPlaceObject.EntryIndex == selection.EntryIndex) - { - return; - } - - SceneryRemoveGhostToolPlacement(); - - _unkF64F0E = quadrant; - _unkF64F0A = gSceneryPlaceZ; - - uint8_t attemptsLeft = 1; - if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) - { - attemptsLeft = 20; - } - - for (; attemptsLeft != 0; attemptsLeft--) - { - cost = TryPlaceGhostSmallScenery( - { mapTile, gSceneryPlaceZ, rotation }, quadrant, selection.EntryIndex, gWindowSceneryPrimaryColour, - gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - if (cost != MONEY64_UNDEFINED) - break; - gSceneryPlaceZ += 8; - } - - gSceneryPlaceCost = cost; - break; - } - case SCENERY_TYPE_PATH_ITEM: - { - CoordsXY mapTile = {}; - int32_t z; - - Sub6E1F34PathItem(screenPos, selection.EntryIndex, mapTile, &z); - - if (mapTile.IsNull()) - { - SceneryRemoveGhostToolPlacement(); - return; - } - - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - gMapSelectPositionA.x = mapTile.x; - gMapSelectPositionA.y = mapTile.y; - gMapSelectPositionB.x = mapTile.x; - gMapSelectPositionB.y = mapTile.y; - gMapSelectType = MAP_SELECT_TYPE_FULL; - - MapInvalidateSelectionRect(); - - // If no change in ghost placement - if ((gSceneryGhostType & SCENERY_GHOST_FLAG_1) && mapTile == gSceneryGhostPosition && z == gSceneryGhostPosition.z) - { - return; - } - - SceneryRemoveGhostToolPlacement(); - - cost = TryPlaceGhostPathAddition({ mapTile, z }, selection.EntryIndex); - - gSceneryPlaceCost = cost; - break; - } - case SCENERY_TYPE_WALL: - { - CoordsXY mapTile = {}; - uint8_t edge; - - Sub6E1F34Wall(screenPos, selection.EntryIndex, mapTile, &edge); - - if (mapTile.IsNull()) - { - SceneryRemoveGhostToolPlacement(); - return; - } - - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - gMapSelectPositionA.x = mapTile.x; - gMapSelectPositionA.y = mapTile.y; - gMapSelectPositionB.x = mapTile.x; - gMapSelectPositionB.y = mapTile.y; - gMapSelectType = MAP_SELECT_TYPE_EDGE_0 + edge; - - MapInvalidateSelectionRect(); - - // If no change in ghost placement - if ((gSceneryGhostType & SCENERY_GHOST_FLAG_2) && mapTile == gSceneryGhostPosition - && edge == gSceneryGhostWallRotation && gSceneryPlaceZ == _unkF64F0A) - { - return; - } - - SceneryRemoveGhostToolPlacement(); - - gSceneryGhostWallRotation = edge; - _unkF64F0A = gSceneryPlaceZ; - - uint8_t attemptsLeft = 1; - if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) - { - attemptsLeft = 20; - } - - cost = 0; - for (; attemptsLeft != 0; attemptsLeft--) - { - cost = TryPlaceGhostWall( - { mapTile, gSceneryPlaceZ }, edge, selection.EntryIndex, gWindowSceneryPrimaryColour, - gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - if (cost != MONEY64_UNDEFINED) - break; - gSceneryPlaceZ += 8; - } - - gSceneryPlaceCost = cost; - break; - } - case SCENERY_TYPE_LARGE: - { - CoordsXY mapTile = {}; - Direction direction; - - Sub6E1F34LargeScenery(screenPos, selection.EntryIndex, mapTile, &direction); - - if (mapTile.IsNull()) - { - SceneryRemoveGhostToolPlacement(); - return; - } - - auto* sceneryEntry = GetLargeSceneryEntry(selection.EntryIndex); - gMapSelectionTiles.clear(); - - for (rct_large_scenery_tile* tile = sceneryEntry->tiles; - tile->x_offset != static_cast(static_cast(0xFFFF)); tile++) - { - CoordsXY tileLocation = { tile->x_offset, tile->y_offset }; - auto rotatedTileCoords = tileLocation.Rotate(direction); - - rotatedTileCoords.x += mapTile.x; - rotatedTileCoords.y += mapTile.y; - - gMapSelectionTiles.push_back(rotatedTileCoords); - } - - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_CONSTRUCT; - MapInvalidateMapSelectionTiles(); - - // If no change in ghost placement - if ((gSceneryGhostType & SCENERY_GHOST_FLAG_3) && mapTile == gSceneryGhostPosition && gSceneryPlaceZ == _unkF64F0A - && gSceneryPlaceObject.SceneryType == SCENERY_TYPE_LARGE - && gSceneryPlaceObject.EntryIndex == selection.EntryIndex) - { - return; - } - - SceneryRemoveGhostToolPlacement(); - - gSceneryPlaceObject.SceneryType = SCENERY_TYPE_LARGE; - gSceneryPlaceObject.EntryIndex = selection.EntryIndex; - _unkF64F0A = gSceneryPlaceZ; - - uint8_t attemptsLeft = 1; - if (gSceneryPlaceZ != 0 && gSceneryShiftPressed) - { - attemptsLeft = 20; - } - - cost = 0; - for (; attemptsLeft != 0; attemptsLeft--) - { - cost = TryPlaceGhostLargeScenery( - { mapTile, gSceneryPlaceZ, direction }, selection.EntryIndex, gWindowSceneryPrimaryColour, - gWindowScenerySecondaryColour, gWindowSceneryTertiaryColour); - - if (cost != MONEY64_UNDEFINED) - break; - gSceneryPlaceZ += COORDS_Z_STEP; - } - - gSceneryPlaceCost = cost; - break; - } - case SCENERY_TYPE_BANNER: - { - CoordsXY mapTile = {}; - Direction direction; - int32_t z; - - Sub6E1F34Banner(screenPos, selection.EntryIndex, mapTile, &z, &direction); - - if (mapTile.IsNull()) - { - SceneryRemoveGhostToolPlacement(); - return; - } - - gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; - gMapSelectPositionA.x = mapTile.x; - gMapSelectPositionA.y = mapTile.y; - gMapSelectPositionB.x = mapTile.x; - gMapSelectPositionB.y = mapTile.y; - gMapSelectType = MAP_SELECT_TYPE_FULL; - - MapInvalidateSelectionRect(); - - // If no change in ghost placement - if ((gSceneryGhostType & SCENERY_GHOST_FLAG_4) && mapTile == gSceneryGhostPosition && z == gSceneryGhostPosition.z - && direction == gSceneryPlaceRotation) - { - return; - } - - SceneryRemoveGhostToolPlacement(); - - cost = TryPlaceGhostBanner({ mapTile, z, direction }, selection.EntryIndex); - - gSceneryPlaceCost = cost; - break; + WindowDropdownShowText( + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, + Dropdown::Flag::StayOpen, numItems); + break; + case WIDX_CHEATS: + InitCheatsMenu(widget); + break; + case WIDX_VIEW_MENU: + InitViewMenu(widget); + break; + case WIDX_MAP: + InitMapMenu(widget); + break; + case WIDX_FASTFORWARD: + InitFastforwardMenu(widget); + break; + case WIDX_ROTATE: + InitRotateMenu(widget); + break; + case WIDX_DEBUG: + InitDebugMenu(widget); + break; + case WIDX_NETWORK: + InitNetworkMenu(widget); + break; } } -} -/** - * - * rct2: 0x0066CB25 - */ -static void WindowTopToolbarToolUpdate(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) -{ - switch (widgetIndex) + void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override { - case WIDX_CLEAR_SCENERY: - TopToolbarToolUpdateSceneryClear(screenCoords); - break; - case WIDX_LAND: - if (gLandPaintMode) - TopToolbarToolUpdateLandPaint(screenCoords); - else - TopToolbarToolUpdateLand(screenCoords); - break; - case WIDX_WATER: - TopToolbarToolUpdateWater(screenCoords); - break; - case WIDX_SCENERY: - TopToolbarToolUpdateScenery(screenCoords); - break; + switch (widgetIndex) + { + case WIDX_FILE_MENU: + + // New game is only available in the normal game. Skip one position to avoid incorrect mappings in the menus of + // the other modes. + if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR)) + selectedIndex += 1; + + // Quicksave is only available in the normal game. Skip one position to avoid incorrect mappings in the menus of + // the other modes. + if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR) && selectedIndex > DDIDX_LOAD_GAME) + selectedIndex += 1; + + // Track designer and track designs manager start with About, not Load/save + if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + selectedIndex += DDIDX_ABOUT; + + // The "Update available" menu item is only available when there is one + if (selectedIndex >= DDIDX_UPDATE_AVAILABLE && !OpenRCT2::GetContext()->HasNewVersionInfo()) + selectedIndex += 1; + + switch (selectedIndex) + { + case DDIDX_NEW_GAME: + { + auto intent = Intent(WindowClass::ScenarioSelect); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(ScenarioSelectCallback)); + ContextOpenIntent(&intent); + break; + } + case DDIDX_LOAD_GAME: + { + auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt); + GameActions::Execute(&loadOrQuitAction); + break; + } + case DDIDX_SAVE_GAME: + ToolCancel(); + SaveGame(); + break; + case DDIDX_SAVE_GAME_AS: + if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + { + auto intent = Intent(WindowClass::Loadsave); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); + intent.PutExtra(INTENT_EXTRA_PATH, gScenarioName); + ContextOpenIntent(&intent); + } + else + { + ToolCancel(); + SaveGameAs(); + } + break; + case DDIDX_ABOUT: + ContextOpenWindow(WindowClass::About); + break; + case DDIDX_OPTIONS: + ContextOpenWindow(WindowClass::Options); + break; + case DDIDX_SCREENSHOT: + gScreenshotCountdown = 10; + break; + case DDIDX_GIANT_SCREENSHOT: + ScreenshotGiant(); + break; + case DDIDX_FILE_BUG_ON_GITHUB: + { + std::string url = "https://github.com/OpenRCT2/OpenRCT2/issues/" + "new?assignees=&labels=bug&template=bug_report.yaml"; + auto versionStr = String::URLEncode(gVersionInfoFull); + url.append("&openrct2_build=" + versionStr); + OpenRCT2::GetContext()->GetUiContext()->OpenURL(url); + } + break; + case DDIDX_UPDATE_AVAILABLE: + ContextOpenWindowView(WV_NEW_VERSION_INFO); + break; + case DDIDX_QUIT_TO_MENU: + { + WindowCloseByClass(WindowClass::ManageTrackDesign); + WindowCloseByClass(WindowClass::TrackDeletePrompt); + auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeQuit); + GameActions::Execute(&loadOrQuitAction); + break; + } + case DDIDX_EXIT_OPENRCT2: + ContextQuit(); + break; + } + break; + case WIDX_CHEATS: + CheatsMenuDropdown(selectedIndex); + break; + case WIDX_VIEW_MENU: + ViewMenuDropdown(selectedIndex); + break; + case WIDX_MAP: + MapMenuDropdown(selectedIndex); + break; + case WIDX_FASTFORWARD: + FastforwardMenuDropdown(selectedIndex); + break; + case WIDX_ROTATE: + RotateMenuDropdown(selectedIndex); + break; + case WIDX_DEBUG: + DebugMenuDropdown(selectedIndex); + break; + case WIDX_NETWORK: + NetworkMenuDropdown(selectedIndex); + break; + } + } + + void OnToolUpdate(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override + { + switch (widgetIndex) + { + case WIDX_CLEAR_SCENERY: + ToolUpdateSceneryClear(screenCoords); + break; + case WIDX_LAND: + if (gLandPaintMode) + ToolUpdateLandPaint(screenCoords); + else + ToolUpdateLand(screenCoords); + break; + case WIDX_WATER: + ToolUpdateWater(screenCoords); + break; + case WIDX_SCENERY: + ToolUpdateScenery(screenCoords); + break; #ifdef ENABLE_SCRIPTING - default: - auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; - if (customTool) - { - customTool->OnUpdate(screenCoords); - } - break; + default: + auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; + if (customTool) + { + customTool->OnUpdate(screenCoords); + } + break; #endif - } -} - -/** - * - * rct2: 0x0066CB73 - */ -static void WindowTopToolbarToolDown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) -{ - switch (widgetIndex) - { - case WIDX_CLEAR_SCENERY: - if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) - { - auto action = GetClearAction(); - GameActions::Execute(&action); - gCurrentToolId = Tool::Crosshair; - } - break; - case WIDX_LAND: - if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) - { - auto surfaceSetStyleAction = SurfaceSetStyleAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, - gLandToolTerrainSurface, gLandToolTerrainEdge); - - GameActions::Execute(&surfaceSetStyleAction); - - gCurrentToolId = Tool::UpDownArrow; - } - else - { - _landToolBlocked = true; - } - break; - case WIDX_WATER: - if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) - { - gCurrentToolId = Tool::UpDownArrow; - } - else - { - _landToolBlocked = true; - } - break; - case WIDX_SCENERY: - WindowTopToolbarSceneryToolDown(screenCoords, w, widgetIndex); - break; -#ifdef ENABLE_SCRIPTING - default: - auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; - if (customTool) - { - customTool->OnDown(screenCoords); - } - break; -#endif - } -} - -/** - * - * rct2: 0x006644DD - */ -static money64 SelectionRaiseLand(uint8_t flags) -{ - int32_t centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; - int32_t centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; - centreX += 16; - centreY += 16; - - if (gLandMountainMode) - { - auto landSmoothAction = LandSmoothAction( - { centreX, centreY }, - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, gMapSelectType, - false); - auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSmoothAction) - : GameActions::Query(&landSmoothAction); - return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; + } } - auto landRaiseAction = LandRaiseAction( - { centreX, centreY }, { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, - gMapSelectType); - auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landRaiseAction) - : GameActions::Query(&landRaiseAction); - - return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; -} - -/** - * - * rct2: 0x006645B3 - */ -static money64 SelectionLowerLand(uint8_t flags) -{ - int32_t centreX = (gMapSelectPositionA.x + gMapSelectPositionB.x) / 2; - int32_t centreY = (gMapSelectPositionA.y + gMapSelectPositionB.y) / 2; - centreX += 16; - centreY += 16; - - if (gLandMountainMode) + void OnToolDown(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override { - auto landSmoothAction = LandSmoothAction( - { centreX, centreY }, - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, gMapSelectType, - true); - auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSmoothAction) - : GameActions::Query(&landSmoothAction); - return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; - } - - auto landLowerAction = LandLowerAction( - { centreX, centreY }, { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, - gMapSelectType); - auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landLowerAction) - : GameActions::Query(&landLowerAction); - - return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; -} - -/** - * part of window_top_toolbar_tool_drag(0x0066CB4E) - * rct2: 0x00664454 - */ -static void WindowTopToolbarLandToolDrag(const ScreenCoordsXY& screenPos) -{ - rct_window* window = window_find_from_point(screenPos); - if (window == nullptr) - return; - WidgetIndex widget_index = window_find_widget_from_point(*window, screenPos); - if (widget_index == -1) - return; - const auto& widget = window->widgets[widget_index]; - if (widget.type != WindowWidgetType::Viewport) - return; - rct_viewport* viewport = window->viewport; - if (viewport == nullptr) - return; - - int16_t tile_height = viewport->zoom.ApplyInversedTo(-16); - - int32_t y_diff = screenPos.y - gInputDragLast.y; - - if (y_diff <= tile_height) - { - gInputDragLast.y += tile_height; - - SelectionRaiseLand(GAME_COMMAND_FLAG_APPLY); - - gLandToolRaiseCost = MONEY64_UNDEFINED; - gLandToolLowerCost = MONEY64_UNDEFINED; - } - else if (y_diff >= -tile_height) - { - gInputDragLast.y -= tile_height; - - SelectionLowerLand(GAME_COMMAND_FLAG_APPLY); - - gLandToolRaiseCost = MONEY64_UNDEFINED; - gLandToolLowerCost = MONEY64_UNDEFINED; - } -} - -/** - * part of window_top_toolbar_tool_drag(0x0066CB4E) - * rct2: 0x006E6D4B - */ -static void WindowTopToolbarWaterToolDrag(const ScreenCoordsXY& screenPos) -{ - rct_window* window = window_find_from_point(screenPos); - if (!window) - return; - WidgetIndex widget_index = window_find_widget_from_point(*window, screenPos); - if (widget_index == -1) - return; - const auto& widget = window->widgets[widget_index]; - if (widget.type != WindowWidgetType::Viewport) - return; - rct_viewport* viewport = window->viewport; - if (viewport == nullptr) - return; - - int16_t dx = viewport->zoom.ApplyInversedTo(-16); - - auto offsetPos = screenPos - ScreenCoordsXY{ 0, gInputDragLast.y }; - - if (offsetPos.y <= dx) - { - gInputDragLast.y += dx; - - auto waterRaiseAction = WaterRaiseAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); - GameActions::Execute(&waterRaiseAction); - - gWaterToolRaiseCost = MONEY64_UNDEFINED; - gWaterToolLowerCost = MONEY64_UNDEFINED; - - return; - } - - dx = -dx; - - if (offsetPos.y >= dx) - { - gInputDragLast.y += dx; - - auto waterLowerAction = WaterLowerAction( - { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }); - GameActions::Execute(&waterLowerAction); - gWaterToolRaiseCost = MONEY64_UNDEFINED; - gWaterToolLowerCost = MONEY64_UNDEFINED; - - return; - } -} - -/** - * - * rct2: 0x0066CB4E - */ -static void WindowTopToolbarToolDrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) -{ - switch (widgetIndex) - { - case WIDX_CLEAR_SCENERY: - if (window_find_by_class(WindowClass::Error) == nullptr && (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) - { - auto action = GetClearAction(); - GameActions::Execute(&action); - gCurrentToolId = Tool::Crosshair; - } - break; - case WIDX_LAND: - // Custom setting to only change land style instead of raising or lowering land - if (gLandPaintMode) - { + switch (widgetIndex) + { + case WIDX_CLEAR_SCENERY: + if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) + { + auto action = GetClearAction(); + GameActions::Execute(&action); + gCurrentToolId = Tool::Crosshair; + } + break; + case WIDX_LAND: if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) { auto surfaceSetStyleAction = SurfaceSetStyleAction( @@ -3188,444 +2821,551 @@ static void WindowTopToolbarToolDrag(rct_window* w, WidgetIndex widgetIndex, con GameActions::Execute(&surfaceSetStyleAction); - // The tool is set to 12 here instead of 3 so that the dragging cursor is not the elevation change - // cursor - gCurrentToolId = Tool::Crosshair; - } - } - else - { - if (!_landToolBlocked) - { - WindowTopToolbarLandToolDrag(screenCoords); - } - } - break; - case WIDX_WATER: - if (!_landToolBlocked) - { - WindowTopToolbarWaterToolDrag(screenCoords); - } - break; - case WIDX_SCENERY: - if (gWindowSceneryPaintEnabled & 1) - WindowTopToolbarSceneryToolDown(screenCoords, w, widgetIndex); - if (gWindowSceneryEyedropperEnabled) - WindowTopToolbarSceneryToolDown(screenCoords, w, widgetIndex); - break; -#ifdef ENABLE_SCRIPTING - default: - auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; - if (customTool) - { - customTool->OnDrag(screenCoords); - } - break; -#endif - } -} - -/** - * - * rct2: 0x0066CC5B - */ -static void WindowTopToolbarToolUp(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) -{ - _landToolBlocked = false; - switch (widgetIndex) - { - case WIDX_LAND: - MapInvalidateSelectionRect(); - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gCurrentToolId = Tool::DigDown; - break; - case WIDX_WATER: - MapInvalidateSelectionRect(); - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gCurrentToolId = Tool::WaterDown; - break; - case WIDX_CLEAR_SCENERY: - MapInvalidateSelectionRect(); - gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gCurrentToolId = Tool::Crosshair; - break; -#ifdef ENABLE_SCRIPTING - default: - auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; - if (customTool) - { - customTool->OnUp(screenCoords); - } - break; -#endif - } -} - -/** - * - * rct2: 0x0066CA58 - */ -static void WindowTopToolbarToolAbort(rct_window* w, WidgetIndex widgetIndex) -{ - switch (widgetIndex) - { - case WIDX_LAND: - case WIDX_WATER: - case WIDX_CLEAR_SCENERY: - hide_gridlines(); - break; -#ifdef ENABLE_SCRIPTING - default: - auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; - if (customTool) - { - customTool->OnAbort(); - customTool = {}; - } - break; -#endif - } -} - -static void TopToolbarInitMapMenu(rct_window* w, rct_widget* widget) -{ - auto i = 0; - gDropdownItems[i++].Format = STR_SHORTCUT_SHOW_MAP; - gDropdownItems[i++].Format = STR_EXTRA_VIEWPORT; - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && gEditorStep == EditorStep::LandscapeEditor) - { - gDropdownItems[i++].Format = STR_MAPGEN_WINDOW_TITLE; - } - -#ifdef ENABLE_SCRIPTING - const auto& customMenuItems = OpenRCT2::Scripting::CustomMenuItems; - if (!customMenuItems.empty()) - { - gDropdownItems[i++].Format = STR_EMPTY; - for (const auto& item : customMenuItems) - { - if (item.Kind == OpenRCT2::Scripting::CustomToolbarMenuItemKind::Standard) - { - gDropdownItems[i].Format = STR_STRING; - auto sz = item.Text.c_str(); - std::memcpy(&gDropdownItems[i].Args, &sz, sizeof(const char*)); - i++; - } - } - } -#endif - - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[1] | 0x80, 0, i); - gDropdownDefaultIndex = DDIDX_SHOW_MAP; -} - -static void TopToolbarMapMenuDropdown(int16_t dropdownIndex) -{ - int32_t customStartIndex = 3; - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && gEditorStep == EditorStep::LandscapeEditor) - { - customStartIndex++; - } - - if (dropdownIndex < customStartIndex) - { - switch (dropdownIndex) - { - case 0: - ContextOpenWindow(WindowClass::Map); - break; - case 1: - ContextOpenWindow(WindowClass::Viewport); - break; - case 2: - ContextOpenWindow(WindowClass::Mapgen); - break; - } - } - else - { -#ifdef ENABLE_SCRIPTING - const auto& customMenuItems = OpenRCT2::Scripting::CustomMenuItems; - auto customIndex = static_cast(dropdownIndex - customStartIndex); - size_t i = 0; - for (const auto& item : customMenuItems) - { - if (item.Kind == OpenRCT2::Scripting::CustomToolbarMenuItemKind::Standard) - { - if (i == customIndex) - { - item.Invoke(); - break; - } - i++; - } - } -#endif - } -} - -static void TopToolbarInitFastforwardMenu(rct_window* w, rct_widget* widget) -{ - int32_t num_items = 4; - gDropdownItems[0].Format = STR_TOGGLE_OPTION; - gDropdownItems[1].Format = STR_TOGGLE_OPTION; - gDropdownItems[2].Format = STR_TOGGLE_OPTION; - gDropdownItems[3].Format = STR_TOGGLE_OPTION; - if (gConfigGeneral.DebuggingTools) - { - gDropdownItems[4].Format = STR_EMPTY; - gDropdownItems[5].Format = STR_TOGGLE_OPTION; - gDropdownItems[5].Args = STR_SPEED_HYPER; - num_items = 6; - } - - gDropdownItems[0].Args = STR_SPEED_NORMAL; - gDropdownItems[1].Args = STR_SPEED_QUICK; - gDropdownItems[2].Args = STR_SPEED_FAST; - gDropdownItems[3].Args = STR_SPEED_TURBO; - - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[0] | 0x80, 0, - num_items); - - // Set checkmarks - if (gGameSpeed <= 4) - { - Dropdown::SetChecked(gGameSpeed - 1, true); - } - if (gGameSpeed == 8) - { - Dropdown::SetChecked(5, true); - } - - if (gConfigGeneral.DebuggingTools) - { - gDropdownDefaultIndex = (gGameSpeed == 8 ? 0 : gGameSpeed); - } - else - { - gDropdownDefaultIndex = (gGameSpeed >= 4 ? 0 : gGameSpeed); - } - if (gDropdownDefaultIndex == 4) - { - gDropdownDefaultIndex = 5; - } -} - -static void TopToolbarFastforwardMenuDropdown(int16_t dropdownIndex) -{ - rct_window* w = window_get_main(); - if (w) - { - if (dropdownIndex >= 0 && dropdownIndex <= 5) - { - gGameSpeed = dropdownIndex + 1; - if (gGameSpeed >= 5) - gGameSpeed = 8; - w->Invalidate(); - } - } -} - -static void TopToolbarInitRotateMenu(rct_window* w, rct_widget* widget) -{ - gDropdownItems[0].Format = STR_ROTATE_CLOCKWISE; - gDropdownItems[1].Format = STR_ROTATE_ANTI_CLOCKWISE; - - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[1] | 0x80, 0, 2); - - gDropdownDefaultIndex = DDIDX_ROTATE_CLOCKWISE; -} - -static void TopToolbarRotateMenuDropdown(int16_t dropdownIndex) -{ - rct_window* w = window_get_main(); - if (w) - { - if (dropdownIndex == 0) - { - window_rotate_camera(*w, 1); - w->Invalidate(); - } - else if (dropdownIndex == 1) - { - window_rotate_camera(*w, -1); - w->Invalidate(); - } - } -} - -static void TopToolbarInitCheatsMenu(rct_window* w, rct_widget* widget) -{ - using namespace Dropdown; - - constexpr ItemExt items[] = { - ToggleOption(DDIDX_CHEATS, STR_CHEAT_TITLE), - ToggleOption(DDIDX_TILE_INSPECTOR, STR_DEBUG_DROPDOWN_TILE_INSPECTOR), - ToggleOption(DDIDX_OBJECT_SELECTION, STR_DEBUG_DROPDOWN_OBJECT_SELECTION), - ToggleOption(DDIDX_INVENTIONS_LIST, STR_DEBUG_DROPDOWN_INVENTIONS_LIST), - ToggleOption(DDIDX_SCENARIO_OPTIONS, STR_DEBUG_DROPDOWN_SCENARIO_OPTIONS), - ToggleOption(DDIDX_OBJECTIVE_OPTIONS, STR_CHEATS_MENU_OBJECTIVE_OPTIONS), - Separator(), - ToggleOption(DDIDX_ENABLE_SANDBOX_MODE, STR_ENABLE_SANDBOX_MODE), - ToggleOption(DDIDX_DISABLE_CLEARANCE_CHECKS, STR_DISABLE_CLEARANCE_CHECKS), - ToggleOption(DDIDX_DISABLE_SUPPORT_LIMITS, STR_DISABLE_SUPPORT_LIMITS), - }; - static_assert(ItemIDsMatchIndices(items)); - - SetItems(items); - - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[0] | 0x80, 0, - TOP_TOOLBAR_CHEATS_COUNT); - - // Disable items that are not yet available in multiplayer - if (network_get_mode() != NETWORK_MODE_NONE) - { - Dropdown::SetDisabled(DDIDX_OBJECT_SELECTION, true); - Dropdown::SetDisabled(DDIDX_INVENTIONS_LIST, true); - Dropdown::SetDisabled(DDIDX_OBJECTIVE_OPTIONS, true); - } - - if (gScreenFlags & SCREEN_FLAGS_EDITOR) - { - Dropdown::SetDisabled(DDIDX_OBJECT_SELECTION, true); - Dropdown::SetDisabled(DDIDX_INVENTIONS_LIST, true); - Dropdown::SetDisabled(DDIDX_SCENARIO_OPTIONS, true); - Dropdown::SetDisabled(DDIDX_OBJECTIVE_OPTIONS, true); - Dropdown::SetDisabled(DDIDX_ENABLE_SANDBOX_MODE, true); - } - - if (gCheatsSandboxMode) - { - Dropdown::SetChecked(DDIDX_ENABLE_SANDBOX_MODE, true); - } - if (gCheatsDisableClearanceChecks) - { - Dropdown::SetChecked(DDIDX_DISABLE_CLEARANCE_CHECKS, true); - } - if (gCheatsDisableSupportLimits) - { - Dropdown::SetChecked(DDIDX_DISABLE_SUPPORT_LIMITS, true); - } - - gDropdownDefaultIndex = DDIDX_CHEATS; -} - -static void TopToolbarCheatsMenuDropdown(int16_t dropdownIndex) -{ - switch (dropdownIndex) - { - case DDIDX_CHEATS: - ContextOpenWindow(WindowClass::Cheats); - break; - case DDIDX_TILE_INSPECTOR: - ContextOpenWindow(WindowClass::TileInspector); - break; - case DDIDX_OBJECT_SELECTION: - window_close_all(); - ContextOpenWindow(WindowClass::EditorObjectSelection); - break; - case DDIDX_INVENTIONS_LIST: - ContextOpenWindow(WindowClass::EditorInventionList); - break; - case DDIDX_SCENARIO_OPTIONS: - ContextOpenWindow(WindowClass::EditorScenarioOptions); - break; - case DDIDX_OBJECTIVE_OPTIONS: - ContextOpenWindow(WindowClass::EditorObjectiveOptions); - break; - case DDIDX_ENABLE_SANDBOX_MODE: - CheatsSet(CheatType::SandboxMode, !gCheatsSandboxMode); - break; - case DDIDX_DISABLE_CLEARANCE_CHECKS: - CheatsSet(CheatType::DisableClearanceChecks, !gCheatsDisableClearanceChecks); - break; - case DDIDX_DISABLE_SUPPORT_LIMITS: - CheatsSet(CheatType::DisableSupportLimits, !gCheatsDisableSupportLimits); - break; - } -} - -static void TopToolbarInitDebugMenu(rct_window* w, rct_widget* widget) -{ - gDropdownItems[DDIDX_CONSOLE].Format = STR_TOGGLE_OPTION; - gDropdownItems[DDIDX_CONSOLE].Args = STR_DEBUG_DROPDOWN_CONSOLE; - gDropdownItems[DDIDX_DEBUG_PAINT].Format = STR_TOGGLE_OPTION; - gDropdownItems[DDIDX_DEBUG_PAINT].Args = STR_DEBUG_DROPDOWN_DEBUG_PAINT; - - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[0] | 0x80, - Dropdown::Flag::StayOpen, TOP_TOOLBAR_DEBUG_COUNT); - - Dropdown::SetChecked(DDIDX_DEBUG_PAINT, window_find_by_class(WindowClass::DebugPaint) != nullptr); -} - -static void TopToolbarInitNetworkMenu(rct_window* w, rct_widget* widget) -{ - gDropdownItems[DDIDX_MULTIPLAYER].Format = STR_MULTIPLAYER; - gDropdownItems[DDIDX_MULTIPLAYER_RECONNECT].Format = STR_MULTIPLAYER_RECONNECT; - - WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[0] | 0x80, 0, - TOP_TOOLBAR_NETWORK_COUNT); - - Dropdown::SetDisabled(DDIDX_MULTIPLAYER_RECONNECT, !network_is_desynchronised()); - - gDropdownDefaultIndex = DDIDX_MULTIPLAYER; -} - -static void TopToolbarDebugMenuDropdown(int16_t dropdownIndex) -{ - rct_window* w = window_get_main(); - if (w != nullptr) - { - switch (dropdownIndex) - { - case DDIDX_CONSOLE: - { - auto& console = GetInGameConsole(); - console.Open(); - break; - } - case DDIDX_DEBUG_PAINT: - if (window_find_by_class(WindowClass::DebugPaint) == nullptr) - { - ContextOpenWindow(WindowClass::DebugPaint); + gCurrentToolId = Tool::UpDownArrow; } else { - window_close_by_class(WindowClass::DebugPaint); + _landToolBlocked = true; } break; + case WIDX_WATER: + if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) + { + gCurrentToolId = Tool::UpDownArrow; + } + else + { + _landToolBlocked = true; + } + break; + case WIDX_SCENERY: + SceneryToolDown(screenCoords, widgetIndex); + break; +#ifdef ENABLE_SCRIPTING + default: + auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; + if (customTool) + { + customTool->OnDown(screenCoords); + } + break; +#endif } } + + void OnToolDrag(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override + { + switch (widgetIndex) + { + case WIDX_CLEAR_SCENERY: + if (WindowFindByClass(WindowClass::Error) == nullptr && (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) + { + auto action = GetClearAction(); + GameActions::Execute(&action); + gCurrentToolId = Tool::Crosshair; + } + break; + case WIDX_LAND: + // Custom setting to only change land style instead of raising or lowering land + if (gLandPaintMode) + { + if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) + { + auto surfaceSetStyleAction = SurfaceSetStyleAction( + { gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y }, + gLandToolTerrainSurface, gLandToolTerrainEdge); + + GameActions::Execute(&surfaceSetStyleAction); + + // The tool is set to 12 here instead of 3 so that the dragging cursor is not the elevation change + // cursor + gCurrentToolId = Tool::Crosshair; + } + } + else + { + if (!_landToolBlocked) + { + LandToolDrag(screenCoords); + } + } + break; + case WIDX_WATER: + if (!_landToolBlocked) + { + WaterToolDrag(screenCoords); + } + break; + case WIDX_SCENERY: + if (gWindowSceneryPaintEnabled & 1) + SceneryToolDown(screenCoords, widgetIndex); + if (gWindowSceneryEyedropperEnabled) + SceneryToolDown(screenCoords, widgetIndex); + break; +#ifdef ENABLE_SCRIPTING + default: + auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; + if (customTool) + { + customTool->OnDrag(screenCoords); + } + break; +#endif + } + } + + void OnToolUp(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override + { + _landToolBlocked = false; + switch (widgetIndex) + { + case WIDX_LAND: + MapInvalidateSelectionRect(); + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + gCurrentToolId = Tool::DigDown; + break; + case WIDX_WATER: + MapInvalidateSelectionRect(); + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + gCurrentToolId = Tool::WaterDown; + break; + case WIDX_CLEAR_SCENERY: + MapInvalidateSelectionRect(); + gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; + gCurrentToolId = Tool::Crosshair; + break; +#ifdef ENABLE_SCRIPTING + default: + auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; + if (customTool) + { + customTool->OnUp(screenCoords); + } + break; +#endif + } + } + + void OnToolAbort(WidgetIndex widgetIndex) override + { + switch (widgetIndex) + { + case WIDX_LAND: + case WIDX_WATER: + case WIDX_CLEAR_SCENERY: + HideGridlines(); + break; +#ifdef ENABLE_SCRIPTING + default: + auto& customTool = OpenRCT2::Scripting::ActiveCustomTool; + if (customTool) + { + customTool->OnAbort(); + customTool = {}; + } + break; +#endif + } + } + + void OnPrepareDraw() override + { + int32_t x, widgetIndex, widgetWidth, firstAlignment; + Widget* widget; + + // Enable / disable buttons + widgets[WIDX_PAUSE].type = WindowWidgetType::TrnBtn; + widgets[WIDX_FILE_MENU].type = WindowWidgetType::TrnBtn; + widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::TrnBtn; + widgets[WIDX_ZOOM_IN].type = WindowWidgetType::TrnBtn; + widgets[WIDX_ROTATE].type = WindowWidgetType::TrnBtn; + widgets[WIDX_VIEW_MENU].type = WindowWidgetType::TrnBtn; + widgets[WIDX_MAP].type = WindowWidgetType::TrnBtn; + widgets[WIDX_MUTE].type = WindowWidgetType::TrnBtn; + widgets[WIDX_CHAT].type = WindowWidgetType::TrnBtn; + widgets[WIDX_LAND].type = WindowWidgetType::TrnBtn; + widgets[WIDX_WATER].type = WindowWidgetType::TrnBtn; + widgets[WIDX_SCENERY].type = WindowWidgetType::TrnBtn; + widgets[WIDX_PATH].type = WindowWidgetType::TrnBtn; + widgets[WIDX_CONSTRUCT_RIDE].type = WindowWidgetType::TrnBtn; + widgets[WIDX_RIDES].type = WindowWidgetType::TrnBtn; + widgets[WIDX_PARK].type = WindowWidgetType::TrnBtn; + widgets[WIDX_STAFF].type = WindowWidgetType::TrnBtn; + widgets[WIDX_GUESTS].type = WindowWidgetType::TrnBtn; + widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::TrnBtn; + widgets[WIDX_FINANCES].type = WindowWidgetType::TrnBtn; + 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_NEWS].type = WindowWidgetType::TrnBtn; + widgets[WIDX_NETWORK].type = WindowWidgetType::TrnBtn; + + if (!gConfigInterface.ToolbarShowMute) + widgets[WIDX_MUTE].type = WindowWidgetType::Empty; + + if (!gConfigInterface.ToolbarShowChat) + widgets[WIDX_CHAT].type = WindowWidgetType::Empty; + + if (!gConfigInterface.ToolbarShowResearch) + widgets[WIDX_RESEARCH].type = WindowWidgetType::Empty; + + if (!gConfigInterface.ToolbarShowCheats) + widgets[WIDX_CHEATS].type = WindowWidgetType::Empty; + + if (!gConfigInterface.ToolbarShowNews) + widgets[WIDX_NEWS].type = WindowWidgetType::Empty; + + if (!gConfigInterface.ToolbarShowZoom) + { + widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty; + widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty; + } + + if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR || gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + { + widgets[WIDX_PAUSE].type = WindowWidgetType::Empty; + } + + if ((gParkFlags & PARK_FLAGS_NO_MONEY) || !gConfigInterface.ToolbarShowFinances) + widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; + + if (gScreenFlags & SCREEN_FLAGS_EDITOR) + { + 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; + + if (gEditorStep != EditorStep::LandscapeEditor) + { + widgets[WIDX_LAND].type = WindowWidgetType::Empty; + widgets[WIDX_WATER].type = WindowWidgetType::Empty; + } + + if (gEditorStep != EditorStep::RollercoasterDesigner) + { + widgets[WIDX_RIDES].type = WindowWidgetType::Empty; + widgets[WIDX_CONSTRUCT_RIDE].type = WindowWidgetType::Empty; + widgets[WIDX_FASTFORWARD].type = WindowWidgetType::Empty; + } + + if (gEditorStep != EditorStep::LandscapeEditor && gEditorStep != 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; + } + } + + switch (NetworkGetMode()) + { + case NETWORK_MODE_NONE: + widgets[WIDX_NETWORK].type = WindowWidgetType::Empty; + widgets[WIDX_CHAT].type = WindowWidgetType::Empty; + break; + case NETWORK_MODE_CLIENT: + widgets[WIDX_PAUSE].type = WindowWidgetType::Empty; + [[fallthrough]]; + case NETWORK_MODE_SERVER: + 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); + + if (gGamePaused & GAME_PAUSED_NORMAL) + pressed_widgets |= (1uLL << WIDX_PAUSE); + 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); + } + + // Zoomed out/in disable. Not sure where this code is in the original. + const auto* mainWindow = WindowGetMain(); + if (mainWindow == nullptr || mainWindow->viewport == nullptr) + { + LOG_ERROR("mainWindow or mainWindow->viewport is null!"); + return; + } + + if (mainWindow->viewport->zoom == ZoomLevel::min()) + { + disabled_widgets |= (1uLL << WIDX_ZOOM_IN); + } + else if (mainWindow->viewport->zoom >= ZoomLevel::max()) + { + disabled_widgets |= (1uLL << WIDX_ZOOM_OUT); + } + else + { + disabled_widgets &= ~((1uLL << WIDX_ZOOM_IN) | (1uLL << WIDX_ZOOM_OUT)); + } + } + + void OnDraw(DrawPixelInfo& dpi) override + { + int32_t imgId; + + WindowDrawWidgets(*this, &dpi); + + ScreenCoordsXY screenPos{}; + // Draw staff button image (setting masks to the staff colours) + if (window_top_toolbar_widgets[WIDX_STAFF].type != WindowWidgetType::Empty) + { + screenPos = { windowPos.x + widgets[WIDX_STAFF].left, windowPos.y + widgets[WIDX_STAFF].top }; + imgId = SPR_TOOLBAR_STAFF; + if (WidgetIsPressed(*this, WIDX_STAFF)) + imgId++; + GfxDrawSprite(&dpi, ImageId(imgId, gStaffHandymanColour, gStaffMechanicColour), screenPos); + } + + // Draw fast forward button + if (window_top_toolbar_widgets[WIDX_FASTFORWARD].type != WindowWidgetType::Empty) + { + screenPos = { windowPos.x + widgets[WIDX_FASTFORWARD].left + 0, windowPos.y + widgets[WIDX_FASTFORWARD].top + 0 }; + if (WidgetIsPressed(*this, WIDX_FASTFORWARD)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_G2_FASTFORWARD), screenPos + ScreenCoordsXY{ 6, 3 }); + + for (int32_t i = 0; i < gGameSpeed && gGameSpeed <= 4; i++) + { + GfxDrawSprite(&dpi, ImageId(SPR_G2_SPEED_ARROW), screenPos + ScreenCoordsXY{ 5 + i * 5, 15 }); + } + for (int32_t i = 0; i < 3 && i < gGameSpeed - 4 && gGameSpeed >= 5; i++) + { + GfxDrawSprite(&dpi, ImageId(SPR_G2_HYPER_ARROW), screenPos + ScreenCoordsXY{ 5 + i * 6, 15 }); + } + } + + // Draw cheats button + if (window_top_toolbar_widgets[WIDX_CHEATS].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_CHEATS].left - 1, widgets[WIDX_CHEATS].top - 1 }; + if (WidgetIsPressed(*this, WIDX_CHEATS)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_G2_SANDBOX), screenPos); + + // Draw an overlay if clearance checks are disabled + if (gCheatsDisableClearanceChecks) + { + DrawTextBasic( + dpi, screenPos + ScreenCoordsXY{ 26, 2 }, STR_OVERLAY_CLEARANCE_CHECKS_DISABLED, {}, + { COLOUR_DARK_ORANGE | COLOUR_FLAG_OUTLINE, TextAlignment::RIGHT }); + } + } + + // Draw chat button + if (widgets[WIDX_CHAT].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_CHAT].left, widgets[WIDX_CHAT].top - 2 }; + if (WidgetIsPressed(*this, WIDX_CHAT)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_G2_CHAT), screenPos); + } + + // Draw debug button + if (widgets[WIDX_DEBUG].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_DEBUG].left, widgets[WIDX_DEBUG].top - 1 }; + if (WidgetIsPressed(*this, WIDX_DEBUG)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_TAB_GEARS_0), screenPos); + } + + // Draw research button + if (widgets[WIDX_RESEARCH].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_RESEARCH].left - 1, widgets[WIDX_RESEARCH].top }; + if (WidgetIsPressed(*this, WIDX_RESEARCH)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_TAB_FINANCES_RESEARCH_0), screenPos); + } + + // Draw finances button + if (widgets[WIDX_FINANCES].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_FINANCES].left + 3, widgets[WIDX_FINANCES].top + 1 }; + if (WidgetIsPressed(*this, WIDX_FINANCES)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_FINANCE), screenPos); + } + + // Draw news button + if (widgets[WIDX_NEWS].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_NEWS].left + 3, widgets[WIDX_NEWS].top + 0 }; + if (WidgetIsPressed(*this, WIDX_NEWS)) + screenPos.y++; + GfxDrawSprite(&dpi, ImageId(SPR_G2_TAB_NEWS), screenPos); + } + + // Draw network button + if (widgets[WIDX_NETWORK].type != WindowWidgetType::Empty) + { + screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_NETWORK].left + 3, widgets[WIDX_NETWORK].top + 0 }; + if (WidgetIsPressed(*this, WIDX_NETWORK)) + screenPos.y++; + + // Draw (de)sync icon. + imgId = (NetworkIsDesynchronised() ? SPR_G2_MULTIPLAYER_DESYNC : SPR_G2_MULTIPLAYER_SYNC); + GfxDrawSprite(&dpi, ImageId(imgId), screenPos + ScreenCoordsXY{ 3, 11 }); + + // Draw number of players. + auto ft = Formatter(); + ft.Add(NetworkGetNumVisiblePlayers()); + DrawTextBasic( + dpi, screenPos + ScreenCoordsXY{ 23, 1 }, STR_COMMA16, ft, + { COLOUR_WHITE | COLOUR_FLAG_OUTLINE, TextAlignment::RIGHT }); + } + } +}; + +static void ScenarioSelectCallback(const utf8* path) +{ + WindowCloseByClass(WindowClass::EditorObjectSelection); + GameNotifyMapChange(); + GetContext()->LoadParkFromFile(path, false, true); + GameLoadScripts(); + GameNotifyMapChanged(); } -static void TopToolbarNetworkMenuDropdown(int16_t dropdownIndex) +/** + * Creates the main game top toolbar window. + * rct2: 0x0066B485 (part of 0x0066B3E8) + */ +WindowBase* WindowTopToolbarOpen() { - rct_window* w = window_get_main(); - if (w != nullptr) - { - switch (dropdownIndex) - { - case DDIDX_MULTIPLAYER: - ContextOpenWindow(WindowClass::Multiplayer); - break; - case DDIDX_MULTIPLAYER_RECONNECT: - network_reconnect(); - break; - } - } + TopToolbar* window = WindowCreate( + WindowClass::TopToolbar, ScreenCoordsXY(0, 0), ContextGetWidth(), TOP_TOOLBAR_HEIGHT + 1, + WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); + + window->widgets = window_top_toolbar_widgets; + + WindowInitScrollWidgets(*window); + + return window; } /** * - * rct2: 0x0066CDE4 + * rct2: 0x0066D104 */ -static void TopToolbarInitViewMenu(rct_window* w, rct_widget* widget) +bool LandToolIsActive() +{ + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) + return false; + if (gCurrentToolWidget.window_classification != WindowClass::TopToolbar) + return false; + if (gCurrentToolWidget.widget_index != WIDX_LAND) + return false; + return true; +} + +/** + * + * rct2: 0x0066D125 + */ +bool ClearSceneryToolIsActive() +{ + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) + return false; + if (gCurrentToolWidget.window_classification != WindowClass::TopToolbar) + return false; + if (gCurrentToolWidget.widget_index != WIDX_CLEAR_SCENERY) + return false; + return true; +} + +/** + * + * rct2: 0x0066D125 + */ +bool WaterToolIsActive() +{ + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) + return false; + if (gCurrentToolWidget.window_classification != WindowClass::TopToolbar) + return false; + if (gCurrentToolWidget.widget_index != WIDX_WATER) + return false; + return true; +} + +void TopToolbar::InitViewMenu(Widget& widget) { using namespace Dropdown; constexpr ItemExt items[] = { @@ -3658,11 +3398,11 @@ static void TopToolbarInitViewMenu(rct_window* w, rct_widget* widget) SetItems(items); WindowDropdownShowText( - { w->windowPos.x + widget->left, w->windowPos.y + widget->top }, widget->height() + 1, w->colours[1] | 0x80, 0, + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1] | 0x80, 0, TOP_TOOLBAR_VIEW_MENU_COUNT); // Set checkmarks - rct_viewport* mainViewport = window_get_main()->viewport; + auto* mainViewport = WindowGetMain()->viewport; if (mainViewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) Dropdown::SetChecked(DDIDX_UNDERGROUND_INSIDE, true); if (gConfigGeneral.TransparentWater) @@ -3701,19 +3441,15 @@ static void TopToolbarInitViewMenu(rct_window* w, rct_widget* widget) gDropdownDefaultIndex = DDIDX_UNDERGROUND_INSIDE; // Opaque water relies on RCT1 sprites. - if (!is_csg_loaded()) + if (!IsCsgLoaded()) { Dropdown::SetDisabled(DDIDX_TRANSPARENT_WATER, true); } } -/** - * - * rct2: 0x0066CF8A - */ -static void TopToolbarViewMenuDropdown(int16_t dropdownIndex) +void TopToolbar::ViewMenuDropdown(int16_t dropdownIndex) { - rct_window* w = window_get_main(); + auto* w = WindowGetMain(); if (w != nullptr) { switch (dropdownIndex) @@ -3765,7 +3501,7 @@ static void TopToolbarViewMenuDropdown(int16_t dropdownIndex) w->viewport->flags ^= VIEWPORT_FLAG_PATH_HEIGHTS; break; case DDIDX_VIEW_CLIPPING: - if (window_find_by_class(WindowClass::ViewClipping) == nullptr) + if (WindowFindByClass(WindowClass::ViewClipping) == nullptr) { ContextOpenWindow(WindowClass::ViewClipping); } @@ -3788,142 +3524,335 @@ static void TopToolbarViewMenuDropdown(int16_t dropdownIndex) } } -/** - * - * rct2: 0x0066CCE7 - */ -static void ToggleFootpathWindow() +void TopToolbar::InitMapMenu(Widget& widget) { - if (window_find_by_class(WindowClass::Footpath) == nullptr) + auto i = 0; + gDropdownItems[i++].Format = STR_SHORTCUT_SHOW_MAP; + gDropdownItems[i++].Format = STR_EXTRA_VIEWPORT; + if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && gEditorStep == EditorStep::LandscapeEditor) { - ContextOpenWindow(WindowClass::Footpath); + gDropdownItems[i++].Format = STR_MAPGEN_WINDOW_TITLE; + } + +#ifdef ENABLE_SCRIPTING + const auto& customMenuItems = OpenRCT2::Scripting::CustomMenuItems; + if (!customMenuItems.empty()) + { + gDropdownItems[i++].Format = STR_EMPTY; + for (const auto& item : customMenuItems) + { + if (item.Kind == OpenRCT2::Scripting::CustomToolbarMenuItemKind::Standard) + { + gDropdownItems[i].Format = STR_STRING; + auto sz = item.Text.c_str(); + std::memcpy(&gDropdownItems[i].Args, &sz, sizeof(const char*)); + i++; + } + } + } +#endif + + WindowDropdownShowText( + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1] | 0x80, 0, i); + gDropdownDefaultIndex = DDIDX_SHOW_MAP; +} + +void TopToolbar::MapMenuDropdown(int16_t dropdownIndex) +{ + int32_t customStartIndex = 3; + if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && gEditorStep == EditorStep::LandscapeEditor) + { + customStartIndex++; + } + + if (dropdownIndex < customStartIndex) + { + switch (dropdownIndex) + { + case 0: + ContextOpenWindow(WindowClass::Map); + break; + case 1: + ContextOpenWindow(WindowClass::Viewport); + break; + case 2: + ContextOpenWindow(WindowClass::Mapgen); + break; + } } else { - tool_cancel(); - window_close_by_class(WindowClass::Footpath); +#ifdef ENABLE_SCRIPTING + const auto& customMenuItems = OpenRCT2::Scripting::CustomMenuItems; + auto customIndex = static_cast(dropdownIndex - customStartIndex); + size_t i = 0; + for (const auto& item : customMenuItems) + { + if (item.Kind == OpenRCT2::Scripting::CustomToolbarMenuItemKind::Standard) + { + if (i == customIndex) + { + item.Invoke(); + break; + } + i++; + } + } +#endif } } -/** - * - * rct2: 0x0066CD54 - */ -static void ToggleLandWindow(rct_window* topToolbar, WidgetIndex widgetIndex) +void TopToolbar::InitFastforwardMenu(Widget& widget) { - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar - && gCurrentToolWidget.widget_index == WIDX_LAND) + int32_t num_items = 4; + gDropdownItems[0].Format = STR_TOGGLE_OPTION; + gDropdownItems[1].Format = STR_TOGGLE_OPTION; + gDropdownItems[2].Format = STR_TOGGLE_OPTION; + gDropdownItems[3].Format = STR_TOGGLE_OPTION; + if (gConfigGeneral.DebuggingTools) { - tool_cancel(); + gDropdownItems[4].Format = STR_EMPTY; + gDropdownItems[5].Format = STR_TOGGLE_OPTION; + gDropdownItems[5].Args = STR_SPEED_HYPER; + num_items = 6; + } + + gDropdownItems[0].Args = STR_SPEED_NORMAL; + gDropdownItems[1].Args = STR_SPEED_QUICK; + gDropdownItems[2].Args = STR_SPEED_FAST; + gDropdownItems[3].Args = STR_SPEED_TURBO; + + WindowDropdownShowText( + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, 0, num_items); + + // Set checkmarks + if (gGameSpeed <= 4) + { + Dropdown::SetChecked(gGameSpeed - 1, true); + } + if (gGameSpeed == 8) + { + Dropdown::SetChecked(5, true); + } + + if (gConfigGeneral.DebuggingTools) + { + gDropdownDefaultIndex = (gGameSpeed == 8 ? 0 : gGameSpeed); } else { - _landToolBlocked = false; - show_gridlines(); - tool_set(*topToolbar, widgetIndex, Tool::DigDown); - input_set_flag(INPUT_FLAG_6, true); - ContextOpenWindow(WindowClass::Land); + gDropdownDefaultIndex = (gGameSpeed >= 4 ? 0 : gGameSpeed); } -} - -/** - * - * rct2: 0x0066CD0C - */ -static void ToggleClearSceneryWindow(rct_window* topToolbar, WidgetIndex widgetIndex) -{ - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar - && gCurrentToolWidget.widget_index == WIDX_CLEAR_SCENERY)) + if (gDropdownDefaultIndex == 4) { - tool_cancel(); + gDropdownDefaultIndex = 5; } - else +} + +void TopToolbar::FastforwardMenuDropdown(int16_t dropdownIndex) +{ + auto* w = WindowGetMain(); + if (w != nullptr) { - show_gridlines(); - tool_set(*topToolbar, widgetIndex, Tool::Crosshair); - input_set_flag(INPUT_FLAG_6, true); - ContextOpenWindow(WindowClass::ClearScenery); + if (dropdownIndex >= 0 && dropdownIndex <= 5) + { + gGameSpeed = dropdownIndex + 1; + if (gGameSpeed >= 5) + gGameSpeed = 8; + w->Invalidate(); + } } } -/** - * - * rct2: 0x0066CD9C - */ -static void ToggleWaterWindow(rct_window* topToolbar, WidgetIndex widgetIndex) +void TopToolbar::InitRotateMenu(Widget& widget) { - if ((input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar - && gCurrentToolWidget.widget_index == WIDX_WATER) + gDropdownItems[0].Format = STR_ROTATE_CLOCKWISE; + gDropdownItems[1].Format = STR_ROTATE_ANTI_CLOCKWISE; + + WindowDropdownShowText( + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1] | 0x80, 0, 2); + + gDropdownDefaultIndex = DDIDX_ROTATE_CLOCKWISE; +} + +void TopToolbar::RotateMenuDropdown(int16_t dropdownIndex) +{ + auto* w = WindowGetMain(); + if (w != nullptr) { - tool_cancel(); + if (dropdownIndex == 0) + { + WindowRotateCamera(*w, 1); + w->Invalidate(); + } + else if (dropdownIndex == 1) + { + WindowRotateCamera(*w, -1); + w->Invalidate(); + } } - else +} + +void TopToolbar::InitCheatsMenu(Widget& widget) +{ + using namespace Dropdown; + + constexpr ItemExt items[] = { + ToggleOption(DDIDX_CHEATS, STR_CHEAT_TITLE), + ToggleOption(DDIDX_TILE_INSPECTOR, STR_DEBUG_DROPDOWN_TILE_INSPECTOR), + ToggleOption(DDIDX_OBJECT_SELECTION, STR_DEBUG_DROPDOWN_OBJECT_SELECTION), + ToggleOption(DDIDX_INVENTIONS_LIST, STR_DEBUG_DROPDOWN_INVENTIONS_LIST), + ToggleOption(DDIDX_SCENARIO_OPTIONS, STR_DEBUG_DROPDOWN_SCENARIO_OPTIONS), + ToggleOption(DDIDX_OBJECTIVE_OPTIONS, STR_CHEATS_MENU_OBJECTIVE_OPTIONS), + Separator(), + ToggleOption(DDIDX_ENABLE_SANDBOX_MODE, STR_ENABLE_SANDBOX_MODE), + ToggleOption(DDIDX_DISABLE_CLEARANCE_CHECKS, STR_DISABLE_CLEARANCE_CHECKS), + ToggleOption(DDIDX_DISABLE_SUPPORT_LIMITS, STR_DISABLE_SUPPORT_LIMITS), + }; + static_assert(ItemIDsMatchIndices(items)); + + SetItems(items); + + WindowDropdownShowText( + { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[0] | 0x80, 0, + TOP_TOOLBAR_CHEATS_COUNT); + + // Disable items that are not yet available in multiplayer + if (NetworkGetMode() != NETWORK_MODE_NONE) { - _landToolBlocked = false; - show_gridlines(); - tool_set(*topToolbar, widgetIndex, Tool::WaterDown); - input_set_flag(INPUT_FLAG_6, true); - ContextOpenWindow(WindowClass::Water); + Dropdown::SetDisabled(DDIDX_OBJECT_SELECTION, true); + Dropdown::SetDisabled(DDIDX_INVENTIONS_LIST, true); + Dropdown::SetDisabled(DDIDX_OBJECTIVE_OPTIONS, true); + } + + if (gScreenFlags & SCREEN_FLAGS_EDITOR) + { + Dropdown::SetDisabled(DDIDX_OBJECT_SELECTION, true); + Dropdown::SetDisabled(DDIDX_INVENTIONS_LIST, true); + Dropdown::SetDisabled(DDIDX_SCENARIO_OPTIONS, true); + Dropdown::SetDisabled(DDIDX_OBJECTIVE_OPTIONS, true); + Dropdown::SetDisabled(DDIDX_ENABLE_SANDBOX_MODE, true); + } + + if (gCheatsSandboxMode) + { + Dropdown::SetChecked(DDIDX_ENABLE_SANDBOX_MODE, true); + } + if (gCheatsDisableClearanceChecks) + { + Dropdown::SetChecked(DDIDX_DISABLE_CLEARANCE_CHECKS, true); + } + if (gCheatsDisableSupportLimits) + { + Dropdown::SetChecked(DDIDX_DISABLE_SUPPORT_LIMITS, true); + } + + gDropdownDefaultIndex = DDIDX_CHEATS; +} + +void TopToolbar::CheatsMenuDropdown(int16_t dropdownIndex) +{ + switch (dropdownIndex) + { + case DDIDX_CHEATS: + ContextOpenWindow(WindowClass::Cheats); + break; + case DDIDX_TILE_INSPECTOR: + ContextOpenWindow(WindowClass::TileInspector); + break; + case DDIDX_OBJECT_SELECTION: + WindowCloseAll(); + ContextOpenWindow(WindowClass::EditorObjectSelection); + break; + case DDIDX_INVENTIONS_LIST: + ContextOpenWindow(WindowClass::EditorInventionList); + break; + case DDIDX_SCENARIO_OPTIONS: + ContextOpenWindow(WindowClass::EditorScenarioOptions); + break; + case DDIDX_OBJECTIVE_OPTIONS: + ContextOpenWindow(WindowClass::EditorObjectiveOptions); + break; + case DDIDX_ENABLE_SANDBOX_MODE: + CheatsSet(CheatType::SandboxMode, !gCheatsSandboxMode); + break; + case DDIDX_DISABLE_CLEARANCE_CHECKS: + CheatsSet(CheatType::DisableClearanceChecks, !gCheatsDisableClearanceChecks); + break; + case DDIDX_DISABLE_SUPPORT_LIMITS: + CheatsSet(CheatType::DisableSupportLimits, !gCheatsDisableSupportLimits); + break; } } -/** - * - * rct2: 0x0066D104 - */ -bool LandToolIsActive() +void TopToolbar::InitDebugMenu(Widget& widget) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) - return false; - if (gCurrentToolWidget.window_classification != WindowClass::TopToolbar) - return false; - if (gCurrentToolWidget.widget_index != WIDX_LAND) - return false; - return true; + gDropdownItems[DDIDX_CONSOLE].Format = STR_TOGGLE_OPTION; + gDropdownItems[DDIDX_CONSOLE].Args = STR_DEBUG_DROPDOWN_CONSOLE; + gDropdownItems[DDIDX_DEBUG_PAINT].Format = STR_TOGGLE_OPTION; + 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); + + Dropdown::SetChecked(DDIDX_DEBUG_PAINT, WindowFindByClass(WindowClass::DebugPaint) != nullptr); } -/** - * - * rct2: 0x0066D125 - */ -bool ClearSceneryToolIsActive() +void TopToolbar::DebugMenuDropdown(int16_t dropdownIndex) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) - return false; - if (gCurrentToolWidget.window_classification != WindowClass::TopToolbar) - return false; - if (gCurrentToolWidget.widget_index != WIDX_CLEAR_SCENERY) - return false; - return true; + auto* w = WindowGetMain(); + if (w != nullptr) + { + switch (dropdownIndex) + { + case DDIDX_CONSOLE: + { + auto& console = GetInGameConsole(); + console.Open(); + break; + } + case DDIDX_DEBUG_PAINT: + if (WindowFindByClass(WindowClass::DebugPaint) == nullptr) + { + ContextOpenWindow(WindowClass::DebugPaint); + } + else + { + WindowCloseByClass(WindowClass::DebugPaint); + } + break; + } + } } -/** - * - * rct2: 0x0066D125 - */ -bool WaterToolIsActive() +void TopToolbar::InitNetworkMenu(Widget& widget) { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) - return false; - if (gCurrentToolWidget.window_classification != WindowClass::TopToolbar) - return false; - if (gCurrentToolWidget.widget_index != WIDX_WATER) - return false; - return true; + gDropdownItems[DDIDX_MULTIPLAYER].Format = STR_MULTIPLAYER; + 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); + + Dropdown::SetDisabled(DDIDX_MULTIPLAYER_RECONNECT, !NetworkIsDesynchronised()); + + gDropdownDefaultIndex = DDIDX_MULTIPLAYER; } -static ClearAction GetClearAction() +void TopToolbar::NetworkMenuDropdown(int16_t dropdownIndex) { - auto range = MapRange(gMapSelectPositionA.x, gMapSelectPositionA.y, gMapSelectPositionB.x, gMapSelectPositionB.y); - - ClearableItems itemsToClear = 0; - - if (gClearSmallScenery) - itemsToClear |= CLEARABLE_ITEMS::SCENERY_SMALL; - if (gClearLargeScenery) - itemsToClear |= CLEARABLE_ITEMS::SCENERY_LARGE; - if (gClearFootpath) - itemsToClear |= CLEARABLE_ITEMS::SCENERY_FOOTPATH; - - return ClearAction(range, itemsToClear); + auto* w = WindowGetMain(); + if (w != nullptr) + { + switch (dropdownIndex) + { + case DDIDX_MULTIPLAYER: + ContextOpenWindow(WindowClass::Multiplayer); + break; + case DDIDX_MULTIPLAYER_RECONNECT: + NetworkReconnect(); + break; + } + } } diff --git a/src/openrct2-ui/windows/TrackDesignManage.cpp b/src/openrct2-ui/windows/TrackDesignManage.cpp index eece1badd5..aecab10a40 100644 --- a/src/openrct2-ui/windows/TrackDesignManage.cpp +++ b/src/openrct2-ui/windows/TrackDesignManage.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,14 +38,14 @@ enum { WIDX_PROMPT_CANCEL = 4, }; -static rct_widget window_track_manage_widgets[] = { +static Widget window_track_manage_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 10, 24}, {110, 12}, WindowWidgetType::Button, WindowColour::Primary, STR_TRACK_MANAGE_RENAME), MakeWidget({130, 24}, {110, 12}, WindowWidgetType::Button, WindowColour::Primary, STR_TRACK_MANAGE_DELETE), WIDGETS_END, }; -static rct_widget window_track_delete_prompt_widgets[] = { +static Widget window_track_delete_prompt_widgets[] = { WINDOW_SHIM(STR_DELETE_FILE, WW_DELETE_PROMPT, WH_DELETE_PROMPT), MakeWidget({ 10, 54}, {110, 12}, WindowWidgetType::Button, WindowColour::Primary, STR_TRACK_MANAGE_DELETE), MakeWidget({130, 54}, {110, 12}, WindowWidgetType::Button, WindowColour::Primary, STR_CANCEL ), @@ -66,7 +66,7 @@ class TrackDesignManageWindow final : public Window void OnClose() override; void OnMouseUp(WidgetIndex widgetIndex) override; void OnTextInput(WidgetIndex widgetIndex, std::string_view text) override; - void OnDraw(rct_drawpixelinfo& dpi) override; + void OnDraw(DrawPixelInfo& dpi) override; }; class TrackDeletePromptWindow final : public Window @@ -79,7 +79,7 @@ class TrackDeletePromptWindow final : public Window void OnOpen() override; void OnMouseUp(WidgetIndex widgetIndex) override; - void OnDraw(rct_drawpixelinfo& dpi) override; + void OnDraw(DrawPixelInfo& dpi) override; }; static void WindowTrackDeletePromptOpen(TrackDesignFileRef* tdFileRef); @@ -89,9 +89,9 @@ static void WindowTrackDesignListReloadTracks(); * * rct2: 0x006D348F */ -rct_window* WindowTrackManageOpen(TrackDesignFileRef* tdFileRef) +WindowBase* WindowTrackManageOpen(TrackDesignFileRef* tdFileRef) { - window_close_by_class(WindowClass::ManageTrackDesign); + WindowCloseByClass(WindowClass::ManageTrackDesign); auto trackDesignManageWindow = std::make_unique(tdFileRef); auto* window = WindowCreate( std::move(trackDesignManageWindow), WindowClass::ManageTrackDesign, {}, WW, WH, @@ -105,7 +105,7 @@ void TrackDesignManageWindow::OnOpen() widgets = window_track_manage_widgets; WindowInitScrollWidgets(*this); - auto* trackDesignListWindow = window_find_by_class(WindowClass::TrackDesignList); + auto* trackDesignListWindow = WindowFindByClass(WindowClass::TrackDesignList); if (trackDesignListWindow != nullptr) { trackDesignListWindow->track_list.track_list_being_updated = true; @@ -114,7 +114,7 @@ void TrackDesignManageWindow::OnOpen() void TrackDesignManageWindow::OnClose() { - rct_window* trackDesignListWindow = window_find_by_class(WindowClass::TrackDesignList); + WindowBase* trackDesignListWindow = WindowFindByClass(WindowClass::TrackDesignList); if (trackDesignListWindow != nullptr) { trackDesignListWindow->track_list.track_list_being_updated = false; @@ -126,7 +126,7 @@ void TrackDesignManageWindow::OnMouseUp(WidgetIndex widgetIndex) switch (widgetIndex) { case WIDX_CLOSE: - window_close_by_class(WindowClass::TrackDeletePrompt); + WindowCloseByClass(WindowClass::TrackDeletePrompt); Close(); break; case WIDX_RENAME: @@ -157,9 +157,9 @@ void TrackDesignManageWindow::OnTextInput(WidgetIndex widgetIndex, std::string_v return; } - if (track_repository_rename(_trackDesignFileReference->path, std::string(text))) + if (TrackRepositoryRename(_trackDesignFileReference->path, std::string(text))) { - window_close_by_class(WindowClass::TrackDeletePrompt); + WindowCloseByClass(WindowClass::TrackDeletePrompt); Close(); WindowTrackDesignListReloadTracks(); } @@ -169,7 +169,7 @@ void TrackDesignManageWindow::OnTextInput(WidgetIndex widgetIndex, std::string_v } } -void TrackDesignManageWindow::OnDraw(rct_drawpixelinfo& dpi) +void TrackDesignManageWindow::OnDraw(DrawPixelInfo& dpi) { Formatter::Common().Add(_trackDesignFileReference->name.c_str()); DrawWidgets(dpi); @@ -181,7 +181,7 @@ void TrackDesignManageWindow::OnDraw(rct_drawpixelinfo& dpi) */ static void WindowTrackDeletePromptOpen(TrackDesignFileRef* tdFileRef) { - window_close_by_class(WindowClass::TrackDeletePrompt); + WindowCloseByClass(WindowClass::TrackDeletePrompt); int32_t screenWidth = ContextGetWidth(); int32_t screenHeight = ContextGetHeight(); @@ -210,9 +210,9 @@ void TrackDeletePromptWindow::OnMouseUp(WidgetIndex widgetIndex) // tdPath has to be saved before window is closed, as that would blank it out. auto tdPath = _trackDesignFileReference->path; Close(); - if (track_repository_delete(tdPath)) + if (TrackRepositoryDelete(tdPath)) { - window_close_by_class(WindowClass::ManageTrackDesign); + WindowCloseByClass(WindowClass::ManageTrackDesign); WindowTrackDesignListReloadTracks(); } else @@ -223,20 +223,20 @@ void TrackDeletePromptWindow::OnMouseUp(WidgetIndex widgetIndex) } } -void TrackDeletePromptWindow::OnDraw(rct_drawpixelinfo& dpi) +void TrackDeletePromptWindow::OnDraw(DrawPixelInfo& dpi) { DrawWidgets(dpi); auto ft = Formatter(); ft.Add(_trackDesignFileReference->name.c_str()); DrawTextWrapped( - &dpi, { windowPos.x + (WW_DELETE_PROMPT / 2), windowPos.y + ((WH_DELETE_PROMPT / 2) - 9) }, (WW_DELETE_PROMPT - 4), + dpi, { windowPos.x + (WW_DELETE_PROMPT / 2), windowPos.y + ((WH_DELETE_PROMPT / 2) - 9) }, (WW_DELETE_PROMPT - 4), STR_ARE_YOU_SURE_YOU_WANT_TO_PERMANENTLY_DELETE_TRACK, ft, { TextAlignment::CENTRE }); } static void WindowTrackDesignListReloadTracks() { - rct_window* trackListWindow = window_find_by_class(WindowClass::TrackDesignList); + WindowBase* trackListWindow = WindowFindByClass(WindowClass::TrackDesignList); if (trackListWindow != nullptr) { trackListWindow->track_list.reload_track_designs = true; diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 9c4d508e94..0763bb6e3c 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -61,10 +61,10 @@ enum { validate_global_widx(WC_TRACK_DESIGN_PLACE, WIDX_ROTATE); -static rct_widget window_track_place_widgets[] = { +static Widget window_track_place_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget({173, 83}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, SPR_ROTATE_ARROW, STR_ROTATE_90_TIP ), - MakeWidget({173, 59}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, SPR_MIRROR_ARROW, STR_MIRROR_IMAGE_TIP ), + MakeWidget({173, 83}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_90_TIP ), + MakeWidget({173, 59}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Primary, ImageId(SPR_MIRROR_ARROW), STR_MIRROR_IMAGE_TIP ), MakeWidget({ 4, 109}, {192, 12}, WindowWidgetType::Button, WindowColour::Primary, STR_SELECT_A_DIFFERENT_DESIGN, STR_GO_BACK_TO_DESIGN_SELECTION_WINDOW_TIP), MakeWidget({ 0, 0}, { 1, 1}, WindowWidgetType::Empty, WindowColour::Primary), WIDGETS_END, @@ -79,24 +79,24 @@ public: { widgets = window_track_place_widgets; WindowInitScrollWidgets(*this); - tool_set(*this, WIDX_PRICE, Tool::Crosshair); - input_set_flag(INPUT_FLAG_6, true); - window_push_others_right(*this); - show_gridlines(); + ToolSet(*this, WIDX_PRICE, Tool::Crosshair); + InputSetFlag(INPUT_FLAG_6, true); + WindowPushOthersRight(*this); + ShowGridlines(); _miniPreview.resize(TRACK_MINI_PREVIEW_SIZE); - _placementCost = MONEY32_UNDEFINED; + _placementCost = MONEY64_UNDEFINED; _placementLoc.SetNull(); - _currentTrackPieceDirection = (2 - get_current_rotation()) & 3; + _currentTrackPieceDirection = (2 - GetCurrentRotation()) & 3; } void OnClose() override { ClearProvisional(); - viewport_set_visibility(0); + ViewportSetVisibility(0); MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - hide_gridlines(); + HideGridlines(); _miniPreview.clear(); _miniPreview.shrink_to_fit(); _trackDesign = nullptr; @@ -127,8 +127,8 @@ public: Close(); auto intent = Intent(WindowClass::TrackDesignList); - intent.putExtra(INTENT_EXTRA_RIDE_TYPE, _window_track_list_item.Type); - intent.putExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, _window_track_list_item.EntryIndex); + intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, _window_track_list_item.Type); + intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, _window_track_list_item.EntryIndex); ContextOpenIntent(&intent); break; } @@ -136,7 +136,7 @@ public: void OnUpdate() override { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) if (gCurrentToolWidget.window_classification != WindowClass::TrackDesignPlace) Close(); } @@ -163,17 +163,17 @@ public: if (mapCoords == _placementLoc) { TrackDesignPreviewDrawOutlines( - tds, _trackDesign.get(), GetOrAllocateRide(PreviewRideId), { mapCoords, 0, _currentTrackPieceDirection }); + tds, _trackDesign.get(), RideGetTemporaryForPreview(), { mapCoords, 0, _currentTrackPieceDirection }); return; } - money32 cost = MONEY32_UNDEFINED; + money64 cost = MONEY64_UNDEFINED; // Get base Z position mapZ = GetBaseZ(mapCoords); CoordsXYZD trackLoc = { mapCoords, mapZ, _currentTrackPieceDirection }; - if (game_is_not_paused() || gCheatsBuildInPauseMode) + if (GameIsNotPaused() || gCheatsBuildInPauseMode) { ClearProvisional(); auto res = FindValidTrackDesignPlaceHeight(trackLoc, GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST); @@ -192,7 +192,7 @@ public: } }); res = GameActions::Execute(&tdAction); - cost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY32_UNDEFINED; + cost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; } } @@ -200,10 +200,10 @@ public: if (cost != _placementCost) { _placementCost = cost; - widget_invalidate(*this, WIDX_PRICE); + WidgetInvalidate(*this, WIDX_PRICE); } - TrackDesignPreviewDrawOutlines(tds, _trackDesign.get(), GetOrAllocateRide(PreviewRideId), trackLoc); + TrackDesignPreviewDrawOutlines(tds, _trackDesign.get(), RideGetTemporaryForPreview(), trackLoc); } void OnToolDown(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override @@ -230,26 +230,26 @@ public: if (result->Error == GameActions::Status::Ok) { rideId = result->GetData(); - auto getRide = get_ride(rideId); + auto getRide = GetRide(rideId); if (getRide != nullptr) { - window_close_by_class(WindowClass::Error); + WindowCloseByClass(WindowClass::Error); OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, trackLoc); _currentRideIndex = rideId; - if (track_design_are_entrance_and_exit_placed()) + if (TrackDesignAreEntranceAndExitPlaced()) { auto intent = Intent(WindowClass::Ride); - intent.putExtra(INTENT_EXTRA_RIDE_ID, rideId.ToUnderlying()); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, rideId.ToUnderlying()); ContextOpenIntent(&intent); - auto wnd = window_find_by_class(WindowClass::TrackDesignPlace); - window_close(*wnd); + auto wnd = WindowFindByClass(WindowClass::TrackDesignPlace); + WindowClose(*wnd); } else { - ride_initialise_construction_window(getRide); - auto wnd = window_find_by_class(WindowClass::RideConstruction); - window_event_mouse_up_call(wnd, WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE); + RideInitialiseConstructionWindow(*getRide); + auto wnd = WindowFindByClass(WindowClass::RideConstruction); + WindowEventMouseUpCall(wnd, WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE); } } } @@ -284,31 +284,31 @@ public: DrawMiniPreview(_trackDesign.get()); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto ft = Formatter::Common(); ft.Add(_trackDesign->name.c_str()); WindowDrawWidgets(*this, &dpi); // Draw mini tile preview - rct_drawpixelinfo clippedDpi; - if (clip_drawpixelinfo(&clippedDpi, &dpi, this->windowPos + ScreenCoordsXY{ 4, 18 }, 168, 78)) + DrawPixelInfo clippedDpi; + if (ClipDrawPixelInfo(&clippedDpi, &dpi, this->windowPos + ScreenCoordsXY{ 4, 18 }, 168, 78)) { - rct_g1_element g1temp = {}; + G1Element g1temp = {}; g1temp.offset = _miniPreview.data(); g1temp.width = TRACK_MINI_PREVIEW_WIDTH; g1temp.height = TRACK_MINI_PREVIEW_HEIGHT; - gfx_set_g1_element(SPR_TEMP, &g1temp); - drawing_engine_invalidate_image(SPR_TEMP); - gfx_draw_sprite(&clippedDpi, ImageId(SPR_TEMP, NOT_TRANSLUCENT(this->colours[0])), { 0, 0 }); + GfxSetG1Element(SPR_TEMP, &g1temp); + DrawingEngineInvalidateImage(SPR_TEMP); + GfxDrawSprite(&clippedDpi, ImageId(SPR_TEMP, NOT_TRANSLUCENT(this->colours[0])), { 0, 0 }); } // Price - if (_placementCost != MONEY32_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) + if (_placementCost != MONEY64_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { ft = Formatter(); ft.Add(_placementCost); - DrawTextBasic(&dpi, this->windowPos + ScreenCoordsXY{ 88, 94 }, STR_COST_LABEL, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, this->windowPos + ScreenCoordsXY{ 88, 94 }, STR_COST_LABEL, ft, { TextAlignment::CENTRE }); } } @@ -316,10 +316,10 @@ public: { if (_hasPlacementGhost) { - auto provRide = get_ride(_placementGhostRideId); + auto provRide = GetRide(_placementGhostRideId); if (provRide != nullptr) { - TrackDesignPreviewRemoveGhosts(_trackDesign.get(), provRide, _placementGhostLoc); + TrackDesignPreviewRemoveGhosts(_trackDesign.get(), *provRide, _placementGhostLoc); } } } @@ -359,7 +359,8 @@ public: origin.y -= ((max.y + min.y) >> 6) * COORDS_XY_STEP; } - if (td6->type == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(td6->type); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { DrawMiniPreviewMaze(td6, pass, origin, min, max); } @@ -382,7 +383,7 @@ private: CoordsXY _placementLoc; RideId _placementGhostRideId; bool _hasPlacementGhost; - money32 _placementCost; + money64 _placementCost; CoordsXYZD _placementGhostLoc; std::vector _miniPreview; @@ -391,10 +392,10 @@ private: { if (_hasPlacementGhost) { - auto newRide = get_ride(_placementGhostRideId); + auto newRide = GetRide(_placementGhostRideId); if (newRide != nullptr) { - TrackDesignPreviewRemoveGhosts(_trackDesign.get(), newRide, _placementGhostLoc); + TrackDesignPreviewRemoveGhosts(_trackDesign.get(), *newRide, _placementGhostLoc); _hasPlacementGhost = false; } } @@ -424,12 +425,12 @@ private: return z + TrackDesignGetZPlacement( - _trackDesign.get(), GetOrAllocateRide(PreviewRideId), { loc, z, _currentTrackPieceDirection }); + _trackDesign.get(), RideGetTemporaryForPreview(), { loc, z, _currentTrackPieceDirection }); } void DrawMiniPreviewTrack(TrackDesign* td6, int32_t pass, const CoordsXY& origin, CoordsXY min, CoordsXY max) { - const uint8_t rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; + const uint8_t rotation = (_currentTrackPieceDirection + GetCurrentRotation()) & 3; CoordsXY curTrackStart = origin; uint8_t curTrackRotation = rotation; @@ -443,7 +444,7 @@ private: // Follow a single track piece shape const auto& ted = GetTrackElementDescriptor(trackType); - const rct_preview_track* trackBlock = ted.Block; + const PreviewTrack* trackBlock = ted.Block; while (trackBlock->index != 255) { auto rotatedAndOffsetTrackBlock = curTrackStart @@ -488,7 +489,7 @@ private: // Change rotation and next position based on track curvature curTrackRotation &= 3; - const rct_track_coordinates* track_coordinate = &ted.Coordinates; + const TrackCoordinates* track_coordinate = &ted.Coordinates; curTrackStart += CoordsXY{ track_coordinate->x, track_coordinate->y }.Rotate(curTrackRotation); curTrackRotation += track_coordinate->rotation_end - track_coordinate->rotation_begin; @@ -536,7 +537,7 @@ private: void DrawMiniPreviewMaze(TrackDesign* td6, int32_t pass, const CoordsXY& origin, CoordsXY min, CoordsXY max) { - uint8_t rotation = (_currentTrackPieceDirection + get_current_rotation()) & 3; + uint8_t rotation = (_currentTrackPieceDirection + GetCurrentRotation()) & 3; for (const auto& mazeElement : td6->maze_elements) { auto rotatedMazeCoords = origin + TileCoordsXY{ mazeElement.x, mazeElement.y }.ToCoordsXY().Rotate(rotation); @@ -611,7 +612,7 @@ private: } }; -rct_window* WindowTrackPlaceOpen(const TrackDesignFileRef* tdFileRef) +WindowBase* WindowTrackPlaceOpen(const TrackDesignFileRef* tdFileRef) { std::unique_ptr openTrackDesign = TrackDesignImport(tdFileRef->path.c_str()); @@ -620,7 +621,7 @@ rct_window* WindowTrackPlaceOpen(const TrackDesignFileRef* tdFileRef) return nullptr; } - window_close_construction_windows(); + WindowCloseConstructionWindows(); auto* window = WindowFocusOrCreate(WindowClass::TrackDesignPlace, WW, WH, 0); if (window != nullptr) @@ -632,7 +633,7 @@ rct_window* WindowTrackPlaceOpen(const TrackDesignFileRef* tdFileRef) void TrackPlaceClearProvisionalTemporarily() { - auto* trackPlaceWnd = static_cast(window_find_by_class(WindowClass::TrackDesignPlace)); + auto* trackPlaceWnd = static_cast(WindowFindByClass(WindowClass::TrackDesignPlace)); if (trackPlaceWnd != nullptr) { trackPlaceWnd->ClearProvisionalTemporarily(); @@ -641,7 +642,7 @@ void TrackPlaceClearProvisionalTemporarily() void TrackPlaceRestoreProvisional() { - auto* trackPlaceWnd = static_cast(window_find_by_class(WindowClass::TrackDesignPlace)); + auto* trackPlaceWnd = static_cast(WindowFindByClass(WindowClass::TrackDesignPlace)); if (trackPlaceWnd != nullptr) { trackPlaceWnd->RestoreProvisional(); diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index a75d13c76b..915d39c038 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -51,15 +51,15 @@ enum { validate_global_widx(WC_TRACK_DESIGN_LIST, WIDX_ROTATE); -static rct_widget window_track_list_widgets[] = { +static Widget window_track_list_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 4, 18}, {218, 13}, WindowWidgetType::TableHeader, WindowColour::Primary , STR_SELECT_OTHER_RIDE ), MakeWidget({ 4, 32}, {124, 13}, WindowWidgetType::TextBox, WindowColour::Secondary ), MakeWidget({130, 32}, { 92, 13}, WindowWidgetType::Button, WindowColour::Primary , STR_OBJECT_SEARCH_CLEAR ), MakeWidget({ 4, 46}, {218, 381}, WindowWidgetType::Scroll, WindowColour::Primary , SCROLL_VERTICAL, STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP), MakeWidget({224, 18}, {372, 219}, WindowWidgetType::FlatBtn, WindowColour::Primary ), - MakeWidget({572, 405}, { ROTATE_AND_SCENERY_BUTTON_SIZE, ROTATE_AND_SCENERY_BUTTON_SIZE}, WindowWidgetType::FlatBtn, WindowColour::Primary , SPR_ROTATE_ARROW, STR_ROTATE_90_TIP ), - MakeWidget({572, 381}, { ROTATE_AND_SCENERY_BUTTON_SIZE, ROTATE_AND_SCENERY_BUTTON_SIZE}, WindowWidgetType::FlatBtn, WindowColour::Primary , SPR_SCENERY, STR_TOGGLE_SCENERY_TIP ), + MakeWidget({572, 405}, { ROTATE_AND_SCENERY_BUTTON_SIZE, ROTATE_AND_SCENERY_BUTTON_SIZE}, WindowWidgetType::FlatBtn, WindowColour::Primary , ImageId(SPR_ROTATE_ARROW), STR_ROTATE_90_TIP ), + MakeWidget({572, 381}, { ROTATE_AND_SCENERY_BUTTON_SIZE, ROTATE_AND_SCENERY_BUTTON_SIZE}, WindowWidgetType::FlatBtn, WindowColour::Primary , ImageId(SPR_SCENERY), STR_TOGGLE_SCENERY_TIP ), WIDGETS_END, }; @@ -114,7 +114,7 @@ private: if (listIndex == 0) { Close(); - ride_construct_new(_window_track_list_item); + RideConstructNew(_window_track_list_item); return; } listIndex--; @@ -137,7 +137,7 @@ private: if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { auto intent = Intent(WindowClass::ManageTrackDesign); - intent.putExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); + intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); ContextOpenIntent(&intent); } else @@ -149,7 +149,7 @@ private: } auto intent = Intent(WindowClass::TrackDesignPlace); - intent.putExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); + intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); ContextOpenIntent(&intent); } } @@ -179,7 +179,7 @@ private: { if (GetRideTypeDescriptor(item.Type).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { - entryName = get_ride_entry_name(item.EntryIndex); + entryName = GetRideEntryName(item.EntryIndex); } } _trackDesigns = repo->GetItemsForObjectEntry(item.Type, entryName); @@ -224,7 +224,7 @@ public: selected_list_item = 1; } gTrackDesignSceneryToggle = false; - window_push_others_right(*this); + WindowPushOthersRight(*this); _currentTrackPieceDirection = 2; _trackDesignPreviewPixels.resize(4 * TRACK_PREVIEW_IMAGE_SIZE); @@ -249,8 +249,8 @@ public: // try to load the track manager again, and an infinite loop will result. if ((gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && gScreenAge != 0) { - window_close_by_number(WindowClass::ManageTrackDesign, number); - window_close_by_number(WindowClass::TrackDeletePrompt, number); + WindowCloseByNumber(WindowClass::ManageTrackDesign, number); + WindowCloseByNumber(WindowClass::TrackDeletePrompt, number); Editor::LoadTrackManager(); } } @@ -280,8 +280,7 @@ public: } break; case WIDX_FILTER_STRING: - window_start_textbox( - *this, widgetIndex, STR_STRING, _filterString, sizeof(_filterString)); // TODO check this out + WindowStartTextbox(*this, widgetIndex, STR_STRING, _filterString, sizeof(_filterString)); // TODO check this out break; case WIDX_FILTER_CLEAR: // Keep the highlighted item selected @@ -345,7 +344,7 @@ public: void OnTextInput(const WidgetIndex widgetIndex, std::string_view text) override { - if (widgetIndex != WIDX_FILTER_STRING || text.empty()) + if (widgetIndex != WIDX_FILTER_STRING) return; if (String::Equals(_filterString, std::string(text).c_str())) @@ -363,11 +362,11 @@ public: void OnPrepareDraw() override { StringId stringId = STR_NONE; - rct_ride_entry* entry = get_ride_entry(_window_track_list_item.EntryIndex); + const auto* entry = GetRideEntryByIndex(_window_track_list_item.EntryIndex); if (entry != nullptr) { - RideNaming rideName = get_ride_naming(_window_track_list_item.Type, entry); + RideNaming rideName = GetRideNaming(_window_track_list_item.Type, *entry); stringId = rideName.Name; } @@ -421,8 +420,8 @@ public: { if (gCurrentTextBox.window.classification == classification && gCurrentTextBox.window.number == number) { - window_update_textbox_caret(); - widget_invalidate(*this, WIDX_FILTER_STRING); // TODO Check this + WindowUpdateTextboxCaret(); + WidgetInvalidate(*this, WIDX_FILTER_STRING); // TODO Check this } if (track_list.reload_track_designs) @@ -434,7 +433,7 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); @@ -465,16 +464,16 @@ public: { utf8 pathBuffer[MAX_PATH]; const utf8* pathPtr = pathBuffer; - shorten_path(pathBuffer, sizeof(pathBuffer), path.c_str(), width, FontStyle::Medium); + ShortenPath(pathBuffer, sizeof(pathBuffer), path.c_str(), width, FontStyle::Medium); auto ft = Formatter(); ft.Add(pathPtr); DrawTextBasic( - &dpi, windowPos + ScreenCoordsXY{ 0, height - DEBUG_PATH_HEIGHT - 3 }, STR_STRING, ft, + dpi, windowPos + ScreenCoordsXY{ 0, height - DEBUG_PATH_HEIGHT - 3 }, STR_STRING, ft, { colours[1] }); // TODO Check dpi } auto screenPos = windowPos + ScreenCoordsXY{ tdWidget.left + 1, tdWidget.top + 1 }; - gfx_fill_rect(&dpi, { screenPos, screenPos + ScreenCoordsXY{ 369, 216 } }, colour); // TODO Check dpi + GfxFillRect(&dpi, { screenPos, screenPos + ScreenCoordsXY{ 369, 216 } }, colour); // TODO Check dpi if (_loadedTrackDesignIndex != trackIndex) { @@ -496,14 +495,14 @@ public: auto trackPreview = screenPos; screenPos = windowPos + ScreenCoordsXY{ tdWidget.midX(), tdWidget.midY() }; - rct_g1_element g1temp = {}; + G1Element g1temp = {}; g1temp.offset = _trackDesignPreviewPixels.data() + (_currentTrackPieceDirection * TRACK_PREVIEW_IMAGE_SIZE); g1temp.width = 370; g1temp.height = 217; g1temp.flags = G1_FLAG_HAS_TRANSPARENCY; - gfx_set_g1_element(SPR_TEMP, &g1temp); - drawing_engine_invalidate_image(SPR_TEMP); - gfx_draw_sprite(&dpi, ImageId(SPR_TEMP), trackPreview); + GfxSetG1Element(SPR_TEMP, &g1temp); + DrawingEngineInvalidateImage(SPR_TEMP); + GfxDrawSprite(&dpi, ImageId(SPR_TEMP), trackPreview); screenPos.y = windowPos.y + tdWidget.bottom - 12; @@ -512,7 +511,7 @@ public: && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { // Vehicle design not available - DrawTextEllipsised(&dpi, screenPos, 368, STR_VEHICLE_DESIGN_UNAVAILABLE, {}, { TextAlignment::CENTRE }); + DrawTextEllipsised(dpi, screenPos, 368, STR_VEHICLE_DESIGN_UNAVAILABLE, {}, { TextAlignment::CENTRE }); screenPos.y -= SCROLLABLE_ROW_HEIGHT; } @@ -522,7 +521,7 @@ public: { // Scenery not available DrawTextEllipsised( - &dpi, screenPos, 368, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE }); + dpi, screenPos, 368, STR_DESIGN_INCLUDES_SCENERY_WHICH_IS_UNAVAILABLE, {}, { TextAlignment::CENTRE }); screenPos.y -= SCROLLABLE_ROW_HEIGHT; } } @@ -530,7 +529,7 @@ public: // Track design name auto ft = Formatter(); ft.Add(_trackDesigns[trackIndex].name.c_str()); - DrawTextEllipsised(&dpi, screenPos, 368, STR_TRACK_PREVIEW_NAME_FORMAT, ft, { TextAlignment::CENTRE }); + DrawTextEllipsised(dpi, screenPos, 368, STR_TRACK_PREVIEW_NAME_FORMAT, ft, { TextAlignment::CENTRE }); // Information screenPos = windowPos + ScreenCoordsXY{ tdWidget.left + 1, tdWidget.bottom + 2 }; @@ -538,30 +537,31 @@ public: // Stats ft = Formatter(); ft.Add(_loadedTrackDesign->excitement * 10); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); screenPos.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(_loadedTrackDesign->intensity * 10); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); screenPos.y += LIST_ROW_HEIGHT; ft = Formatter(); ft.Add(_loadedTrackDesign->nausea * 10); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); screenPos.y += LIST_ROW_HEIGHT + 4; // Information for tracked rides. if (GetRideTypeDescriptor(_loadedTrackDesign->type).HasFlag(RIDE_TYPE_FLAG_HAS_TRACK)) { - if (_loadedTrackDesign->type != RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(_loadedTrackDesign->type); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { if (_loadedTrackDesign->type == RIDE_TYPE_MINI_GOLF) { // Holes ft = Formatter(); ft.Add(_loadedTrackDesign->holes & 0x1F); - DrawTextBasic(&dpi, screenPos, STR_HOLES, ft); + DrawTextBasic(dpi, screenPos, STR_HOLES, ft); screenPos.y += LIST_ROW_HEIGHT; } else @@ -569,13 +569,13 @@ public: // Maximum speed ft = Formatter(); ft.Add(((_loadedTrackDesign->max_speed << 16) * 9) >> 18); - DrawTextBasic(&dpi, screenPos, STR_MAX_SPEED, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_SPEED, ft); screenPos.y += LIST_ROW_HEIGHT; // Average speed ft = Formatter(); ft.Add(((_loadedTrackDesign->average_speed << 16) * 9) >> 18); - DrawTextBasic(&dpi, screenPos, STR_AVERAGE_SPEED, ft); + DrawTextBasic(dpi, screenPos, STR_AVERAGE_SPEED, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -583,7 +583,7 @@ public: ft = Formatter(); ft.Add(STR_RIDE_LENGTH_ENTRY); ft.Add(_loadedTrackDesign->ride_length); - DrawTextEllipsised(&dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft); + DrawTextEllipsised(dpi, screenPos, 214, STR_TRACK_LIST_RIDE_LENGTH, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -592,19 +592,19 @@ public: // Maximum positive vertical Gs ft = Formatter(); ft.Add(_loadedTrackDesign->max_positive_vertical_g * 32); - DrawTextBasic(&dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); screenPos.y += LIST_ROW_HEIGHT; // Maximum negative vertical Gs ft = Formatter(); ft.Add(_loadedTrackDesign->max_negative_vertical_g * 32); - DrawTextBasic(&dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); screenPos.y += LIST_ROW_HEIGHT; // Maximum lateral Gs ft = Formatter(); ft.Add(_loadedTrackDesign->max_lateral_g * 32); - DrawTextBasic(&dpi, screenPos, STR_MAX_LATERAL_G, ft); + DrawTextBasic(dpi, screenPos, STR_MAX_LATERAL_G, ft); screenPos.y += LIST_ROW_HEIGHT; if (_loadedTrackDesign->total_air_time != 0) @@ -612,7 +612,7 @@ public: // Total air time ft = Formatter(); ft.Add(_loadedTrackDesign->total_air_time * 25); - DrawTextBasic(&dpi, screenPos, STR_TOTAL_AIR_TIME, ft); + DrawTextBasic(dpi, screenPos, STR_TOTAL_AIR_TIME, ft); screenPos.y += LIST_ROW_HEIGHT; } } @@ -622,13 +622,13 @@ public: // Drops ft = Formatter(); ft.Add(_loadedTrackDesign->drops & 0x3F); - DrawTextBasic(&dpi, screenPos, STR_DROPS, ft); + DrawTextBasic(dpi, screenPos, STR_DROPS, ft); screenPos.y += LIST_ROW_HEIGHT; // Drop height is multiplied by 0.75 ft = Formatter(); ft.Add((_loadedTrackDesign->highest_drop_height * 3) / 4); - DrawTextBasic(&dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); + DrawTextBasic(dpi, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -640,7 +640,7 @@ public: ft = Formatter(); ft.Add(inversions); // Inversions - DrawTextBasic(&dpi, screenPos, STR_INVERSIONS, ft); + DrawTextBasic(dpi, screenPos, STR_INVERSIONS, ft); screenPos.y += LIST_ROW_HEIGHT; } } @@ -653,7 +653,7 @@ public: ft = Formatter(); ft.Add(_loadedTrackDesign->space_required_x); ft.Add(_loadedTrackDesign->space_required_y); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); screenPos.y += LIST_ROW_HEIGHT; } @@ -661,14 +661,14 @@ public: { ft = Formatter(); ft.Add(_loadedTrackDesign->cost); - DrawTextBasic(&dpi, screenPos, STR_TRACK_LIST_COST_AROUND, ft); + DrawTextBasic(dpi, screenPos, STR_TRACK_LIST_COST_AROUND, ft); } } - void OnScrollDraw(const int32_t scrollIndex, rct_drawpixelinfo& dpi) override + void OnScrollDraw(const int32_t scrollIndex, DrawPixelInfo& dpi) override { uint8_t paletteIndex = ColourMapA[colours[0]].mid_light; - gfx_clear(&dpi, paletteIndex); + GfxClear(&dpi, paletteIndex); auto screenCoords = ScreenCoordsXY{ 0, 0 }; size_t listIndex = 0; @@ -677,7 +677,7 @@ public: if (_trackDesigns.empty()) { // No track designs - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, STR_NO_TRACK_DESIGNS_OF_THIS_TYPE); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, STR_NO_TRACK_DESIGNS_OF_THIS_TYPE); return; } } @@ -688,7 +688,7 @@ public: if (listIndex == static_cast(selected_list_item)) { // Highlight - gfx_filter_rect( + GfxFilterRect( &dpi, { screenCoords, { width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }, FilterPaletteID::PaletteDarken1); stringId = STR_WINDOW_COLOUR_2_STRINGID; @@ -700,7 +700,7 @@ public: auto ft = Formatter(); ft.Add(STR_BUILD_CUSTOM_DESIGN); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); screenCoords.y += SCROLLABLE_ROW_HEIGHT; listIndex++; } @@ -713,7 +713,7 @@ public: if (listIndex == static_cast(selected_list_item)) { // Highlight - gfx_filter_rect( + GfxFilterRect( &dpi, { screenCoords, { width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1 } }, FilterPaletteID::PaletteDarken1); stringId = STR_WINDOW_COLOUR_2_STRINGID; @@ -727,7 +727,7 @@ public: auto ft = Formatter(); ft.Add(STR_TRACK_LIST_NAME_FORMAT); ft.Add(_trackDesigns[i].name.c_str()); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); } screenCoords.y += SCROLLABLE_ROW_HEIGHT; @@ -743,9 +743,9 @@ public: } }; -rct_window* WindowTrackListOpen(const RideSelection item) +WindowBase* WindowTrackListOpen(const RideSelection item) { - window_close_construction_windows(); + WindowCloseConstructionWindows(); ScreenCoordsXY screenPos{}; if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { diff --git a/src/openrct2-ui/windows/Transparency.cpp b/src/openrct2-ui/windows/Transparency.cpp index 7c18f37fa5..e3c75fe898 100644 --- a/src/openrct2-ui/windows/Transparency.cpp +++ b/src/openrct2-ui/windows/Transparency.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -63,16 +63,16 @@ static constexpr ScreenSize INVISIBLE_SIZE = {24, 12}; #pragma endregion -static rct_widget window_transparency_main_widgets[] = +static Widget window_transparency_main_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget({ 2, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_BUTTON_HIDE_VEGETATION, STR_SEE_THROUGH_VEGETATION), - MakeWidget({ 27, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_BUTTON_HIDE_SCENERY, STR_SEE_THROUGH_SCENERY), - MakeWidget({ 52, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_BUTTON_FOOTPATH, STR_SEE_THROUGH_PATHS), - MakeWidget({ 77, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_RIDE, STR_SEE_THROUGH_RIDES), - MakeWidget({102, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_BUTTON_HIDE_VEHICLES, STR_SEE_THROUGH_VEHICLES), - MakeWidget({127, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_G2_BUTTON_HIDE_SUPPORTS, STR_SEE_THROUGH_SUPPORTS), - MakeWidget({152, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, SPR_GUESTS, STR_SEE_THROUGH_GUESTS), + MakeWidget({ 2, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_BUTTON_HIDE_VEGETATION), STR_SEE_THROUGH_VEGETATION), + MakeWidget({ 27, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_BUTTON_HIDE_SCENERY), STR_SEE_THROUGH_SCENERY), + MakeWidget({ 52, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_BUTTON_FOOTPATH), STR_SEE_THROUGH_PATHS), + MakeWidget({ 77, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE), STR_SEE_THROUGH_RIDES), + MakeWidget({102, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_BUTTON_HIDE_VEHICLES), STR_SEE_THROUGH_VEHICLES), + MakeWidget({127, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_BUTTON_HIDE_SUPPORTS), STR_SEE_THROUGH_SUPPORTS), + MakeWidget({152, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_GUESTS), STR_SEE_THROUGH_GUESTS), MakeWidget({177, 17}, HIDE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_SEE_THROUGH_STAFF), MakeWidget({ 2, 42}, INVISIBLE_SIZE, WindowWidgetType::FlatBtn, WindowColour::Tertiary, STR_NONE, STR_INVISIBLE_VEGETATION), @@ -93,9 +93,9 @@ public: void OnOpen() override { widgets = window_transparency_main_widgets; - window_push_others_below(*this); + WindowPushOthersBelow(*this); - auto* w = window_get_main(); + auto* w = WindowGetMain(); if (w != nullptr) windowPos.x = ((w->width / 2) - (width / 2)); } @@ -116,7 +116,7 @@ public: void OnPrepareDraw() override { uint32_t wflags = 0; - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); pressed_widgets = 0; disabled_widgets = 0; @@ -141,18 +141,18 @@ public: for (WidgetIndex i = WIDX_INVISIBLE_VEGETATION; i <= WIDX_INVISIBLE_SUPPORTS; i++) { - widgets[i].image = IsWidgetPressed(i) ? SPR_G2_BUTTON_HIDE_FULL : SPR_G2_BUTTON_HIDE_PARTIAL; + widgets[i].image = ImageId(IsWidgetPressed(i) ? SPR_G2_BUTTON_HIDE_FULL : SPR_G2_BUTTON_HIDE_PARTIAL); } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); // Locate mechanic button image const auto& widget = widgets[WIDX_HIDE_STAFF]; auto screenCoords = windowPos + ScreenCoordsXY{ widget.left, widget.top }; auto image = ImageId(SPR_MECHANIC, COLOUR_BLACK, gStaffMechanicColour); - gfx_draw_sprite(&dpi, image, screenCoords); + GfxDrawSprite(&dpi, image, screenCoords); } private: @@ -170,7 +170,7 @@ private: void ToggleViewportFlag(WidgetIndex widgetIndex) { uint32_t wflags = 0; - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w == nullptr) return; @@ -244,9 +244,9 @@ private: } }; -rct_window* WindowTransparencyOpen() +WindowBase* WindowTransparencyOpen() { - auto* window = window_bring_to_front_by_class(WindowClass::Transparency); + auto* window = WindowBringToFrontByClass(WindowClass::Transparency); if (window == nullptr) window = WindowCreate(WindowClass::Transparency, ScreenCoordsXY(32, 32), WW, WH); diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index b94ce460eb..7c13dda86e 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -48,7 +48,7 @@ static constexpr const StringId WINDOW_TITLE = STR_VIEW_CLIPPING_TITLE; static constexpr const int32_t WW = 180; static constexpr const int32_t WH = 155; -static rct_widget window_view_clipping_widgets[] = { +static Widget window_view_clipping_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget ({ 11, 19}, { 159, 11}, WindowWidgetType::Checkbox, WindowColour::Primary, STR_VIEW_CLIPPING_HEIGHT_ENABLE, STR_VIEW_CLIPPING_HEIGHT_ENABLE_TIP ), // clip enable/disable check box MakeWidget ({ 5, 36}, {WW - 10, 48}, WindowWidgetType::Groupbox, WindowColour::Primary, STR_VIEW_CLIPPING_VERTICAL_CLIPPING ), @@ -86,12 +86,12 @@ public: switch (widgetIndex) { case WIDX_CLOSE: - window_close(*this); + WindowClose(*this); break; case WIDX_CLIP_CHECKBOX_ENABLE: { // Toggle height clipping. - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { mainWindow->viewport->flags ^= VIEWPORT_FLAG_CLIP_VIEW; @@ -114,7 +114,7 @@ public: break; case WIDX_CLIP_SELECTOR: // Activate the selection tool - tool_set(*this, WIDX_BACKGROUND, Tool::Crosshair); + ToolSet(*this, WIDX_BACKGROUND, Tool::Crosshair); _toolActive = true; _dragging = false; @@ -123,38 +123,38 @@ public: _previousClipSelectionB = gClipSelectionB; gClipSelectionA = { 0, 0 }; gClipSelectionB = { MAXIMUM_MAP_SIZE_BIG - 1, MAXIMUM_MAP_SIZE_BIG - 1 }; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case WIDX_CLIP_CLEAR: if (IsActive()) { _toolActive = false; - tool_cancel(); + ToolCancel(); } gClipSelectionA = { 0, 0 }; gClipSelectionB = { MAXIMUM_MAP_SIZE_BIG - 1, MAXIMUM_MAP_SIZE_BIG - 1 }; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; } } void OnMouseDown(WidgetIndex widgetIndex) override { - rct_window* mainWindow; + WindowBase* mainWindow; switch (widgetIndex) { case WIDX_CLIP_HEIGHT_INCREASE: if (gClipHeight < 255) SetClipHeight(gClipHeight + 1); - mainWindow = window_get_main(); + mainWindow = WindowGetMain(); if (mainWindow != nullptr) mainWindow->Invalidate(); break; case WIDX_CLIP_HEIGHT_DECREASE: if (gClipHeight > 0) SetClipHeight(gClipHeight - 1); - mainWindow = window_get_main(); + mainWindow = WindowGetMain(); if (mainWindow != nullptr) mainWindow->Invalidate(); break; @@ -164,7 +164,7 @@ public: void OnUpdate() override { const auto& widget = widgets[WIDX_CLIP_HEIGHT_SLIDER]; - const rct_scroll* const scroll = &this->scrolls[0]; + const ScrollBar* const scroll = &this->scrolls[0]; const int16_t scroll_width = widget.width() - 1; const uint8_t clip_height = static_cast( (static_cast(scroll->h_left) / (scroll->h_right - scroll_width)) * 255); @@ -173,7 +173,7 @@ public: gClipHeight = clip_height; // Update the main window accordingly. - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { mainWindow->Invalidate(); @@ -188,7 +188,7 @@ public: gClipSelectionB = _previousClipSelectionB; } - widget_invalidate(*this, WIDX_CLIP_HEIGHT_SLIDER); + WidgetInvalidate(*this, WIDX_CLIP_HEIGHT_SLIDER); } void OnToolUpdate(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override @@ -199,7 +199,7 @@ public: } int32_t direction; - auto mapCoords = screen_pos_to_map_pos(screenCoords, &direction); + auto mapCoords = ScreenPosToMapPos(screenCoords, &direction); if (mapCoords.has_value()) { gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE; @@ -213,7 +213,7 @@ public: void OnToolDown(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) override { int32_t direction; - auto mapCoords = screen_pos_to_map_pos(screenCoords, &direction); + auto mapCoords = ScreenPosToMapPos(screenCoords, &direction); if (mapCoords.has_value()) { _dragging = true; @@ -229,7 +229,7 @@ public: } int32_t direction; - auto mapCoords = screen_pos_to_map_pos(screenCoords, &direction); + auto mapCoords = ScreenPosToMapPos(screenCoords, &direction); if (mapCoords) { MapInvalidateSelectionRect(); @@ -248,15 +248,15 @@ public: gClipSelectionA = gMapSelectPositionA; gClipSelectionB = gMapSelectPositionB; _toolActive = false; - tool_cancel(); - gfx_invalidate_screen(); + ToolCancel(); + GfxInvalidateScreen(); } void OnPrepareDraw() override { WidgetScrollUpdateThumbs(*this, WIDX_CLIP_HEIGHT_SLIDER); - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { WidgetSetCheckboxValue(*this, WIDX_CLIP_CHECKBOX_ENABLE, mainWindow->viewport->flags & VIEWPORT_FLAG_CLIP_VIEW); @@ -272,13 +272,13 @@ public: } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { WindowDrawWidgets(*this, &dpi); // Clip height value auto screenCoords = this->windowPos + ScreenCoordsXY{ 8, this->widgets[WIDX_CLIP_HEIGHT_VALUE].top }; - DrawTextBasic(&dpi, screenCoords, STR_VIEW_CLIPPING_HEIGHT_VALUE, {}, { this->colours[0] }); + DrawTextBasic(dpi, screenCoords, STR_VIEW_CLIPPING_HEIGHT_VALUE, {}, { this->colours[0] }); screenCoords = this->windowPos + ScreenCoordsXY{ this->widgets[WIDX_CLIP_HEIGHT_VALUE].left + 1, this->widgets[WIDX_CLIP_HEIGHT_VALUE].top }; @@ -292,7 +292,7 @@ public: ft.Add(static_cast(gClipHeight)); // Printing the raw value. - DrawTextBasic(&dpi, screenCoords, STR_FORMAT_INTEGER, ft, { this->colours[0] }); + DrawTextBasic(dpi, screenCoords, STR_FORMAT_INTEGER, ft, { this->colours[0] }); break; } case DisplayType::DisplayUnits: @@ -304,7 +304,7 @@ public: auto ft = Formatter(); ft.Add(static_cast(FIXED_1DP(gClipHeight, 0) / 2 - FIXED_1DP(7, 0))); DrawTextBasic( - &dpi, screenCoords, STR_UNIT1DP_NO_SUFFIX, ft, + dpi, screenCoords, STR_UNIT1DP_NO_SUFFIX, ft, { this->colours[0] }); // Printing the value in Height Units. } else @@ -319,7 +319,7 @@ public: auto ft = Formatter(); ft.Add( static_cast(FIXED_2DP(gClipHeight, 0) / 2 * 1.5f - FIXED_2DP(10, 50))); - DrawTextBasic(&dpi, screenCoords, STR_UNIT2DP_SUFFIX_METRES, ft, { this->colours[0] }); + DrawTextBasic(dpi, screenCoords, STR_UNIT2DP_SUFFIX_METRES, ft, { this->colours[0] }); break; } case MeasurementFormat::Imperial: @@ -327,7 +327,7 @@ public: auto ft = Formatter(); ft.Add( static_cast(FIXED_1DP(gClipHeight, 0) / 2.0f * 5 - FIXED_1DP(35, 0))); - DrawTextBasic(&dpi, screenCoords, STR_UNIT1DP_SUFFIX_FEET, ft, { this->colours[0] }); + DrawTextBasic(dpi, screenCoords, STR_UNIT1DP_SUFFIX_FEET, ft, { this->colours[0] }); break; } } @@ -352,10 +352,10 @@ public: // Initialise the clip height slider from the current clip height value. this->SetClipHeight(gClipHeight); - window_push_others_below(*this); + WindowPushOthersBelow(*this); // Get the main viewport to set the view clipping flag. - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); // Turn on view clipping when the window is opened. if (mainWindow != nullptr) @@ -369,7 +369,7 @@ private: void OnClose() override { // Turn off view clipping when the window is closed. - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { mainWindow->viewport->flags &= ~VIEWPORT_FLAG_CLIP_VIEW; @@ -388,7 +388,7 @@ private: bool IsActive() { - if (!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) return false; if (gCurrentToolWidget.window_classification != WindowClass::ViewClipping) return false; @@ -396,9 +396,9 @@ private: } }; -rct_window* WindowViewClippingOpen() +WindowBase* WindowViewClippingOpen() { - auto* window = window_bring_to_front_by_class(WindowClass::ViewClipping); + auto* window = WindowBringToFrontByClass(WindowClass::ViewClipping); if (window == nullptr) { window = WindowCreate(WindowClass::ViewClipping, ScreenCoordsXY(32, 32), WW, WH); diff --git a/src/openrct2-ui/windows/Viewport.cpp b/src/openrct2-ui/windows/Viewport.cpp index 8441c2eaab..209d64a913 100644 --- a/src/openrct2-ui/windows/Viewport.cpp +++ b/src/openrct2-ui/windows/Viewport.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,14 +40,14 @@ static constexpr ScreenSize VIEWPORT_BUTTON = {24, 24}; #pragma endregion -static rct_widget window_viewport_widgets[] = +static Widget window_viewport_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), MakeWidget({ 0, 14}, { WW - 1, WH - 1}, WindowWidgetType::Resize, WindowColour::Secondary ), // resize MakeWidget({ 3, 17}, {WW - 26, WH - 3}, WindowWidgetType::Viewport, WindowColour::Primary ), // viewport - MakeWidget({WW - 25, 17}, VIEWPORT_BUTTON, WindowWidgetType::FlatBtn, WindowColour::Primary , SPR_G2_ZOOM_IN, STR_ZOOM_IN_TIP ), // zoom in - MakeWidget({WW - 25, 41}, VIEWPORT_BUTTON, WindowWidgetType::FlatBtn, WindowColour::Primary , SPR_G2_ZOOM_OUT, STR_ZOOM_OUT_TIP ), // zoom out - MakeWidget({WW - 25, 65}, VIEWPORT_BUTTON, WindowWidgetType::FlatBtn, WindowColour::Primary , SPR_LOCATE, STR_LOCATE_SUBJECT_TIP), // locate + MakeWidget({WW - 25, 17}, VIEWPORT_BUTTON, WindowWidgetType::FlatBtn, WindowColour::Primary , ImageId(SPR_G2_ZOOM_IN), STR_ZOOM_IN_TIP ), // zoom in + MakeWidget({WW - 25, 41}, VIEWPORT_BUTTON, WindowWidgetType::FlatBtn, WindowColour::Primary , ImageId(SPR_G2_ZOOM_OUT), STR_ZOOM_OUT_TIP ), // zoom out + MakeWidget({WW - 25, 65}, VIEWPORT_BUTTON, WindowWidgetType::FlatBtn, WindowColour::Primary , ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP), // locate WIDGETS_END, }; @@ -59,7 +59,7 @@ private: void GetFreeViewportNumber() { number = 1; - window_visit_each([&](rct_window* w) { + WindowVisitEach([&](WindowBase* w) { if (w != nullptr && w != this && w->classification == WindowClass::Viewport) { if (w->number >= number) @@ -76,7 +76,7 @@ public: widgets = window_viewport_widgets; // Create viewport - viewport_create(this, windowPos, width, height, Focus(TileCoordsXYZ(128, 128, 0).ToCoordsXYZ())); + ViewportCreate(this, windowPos, width, height, Focus(TileCoordsXYZ(128, 128, 0).ToCoordsXYZ())); if (viewport == nullptr) { Close(); @@ -84,10 +84,10 @@ public: return; } - auto* mainWindow = window_get_main(); + auto* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - rct_viewport* mainViewport = mainWindow->viewport; + Viewport* mainViewport = mainWindow->viewport; int32_t x = mainViewport->viewPos.x + (mainViewport->view_width / 2); int32_t y = mainViewport->viewPos.y + (mainViewport->view_height / 2); savedViewPos = { x - (viewport->view_width / 2), y - (viewport->view_height / 2) }; @@ -103,7 +103,7 @@ public: void OnUpdate() override { - auto* mainWindow = window_get_main(); + auto* mainWindow = WindowGetMain(); if (mainWindow == nullptr) return; @@ -139,24 +139,24 @@ public: } break; case WIDX_LOCATE: - auto* mainWindow = window_get_main(); + auto* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - auto info = get_map_coordinates_from_pos( + auto info = GetMapCoordinatesFromPos( { windowPos.x + (width / 2), windowPos.y + (height / 2) }, ViewportInteractionItemAll); - window_scroll_to_location(*mainWindow, { info.Loc, TileElementHeight(info.Loc) }); + WindowScrollToLocation(*mainWindow, { info.Loc, TileElementHeight(info.Loc) }); } break; } } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { DrawWidgets(dpi); // Draw viewport if (viewport != nullptr) - window_draw_viewport(&dpi, *this); + WindowDrawViewport(&dpi, *this); } void OnResize() override @@ -170,12 +170,12 @@ public: min_width = WW; min_height = WH; - window_set_resize(*this, min_width, min_height, max_width, max_height); + WindowSetResize(*this, min_width, min_height, max_width, max_height); } void OnPrepareDraw() override { - rct_widget* viewportWidget = &window_viewport_widgets[WIDX_VIEWPORT]; + Widget* viewportWidget = &window_viewport_widgets[WIDX_VIEWPORT]; ResizeFrameWithPage(); widgets[WIDX_ZOOM_IN].left = width - 27; @@ -208,7 +208,7 @@ public: } }; -rct_window* WindowViewportOpen() +WindowBase* WindowViewportOpen() { int32_t screenWidth = ContextGetWidth(); int32_t screenHeight = ContextGetHeight(); diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index 032aaea2a2..1fce7975c0 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,9 +31,9 @@ enum WindowWaterWidgetIdx { WIDX_INCREMENT }; -static rct_widget window_water_widgets[] = { +static Widget window_water_widgets[] = { WINDOW_SHIM(WINDOW_TITLE, WW, WH), - MakeWidget ({16, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , SPR_LAND_TOOL_SIZE_0, STR_NONE), // preview box + MakeWidget ({16, 17}, {44, 32}, WindowWidgetType::ImgBtn, WindowColour::Primary , ImageId(SPR_LAND_TOOL_SIZE_0), STR_NONE), // preview box MakeRemapWidget({17, 18}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_WATER_TIP), // decrement size MakeRemapWidget({43, 32}, {16, 16}, WindowWidgetType::TrnBtn, WindowColour::Tertiary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_WATER_TIP), // increment size WIDGETS_END, @@ -48,7 +48,7 @@ public: widgets = window_water_widgets; hold_down_widgets = (1uLL << WIDX_INCREMENT) | (1uLL << WIDX_DECREMENT); WindowInitScrollWidgets(*this); - window_push_others_below(*this); + WindowPushOthersBelow(*this); gLandToolSize = 1; gWaterToolRaiseCost = MONEY64_UNDEFINED; @@ -60,7 +60,7 @@ public: // If the tool wasn't changed, turn tool off if (WaterToolIsActive()) { - tool_cancel(); + ToolCancel(); } } @@ -135,10 +135,10 @@ public: SetWidgetPressed(WIDX_PREVIEW, true); // Update the preview image - widgets[WIDX_PREVIEW].image = LandTool::SizeToSpriteIndex(gLandToolSize); + widgets[WIDX_PREVIEW].image = ImageId(LandTool::SizeToSpriteIndex(gLandToolSize)); } - void OnDraw(rct_drawpixelinfo& dpi) override + void OnDraw(DrawPixelInfo& dpi) override { auto screenCoords = ScreenCoordsXY{ windowPos.x + window_water_widgets[WIDX_PREVIEW].midX(), windowPos.y + window_water_widgets[WIDX_PREVIEW].midY() }; @@ -149,7 +149,7 @@ public: { auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic(&dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) @@ -161,7 +161,7 @@ public: { auto ft = Formatter(); ft.Add(gWaterToolRaiseCost); - DrawTextBasic(&dpi, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } screenCoords.y += 10; @@ -170,7 +170,7 @@ public: { auto ft = Formatter(); ft.Add(gWaterToolLowerCost); - DrawTextBasic(&dpi, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::CENTRE }); + DrawTextBasic(dpi, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::CENTRE }); } } } @@ -185,7 +185,7 @@ private: } }; -rct_window* WindowWaterOpen() +WindowBase* WindowWaterOpen() { return WindowFocusOrCreate(WindowClass::Water, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0); } diff --git a/src/openrct2-ui/windows/Window.h b/src/openrct2-ui/windows/Window.h index a33e6b91c5..8b0e20893d 100644 --- a/src/openrct2-ui/windows/Window.h +++ b/src/openrct2-ui/windows/Window.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include using loadsave_callback = void (*)(int32_t result, const utf8* path); @@ -34,147 +34,147 @@ extern colour_t gWindowScenerySecondaryColour; extern colour_t gWindowSceneryTertiaryColour; extern bool gWindowSceneryEyedropperEnabled; -rct_window* WindowAboutOpen(); +WindowBase* WindowAboutOpen(); void WindowCampaignRefreshRides(); -rct_window* WindowChangelogOpen(int personality); -rct_window* WindowCheatsOpen(); -rct_window* WindowClearSceneryOpen(); -rct_window* CustomCurrencyWindowOpen(); -rct_window* WindowDebugPaintOpen(); -rct_window* WindowEditorInventionsListOpen(); -rct_window* WindowEditorMainOpen(); -rct_window* WindowEditorObjectiveOptionsOpen(); -rct_window* WindowEditorScenarioOptionsOpen(); -rct_window* WindowFootpathOpen(); +WindowBase* WindowChangelogOpen(int personality); +WindowBase* WindowCheatsOpen(); +WindowBase* WindowClearSceneryOpen(); +WindowBase* CustomCurrencyWindowOpen(); +WindowBase* WindowDebugPaintOpen(); +WindowBase* WindowEditorInventionsListOpen(); +WindowBase* WindowEditorMainOpen(); +WindowBase* WindowEditorObjectiveOptionsOpen(); +WindowBase* WindowEditorScenarioOptionsOpen(); +WindowBase* WindowFootpathOpen(); void WindowFootpathResetSelectedPath(); -rct_window* WindowGuestOpen(Peep* peep); -rct_window* WindowLandOpen(); -rct_window* WindowLandRightsOpen(); -rct_window* WindowMainOpen(); -rct_window* WindowMapgenOpen(); -rct_window* WindowMultiplayerOpen(); -rct_window* WindowNewsOpen(); -rct_window* WindowNewsOptionsOpen(); -rct_window* WindowOptionsOpen(); -rct_window* WindowSavePromptOpen(); +WindowBase* WindowGuestOpen(Peep* peep); +WindowBase* WindowLandOpen(); +WindowBase* WindowLandRightsOpen(); +WindowBase* WindowMainOpen(); +WindowBase* WindowMapgenOpen(); +WindowBase* WindowMultiplayerOpen(); +WindowBase* WindowNewsOpen(); +WindowBase* WindowNewsOptionsOpen(); +WindowBase* WindowOptionsOpen(); +WindowBase* WindowSavePromptOpen(); #ifndef DISABLE_NETWORK -rct_window* WindowServerListOpen(); -rct_window* WindowServerStartOpen(); +WindowBase* WindowServerListOpen(); +WindowBase* WindowServerStartOpen(); #endif -rct_window* WindowShortcutKeysOpen(); -rct_window* WindowStaffListOpen(); -rct_window* WindowStaffOpen(Peep* peep); +WindowBase* WindowShortcutKeysOpen(); +WindowBase* WindowStaffListOpen(); +WindowBase* WindowStaffOpen(Peep* peep); void WindowStaffListRefresh(); -rct_window* WindowThemesOpen(); -rct_window* WindowTitleExitOpen(); -rct_window* WindowTitleLogoOpen(); -rct_window* WindowTitleMenuOpen(); -rct_window* WindowTitleOptionsOpen(); -rct_window* WindowViewportOpen(); -rct_window* WindowWaterOpen(); -rct_window* WindowViewClippingOpen(); -rct_window* WindowTransparencyOpen(); -rct_window* WindowAssetPacksOpen(); +WindowBase* WindowThemesOpen(); +WindowBase* WindowTitleExitOpen(); +WindowBase* WindowTitleLogoOpen(); +WindowBase* WindowTitleMenuOpen(); +WindowBase* WindowTitleOptionsOpen(); +WindowBase* WindowViewportOpen(); +WindowBase* WindowWaterOpen(); +WindowBase* WindowViewClippingOpen(); +WindowBase* WindowTransparencyOpen(); +WindowBase* WindowAssetPacksOpen(); // WC_FINANCES -rct_window* WindowFinancesOpen(); -rct_window* WindowFinancesResearchOpen(); -rct_window* WindowFinancesMarketingOpen(); +WindowBase* WindowFinancesOpen(); +WindowBase* WindowFinancesResearchOpen(); +WindowBase* WindowFinancesMarketingOpen(); // WC_PARK_INFORMATION -rct_window* WindowParkAwardsOpen(); -rct_window* WindowParkEntranceOpen(); -rct_window* WindowParkGuestsOpen(); -rct_window* WindowParkObjectiveOpen(); -rct_window* WindowParkRatingOpen(); +WindowBase* WindowParkAwardsOpen(); +WindowBase* WindowParkEntranceOpen(); +WindowBase* WindowParkGuestsOpen(); +WindowBase* WindowParkObjectiveOpen(); +WindowBase* WindowParkRatingOpen(); -rct_window* WindowBannerOpen(rct_windownumber number); -rct_window* WindowRideDemolishPromptOpen(Ride* ride); -rct_window* WindowRideRefurbishPromptOpen(Ride* ride); -rct_window* WindowSignOpen(rct_windownumber number); -rct_window* WindowSignSmallOpen(rct_windownumber number); -rct_window* WindowPlayerOpen(uint8_t id); -rct_window* WindowNewCampaignOpen(int16_t campaignType); +WindowBase* WindowBannerOpen(rct_windownumber number); +WindowBase* WindowRideDemolishPromptOpen(const Ride& ride); +WindowBase* WindowRideRefurbishPromptOpen(const Ride& ride); +WindowBase* WindowSignOpen(rct_windownumber number); +WindowBase* WindowSignSmallOpen(rct_windownumber number); +WindowBase* WindowPlayerOpen(uint8_t id); +WindowBase* WindowNewCampaignOpen(int16_t campaignType); -rct_window* WindowInstallTrackOpen(const utf8* path); +WindowBase* WindowInstallTrackOpen(const utf8* path); void WindowGuestListRefreshList(); -rct_window* WindowGuestListOpen(); -rct_window* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index); -rct_window* WindowStaffFirePromptOpen(Peep* peep); -rct_window* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor); -rct_window* WindowScenarioselectOpen(std::function callback, bool titleEditor, bool disableLocking); +WindowBase* WindowGuestListOpen(); +WindowBase* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index); +WindowBase* WindowStaffFirePromptOpen(Peep* peep); +WindowBase* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor); +WindowBase* WindowScenarioselectOpen(std::function callback, bool titleEditor, bool disableLocking); -rct_window* WindowErrorOpen(StringId title, StringId message, const class Formatter& formatter); -rct_window* WindowErrorOpen(std::string_view title, std::string_view message); +WindowBase* WindowErrorOpen(StringId title, StringId message, const class Formatter& formatter); +WindowBase* WindowErrorOpen(std::string_view title, std::string_view message); struct TrackDesign; -rct_window* WindowLoadsaveOpen( +WindowBase* WindowLoadsaveOpen( int32_t type, std::string_view defaultPath, std::function callback, TrackDesign* trackDesign); -rct_window* WindowTrackPlaceOpen(const struct TrackDesignFileRef* tdFileRef); -rct_window* WindowTrackManageOpen(struct TrackDesignFileRef* tdFileRef); +WindowBase* WindowTrackPlaceOpen(const struct TrackDesignFileRef* tdFileRef); +WindowBase* WindowTrackManageOpen(struct TrackDesignFileRef* tdFileRef); void TrackPlaceClearProvisionalTemporarily(); void TrackPlaceRestoreProvisional(); -rct_window* WindowMapOpen(); +WindowBase* WindowMapOpen(); void WindowMapReset(); -rct_window* WindowResearchOpen(); -void WindowResearchDevelopmentPagePaint(rct_window* w, rct_drawpixelinfo* dpi, WidgetIndex baseWidgetIndex); -void WindowResearchFundingPagePaint(rct_window* w, rct_drawpixelinfo* dpi, WidgetIndex baseWidgetIndex); +WindowBase* WindowResearchOpen(); +void WindowResearchDevelopmentPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex); +void WindowResearchFundingPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex); -rct_window* WindowNewRideOpen(); -rct_window* WindowNewRideOpenResearch(); +WindowBase* WindowNewRideOpen(); +WindowBase* WindowNewRideOpenResearch(); void WindowNewRideInitVars(); void WindowNewRideFocus(RideSelection rideItem); -rct_window* WindowRideListOpen(); -void WindowRideListRefreshList(rct_window* w); +WindowBase* WindowRideListOpen(); +void WindowRideListRefreshList(WindowBase* w); -rct_window* WindowRideMainOpen(Ride* ride); -rct_window* WindowRideOpenTrack(TileElement* tileElement); -rct_window* WindowRideOpenVehicle(Vehicle* vehicle); +WindowBase* WindowRideMainOpen(const Ride& ride); +WindowBase* WindowRideOpenTrack(TileElement* tileElement); +WindowBase* WindowRideOpenVehicle(Vehicle* vehicle); void WindowRideMeasurementsDesignCancel(); // rct2: 0x00F635EE extern RideSelection _window_track_list_item; -rct_window* WindowTrackListOpen(RideSelection item); +WindowBase* WindowTrackListOpen(RideSelection item); void SetMapTooltip(Formatter& ft); const Formatter& GetMapTooltip(); void WindowMapTooltipUpdateVisibility(); -rct_window* WindowMazeConstructionOpen(); +WindowBase* WindowMazeConstructionOpen(); void WindowMazeConstructionUpdatePressedWidgets(); -rct_window* WindowNetworkStatusOpen(const std::string& text, close_callback onClose); -rct_window* WindowNetworkStatusOpenPassword(); +WindowBase* WindowNetworkStatusOpen(const std::string& text, close_callback onClose); +WindowBase* WindowNetworkStatusOpenPassword(); void WindowNetworkStatusClose(); -void WindowTextInputKey(rct_window* w, uint32_t keycode); +void WindowTextInputKey(WindowBase* w, uint32_t keycode); void WindowTextInputOpen( - rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, + WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, StringId existing_text, uintptr_t existing_args, int32_t maxLength); void WindowTextInputRawOpen( - rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, + WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs, const_utf8string existing_text, int32_t maxLength); void WindowTextInputOpen( std::string_view title, std::string_view description, std::string_view initialValue, size_t maxLength, std::function okCallback, std::function cancelCallback); -rct_window* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects); +WindowBase* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects); -rct_window* WindowRideConstructionOpen(); +WindowBase* WindowRideConstructionOpen(); void WindowRideConstructionUpdateActiveElementsImpl(); void WindowRideConstructionUpdateEnabledTrackPieces(); -rct_window* WindowTopToolbarOpen(); +WindowBase* WindowTopToolbarOpen(); bool LandToolIsActive(); bool ClearSceneryToolIsActive(); bool WaterToolIsActive(); -rct_window* WindowSceneryOpen(); +WindowBase* WindowSceneryOpen(); void WindowScenerySetSelectedItem( const ScenerySelection& sceneryconst, std::optional primary, const std::optional secondary, const std::optional tertiary, const std::optional rotation); @@ -185,23 +185,23 @@ void WindowSceneryResetSelectedSceneryItems(); const ScenerySelection WindowSceneryGetTabSelection(); extern uint8_t gToolbarDirtyFlags; -rct_window* WindowGameBottomToolbarOpen(); +WindowBase* WindowGameBottomToolbarOpen(); void WindowGameBottomToolbarInvalidateNewsItem(); -rct_window* WindowEditorBottomToolbarOpen(); +WindowBase* WindowEditorBottomToolbarOpen(); -rct_window* WindowTileInspectorOpen(); +WindowBase* WindowTileInspectorOpen(); void WindowTileInspectorClearClipboard(); -rct_window* WindowEditorObjectSelectionOpen(); +WindowBase* WindowEditorObjectSelectionOpen(); void WindowTooltipReset(const ScreenCoordsXY& screenCoords); void WindowTooltipShow(const OpenRCT2String& message, ScreenCoordsXY screenCoords); -void WindowTooltipOpen(rct_window* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); void WindowTooltipClose(); -rct_window* WindowSceneryScatterOpen(); -rct_window* WindowPatrolAreaOpen(EntityId staffId); +WindowBase* WindowSceneryScatterOpen(); +WindowBase* WindowPatrolAreaOpen(EntityId staffId); EntityId WindowPatrolAreaGetCurrentStaffId(); // clang-format off diff --git a/src/openrct2-win/openrct2-win.cpp b/src/openrct2-win/openrct2-win.cpp index ea586c4f00..fb00b04afe 100644 --- a/src/openrct2-win/openrct2-win.cpp +++ b/src/openrct2-win/openrct2-win.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2-win/openrct2-win.vcxproj b/src/openrct2-win/openrct2-win.vcxproj index 8e81f69b72..ef8cd4fdf9 100644 --- a/src/openrct2-win/openrct2-win.vcxproj +++ b/src/openrct2-win/openrct2-win.vcxproj @@ -16,6 +16,18 @@ Debug arm64 + + ReleaseLTCG + arm64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + Release Win32 @@ -64,4 +76,4 @@ - + \ No newline at end of file diff --git a/src/openrct2/AssetPack.cpp b/src/openrct2/AssetPack.cpp index ae74776a73..8308647a53 100644 --- a/src/openrct2/AssetPack.cpp +++ b/src/openrct2/AssetPack.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/AssetPack.h b/src/openrct2/AssetPack.h index 77ecfc1e24..f52a6785e4 100644 --- a/src/openrct2/AssetPack.h +++ b/src/openrct2/AssetPack.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/AssetPackManager.cpp b/src/openrct2/AssetPackManager.cpp index 9a5a9556b1..eb4b686d4b 100644 --- a/src/openrct2/AssetPackManager.cpp +++ b/src/openrct2/AssetPackManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -127,7 +127,7 @@ void AssetPackManager::ClearAssetPacks() void AssetPackManager::AddAssetPack(const fs::path& path) { auto szPath = path.u8string(); - log_verbose("Scanning asset pack: %s", szPath.c_str()); + LOG_VERBOSE("Scanning asset pack: %s", szPath.c_str()); try { auto ap = std::make_unique(path); diff --git a/src/openrct2/AssetPackManager.h b/src/openrct2/AssetPackManager.h index c33344025d..7821840fd0 100644 --- a/src/openrct2/AssetPackManager.h +++ b/src/openrct2/AssetPackManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index f70e59f576..88839eb1f2 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,8 +10,8 @@ #include "Cheats.h" #include "GameState.h" +#include "actions/CheatSetAction.h" #include "actions/ParkSetLoanAction.h" -#include "actions/SetCheatAction.h" #include "config/Config.h" #include "core/DataSerialiser.h" #include "localisation/Localisation.h" @@ -52,6 +52,7 @@ bool gCheatsDisableRideValueAging = false; bool gCheatsIgnoreResearchStatus = false; bool gCheatsEnableAllDrawableTrackPieces = false; bool gCheatsAllowTrackPlaceInvalidHeights = false; +bool gCheatsAllowRegularPathAsQueue = false; void CheatsReset() { @@ -77,12 +78,13 @@ void CheatsReset() gCheatsIgnoreResearchStatus = false; gCheatsEnableAllDrawableTrackPieces = false; gCheatsAllowTrackPlaceInvalidHeights = false; + gCheatsAllowRegularPathAsQueue = false; } void CheatsSet(CheatType cheatType, int32_t param1 /* = 0*/, int32_t param2 /* = 0*/) { - auto setCheatAction = SetCheatAction(cheatType, param1, param2); - GameActions::Execute(&setCheatAction); + auto cheatSetAction = CheatSetAction(cheatType, param1, param2); + GameActions::Execute(&cheatSetAction); } template static void CheatEntrySerialise(DataSerialiser& ds, CheatType type, const T& value, uint16_t& count) @@ -125,6 +127,7 @@ void CheatsSerialise(DataSerialiser& ds) CheatEntrySerialise(ds, CheatType::IgnoreResearchStatus, gCheatsIgnoreResearchStatus, count); CheatEntrySerialise(ds, CheatType::EnableAllDrawableTrackPieces, gCheatsEnableAllDrawableTrackPieces, count); CheatEntrySerialise(ds, CheatType::AllowTrackPlaceInvalidHeights, gCheatsAllowTrackPlaceInvalidHeights, count); + CheatEntrySerialise(ds, CheatType::AllowRegularPathAsQueue, gCheatsAllowRegularPathAsQueue, count); // Remember current position and update count. uint64_t endOffset = stream.GetPosition(); @@ -217,6 +220,9 @@ void CheatsSerialise(DataSerialiser& ds) case CheatType::NoCapOnQueueLengthDummy: ds << dummyBool; break; + case CheatType::AllowRegularPathAsQueue: + ds << gCheatsAllowRegularPathAsQueue; + break; default: break; } @@ -229,97 +235,99 @@ const char* CheatsGetName(CheatType cheatType) switch (cheatType) { case CheatType::SandboxMode: - return language_get_string(STR_CHEAT_SANDBOX_MODE); + return LanguageGetString(STR_CHEAT_SANDBOX_MODE); case CheatType::DisableClearanceChecks: - return language_get_string(STR_DISABLE_CLEARANCE_CHECKS); + return LanguageGetString(STR_DISABLE_CLEARANCE_CHECKS); case CheatType::DisableSupportLimits: - return language_get_string(STR_DISABLE_SUPPORT_LIMITS); + return LanguageGetString(STR_DISABLE_SUPPORT_LIMITS); case CheatType::ShowAllOperatingModes: - return language_get_string(STR_CHEAT_SHOW_ALL_OPERATING_MODES); + return LanguageGetString(STR_CHEAT_SHOW_ALL_OPERATING_MODES); case CheatType::ShowVehiclesFromOtherTrackTypes: - return language_get_string(STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES); + return LanguageGetString(STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES); case CheatType::FastLiftHill: - return language_get_string(STR_CHEAT_UNLOCK_OPERATING_LIMITS); + return LanguageGetString(STR_CHEAT_UNLOCK_OPERATING_LIMITS); case CheatType::DisableBrakesFailure: - return language_get_string(STR_CHEAT_DISABLE_BRAKES_FAILURE); + return LanguageGetString(STR_CHEAT_DISABLE_BRAKES_FAILURE); case CheatType::DisableAllBreakdowns: - return language_get_string(STR_CHEAT_DISABLE_BREAKDOWNS); + return LanguageGetString(STR_CHEAT_DISABLE_BREAKDOWNS); case CheatType::DisableTrainLengthLimit: - return language_get_string(STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT); + return LanguageGetString(STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT); case CheatType::EnableChainLiftOnAllTrack: - return language_get_string(STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK); + return LanguageGetString(STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK); case CheatType::BuildInPauseMode: - return language_get_string(STR_CHEAT_BUILD_IN_PAUSE_MODE); + return LanguageGetString(STR_CHEAT_BUILD_IN_PAUSE_MODE); case CheatType::IgnoreRideIntensity: - return language_get_string(STR_CHEAT_IGNORE_INTENSITY); + return LanguageGetString(STR_CHEAT_IGNORE_INTENSITY); case CheatType::DisableVandalism: - return language_get_string(STR_CHEAT_DISABLE_VANDALISM); + return LanguageGetString(STR_CHEAT_DISABLE_VANDALISM); case CheatType::DisableLittering: - return language_get_string(STR_CHEAT_DISABLE_LITTERING); + return LanguageGetString(STR_CHEAT_DISABLE_LITTERING); case CheatType::NoMoney: - return language_get_string(STR_MAKE_PARK_NO_MONEY); + return LanguageGetString(STR_MAKE_PARK_NO_MONEY); case CheatType::AddMoney: - return language_get_string(STR_LOG_CHEAT_ADD_MONEY); + return LanguageGetString(STR_LOG_CHEAT_ADD_MONEY); case CheatType::ClearLoan: - return language_get_string(STR_CHEAT_CLEAR_LOAN); + return LanguageGetString(STR_CHEAT_CLEAR_LOAN); case CheatType::SetGuestParameter: - return language_get_string(STR_CHEAT_SET_GUESTS_PARAMETERS); + return LanguageGetString(STR_CHEAT_SET_GUESTS_PARAMETERS); case CheatType::GenerateGuests: - return language_get_string(STR_CHEAT_LARGE_TRAM_GUESTS); + return LanguageGetString(STR_CHEAT_LARGE_TRAM_GUESTS); case CheatType::RemoveAllGuests: - return language_get_string(STR_CHEAT_REMOVE_ALL_GUESTS); + return LanguageGetString(STR_CHEAT_REMOVE_ALL_GUESTS); case CheatType::GiveAllGuests: - return language_get_string(STR_CHEAT_GIVE_ALL_GUESTS); + return LanguageGetString(STR_CHEAT_GIVE_ALL_GUESTS); case CheatType::SetGrassLength: - return language_get_string(STR_CHEAT_CLEAR_GRASS); + return LanguageGetString(STR_CHEAT_CLEAR_GRASS); case CheatType::WaterPlants: - return language_get_string(STR_CHEAT_WATER_PLANTS); + return LanguageGetString(STR_CHEAT_WATER_PLANTS); case CheatType::FixVandalism: - return language_get_string(STR_CHEAT_FIX_VANDALISM); + return LanguageGetString(STR_CHEAT_FIX_VANDALISM); case CheatType::RemoveLitter: - return language_get_string(STR_CHEAT_REMOVE_LITTER); + return LanguageGetString(STR_CHEAT_REMOVE_LITTER); case CheatType::DisablePlantAging: - return language_get_string(STR_CHEAT_DISABLE_PLANT_AGING); + return LanguageGetString(STR_CHEAT_DISABLE_PLANT_AGING); case CheatType::SetStaffSpeed: - return language_get_string(STR_CHEAT_STAFF_SPEED); + return LanguageGetString(STR_CHEAT_STAFF_SPEED); case CheatType::RenewRides: - return language_get_string(STR_CHEAT_RENEW_RIDES); + return LanguageGetString(STR_CHEAT_RENEW_RIDES); case CheatType::MakeDestructible: - return language_get_string(STR_CHEAT_MAKE_DESTRUCTABLE); + return LanguageGetString(STR_CHEAT_MAKE_DESTRUCTABLE); case CheatType::FixRides: - return language_get_string(STR_CHEAT_FIX_ALL_RIDES); + return LanguageGetString(STR_CHEAT_FIX_ALL_RIDES); case CheatType::ResetCrashStatus: - return language_get_string(STR_CHEAT_RESET_CRASH_STATUS); + return LanguageGetString(STR_CHEAT_RESET_CRASH_STATUS); case CheatType::TenMinuteInspections: - return language_get_string(STR_CHEAT_10_MINUTE_INSPECTIONS); + return LanguageGetString(STR_CHEAT_10_MINUTE_INSPECTIONS); case CheatType::WinScenario: - return language_get_string(STR_CHEAT_WIN_SCENARIO); + return LanguageGetString(STR_CHEAT_WIN_SCENARIO); case CheatType::ForceWeather: - return language_get_string(STR_CHANGE_WEATHER); + return LanguageGetString(STR_CHANGE_WEATHER); case CheatType::FreezeWeather: - return language_get_string(STR_CHEAT_FREEZE_WEATHER); + return LanguageGetString(STR_CHEAT_FREEZE_WEATHER); case CheatType::NeverEndingMarketing: - return language_get_string(STR_CHEAT_NEVERENDING_MARKETING); + return LanguageGetString(STR_CHEAT_NEVERENDING_MARKETING); case CheatType::OpenClosePark: - return language_get_string(STR_CHEAT_OPEN_PARK); + return LanguageGetString(STR_CHEAT_OPEN_PARK); case CheatType::HaveFun: - return language_get_string(STR_CHEAT_HAVE_FUN); + return LanguageGetString(STR_CHEAT_HAVE_FUN); case CheatType::SetForcedParkRating: - return language_get_string(STR_FORCE_PARK_RATING); + return LanguageGetString(STR_FORCE_PARK_RATING); case CheatType::AllowArbitraryRideTypeChanges: - return language_get_string(STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES); + return LanguageGetString(STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES); case CheatType::SetMoney: - return language_get_string(STR_SET_MONEY); + return LanguageGetString(STR_SET_MONEY); case CheatType::OwnAllLand: - return language_get_string(STR_CHEAT_OWN_ALL_LAND); + return LanguageGetString(STR_CHEAT_OWN_ALL_LAND); case CheatType::DisableRideValueAging: - return language_get_string(STR_CHEAT_DISABLE_RIDE_VALUE_AGING); + return LanguageGetString(STR_CHEAT_DISABLE_RIDE_VALUE_AGING); case CheatType::IgnoreResearchStatus: - return language_get_string(STR_CHEAT_IGNORE_RESEARCH_STATUS); + return LanguageGetString(STR_CHEAT_IGNORE_RESEARCH_STATUS); case CheatType::EnableAllDrawableTrackPieces: - return language_get_string(STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES); + return LanguageGetString(STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES); case CheatType::AllowTrackPlaceInvalidHeights: - return language_get_string(STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS); + return LanguageGetString(STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS); + case CheatType::AllowRegularPathAsQueue: + return LanguageGetString(STR_CHEAT_ALLOW_PATH_AS_QUEUE); default: return "Unknown Cheat"; } diff --git a/src/openrct2/Cheats.h b/src/openrct2/Cheats.h index 3035eb75c8..fafd5c42f5 100644 --- a/src/openrct2/Cheats.h +++ b/src/openrct2/Cheats.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,6 +33,7 @@ extern bool gCheatsAllowArbitraryRideTypeChanges; extern bool gCheatsIgnoreResearchStatus; extern bool gCheatsEnableAllDrawableTrackPieces; extern bool gCheatsAllowTrackPlaceInvalidHeights; +extern bool gCheatsAllowRegularPathAsQueue; enum class CheatType : int32_t { @@ -86,6 +87,7 @@ enum class CheatType : int32_t RemoveDucks, AllowTrackPlaceInvalidHeights, NoCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved + AllowRegularPathAsQueue, Count, }; diff --git a/src/openrct2/CmdlineSprite.cpp b/src/openrct2/CommandLineSprite.cpp similarity index 86% rename from src/openrct2/CmdlineSprite.cpp rename to src/openrct2/CommandLineSprite.cpp index 9575fbb585..6a01c3b10c 100644 --- a/src/openrct2/CmdlineSprite.cpp +++ b/src/openrct2/CommandLineSprite.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "CmdlineSprite.h" +#include "CommandLineSprite.h" #include "Context.h" #include "OpenRCT2.h" @@ -33,11 +33,13 @@ using namespace OpenRCT2::Drawing; +static int32_t CommandLineForSpriteCombine(const char** argv, int32_t argc); + class SpriteFile { public: - rct_g1_header Header{}; - std::vector Entries; + RCTG1Header Header{}; + std::vector Entries; std::vector Data; void AddImage(ImageImporter::ImportResult& image); bool Save(const utf8* path); @@ -115,7 +117,7 @@ std::optional SpriteFile::Open(const utf8* path) OpenRCT2::FileStream stream(path, OpenRCT2::FILE_MODE_OPEN); SpriteFile spriteFile; - stream.Read(&spriteFile.Header, sizeof(rct_g1_header)); + stream.Read(&spriteFile.Header, sizeof(RCTG1Header)); if (spriteFile.Header.num_entries > 0) { @@ -123,9 +125,9 @@ std::optional SpriteFile::Open(const utf8* path) for (uint32_t i = 0; i < spriteFile.Header.num_entries; ++i) { - rct_g1_element_32bit entry32bit{}; + RCTG1Element entry32bit{}; stream.Read(&entry32bit, sizeof(entry32bit)); - rct_g1_element entry{}; + G1Element entry{}; entry.offset = reinterpret_cast(static_cast(entry32bit.offset)); entry.width = entry32bit.width; @@ -153,7 +155,7 @@ bool SpriteFile::Save(const utf8* path) try { OpenRCT2::FileStream stream(path, OpenRCT2::FILE_MODE_WRITE); - stream.Write(&Header, sizeof(rct_g1_header)); + stream.Write(&Header, sizeof(RCTG1Header)); if (Header.num_entries > 0) { @@ -161,7 +163,7 @@ bool SpriteFile::Save(const utf8* path) for (const auto& entry : Entries) { - rct_g1_element_32bit entry32bit{}; + RCTG1Element entry32bit{}; entry32bit.offset = static_cast(reinterpret_cast(const_cast(entry.offset))); entry32bit.width = entry.width; @@ -183,13 +185,13 @@ bool SpriteFile::Save(const utf8* path) } } -static bool SpriteImageExport(const rct_g1_element& spriteElement, u8string_view outPath) +static bool SpriteImageExport(const G1Element& spriteElement, u8string_view outPath) { const size_t pixelBufferSize = static_cast(spriteElement.width) * spriteElement.height; auto pixelBuffer = std::make_unique(pixelBufferSize); auto pixels = pixelBuffer.get(); - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.bits = pixels; dpi.x = 0; dpi.y = 0; @@ -200,7 +202,7 @@ static bool SpriteImageExport(const rct_g1_element& spriteElement, u8string_view DrawSpriteArgs args( ImageId(), PaletteMap::GetDefault(), spriteElement, 0, 0, spriteElement.width, spriteElement.height, pixels); - gfx_sprite_to_buffer(dpi, args); + GfxSpriteToBuffer(dpi, args); auto const pixels8 = dpi.bits; auto const pixelsLen = (dpi.width + dpi.pitch) * dpi.height; @@ -263,7 +265,7 @@ static std::string PopStr(std::ostringstream& oss) return str; } -int32_t cmdline_for_sprite(const char** argv, int32_t argc) +int32_t CommandLineForSprite(const char** argv, int32_t argc) { gOpenRCT2Headless = true; if (argc == 0) @@ -307,7 +309,7 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) return -1; } - rct_g1_element* g1 = &spriteFile->Entries[spriteIndex]; + G1Element* g1 = &spriteFile->Entries[spriteIndex]; printf("width: %d\n", g1->width); printf("height: %d\n", g1->height); printf("x offset: %d\n", g1->x_offset); @@ -408,21 +410,21 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) auto context = OpenRCT2::CreateContext(); context->Initialise(); - const ObjectRepositoryItem* ori = object_repository_find_object_by_name(datName); + const ObjectRepositoryItem* ori = ObjectRepositoryFindObjectByName(datName); if (ori == nullptr) { fprintf(stderr, "Could not find the object.\n"); return -1; } - const rct_object_entry* entry = &ori->ObjectEntry; - const auto* loadedObject = object_manager_load_object(entry); + const RCTObjectEntry* entry = &ori->ObjectEntry; + const auto* loadedObject = ObjectManagerLoadObject(entry); if (loadedObject == nullptr) { fprintf(stderr, "Unable to load object.\n"); return -1; } - auto entryIndex = object_manager_get_loaded_object_entry_index(loadedObject); + auto entryIndex = ObjectManagerGetLoadedObjectEntryIndex(loadedObject); ObjectType objectType = entry->GetType(); auto& objManager = context->GetObjectManager(); @@ -603,7 +605,7 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) if (!spriteFile.Save(spriteFilePath)) { - log_error("Could not save sprite file, cancelling."); + LOG_ERROR("Could not save sprite file, cancelling."); return -1; } @@ -611,6 +613,57 @@ int32_t cmdline_for_sprite(const char** argv, int32_t argc) return 1; } + if (_strcmpi(argv[0], "combine") == 0) + { + return CommandLineForSpriteCombine(argv, argc); + } + fprintf(stderr, "Unknown sprite command.\n"); return 1; } + +static int32_t CommandLineForSpriteCombine(const char** argv, int32_t argc) +{ + if (argc < 4) + { + fprintf(stdout, "usage: sprite combine \n"); + return -1; + } + + const utf8* indexFile = argv[1]; + const utf8* dataFile = argv[2]; + const utf8* outputPath = argv[3]; + + auto fileHeader = OpenRCT2::FileStream(indexFile, OpenRCT2::FILE_MODE_OPEN); + auto fileData = OpenRCT2::FileStream(dataFile, OpenRCT2::FILE_MODE_OPEN); + auto fileHeaderSize = fileHeader.GetLength(); + auto fileDataSize = fileData.GetLength(); + + uint32_t numEntries = fileHeaderSize / sizeof(RCTG1Element); + + RCTG1Header header = {}; + header.num_entries = numEntries; + header.total_size = fileDataSize; + OpenRCT2::FileStream outputStream(outputPath, OpenRCT2::FILE_MODE_WRITE); + + outputStream.Write(&header, sizeof(RCTG1Header)); + auto g1Elements32 = std::make_unique(numEntries); + fileHeader.Read(g1Elements32.get(), numEntries * sizeof(RCTG1Element)); + for (uint32_t i = 0; i < numEntries; i++) + { + // RCT1 used zoomed offsets that counted from the beginning of the file, rather than from the current sprite. + if (g1Elements32[i].flags & G1_FLAG_HAS_ZOOM_SPRITE) + { + g1Elements32[i].zoomed_offset = i - g1Elements32[i].zoomed_offset; + } + + outputStream.Write(&g1Elements32[i], sizeof(RCTG1Element)); + } + + std::vector data; + data.resize(fileDataSize); + fileData.Read(data.data(), fileDataSize); + outputStream.Write(data.data(), fileDataSize); + + return 1; +} diff --git a/src/openrct2/CmdlineSprite.h b/src/openrct2/CommandLineSprite.h similarity index 82% rename from src/openrct2/CmdlineSprite.h rename to src/openrct2/CommandLineSprite.h index 819b26265b..d1244ac1db 100644 --- a/src/openrct2/CmdlineSprite.h +++ b/src/openrct2/CommandLineSprite.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,5 +12,5 @@ #include "common.h" #include "drawing/ImageImporter.h" -int32_t cmdline_for_sprite(const char** argv, int32_t argc); +int32_t CommandLineForSprite(const char** argv, int32_t argc); extern OpenRCT2::Drawing::ImageImporter::ImportMode gSpriteMode; diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index cba0101f67..e85e1b3d88 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -185,7 +185,7 @@ namespace OpenRCT2 #ifndef DISABLE_NETWORK _network.Close(); #endif - window_close_all(); + WindowCloseAll(); // Unload objects after closing all windows, this is to overcome windows like // the object selection window which loads objects when closed. @@ -194,12 +194,11 @@ namespace OpenRCT2 _objectManager->UnloadAll(); } - gfx_object_check_all_images_freed(); - gfx_unload_csg(); - gfx_unload_g2(); - gfx_unload_g1(); + GfxObjectCheckAllImagesFreed(); + GfxUnloadCsg(); + GfxUnloadG2(); + GfxUnloadG1(); Audio::Close(); - ConfigRelease(); Instance = nullptr; } @@ -335,7 +334,7 @@ namespace OpenRCT2 } _initialised = true; - crash_init(); + CrashInit(); if (String::Equals(gConfigGeneral.LastRunVersion, OPENRCT2_VERSION)) { @@ -354,14 +353,14 @@ namespace OpenRCT2 } catch (const std::exception& e) { - log_error("Failed to open configured language: %s", e.what()); + LOG_ERROR("Failed to open configured language: %s", e.what()); try { _localisationService->OpenLanguage(LANGUAGE_ENGLISH_UK); } catch (const std::exception& eFallback) { - log_fatal("Failed to open fallback language: %s", eFallback.what()); + LOG_FATAL("Failed to open fallback language: %s", eFallback.what()); auto uiContext = GetContext()->GetUiContext(); uiContext->ShowMessageBox("Failed to load language file!\nYour installation may be damaged."); return false; @@ -370,7 +369,7 @@ namespace OpenRCT2 // TODO add configuration option to allow multiple instances // if (!gOpenRCT2Headless && !Platform::LockSingleInstance()) { - // log_fatal("OpenRCT2 is already running."); + // LOG_FATAL("OpenRCT2 is already running."); // return false; // } //This comment was relocated so it would stay where it was in relation to the following lines of code. @@ -462,7 +461,7 @@ namespace OpenRCT2 gGameSoundsOff = !gConfigSound.MasterSoundEnabled; } - chat_init(); + ChatInit(); CopyOriginalUserFilesOver(); if (!gOpenRCT2NoGraphics) @@ -471,11 +470,11 @@ namespace OpenRCT2 { return false; } - lightfx_init(); + LightFXInit(); } - input_reset_place_obj_modifier(); - viewport_init_all(); + InputResetPlaceObjModifier(); + ViewportInitAll(); _gameState = std::make_unique(); _gameState->InitAll(DEFAULT_MAP_SIZE); @@ -504,17 +503,17 @@ namespace OpenRCT2 if (_drawingEngineType == DrawingEngine::Software) { _drawingEngineType = DrawingEngine::None; - log_fatal("Unable to create a drawing engine."); + LOG_FATAL("Unable to create a drawing engine."); exit(-1); } else { - log_error("Unable to create drawing engine. Falling back to software."); + LOG_ERROR("Unable to create drawing engine. Falling back to software."); // Fallback to software gConfigGeneral.DrawingEngine = DrawingEngine::Software; ConfigSaveDefault(); - drawing_engine_init(); + DrawingEngineInit(); } } else @@ -530,24 +529,24 @@ namespace OpenRCT2 if (_drawingEngineType == DrawingEngine::Software) { _drawingEngineType = DrawingEngine::None; - log_error(ex.what()); - log_fatal("Unable to initialise a drawing engine."); + LOG_ERROR(ex.what()); + LOG_FATAL("Unable to initialise a drawing engine."); exit(-1); } else { - log_error(ex.what()); - log_error("Unable to initialise drawing engine. Falling back to software."); + LOG_ERROR(ex.what()); + LOG_ERROR("Unable to initialise drawing engine. Falling back to software."); // Fallback to software gConfigGeneral.DrawingEngine = DrawingEngine::Software; ConfigSaveDefault(); - drawing_engine_init(); + DrawingEngineInit(); } } } - window_check_all_valid_zoom(); + WindowCheckAllValidZoom(); } void DisposeDrawingEngine() final override @@ -555,21 +554,23 @@ namespace OpenRCT2 _drawingEngine = nullptr; } - bool LoadParkFromFile( - const std::string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) final override + bool LoadParkFromFile(const u8string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) final override { - log_verbose("Context::LoadParkFromFile(%s)", path.c_str()); + LOG_VERBOSE("Context::LoadParkFromFile(%s)", path.c_str()); - // Register the file for crash upload if it asserts while loading. - crash_register_additional_file("load_park", path); - // Deregister park file in case it was processed without hitting an assert. - struct foo + struct CrashAdditionalFileRegistration { - ~foo() + CrashAdditionalFileRegistration(const std::string& path) { - crash_unregister_additional_file("load_park"); + // Register the file for crash upload if it asserts while loading. + CrashRegisterAdditionalFile("load_park", path); } - } f; + ~CrashAdditionalFileRegistration() + { + // Deregister park file in case it was processed without hitting an assert. + CrashUnregisterAdditionalFile("load_park"); + } + } crash_additional_file_registration(path); try { @@ -596,7 +597,7 @@ namespace OpenRCT2 Console::Error::WriteLine(e.what()); if (loadTitleScreenOnFail) { - title_load(); + TitleLoad(); } auto windowManager = _uiContext->GetWindowManager(); windowManager->ShowError(STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, STR_NONE, {}); @@ -643,13 +644,13 @@ namespace OpenRCT2 // so reload the title screen if that happens. loadTitleScreenFirstOnFail = true; - game_unload_scripts(); + GameUnloadScripts(); _objectManager->LoadObjects(result.RequiredObjects); parkImporter->Import(); gScenarioSavePath = path; gCurrentLoadedPath = path; gFirstTimeSaving = true; - game_fix_save_vars(); + GameFixSaveVars(); MapAnimationAutoCreate(); EntityTweener::Get().Reset(); gScreenAge = 0; @@ -666,7 +667,7 @@ namespace OpenRCT2 _network.Close(); } #endif - game_load_init(); + GameLoadInit(); #ifndef DISABLE_NETWORK if (_network.GetMode() == NETWORK_MODE_SERVER) { @@ -676,7 +677,7 @@ namespace OpenRCT2 } else { - scenario_begin(); + ScenarioBegin(); #ifndef DISABLE_NETWORK if (_network.GetMode() == NETWORK_MODE_SERVER) { @@ -690,18 +691,18 @@ 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 - peep_update_names(gConfigGeneral.ShowRealNamesOfGuests); + PeepUpdateNames(gConfigGeneral.ShowRealNamesOfGuests); #ifndef DISABLE_NETWORK if (sendMap) { - _network.Server_Send_MAP(); + _network.ServerSendMap(); } #endif #ifdef USE_BREAKPAD if (_network.GetMode() == NETWORK_MODE_NONE) { - start_silent_record(); + StartSilentRecord(); } #endif if (result.SemiCompatibleVersion) @@ -728,14 +729,14 @@ namespace OpenRCT2 // If loading the SV6 or SV4 failed return to the title screen if requested. if (loadTitleScreenFirstOnFail) { - title_load(); + TitleLoad(); } // The path needs to be duplicated as it's a const here // which the window function doesn't like auto intent = Intent(WindowClass::ObjectLoadError); - intent.putExtra(INTENT_EXTRA_PATH, path); - intent.putExtra(INTENT_EXTRA_LIST, const_cast(e.MissingObjects.data())); - intent.putExtra(INTENT_EXTRA_LIST_COUNT, static_cast(e.MissingObjects.size())); + intent.PutExtra(INTENT_EXTRA_PATH, path); + intent.PutExtra(INTENT_EXTRA_LIST, const_cast(e.MissingObjects.data())); + intent.PutExtra(INTENT_EXTRA_LIST_COUNT, static_cast(e.MissingObjects.size())); auto windowManager = _uiContext->GetWindowManager(); windowManager->OpenIntent(&intent); @@ -747,7 +748,7 @@ namespace OpenRCT2 // If loading the SV6 or SV4 failed return to the title screen if requested. if (loadTitleScreenFirstOnFail) { - title_load(); + TitleLoad(); } auto windowManager = _uiContext->GetWindowManager(); windowManager->ShowError(STR_FILE_CONTAINS_UNSUPPORTED_RIDE_TYPES, STR_NONE, {}); @@ -758,7 +759,7 @@ namespace OpenRCT2 if (loadTitleScreenFirstOnFail) { - title_load(); + TitleLoad(); } auto windowManager = _uiContext->GetWindowManager(); Formatter ft; @@ -789,7 +790,7 @@ namespace OpenRCT2 // If loading the SV6 or SV4 failed return to the title screen if requested. if (loadTitleScreenFirstOnFail) { - title_load(); + TitleLoad(); } Console::Error::WriteLine(e.what()); } @@ -824,7 +825,7 @@ namespace OpenRCT2 // Check install directory if (gConfigGeneral.RCT2Path.empty() || !Platform::OriginalGameDataExists(gConfigGeneral.RCT2Path)) { - log_verbose( + LOG_VERBOSE( "install directory does not exist or invalid directory selected, %s", gConfigGeneral.RCT2Path.c_str()); if (!ConfigFindOrBrowseInstallDirectory()) { @@ -845,13 +846,13 @@ namespace OpenRCT2 bool LoadBaseGraphics() { - if (!gfx_load_g1(*_env)) + if (!GfxLoadG1(*_env)) { return false; } - gfx_load_g2(); - gfx_load_csg(); - font_sprite_initialise_characters(); + GfxLoadG2(); + GfxLoadCsg(); + FontSpriteInitialiseCharacters(); return true; } @@ -863,7 +864,7 @@ namespace OpenRCT2 if (!_versionCheckFuture.valid()) { _versionCheckFuture = std::async(std::launch::async, [this] { - _newVersionInfo = get_latest_version(); + _newVersionInfo = GetLatestVersion(); if (!String::StartsWith(gVersionInfoTag, _newVersionInfo.tag)) { _hasNewVersionInfo = true; @@ -892,10 +893,10 @@ namespace OpenRCT2 { case StartupAction::Intro: gIntroState = IntroState::PublisherBegin; - title_load(); + TitleLoad(); break; case StartupAction::Title: - title_load(); + TitleLoad(); break; case StartupAction::Open: { @@ -908,7 +909,7 @@ namespace OpenRCT2 auto data = DownloadPark(gOpenRCT2StartupActionPath); if (data.empty()) { - title_load(); + TitleLoad(); break; } @@ -916,7 +917,7 @@ namespace OpenRCT2 if (!LoadParkFromStream(&ms, gOpenRCT2StartupActionPath, true)) { Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); - title_load(); + TitleLoad(); break; } #endif @@ -934,7 +935,7 @@ namespace OpenRCT2 { Console::Error::WriteLine("Failed to load '%s'", gOpenRCT2StartupActionPath); Console::Error::WriteLine("%s", ex.what()); - title_load(); + TitleLoad(); break; } } @@ -967,8 +968,8 @@ namespace OpenRCT2 else #endif // DISABLE_NETWORK { - game_load_scripts(); - game_notify_map_changed(); + GameLoadScripts(); + GameNotifyMapChanged(); } break; } @@ -979,7 +980,7 @@ namespace OpenRCT2 } else if (!Editor::LoadLandscape(gOpenRCT2StartupActionPath)) { - title_load(); + TitleLoad(); } break; default: @@ -1028,7 +1029,7 @@ namespace OpenRCT2 { PROFILED_FUNCTION(); - log_verbose("begin openrct2 loop"); + LOG_VERBOSE("begin openrct2 loop"); _finished = false; #ifndef __EMSCRIPTEN__ @@ -1045,7 +1046,7 @@ namespace OpenRCT2 }, this, 0, 1); #endif // __EMSCRIPTEN__ - log_verbose("finish openrct2 loop"); + LOG_VERBOSE("finish openrct2 loop"); } void RunFrame() @@ -1112,7 +1113,7 @@ namespace OpenRCT2 Tick(); // Always run this at a fixed rate, Update can cause multiple ticks if the game is speed up. - window_update_all(); + WindowUpdateAll(); _ticksAccumulator -= GAME_UPDATE_TIME_MS; } @@ -1141,7 +1142,7 @@ namespace OpenRCT2 Tick(); // Always run this at a fixed rate, Update can cause multiple ticks if the game is speed up. - window_update_all(); + WindowUpdateAll(); _ticksAccumulator -= GAME_UPDATE_TIME_MS; @@ -1176,16 +1177,16 @@ namespace OpenRCT2 // this to be 40Hz (25 ms). Refactor this once the UI is decoupled. gCurrentDeltaTime = static_cast(GAME_UPDATE_TIME_MS * 1000.0f); - if (game_is_not_paused()) + if (GameIsNotPaused()) { gPaletteEffectFrame += gCurrentDeltaTime; } - date_update_real_time_of_day(); + DateUpdateRealTimeOfDay(); if (gIntroState != IntroState::None) { - intro_update(); + IntroUpdate(); } else if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !gOpenRCT2Headless) { @@ -1203,7 +1204,7 @@ namespace OpenRCT2 } #endif - chat_update(); + ChatUpdate(); #ifdef ENABLE_SCRIPTING _scriptEngine.Tick(); #endif @@ -1240,7 +1241,7 @@ namespace OpenRCT2 { auto path = _env->GetDirectoryPath(dirBase, dirId); if (!Platform::EnsureDirectoryExists(path.c_str())) - log_error("Unable to create directory '%s'.", path.c_str()); + LOG_ERROR("Unable to create directory '%s'.", path.c_str()); } } @@ -1262,7 +1263,7 @@ namespace OpenRCT2 void CopyOriginalUserFilesOver(const std::string& srcRoot, const std::string& dstRoot, const std::string& pattern) { - log_verbose("CopyOriginalUserFilesOver('%s', '%s', '%s')", srcRoot.c_str(), dstRoot.c_str(), pattern.c_str()); + LOG_VERBOSE("CopyOriginalUserFilesOver('%s', '%s', '%s')", srcRoot.c_str(), dstRoot.c_str(), pattern.c_str()); auto scanPattern = Path::Combine(srcRoot, pattern); auto scanner = Path::ScanDirectory(scanPattern, true); @@ -1375,12 +1376,12 @@ bool ContextLoadParkFromStream(void* stream) return GetContext()->LoadParkFromStream(static_cast(stream), ""); } -void openrct2_write_full_version_info(utf8* buffer, size_t bufferSize) +void OpenRCT2WriteFullVersionInfo(utf8* buffer, size_t bufferSize) { String::Set(buffer, bufferSize, gVersionInfoFull); } -void openrct2_finish() +void OpenRCT2Finish() { GetContext()->Finish(); } @@ -1438,7 +1439,7 @@ const uint8_t* ContextGetKeysPressed() return GetContext()->GetUiContext()->GetKeysPressed(); } -TextInputSession* ContextStartTextInput(utf8* buffer, size_t maxLength) +TextInputSession* ContextStartTextInput(u8string& buffer, size_t maxLength) { return GetContext()->GetUiContext()->StartTextInput(buffer, maxLength); } @@ -1488,25 +1489,25 @@ void ContextSetCursorTrap(bool value) GetContext()->GetUiContext()->SetCursorTrap(value); } -rct_window* ContextOpenWindow(WindowClass wc) +WindowBase* ContextOpenWindow(WindowClass wc) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); return windowManager->OpenWindow(wc); } -rct_window* ContextOpenWindowView(uint8_t wc) +WindowBase* ContextOpenWindowView(uint8_t wc) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); return windowManager->OpenView(wc); } -rct_window* ContextOpenDetailWindow(uint8_t type, int32_t id) +WindowBase* ContextOpenDetailWindow(uint8_t type, int32_t id) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); return windowManager->OpenDetails(type, id); } -rct_window* ContextOpenIntent(Intent* intent) +WindowBase* ContextOpenIntent(Intent* intent) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); return windowManager->OpenIntent(intent); @@ -1524,7 +1525,7 @@ void ContextForceCloseWindowByClass(WindowClass windowClass) windowManager->ForceClose(windowClass); } -rct_window* ContextShowError(StringId title, StringId message, const Formatter& args) +WindowBase* ContextShowError(StringId title, StringId message, const Formatter& args) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); return windowManager->ShowError(title, message, args); @@ -1563,7 +1564,7 @@ bool ContextOpenCommonFileDialog(utf8* outFilename, OpenRCT2::Ui::FileDialogDesc } catch (const std::exception& ex) { - log_error(ex.what()); + LOG_ERROR(ex.what()); outFilename[0] = '\0'; return false; } @@ -1577,7 +1578,7 @@ u8string ContextOpenCommonFileDialog(OpenRCT2::Ui::FileDialogDesc& desc) } catch (const std::exception& ex) { - log_error(ex.what()); + LOG_ERROR(ex.what()); return u8string{}; } } diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 10115fa00a..c038e0e72b 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ struct ITrackDesignRepository; struct IGameStateSnapshots; class Intent; -struct rct_window; +struct WindowBase; struct NewVersionInfo; struct TTFFontDescriptor; @@ -52,10 +52,9 @@ struct CursorState struct TextInputSession { - utf8* Buffer; // UTF-8 stream - size_t BufferSize; // Maximum number of bytes (excluding null terminator) - size_t Size; // Number of bytes (excluding null terminator) + u8string* Buffer; // UTF-8 string buffer, non-owning. size_t Length; // Number of codepoints + size_t MaxLength; // Maximum length of text, Length can't be larger than this. size_t SelectionStart; // Selection start, in bytes size_t SelectionSize; // Selection length in bytes @@ -151,7 +150,7 @@ namespace OpenRCT2 virtual void InitialiseDrawingEngine() abstract; virtual void DisposeDrawingEngine() abstract; virtual bool LoadParkFromFile( - const std::string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) abstract; + const u8string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) abstract; virtual bool LoadParkFromStream( IStream* stream, const std::string& path, bool loadTitleScreenFirstOnFail = false, bool asScenario = false) abstract; @@ -200,7 +199,7 @@ void ContextSetCursorPosition(const ScreenCoordsXY& cursorPosition); const CursorState* ContextGetCursorState(); const uint8_t* ContextGetKeysState(); const uint8_t* ContextGetKeysPressed(); -TextInputSession* ContextStartTextInput(utf8* buffer, size_t maxLength); +TextInputSession* ContextStartTextInput(u8string& buffer, size_t maxLength); void ContextStopTextInput(); bool ContextIsInputActive(); void ContextTriggerResize(); @@ -210,11 +209,11 @@ int32_t ContextGetWidth(); int32_t ContextGetHeight(); bool ContextHasFocus(); void ContextSetCursorTrap(bool value); -rct_window* ContextOpenWindow(WindowClass wc); -rct_window* ContextOpenDetailWindow(uint8_t type, int32_t id); -rct_window* ContextOpenWindowView(uint8_t view); -rct_window* ContextShowError(StringId title, StringId message, const class Formatter& args); -rct_window* ContextOpenIntent(Intent* intent); +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* ContextOpenIntent(Intent* intent); void ContextBroadcastIntent(Intent* intent); void ContextForceCloseWindowByClass(WindowClass wc); void ContextUpdateMapTooltip(); diff --git a/src/openrct2/Date.cpp b/src/openrct2/Date.cpp index 37fd588c06..d3743e7b36 100644 --- a/src/openrct2/Date.cpp +++ b/src/openrct2/Date.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/Date.h b/src/openrct2/Date.h index 94dcb145e6..6942760456 100644 --- a/src/openrct2/Date.h +++ b/src/openrct2/Date.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/Diagnostic.cpp b/src/openrct2/Diagnostic.cpp index 953b8bfa36..a772ea0306 100644 --- a/src/openrct2/Diagnostic.cpp +++ b/src/openrct2/Diagnostic.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,7 +42,7 @@ int _android_log_priority[static_cast(DiagnosticLevel::Count)] = { ANDROID_LOG_FATAL, ANDROID_LOG_ERROR, ANDROID_LOG_WARN, ANDROID_LOG_VERBOSE, ANDROID_LOG_INFO, }; -void diagnostic_log(DiagnosticLevel diagnosticLevel, const char* format, ...) +void DiagnosticLog(DiagnosticLevel diagnosticLevel, const char* format, ...) { va_list args; @@ -54,7 +54,7 @@ void diagnostic_log(DiagnosticLevel diagnosticLevel, const char* format, ...) va_end(args); } -void diagnostic_log_with_location( +void DiagnosticLogWithLocation( DiagnosticLevel diagnosticLevel, const char* file, const char* function, int32_t line, const char* format, ...) { va_list args; @@ -76,7 +76,7 @@ static constexpr const char* _level_strings[] = { "FATAL", "ERROR", "WARNING", "VERBOSE", "INFO", }; -static void diagnostic_print(DiagnosticLevel level, const std::string& prefix, const std::string& msg) +static void DiagnosticPrint(DiagnosticLevel level, const std::string& prefix, const std::string& msg) { auto stream = diagnostic_get_stream(level); if (stream == stdout) @@ -85,7 +85,7 @@ static void diagnostic_print(DiagnosticLevel level, const std::string& prefix, c Console::Error::WriteLine("%s%s", prefix.c_str(), msg.c_str()); } -void diagnostic_log(DiagnosticLevel diagnosticLevel, const char* format, ...) +void DiagnosticLog(DiagnosticLevel diagnosticLevel, const char* format, ...) { va_list args; if (_log_levels[static_cast(diagnosticLevel)]) @@ -98,11 +98,11 @@ void diagnostic_log(DiagnosticLevel diagnosticLevel, const char* format, ...) auto msg = String::Format_VA(format, args); va_end(args); - diagnostic_print(diagnosticLevel, prefix, msg); + DiagnosticPrint(diagnosticLevel, prefix, msg); } } -void diagnostic_log_with_location( +void DiagnosticLogWithLocation( DiagnosticLevel diagnosticLevel, const char* file, const char* function, int32_t line, const char* format, ...) { va_list args; @@ -125,7 +125,7 @@ void diagnostic_log_with_location( auto msg = String::Format_VA(format, args); va_end(args); - diagnostic_print(diagnosticLevel, prefix, msg); + DiagnosticPrint(diagnosticLevel, prefix, msg); } } diff --git a/src/openrct2/Diagnostic.h b/src/openrct2/Diagnostic.h index 4652a9b83f..281452f25f 100644 --- a/src/openrct2/Diagnostic.h +++ b/src/openrct2/Diagnostic.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -70,20 +70,20 @@ enum class DiagnosticLevel extern bool _log_levels[static_cast(DiagnosticLevel::Count)]; -void diagnostic_log(DiagnosticLevel diagnosticLevel, const char* format, ...); -void diagnostic_log_with_location( +void DiagnosticLog(DiagnosticLevel diagnosticLevel, const char* format, ...); +void DiagnosticLogWithLocation( DiagnosticLevel diagnosticLevel, const char* file, const char* function, int32_t line, const char* format, ...); #ifdef _MSC_VER -# define diagnostic_log_macro(level, format, ...) \ - diagnostic_log_with_location(level, __FILE__, __FUNCTION__, __LINE__, format, ##__VA_ARGS__) +# define DIAGNOSTIC_LOG_MACRO(level, format, ...) \ + DiagnosticLogWithLocation(level, __FILE__, __FUNCTION__, __LINE__, format, ##__VA_ARGS__) #else -# define diagnostic_log_macro(level, format, ...) \ - diagnostic_log_with_location(level, __FILE__, __func__, __LINE__, format, ##__VA_ARGS__) +# define DIAGNOSTIC_LOG_MACRO(level, format, ...) \ + DiagnosticLogWithLocation(level, __FILE__, __func__, __LINE__, format, ##__VA_ARGS__) #endif // _MSC_VER -#define log_fatal(format, ...) diagnostic_log_macro(DiagnosticLevel::Fatal, format, ##__VA_ARGS__) -#define log_error(format, ...) diagnostic_log_macro(DiagnosticLevel::Error, format, ##__VA_ARGS__) -#define log_warning(format, ...) diagnostic_log_macro(DiagnosticLevel::Warning, format, ##__VA_ARGS__) -#define log_verbose(format, ...) diagnostic_log(DiagnosticLevel::Verbose, format, ##__VA_ARGS__) -#define log_info(format, ...) diagnostic_log_macro(DiagnosticLevel::Information, format, ##__VA_ARGS__) +#define LOG_FATAL(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Fatal, format, ##__VA_ARGS__) +#define LOG_ERROR(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Error, format, ##__VA_ARGS__) +#define LOG_WARNING(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Warning, format, ##__VA_ARGS__) +#define LOG_VERBOSE(format, ...) DiagnosticLog(DiagnosticLevel::Verbose, format, ##__VA_ARGS__) +#define LOG_INFO(format, ...) DIAGNOSTIC_LOG_MACRO(DiagnosticLevel::Information, format, ##__VA_ARGS__) diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 371857da07..734ac5914f 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -66,7 +66,7 @@ namespace Editor static bool ReadPark(const char* path); static void ClearMapForEditing(bool fromSave); - static void object_list_load() + static void ObjectListLoad() { auto* context = GetContext(); @@ -89,7 +89,7 @@ namespace Editor } } - static rct_window* OpenEditorWindows() + static WindowBase* OpenEditorWindows() { auto* main = ContextOpenWindow(WindowClass::MainWindow); ContextOpenWindow(WindowClass::TopToolbar); @@ -104,18 +104,18 @@ namespace Editor void Load() { OpenRCT2::Audio::StopAll(); - object_list_load(); + ObjectListLoad(); OpenRCT2::GetContext()->GetGameState()->InitAll(DEFAULT_MAP_SIZE); gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; gEditorStep = EditorStep::ObjectSelection; gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; gScenarioCategory = SCENARIO_CATEGORY_OTHER; - viewport_init_all(); - rct_window* mainWindow = OpenEditorWindows(); + ViewportInitAll(); + WindowBase* mainWindow = OpenEditorWindows(); mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ()); - load_palette(); + LoadPalette(); gScreenAge = 0; - gScenarioName = language_get_string(STR_MY_NEW_SCENARIO); + gScenarioName = LanguageGetString(STR_MY_NEW_SCENARIO); } /** @@ -124,10 +124,10 @@ namespace Editor */ void ConvertSaveToScenario() { - tool_cancel(); + ToolCancel(); auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); - intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(ConvertSaveToScenarioCallback)); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(ConvertSaveToScenarioCallback)); ContextOpenIntent(&intent); } @@ -143,12 +143,12 @@ namespace Editor return; } - scenario_reset(); + ScenarioReset(); gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; gEditorStep = EditorStep::ObjectiveSelection; gScenarioCategory = SCENARIO_CATEGORY_OTHER; - viewport_init_all(); + ViewportInitAll(); OpenEditorWindows(); FinaliseMainView(); gScreenAge = 0; @@ -164,15 +164,15 @@ namespace Editor gScreenFlags = SCREEN_FLAGS_TRACK_DESIGNER; gScreenAge = 0; - object_manager_unload_all_objects(); - object_list_load(); + ObjectManagerUnloadAllObjects(); + ObjectListLoad(); OpenRCT2::GetContext()->GetGameState()->InitAll(DEFAULT_MAP_SIZE); SetAllLandOwned(); gEditorStep = EditorStep::ObjectSelection; - viewport_init_all(); - rct_window* mainWindow = OpenEditorWindows(); + ViewportInitAll(); + WindowBase* mainWindow = OpenEditorWindows(); mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ()); - load_palette(); + LoadPalette(); } /** @@ -185,15 +185,15 @@ namespace Editor gScreenFlags = SCREEN_FLAGS_TRACK_MANAGER; gScreenAge = 0; - object_manager_unload_all_objects(); - object_list_load(); + ObjectManagerUnloadAllObjects(); + ObjectListLoad(); OpenRCT2::GetContext()->GetGameState()->InitAll(DEFAULT_MAP_SIZE); SetAllLandOwned(); gEditorStep = EditorStep::ObjectSelection; - viewport_init_all(); - rct_window* mainWindow = OpenEditorWindows(); + ViewportInitAll(); + WindowBase* mainWindow = OpenEditorWindows(); mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ()); - load_palette(); + LoadPalette(); } /** @@ -221,9 +221,9 @@ namespace Editor { // #4996: Make sure the object selection window closes here to prevent unload objects // after we have loaded a new park. - window_close_all(); + WindowCloseAll(); - auto extension = get_file_extension_type(path); + auto extension = GetFileExtensionType(path); switch (extension) { case FileExtension::SC6: @@ -245,7 +245,7 @@ namespace Editor gEditorStep = EditorStep::LandscapeEditor; gScreenAge = 0; gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; - viewport_init_all(); + ViewportInitAll(); OpenEditorWindows(); FinaliseMainView(); } @@ -297,7 +297,7 @@ namespace Editor MapRemoveAllRides(); UnlinkAllRideBanners(); - ride_init_all(); + RideInitAll(); // for (auto* guest : EntityList()) @@ -330,11 +330,10 @@ namespace Editor gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED; - gGuestInitialCash = std::clamp( - gGuestInitialCash, static_cast(10.00_GBP), static_cast(MAX_ENTRANCE_FEE)); + gGuestInitialCash = std::clamp(gGuestInitialCash, 10.00_GBP, MAX_ENTRANCE_FEE); gInitialCash = std::min(gInitialCash, 100000); - finance_reset_cash_to_initial(); + FinanceResetCashToInitial(); gBankLoan = std::clamp(gBankLoan, 0.00_GBP, 5000000.00_GBP); @@ -362,25 +361,25 @@ namespace Editor switch (gEditorStep) { case EditorStep::ObjectSelection: - if (window_find_by_class(WindowClass::EditorObjectSelection) != nullptr) + if (WindowFindByClass(WindowClass::EditorObjectSelection) != nullptr) { return; } - if (window_find_by_class(WindowClass::InstallTrack) != nullptr) + if (WindowFindByClass(WindowClass::InstallTrack) != nullptr) { return; } if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - object_manager_unload_all_objects(); + ObjectManagerUnloadAllObjects(); } ContextOpenWindow(WindowClass::EditorObjectSelection); break; case EditorStep::InventionsListSetUp: - if (window_find_by_class(WindowClass::EditorInventionList) != nullptr) + if (WindowFindByClass(WindowClass::EditorInventionList) != nullptr) { return; } @@ -388,7 +387,7 @@ namespace Editor ContextOpenWindow(WindowClass::EditorInventionList); break; case EditorStep::OptionsSelection: - if (window_find_by_class(WindowClass::EditorScenarioOptions) != nullptr) + if (WindowFindByClass(WindowClass::EditorScenarioOptions) != nullptr) { return; } @@ -396,7 +395,7 @@ namespace Editor ContextOpenWindow(WindowClass::EditorScenarioOptions); break; case EditorStep::ObjectiveSelection: - if (window_find_by_class(WindowClass::EditorObjectiveOptions) != nullptr) + if (WindowFindByClass(WindowClass::EditorObjectiveOptions) != nullptr) { return; } @@ -417,13 +416,13 @@ namespace Editor auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); windowManager->SetMainView(gSavedView, gSavedViewZoom, gSavedViewRotation); - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); ScenerySetDefaultPlacementConfiguration(); windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_NEW_RIDES)); gWindowUpdateTicks = 0; - load_palette(); + LoadPalette(); windowManager->BroadcastIntent(Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD)); } @@ -438,46 +437,46 @@ namespace Editor if (!isTrackDesignerManager) { - if (!editor_check_object_group_at_least_one_surface_selected(false)) + if (!EditorCheckObjectGroupAtLeastOneSurfaceSelected(false)) { return { ObjectType::FootpathSurface, STR_AT_LEAST_ONE_FOOTPATH_NON_QUEUE_SURFACE_OBJECT_MUST_BE_SELECTED }; } - if (!editor_check_object_group_at_least_one_surface_selected(true)) + if (!EditorCheckObjectGroupAtLeastOneSurfaceSelected(true)) { return { ObjectType::FootpathSurface, STR_AT_LEAST_ONE_FOOTPATH_QUEUE_SURFACE_OBJECT_MUST_BE_SELECTED }; } - if (!editor_check_object_group_at_least_one_selected(ObjectType::FootpathRailings)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::FootpathRailings)) { return { ObjectType::FootpathRailings, STR_AT_LEAST_ONE_FOOTPATH_RAILING_OBJECT_MUST_BE_SELECTED }; } } - if (!editor_check_object_group_at_least_one_selected(ObjectType::Ride)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::Ride)) { return { ObjectType::Ride, STR_AT_LEAST_ONE_RIDE_OBJECT_MUST_BE_SELECTED }; } - if (!editor_check_object_group_at_least_one_selected(ObjectType::Station)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::Station)) { return { ObjectType::Station, STR_AT_LEAST_ONE_STATION_OBJECT_MUST_BE_SELECTED }; } - if (!editor_check_object_group_at_least_one_selected(ObjectType::TerrainSurface)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::TerrainSurface)) { return { ObjectType::TerrainSurface, STR_AT_LEAST_ONE_TERRAIN_SURFACE_OBJECT_MUST_BE_SELECTED }; } - if (!editor_check_object_group_at_least_one_selected(ObjectType::TerrainEdge)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::TerrainEdge)) { return { ObjectType::TerrainEdge, STR_AT_LEAST_ONE_TERRAIN_EDGE_OBJECT_MUST_BE_SELECTED }; } if (!isTrackDesignerManager) { - if (!editor_check_object_group_at_least_one_selected(ObjectType::ParkEntrance)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::ParkEntrance)) { return { ObjectType::ParkEntrance, STR_PARK_ENTRANCE_TYPE_MUST_BE_SELECTED }; } - if (!editor_check_object_group_at_least_one_selected(ObjectType::Water)) + if (!EditorCheckObjectGroupAtLeastOneSelected(ObjectType::Water)) { return { ObjectType::Water, STR_WATER_TYPE_MUST_BE_SELECTED }; } @@ -565,7 +564,7 @@ namespace Editor } } // namespace Editor -void editor_open_windows_for_current_step() +void EditorOpenWindowsForCurrentStep() { Editor::OpenWindowsForCurrentStep(); } diff --git a/src/openrct2/Editor.h b/src/openrct2/Editor.h index df23e9229b..7890e73b5f 100644 --- a/src/openrct2/Editor.h +++ b/src/openrct2/Editor.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,4 +47,4 @@ enum class EditorStep : uint8_t extern EditorStep gEditorStep; -void editor_open_windows_for_current_step(); +void EditorOpenWindowsForCurrentStep(); diff --git a/src/openrct2/EditorObjectSelectionSession.cpp b/src/openrct2/EditorObjectSelectionSession.cpp index b6b31b3395..64381637e2 100644 --- a/src/openrct2/EditorObjectSelectionSession.cpp +++ b/src/openrct2/EditorObjectSelectionSession.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,6 +18,7 @@ #include "localisation/Localisation.h" #include "management/Research.h" #include "object/DefaultObjects.h" +#include "object/FootpathEntry.h" #include "object/ObjectList.h" #include "object/ObjectManager.h" #include "object/ObjectRepository.h" @@ -27,7 +28,6 @@ #include "scenario/Scenario.h" #include "windows/Intent.h" #include "world/Footpath.h" -#include "world/LargeScenery.h" #include "world/Scenery.h" #include @@ -38,10 +38,10 @@ std::vector _objectSelectionFlags; int32_t _numSelectedObjectsForType[EnumValue(ObjectType::Count)]; static int32_t _numAvailableObjectsForType[EnumValue(ObjectType::Count)]; -static void setup_in_use_selection_flags(); -static void setup_track_designer_objects(); -static void setup_track_manager_objects(); -static void window_editor_object_selection_select_default_objects(); +static void SetupInUseSelectionFlags(); +static void SetupTrackDesignerObjects(); +static void SetupTrackManagerObjects(); +static void WindowEditorObjectSelectionSelectDefaultObjects(); static void SelectDesignerObjects(); static void ReplaceSelectedWaterPalette(const ObjectRepositoryItem* item); @@ -53,7 +53,7 @@ static void ReplaceSelectedWaterPalette(const ObjectRepositoryItem* item); static constexpr ResultWithMessage ObjectSelectionError(bool isMasterObject, StringId message) { if (!isMasterObject) - reset_selected_object_count_and_size(); + ResetSelectedObjectCountAndSize(); return { false, message }; } @@ -62,10 +62,10 @@ static constexpr ResultWithMessage ObjectSelectionError(bool isMasterObject, Str * * rct2: 0x006ABCD1 */ -static void setup_track_manager_objects() +static void SetupTrackManagerObjects() { - int32_t numObjects = static_cast(object_repository_get_items_count()); - const ObjectRepositoryItem* items = object_repository_get_items(); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (int32_t i = 0; i < numObjects; i++) { uint8_t* selectionFlags = &_objectSelectionFlags[i]; @@ -90,10 +90,10 @@ static void setup_track_manager_objects() * * rct2: 0x006ABC1E */ -static void setup_track_designer_objects() +static void SetupTrackDesignerObjects() { - int32_t numObjects = static_cast(object_repository_get_items_count()); - const ObjectRepositoryItem* items = object_repository_get_items(); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); SelectDesignerObjects(); for (int32_t i = 0; i < numObjects; i++) { @@ -122,7 +122,7 @@ static void setup_track_designer_objects() * * rct2: 0x006AA82B */ -void setup_in_use_selection_flags() +void SetupInUseSelectionFlags() { auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); @@ -140,7 +140,7 @@ void setup_in_use_selection_flags() } } - tile_element_iterator iter; + TileElementIterator iter; TileElementIteratorBegin(&iter); do { @@ -257,8 +257,8 @@ void setup_in_use_selection_flags() } } - auto numObjects = object_repository_get_items_count(); - const auto* items = object_repository_get_items(); + auto numObjects = ObjectRepositoryGetItemsCount(); + const auto* items = ObjectRepositoryGetItems(); for (size_t i = 0; i < numObjects; i++) { auto* selectionFlags = &_objectSelectionFlags[i]; @@ -278,9 +278,9 @@ void setup_in_use_selection_flags() * * rct2: 0x006AB211 */ -void sub_6AB211() +void Sub6AB211() { - int32_t numObjects = static_cast(object_repository_get_items_count()); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); _objectSelectionFlags = std::vector(numObjects); for (uint8_t objectType = 0; objectType < EnumValue(ObjectType::Count); objectType++) @@ -289,7 +289,7 @@ void sub_6AB211() _numAvailableObjectsForType[objectType] = 0; } - const ObjectRepositoryItem* items = object_repository_get_items(); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (int32_t i = 0; i < numObjects; i++) { ObjectType objectType = items[i].Type; @@ -298,34 +298,34 @@ void sub_6AB211() if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) { - setup_track_designer_objects(); + SetupTrackDesignerObjects(); } if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) { - setup_track_manager_objects(); + SetupTrackManagerObjects(); } - setup_in_use_selection_flags(); - reset_selected_object_count_and_size(); + SetupInUseSelectionFlags(); + ResetSelectedObjectCountAndSize(); if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { // To prevent it breaking in scenario mode. if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { - window_editor_object_selection_select_default_objects(); + WindowEditorObjectSelectionSelectDefaultObjects(); } } - reset_selected_object_count_and_size(); + ResetSelectedObjectCountAndSize(); } /** * * rct2: 0x006AB316 */ -void editor_object_flags_free() +void EditorObjectFlagsFree() { _objectSelectionFlags.clear(); _objectSelectionFlags.shrink_to_fit(); @@ -335,7 +335,7 @@ void editor_object_flags_free() * * rct2: 0x00685791 */ -static void remove_selected_objects_from_research(const ObjectEntryDescriptor& descriptor) +static void RemoveSelectedObjectsFromResearch(const ObjectEntryDescriptor& descriptor) { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); auto obj = objManager.GetLoadedObject(descriptor); @@ -346,7 +346,7 @@ static void remove_selected_objects_from_research(const ObjectEntryDescriptor& d { case ObjectType::Ride: { - auto rideEntry = get_ride_entry(entryIndex); + auto rideEntry = GetRideEntryByIndex(entryIndex); for (auto rideType : rideEntry->ride_type) { ResearchItem tmp = {}; @@ -376,10 +376,10 @@ static void remove_selected_objects_from_research(const ObjectEntryDescriptor& d * * rct2: 0x006ABB66 */ -void unload_unselected_objects() +void UnloadUnselectedObjects() { - auto numItems = static_cast(object_repository_get_items_count()); - const auto* items = object_repository_get_items(); + auto numItems = static_cast(ObjectRepositoryGetItemsCount()); + const auto* items = ObjectRepositoryGetItems(); std::vector objectsToUnload; for (int32_t i = 0; i < numItems; i++) @@ -389,25 +389,25 @@ void unload_unselected_objects() auto descriptor = ObjectEntryDescriptor(items[i]); if (!IsIntransientObjectType(items[i].Type)) { - remove_selected_objects_from_research(descriptor); + RemoveSelectedObjectsFromResearch(descriptor); objectsToUnload.push_back(descriptor); } } } - object_manager_unload_objects(objectsToUnload); + ObjectManagerUnloadObjects(objectsToUnload); } /** * * rct2: 0x006AA805 */ -static void window_editor_object_selection_select_default_objects() +static void WindowEditorObjectSelectionSelectDefaultObjects() { if (_numSelectedObjectsForType[0] == 0) { for (auto defaultSelectedObject : DefaultSelectedObjects) { - window_editor_object_selection_select_object( + WindowEditorObjectSelectionSelectObject( 0, INPUT_FLAG_EDITOR_OBJECT_SELECT | INPUT_FLAG_EDITOR_OBJECT_1 | INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP, @@ -422,7 +422,7 @@ static void SelectDesignerObjects() { for (auto designerSelectedObject : DesignerSelectedObjects) { - window_editor_object_selection_select_object( + WindowEditorObjectSelectionSelectObject( 0, INPUT_FLAG_EDITOR_OBJECT_SELECT | INPUT_FLAG_EDITOR_OBJECT_1 | INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP, @@ -448,11 +448,11 @@ static void ReplaceSelectedWaterPalette(const ObjectRepositoryItem* item) auto newPaletteEntry = ObjectEntryDescriptor(*item); if (objectManager.GetLoadedObject(newPaletteEntry) != nullptr || objectManager.LoadObject(newPaletteEntry) != nullptr) { - load_palette(); + LoadPalette(); } else { - log_error("Failed to load selected palette %s", std::string(newPaletteEntry.GetName()).c_str()); + LOG_ERROR("Failed to load selected palette %s", std::string(newPaletteEntry.GetName()).c_str()); } } @@ -460,15 +460,15 @@ static void ReplaceSelectedWaterPalette(const ObjectRepositoryItem* item) * * rct2: 0x006AA770 */ -void reset_selected_object_count_and_size() +void ResetSelectedObjectCountAndSize() { for (auto& objectType : _numSelectedObjectsForType) { objectType = 0; } - int32_t numObjects = static_cast(object_repository_get_items_count()); - const ObjectRepositoryItem* items = object_repository_get_items(); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (int32_t i = 0; i < numObjects; i++) { ObjectType objectType = items[i].Type; @@ -479,21 +479,21 @@ void reset_selected_object_count_and_size() } } -void finish_object_selection() +void FinishObjectSelection() { if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) { - set_every_ride_type_invented(); - set_every_ride_entry_invented(); + SetEveryRideTypeInvented(); + SetEveryRideEntryInvented(); gEditorStep = EditorStep::RollercoasterDesigner; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } else { - set_all_scenery_items_invented(); + SetAllSceneryItemsInvented(); ScenerySetDefaultPlacementConfiguration(); gEditorStep = EditorStep::LandscapeEditor; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } @@ -501,7 +501,7 @@ void finish_object_selection() * * rct2: 0x006AB54F */ -ResultWithMessage window_editor_object_selection_select_object( +ResultWithMessage WindowEditorObjectSelectionSelectObject( uint8_t isMasterObject, int32_t flags, const ObjectRepositoryItem* item) { if (item == nullptr) @@ -509,10 +509,10 @@ ResultWithMessage window_editor_object_selection_select_object( return ObjectSelectionError(isMasterObject, STR_OBJECT_SELECTION_ERR_OBJECT_DATA_NOT_FOUND); } - int32_t numObjects = static_cast(object_repository_get_items_count()); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); // Get repository item index int32_t index = -1; - const ObjectRepositoryItem* items = object_repository_get_items(); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (int32_t i = 0; i < numObjects; i++) { if (&items[i] == item) @@ -544,7 +544,7 @@ ResultWithMessage window_editor_object_selection_select_object( { for (const auto& sgEntry : item->SceneryGroupInfo.Entries) { - window_editor_object_selection_select_object(++isMasterObject, flags, sgEntry); + WindowEditorObjectSelectionSelectObject(++isMasterObject, flags, sgEntry); } } @@ -578,10 +578,11 @@ ResultWithMessage window_editor_object_selection_select_object( { for (const auto& sgEntry : item->SceneryGroupInfo.Entries) { - const auto selectionResult = window_editor_object_selection_select_object(++isMasterObject, flags, sgEntry); + const auto selectionResult = WindowEditorObjectSelectionSelectObject(++isMasterObject, flags, sgEntry); if (!selectionResult.Successful) { _gSceneryGroupPartialSelectError = selectionResult.Message; + LOG_ERROR("Could not find object: %s", std::string(sgEntry.GetName()).c_str()); } } } @@ -594,7 +595,7 @@ ResultWithMessage window_editor_object_selection_select_object( if (isMasterObject != 0 && !(flags & INPUT_FLAG_EDITOR_OBJECT_1)) { char objectName[64]; - object_create_identifier_name(objectName, 64, &item->ObjectEntry); + ObjectCreateIdentifierName(objectName, 64, &item->ObjectEntry); auto ft = Formatter::Common(); ft.Add(objectName); return ObjectSelectionError(isMasterObject, STR_OBJECT_SELECTION_ERR_SHOULD_SELECT_X_FIRST); @@ -611,18 +612,18 @@ ResultWithMessage window_editor_object_selection_select_object( return { true }; } -ResultWithMessage window_editor_object_selection_select_object( +ResultWithMessage WindowEditorObjectSelectionSelectObject( uint8_t isMasterObject, int32_t flags, const ObjectEntryDescriptor& descriptor) { auto& objectRepository = OpenRCT2::GetContext()->GetObjectRepository(); const auto* item = objectRepository.FindObject(descriptor); - return window_editor_object_selection_select_object(isMasterObject, flags, item); + return WindowEditorObjectSelectionSelectObject(isMasterObject, flags, item); } -bool editor_check_object_group_at_least_one_selected(ObjectType checkObjectType) +bool EditorCheckObjectGroupAtLeastOneSelected(ObjectType checkObjectType) { - auto numObjects = std::min(object_repository_get_items_count(), _objectSelectionFlags.size()); - const ObjectRepositoryItem* items = object_repository_get_items(); + auto numObjects = std::min(ObjectRepositoryGetItemsCount(), _objectSelectionFlags.size()); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); for (size_t i = 0; i < numObjects; i++) { @@ -635,10 +636,10 @@ bool editor_check_object_group_at_least_one_selected(ObjectType checkObjectType) return false; } -bool editor_check_object_group_at_least_one_surface_selected(bool queue) +bool EditorCheckObjectGroupAtLeastOneSurfaceSelected(bool queue) { - auto numObjects = std::min(object_repository_get_items_count(), _objectSelectionFlags.size()); - const auto* items = object_repository_get_items(); + auto numObjects = std::min(ObjectRepositoryGetItemsCount(), _objectSelectionFlags.size()); + const auto* items = ObjectRepositoryGetItems(); for (size_t i = 0; i < numObjects; i++) { const auto& ori = items[i]; @@ -652,13 +653,13 @@ bool editor_check_object_group_at_least_one_surface_selected(bool queue) return false; } -int32_t editor_remove_unused_objects() +int32_t EditorRemoveUnusedObjects() { - sub_6AB211(); - setup_in_use_selection_flags(); + Sub6AB211(); + SetupInUseSelectionFlags(); - int32_t numObjects = static_cast(object_repository_get_items_count()); - const ObjectRepositoryItem* items = object_repository_get_items(); + int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); + const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); int32_t numUnselectedObjects = 0; for (int32_t i = 0; i < numObjects; i++) @@ -670,11 +671,17 @@ int32_t editor_remove_unused_objects() { const ObjectRepositoryItem* item = &items[i]; ObjectType objectType = item->Type; + if (ObjectTypeIsIntransient(objectType)) + continue; - if (objectType >= ObjectType::SceneryGroup) - { + // These object types require exactly one object to be selected at all times. + // Removing that object can badly break the game state. + if (objectType == ObjectType::ParkEntrance || objectType == ObjectType::Water) + continue; + + // It’s hard to determine exactly if a scenery group is used, so do not remove these automatically. + if (objectType == ObjectType::SceneryGroup) continue; - } _numSelectedObjectsForType[EnumValue(objectType)]--; _objectSelectionFlags[i] &= ~ObjectSelectionFlags::Selected; @@ -682,8 +689,8 @@ int32_t editor_remove_unused_objects() } } } - unload_unselected_objects(); - editor_object_flags_free(); + UnloadUnselectedObjects(); + EditorObjectFlagsFree(); auto intent = Intent(INTENT_ACTION_REFRESH_SCENERY); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/EditorObjectSelectionSession.h b/src/openrct2/EditorObjectSelectionSession.h index 18db2c11f9..1901943b64 100644 --- a/src/openrct2/EditorObjectSelectionSession.h +++ b/src/openrct2/EditorObjectSelectionSession.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,20 +29,20 @@ extern std::optional _gSceneryGroupPartialSelectError; extern std::vector _objectSelectionFlags; extern int32_t _numSelectedObjectsForType[EnumValue(ObjectType::Count)]; -bool editor_check_object_group_at_least_one_selected(ObjectType checkObjectType); -bool editor_check_object_group_at_least_one_surface_selected(bool queue); -void editor_object_flags_free(); -void unload_unselected_objects(); -void sub_6AB211(); -void reset_selected_object_count_and_size(); -void finish_object_selection(); -ResultWithMessage window_editor_object_selection_select_object( +bool EditorCheckObjectGroupAtLeastOneSelected(ObjectType checkObjectType); +bool EditorCheckObjectGroupAtLeastOneSurfaceSelected(bool queue); +void EditorObjectFlagsFree(); +void UnloadUnselectedObjects(); +void Sub6AB211(); +void ResetSelectedObjectCountAndSize(); +void FinishObjectSelection(); +ResultWithMessage WindowEditorObjectSelectionSelectObject( uint8_t isMasterObject, int32_t flags, const ObjectRepositoryItem* item); -ResultWithMessage window_editor_object_selection_select_object( +ResultWithMessage WindowEditorObjectSelectionSelectObject( uint8_t isMasterObject, int32_t flags, const ObjectEntryDescriptor& entry); /** * Removes all unused objects from the object selection. * @return The number of removed objects. */ -int32_t editor_remove_unused_objects(); +int32_t EditorRemoveUnusedObjects(); diff --git a/src/openrct2/FileClassifier.cpp b/src/openrct2/FileClassifier.cpp index d5ae29ef31..7a36c865ed 100644 --- a/src/openrct2/FileClassifier.cpp +++ b/src/openrct2/FileClassifier.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -88,7 +88,7 @@ static bool TryClassifyAsPark(OpenRCT2::IStream* stream, ClassifiedFileInfo* res catch (const std::exception& e) { success = false; - log_verbose(e.what()); + LOG_VERBOSE(e.what()); } stream->SetPosition(originalPosition); return success; @@ -102,21 +102,21 @@ static bool TryClassifyAsS6(OpenRCT2::IStream* stream, ClassifiedFileInfo* resul { auto chunkReader = SawyerChunkReader(stream); auto s6Header = chunkReader.ReadChunkAs(); - if (s6Header.type == S6_TYPE_SAVEDGAME) + if (s6Header.Type == S6_TYPE_SAVEDGAME) { result->Type = FILE_TYPE::SAVED_GAME; } - else if (s6Header.type == S6_TYPE_SCENARIO) + else if (s6Header.Type == S6_TYPE_SCENARIO) { result->Type = FILE_TYPE::SCENARIO; } - result->Version = s6Header.version; + result->Version = s6Header.Version; success = true; } catch (const std::exception& e) { // Exceptions are likely to occur if file is not S6 format - log_verbose(e.what()); + LOG_VERBOSE(e.what()); } stream->SetPosition(originalPosition); return success; @@ -131,7 +131,7 @@ static bool TryClassifyAsS4(OpenRCT2::IStream* stream, ClassifiedFileInfo* resul size_t dataLength = static_cast(stream->GetLength()); auto data = stream->ReadArray(dataLength); stream->SetPosition(originalPosition); - int32_t fileTypeVersion = sawyercoding_detect_file_type(data.get(), dataLength); + int32_t fileTypeVersion = SawyerCodingDetectFileType(data.get(), dataLength); int32_t type = fileTypeVersion & FILE_TYPE_MASK; int32_t version = fileTypeVersion & FILE_VERSION_MASK; @@ -169,11 +169,11 @@ static bool TryClassifyAsTD4_TD6(OpenRCT2::IStream* stream, ClassifiedFileInfo* auto data = stream->ReadArray(dataLength); stream->SetPosition(originalPosition); - if (sawyercoding_validate_track_checksum(data.get(), dataLength)) + if (SawyerCodingValidateTrackChecksum(data.get(), dataLength)) { std::unique_ptr)> td6data( Memory::Allocate(0x10000), &Memory::Free); - size_t td6len = sawyercoding_decode_td6(data.get(), td6data.get(), dataLength); + size_t td6len = SawyerCodingDecodeTD6(data.get(), td6data.get(), dataLength); if (td6data != nullptr && td6len >= 8) { uint8_t version = (td6data.get()[7] >> 2) & 3; @@ -194,7 +194,7 @@ static bool TryClassifyAsTD4_TD6(OpenRCT2::IStream* stream, ClassifiedFileInfo* return success; } -FileExtension get_file_extension_type(u8string_view path) +FileExtension GetFileExtensionType(u8string_view path) { auto extension = Path::GetExtension(path); if (String::Equals(extension, ".dat", true) || String::Equals(extension, ".pob", true)) diff --git a/src/openrct2/FileClassifier.h b/src/openrct2/FileClassifier.h index 474f6c6bee..96e06d1edf 100644 --- a/src/openrct2/FileClassifier.h +++ b/src/openrct2/FileClassifier.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -52,4 +52,4 @@ struct ClassifiedFileInfo bool TryClassifyFile(const std::string& path, ClassifiedFileInfo* result); bool TryClassifyFile(OpenRCT2::IStream* stream, ClassifiedFileInfo* result); -FileExtension get_file_extension_type(u8string_view path); +FileExtension GetFileExtensionType(u8string_view path); diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index a3c70d1546..193f2f6660 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,9 @@ #include "management/Research.h" #include "network/network.h" #include "object/Object.h" +#include "object/ObjectEntryManager.h" #include "object/ObjectList.h" +#include "object/WaterEntry.h" #include "platform/Platform.h" #include "ride/Ride.h" #include "ride/RideRatings.h" @@ -65,7 +67,6 @@ #include "world/Park.h" #include "world/Scenery.h" #include "world/Surface.h" -#include "world/Water.h" #include #include @@ -94,38 +95,38 @@ static bool _mapChangedExpected; using namespace OpenRCT2; -void game_reset_speed() +void GameResetSpeed() { gGameSpeed = 1; - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); } -void game_increase_game_speed() +void GameIncreaseGameSpeed() { gGameSpeed = std::min(gConfigGeneral.DebuggingTools ? 5 : 4, gGameSpeed + 1); if (gGameSpeed == 5) gGameSpeed = 8; - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); } -void game_reduce_game_speed() +void GameReduceGameSpeed() { gGameSpeed = std::max(1, gGameSpeed - 1); if (gGameSpeed == 7) gGameSpeed = 4; - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); } /** * * rct2: 0x0066B5C0 (part of 0x0066B3E8) */ -void game_create_windows() +void GameCreateWindows() { ContextOpenWindow(WindowClass::MainWindow); ContextOpenWindow(WindowClass::TopToolbar); ContextOpenWindow(WindowClass::BottomToolbar); - window_resize_gui(ContextGetWidth(), ContextGetHeight()); + WindowResizeGui(ContextGetWidth(), ContextGetHeight()); } enum @@ -146,9 +147,9 @@ enum * * rct2: 0x006838BD */ -void update_palette_effects() +void UpdatePaletteEffects() { - auto water_type = static_cast(object_entry_get_chunk(ObjectType::Water, 0)); + auto water_type = OpenRCT2::ObjectManager::GetObjectEntry(0); if (gClimateLightningFlash == 1) { @@ -159,7 +160,7 @@ void update_palette_effects() { palette = water_type->image_id; } - const rct_g1_element* g1 = gfx_get_g1_element(palette); + const G1Element* g1 = GfxGetG1Element(palette); if (g1 != nullptr) { int32_t xoffset = g1->x_offset; @@ -187,7 +188,7 @@ void update_palette_effects() palette = water_type->image_id; } - const rct_g1_element* g1 = gfx_get_g1_element(palette); + const G1Element* g1 = GfxGetG1Element(palette); if (g1 != nullptr) { int32_t xoffset = g1->x_offset; @@ -223,7 +224,7 @@ void update_palette_effects() { waterId = water_type->palette_index_1; } - const rct_g1_element* g1 = gfx_get_g1_element(shade + waterId); + const G1Element* g1 = GfxGetG1Element(shade + waterId); if (g1 != nullptr) { uint8_t* vs = &g1->offset[j * 3]; @@ -248,7 +249,7 @@ void update_palette_effects() { waterId = water_type->palette_index_2; } - g1 = gfx_get_g1_element(shade + waterId); + g1 = GfxGetG1Element(shade + waterId); if (g1 != nullptr) { uint8_t* vs = &g1->offset[j * 3]; @@ -270,7 +271,7 @@ void update_palette_effects() j = (static_cast(gPaletteEffectFrame * -960) * 3) >> 16; waterId = SPR_GAME_PALETTE_4; - g1 = gfx_get_g1_element(shade + waterId); + g1 = GfxGetG1Element(shade + waterId); if (g1 != nullptr) { uint8_t* vs = &g1->offset[j * 3]; @@ -299,22 +300,22 @@ void update_palette_effects() } } -void pause_toggle() +void PauseToggle() { gGamePaused ^= GAME_PAUSED_NORMAL; - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); if (gGamePaused & GAME_PAUSED_NORMAL) { OpenRCT2::Audio::StopAll(); } } -bool game_is_paused() +bool GameIsPaused() { return gGamePaused != 0; } -bool game_is_not_paused() +bool GameIsNotPaused() { return gGamePaused == 0; } @@ -323,25 +324,25 @@ bool game_is_not_paused() * * rct2: 0x0066DC0F */ -static void load_landscape() +static void LoadLandscape() { auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE); ContextOpenIntent(&intent); } -void rct2_to_utf8_self(char* buffer, size_t length) +void RCT2StringToUTF8Self(char* buffer, size_t length) { if (length > 0) { - auto temp = rct2_to_utf8(buffer, RCT2LanguageId::EnglishUK); - safe_strcpy(buffer, temp.data(), length); + auto temp = RCT2StringToUTF8(buffer, RCT2LanguageId::EnglishUK); + SafeStrCpy(buffer, temp.data(), length); } } // OpenRCT2 workaround to recalculate some values which are saved redundantly in the save to fix corrupted files. // For example recalculate guest count by looking at all the guests instead of trusting the value in the file. -void game_fix_save_vars() +void GameFixSaveVars() { // Recalculates peep count after loading a save to fix corrupted files uint32_t guestCount = 0; @@ -371,26 +372,26 @@ void game_fix_save_vars() { continue; } - Ride* ride = get_ride(rideIdx); + Ride* ride = GetRide(rideIdx); if (ride == nullptr) { - log_warning("Couldn't find ride %u, resetting ride on peep %u", rideIdx, peep->sprite_index); + LOG_WARNING("Couldn't find ride %u, resetting ride on peep %u", rideIdx, peep->Id); peep->CurrentRide = RideId::GetNull(); continue; } auto curName = peep->GetName(); - log_warning( - "Peep %u (%s) has invalid ride station = %u for ride %u.", peep->sprite_index, curName.c_str(), - srcStation.ToUnderlying(), rideIdx); - auto station = ride_get_first_valid_station_exit(ride); + LOG_WARNING( + "Peep %u (%s) has invalid ride station = %u for ride %u.", peep->Id, curName.c_str(), srcStation.ToUnderlying(), + rideIdx); + auto station = RideGetFirstValidStationExit(*ride); if (station.IsNull()) { - log_warning("Couldn't find station, removing peep %u", peep->sprite_index); + LOG_WARNING("Couldn't find station, removing peep %u", peep->Id); peepsToRemove.push_back(peep); } else { - log_warning("Amending ride station to %u.", station); + LOG_WARNING("Amending ride station to %u.", station); peep->CurrentRideStation = station; } } @@ -417,11 +418,11 @@ void game_fix_save_vars() if (surfaceElement == nullptr) { - log_error("Null map element at x = %d and y = %d. Fixing...", x, y); + LOG_ERROR("Null map element at x = %d and y = %d. Fixing...", x, y); surfaceElement = TileElementInsert(TileCoordsXYZ{ x, y, 14 }.ToCoordsXYZ(), 0b0000); if (surfaceElement == nullptr) { - log_error("Unable to fix: Map element limit reached."); + LOG_ERROR("Unable to fix: Map element limit reached."); return; } } @@ -440,14 +441,11 @@ void game_fix_save_vars() ResearchFix(); - // Fix banner list pointing to NULL map elements - BannerResetBrokenIndex(); - // Fix banners which share their index - BannerFixDuplicates(); + BannerApplyFixes(); // Fix invalid vehicle sprite sizes, thus preventing visual corruption of sprites - fix_invalid_vehicle_sprite_sizes(); + FixInvalidVehicleSpriteSizes(); // Fix gParkEntrance locations for which the tile_element no longer exists ParkEntranceFixLocations(); @@ -457,7 +455,7 @@ void game_fix_save_vars() MapCountRemainingLandRights(); } -void game_load_init() +void GameLoadInit() { IGameStateSnapshots* snapshots = GetContext()->GetGameStateSnapshots(); snapshots->Reset(); @@ -466,24 +464,24 @@ void game_load_init() OpenRCT2::Audio::StopAll(); if (!gLoadKeepWindowsOpen) { - viewport_init_all(); - game_create_windows(); + ViewportInitAll(); + GameCreateWindows(); } else { - auto* mainWindow = window_get_main(); - window_unfollow_sprite(*mainWindow); + auto* mainWindow = WindowGetMain(); + WindowUnfollowSprite(*mainWindow); } auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); windowManager->SetMainView(gSavedView, gSavedViewZoom, gSavedViewRotation); - if (network_get_mode() != NETWORK_MODE_CLIENT) + if (NetworkGetMode() != NETWORK_MODE_CLIENT) { GameActions::ClearQueue(); } ResetEntitySpatialIndices(); - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); ScenerySetDefaultPlacementConfiguration(); auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES); @@ -491,34 +489,34 @@ void game_load_init() gWindowUpdateTicks = 0; - load_palette(); + LoadPalette(); if (!gOpenRCT2Headless) { intent = Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD); ContextBroadcastIntent(&intent); - window_update_all(); + WindowUpdateAll(); } OpenRCT2::Audio::StopTitleMusic(); gGameSpeed = 1; } -void game_load_scripts() +void GameLoadScripts() { #ifdef ENABLE_SCRIPTING GetContext()->GetScriptEngine().LoadTransientPlugins(); #endif } -void game_unload_scripts() +void GameUnloadScripts() { #ifdef ENABLE_SCRIPTING GetContext()->GetScriptEngine().UnloadTransientPlugins(); #endif } -void game_notify_map_change() +void GameNotifyMapChange() { #ifdef ENABLE_SCRIPTING // Ensure we don't get a two lots of change events @@ -534,7 +532,7 @@ void game_notify_map_change() #endif } -void game_notify_map_changed() +void GameNotifyMapChanged() { #ifdef ENABLE_SCRIPTING using namespace OpenRCT2::Scripting; @@ -551,7 +549,7 @@ void game_notify_map_changed() * rct2: 0x0069E9A7 * Call after a rotation or loading of a save to reset sprite quadrants */ -void reset_all_sprite_quadrant_placements() +void ResetAllSpriteQuadrantPlacements() { for (EntityId::UnderlyingType i = 0; i < MAX_ENTITIES; i++) { @@ -563,65 +561,65 @@ void reset_all_sprite_quadrant_placements() } } -void save_game() +void SaveGame() { if (!gFirstTimeSaving && !gIsAutosaveLoaded) { const auto savePath = Path::WithExtension(gScenarioSavePath, ".park"); - save_game_with_name(savePath); + SaveGameWithName(savePath); } else { - save_game_as(); + SaveGameAs(); } } -void save_game_cmd(u8string_view name /* = {} */) +void SaveGameCmd(u8string_view name /* = {} */) { if (name.empty()) { const auto savePath = Path::WithExtension(gScenarioSavePath, ".park"); - save_game_with_name(savePath); + SaveGameWithName(savePath); } else { auto env = GetContext()->GetPlatformEnvironment(); auto savePath = Path::Combine(env->GetDirectoryPath(DIRBASE::USER, DIRID::SAVE), u8string(name) + u8".park"); - save_game_with_name(savePath); + SaveGameWithName(savePath); } } -void save_game_with_name(u8string_view name) +void SaveGameWithName(u8string_view name) { - log_verbose("Saving to %s", u8string(name).c_str()); - if (scenario_save(name, gConfigGeneral.SavePluginData ? 1 : 0)) + LOG_VERBOSE("Saving to %s", u8string(name).c_str()); + if (ScenarioSave(name, gConfigGeneral.SavePluginData ? 1 : 0)) { - log_verbose("Saved to %s", u8string(name).c_str()); + LOG_VERBOSE("Saved to %s", u8string(name).c_str()); gCurrentLoadedPath = name; gIsAutosaveLoaded = false; gScreenAge = 0; } } -std::unique_ptr create_save_game_as_intent() +std::unique_ptr CreateSaveGameAsIntent() { auto name = Path::GetFileNameWithoutExtension(gScenarioSavePath); auto intent = std::make_unique(WindowClass::Loadsave); - intent->putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME); - intent->putExtra(INTENT_EXTRA_PATH, name); + intent->PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME); + intent->PutExtra(INTENT_EXTRA_PATH, name); return intent; } -void save_game_as() +void SaveGameAs() { - auto intent = create_save_game_as_intent(); + auto intent = CreateSaveGameAsIntent(); ContextOpenIntent(intent.get()); } -static void limit_autosave_count(const size_t numberOfFilesToKeep, bool processLandscapeFolder) +static void LimitAutosaveCount(const size_t numberOfFilesToKeep, bool processLandscapeFolder) { size_t autosavesCount = 0; size_t numAutosavesToDelete = 0; @@ -675,12 +673,12 @@ static void limit_autosave_count(const size_t numberOfFilesToKeep, bool processL { if (!File::Delete(autosaveFiles[i])) { - log_warning("Failed to delete autosave file: %s", autosaveFiles[i].data()); + LOG_WARNING("Failed to delete autosave file: %s", autosaveFiles[i].data()); } } } -void game_autosave() +void GameAutosave() { auto subDirectory = DIRID::SAVE; const char* fileExtension = ".park"; @@ -702,7 +700,7 @@ void game_autosave() currentDate.day, currentTime.hour, currentTime.minute, currentTime.second, fileExtension); int32_t autosavesToKeep = gConfigGeneral.AutosaveAmount; - limit_autosave_count(autosavesToKeep - 1, (gScreenFlags & SCREEN_FLAGS_EDITOR)); + LimitAutosaveCount(autosavesToKeep - 1, (gScreenFlags & SCREEN_FLAGS_EDITOR)); auto env = GetContext()->GetPlatformEnvironment(); auto autosaveDir = Path::Combine(env->GetDirectoryPath(DIRBASE::USER, subDirectory), u8"autosave"); @@ -717,30 +715,39 @@ void game_autosave() File::Copy(path, backupPath, true); } - if (!scenario_save(path, saveFlags)) + if (!ScenarioSave(path, saveFlags)) Console::Error::WriteLine("Could not autosave the scenario. Is the save folder writeable?"); } -static void game_load_or_quit_no_save_prompt_callback(int32_t result, const utf8* path) +static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path) { if (result == MODAL_RESULT_OK) { - game_notify_map_change(); - game_unload_scripts(); - window_close_by_class(WindowClass::EditorObjectSelection); + GameNotifyMapChange(); + GameUnloadScripts(); + WindowCloseByClass(WindowClass::EditorObjectSelection); GetContext()->LoadParkFromFile(path); - game_load_scripts(); - game_notify_map_changed(); + GameLoadScripts(); + GameNotifyMapChanged(); gIsAutosaveLoaded = gIsAutosave; gFirstTimeSaving = false; } } +static void NewGameWindowCallback(const utf8* path) +{ + WindowCloseByClass(WindowClass::EditorObjectSelection); + GameNotifyMapChange(); + GetContext()->LoadParkFromFile(path, false, true); + GameLoadScripts(); + GameNotifyMapChanged(); +} + /** * * rct2: 0x0066DB79 */ -void game_load_or_quit_no_save_prompt() +void GameLoadOrQuitNoSavePrompt() { switch (gSavePromptMode) { @@ -748,16 +755,16 @@ void game_load_or_quit_no_save_prompt() { auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt); GameActions::Execute(&loadOrQuitAction); - tool_cancel(); + ToolCancel(); if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { - load_landscape(); + LoadLandscape(); } else { auto intent = Intent(WindowClass::Loadsave); - intent.putExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); - intent.putExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(game_load_or_quit_no_save_prompt_callback)); + intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(GameLoadOrQuitNoSavePromptCallback)); ContextOpenIntent(&intent); } break; @@ -766,26 +773,36 @@ void game_load_or_quit_no_save_prompt() { auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt); GameActions::Execute(&loadOrQuitAction); - tool_cancel(); - if (input_test_flag(INPUT_FLAG_5)) + ToolCancel(); + if (InputTestFlag(INPUT_FLAG_5)) { - input_set_flag(INPUT_FLAG_5, false); + InputSetFlag(INPUT_FLAG_5, false); } gGameSpeed = 1; gFirstTimeSaving = true; - game_notify_map_change(); - game_unload_scripts(); - title_load(); + GameNotifyMapChange(); + GameUnloadScripts(); + TitleLoad(); + break; + } + case PromptMode::SaveBeforeNewGame: + { + auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt); + GameActions::Execute(&loadOrQuitAction); + ToolCancel(); + auto intent = Intent(WindowClass::ScenarioSelect); + intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(NewGameWindowCallback)); + ContextOpenIntent(&intent); break; } default: - game_unload_scripts(); - openrct2_finish(); + GameUnloadScripts(); + OpenRCT2Finish(); break; } } -void start_silent_record() +void StartSilentRecord() { std::string name = Path::Combine( OpenRCT2::GetContext()->GetPlatformEnvironment()->GetDirectoryPath(OpenRCT2::DIRBASE::USER), u8"debug_replay.parkrep"); @@ -801,7 +818,7 @@ void start_silent_record() } } -bool stop_silent_record() +bool StopSilentRecord() { auto* replayManager = OpenRCT2::GetContext()->GetReplayManager(); if (!replayManager->IsRecording() && !replayManager->IsNormalising()) @@ -829,7 +846,7 @@ bool stop_silent_record() void PrepareMapForSave() { - viewport_set_saved_view(); + ViewportSetSavedView(); #ifdef ENABLE_SCRIPTING auto& scriptEngine = GetContext()->GetScriptEngine(); diff --git a/src/openrct2/Game.h b/src/openrct2/Game.h index 3634a63a53..b4ea9b1563 100644 --- a/src/openrct2/Game.h +++ b/src/openrct2/Game.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ enum class GameCommand : int32_t PlaceScenery, // GA SetWaterHeight, // GA PlacePath, // GA - PlacePathFromTrack, // GA + PlacePathLayout, // GA RemovePath, // GA ChangeSurfaceStyle, // GA SetRidePrice, // GA @@ -149,31 +149,31 @@ extern bool gIsAutosaveLoaded; extern bool gLoadKeepWindowsOpen; -void game_reset_speed(); -void game_increase_game_speed(); -void game_reduce_game_speed(); +void GameResetSpeed(); +void GameIncreaseGameSpeed(); +void GameReduceGameSpeed(); -void game_create_windows(); -void reset_all_sprite_quadrant_placements(); -void update_palette_effects(); +void GameCreateWindows(); +void ResetAllSpriteQuadrantPlacements(); +void UpdatePaletteEffects(); -void game_load_or_quit_no_save_prompt(); -void game_load_init(); -void game_load_scripts(); -void game_unload_scripts(); -void game_notify_map_change(); -void game_notify_map_changed(); -void pause_toggle(); -bool game_is_paused(); -bool game_is_not_paused(); -void save_game(); -std::unique_ptr create_save_game_as_intent(); -void save_game_as(); -void save_game_cmd(u8string_view name = {}); -void save_game_with_name(u8string_view name); -void game_autosave(); -void rct2_to_utf8_self(char* buffer, size_t length); -void game_fix_save_vars(); -void start_silent_record(); -bool stop_silent_record(); +void GameLoadOrQuitNoSavePrompt(); +void GameLoadInit(); +void GameLoadScripts(); +void GameUnloadScripts(); +void GameNotifyMapChange(); +void GameNotifyMapChanged(); +void PauseToggle(); +bool GameIsPaused(); +bool GameIsNotPaused(); +void SaveGame(); +std::unique_ptr CreateSaveGameAsIntent(); +void SaveGameAs(); +void SaveGameCmd(u8string_view name = {}); +void SaveGameWithName(u8string_view name); +void GameAutosave(); +void RCT2StringToUTF8Self(char* buffer, size_t length); +void GameFixSaveVars(); +void StartSilentRecord(); +bool StopSilentRecord(); void PrepareMapForSave(); diff --git a/src/openrct2/GameState.cpp b/src/openrct2/GameState.cpp index 9efe08eae6..a3670dc24a 100644 --- a/src/openrct2/GameState.cpp +++ b/src/openrct2/GameState.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -65,12 +65,12 @@ void GameState::InitAll(const TileCoordsXY& mapSize) MapInit(mapSize); _park->Initialise(); - finance_init(); + FinanceInit(); BannerInit(); - ride_init_all(); + RideInitAll(); ResetAllEntities(); UpdateConsolidatedPatrolAreas(); - date_reset(); + DateReset(); ClimateReset(ClimateType::CoolAndWet); News::InitQueue(); @@ -84,7 +84,7 @@ void GameState::InitAll(const TileCoordsXY& mapSize) auto intent = Intent(INTENT_ACTION_CLEAR_TILE_INSPECTOR_CLIPBOARD); ContextBroadcastIntent(&intent); - load_palette(); + LoadPalette(); CheatsReset(); ClearRestrictedScenery(); @@ -111,10 +111,10 @@ void GameState::Tick() uint32_t numUpdates = 1; // 0x006E3AEC // screen_game_process_mouse_input(); - screenshot_check(); - game_handle_keyboard_input(); + ScreenshotCheck(); + GameHandleKeyboardInput(); - if (game_is_not_paused() && gPreviewingTitleSequenceInGame) + if (GameIsNotPaused() && gPreviewingTitleSequenceInGame) { auto player = GetContext()->GetUiContext()->GetTitleSequencePlayer(); if (player != nullptr) @@ -123,12 +123,12 @@ void GameState::Tick() } } - network_update(); + NetworkUpdate(); - if (network_get_mode() == NETWORK_MODE_CLIENT && network_get_status() == NETWORK_STATUS_CONNECTED - && network_get_authstatus() == NetworkAuth::Ok) + if (NetworkGetMode() == NETWORK_MODE_CLIENT && NetworkGetStatus() == NETWORK_STATUS_CONNECTED + && NetworkGetAuthstatus() == NetworkAuth::Ok) { - numUpdates = std::clamp(network_get_server_tick() - gCurrentTicks, 0, 10); + numUpdates = std::clamp(NetworkGetServerTick() - gCurrentTicks, 0, 10); } else { @@ -140,11 +140,11 @@ void GameState::Tick() } } - bool isPaused = game_is_paused(); - if (network_get_mode() == NETWORK_MODE_SERVER && gConfigNetwork.PauseServerIfNoClients) + bool isPaused = GameIsPaused(); + if (NetworkGetMode() == NETWORK_MODE_SERVER && gConfigNetwork.PauseServerIfNoClients) { // If we are headless we always have 1 player (host), pause if no one else is around. - if (gOpenRCT2Headless && network_get_num_players() == 1) + if (gOpenRCT2Headless && NetworkGetNumPlayers() == 1) { isPaused |= true; } @@ -153,10 +153,10 @@ void GameState::Tick() bool didRunSingleFrame = false; if (isPaused) { - if (gDoSingleUpdate && network_get_mode() == NETWORK_MODE_NONE) + if (gDoSingleUpdate && NetworkGetMode() == NETWORK_MODE_NONE) { didRunSingleFrame = true; - pause_toggle(); + PauseToggle(); numUpdates = 1; } else @@ -165,10 +165,10 @@ void GameState::Tick() // If the game is paused it will not call UpdateLogic at all. numUpdates = 0; - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) { // Make sure the client always knows about what tick the host is on. - network_send_tick(); + NetworkSendTick(); } // Update the animation list. Note this does not @@ -176,7 +176,7 @@ void GameState::Tick() MapAnimationInvalidateAll(); // Post-tick network update - network_process_pending(); + NetworkProcessPending(); // Post-tick game actions. GameActions::ProcessQueue(); @@ -189,11 +189,11 @@ void GameState::Tick() UpdateLogic(); if (gGameSpeed == 1) { - if (input_get_state() == InputState::Reset || input_get_state() == InputState::Normal) + if (InputGetState() == InputState::Reset || InputGetState() == InputState::Normal) { - if (input_test_flag(INPUT_FLAG_VIEWPORT_SCROLLING)) + if (InputTestFlag(INPUT_FLAG_VIEWPORT_SCROLLING)) { - input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, false); + InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false); break; } } @@ -204,11 +204,11 @@ void GameState::Tick() } } - network_flush(); + NetworkFlush(); if (!gOpenRCT2Headless) { - input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, false); + InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false); // the flickering frequency is reduced by 4, compared to the original // it was done due to inability to reproduce original frequency @@ -237,14 +237,14 @@ void GameState::Tick() if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { - scenario_autosave_check(); + ScenarioAutosaveCheck(); } - window_dispatch_update_all(); + WindowDispatchUpdateAll(); - if (didRunSingleFrame && game_is_not_paused() && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (didRunSingleFrame && GameIsNotPaused() && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { - pause_toggle(); + PauseToggle(); } gDoSingleUpdate = false; @@ -270,39 +270,39 @@ void GameState::UpdateLogic(LogicTimings* timings) GetContext()->GetReplayManager()->Update(); - network_update(); + NetworkUpdate(); report_time(LogicTimePart::NetworkUpdate); - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) { - if (network_gamestate_snapshots_enabled()) + if (NetworkGamestateSnapshotsEnabled()) { CreateStateSnapshot(); } // Send current tick out. - network_send_tick(); + NetworkSendTick(); } - else if (network_get_mode() == NETWORK_MODE_CLIENT) + else if (NetworkGetMode() == NETWORK_MODE_CLIENT) { // Don't run past the server, this condition can happen during map changes. - if (network_get_server_tick() == gCurrentTicks) + if (NetworkGetServerTick() == gCurrentTicks) { return; } // Check desync. - bool desynced = network_check_desynchronisation(); + bool desynced = NetworkCheckDesynchronisation(); if (desynced) { // If desync debugging is enabled and we are still connected request the specific game state from server. - if (network_gamestate_snapshots_enabled() && network_get_status() == NETWORK_STATUS_CONNECTED) + if (NetworkGamestateSnapshotsEnabled() && NetworkGetStatus() == NETWORK_STATUS_CONNECTED) { // Create snapshot from this tick so we can compare it later // as we won't pause the game on this event. CreateStateSnapshot(); - network_request_gamestate_snapshot(); + NetworkRequestGamestateSnapshot(); } } } @@ -313,11 +313,11 @@ void GameState::UpdateLogic(LogicTimings* timings) auto day = _date.GetDay(); #endif - date_update(); + DateUpdate(); _date = Date(static_cast(gDateMonthsElapsed), gDateMonthTicks); report_time(LogicTimePart::Date); - scenario_update(); + ScenarioUpdate(); report_time(LogicTimePart::Scenario); ClimateUpdate(); report_time(LogicTimePart::Climate); @@ -328,11 +328,11 @@ void GameState::UpdateLogic(LogicTimings* timings) report_time(LogicTimePart::MapStashProvisionalElements); MapUpdatePathWideFlags(); report_time(LogicTimePart::MapPathWideFlags); - peep_update_all(); + PeepUpdateAll(); report_time(LogicTimePart::Peep); MapRestoreProvisionalElements(); report_time(LogicTimePart::MapRestoreProvisionalElements); - vehicle_update_all(); + VehicleUpdateAll(); report_time(LogicTimePart::Vehicle); UpdateAllMiscEntities(); report_time(LogicTimePart::Misc); @@ -345,25 +345,25 @@ void GameState::UpdateLogic(LogicTimings* timings) } report_time(LogicTimePart::Park); - research_update(); + ResearchUpdate(); report_time(LogicTimePart::Research); - ride_ratings_update_all(); + RideRatingsUpdateAll(); report_time(LogicTimePart::RideRatings); - ride_measurements_update(); + RideMeasurementsUpdate(); report_time(LogicTimePart::RideMeasurments); News::UpdateCurrentItem(); report_time(LogicTimePart::News); MapAnimationInvalidateAll(); report_time(LogicTimePart::MapAnimation); - vehicle_sounds_update(); - peep_update_crowd_noise(); + VehicleSoundsUpdate(); + PeepUpdateCrowdNoise(); ClimateUpdateSound(); report_time(LogicTimePart::Sounds); - editor_open_windows_for_current_step(); + EditorOpenWindowsForCurrentStep(); // Update windows - // window_dispatch_update_all(); + // WindowDispatchUpdateAll(); // Start autosave timer after update if (gLastAutoSaveUpdate == AUTOSAVE_PAUSE) @@ -374,8 +374,8 @@ void GameState::UpdateLogic(LogicTimings* timings) GameActions::ProcessQueue(); report_time(LogicTimePart::GameActions); - network_process_pending(); - network_flush(); + NetworkProcessPending(); + NetworkFlush(); report_time(LogicTimePart::NetworkFlush); gCurrentTicks++; @@ -406,5 +406,5 @@ void GameState::CreateStateSnapshot() auto& snapshot = snapshots->CreateSnapshot(); snapshots->Capture(snapshot); - snapshots->LinkSnapshot(snapshot, gCurrentTicks, scenario_rand_state().s0); + snapshots->LinkSnapshot(snapshot, gCurrentTicks, ScenarioRandState().s0); } diff --git a/src/openrct2/GameState.h b/src/openrct2/GameState.h index c4c0821e82..1ad0cb7d5e 100644 --- a/src/openrct2/GameState.h +++ b/src/openrct2/GameState.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 22c7b06f8e..d3dd2dde29 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -28,10 +28,10 @@ static constexpr uint32_t InvalidTick = 0xFFFFFFFF; #pragma pack(push, 1) union EntitySnapshot { - uint8_t pad_00[0x200]; + uint8_t Pad00[0x200]; EntityBase base; EntitySnapshot() - : pad_00() + : Pad00() { } }; @@ -97,7 +97,7 @@ struct GameStateSnapshot_t // can fail gracefully when fields added/removed if (!EntitiesSizeCheck(ds)) { - log_error("Entity index corrupted!"); + LOG_ERROR("Entity index corrupted!"); return; } ds << numSavedSprites; @@ -115,7 +115,7 @@ struct GameStateSnapshot_t EntitySnapshot* entity = getEntity(spriteIdx); if (entity == nullptr) { - log_error("Entity index corrupted!"); + LOG_ERROR("Entity index corrupted!"); return; } auto& sprite = *entity; @@ -186,7 +186,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots snapshot.SerialiseSprites( [](const EntityId index) { return reinterpret_cast(GetEntity(index)); }, MAX_ENTITIES, true); - // log_info("Snapshot size: %u bytes", static_cast(snapshot.storedSprites.GetLength())); + // LOG_INFO("Snapshot size: %u bytes", static_cast(snapshot.storedSprites.GetLength())); } virtual const GameStateSnapshot_t* GetLinkedSnapshot(uint32_t tick) const override final @@ -233,14 +233,14 @@ struct GameStateSnapshots final : public IGameStateSnapshots std::memcpy(&valB, &spriteCmp.field, sizeof(struc::field)); \ uintptr_t offset = reinterpret_cast(&spriteBase.field) - reinterpret_cast(&spriteBase); \ changeData.diffs.push_back( \ - GameStateSpriteChange_t::Diff_t{ static_cast(offset), sizeof(struc::field), #struc, #field, valA, valB }); \ + GameStateSpriteChange::Diff{ static_cast(offset), sizeof(struc::field), #struc, #field, valA, valB }); \ } void CompareSpriteDataCommon( - const EntityBase& spriteBase, const EntityBase& spriteCmp, GameStateSpriteChange_t& changeData) const + const EntityBase& spriteBase, const EntityBase& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(EntityBase, Type); - COMPARE_FIELD(EntityBase, sprite_index); + COMPARE_FIELD(EntityBase, Id); COMPARE_FIELD(EntityBase, x); COMPARE_FIELD(EntityBase, y); COMPARE_FIELD(EntityBase, z); @@ -256,7 +256,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(EntityBase, sprite_direction); } - void CompareSpriteDataPeep(const Peep& spriteBase, const Peep& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataPeep(const Peep& spriteBase, const Peep& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(Peep, NextLoc.x); COMPARE_FIELD(Peep, NextLoc.y); @@ -288,7 +288,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, StepProgress); COMPARE_FIELD(Peep, MazeLastEdge); COMPARE_FIELD(Peep, InteractionRideIndex); - COMPARE_FIELD(Peep, Id); + COMPARE_FIELD(Peep, PeepId); COMPARE_FIELD(Peep, PathCheckOptimisation); COMPARE_FIELD(Peep, PathfindGoal.x); COMPARE_FIELD(Peep, PathfindGoal.y); @@ -302,9 +302,10 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Peep, PathfindHistory[i].direction); } COMPARE_FIELD(Peep, WalkingFrameNum); + COMPARE_FIELD(Peep, PeepFlags); } - void CompareSpriteDataStaff(const Staff& spriteBase, const Staff& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataStaff(const Staff& spriteBase, const Staff& spriteCmp, GameStateSpriteChange& changeData) const { CompareSpriteDataPeep(spriteBase, spriteCmp, changeData); @@ -319,12 +320,22 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Staff, StaffBinsEmptied); } - void CompareSpriteDataGuest(const Guest& spriteBase, const Guest& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataGuest(const Guest& spriteBase, const Guest& spriteCmp, GameStateSpriteChange& changeData) const { CompareSpriteDataPeep(spriteBase, spriteCmp, changeData); - COMPARE_FIELD(Guest, OutsideOfPark); COMPARE_FIELD(Guest, GuestNumRides); + COMPARE_FIELD(Guest, GuestNextInQueue); + COMPARE_FIELD(Guest, ParkEntryTime); + COMPARE_FIELD(Guest, GuestHeadingToRideId); + COMPARE_FIELD(Guest, GuestIsLostCountdown); + COMPARE_FIELD(Guest, GuestTimeOnRide); + COMPARE_FIELD(Guest, PaidToEnter); + COMPARE_FIELD(Guest, PaidOnRides); + COMPARE_FIELD(Guest, PaidOnFood); + COMPARE_FIELD(Guest, PaidOnDrink); + COMPARE_FIELD(Guest, PaidOnSouvenirs); + COMPARE_FIELD(Guest, OutsideOfPark); COMPARE_FIELD(Guest, Happiness); COMPARE_FIELD(Guest, HappinessTarget); COMPARE_FIELD(Guest, Nausea); @@ -335,17 +346,13 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Guest, TimeToConsume); COMPARE_FIELD(Guest, Intensity); COMPARE_FIELD(Guest, NauseaTolerance); - COMPARE_FIELD(Guest, PaidOnDrink); - COMPARE_FIELD(Guest, ItemFlags); + COMPARE_FIELD(Guest, TimeInQueue); + COMPARE_FIELD(Guest, CashInPocket); + COMPARE_FIELD(Guest, CashSpent); + COMPARE_FIELD(Guest, Photo1RideRef); COMPARE_FIELD(Guest, Photo2RideRef); COMPARE_FIELD(Guest, Photo3RideRef); COMPARE_FIELD(Guest, Photo4RideRef); - COMPARE_FIELD(Guest, GuestNextInQueue); - COMPARE_FIELD(Guest, TimeInQueue); - - COMPARE_FIELD(Guest, CashInPocket); - COMPARE_FIELD(Guest, CashSpent); - COMPARE_FIELD(Guest, ParkEntryTime); COMPARE_FIELD(Guest, RejoinQueueTimeout); COMPARE_FIELD(Guest, PreviousRide); COMPARE_FIELD(Guest, PreviousRideTimeOut); @@ -356,17 +363,8 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Guest, Thoughts[i].freshness); COMPARE_FIELD(Guest, Thoughts[i].fresh_timeout); } - COMPARE_FIELD(Guest, GuestHeadingToRideId); - COMPARE_FIELD(Guest, GuestIsLostCountdown); - COMPARE_FIELD(Guest, Photo1RideRef); - COMPARE_FIELD(Guest, PeepFlags); COMPARE_FIELD(Guest, LitterCount); - COMPARE_FIELD(Guest, GuestTimeOnRide); COMPARE_FIELD(Guest, DisgustingCount); - COMPARE_FIELD(Guest, PaidToEnter); - COMPARE_FIELD(Guest, PaidOnRides); - COMPARE_FIELD(Guest, PaidOnFood); - COMPARE_FIELD(Guest, PaidOnSouvenirs); COMPARE_FIELD(Guest, AmountOfFood); COMPARE_FIELD(Guest, AmountOfDrinks); COMPARE_FIELD(Guest, AmountOfSouvenirs); @@ -382,11 +380,12 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Guest, HatColour); COMPARE_FIELD(Guest, FavouriteRide); COMPARE_FIELD(Guest, FavouriteRideRating); + COMPARE_FIELD(Guest, ItemFlags); } - void CompareSpriteDataVehicle( - const Vehicle& spriteBase, const Vehicle& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataVehicle(const Vehicle& spriteBase, const Vehicle& spriteCmp, GameStateSpriteChange& changeData) const { + COMPARE_FIELD(Vehicle, SubType); COMPARE_FIELD(Vehicle, Pitch); COMPARE_FIELD(Vehicle, bank_rotation); COMPARE_FIELD(Vehicle, remaining_distance); @@ -405,7 +404,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Vehicle, next_vehicle_on_ride); COMPARE_FIELD(Vehicle, var_44); COMPARE_FIELD(Vehicle, mass); - COMPARE_FIELD(Vehicle, update_flags); + COMPARE_FIELD(Vehicle, Flags); COMPARE_FIELD(Vehicle, SwingSprite); COMPARE_FIELD(Vehicle, current_station); COMPARE_FIELD(Vehicle, SwingPosition); @@ -437,9 +436,9 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Vehicle, powered_acceleration); COMPARE_FIELD(Vehicle, CollisionDetectionTimer); COMPARE_FIELD(Vehicle, animation_frame); - for (std::size_t i = 0; i < sizeof(Vehicle::pad_C6) / sizeof(*Vehicle::pad_C6); i++) + for (std::size_t i = 0; i < sizeof(Vehicle::PadC6) / sizeof(*Vehicle::PadC6); i++) { - COMPARE_FIELD(Vehicle, pad_C6[i]); + COMPARE_FIELD(Vehicle, PadC6[i]); } COMPARE_FIELD(Vehicle, animationState); COMPARE_FIELD(Vehicle, scream_sound_id); @@ -456,36 +455,34 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Vehicle, target_seat_rotation); COMPARE_FIELD(Vehicle, BoatLocation.x); COMPARE_FIELD(Vehicle, BoatLocation.y); - COMPARE_FIELD(Vehicle, IsCrashedVehicle); } - void CompareSpriteDataLitter(const Litter& spriteBase, const Litter& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataLitter(const Litter& spriteBase, const Litter& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(Litter, creationTick); } void CompareSpriteDataMoneyEffect( - const MoneyEffect& spriteBase, const MoneyEffect& spriteCmp, GameStateSpriteChange_t& changeData) const + const MoneyEffect& spriteBase, const MoneyEffect& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(MoneyEffect, frame); COMPARE_FIELD(MoneyEffect, MoveDelay); COMPARE_FIELD(MoneyEffect, NumMovements); - COMPARE_FIELD(MoneyEffect, Vertical); + COMPARE_FIELD(MoneyEffect, GuestPurchase); COMPARE_FIELD(MoneyEffect, Value); COMPARE_FIELD(MoneyEffect, OffsetX); COMPARE_FIELD(MoneyEffect, Wiggle); } void CompareSpriteDataSteamParticle( - const SteamParticle& spriteBase, const SteamParticle& spriteCmp, GameStateSpriteChange_t& changeData) const + const SteamParticle& spriteBase, const SteamParticle& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(SteamParticle, frame); COMPARE_FIELD(SteamParticle, time_to_move); } void CompareSpriteDataVehicleCrashParticle( - const VehicleCrashParticle& spriteBase, const VehicleCrashParticle& spriteCmp, - GameStateSpriteChange_t& changeData) const + const VehicleCrashParticle& spriteBase, const VehicleCrashParticle& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(VehicleCrashParticle, frame); COMPARE_FIELD(VehicleCrashParticle, time_to_live); @@ -502,7 +499,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(VehicleCrashParticle, acceleration_z); } - void CompareSpriteDataDuck(const Duck& spriteBase, const Duck& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataDuck(const Duck& spriteBase, const Duck& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(Duck, frame); COMPARE_FIELD(Duck, target_x); @@ -510,8 +507,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(Duck, state); } - void CompareSpriteDataBalloon( - const Balloon& spriteBase, const Balloon& spriteCmp, GameStateSpriteChange_t& changeData) const + void CompareSpriteDataBalloon(const Balloon& spriteBase, const Balloon& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(Balloon, frame); COMPARE_FIELD(Balloon, popped); @@ -520,37 +516,37 @@ struct GameStateSnapshots final : public IGameStateSnapshots } void CompareSpriteDataJumpingFountain( - const JumpingFountain& spriteBase, const JumpingFountain& spriteCmp, GameStateSpriteChange_t& changeData) const + const JumpingFountain& spriteBase, const JumpingFountain& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(JumpingFountain, frame); + COMPARE_FIELD(JumpingFountain, FountainType); COMPARE_FIELD(JumpingFountain, NumTicksAlive); COMPARE_FIELD(JumpingFountain, FountainFlags); COMPARE_FIELD(JumpingFountain, TargetX); COMPARE_FIELD(JumpingFountain, TargetY); COMPARE_FIELD(JumpingFountain, Iteration); - COMPARE_FIELD(JumpingFountain, FountainType); } void CompareSpriteDataExplosionCloud( - const ExplosionCloud& spriteBase, const ExplosionCloud& spriteCmp, GameStateSpriteChange_t& changeData) const + const ExplosionCloud& spriteBase, const ExplosionCloud& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(ExplosionCloud, frame); } void CompareSpriteDataCrashSplash( - const CrashSplashParticle& spriteBase, const CrashSplashParticle& spriteCmp, GameStateSpriteChange_t& changeData) const + const CrashSplashParticle& spriteBase, const CrashSplashParticle& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(CrashSplashParticle, frame); } void CompareSpriteDataExplosionFlare( - const ExplosionFlare& spriteBase, const ExplosionFlare& spriteCmp, GameStateSpriteChange_t& changeData) const + const ExplosionFlare& spriteBase, const ExplosionFlare& spriteCmp, GameStateSpriteChange& changeData) const { COMPARE_FIELD(ExplosionFlare, frame); } void CompareSpriteData( - const EntitySnapshot& spriteBase, const EntitySnapshot& spriteCmp, GameStateSpriteChange_t& changeData) const + const EntitySnapshot& spriteBase, const EntitySnapshot& spriteCmp, GameStateSpriteChange& changeData) const { CompareSpriteDataCommon(spriteBase.base, spriteCmp.base, changeData); if (spriteBase.base.Type == spriteCmp.base.Type) @@ -624,9 +620,9 @@ struct GameStateSnapshots final : public IGameStateSnapshots } } - virtual GameStateCompareData_t Compare(const GameStateSnapshot_t& base, const GameStateSnapshot_t& cmp) const override final + virtual GameStateCompareData Compare(const GameStateSnapshot_t& base, const GameStateSnapshot_t& cmp) const override final { - GameStateCompareData_t res; + GameStateCompareData res; res.tickLeft = base.tick; res.tickRight = cmp.tick; res.srand0Left = base.srand0; @@ -637,7 +633,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots for (uint32_t i = 0; i < static_cast(spritesBase.size()); i++) { - GameStateSpriteChange_t changeData; + GameStateSpriteChange changeData; changeData.spriteIndex = i; const EntitySnapshot& spriteBase = spritesBase[i]; @@ -648,30 +644,30 @@ struct GameStateSnapshots final : public IGameStateSnapshots if (spriteBase.base.Type == EntityType::Null && spriteCmp.base.Type != EntityType::Null) { // Sprite was added. - changeData.changeType = GameStateSpriteChange_t::ADDED; + changeData.changeType = GameStateSpriteChange::ADDED; changeData.entityType = spriteCmp.base.Type; } else if (spriteBase.base.Type != EntityType::Null && spriteCmp.base.Type == EntityType::Null) { // Sprite was removed. - changeData.changeType = GameStateSpriteChange_t::REMOVED; + changeData.changeType = GameStateSpriteChange::REMOVED; changeData.entityType = spriteBase.base.Type; } else if (spriteBase.base.Type == EntityType::Null && spriteCmp.base.Type == EntityType::Null) { // Do nothing. - changeData.changeType = GameStateSpriteChange_t::EQUAL; + changeData.changeType = GameStateSpriteChange::EQUAL; } else { CompareSpriteData(spriteBase, spriteCmp, changeData); if (changeData.diffs.size() == 0) { - changeData.changeType = GameStateSpriteChange_t::EQUAL; + changeData.changeType = GameStateSpriteChange::EQUAL; } else { - changeData.changeType = GameStateSpriteChange_t::MODIFIED; + changeData.changeType = GameStateSpriteChange::MODIFIED; } } @@ -719,7 +715,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots return "Unknown"; } - virtual std::string GetCompareDataText(const GameStateCompareData_t& cmpData) const override + virtual std::string GetCompareDataText(const GameStateCompareData& cmpData) const override { std::string outputBuffer; char tempBuffer[1024] = {}; @@ -740,22 +736,22 @@ struct GameStateSnapshots final : public IGameStateSnapshots for (auto& change : cmpData.spriteChanges) { - if (change.changeType == GameStateSpriteChange_t::EQUAL) + if (change.changeType == GameStateSpriteChange::EQUAL) continue; const char* typeName = GetEntityTypeName(change.entityType); - if (change.changeType == GameStateSpriteChange_t::ADDED) + if (change.changeType == GameStateSpriteChange::ADDED) { snprintf(tempBuffer, sizeof(tempBuffer), "Sprite added (%s), index: %u\n", typeName, change.spriteIndex); outputBuffer += tempBuffer; } - else if (change.changeType == GameStateSpriteChange_t::REMOVED) + else if (change.changeType == GameStateSpriteChange::REMOVED) { snprintf(tempBuffer, sizeof(tempBuffer), "Sprite removed (%s), index: %u\n", typeName, change.spriteIndex); outputBuffer += tempBuffer; } - else if (change.changeType == GameStateSpriteChange_t::MODIFIED) + else if (change.changeType == GameStateSpriteChange::MODIFIED) { snprintf( tempBuffer, sizeof(tempBuffer), "Sprite modifications (%s), index: %u\n", typeName, change.spriteIndex); @@ -774,7 +770,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots return outputBuffer; } - virtual bool LogCompareDataToFile(const std::string& fileName, const GameStateCompareData_t& cmpData) const override + virtual bool LogCompareDataToFile(const std::string& fileName, const GameStateCompareData& cmpData) const override { auto outputBuffer = GetCompareDataText(cmpData); diff --git a/src/openrct2/GameStateSnapshots.h b/src/openrct2/GameStateSnapshots.h index 0333f76894..2c0999d652 100644 --- a/src/openrct2/GameStateSnapshots.h +++ b/src/openrct2/GameStateSnapshots.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,7 +18,7 @@ struct GameStateSnapshot_t; -struct GameStateSpriteChange_t +struct GameStateSpriteChange { enum { @@ -28,7 +28,7 @@ struct GameStateSpriteChange_t EQUAL }; - struct Diff_t + struct Diff { size_t offset; size_t length; @@ -42,16 +42,16 @@ struct GameStateSpriteChange_t EntityType entityType; uint32_t spriteIndex; - std::vector diffs; + std::vector diffs; }; -struct GameStateCompareData_t +struct GameStateCompareData { uint32_t tickLeft; uint32_t tickRight; uint32_t srand0Left; uint32_t srand0Right; - std::vector spriteChanges; + std::vector spriteChanges; }; /* @@ -95,19 +95,19 @@ struct IGameStateSnapshots virtual void SerialiseSnapshot(GameStateSnapshot_t& snapshot, DataSerialiser& serialiser) const = 0; /* - * Compares two states resulting GameStateCompareData_t with all mismatches stored. + * Compares two states resulting GameStateCompareData with all mismatches stored. */ - virtual GameStateCompareData_t Compare(const GameStateSnapshot_t& base, const GameStateSnapshot_t& cmp) const = 0; + virtual GameStateCompareData Compare(const GameStateSnapshot_t& base, const GameStateSnapshot_t& cmp) const = 0; /* - * Writes the GameStateCompareData_t into the specified file as readable text. + * Writes the GameStateCompareData into the specified file as readable text. */ - virtual bool LogCompareDataToFile(const std::string& fileName, const GameStateCompareData_t& cmpData) const = 0; + virtual bool LogCompareDataToFile(const std::string& fileName, const GameStateCompareData& cmpData) const = 0; /* - * Generates a string of readable text from GameStateCompareData_t + * Generates a string of readable text from GameStateCompareData */ - virtual std::string GetCompareDataText(const GameStateCompareData_t& cmpData) const = 0; + virtual std::string GetCompareDataText(const GameStateCompareData& cmpData) const = 0; }; [[nodiscard]] std::unique_ptr CreateGameStateSnapshots(); diff --git a/src/openrct2/Identifiers.h b/src/openrct2/Identifiers.h index 9e5995da3a..2deb59f864 100644 --- a/src/openrct2/Identifiers.h +++ b/src/openrct2/Identifiers.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/Input.cpp b/src/openrct2/Input.cpp index 2a0178abbd..9dce973aa2 100644 --- a/src/openrct2/Input.cpp +++ b/src/openrct2/Input.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,19 +15,19 @@ InputState _inputState; uint8_t _inputFlags; uint8_t gInputPlaceObjectModifier; -widget_ref gHoverWidget; -widget_ref gPressedWidget; +WidgetRef gHoverWidget; +WidgetRef gPressedWidget; uint16_t _tooltipNotShownTicks; Tool gCurrentToolId; -widget_ref gCurrentToolWidget; +WidgetRef gCurrentToolWidget; /** * * rct2: 0x006E3B43 */ -void title_handle_keyboard_input() +void TitleHandleKeyboardInput() { ContextInputHandleKeyboard(true); } @@ -36,12 +36,12 @@ void title_handle_keyboard_input() * * rct2: 0x006E3B43 */ -void game_handle_keyboard_input() +void GameHandleKeyboardInput() { ContextInputHandleKeyboard(false); } -void input_set_flag(INPUT_FLAGS flag, bool on) +void InputSetFlag(INPUT_FLAGS flag, bool on) { if (on) { @@ -53,32 +53,32 @@ void input_set_flag(INPUT_FLAGS flag, bool on) } } -bool input_test_flag(INPUT_FLAGS flag) +bool InputTestFlag(INPUT_FLAGS flag) { return _inputFlags & flag; } -void input_reset_flags() +void InputResetFlags() { _inputFlags = 0; } -void input_set_state(InputState state) +void InputSetState(InputState state) { _inputState = state; } -InputState input_get_state() +InputState InputGetState() { return _inputState; } -void reset_tooltip_not_shown() +void ResetTooltipNotShown() { _tooltipNotShownTicks = 0; } -void input_reset_place_obj_modifier() +void InputResetPlaceObjModifier() { gInputPlaceObjectModifier = PLACE_OBJECT_MODIFIER_NONE; } diff --git a/src/openrct2/Input.h b/src/openrct2/Input.h index ed7664d32d..ccd5134bb4 100644 --- a/src/openrct2/Input.h +++ b/src/openrct2/Input.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -66,7 +66,7 @@ enum PLACE_OBJECT_MODIFIER PLACE_OBJECT_MODIFIER_COPY_Z = (1 << 1), }; -struct widget_ref +struct WidgetRef { WindowClass window_classification; rct_windownumber window_number; @@ -77,42 +77,42 @@ extern uint8_t gInputPlaceObjectModifier; extern ScreenCoordsXY gInputDragLast; -extern widget_ref gHoverWidget; -extern widget_ref gPressedWidget; +extern WidgetRef gHoverWidget; +extern WidgetRef gPressedWidget; extern uint16_t gTooltipTimeout; -extern widget_ref gTooltipWidget; +extern WidgetRef gTooltipWidget; extern ScreenCoordsXY gTooltipCursor; extern Tool gCurrentToolId; -extern widget_ref gCurrentToolWidget; +extern WidgetRef gCurrentToolWidget; // TODO: Move to openrct2-ui and make static again extern InputState _inputState; extern uint8_t _inputFlags; extern uint16_t _tooltipNotShownTicks; -void InputWindowPositionBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void InputWindowPositionBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -void title_handle_keyboard_input(); +void TitleHandleKeyboardInput(); void GameHandleInput(); -void game_handle_keyboard_input(); +void GameHandleKeyboardInput(); void GameHandleEdgeScroll(); int32_t GetNextKey(); void StoreMouseInput(MouseState state, const ScreenCoordsXY& screenCoords); -void input_set_flag(INPUT_FLAGS flag, bool on); -bool input_test_flag(INPUT_FLAGS flag); -void input_reset_flags(); +void InputSetFlag(INPUT_FLAGS flag, bool on); +bool InputTestFlag(INPUT_FLAGS flag); +void InputResetFlags(); bool InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER modifier); -void input_set_state(InputState state); -InputState input_get_state(); +void InputSetState(InputState state); +InputState InputGetState(); -void reset_tooltip_not_shown(); +void ResetTooltipNotShown(); -void input_reset_place_obj_modifier(); +void InputResetPlaceObjModifier(); void InputScrollViewport(const ScreenCoordsXY& screenCoords); diff --git a/src/openrct2/Intro.cpp b/src/openrct2/Intro.cpp index 15b472fca1..0ee35c1554 100644 --- a/src/openrct2/Intro.cpp +++ b/src/openrct2/Intro.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,16 +35,16 @@ static int32_t _introStateCounter; static std::shared_ptr _soundChannel = nullptr; static bool _chainLiftFinished; -static void screen_intro_process_mouse_input(); -static void screen_intro_process_keyboard_input(); -static void screen_intro_skip_part(); -static void screen_intro_draw_logo(rct_drawpixelinfo* dpi); +static void ScreenIntroProcessMouseInput(); +static void ScreenIntroProcessKeyboardInput(); +static void ScreenIntroSkipPart(); +static void ScreenIntroDrawLogo(DrawPixelInfo* dpi); // rct2: 0x0068E966 -void intro_update() +void IntroUpdate() { - screen_intro_process_mouse_input(); - screen_intro_process_keyboard_input(); + ScreenIntroProcessMouseInput(); + ScreenIntroProcessKeyboardInput(); switch (gIntroState) { @@ -54,7 +54,7 @@ void intro_update() gIntroState = IntroState::PublisherBegin; [[fallthrough]]; case IntroState::PublisherBegin: - load_palette(); + LoadPalette(); // Set the Y for the Infogrames logo _introStateCounter = -580; @@ -160,7 +160,7 @@ void intro_update() break; case IntroState::Finish: gIntroState = IntroState::None; - load_palette(); + LoadPalette(); OpenRCT2::Audio::PlayTitleMusic(); break; default: @@ -168,7 +168,7 @@ void intro_update() } } -void intro_draw(rct_drawpixelinfo* dpi) +void IntroDraw(DrawPixelInfo* dpi) { int32_t screenWidth = ContextGetWidth(); @@ -178,73 +178,73 @@ void intro_draw(rct_drawpixelinfo* dpi) case IntroState::Disclaimer2: break; case IntroState::PublisherBegin: - gfx_clear(dpi, BACKROUND_COLOUR_DARK); + GfxClear(dpi, BACKROUND_COLOUR_DARK); break; case IntroState::PublisherScroll: - gfx_clear(dpi, BACKROUND_COLOUR_DARK); + GfxClear(dpi, BACKROUND_COLOUR_DARK); // Draw a white rectangle for the logo background (gives a bit of white margin) - gfx_fill_rect( + GfxFillRect( dpi, { { (screenWidth / 2) - 320 + 50, _introStateCounter + 50 }, { (screenWidth / 2) - 320 + 50 + 540, _introStateCounter + 50 + 425 } }, BORDER_COLOUR_PUBLISHER); // Draw Infogrames logo - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_00), { (screenWidth / 2) - 320 + 69, _introStateCounter + 69 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_10), { (screenWidth / 2) - 320 + 319, _introStateCounter + 69 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_01), { (screenWidth / 2) - 320 + 69, _introStateCounter + 319 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_11), { (screenWidth / 2) - 320 + 319, _introStateCounter + 319 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_00), { (screenWidth / 2) - 320 + 69, _introStateCounter + 69 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_10), { (screenWidth / 2) - 320 + 319, _introStateCounter + 69 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_01), { (screenWidth / 2) - 320 + 69, _introStateCounter + 319 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_INFOGRAMES_11), { (screenWidth / 2) - 320 + 319, _introStateCounter + 319 }); break; case IntroState::DeveloperBegin: - gfx_clear(dpi, BACKROUND_COLOUR_DARK); - gfx_transpose_palette(PALETTE_G1_IDX_DEVELOPER, 255); + GfxClear(dpi, BACKROUND_COLOUR_DARK); + GfxTransposePalette(PALETTE_G1_IDX_DEVELOPER, 255); break; case IntroState::DeveloperScroll: - gfx_clear(dpi, BACKROUND_COLOUR_DARK); + GfxClear(dpi, BACKROUND_COLOUR_DARK); // Draw Chris Sawyer logo - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_CHRIS_SAWYER_00), { (screenWidth / 2) - 320 + 70, _introStateCounter }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_CHRIS_SAWYER_10), { (screenWidth / 2) - 320 + 320, _introStateCounter }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_CHRIS_SAWYER_00), { (screenWidth / 2) - 320 + 70, _introStateCounter }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_CHRIS_SAWYER_10), { (screenWidth / 2) - 320 + 320, _introStateCounter }); break; case IntroState::LogoFadeIn: if (_introStateCounter <= 0xFF00) { - gfx_transpose_palette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF); + GfxTransposePalette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF); } else { - gfx_transpose_palette(PALETTE_G1_IDX_LOGO, 255); + GfxTransposePalette(PALETTE_G1_IDX_LOGO, 255); } - screen_intro_draw_logo(dpi); + ScreenIntroDrawLogo(dpi); break; case IntroState::LogoWait: - screen_intro_draw_logo(dpi); + ScreenIntroDrawLogo(dpi); break; case IntroState::LogoFadeOut: if (_introStateCounter >= 0) { - gfx_transpose_palette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF); + GfxTransposePalette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF); } else { - gfx_transpose_palette(PALETTE_G1_IDX_LOGO, 0); + GfxTransposePalette(PALETTE_G1_IDX_LOGO, 0); } - screen_intro_draw_logo(dpi); + ScreenIntroDrawLogo(dpi); break; case IntroState::Clear: - gfx_clear(dpi, BACKROUND_COLOUR_DARK); + GfxClear(dpi, BACKROUND_COLOUR_DARK); break; default: break; } } -static void screen_intro_process_mouse_input() +static void ScreenIntroProcessMouseInput() { if (ContextGetCursorState()->any == CURSOR_PRESSED) { - screen_intro_skip_part(); + ScreenIntroSkipPart(); } } @@ -252,20 +252,20 @@ static void screen_intro_process_mouse_input() * * rct2: 0x006E3AEC */ -static void screen_intro_process_keyboard_input() +static void ScreenIntroProcessKeyboardInput() { const uint8_t* keys = ContextGetKeysState(); for (int i = 0; i < 256; i++) { if (keys[i] != 0) { - screen_intro_skip_part(); + ScreenIntroSkipPart(); break; } } } -static void screen_intro_skip_part() +static void ScreenIntroSkipPart() { switch (gIntroState) { @@ -280,24 +280,24 @@ static void screen_intro_skip_part() } } -static void screen_intro_draw_logo(rct_drawpixelinfo* dpi) +static void ScreenIntroDrawLogo(DrawPixelInfo* dpi) { int32_t screenWidth = ContextGetWidth(); int32_t imageWidth = 640; int32_t imageX = (screenWidth - imageWidth) / 2; - drawing_engine_invalidate_image(SPR_INTRO_LOGO_00); - drawing_engine_invalidate_image(SPR_INTRO_LOGO_10); - drawing_engine_invalidate_image(SPR_INTRO_LOGO_20); - drawing_engine_invalidate_image(SPR_INTRO_LOGO_01); - drawing_engine_invalidate_image(SPR_INTRO_LOGO_11); - drawing_engine_invalidate_image(SPR_INTRO_LOGO_21); + DrawingEngineInvalidateImage(SPR_INTRO_LOGO_00); + DrawingEngineInvalidateImage(SPR_INTRO_LOGO_10); + DrawingEngineInvalidateImage(SPR_INTRO_LOGO_20); + DrawingEngineInvalidateImage(SPR_INTRO_LOGO_01); + DrawingEngineInvalidateImage(SPR_INTRO_LOGO_11); + DrawingEngineInvalidateImage(SPR_INTRO_LOGO_21); - gfx_clear(dpi, BACKROUND_COLOUR_LOGO); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_LOGO_00), { imageX + 0, 0 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_LOGO_10), { imageX + 220, 0 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_LOGO_20), { imageX + 440, 0 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_LOGO_01), { imageX + 0, 240 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_LOGO_11), { imageX + 220, 240 }); - gfx_draw_sprite(dpi, ImageId(SPR_INTRO_LOGO_21), { imageX + 440, 240 }); + GfxClear(dpi, BACKROUND_COLOUR_LOGO); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_LOGO_00), { imageX + 0, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_LOGO_10), { imageX + 220, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_LOGO_20), { imageX + 440, 0 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_LOGO_01), { imageX + 0, 240 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_LOGO_11), { imageX + 220, 240 }); + GfxDrawSprite(dpi, ImageId(SPR_INTRO_LOGO_21), { imageX + 440, 240 }); } diff --git a/src/openrct2/Intro.h b/src/openrct2/Intro.h index 6121a1578b..e0e5882b05 100644 --- a/src/openrct2/Intro.h +++ b/src/openrct2/Intro.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,7 +11,7 @@ #include "common.h" -struct rct_drawpixelinfo; +struct DrawPixelInfo; enum class IntroState : uint8_t { @@ -31,5 +31,5 @@ enum class IntroState : uint8_t extern IntroState gIntroState; -void intro_update(); -void intro_draw(rct_drawpixelinfo* dpi); +void IntroUpdate(); +void IntroDraw(DrawPixelInfo* dpi); diff --git a/src/openrct2/Limits.h b/src/openrct2/Limits.h index 4c04620e00..d3bc948b4e 100644 --- a/src/openrct2/Limits.h +++ b/src/openrct2/Limits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index 23a59fa4de..daf4a2b5f7 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/OpenRCT2.h b/src/openrct2/OpenRCT2.h index 7e2a01e25c..c06a2882c1 100644 --- a/src/openrct2/OpenRCT2.h +++ b/src/openrct2/OpenRCT2.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -62,7 +62,7 @@ extern uint8_t gScreenFlags; extern uint32_t gScreenAge; extern PromptMode gSavePromptMode; -void openrct2_write_full_version_info(utf8* buffer, size_t bufferSize); -void openrct2_finish(); +void OpenRCT2WriteFullVersionInfo(utf8* buffer, size_t bufferSize); +void OpenRCT2Finish(); -int32_t cmdline_run(const char** argv, int32_t argc); +int32_t CommandLineRun(const char** argv, int32_t argc); diff --git a/src/openrct2/ParkImporter.cpp b/src/openrct2/ParkImporter.cpp index 699a742c97..d5719ceeea 100644 --- a/src/openrct2/ParkImporter.cpp +++ b/src/openrct2/ParkImporter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ParkImporter.h b/src/openrct2/ParkImporter.h index fd6c9857c9..897565f728 100644 --- a/src/openrct2/ParkImporter.h +++ b/src/openrct2/ParkImporter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ namespace OpenRCT2 struct IStream; } -struct scenario_index_entry; +struct ScenarioIndexEntry; struct ParkLoadResult final { @@ -50,14 +50,14 @@ struct IParkImporter public: virtual ~IParkImporter() = default; - virtual ParkLoadResult Load(const utf8* path) abstract; - virtual ParkLoadResult LoadSavedGame(const utf8* path, bool skipObjectCheck = false) abstract; - virtual ParkLoadResult LoadScenario(const utf8* path, bool skipObjectCheck = false) abstract; + virtual ParkLoadResult Load(const u8string& path) abstract; + virtual ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) abstract; + virtual ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) abstract; virtual ParkLoadResult LoadFromStream( - OpenRCT2::IStream* stream, bool isScenario, bool skipObjectCheck = false, const utf8* path = String::Empty) abstract; + OpenRCT2::IStream* stream, bool isScenario, bool skipObjectCheck = false, const u8string& path = {}) abstract; virtual void Import() abstract; - virtual bool GetDetails(scenario_index_entry* dst) abstract; + virtual bool GetDetails(ScenarioIndexEntry* dst) abstract; }; namespace ParkImporter diff --git a/src/openrct2/PlatformEnvironment.cpp b/src/openrct2/PlatformEnvironment.cpp index 1121446726..f6eab88f07 100644 --- a/src/openrct2/PlatformEnvironment.cpp +++ b/src/openrct2/PlatformEnvironment.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ class PlatformEnvironment final : public IPlatformEnvironment { private: u8string _basePath[DIRBASE_COUNT]; - bool _usingRctClassic{}; + bool _usingRCTClassic{}; public: explicit PlatformEnvironment(DIRBASE_VALUES basePaths) @@ -49,7 +49,7 @@ public: directoryName = DirectoryNamesRCT2[static_cast(did)]; break; case DIRBASE::RCT2: - directoryName = _usingRctClassic ? "Assets" : DirectoryNamesRCT2[static_cast(did)]; + directoryName = _usingRCTClassic ? "Assets" : DirectoryNamesRCT2[static_cast(did)]; break; case DIRBASE::OPENRCT2: case DIRBASE::USER: @@ -74,7 +74,7 @@ public: auto dataPath = GetDirectoryPath(base, did); std::string alternativeFilename; - if (_usingRctClassic && base == DIRBASE::RCT2 && did == DIRID::DATA) + if (_usingRCTClassic && base == DIRBASE::RCT2 && did == DIRID::DATA) { // Special case, handle RCT Classic css ogg files if (String::StartsWith(fileName, "css", true) && String::EndsWith(fileName, ".dat", true)) @@ -106,13 +106,13 @@ public: if (base == DIRBASE::RCT2) { - _usingRctClassic = Platform::IsRCTClassicPath(path); + _usingRCTClassic = Platform::IsRCTClassicPath(path); } } bool IsUsingClassic() const override { - return _usingRctClassic; + return _usingRCTClassic; } private: @@ -135,6 +135,7 @@ private: case PATHID::SCORES_RCT2: return DIRBASE::RCT2; case PATHID::CHANGELOG: + case PATHID::CONTRIBUTORS: return DIRBASE::DOCUMENTATION; case PATHID::NETWORK_GROUPS: case PATHID::NETWORK_SERVERS: @@ -220,12 +221,12 @@ std::unique_ptr OpenRCT2::CreatePlatformEnvironment() } // Log base paths - log_verbose("DIRBASE::RCT1 : %s", env->GetDirectoryPath(DIRBASE::RCT1).c_str()); - log_verbose("DIRBASE::RCT2 : %s", env->GetDirectoryPath(DIRBASE::RCT2).c_str()); - log_verbose("DIRBASE::OPENRCT2: %s", env->GetDirectoryPath(DIRBASE::OPENRCT2).c_str()); - log_verbose("DIRBASE::USER : %s", env->GetDirectoryPath(DIRBASE::USER).c_str()); - log_verbose("DIRBASE::CONFIG : %s", env->GetDirectoryPath(DIRBASE::CONFIG).c_str()); - log_verbose("DIRBASE::CACHE : %s", env->GetDirectoryPath(DIRBASE::CACHE).c_str()); + LOG_VERBOSE("DIRBASE::RCT1 : %s", env->GetDirectoryPath(DIRBASE::RCT1).c_str()); + LOG_VERBOSE("DIRBASE::RCT2 : %s", env->GetDirectoryPath(DIRBASE::RCT2).c_str()); + LOG_VERBOSE("DIRBASE::OPENRCT2: %s", env->GetDirectoryPath(DIRBASE::OPENRCT2).c_str()); + LOG_VERBOSE("DIRBASE::USER : %s", env->GetDirectoryPath(DIRBASE::USER).c_str()); + LOG_VERBOSE("DIRBASE::CONFIG : %s", env->GetDirectoryPath(DIRBASE::CONFIG).c_str()); + LOG_VERBOSE("DIRBASE::CACHE : %s", env->GetDirectoryPath(DIRBASE::CACHE).c_str()); return env; } @@ -285,5 +286,6 @@ const u8string PlatformEnvironment::FileNames[] = { u8"scores.dat", // SCORES (LEGACY) u8"Saved Games" PATH_SEPARATOR "scores.dat", // SCORES (RCT2) u8"changelog.txt", // CHANGELOG - u8"plugin.store.json" // PLUGIN_STORE + u8"plugin.store.json", // PLUGIN_STORE + u8"contributors.md", // CONTRIBUTORS }; diff --git a/src/openrct2/PlatformEnvironment.h b/src/openrct2/PlatformEnvironment.h index fbdbfbf69b..01b2a00127 100644 --- a/src/openrct2/PlatformEnvironment.h +++ b/src/openrct2/PlatformEnvironment.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -70,6 +70,7 @@ namespace OpenRCT2 SCORES_RCT2, // Scenario scores, rct2 (\Saved Games\scores.dat). CHANGELOG, // Notable changes to the game between versions, distributed with the game. PLUGIN_STORE, // Shared storage for plugins. + CONTRIBUTORS, // Who has provided work to the game (Contributors.md). }; /** diff --git a/src/openrct2/ReplayManager.cpp b/src/openrct2/ReplayManager.cpp index f9a52e09d5..57d2849f7d 100644 --- a/src/openrct2/ReplayManager.cpp +++ b/src/openrct2/ReplayManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,11 +15,11 @@ #include "OpenRCT2.h" #include "ParkImporter.h" #include "PlatformEnvironment.h" +#include "actions/CheatSetAction.h" #include "actions/FootpathPlaceAction.h" #include "actions/GameAction.h" #include "actions/RideEntranceExitPlaceAction.h" #include "actions/RideSetSettingAction.h" -#include "actions/SetCheatAction.h" #include "actions/TileModifyAction.h" #include "actions/TrackPlaceAction.h" #include "config/Config.h" @@ -214,7 +214,7 @@ namespace OpenRCT2 auto& snapshot = snapshots->CreateSnapshot(); snapshots->Capture(snapshot); - snapshots->LinkSnapshot(snapshot, gCurrentTicks, scenario_rand_state().s0); + snapshots->LinkSnapshot(snapshot, gCurrentTicks, ScenarioRandState().s0); DataSerialiser snapShotDs(true, snapshotStream); snapshots->SerialiseSnapshot(snapshot, snapShotDs); } @@ -233,7 +233,7 @@ namespace OpenRCT2 auto replayData = std::make_unique(); replayData->magic = ReplayMagic; replayData->version = ReplayVersion; - replayData->networkId = network_get_version(); + replayData->networkId = NetworkGetVersion(); replayData->name = name; replayData->tickStart = gCurrentTicks; if (maxTicks != k_MaxReplayTicks) @@ -331,7 +331,7 @@ namespace OpenRCT2 } else { - log_error("Unable to write to file '%s'", outFile.c_str()); + LOG_ERROR("Unable to write to file '%s'", outFile.c_str()); result = false; } @@ -386,15 +386,15 @@ namespace OpenRCT2 auto& localSnapshot = snapshots->CreateSnapshot(); snapshots->Capture(localSnapshot); - snapshots->LinkSnapshot(localSnapshot, gCurrentTicks, scenario_rand_state().s0); + snapshots->LinkSnapshot(localSnapshot, gCurrentTicks, ScenarioRandState().s0); try { - GameStateCompareData_t cmpData = snapshots->Compare(replaySnapshot, localSnapshot); + GameStateCompareData cmpData = snapshots->Compare(replaySnapshot, localSnapshot); // Find out if there are any differences between the two states auto res = std::find_if( cmpData.spriteChanges.begin(), cmpData.spriteChanges.end(), - [](const GameStateSpriteChange_t& diff) { return diff.changeType != GameStateSpriteChange_t::EQUAL; }); + [](const GameStateSpriteChange& diff) { return diff.changeType != GameStateSpriteChange::EQUAL; }); // If there are difference write a log to the desyncs folder if (res != cmpData.spriteChanges.end()) @@ -410,7 +410,7 @@ namespace OpenRCT2 } catch (const std::runtime_error& err) { - log_warning("Snapshot data failed to be read. Snapshot not compared. %s", err.what()); + LOG_WARNING("Snapshot data failed to be read. Snapshot not compared. %s", err.what()); } } @@ -423,13 +423,13 @@ namespace OpenRCT2 if (!ReadReplayData(file, *replayData)) { - log_error("Unable to read replay data."); + LOG_ERROR("Unable to read replay data."); return false; } if (!LoadReplayDataMap(*replayData)) { - log_error("Unable to load map."); + LOG_ERROR("Unable to load map."); return false; } @@ -534,12 +534,12 @@ namespace OpenRCT2 DataSerialiser parkParamsDs(false, data.parkParams); SerialiseParkParameters(parkParamsDs); - game_load_init(); - fix_invalid_vehicle_sprite_sizes(); + GameLoadInit(); + FixInvalidVehicleSpriteSizes(); } catch (const std::exception& ex) { - log_error("Exception: %s", ex.what()); + LOG_ERROR("Exception: %s", ex.what()); return false; } return true; @@ -712,24 +712,24 @@ namespace OpenRCT2 serialiser << data.magic; if (data.magic != ReplayMagic) { - log_error("Magic does not match %08X, expected: %08X", data.magic, ReplayMagic); + LOG_ERROR("Magic does not match %08X, expected: %08X", data.magic, ReplayMagic); return false; } serialiser << data.version; if (data.version != ReplayVersion && !Compatible(data)) { - log_error("Invalid version detected %04X, expected: %04X", data.version, ReplayVersion); + LOG_ERROR("Invalid version detected %04X, expected: %04X", data.version, ReplayVersion); return false; } serialiser << data.networkId; #ifndef DISABLE_NETWORK // NOTE: This does not mean the replay will not function, only a warning. - if (data.networkId != network_get_version()) + if (data.networkId != NetworkGetVersion()) { - log_warning( + LOG_WARNING( "Replay network version mismatch: '%s', expected: '%s'", data.networkId.c_str(), - network_get_version().c_str()); + NetworkGetVersion().c_str()); } #endif @@ -799,7 +799,7 @@ namespace OpenRCT2 uint32_t replayTick = gCurrentTicks - _currentReplay->tickStart; // Detected different game state. - log_warning( + LOG_WARNING( "Different sprite checksum at tick %u (Replay Tick: %u) ; Saved: %s, Current: %s", gCurrentTicks, replayTick, savedChecksum.second.ToString().c_str(), checksum.ToString().c_str()); @@ -808,7 +808,7 @@ namespace OpenRCT2 else { // Good state. - log_verbose( + LOG_VERBOSE( "Good state at tick %u ; Saved: %s, Current: %s", gCurrentTicks, savedChecksum.second.ToString().c_str(), checksum.ToString().c_str()); } @@ -853,9 +853,9 @@ namespace OpenRCT2 // Focus camera on event. if (isPositionValid && !result.Position.IsNull()) { - auto* mainWindow = window_get_main(); + auto* mainWindow = WindowGetMain(); if (mainWindow != nullptr) - window_scroll_to_location(*mainWindow, result.Position); + WindowScrollToLocation(*mainWindow, result.Position); } replayQueue.erase(replayQueue.begin()); diff --git a/src/openrct2/ReplayManager.h b/src/openrct2/ReplayManager.h index cc13131502..a1e791e345 100644 --- a/src/openrct2/ReplayManager.h +++ b/src/openrct2/ReplayManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/System.hpp b/src/openrct2/System.hpp index de417a1b2c..1fa8f102c4 100644 --- a/src/openrct2/System.hpp +++ b/src/openrct2/System.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/TrackImporter.cpp b/src/openrct2/TrackImporter.cpp index e9ed43318a..3b0fc28a6e 100644 --- a/src/openrct2/TrackImporter.cpp +++ b/src/openrct2/TrackImporter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/TrackImporter.h b/src/openrct2/TrackImporter.h index 45ada50fd9..5a4107676f 100644 --- a/src/openrct2/TrackImporter.h +++ b/src/openrct2/TrackImporter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/Version.cpp b/src/openrct2/Version.cpp index 703d11079f..66a8722c02 100644 --- a/src/openrct2/Version.cpp +++ b/src/openrct2/Version.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -53,7 +53,7 @@ const char gVersionInfoFull[] = OPENRCT2_NAME ", " #endif ; -NewVersionInfo get_latest_version() +NewVersionInfo GetLatestVersion() { // If the check doesn't succeed, provide current version so we don't bother user // with invalid data. diff --git a/src/openrct2/Version.h b/src/openrct2/Version.h index 0e5d83aaf2..02fa7a562f 100644 --- a/src/openrct2/Version.h +++ b/src/openrct2/Version.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -84,4 +84,4 @@ struct NewVersionInfo std::string url; }; -NewVersionInfo get_latest_version(); +NewVersionInfo GetLatestVersion(); diff --git a/src/openrct2/actions/BalloonPressAction.cpp b/src/openrct2/actions/BalloonPressAction.cpp index 642341b43d..60242258cd 100644 --- a/src/openrct2/actions/BalloonPressAction.cpp +++ b/src/openrct2/actions/BalloonPressAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ GameActions::Result BalloonPressAction::Query() const auto balloon = TryGetEntity(_spriteIndex); if (balloon == nullptr) { - log_error("Tried getting invalid sprite for balloon: %u", _spriteIndex); + LOG_ERROR("Tried getting invalid sprite for balloon: %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } return GameActions::Result(); @@ -50,7 +50,7 @@ GameActions::Result BalloonPressAction::Execute() const auto balloon = TryGetEntity(_spriteIndex); if (balloon == nullptr) { - log_error("Tried getting invalid sprite for balloon: %u", _spriteIndex); + LOG_ERROR("Tried getting invalid sprite for balloon: %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } diff --git a/src/openrct2/actions/BalloonPressAction.h b/src/openrct2/actions/BalloonPressAction.h index 4787ad1026..df52e22670 100644 --- a/src/openrct2/actions/BalloonPressAction.h +++ b/src/openrct2/actions/BalloonPressAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/BannerPlaceAction.cpp b/src/openrct2/actions/BannerPlaceAction.cpp index f834c9c824..d0d7a8d53a 100644 --- a/src/openrct2/actions/BannerPlaceAction.cpp +++ b/src/openrct2/actions/BannerPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,6 +10,8 @@ #include "BannerPlaceAction.h" #include "../management/Finance.h" +#include "../object/BannerSceneryEntry.h" +#include "../object/ObjectEntryManager.h" #include "../world/Banner.h" #include "../world/MapAnimation.h" #include "../world/Scenery.h" @@ -60,7 +62,7 @@ GameActions::Result BannerPlaceAction::Query() const if (!MapCheckCapacityAndReorganise(_loc)) { - log_error("No free map elements."); + LOG_ERROR("No free map elements."); return GameActions::Result( GameActions::Status::NoFreeElements, STR_CANT_POSITION_THIS_HERE, STR_TILE_ELEMENT_LIMIT_REACHED); } @@ -88,15 +90,15 @@ GameActions::Result BannerPlaceAction::Query() const if (HasReachedBannerLimit()) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_TOO_MANY_BANNERS_IN_GAME); } - auto* bannerEntry = GetBannerEntry(_bannerType); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(_bannerType); if (bannerEntry == nullptr) { - log_error("Invalid banner object type. bannerType = ", _bannerType); + LOG_ERROR("Invalid banner object type. bannerType = ", _bannerType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } res.Cost = bannerEntry->price; @@ -115,22 +117,22 @@ GameActions::Result BannerPlaceAction::Execute() const if (!MapCheckCapacityAndReorganise(_loc)) { - log_error("No free map elements."); + LOG_ERROR("No free map elements."); return GameActions::Result( GameActions::Status::NoFreeElements, STR_CANT_POSITION_THIS_HERE, STR_TILE_ELEMENT_LIMIT_REACHED); } - auto* bannerEntry = GetBannerEntry(_bannerType); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(_bannerType); if (bannerEntry == nullptr) { - log_error("Invalid banner object type. bannerType = ", _bannerType); + LOG_ERROR("Invalid banner object type. bannerType = ", _bannerType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } auto banner = CreateBanner(); if (banner == nullptr) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_TOO_MANY_BANNERS_IN_GAME); } diff --git a/src/openrct2/actions/BannerPlaceAction.h b/src/openrct2/actions/BannerPlaceAction.h index 01c3e7ee80..0f455bb627 100644 --- a/src/openrct2/actions/BannerPlaceAction.h +++ b/src/openrct2/actions/BannerPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/BannerRemoveAction.cpp b/src/openrct2/actions/BannerRemoveAction.cpp index 7b8a794275..3b743a9d2b 100644 --- a/src/openrct2/actions/BannerRemoveAction.cpp +++ b/src/openrct2/actions/BannerRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,6 +10,8 @@ #include "BannerRemoveAction.h" #include "../management/Finance.h" +#include "../object/BannerSceneryEntry.h" +#include "../object/ObjectEntryManager.h" #include "../world/Banner.h" #include "../world/MapAnimation.h" #include "../world/Scenery.h" @@ -57,25 +59,25 @@ GameActions::Result BannerRemoveAction::Query() const BannerElement* bannerElement = GetBannerElementAt(); if (bannerElement == nullptr) { - log_error("Invalid banner location, x = %d, y = %d, z = %d, direction = %d", _loc.x, _loc.y, _loc.z, _loc.direction); + LOG_ERROR("Invalid banner location, x = %d, y = %d, z = %d, direction = %d", _loc.x, _loc.y, _loc.z, _loc.direction); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } auto bannerIndex = bannerElement->GetIndex(); if (bannerIndex == BannerIndex::GetNull()) { - log_error("Invalid banner index. index = ", bannerIndex); + LOG_ERROR("Invalid banner index. index = ", bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } auto banner = bannerElement->GetBanner(); if (banner == nullptr) { - log_error("Invalid banner index. index = ", bannerIndex); + LOG_ERROR("Invalid banner index. index = ", bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } - auto* bannerEntry = GetBannerEntry(banner->type); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); if (bannerEntry != nullptr) { res.Cost = -((bannerEntry->price * 3) / 4); @@ -96,25 +98,25 @@ GameActions::Result BannerRemoveAction::Execute() const BannerElement* bannerElement = GetBannerElementAt(); if (bannerElement == nullptr) { - log_error("Invalid banner location, x = %d, y = %d, z = %d, direction = %d", _loc.x, _loc.y, _loc.z, _loc.direction); + LOG_ERROR("Invalid banner location, x = %d, y = %d, z = %d, direction = %d", _loc.x, _loc.y, _loc.z, _loc.direction); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } auto bannerIndex = bannerElement->GetIndex(); if (bannerIndex == BannerIndex::GetNull()) { - log_error("Invalid banner index. index = ", bannerIndex); + LOG_ERROR("Invalid banner index. index = ", bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } auto banner = bannerElement->GetBanner(); if (banner == nullptr) { - log_error("Invalid banner index. index = ", bannerIndex); + LOG_ERROR("Invalid banner index. index = ", bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } - auto* bannerEntry = GetBannerEntry(banner->type); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); if (bannerEntry != nullptr) { res.Cost = -((bannerEntry->price * 3) / 4); diff --git a/src/openrct2/actions/BannerRemoveAction.h b/src/openrct2/actions/BannerRemoveAction.h index 052b123332..1f7d8cffba 100644 --- a/src/openrct2/actions/BannerRemoveAction.h +++ b/src/openrct2/actions/BannerRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/BannerSetColourAction.cpp b/src/openrct2/actions/BannerSetColourAction.cpp index 9bf9ada550..cb97045409 100644 --- a/src/openrct2/actions/BannerSetColourAction.cpp +++ b/src/openrct2/actions/BannerSetColourAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,13 +60,13 @@ GameActions::Result BannerSetColourAction::QueryExecute(bool isExecuting) const if (!LocationValid(_loc)) { - log_error("Invalid x / y coordinates: x = %d, y = %d", _loc.x, _loc.y); + LOG_ERROR("Invalid x / y coordinates: x = %d, y = %d", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (_primaryColour > 31) { - log_error("Invalid primary colour: colour = %u", _primaryColour); + LOG_ERROR("Invalid primary colour: colour = %u", _primaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -79,7 +79,7 @@ GameActions::Result BannerSetColourAction::QueryExecute(bool isExecuting) const if (bannerElement == nullptr) { - log_error("Could not find banner at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction); + LOG_ERROR("Could not find banner at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -87,14 +87,14 @@ GameActions::Result BannerSetColourAction::QueryExecute(bool isExecuting) const auto banner = GetBanner(index); if (banner == nullptr) { - log_error("Invalid banner index: index = %u", index); + LOG_ERROR("Invalid banner index: index = %u", index); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (isExecuting) { auto intent = Intent(INTENT_ACTION_UPDATE_BANNER); - intent.putExtra(INTENT_EXTRA_BANNER_INDEX, index); + intent.PutExtra(INTENT_EXTRA_BANNER_INDEX, index); ContextBroadcastIntent(&intent); banner->colour = _primaryColour; diff --git a/src/openrct2/actions/BannerSetColourAction.h b/src/openrct2/actions/BannerSetColourAction.h index 863eb78832..83a37d60a0 100644 --- a/src/openrct2/actions/BannerSetColourAction.h +++ b/src/openrct2/actions/BannerSetColourAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/BannerSetNameAction.cpp b/src/openrct2/actions/BannerSetNameAction.cpp index f2c9b85040..1a00728eee 100644 --- a/src/openrct2/actions/BannerSetNameAction.cpp +++ b/src/openrct2/actions/BannerSetNameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,7 +47,7 @@ GameActions::Result BannerSetNameAction::Query() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_warning("Invalid banner id, banner id = %d", _bannerIndex); + LOG_WARNING("Invalid banner id, banner id = %d", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_NONE); } return GameActions::Result(); @@ -58,18 +58,18 @@ GameActions::Result BannerSetNameAction::Execute() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_warning("Invalid banner id, banner id = %d", _bannerIndex); + LOG_WARNING("Invalid banner id, banner id = %d", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_NONE); } banner->text = _name; auto intent = Intent(INTENT_ACTION_UPDATE_BANNER); - intent.putExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex); + intent.PutExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex); ContextBroadcastIntent(&intent); - scrolling_text_invalidate(); - gfx_invalidate_screen(); + ScrollingTextInvalidate(); + GfxInvalidateScreen(); return GameActions::Result(); } diff --git a/src/openrct2/actions/BannerSetNameAction.h b/src/openrct2/actions/BannerSetNameAction.h index bbfc6d7a13..288d1ad438 100644 --- a/src/openrct2/actions/BannerSetNameAction.h +++ b/src/openrct2/actions/BannerSetNameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/BannerSetStyleAction.cpp b/src/openrct2/actions/BannerSetStyleAction.cpp index 8e38985423..203a68fbd6 100644 --- a/src/openrct2/actions/BannerSetStyleAction.cpp +++ b/src/openrct2/actions/BannerSetStyleAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -49,7 +49,7 @@ GameActions::Result BannerSetStyleAction::Query() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_error("Invalid banner index: index = %u", _bannerIndex); + LOG_ERROR("Invalid banner index: index = %u", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -61,7 +61,7 @@ GameActions::Result BannerSetStyleAction::Query() const if (tileElement == nullptr) { - log_error("Could not find banner index = %u", _bannerIndex); + LOG_ERROR("Could not find banner index = %u", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -70,7 +70,7 @@ GameActions::Result BannerSetStyleAction::Query() const case BannerSetStyleType::PrimaryColour: if (_parameter > 31) { - log_error("Invalid primary colour: colour = %u", _parameter); + LOG_ERROR("Invalid primary colour: colour = %u", _parameter); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } break; @@ -78,19 +78,19 @@ GameActions::Result BannerSetStyleAction::Query() const case BannerSetStyleType::TextColour: if (_parameter > 13) { - log_error("Invalid text colour: colour = %u", _parameter); + LOG_ERROR("Invalid text colour: colour = %u", _parameter); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } break; case BannerSetStyleType::NoEntry: if (tileElement->AsBanner() == nullptr) { - log_error("Tile element was not a banner."); + LOG_ERROR("Tile element was not a banner."); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } break; default: - log_error("Invalid type: %u", _type); + LOG_ERROR("Invalid type: %u", _type); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } return res; @@ -103,7 +103,7 @@ GameActions::Result BannerSetStyleAction::Execute() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_error("Invalid banner index: index = %u", _bannerIndex); + LOG_ERROR("Invalid banner index: index = %u", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -115,7 +115,7 @@ GameActions::Result BannerSetStyleAction::Execute() const if (tileElement == nullptr) { - log_error("Could not find banner index = %u", _bannerIndex); + LOG_ERROR("Could not find banner index = %u", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -132,7 +132,7 @@ GameActions::Result BannerSetStyleAction::Execute() const BannerElement* bannerElement = tileElement->AsBanner(); if (bannerElement == nullptr) { - log_error("Tile element was not a banner."); + LOG_ERROR("Tile element was not a banner."); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -147,12 +147,12 @@ GameActions::Result BannerSetStyleAction::Execute() const break; } default: - log_error("Invalid type: %u", _type); + LOG_ERROR("Invalid type: %u", _type); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } auto intent = Intent(INTENT_ACTION_UPDATE_BANNER); - intent.putExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex); + intent.PutExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex); ContextBroadcastIntent(&intent); return res; diff --git a/src/openrct2/actions/BannerSetStyleAction.h b/src/openrct2/actions/BannerSetStyleAction.h index bcbc5603a2..c2f02e2a39 100644 --- a/src/openrct2/actions/BannerSetStyleAction.h +++ b/src/openrct2/actions/BannerSetStyleAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/SetCheatAction.cpp b/src/openrct2/actions/CheatSetAction.cpp similarity index 85% rename from src/openrct2/actions/SetCheatAction.cpp rename to src/openrct2/actions/CheatSetAction.cpp index a6f337a561..b712dd6a31 100644 --- a/src/openrct2/actions/SetCheatAction.cpp +++ b/src/openrct2/actions/CheatSetAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "SetCheatAction.h" +#include "CheatSetAction.h" #include "../Cheats.h" #include "../Context.h" @@ -21,6 +21,7 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../network/network.h" +#include "../object/FootpathItemEntry.h" #include "../ride/Ride.h" #include "../ride/Vehicle.h" #include "../scenario/Scenario.h" @@ -40,32 +41,32 @@ using ParametersRange = std::pair, std::pair>; -SetCheatAction::SetCheatAction(CheatType cheatType, int32_t param1, int32_t param2) +CheatSetAction::CheatSetAction(CheatType cheatType, int32_t param1, int32_t param2) : _cheatType(static_cast(cheatType)) , _param1(param1) , _param2(param2) { } -void SetCheatAction::AcceptParameters(GameActionParameterVisitor& visitor) +void CheatSetAction::AcceptParameters(GameActionParameterVisitor& visitor) { visitor.Visit("type", _cheatType); visitor.Visit("param1", _param1); visitor.Visit("param2", _param2); } -uint16_t SetCheatAction::GetActionFlags() const +uint16_t CheatSetAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; } -void SetCheatAction::Serialise(DataSerialiser& stream) +void CheatSetAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); stream << DS_TAG(_cheatType) << DS_TAG(_param1) << DS_TAG(_param2); } -GameActions::Result SetCheatAction::Query() const +GameActions::Result CheatSetAction::Query() const { if (static_cast(_cheatType) >= static_cast(CheatType::Count)) { @@ -86,19 +87,19 @@ GameActions::Result SetCheatAction::Query() const return GameActions::Result(); } -GameActions::Result SetCheatAction::Execute() const +GameActions::Result CheatSetAction::Execute() const { switch (static_cast(_cheatType.id)) { case CheatType::SandboxMode: gCheatsSandboxMode = _param1 != 0; - window_invalidate_by_class(WindowClass::Map); - window_invalidate_by_class(WindowClass::Footpath); + WindowInvalidateByClass(WindowClass::Map); + WindowInvalidateByClass(WindowClass::Footpath); break; case CheatType::DisableClearanceChecks: gCheatsDisableClearanceChecks = _param1 != 0; // Required to update the clearance checks overlay on the Cheats button. - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); break; case CheatType::DisableSupportLimits: gCheatsDisableSupportLimits = _param1 != 0; @@ -194,7 +195,7 @@ GameActions::Result SetCheatAction::Execute() const Set10MinuteInspection(); break; case CheatType::WinScenario: - scenario_success(); + ScenarioSuccess(); break; case CheatType::ForceWeather: // Todo - make sure this is safe @@ -217,7 +218,7 @@ GameActions::Result SetCheatAction::Execute() const break; case CheatType::AllowArbitraryRideTypeChanges: gCheatsAllowArbitraryRideTypeChanges = _param1 != 0; - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); break; case CheatType::OwnAllLand: OwnAllLand(); @@ -240,24 +241,27 @@ GameActions::Result SetCheatAction::Execute() const case CheatType::AllowTrackPlaceInvalidHeights: gCheatsAllowTrackPlaceInvalidHeights = _param1 != 0; break; + case CheatType::AllowRegularPathAsQueue: + gCheatsAllowRegularPathAsQueue = _param1 != 0; + break; default: { - log_error("Unabled cheat: %d", _cheatType.id); + LOG_ERROR("Unabled cheat: %d", _cheatType.id); GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } break; } - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) { ConfigSaveDefault(); } - window_invalidate_by_class(WindowClass::Cheats); + WindowInvalidateByClass(WindowClass::Cheats); return GameActions::Result(); } -ParametersRange SetCheatAction::GetParameterRange(CheatType cheatType) const +ParametersRange CheatSetAction::GetParameterRange(CheatType cheatType) const { switch (static_cast(_cheatType.id)) { @@ -305,6 +309,8 @@ ParametersRange SetCheatAction::GetParameterRange(CheatType cheatType) const [[fallthrough]]; case CheatType::EnableAllDrawableTrackPieces: [[fallthrough]]; + case CheatType::AllowRegularPathAsQueue: + [[fallthrough]]; case CheatType::OpenClosePark: return { { 0, 1 }, { 0, 0 } }; case CheatType::AddMoney: @@ -355,7 +361,7 @@ ParametersRange SetCheatAction::GetParameterRange(CheatType cheatType) const } } -void SetCheatAction::SetGrassLength(int32_t length) const +void CheatSetAction::SetGrassLength(int32_t length) const { for (int32_t y = 0; y < gMapSize.y; y++) { @@ -373,12 +379,12 @@ void SetCheatAction::SetGrassLength(int32_t length) const } } - gfx_invalidate_screen(); + GfxInvalidateScreen(); } -void SetCheatAction::WaterPlants() const +void CheatSetAction::WaterPlants() const { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do @@ -389,12 +395,12 @@ void SetCheatAction::WaterPlants() const } } while (TileElementIteratorNext(&it)); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } -void SetCheatAction::FixVandalism() const +void CheatSetAction::FixVandalism() const { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do @@ -408,17 +414,17 @@ void SetCheatAction::FixVandalism() const it.element->AsPath()->SetIsBroken(false); } while (TileElementIteratorNext(&it)); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } -void SetCheatAction::RemoveLitter() const +void CheatSetAction::RemoveLitter() const { for (auto litter : EntityList()) { EntityRemove(litter); } - tile_element_iterator it{}; + TileElementIterator it{}; TileElementIteratorBegin(&it); do { @@ -435,48 +441,48 @@ void SetCheatAction::RemoveLitter() const } while (TileElementIteratorNext(&it)); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } -void SetCheatAction::FixBrokenRides() const +void CheatSetAction::FixBrokenRides() const { for (auto& ride : GetRideManager()) { if ((ride.mechanic_status != RIDE_MECHANIC_STATUS_FIXING) && (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN))) { - auto mechanic = ride_get_assigned_mechanic(&ride); + auto mechanic = RideGetAssignedMechanic(ride); if (mechanic != nullptr) { mechanic->RemoveFromRide(); } - ride_fix_breakdown(&ride, 0); + RideFixBreakdown(ride, 0); ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } } -void SetCheatAction::RenewRides() const +void CheatSetAction::RenewRides() const { for (auto& ride : GetRideManager()) { ride.Renew(); } - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); } -void SetCheatAction::MakeDestructible() const +void CheatSetAction::MakeDestructible() const { for (auto& ride : GetRideManager()) { ride.lifecycle_flags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE; ride.lifecycle_flags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; } - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); } -void SetCheatAction::ResetRideCrashStatus() const +void CheatSetAction::ResetRideCrashStatus() const { for (auto& ride : GetRideManager()) { @@ -484,20 +490,20 @@ void SetCheatAction::ResetRideCrashStatus() const ride.lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED; ride.last_crash_type = RIDE_CRASH_TYPE_NONE; } - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); } -void SetCheatAction::Set10MinuteInspection() const +void CheatSetAction::Set10MinuteInspection() const { for (auto& ride : GetRideManager()) { // Set inspection interval to 10 minutes ride.inspection_interval = RIDE_INSPECTION_EVERY_10_MINUTES; } - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); } -void SetCheatAction::SetScenarioNoMoney(bool enabled) const +void CheatSetAction::SetScenarioNoMoney(bool enabled) const { if (enabled) { @@ -508,32 +514,32 @@ void SetCheatAction::SetScenarioNoMoney(bool enabled) const gParkFlags &= ~PARK_FLAGS_NO_MONEY; } // Invalidate all windows that have anything to do with finance - window_invalidate_by_class(WindowClass::Ride); - window_invalidate_by_class(WindowClass::Peep); - window_invalidate_by_class(WindowClass::ParkInformation); - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::BottomToolbar); - window_invalidate_by_class(WindowClass::TopToolbar); - window_invalidate_by_class(WindowClass::Cheats); + WindowInvalidateByClass(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Peep); + WindowInvalidateByClass(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::Cheats); } -void SetCheatAction::SetMoney(money64 amount) const +void CheatSetAction::SetMoney(money64 amount) const { gCash = amount; - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::BottomToolbar); } -void SetCheatAction::AddMoney(money64 amount) const +void CheatSetAction::AddMoney(money64 amount) const { - gCash = add_clamp_money64(gCash, amount); + gCash = AddClamp_money64(gCash, amount); - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::BottomToolbar); } -void SetCheatAction::ClearLoan() const +void CheatSetAction::ClearLoan() const { // First give money AddMoney(gBankLoan); @@ -543,17 +549,17 @@ void SetCheatAction::ClearLoan() const GameActions::ExecuteNested(&gameAction); } -void SetCheatAction::GenerateGuests(int32_t count) const +void CheatSetAction::GenerateGuests(int32_t count) const { auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); for (int32_t i = 0; i < count; i++) { park.GenerateGuest(); } - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::BottomToolbar); } -void SetCheatAction::SetGuestParameter(int32_t parameter, int32_t value) const +void CheatSetAction::SetGuestParameter(int32_t parameter, int32_t value) const { for (auto peep : EntityList()) { @@ -597,7 +603,7 @@ void SetCheatAction::SetGuestParameter(int32_t parameter, int32_t value) const } } -void SetCheatAction::GiveObjectToGuests(int32_t object) const +void CheatSetAction::GiveObjectToGuests(int32_t object) const { for (auto peep : EntityList()) { @@ -611,20 +617,20 @@ void SetCheatAction::GiveObjectToGuests(int32_t object) const break; case OBJECT_BALLOON: peep->GiveItem(ShopItem::Balloon); - peep->BalloonColour = scenario_rand_max(COLOUR_COUNT - 1); + peep->BalloonColour = ScenarioRandMax(COLOUR_COUNT - 1); peep->UpdateSpriteType(); break; case OBJECT_UMBRELLA: peep->GiveItem(ShopItem::Umbrella); - peep->UmbrellaColour = scenario_rand_max(COLOUR_COUNT - 1); + peep->UmbrellaColour = ScenarioRandMax(COLOUR_COUNT - 1); peep->UpdateSpriteType(); break; } } - window_invalidate_by_class(WindowClass::Peep); + WindowInvalidateByClass(WindowClass::Peep); } -void SetCheatAction::RemoveAllGuests() const +void CheatSetAction::RemoveAllGuests() const { for (auto& ride : GetRideManager()) { @@ -668,11 +674,11 @@ void SetCheatAction::RemoveAllGuests() const guest->Remove(); } - window_invalidate_by_class(WindowClass::Ride); - gfx_invalidate_screen(); + WindowInvalidateByClass(WindowClass::Ride); + GfxInvalidateScreen(); } -void SetCheatAction::SetStaffSpeed(uint8_t value) const +void CheatSetAction::SetStaffSpeed(uint8_t value) const { for (auto peep : EntityList()) { @@ -681,7 +687,7 @@ void SetCheatAction::SetStaffSpeed(uint8_t value) const } } -void SetCheatAction::OwnAllLand() const +void CheatSetAction::OwnAllLand() const { const auto min = CoordsXY{ COORDS_XY_STEP, COORDS_XY_STEP }; const auto max = GetMapSizeUnits() - CoordsXY{ COORDS_XY_STEP, COORDS_XY_STEP }; @@ -727,20 +733,20 @@ void SetCheatAction::OwnAllLand() const MapCountRemainingLandRights(); } -void SetCheatAction::ParkSetOpen(bool isOpen) const +void CheatSetAction::ParkSetOpen(bool isOpen) const { auto parkSetParameter = ParkSetParameterAction(isOpen ? ParkParameter::Open : ParkParameter::Close); GameActions::ExecuteNested(&parkSetParameter); } -void SetCheatAction::CreateDucks(int count) const +void CheatSetAction::CreateDucks(int count) const { for (int i = 0; i < count; i++) { // 100 attempts at finding some water to create a few ducks at for (int32_t attempts = 0; attempts < 100; attempts++) { - if (scenario_create_ducks()) + if (ScenarioCreateDucks()) break; } } diff --git a/src/openrct2/actions/SetCheatAction.h b/src/openrct2/actions/CheatSetAction.h similarity index 89% rename from src/openrct2/actions/SetCheatAction.h rename to src/openrct2/actions/CheatSetAction.h index 9e88685558..a218bb7500 100644 --- a/src/openrct2/actions/SetCheatAction.h +++ b/src/openrct2/actions/CheatSetAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,7 +11,7 @@ #include "GameAction.h" -class SetCheatAction final : public GameActionBase +class CheatSetAction final : public GameActionBase { using ParametersRange = std::pair, std::pair>; @@ -21,8 +21,8 @@ private: int32_t _param2{}; public: - SetCheatAction() = default; - SetCheatAction(CheatType cheatType, int32_t param1 = 0, int32_t param2 = 0); + CheatSetAction() = default; + CheatSetAction(CheatType cheatType, int32_t param1 = 0, int32_t param2 = 0); void AcceptParameters(GameActionParameterVisitor& visitor) override; diff --git a/src/openrct2/actions/ClearAction.cpp b/src/openrct2/actions/ClearAction.cpp index 07512a7eff..a3d4110801 100644 --- a/src/openrct2/actions/ClearAction.cpp +++ b/src/openrct2/actions/ClearAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,7 +14,6 @@ #include "../drawing/Drawing.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" -#include "../world/LargeScenery.h" #include "../world/Location.hpp" #include "../world/Map.h" #include "FootpathRemoveAction.h" @@ -30,6 +29,17 @@ ClearAction::ClearAction(MapRange range, ClearableItems itemsToClear) { } +void ClearAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_range); + visitor.Visit("itemsToClear", _itemsToClear); +} + +uint16_t ClearAction::GetActionFlags() const +{ + return GameAction::GetActionFlags(); +} + void ClearAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); @@ -68,7 +78,7 @@ GameActions::Result ClearAction::QueryExecute(bool executing) const auto noValidTiles = true; auto error = GameActions::Status::Ok; StringId errorMessage = STR_NONE; - money32 totalCost = 0; + money64 totalCost = 0; auto validRange = ClampRangeWithinMap(_range); for (int32_t y = validRange.GetTop(); y <= validRange.GetBottom(); y += COORDS_XY_STEP) @@ -78,7 +88,7 @@ GameActions::Result ClearAction::QueryExecute(bool executing) const if (LocationValid({ x, y }) && MapCanClearAt({ x, y })) { auto cost = ClearSceneryFromTile({ x, y }, executing); - if (cost != MONEY32_UNDEFINED) + if (cost != MONEY64_UNDEFINED) { noValidTiles = false; totalCost += cost; @@ -107,11 +117,11 @@ GameActions::Result ClearAction::QueryExecute(bool executing) const return result; } -money32 ClearAction::ClearSceneryFromTile(const CoordsXY& tilePos, bool executing) const +money64 ClearAction::ClearSceneryFromTile(const CoordsXY& tilePos, bool executing) const { // Pass down all flags. TileElement* tileElement = nullptr; - money32 totalCost = 0; + money64 totalCost = 0; bool tileEdited; do { diff --git a/src/openrct2/actions/ClearAction.h b/src/openrct2/actions/ClearAction.h index a197aa0bb5..8110b94040 100644 --- a/src/openrct2/actions/ClearAction.h +++ b/src/openrct2/actions/ClearAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,6 +34,10 @@ public: ClearAction() = default; ClearAction(MapRange range, ClearableItems itemsToClear); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + + uint16_t GetActionFlags() const override; + void Serialise(DataSerialiser& stream) override; GameActions::Result Query() const override; GameActions::Result Execute() const override; @@ -41,7 +45,7 @@ public: private: GameActions::Result CreateResult() const; GameActions::Result QueryExecute(bool executing) const; - money32 ClearSceneryFromTile(const CoordsXY& tilePos, bool executing) const; + money64 ClearSceneryFromTile(const CoordsXY& tilePos, bool executing) const; /** * Function to clear the flag that is set to prevent cost duplication diff --git a/src/openrct2/actions/ClimateSetAction.cpp b/src/openrct2/actions/ClimateSetAction.cpp index b91f367df3..db6d4eec80 100644 --- a/src/openrct2/actions/ClimateSetAction.cpp +++ b/src/openrct2/actions/ClimateSetAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -45,7 +45,7 @@ GameActions::Result ClimateSetAction::Execute() const { gClimate = ClimateType{ _climate }; - gfx_invalidate_screen(); + GfxInvalidateScreen(); return GameActions::Result(); } diff --git a/src/openrct2/actions/ClimateSetAction.h b/src/openrct2/actions/ClimateSetAction.h index aef8077a22..9d9716a1d8 100644 --- a/src/openrct2/actions/ClimateSetAction.h +++ b/src/openrct2/actions/ClimateSetAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/CustomAction.cpp b/src/openrct2/actions/CustomAction.cpp index 99d974086f..b573f7c45c 100644 --- a/src/openrct2/actions/CustomAction.cpp +++ b/src/openrct2/actions/CustomAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -43,13 +43,13 @@ void CustomAction::Serialise(DataSerialiser& stream) GameActions::Result CustomAction::Query() const { auto& scriptingEngine = OpenRCT2::GetContext()->GetScriptEngine(); - return scriptingEngine.QueryOrExecuteCustomGameAction(_id, _json, false); + return scriptingEngine.QueryOrExecuteCustomGameAction(*this, false); } GameActions::Result CustomAction::Execute() const { auto& scriptingEngine = OpenRCT2::GetContext()->GetScriptEngine(); - return scriptingEngine.QueryOrExecuteCustomGameAction(_id, _json, true); + return scriptingEngine.QueryOrExecuteCustomGameAction(*this, true); } #endif diff --git a/src/openrct2/actions/CustomAction.h b/src/openrct2/actions/CustomAction.h index f9b2dcc7a4..94ed5877a3 100644 --- a/src/openrct2/actions/CustomAction.h +++ b/src/openrct2/actions/CustomAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index 8f32f94b1d..d22eb3a30a 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,6 +15,8 @@ #include "../interface/Window.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" +#include "../object/FootpathItemEntry.h" +#include "../object/ObjectEntryManager.h" #include "../world/Footpath.h" #include "../world/Location.hpp" #include "../world/Park.h" @@ -73,7 +75,7 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const auto tileElement = MapGetFootpathElement(_loc); if (tileElement == nullptr) { - log_error("Could not find path element."); + LOG_ERROR("Could not find path element."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } @@ -93,7 +95,7 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const if (_pathItemType != 0) { - auto* pathBitEntry = GetFootpathItemEntry(_pathItemType - 1); + auto* pathBitEntry = OpenRCT2::ObjectManager::GetObjectEntry(_pathItemType - 1); if (pathBitEntry == nullptr) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); @@ -150,7 +152,7 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const if (pathElement == nullptr) { - log_error("Could not find path element."); + LOG_ERROR("Could not find path element."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } @@ -163,7 +165,7 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const if (_pathItemType != 0) { - auto* pathBitEntry = GetFootpathItemEntry(_pathItemType - 1); + auto* pathBitEntry = OpenRCT2::ObjectManager::GetObjectEntry(_pathItemType - 1); if (pathBitEntry == nullptr) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); @@ -191,7 +193,7 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const pathElement->SetIsBroken(false); if (_pathItemType != 0) { - auto* pathBitEntry = GetFootpathItemEntry(_pathItemType - 1); + auto* pathBitEntry = OpenRCT2::ObjectManager::GetObjectEntry(_pathItemType - 1); if (pathBitEntry != nullptr && pathBitEntry->flags & PATH_BIT_FLAG_IS_BIN) { pathElement->SetAdditionStatus(255); diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.h b/src/openrct2/actions/FootpathAdditionPlaceAction.h index 30bf1aa070..eb3f5dcde3 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.h +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp index 669dda1d84..a14bb56589 100644 --- a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp +++ b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -67,20 +67,20 @@ GameActions::Result FootpathAdditionRemoveAction::Query() const auto tileElement = MapGetFootpathElement(_loc); if (tileElement == nullptr) { - log_warning("Could not find path element."); + LOG_WARNING("Could not find path element."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } auto pathElement = tileElement->AsPath(); if (pathElement == nullptr) { - log_warning("Could not find path element."); + LOG_WARNING("Could not find path element."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } if (!pathElement->AdditionIsGhost() && (GetFlags() & GAME_COMMAND_FLAG_GHOST)) { - log_warning("Tried to remove non ghost during ghost removal."); + LOG_WARNING("Tried to remove non ghost during ghost removal."); return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_REMOVE_THIS, STR_NONE); } auto res = GameActions::Result(); @@ -101,7 +101,7 @@ GameActions::Result FootpathAdditionRemoveAction::Execute() const if (pathElement == nullptr) { - log_error("Could not find path element."); + LOG_ERROR("Could not find path element."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } diff --git a/src/openrct2/actions/FootpathAdditionRemoveAction.h b/src/openrct2/actions/FootpathAdditionRemoveAction.h index 59535f4f78..fc4ab88121 100644 --- a/src/openrct2/actions/FootpathAdditionRemoveAction.h +++ b/src/openrct2/actions/FootpathAdditionRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/FootpathPlaceFromTrackAction.cpp b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp similarity index 90% rename from src/openrct2/actions/FootpathPlaceFromTrackAction.cpp rename to src/openrct2/actions/FootpathLayoutPlaceAction.cpp index a862b36774..4fe5886f77 100644 --- a/src/openrct2/actions/FootpathPlaceFromTrackAction.cpp +++ b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "FootpathPlaceFromTrackAction.h" +#include "FootpathLayoutPlaceAction.h" #include "../Cheats.h" #include "../OpenRCT2.h" @@ -23,7 +23,7 @@ #include "../world/Surface.h" #include "../world/Wall.h" -FootpathPlaceFromTrackAction::FootpathPlaceFromTrackAction( +FootpathLayoutPlaceAction::FootpathLayoutPlaceAction( const CoordsXYZ& loc, uint8_t slope, ObjectEntryIndex type, ObjectEntryIndex railingsType, uint8_t edges, PathConstructFlags constructFlags) : _loc(loc) @@ -35,7 +35,7 @@ FootpathPlaceFromTrackAction::FootpathPlaceFromTrackAction( { } -void FootpathPlaceFromTrackAction::Serialise(DataSerialiser& stream) +void FootpathLayoutPlaceAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); @@ -43,12 +43,22 @@ void FootpathPlaceFromTrackAction::Serialise(DataSerialiser& stream) << DS_TAG(_constructFlags); } -uint16_t FootpathPlaceFromTrackAction::GetActionFlags() const +void FootpathLayoutPlaceAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); + visitor.Visit("slope", _slope); + visitor.Visit("object", _type); + visitor.Visit("railingsObject", _railingsType); + visitor.Visit("edges", _edges); + visitor.Visit("constructFlags", _constructFlags); +} + +uint16_t FootpathLayoutPlaceAction::GetActionFlags() const { return GameAction::GetActionFlags(); } -GameActions::Result FootpathPlaceFromTrackAction::Query() const +GameActions::Result FootpathLayoutPlaceAction::Query() const { auto res = GameActions::Result(); res.Cost = 0; @@ -84,7 +94,7 @@ GameActions::Result FootpathPlaceFromTrackAction::Query() const return ElementInsertQuery(std::move(res)); } -GameActions::Result FootpathPlaceFromTrackAction::Execute() const +GameActions::Result FootpathLayoutPlaceAction::Execute() const { auto res = GameActions::Result(); res.Cost = 0; @@ -104,7 +114,7 @@ GameActions::Result FootpathPlaceFromTrackAction::Execute() const return ElementInsertExecute(std::move(res)); } -GameActions::Result FootpathPlaceFromTrackAction::ElementInsertQuery(GameActions::Result res) const +GameActions::Result FootpathLayoutPlaceAction::ElementInsertQuery(GameActions::Result res) const { bool entrancePath = false, entranceIsSamePath = false; @@ -176,7 +186,7 @@ GameActions::Result FootpathPlaceFromTrackAction::ElementInsertQuery(GameActions return res; } -GameActions::Result FootpathPlaceFromTrackAction::ElementInsertExecute(GameActions::Result res) const +GameActions::Result FootpathLayoutPlaceAction::ElementInsertExecute(GameActions::Result res) const { bool entrancePath = false, entranceIsSamePath = false; @@ -284,7 +294,7 @@ GameActions::Result FootpathPlaceFromTrackAction::ElementInsertExecute(GameActio return res; } -bool FootpathPlaceFromTrackAction::IsSameAsEntranceElement(const EntranceElement& entranceElement) const +bool FootpathLayoutPlaceAction::IsSameAsEntranceElement(const EntranceElement& entranceElement) const { if (entranceElement.HasLegacyPathEntry()) { diff --git a/src/openrct2/actions/FootpathPlaceFromTrackAction.h b/src/openrct2/actions/FootpathLayoutPlaceAction.h similarity index 80% rename from src/openrct2/actions/FootpathPlaceFromTrackAction.h rename to src/openrct2/actions/FootpathLayoutPlaceAction.h index 6e19dbf49b..c8774c30ea 100644 --- a/src/openrct2/actions/FootpathPlaceFromTrackAction.h +++ b/src/openrct2/actions/FootpathLayoutPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,7 +11,7 @@ #include "GameAction.h" -class FootpathPlaceFromTrackAction final : public GameActionBase +class FootpathLayoutPlaceAction final : public GameActionBase { private: CoordsXYZ _loc; @@ -22,11 +22,13 @@ private: PathConstructFlags _constructFlags{}; public: - FootpathPlaceFromTrackAction() = default; - FootpathPlaceFromTrackAction( + FootpathLayoutPlaceAction() = default; + FootpathLayoutPlaceAction( const CoordsXYZ& loc, uint8_t slope, ObjectEntryIndex type, ObjectEntryIndex railingsType, uint8_t edges, PathConstructFlags constructFlags = 0); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/FootpathPlaceAction.cpp b/src/openrct2/actions/FootpathPlaceAction.cpp index 646db9de7e..93f7f319c4 100644 --- a/src/openrct2/actions/FootpathPlaceAction.cpp +++ b/src/openrct2/actions/FootpathPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,6 +15,7 @@ #include "../interface/Window.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" +#include "../object/FootpathItemEntry.h" #include "../ride/RideConstruction.h" #include "../world/ConstructionClearance.h" #include "../world/Footpath.h" @@ -98,12 +99,12 @@ GameActions::Result FootpathPlaceAction::Query() const if (_direction != INVALID_DIRECTION && !DirectionValid(_direction)) { - log_error("Direction invalid. direction = %u", _direction); + LOG_ERROR("Direction invalid. direction = %u", _direction); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_NONE); } FootpathProvisionalRemove(); - auto tileElement = map_get_footpath_element_slope(_loc, _slope); + auto tileElement = MapGetFootpathElementSlope(_loc, _slope); if (tileElement == nullptr) { return ElementInsertQuery(std::move(res)); @@ -144,7 +145,7 @@ GameActions::Result FootpathPlaceAction::Execute() const } } - auto tileElement = map_get_footpath_element_slope(_loc, _slope); + auto tileElement = MapGetFootpathElementSlope(_loc, _slope); if (tileElement == nullptr) { return ElementInsertExecute(std::move(res)); @@ -495,7 +496,7 @@ void FootpathPlaceAction::RemoveIntersectingWalls(PathElement* pathElement) cons auto tileElement = MapGetFootpathElement(CoordsXYZ(_loc, z)); if (tileElement == nullptr) { - log_error("Something went wrong. Could not refind footpath."); + LOG_ERROR("Something went wrong. Could not refind footpath."); return; } pathElement = tileElement->AsPath(); @@ -508,7 +509,7 @@ void FootpathPlaceAction::RemoveIntersectingWalls(PathElement* pathElement) cons MapInvalidateTileFull(_loc); } -PathElement* FootpathPlaceAction::map_get_footpath_element_slope(const CoordsXYZ& footpathPos, int32_t slope) const +PathElement* FootpathPlaceAction::MapGetFootpathElementSlope(const CoordsXYZ& footpathPos, int32_t slope) const { const bool isSloped = slope & FOOTPATH_PROPERTIES_FLAG_IS_SLOPED; const auto slopeDirection = slope & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK; diff --git a/src/openrct2/actions/FootpathPlaceAction.h b/src/openrct2/actions/FootpathPlaceAction.h index 5fdac1dea1..8aa90434b3 100644 --- a/src/openrct2/actions/FootpathPlaceAction.h +++ b/src/openrct2/actions/FootpathPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,7 +42,7 @@ private: GameActions::Result ElementInsertExecute(GameActions::Result res) const; void AutomaticallySetPeepSpawn() const; void RemoveIntersectingWalls(PathElement* pathElement) const; - PathElement* map_get_footpath_element_slope(const CoordsXYZ& footpathPos, int32_t slope) const; + PathElement* MapGetFootpathElementSlope(const CoordsXYZ& footpathPos, int32_t slope) const; bool IsSameAsPathElement(const PathElement* pathElement) const; bool IsSameAsEntranceElement(const EntranceElement& entranceElement) const; }; diff --git a/src/openrct2/actions/FootpathRemoveAction.cpp b/src/openrct2/actions/FootpathRemoveAction.cpp index 1b67596c5d..bb8cada8eb 100644 --- a/src/openrct2/actions/FootpathRemoveAction.cpp +++ b/src/openrct2/actions/FootpathRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -150,9 +150,9 @@ TileElement* FootpathRemoveAction::GetFootpathElement() const return footpathElement; } -money32 FootpathRemoveAction::GetRefundPrice(TileElement* footpathElement) const +money64 FootpathRemoveAction::GetRefundPrice(TileElement* footpathElement) const { - money32 cost = -10.00_GBP; + money64 cost = -10.00_GBP; return cost; } diff --git a/src/openrct2/actions/FootpathRemoveAction.h b/src/openrct2/actions/FootpathRemoveAction.h index 63abe29ae7..56a992e470 100644 --- a/src/openrct2/actions/FootpathRemoveAction.h +++ b/src/openrct2/actions/FootpathRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,6 +31,6 @@ public: private: TileElement* GetFootpathElement() const; - money32 GetRefundPrice(TileElement* footpathElement) const; + money64 GetRefundPrice(TileElement* footpathElement) const; GameActions::Result RemoveBannersAtElement(const CoordsXY& loc, TileElement* tileElement) const; }; diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index 86e8e3eb8b..c4cda77ac6 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -84,11 +84,11 @@ namespace GameActions void Enqueue(GameAction::Ptr&& ga, uint32_t tick) { - if (ga->GetPlayer() == -1 && network_get_mode() != NETWORK_MODE_NONE) + if (ga->GetPlayer() == -1 && NetworkGetMode() != NETWORK_MODE_NONE) { // Server can directly invoke actions and will have no player id assigned // as that normally happens when receiving them over network. - ga->SetPlayer(network_get_current_player_id()); + ga->SetPlayer(NetworkGetCurrentPlayerId()); } _actionQueue.emplace(tick, std::move(ga), _nextUniqueId++); } @@ -108,7 +108,7 @@ namespace GameActions // run all the game commands at the current tick const QueuedGameAction& queued = *_actionQueue.begin(); - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) { if (queued.tick < currentTick) { @@ -145,10 +145,10 @@ namespace GameActions Guard::Assert(action != nullptr); GameActions::Result result = Execute(action); - if (result.Error == GameActions::Status::Ok && network_get_mode() == NETWORK_MODE_SERVER) + if (result.Error == GameActions::Status::Ok && NetworkGetMode() == NETWORK_MODE_SERVER) { // Relay this action to all other clients. - network_send_game_action(action); + NetworkSendGameAction(action); } _actionQueue.erase(_actionQueue.begin()); @@ -210,7 +210,7 @@ namespace GameActions if (result.Error == GameActions::Status::Ok) { - if (!finance_check_affordability(result.Cost, action->GetFlags())) + if (!FinanceCheckAffordability(result.Cost, action->GetFlags())) { result.Error = GameActions::Status::InsufficientFunds; result.ErrorTitle = STR_CANT_DO_THIS; @@ -233,19 +233,19 @@ namespace GameActions static const char* GetRealm() { - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) return "cl"; - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) return "sv"; return "sp"; } - struct ActionLogContext_t + struct ActionLogContext { MemoryStream output; }; - static void LogActionBegin(ActionLogContext_t& ctx, const GameAction* action) + static void LogActionBegin(ActionLogContext& ctx, const GameAction* action) { MemoryStream& output = ctx.output; @@ -262,7 +262,7 @@ namespace GameActions action->Serialise(ds); } - static void LogActionFinish(ActionLogContext_t& ctx, const GameAction* action, const GameActions::Result& result) + static void LogActionFinish(ActionLogContext& ctx, const GameAction* action, const GameActions::Result& result) { MemoryStream& output = ctx.output; @@ -280,9 +280,9 @@ namespace GameActions output.Write(temp, strlen(temp) + 1); const char* text = static_cast(output.GetData()); - log_verbose("%s", text); + LOG_VERBOSE("%s", text); - network_append_server_log(text); + NetworkAppendServerLog(text); } static GameActions::Result ExecuteInternal(const GameAction* action, bool topLevel) @@ -311,7 +311,7 @@ namespace GameActions GameActions::Result result = QueryInternal(action, topLevel); #ifdef ENABLE_SCRIPTING if (result.Error == GameActions::Status::Ok - && ((network_get_mode() == NETWORK_MODE_NONE) || (flags & GAME_COMMAND_FLAG_NETWORKED))) + && ((NetworkGetMode() == NETWORK_MODE_NONE) || (flags & GAME_COMMAND_FLAG_NETWORKED))) { auto& scriptEngine = GetContext()->GetScriptEngine(); scriptEngine.RunGameActionHooks(*action, result, false); @@ -323,24 +323,24 @@ namespace GameActions if (topLevel) { // Networked games send actions to the server to be run - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) { // As a client we have to wait or send it first. if (!(actionFlags & GameActions::Flags::ClientOnly) && !(flags & GAME_COMMAND_FLAG_NETWORKED)) { - log_verbose("[%s] GameAction::Execute %s (Out)", GetRealm(), action->GetName()); - network_send_game_action(action); + LOG_VERBOSE("[%s] GameAction::Execute %s (Out)", GetRealm(), action->GetName()); + NetworkSendGameAction(action); return result; } } - else if (network_get_mode() == NETWORK_MODE_SERVER) + else if (NetworkGetMode() == NETWORK_MODE_SERVER) { // If player is the server it would execute right away as where clients execute the commands // at the beginning of the frame, so we have to put them into the queue. if (!(actionFlags & GameActions::Flags::ClientOnly) && !(flags & GAME_COMMAND_FLAG_NETWORKED)) { - log_verbose("[%s] GameAction::Execute %s (Queue)", GetRealm(), action->GetName()); + LOG_VERBOSE("[%s] GameAction::Execute %s (Queue)", GetRealm(), action->GetName()); Enqueue(action, gCurrentTicks); return result; @@ -348,7 +348,7 @@ namespace GameActions } } - ActionLogContext_t logContext; + ActionLogContext logContext; LogActionBegin(logContext, action); // Execute the action, changing the game state @@ -369,31 +369,31 @@ namespace GameActions return result; // Update money balance - if (result.Error == GameActions::Status::Ok && finance_check_money_required(flags) && result.Cost != 0) + if (result.Error == GameActions::Status::Ok && FinanceCheckMoneyRequired(flags) && result.Cost != 0) { - finance_payment(result.Cost, result.Expenditure); + FinancePayment(result.Cost, result.Expenditure); MoneyEffect::Create(result.Cost, result.Position); } if (!(actionFlags & GameActions::Flags::ClientOnly) && result.Error == GameActions::Status::Ok) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { NetworkPlayerId_t playerId = action->GetPlayer(); - int32_t playerIndex = network_get_player_index(playerId.id); + int32_t playerIndex = NetworkGetPlayerIndex(playerId.id); Guard::Assert( playerIndex != -1, "Unable to find player %u for game action %u", playerId, action->GetType()); - network_set_player_last_action(playerIndex, action->GetType()); + NetworkSetPlayerLastAction(playerIndex, action->GetType()); if (result.Cost != 0) { - network_add_player_money_spent(playerIndex, result.Cost); + NetworkAddPlayerMoneySpent(playerIndex, result.Cost); } if (!result.Position.IsNull()) { - network_set_player_last_action_coord(playerIndex, result.Position); + NetworkSetPlayerLastActionCoord(playerIndex, result.Position); } } else @@ -433,12 +433,12 @@ namespace GameActions bool shouldShowError = !(flags & GAME_COMMAND_FLAG_GHOST) && !(flags & GAME_COMMAND_FLAG_NO_SPEND) && topLevel; // In network mode the error should be only shown to the issuer of the action. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { // If the action was never networked and query fails locally the player id is not assigned. // So compare only if the action went into the queue otherwise show errors by default. const bool isActionFromNetwork = (action->GetFlags() & GAME_COMMAND_FLAG_NETWORKED) != 0; - if (isActionFromNetwork && action->GetPlayer() != network_get_current_player_id()) + if (isActionFromNetwork && action->GetPlayer() != NetworkGetCurrentPlayerId()) { shouldShowError = false; } diff --git a/src/openrct2/actions/GameAction.h b/src/openrct2/actions/GameAction.h index ec478631fa..235fa0a1a5 100644 --- a/src/openrct2/actions/GameAction.h +++ b/src/openrct2/actions/GameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -102,7 +102,7 @@ public: param = TIdentifier::FromUnderlying(value); } - template void Visit(std::string_view name, NetworkObjectId_t& param) + template void Visit(std::string_view name, NetworkObjectId& param) { Visit(name, param.id); } diff --git a/src/openrct2/actions/GameActionRegistry.cpp b/src/openrct2/actions/GameActionRegistry.cpp index cd2bbd30db..ad89abd454 100644 --- a/src/openrct2/actions/GameActionRegistry.cpp +++ b/src/openrct2/actions/GameActionRegistry.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,14 +13,14 @@ #include "BannerSetColourAction.h" #include "BannerSetNameAction.h" #include "BannerSetStyleAction.h" -#include "ChangeMapSizeAction.h" +#include "CheatSetAction.h" #include "ClearAction.h" #include "ClimateSetAction.h" #include "CustomAction.h" #include "FootpathAdditionPlaceAction.h" #include "FootpathAdditionRemoveAction.h" +#include "FootpathLayoutPlaceAction.h" #include "FootpathPlaceAction.h" -#include "FootpathPlaceFromTrackAction.h" #include "FootpathRemoveAction.h" #include "GameAction.h" #include "GuestSetFlagsAction.h" @@ -35,20 +35,22 @@ #include "LargeSceneryRemoveAction.h" #include "LargeScenerySetColourAction.h" #include "LoadOrQuitAction.h" +#include "MapChangeSizeAction.h" #include "MazePlaceTrackAction.h" #include "MazeSetTrackAction.h" #include "NetworkModifyGroupAction.h" +#include "ParkEntrancePlaceAction.h" #include "ParkEntranceRemoveAction.h" #include "ParkMarketingAction.h" #include "ParkSetDateAction.h" +#include "ParkSetEntranceFeeAction.h" #include "ParkSetLoanAction.h" #include "ParkSetNameAction.h" #include "ParkSetParameterAction.h" #include "ParkSetResearchFundingAction.h" #include "PauseToggleAction.h" #include "PeepPickupAction.h" -#include "PlaceParkEntranceAction.h" -#include "PlacePeepSpawnAction.h" +#include "PeepSpawnPlaceAction.h" #include "PlayerKickAction.h" #include "PlayerSetGroupAction.h" #include "RideCreateAction.h" @@ -64,8 +66,6 @@ #include "RideSetStatusAction.h" #include "RideSetVehicleAction.h" #include "ScenarioSetSettingAction.h" -#include "SetCheatAction.h" -#include "SetParkEntranceFeeAction.h" #include "SignSetNameAction.h" #include "SignSetStyleAction.h" #include "SmallSceneryPlaceAction.h" @@ -133,7 +133,7 @@ namespace GameActions REGISTER_ACTION(BannerSetStyleAction); REGISTER_ACTION(ClimateSetAction); REGISTER_ACTION(FootpathPlaceAction); - REGISTER_ACTION(FootpathPlaceFromTrackAction); + REGISTER_ACTION(FootpathLayoutPlaceAction); REGISTER_ACTION(FootpathRemoveAction); REGISTER_ACTION(FootpathAdditionPlaceAction); REGISTER_ACTION(FootpathAdditionRemoveAction); @@ -148,8 +148,8 @@ namespace GameActions REGISTER_ACTION(ParkSetParameterAction); REGISTER_ACTION(ParkSetResearchFundingAction); REGISTER_ACTION(PeepPickupAction); - REGISTER_ACTION(PlaceParkEntranceAction); - REGISTER_ACTION(PlacePeepSpawnAction); + REGISTER_ACTION(ParkEntrancePlaceAction); + REGISTER_ACTION(PeepSpawnPlaceAction); REGISTER_ACTION(PlayerKickAction); REGISTER_ACTION(PlayerSetGroupAction); REGISTER_ACTION(RideCreateAction); @@ -165,7 +165,7 @@ namespace GameActions REGISTER_ACTION(RideSetVehicleAction); REGISTER_ACTION(RideSetSettingAction); REGISTER_ACTION(ScenarioSetSettingAction); - REGISTER_ACTION(SetParkEntranceFeeAction); + REGISTER_ACTION(ParkSetEntranceFeeAction); REGISTER_ACTION(SignSetNameAction); REGISTER_ACTION(SignSetStyleAction); REGISTER_ACTION(StaffFireAction); @@ -204,8 +204,8 @@ namespace GameActions REGISTER_ACTION(WaterRaiseAction); REGISTER_ACTION(GuestSetFlagsAction); REGISTER_ACTION(ParkSetDateAction); - REGISTER_ACTION(SetCheatAction); - REGISTER_ACTION(ChangeMapSizeAction); + REGISTER_ACTION(CheatSetAction); + REGISTER_ACTION(MapChangeSizeAction); #ifdef ENABLE_SCRIPTING REGISTER_ACTION(CustomAction); #endif diff --git a/src/openrct2/actions/GameActionResult.cpp b/src/openrct2/actions/GameActionResult.cpp index 4d119c992d..4de6f06b55 100644 --- a/src/openrct2/actions/GameActionResult.cpp +++ b/src/openrct2/actions/GameActionResult.cpp @@ -25,7 +25,7 @@ namespace GameActions } std::string operator()(const StringId strId) const { - return format_string(strId, ErrorMessageArgs); + return FormatStringID(strId, ErrorMessageArgs); } }; diff --git a/src/openrct2/actions/GameActionResult.h b/src/openrct2/actions/GameActionResult.h index ed88d04e87..ae64d34eda 100644 --- a/src/openrct2/actions/GameActionResult.h +++ b/src/openrct2/actions/GameActionResult.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -68,7 +68,7 @@ namespace GameActions StringVariant ErrorMessage = STR_NONE; std::array ErrorMessageArgs{}; CoordsXYZ Position = { LOCATION_NULL, LOCATION_NULL, LOCATION_NULL }; - money32 Cost = 0; + money64 Cost = 0; ExpenditureType Expenditure = ExpenditureType::Count; #ifdef __ANDROID__ diff --git a/src/openrct2/actions/GuestSetFlagsAction.cpp b/src/openrct2/actions/GuestSetFlagsAction.cpp index 67409363dd..d5c78aed40 100644 --- a/src/openrct2/actions/GuestSetFlagsAction.cpp +++ b/src/openrct2/actions/GuestSetFlagsAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ GuestSetFlagsAction::GuestSetFlagsAction(EntityId peepId, uint32_t flags) void GuestSetFlagsAction::AcceptParameters(GameActionParameterVisitor& visitor) { visitor.Visit("peep", _peepId); - visitor.Visit("flags", _newFlags); + visitor.Visit("guestFlags", _newFlags); } uint16_t GuestSetFlagsAction::GetActionFlags() const @@ -42,7 +42,7 @@ GameActions::Result GuestSetFlagsAction::Query() const auto* peep = TryGetEntity(_peepId); if (peep == nullptr) { - log_error("Used invalid sprite index for peep: %u", _peepId.ToUnderlying()); + LOG_ERROR("Used invalid sprite index for peep: %u", _peepId.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_THIS, STR_NONE); } return GameActions::Result(); @@ -53,7 +53,7 @@ GameActions::Result GuestSetFlagsAction::Execute() const auto* peep = TryGetEntity(_peepId); if (peep == nullptr) { - log_error("Used invalid sprite index for peep: %u", _peepId.ToUnderlying()); + LOG_ERROR("Used invalid sprite index for peep: %u", _peepId.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_THIS, STR_NONE); } diff --git a/src/openrct2/actions/GuestSetFlagsAction.h b/src/openrct2/actions/GuestSetFlagsAction.h index 625de6f702..ab751cfedc 100644 --- a/src/openrct2/actions/GuestSetFlagsAction.h +++ b/src/openrct2/actions/GuestSetFlagsAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/GuestSetNameAction.cpp b/src/openrct2/actions/GuestSetNameAction.cpp index f7c051d6c7..102c4601b5 100644 --- a/src/openrct2/actions/GuestSetNameAction.cpp +++ b/src/openrct2/actions/GuestSetNameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -64,7 +64,7 @@ GameActions::Result GuestSetNameAction::Query() const auto guest = TryGetEntity(_spriteIndex); if (guest == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_NONE); } @@ -76,7 +76,7 @@ GameActions::Result GuestSetNameAction::Execute() const auto guest = TryGetEntity(_spriteIndex); if (guest == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_NAME_GUEST, STR_NONE); } @@ -94,7 +94,7 @@ GameActions::Result GuestSetNameAction::Execute() const // Easter egg functions are for guests only guest->HandleEasterEggName(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); auto intent = Intent(INTENT_ACTION_REFRESH_GUEST_LIST); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/actions/GuestSetNameAction.h b/src/openrct2/actions/GuestSetNameAction.h index e3c95293fd..96b0b4fb53 100644 --- a/src/openrct2/actions/GuestSetNameAction.h +++ b/src/openrct2/actions/GuestSetNameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/LandBuyRightsAction.cpp b/src/openrct2/actions/LandBuyRightsAction.cpp index 18cdeb657d..34b70120a5 100644 --- a/src/openrct2/actions/LandBuyRightsAction.cpp +++ b/src/openrct2/actions/LandBuyRightsAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,6 +36,12 @@ LandBuyRightsAction::LandBuyRightsAction(const CoordsXY& coord, LandBuyRightSett { } +void LandBuyRightsAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_range); + visitor.Visit("setting", _setting); +} + uint16_t LandBuyRightsAction::GetActionFlags() const { return GameAction::GetActionFlags(); @@ -86,7 +92,7 @@ GameActions::Result LandBuyRightsAction::QueryExecute(bool isExecuting) const { if (!LocationValid({ x, y })) continue; - auto result = map_buy_land_rights_for_tile({ x, y }, isExecuting); + auto result = MapBuyLandRightsForTile({ x, y }, isExecuting); if (result.Error == GameActions::Status::Ok) { res.Cost += result.Cost; @@ -100,18 +106,18 @@ GameActions::Result LandBuyRightsAction::QueryExecute(bool isExecuting) const return res; } -GameActions::Result LandBuyRightsAction::map_buy_land_rights_for_tile(const CoordsXY& loc, bool isExecuting) const +GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY& loc, bool isExecuting) const { if (_setting >= LandBuyRightSetting::Count) { - log_warning("Tried calling buy land rights with an incorrect setting. setting = %u", _setting); + LOG_WARNING("Tried calling buy land rights with an incorrect setting. setting = %u", _setting); return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_NONE); } SurfaceElement* surfaceElement = MapGetSurfaceElementAt(loc); if (surfaceElement == nullptr) { - log_error("Could not find surface. x = %d, y = %d", loc.x, loc.y); + LOG_ERROR("Could not find surface. x = %d, y = %d", loc.x, loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[EnumValue(_setting)], STR_NONE); } @@ -161,7 +167,7 @@ GameActions::Result LandBuyRightsAction::map_buy_land_rights_for_tile(const Coor return res; default: - log_warning("Tried calling buy land rights with an incorrect setting. setting = %u", _setting); + LOG_WARNING("Tried calling buy land rights with an incorrect setting. setting = %u", _setting); return GameActions::Result(GameActions::Status::InvalidParameters, _ErrorTitles[0], STR_NONE); } } diff --git a/src/openrct2/actions/LandBuyRightsAction.h b/src/openrct2/actions/LandBuyRightsAction.h index a4813409d6..fc6ed77514 100644 --- a/src/openrct2/actions/LandBuyRightsAction.h +++ b/src/openrct2/actions/LandBuyRightsAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,6 +34,8 @@ public: LandBuyRightsAction(const MapRange& range, LandBuyRightSetting setting); LandBuyRightsAction(const CoordsXY& coord, LandBuyRightSetting setting); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; @@ -42,5 +44,5 @@ public: private: GameActions::Result QueryExecute(bool isExecuting) const; - GameActions::Result map_buy_land_rights_for_tile(const CoordsXY& loc, bool isExecuting) const; + GameActions::Result MapBuyLandRightsForTile(const CoordsXY& loc, bool isExecuting) const; }; diff --git a/src/openrct2/actions/LandLowerAction.cpp b/src/openrct2/actions/LandLowerAction.cpp index 0d80033d9a..4c0e7c1ec0 100644 --- a/src/openrct2/actions/LandLowerAction.cpp +++ b/src/openrct2/actions/LandLowerAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,6 +31,13 @@ LandLowerAction::LandLowerAction(const CoordsXY& coords, MapRange range, uint8_t { } +void LandLowerAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_coords); + visitor.Visit(_range); + visitor.Visit("selectionType", _selectionType); +} + uint16_t LandLowerAction::GetActionFlags() const { return GameAction::GetActionFlags(); @@ -94,7 +101,7 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const } withinOwnership = true; - uint8_t height = surfaceElement->base_height; + uint8_t height = surfaceElement->BaseHeight; if (surfaceElement->GetSlope() & TILE_ELEMENT_SURFACE_RAISED_CORNERS_MASK) height += 2; if (surfaceElement->GetSlope() & TILE_ELEMENT_SURFACE_DIAGONAL_FLAG) @@ -103,7 +110,7 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const if (height < maxHeight) continue; - height = surfaceElement->base_height; + height = surfaceElement->BaseHeight; uint8_t currentSlope = surfaceElement->GetSlope(); uint8_t newSlope = tile_element_lower_styles[tableRow][currentSlope]; if (newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) diff --git a/src/openrct2/actions/LandLowerAction.h b/src/openrct2/actions/LandLowerAction.h index 0f635c6591..257726fa21 100644 --- a/src/openrct2/actions/LandLowerAction.h +++ b/src/openrct2/actions/LandLowerAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,8 @@ public: LandLowerAction() = default; LandLowerAction(const CoordsXY& coords, MapRange range, uint8_t selectionType); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/LandRaiseAction.cpp b/src/openrct2/actions/LandRaiseAction.cpp index 6384a6b809..5f78121871 100644 --- a/src/openrct2/actions/LandRaiseAction.cpp +++ b/src/openrct2/actions/LandRaiseAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,6 +32,13 @@ LandRaiseAction::LandRaiseAction(const CoordsXY& coords, MapRange range, uint8_t { } +void LandRaiseAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_coords); + visitor.Visit(_range); + visitor.Visit("selectionType", _selectionType); +} + uint16_t LandRaiseAction::GetActionFlags() const { return GameAction::GetActionFlags(); @@ -95,7 +102,7 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const } withinOwnership = true; - uint8_t height = surfaceElement->base_height; + uint8_t height = surfaceElement->BaseHeight; if (height > minHeight) continue; diff --git a/src/openrct2/actions/LandRaiseAction.h b/src/openrct2/actions/LandRaiseAction.h index 88fdfec313..6e6d654e1c 100644 --- a/src/openrct2/actions/LandRaiseAction.h +++ b/src/openrct2/actions/LandRaiseAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,8 @@ public: LandRaiseAction() = default; LandRaiseAction(const CoordsXY& coords, MapRange range, uint8_t selectionType); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/LandSetHeightAction.cpp b/src/openrct2/actions/LandSetHeightAction.cpp index d016538d78..54f79054a2 100644 --- a/src/openrct2/actions/LandSetHeightAction.cpp +++ b/src/openrct2/actions/LandSetHeightAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,12 +15,12 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" +#include "../object/SmallSceneryEntry.h" #include "../ride/RideData.h" #include "../windows/Intent.h" #include "../world/ConstructionClearance.h" #include "../world/Park.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/TileElementsView.h" @@ -33,6 +33,13 @@ LandSetHeightAction::LandSetHeightAction(const CoordsXY& coords, uint8_t height, { } +void LandSetHeightAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_coords); + visitor.Visit("height", _height); + visitor.Visit("style", _style); +} + uint16_t LandSetHeightAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::EditorOnly; @@ -66,7 +73,7 @@ GameActions::Result LandSetHeightAction::Query() const } } - money32 sceneryRemovalCost = 0; + money64 sceneryRemovalCost = 0; if (!gCheatsDisableClearanceChecks) { if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL) @@ -127,7 +134,7 @@ GameActions::Result LandSetHeightAction::Query() const } auto clearResult = MapCanConstructWithClearAt( - { _coords, _height * COORDS_Z_STEP, zCorner * COORDS_Z_STEP }, &map_set_land_height_clear_func, { 0b1111, 0 }, 0, + { _coords, _height * COORDS_Z_STEP, zCorner * COORDS_Z_STEP }, &MapSetLandHeightClearFunc, { 0b1111, 0 }, 0, CREATE_CROSSING_MODE_NONE); if (clearResult.Error != GameActions::Status::Ok) { @@ -143,7 +150,7 @@ GameActions::Result LandSetHeightAction::Query() const GameActions::Result LandSetHeightAction::Execute() const { - money32 cost = 0.00_GBP; + money64 cost = 0.00_GBP; auto surfaceHeight = TileElementHeight(_coords); FootpathRemoveLitter({ _coords, surfaceHeight }); @@ -209,9 +216,9 @@ TileElement* LandSetHeightAction::CheckTreeObstructions() const { for (auto* sceneryElement : TileElementsView(_coords)) { - if (_height > sceneryElement->clearance_height) + if (_height > sceneryElement->ClearanceHeight) continue; - if (_height + 4 < sceneryElement->base_height) + if (_height + 4 < sceneryElement->BaseHeight) continue; auto* sceneryEntry = sceneryElement->GetEntry(); @@ -223,15 +230,15 @@ TileElement* LandSetHeightAction::CheckTreeObstructions() const return nullptr; } -money32 LandSetHeightAction::GetSmallSceneryRemovalCost() const +money64 LandSetHeightAction::GetSmallSceneryRemovalCost() const { - money32 cost{ 0 }; + money64 cost{ 0 }; for (auto* sceneryElement : TileElementsView(_coords)) { - if (_height > sceneryElement->clearance_height) + if (_height > sceneryElement->ClearanceHeight) continue; - if (_height + 4 < sceneryElement->base_height) + if (_height + 4 < sceneryElement->BaseHeight) continue; auto* sceneryEntry = sceneryElement->GetEntry(); @@ -253,9 +260,9 @@ void LandSetHeightAction::SmallSceneryRemoval() const break; if (tileElement->GetType() != TileElementType::SmallScenery) continue; - if (_height > tileElement->clearance_height) + if (_height > tileElement->ClearanceHeight) continue; - if (_height + 4 < tileElement->base_height) + if (_height + 4 < tileElement->BaseHeight) continue; TileElementRemove(tileElement--); } while (!(tileElement++)->IsLastForTile()); @@ -267,11 +274,11 @@ StringId LandSetHeightAction::CheckRideSupports() const { RideId rideIndex = trackElement->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) continue; - rct_ride_entry* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->GetRideEntry(); if (rideEntry == nullptr) continue; @@ -281,7 +288,7 @@ StringId LandSetHeightAction::CheckRideSupports() const maxHeight = ride->GetRideTypeDescriptor().Heights.MaxHeight; } - int32_t zDelta = trackElement->clearance_height - _height; + int32_t zDelta = trackElement->ClearanceHeight - _height; if (zDelta >= 0 && zDelta / 2 > maxHeight) { return STR_SUPPORTS_CANT_BE_EXTENDED; @@ -314,9 +321,9 @@ TileElement* LandSetHeightAction::CheckFloatingStructures(TileElement* surfaceEl return nullptr; } -money32 LandSetHeightAction::GetSurfaceHeightChangeCost(SurfaceElement* surfaceElement) const +money64 LandSetHeightAction::GetSurfaceHeightChangeCost(SurfaceElement* surfaceElement) const { - money32 cost{ 0 }; + money64 cost{ 0 }; for (Direction i : ALL_DIRECTIONS) { int32_t cornerHeight = TileElementGetCornerHeight(surfaceElement, i); @@ -328,8 +335,8 @@ money32 LandSetHeightAction::GetSurfaceHeightChangeCost(SurfaceElement* surfaceE void LandSetHeightAction::SetSurfaceHeight(TileElement* surfaceElement) const { - surfaceElement->base_height = _height; - surfaceElement->clearance_height = _height; + surfaceElement->BaseHeight = _height; + surfaceElement->ClearanceHeight = _height; surfaceElement->AsSurface()->SetSlope(_style); int32_t waterHeight = surfaceElement->AsSurface()->GetWaterHeight() / COORDS_Z_STEP; if (waterHeight != 0 && waterHeight <= _height) @@ -340,9 +347,9 @@ void LandSetHeightAction::SetSurfaceHeight(TileElement* surfaceElement) const MapInvalidateTileFull(_coords); } -int32_t LandSetHeightAction::map_set_land_height_clear_func( +int32_t LandSetHeightAction::MapSetLandHeightClearFunc( TileElement** tile_element, [[maybe_unused]] const CoordsXY& coords, [[maybe_unused]] uint8_t flags, - [[maybe_unused]] money32* price) + [[maybe_unused]] money64* price) { if ((*tile_element)->GetType() == TileElementType::Surface) return 0; diff --git a/src/openrct2/actions/LandSetHeightAction.h b/src/openrct2/actions/LandSetHeightAction.h index 7dba07f930..99cf9e8da7 100644 --- a/src/openrct2/actions/LandSetHeightAction.h +++ b/src/openrct2/actions/LandSetHeightAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,8 @@ public: LandSetHeightAction() = default; LandSetHeightAction(const CoordsXY& coords, uint8_t height, uint8_t style); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; @@ -31,18 +33,18 @@ public: private: StringId CheckParameters() const; TileElement* CheckTreeObstructions() const; - money32 GetSmallSceneryRemovalCost() const; + money64 GetSmallSceneryRemovalCost() const; void SmallSceneryRemoval() const; StringId CheckRideSupports() const; TileElement* CheckFloatingStructures(TileElement* surfaceElement, uint8_t zCorner) const; - money32 GetSurfaceHeightChangeCost(SurfaceElement* surfaceElement) const; + money64 GetSurfaceHeightChangeCost(SurfaceElement* surfaceElement) const; void SetSurfaceHeight(TileElement* surfaceElement) const; /** * * rct2: 0x00663CB9 */ - static int32_t map_set_land_height_clear_func( + static int32_t MapSetLandHeightClearFunc( TileElement** tile_element, [[maybe_unused]] const CoordsXY& coords, [[maybe_unused]] uint8_t flags, - [[maybe_unused]] money32* price); + [[maybe_unused]] money64* price); }; diff --git a/src/openrct2/actions/LandSetRightsAction.cpp b/src/openrct2/actions/LandSetRightsAction.cpp index 81947a3771..69107a3637 100644 --- a/src/openrct2/actions/LandSetRightsAction.cpp +++ b/src/openrct2/actions/LandSetRightsAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -41,6 +41,13 @@ LandSetRightsAction::LandSetRightsAction(const CoordsXY& coord, LandSetRightSett { } +void LandSetRightsAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_range); + visitor.Visit("setting", _setting); + visitor.Visit("ownership", _ownership); +} + uint16_t LandSetRightsAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::EditorOnly; @@ -87,7 +94,7 @@ GameActions::Result LandSetRightsAction::QueryExecute(bool isExecuting) const { if (!LocationValid({ x, y })) continue; - auto result = map_buy_land_rights_for_tile({ x, y }, isExecuting); + auto result = MapBuyLandRightsForTile({ x, y }, isExecuting); if (result.Error == GameActions::Status::Ok) { res.Cost += result.Cost; @@ -103,12 +110,12 @@ GameActions::Result LandSetRightsAction::QueryExecute(bool isExecuting) const return res; } -GameActions::Result LandSetRightsAction::map_buy_land_rights_for_tile(const CoordsXY& loc, bool isExecuting) const +GameActions::Result LandSetRightsAction::MapBuyLandRightsForTile(const CoordsXY& loc, bool isExecuting) const { SurfaceElement* surfaceElement = MapGetSurfaceElementAt(loc); if (surfaceElement == nullptr) { - log_error("Could not find surface. x = %d, y = %d", loc.x, loc.y); + LOG_ERROR("Could not find surface. x = %d, y = %d", loc.x, loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -167,8 +174,8 @@ GameActions::Result LandSetRightsAction::map_buy_land_rights_for_tile(const Coor // There is no need to check the height if _ownership is 0 (unowned and no rights available). if (_ownership == OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED || _ownership == OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) { - if (entranceElement->base_height - 3 > surfaceElement->base_height - || entranceElement->base_height < surfaceElement->base_height) + if (entranceElement->BaseHeight - 3 > surfaceElement->BaseHeight + || entranceElement->BaseHeight < surfaceElement->BaseHeight) { return res; } @@ -184,7 +191,7 @@ GameActions::Result LandSetRightsAction::map_buy_land_rights_for_tile(const Coor std::remove_if( gPeepSpawns.begin(), gPeepSpawns.end(), [x = loc.x, y = loc.y](const auto& spawn) { - return floor2(spawn.x, 32) == x && floor2(spawn.y, 32) == y; + return Floor2(spawn.x, 32) == x && Floor2(spawn.y, 32) == y; }), gPeepSpawns.end()); } @@ -195,7 +202,7 @@ GameActions::Result LandSetRightsAction::map_buy_land_rights_for_tile(const Coor return res; } default: - log_warning("Tried calling set land rights with an incorrect setting. setting = %u", _setting); + LOG_WARNING("Tried calling set land rights with an incorrect setting. setting = %u", _setting); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } } diff --git a/src/openrct2/actions/LandSetRightsAction.h b/src/openrct2/actions/LandSetRightsAction.h index 581fe46824..8dddd494b3 100644 --- a/src/openrct2/actions/LandSetRightsAction.h +++ b/src/openrct2/actions/LandSetRightsAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,6 +33,8 @@ public: LandSetRightsAction(const MapRange& range, LandSetRightSetting setting, uint8_t ownership = 0); LandSetRightsAction(const CoordsXY& coord, LandSetRightSetting setting, uint8_t ownership = 0); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; @@ -41,5 +43,5 @@ public: private: GameActions::Result QueryExecute(bool isExecuting) const; - GameActions::Result map_buy_land_rights_for_tile(const CoordsXY& loc, bool isExecuting) const; + GameActions::Result MapBuyLandRightsForTile(const CoordsXY& loc, bool isExecuting) const; }; diff --git a/src/openrct2/actions/LandSmoothAction.cpp b/src/openrct2/actions/LandSmoothAction.cpp index b9a6fef4cb..bc14870ff5 100644 --- a/src/openrct2/actions/LandSmoothAction.cpp +++ b/src/openrct2/actions/LandSmoothAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,6 +33,14 @@ LandSmoothAction::LandSmoothAction(const CoordsXY& coords, MapRange range, uint8 { } +void LandSmoothAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_coords); + visitor.Visit(_range); + visitor.Visit("selectionType", _selectionType); + visitor.Visit("isLowering", _isLowering); +} + uint16_t LandSmoothAction::GetActionFlags() const { return GameAction::GetActionFlags(); @@ -58,7 +66,7 @@ GameActions::Result LandSmoothAction::Execute() const GameActions::Result LandSmoothAction::SmoothLandTile( int32_t direction, bool isExecuting, const CoordsXY& loc, SurfaceElement* surfaceElement) const { - int32_t targetBaseZ = surfaceElement->base_height; + int32_t targetBaseZ = surfaceElement->BaseHeight; int32_t slope = surfaceElement->GetSlope(); if (_isLowering) { @@ -86,13 +94,13 @@ GameActions::Result LandSmoothAction::SmoothLandTile( return res; } -money32 LandSmoothAction::SmoothLandRowByEdge( +money64 LandSmoothAction::SmoothLandRowByEdge( bool isExecuting, const CoordsXY& loc, int32_t expectedLandHeight1, int32_t expectedLandHeight2, int32_t stepX, int32_t stepY, int32_t direction1, int32_t direction2, int32_t checkDirection1, int32_t checkDirection2) const { uint8_t shouldContinue = 0xF; int32_t landChangePerTile = _isLowering ? 2 : -2; - money32 totalCost = 0; + money64 totalCost = 0; // check if we need to start at all if (!LocationValid(loc) || !LocationValid({ loc.x + stepX, loc.y + stepY })) @@ -169,7 +177,7 @@ money32 LandSmoothAction::SmoothLandRowByEdge( expectedLandHeight1 += landChangePerTile; // change land of current tile - int32_t targetBaseZ = surfaceElement->base_height; + int32_t targetBaseZ = surfaceElement->BaseHeight; int32_t slope = surfaceElement->GetSlope(); int32_t oldSlope = slope; if (_isLowering) @@ -184,7 +192,7 @@ money32 LandSmoothAction::SmoothLandRowByEdge( } } if ((shouldContinue & 0x8) - && MapGetCornerHeight(surfaceElement->base_height, oldSlope, direction2) + && MapGetCornerHeight(surfaceElement->BaseHeight, oldSlope, direction2) == MapGetCornerHeight(targetBaseZ, slope, direction2)) { slope = tile_element_lower_styles[direction2][slope]; @@ -207,7 +215,7 @@ money32 LandSmoothAction::SmoothLandRowByEdge( } } if ((shouldContinue & 0x8) - && MapGetCornerHeight(surfaceElement->base_height, oldSlope, direction2) + && MapGetCornerHeight(surfaceElement->BaseHeight, oldSlope, direction2) == MapGetCornerHeight(targetBaseZ, slope, direction2)) { slope = tile_element_raise_styles[direction2][slope]; @@ -230,12 +238,12 @@ money32 LandSmoothAction::SmoothLandRowByEdge( return totalCost; } -money32 LandSmoothAction::SmoothLandRowByCorner( +money64 LandSmoothAction::SmoothLandRowByCorner( bool isExecuting, const CoordsXY& loc, int32_t expectedLandHeight, int32_t stepX, int32_t stepY, int32_t direction, int32_t checkDirection) const { bool shouldContinue = true; - money32 totalCost = 0; + money64 totalCost = 0; int32_t landChangePerTile; if (stepX == 0 || stepY == 0) { @@ -435,7 +443,7 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const auto surfaceElement = MapGetSurfaceElementAt(CoordsXY{ validRange.GetLeft(), validRange.GetTop() }); if (surfaceElement == nullptr) break; - uint8_t newBaseZ = surfaceElement->base_height; + uint8_t newBaseZ = surfaceElement->BaseHeight; uint8_t newSlope = surfaceElement->GetSlope(); if (raiseLand) @@ -531,7 +539,7 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const auto surfaceElement = MapGetSurfaceElementAt(CoordsXY{ validRange.GetLeft(), validRange.GetTop() }); if (surfaceElement == nullptr) break; - uint8_t newBaseZ = surfaceElement->base_height; + uint8_t newBaseZ = surfaceElement->BaseHeight; uint8_t oldSlope = surfaceElement->GetSlope(); int32_t rowIndex = selectionType - (MAP_SELECT_TYPE_EDGE_0 - MAP_SELECT_TYPE_FULL - 1); uint8_t newSlope = raiseLand ? tile_element_raise_styles[rowIndex][oldSlope] @@ -598,7 +606,7 @@ GameActions::Result LandSmoothAction::SmoothLand(bool isExecuting) const break; } default: - log_error("Invalid map selection %u", _selectionType); + LOG_ERROR("Invalid map selection %u", _selectionType); return GameActions::Result(GameActions::Status::InvalidParameters, std::get(res.ErrorTitle), STR_NONE); } // switch selectionType diff --git a/src/openrct2/actions/LandSmoothAction.h b/src/openrct2/actions/LandSmoothAction.h index 9f37b2455f..bd2787c6f7 100644 --- a/src/openrct2/actions/LandSmoothAction.h +++ b/src/openrct2/actions/LandSmoothAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -28,6 +28,8 @@ public: LandSmoothAction() = default; LandSmoothAction(const CoordsXY& coords, MapRange range, uint8_t selectionType, bool isLowering); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; @@ -37,10 +39,10 @@ public: private: GameActions::Result SmoothLandTile( int32_t direction, bool isExecuting, const CoordsXY& loc, SurfaceElement* surfaceElement) const; - money32 SmoothLandRowByEdge( + money64 SmoothLandRowByEdge( bool isExecuting, const CoordsXY& loc, int32_t expectedLandHeight1, int32_t expectedLandHeight2, int32_t stepX, int32_t stepY, int32_t direction1, int32_t direction2, int32_t checkDirection1, int32_t checkDirection2) const; - money32 SmoothLandRowByCorner( + money64 SmoothLandRowByCorner( bool isExecuting, const CoordsXY& loc, int32_t expectedLandHeight, int32_t stepX, int32_t stepY, int32_t direction, int32_t checkDirection) const; GameActions::Result SmoothLand(bool isExecuting) const; diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.cpp b/src/openrct2/actions/LargeSceneryPlaceAction.cpp index cbec898e32..f20732993d 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.cpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,8 @@ #include "../OpenRCT2.h" #include "../management/Finance.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectLimits.h" #include "../ride/Ride.h" #include "../ride/RideConstruction.h" @@ -63,11 +65,11 @@ GameActions::Result LargeSceneryPlaceAction::Query() const auto resultData = LargeSceneryPlaceActionResult{}; - money32 supportsCost = 0; + money64 supportsCost = 0; if (_primaryColour >= COLOUR_COUNT || _secondaryColour >= COLOUR_COUNT || _tertiaryColour >= COLOUR_COUNT) { - log_error( + LOG_ERROR( "Invalid game command for scenery placement, primaryColour = %u, secondaryColour = %u", _primaryColour, _secondaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); @@ -75,14 +77,14 @@ GameActions::Result LargeSceneryPlaceAction::Query() const if (_sceneryType >= MAX_LARGE_SCENERY_OBJECTS) { - log_error("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); + LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } - auto* sceneryEntry = GetLargeSceneryEntry(_sceneryType); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (sceneryEntry == nullptr) { - log_error("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); + LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } @@ -100,14 +102,14 @@ GameActions::Result LargeSceneryPlaceAction::Query() const { if (HasReachedBannerLimit()) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_TOO_MANY_BANNERS_IN_GAME); } } uint8_t tileNum = 0; - for (rct_large_scenery_tile* tile = sceneryEntry->tiles; tile->x_offset != -1; tile++, tileNum++) + for (LargeSceneryTile* tile = sceneryEntry->tiles; tile->x_offset != -1; tile++, tileNum++) { auto curTile = CoordsXY{ tile->x_offset, tile->y_offset }.Rotate(_loc.direction); @@ -162,7 +164,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const if (!CheckMapCapacity(sceneryEntry->tiles, totalNumTiles)) { - log_error("No free map elements available"); + LOG_ERROR("No free map elements available"); return GameActions::Result( GameActions::Status::NoFreeElements, STR_CANT_POSITION_THIS_HERE, STR_TILE_ELEMENT_LIMIT_REACHED); } @@ -189,18 +191,18 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const auto resultData = LargeSceneryPlaceActionResult{}; - money32 supportsCost = 0; + money64 supportsCost = 0; - auto* sceneryEntry = GetLargeSceneryEntry(_sceneryType); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (sceneryEntry == nullptr) { - log_error("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); + LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } if (sceneryEntry->tiles == nullptr) { - log_error("Invalid large scenery object, sceneryType = %u", _sceneryType); + LOG_ERROR("Invalid large scenery object, sceneryType = %u", _sceneryType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } @@ -220,7 +222,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const banner = CreateBanner(); if (banner == nullptr) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_TOO_MANY_BANNERS_IN_GAME); } @@ -243,7 +245,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const } uint8_t tileNum = 0; - for (rct_large_scenery_tile* tile = sceneryEntry->tiles; tile->x_offset != -1; tile++, tileNum++) + for (LargeSceneryTile* tile = sceneryEntry->tiles; tile->x_offset != -1; tile++, tileNum++) { auto curTile = CoordsXY{ tile->x_offset, tile->y_offset }.Rotate(_loc.direction); @@ -310,19 +312,19 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const return res; } -int16_t LargeSceneryPlaceAction::GetTotalNumTiles(rct_large_scenery_tile* tiles) const +int16_t LargeSceneryPlaceAction::GetTotalNumTiles(LargeSceneryTile* tiles) const { uint32_t totalNumTiles = 0; - for (rct_large_scenery_tile* tile = tiles; tile->x_offset != -1; tile++) + for (LargeSceneryTile* tile = tiles; tile->x_offset != -1; tile++) { totalNumTiles++; } return totalNumTiles; } -bool LargeSceneryPlaceAction::CheckMapCapacity(rct_large_scenery_tile* tiles, int16_t numTiles) const +bool LargeSceneryPlaceAction::CheckMapCapacity(LargeSceneryTile* tiles, int16_t numTiles) const { - for (rct_large_scenery_tile* tile = tiles; tile->x_offset != -1; tile++) + for (LargeSceneryTile* tile = tiles; tile->x_offset != -1; tile++) { auto curTile = CoordsXY{ tile->x_offset, tile->y_offset }.Rotate(_loc.direction); @@ -336,10 +338,10 @@ bool LargeSceneryPlaceAction::CheckMapCapacity(rct_large_scenery_tile* tiles, in return true; } -int16_t LargeSceneryPlaceAction::GetMaxSurfaceHeight(rct_large_scenery_tile* tiles) const +int16_t LargeSceneryPlaceAction::GetMaxSurfaceHeight(LargeSceneryTile* tiles) const { int16_t maxHeight = -1; - for (rct_large_scenery_tile* tile = tiles; tile->x_offset != -1; tile++) + for (LargeSceneryTile* tile = tiles; tile->x_offset != -1; tile++) { auto curTile = CoordsXY{ tile->x_offset, tile->y_offset }.Rotate(_loc.direction); diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.h b/src/openrct2/actions/LargeSceneryPlaceAction.h index c2722221de..ad841a311c 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.h +++ b/src/openrct2/actions/LargeSceneryPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,8 +9,6 @@ #pragma once -#include "../world/LargeScenery.h" -#include "../world/Scenery.h" #include "GameAction.h" struct LargeSceneryPlaceActionResult @@ -20,6 +18,9 @@ struct LargeSceneryPlaceActionResult BannerIndex bannerId = BannerIndex::GetNull(); }; +struct LargeSceneryTile; +struct LargeSceneryElement; + class LargeSceneryPlaceAction final : public GameActionBase { private: @@ -45,8 +46,8 @@ public: GameActions::Result Execute() const override; private: - int16_t GetTotalNumTiles(rct_large_scenery_tile* tiles) const; - bool CheckMapCapacity(rct_large_scenery_tile* tiles, int16_t numTiles) const; - int16_t GetMaxSurfaceHeight(rct_large_scenery_tile* tiles) const; + int16_t GetTotalNumTiles(LargeSceneryTile* tiles) const; + bool CheckMapCapacity(LargeSceneryTile* tiles, int16_t numTiles) const; + int16_t GetMaxSurfaceHeight(LargeSceneryTile* tiles) const; void SetNewLargeSceneryElement(LargeSceneryElement& sceneryElement, uint8_t tileNum) const; }; diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/LargeSceneryRemoveAction.cpp index d41c1979d9..3d0edbe080 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/LargeSceneryRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,9 +17,9 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" +#include "../object/LargeSceneryEntry.h" #include "../ride/Ride.h" #include "../world/Park.h" -#include "../world/SmallScenery.h" #include "../world/TileElementsView.h" using namespace OpenRCT2; @@ -64,7 +64,7 @@ GameActions::Result LargeSceneryRemoveAction::Query() const TileElement* tileElement = FindLargeSceneryElement(_loc, _tileIndex); if (tileElement == nullptr) { - log_warning("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y); + LOG_WARNING("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS); } @@ -135,7 +135,7 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const TileElement* tileElement = FindLargeSceneryElement(_loc, _tileIndex); if (tileElement == nullptr) { - log_warning("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y); + LOG_WARNING("Invalid game command for scenery removal, x = %d, y = %d", _loc.x, _loc.y); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS); } @@ -179,7 +179,7 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const } else { - log_error("Tile not found when trying to remove element!"); + LOG_ERROR("Tile not found when trying to remove element!"); } } diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.h b/src/openrct2/actions/LargeSceneryRemoveAction.h index 37d303a82e..04f3ea44de 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.h +++ b/src/openrct2/actions/LargeSceneryRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/LargeScenerySetColourAction.cpp b/src/openrct2/actions/LargeScenerySetColourAction.cpp index c2c1263373..8195523562 100644 --- a/src/openrct2/actions/LargeScenerySetColourAction.cpp +++ b/src/openrct2/actions/LargeScenerySetColourAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,7 @@ #include "../OpenRCT2.h" #include "../management/Finance.h" +#include "../object/LargeSceneryEntry.h" #include "../world/Scenery.h" LargeScenerySetColourAction::LargeScenerySetColourAction( @@ -23,6 +24,15 @@ LargeScenerySetColourAction::LargeScenerySetColourAction( { } +void LargeScenerySetColourAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); + visitor.Visit("tileIndex", _tileIndex); + visitor.Visit("primaryColour", _primaryColour); + visitor.Visit("secondaryColour", _secondaryColour); + visitor.Visit("tertiaryColour", _tertiaryColour); +} + uint16_t LargeScenerySetColourAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -58,25 +68,25 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting) auto mapSizeMax = GetMapSizeMaxXY(); if (_loc.x < 0 || _loc.y < 0 || _loc.x > mapSizeMax.x || _loc.y > mapSizeMax.y) { - log_error("Invalid x / y coordinates: x = %d, y = %d", _loc.x, _loc.y); + LOG_ERROR("Invalid x / y coordinates: x = %d, y = %d", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (_primaryColour >= COLOUR_COUNT) { - log_error("Invalid primary colour: colour = %u", _primaryColour); + LOG_ERROR("Invalid primary colour: colour = %u", _primaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (_secondaryColour >= COLOUR_COUNT) { - log_error("Invalid secondary colour: colour = %u", _secondaryColour); + LOG_ERROR("Invalid secondary colour: colour = %u", _secondaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (_tertiaryColour >= COLOUR_COUNT) { - log_error("Invalid tertiary colour: colour = %u", _tertiaryColour); + LOG_ERROR("Invalid tertiary colour: colour = %u", _tertiaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -84,7 +94,7 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting) if (largeElement == nullptr) { - log_error( + LOG_ERROR( "Could not find large scenery at: x = %d, y = %d, z = %d, direction = %d, tileIndex = %u", _loc.x, _loc.y, _loc.z, _loc.direction, _tileIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); @@ -99,7 +109,7 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting) if (sceneryEntry == nullptr) { - log_error("Could not find scenery object. type = %u", largeElement->GetEntryIndex()); + LOG_ERROR("Could not find scenery object. type = %u", largeElement->GetEntryIndex()); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } // Work out the base tile coordinates (Tile with index 0) @@ -134,7 +144,7 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting) if (tileElement == nullptr) { - log_error( + LOG_ERROR( "Large scenery element not found at: x = %d, y = %d, z = %d, direction = %d", _loc.x, _loc.y, _loc.z, _loc.direction); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); diff --git a/src/openrct2/actions/LargeScenerySetColourAction.h b/src/openrct2/actions/LargeScenerySetColourAction.h index f6bcea5c2e..1e27dbc123 100644 --- a/src/openrct2/actions/LargeScenerySetColourAction.h +++ b/src/openrct2/actions/LargeScenerySetColourAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,6 +25,8 @@ public: LargeScenerySetColourAction( const CoordsXYZD& loc, uint8_t tileIndex, uint8_t primaryColour, uint8_t secondaryColour, uint8_t tertiaryColour); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/LoadOrQuitAction.cpp b/src/openrct2/actions/LoadOrQuitAction.cpp index 8409f164fd..168bd3c8f7 100644 --- a/src/openrct2/actions/LoadOrQuitAction.cpp +++ b/src/openrct2/actions/LoadOrQuitAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,6 +18,12 @@ LoadOrQuitAction::LoadOrQuitAction(LoadOrQuitModes mode, PromptMode savePromptMo { } +void LoadOrQuitAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("mode", _mode); + visitor.Visit("savePromptMode", _savePromptMode); +} + uint16_t LoadOrQuitAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::ClientOnly | GameActions::Flags::AllowWhilePaused; @@ -45,10 +51,10 @@ GameActions::Result LoadOrQuitAction::Execute() const ContextOpenWindow(WindowClass::SavePrompt); break; case LoadOrQuitModes::CloseSavePrompt: - window_close_by_class(WindowClass::SavePrompt); + WindowCloseByClass(WindowClass::SavePrompt); break; default: - game_load_or_quit_no_save_prompt(); + GameLoadOrQuitNoSavePrompt(); break; } return GameActions::Result(); diff --git a/src/openrct2/actions/LoadOrQuitAction.h b/src/openrct2/actions/LoadOrQuitAction.h index 62bdb4af7b..599c648ff4 100644 --- a/src/openrct2/actions/LoadOrQuitAction.h +++ b/src/openrct2/actions/LoadOrQuitAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,6 +27,8 @@ public: LoadOrQuitAction() = default; LoadOrQuitAction(LoadOrQuitModes mode, PromptMode savePromptMode = PromptMode::SaveBeforeLoad); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/ChangeMapSizeAction.cpp b/src/openrct2/actions/MapChangeSizeAction.cpp similarity index 81% rename from src/openrct2/actions/ChangeMapSizeAction.cpp rename to src/openrct2/actions/MapChangeSizeAction.cpp index 72a5943514..88d0e047df 100644 --- a/src/openrct2/actions/ChangeMapSizeAction.cpp +++ b/src/openrct2/actions/MapChangeSizeAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "ChangeMapSizeAction.h" +#include "MapChangeSizeAction.h" #include "../Context.h" #include "../drawing/IDrawingEngine.h" @@ -16,23 +16,23 @@ #include "../windows/Intent.h" #include "../world/Park.h" -ChangeMapSizeAction::ChangeMapSizeAction(const TileCoordsXY& targetSize) +MapChangeSizeAction::MapChangeSizeAction(const TileCoordsXY& targetSize) : _targetSize(targetSize) { } -uint16_t ChangeMapSizeAction::GetActionFlags() const +uint16_t MapChangeSizeAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; } -void ChangeMapSizeAction::Serialise(DataSerialiser& stream) +void MapChangeSizeAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); stream << DS_TAG(_targetSize); } -GameActions::Result ChangeMapSizeAction::Query() const +GameActions::Result MapChangeSizeAction::Query() const { if (_targetSize.x > MAXIMUM_MAP_SIZE_TECHNICAL || _targetSize.y > MAXIMUM_MAP_SIZE_TECHNICAL) { @@ -45,7 +45,7 @@ GameActions::Result ChangeMapSizeAction::Query() const return GameActions::Result(); } -GameActions::Result ChangeMapSizeAction::Execute() const +GameActions::Result MapChangeSizeAction::Execute() const { // Expand map while (_targetSize.x > gMapSize.x) @@ -72,11 +72,11 @@ GameActions::Result ChangeMapSizeAction::Execute() const ParkCalculateSize(); windowManager->BroadcastIntent(Intent(INTENT_ACTION_MAP)); - gfx_invalidate_screen(); + GfxInvalidateScreen(); return GameActions::Result(); } -void ChangeMapSizeAction::AcceptParameters(GameActionParameterVisitor& visitor) +void MapChangeSizeAction::AcceptParameters(GameActionParameterVisitor& visitor) { visitor.Visit("targetSizeX", _targetSize.x); visitor.Visit("targetSizeY", _targetSize.y); diff --git a/src/openrct2/actions/ChangeMapSizeAction.h b/src/openrct2/actions/MapChangeSizeAction.h similarity index 79% rename from src/openrct2/actions/ChangeMapSizeAction.h rename to src/openrct2/actions/MapChangeSizeAction.h index 9e8379807b..c469966633 100644 --- a/src/openrct2/actions/ChangeMapSizeAction.h +++ b/src/openrct2/actions/MapChangeSizeAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,11 +12,11 @@ #include "../world/Map.h" #include "GameAction.h" -class ChangeMapSizeAction final : public GameActionBase +class MapChangeSizeAction final : public GameActionBase { public: - ChangeMapSizeAction() = default; - ChangeMapSizeAction(const TileCoordsXY& targetSize); + MapChangeSizeAction() = default; + MapChangeSizeAction(const TileCoordsXY& targetSize); void AcceptParameters(GameActionParameterVisitor& visitor) override; uint16_t GetActionFlags() const override; diff --git a/src/openrct2/actions/MazePlaceTrackAction.cpp b/src/openrct2/actions/MazePlaceTrackAction.cpp index 1cee40a0d1..627faaf470 100644 --- a/src/openrct2/actions/MazePlaceTrackAction.cpp +++ b/src/openrct2/actions/MazePlaceTrackAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -79,7 +79,7 @@ GameActions::Result MazePlaceTrackAction::Query() const { heightDifference /= COORDS_Z_PER_TINY_Z; - auto* ride = get_ride(_rideIndex); + auto* ride = GetRide(_rideIndex); const auto& rtd = ride->GetRideTypeDescriptor(); if (heightDifference > rtd.Heights.MaxHeight) { @@ -112,7 +112,7 @@ GameActions::Result MazePlaceTrackAction::Query() const return res; } - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr || ride->type == RIDE_TYPE_NULL) { res.Error = GameActions::Status::InvalidParameters; @@ -133,7 +133,7 @@ GameActions::Result MazePlaceTrackAction::Execute() const res.Expenditure = ExpenditureType::RideConstruction; res.ErrorTitle = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { res.Error = GameActions::Status::InvalidParameters; diff --git a/src/openrct2/actions/MazePlaceTrackAction.h b/src/openrct2/actions/MazePlaceTrackAction.h index 30ac0b41b0..6ca917315f 100644 --- a/src/openrct2/actions/MazePlaceTrackAction.h +++ b/src/openrct2/actions/MazePlaceTrackAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/MazeSetTrackAction.cpp b/src/openrct2/actions/MazeSetTrackAction.cpp index 3af8b440ec..907cdad5c6 100644 --- a/src/openrct2/actions/MazeSetTrackAction.cpp +++ b/src/openrct2/actions/MazeSetTrackAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,6 +25,33 @@ using namespace OpenRCT2::TrackMetaData; +// clang-format off +/** rct2: 0x00993CE9 */ +static constexpr const uint8_t Byte993CE9[] = { + 0xFF, 0xE0, 0xFF, + 14, 0, 1, 2, + 6, 2, 4, 5, + 9, 10, 6, 8, + 12, 13, 14, 10, +}; + +/** rct2: 0x00993CFC */ +static constexpr const uint8_t Byte993CFC[] = { + 5, 12, 0xFF, 0xFF, + 9, 0, 0xFF, 0xFF, + 13, 4, 0xFF, 0xFF, + 1, 8, 0xFF, 0xFF, +}; + +/** rct2: 0x00993D0C */ +static constexpr const uint8_t Byte993D0C[] = { + 3, 0, 0xFF, 0xFF, + 0, 1, 0xFF, 0xFF, + 1, 2, 0xFF, 0xFF, + 2, 3, 0xFF, 0xFF, +}; +// clang-format on + MazeSetTrackAction::MazeSetTrackAction(const CoordsXYZD& location, bool initialPlacement, RideId rideIndex, uint8_t mode) : _loc(location) , _initialPlacement(initialPlacement) @@ -90,7 +117,7 @@ GameActions::Result MazeSetTrackAction::Query() const { heightDifference /= COORDS_Z_PER_TINY_Z; - auto* ride = get_ride(_rideIndex); + auto* ride = GetRide(_rideIndex); const auto& rtd = ride->GetRideTypeDescriptor(); if (heightDifference > rtd.Heights.MaxHeight) { @@ -131,7 +158,7 @@ GameActions::Result MazeSetTrackAction::Query() const return res; } - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr || ride->type == RIDE_CRASH_TYPE_NONE) { res.Error = GameActions::Status::NoClearance; @@ -155,7 +182,7 @@ GameActions::Result MazeSetTrackAction::Execute() const res.Expenditure = ExpenditureType::RideConstruction; res.ErrorTitle = STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { res.Error = GameActions::Status::InvalidParameters; @@ -211,10 +238,10 @@ GameActions::Result MazeSetTrackAction::Execute() const if (!_initialPlacement) { - segmentOffset = byte_993CE9[(_loc.direction + segmentOffset)]; + segmentOffset = Byte993CE9[(_loc.direction + segmentOffset)]; tileElement->AsTrack()->MazeEntrySubtract(1 << segmentOffset); - uint8_t temp_edx = byte_993CFC[segmentOffset]; + uint8_t temp_edx = Byte993CFC[segmentOffset]; if (temp_edx != 0xFF) { auto previousElementLoc = CoordsXY{ _loc }.ToTileStart() - CoordsDirectionDelta[_loc.direction]; @@ -250,7 +277,7 @@ GameActions::Result MazeSetTrackAction::Execute() const MapInvalidateTileFull(previousSegment.ToTileStart()); if (tileElement == nullptr) { - log_error("No surface found"); + LOG_ERROR("No surface found"); res.Error = GameActions::Status::Unknown; res.ErrorMessage = STR_NONE; return res; @@ -269,7 +296,7 @@ GameActions::Result MazeSetTrackAction::Execute() const { tileElement->AsTrack()->MazeEntryAdd(1 << segmentBit); - uint32_t direction1 = byte_993D0C[segmentBit]; + uint32_t direction1 = Byte993D0C[segmentBit]; auto nextElementLoc = previousSegment.ToTileStart() + CoordsDirectionDelta[direction1]; TileElement* tmp_tileElement = MapGetTrackElementAtOfTypeFromRide( @@ -277,7 +304,7 @@ GameActions::Result MazeSetTrackAction::Execute() const if (tmp_tileElement != nullptr) { - uint8_t edx11 = byte_993CFC[segmentBit]; + uint8_t edx11 = Byte993CFC[segmentBit]; tmp_tileElement->AsTrack()->MazeEntryAdd(1 << (edx11)); } diff --git a/src/openrct2/actions/MazeSetTrackAction.h b/src/openrct2/actions/MazeSetTrackAction.h index d28e581b36..e2d32a3435 100644 --- a/src/openrct2/actions/MazeSetTrackAction.h +++ b/src/openrct2/actions/MazeSetTrackAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,32 +10,6 @@ #pragma once #include "GameAction.h" -// clang-format off -/** rct2: 0x00993CE9 */ -static constexpr const uint8_t byte_993CE9[] = { - 0xFF, 0xE0, 0xFF, - 14, 0, 1, 2, - 6, 2, 4, 5, - 9, 10, 6, 8, - 12, 13, 14, 10, -}; - -/** rct2: 0x00993CFC */ -static constexpr const uint8_t byte_993CFC[] = { - 5, 12, 0xFF, 0xFF, - 9, 0, 0xFF, 0xFF, - 13, 4, 0xFF, 0xFF, - 1, 8, 0xFF, 0xFF, -}; - -/** rct2: 0x00993D0C */ -static constexpr const uint8_t byte_993D0C[] = { - 3, 0, 0xFF, 0xFF, - 0, 1, 0xFF, 0xFF, - 1, 2, 0xFF, 0xFF, - 2, 3, 0xFF, 0xFF, -}; -// clang-format on class MazeSetTrackAction final : public GameActionBase { diff --git a/src/openrct2/actions/NetworkModifyGroupAction.cpp b/src/openrct2/actions/NetworkModifyGroupAction.cpp index 9b99bc8b12..6a22924c1f 100644 --- a/src/openrct2/actions/NetworkModifyGroupAction.cpp +++ b/src/openrct2/actions/NetworkModifyGroupAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,15 @@ NetworkModifyGroupAction::NetworkModifyGroupAction( { } +void NetworkModifyGroupAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("type", _type); + visitor.Visit("groupId", _groupId); + visitor.Visit("name", _name); + visitor.Visit("permissionIndex", _permissionIndex); + visitor.Visit("permissionState", _permissionState); +} + uint16_t NetworkModifyGroupAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -36,10 +45,10 @@ void NetworkModifyGroupAction::Serialise(DataSerialiser& stream) GameActions::Result NetworkModifyGroupAction::Query() const { - return network_modify_groups(GetPlayer(), _type, _groupId, _name, _permissionIndex, _permissionState, false); + return NetworkModifyGroups(GetPlayer(), _type, _groupId, _name, _permissionIndex, _permissionState, false); } GameActions::Result NetworkModifyGroupAction::Execute() const { - return network_modify_groups(GetPlayer(), _type, _groupId, _name, _permissionIndex, _permissionState, true); + return NetworkModifyGroups(GetPlayer(), _type, _groupId, _name, _permissionIndex, _permissionState, true); } diff --git a/src/openrct2/actions/NetworkModifyGroupAction.h b/src/openrct2/actions/NetworkModifyGroupAction.h index 161e229b15..995b4b7d0c 100644 --- a/src/openrct2/actions/NetworkModifyGroupAction.h +++ b/src/openrct2/actions/NetworkModifyGroupAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -44,6 +44,8 @@ public: ModifyGroupType type, uint8_t groupId = std::numeric_limits::max(), const std::string name = "", uint32_t permissionIndex = 0, PermissionState permissionState = PermissionState::Count); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/PlaceParkEntranceAction.cpp b/src/openrct2/actions/ParkEntrancePlaceAction.cpp similarity index 91% rename from src/openrct2/actions/PlaceParkEntranceAction.cpp rename to src/openrct2/actions/ParkEntrancePlaceAction.cpp index 7c9dfdc807..2a488f13bb 100644 --- a/src/openrct2/actions/PlaceParkEntranceAction.cpp +++ b/src/openrct2/actions/ParkEntrancePlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "PlaceParkEntranceAction.h" +#include "ParkEntrancePlaceAction.h" #include "../Cheats.h" #include "../OpenRCT2.h" @@ -21,18 +21,24 @@ #include "../world/Park.h" #include "../world/Surface.h" -PlaceParkEntranceAction::PlaceParkEntranceAction(const CoordsXYZD& location, ObjectEntryIndex pathType) +ParkEntrancePlaceAction::ParkEntrancePlaceAction(const CoordsXYZD& location, ObjectEntryIndex pathType) : _loc(location) , _pathType(pathType) { } -uint16_t PlaceParkEntranceAction::GetActionFlags() const +void ParkEntrancePlaceAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); + visitor.Visit("footpathSurfaceObject", _pathType); +} + +uint16_t ParkEntrancePlaceAction::GetActionFlags() const { return GameActionBase::GetActionFlags() | GameActions::Flags::EditorOnly; } -void PlaceParkEntranceAction::Serialise(DataSerialiser& stream) +void ParkEntrancePlaceAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); @@ -40,7 +46,7 @@ void PlaceParkEntranceAction::Serialise(DataSerialiser& stream) stream << DS_TAG(_pathType); } -GameActions::Result PlaceParkEntranceAction::Query() const +GameActions::Result ParkEntrancePlaceAction::Query() const { if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) { @@ -103,7 +109,7 @@ GameActions::Result PlaceParkEntranceAction::Query() const return res; } -GameActions::Result PlaceParkEntranceAction::Execute() const +GameActions::Result ParkEntrancePlaceAction::Execute() const { auto res = GameActions::Result(); res.Expenditure = ExpenditureType::LandPurchase; @@ -177,7 +183,7 @@ GameActions::Result PlaceParkEntranceAction::Execute() const return res; } -bool PlaceParkEntranceAction::CheckMapCapacity(int16_t numTiles) const +bool ParkEntrancePlaceAction::CheckMapCapacity(int16_t numTiles) const { CoordsXYZ entranceLoc = _loc; for (uint8_t index = 0; index < 3; index++) diff --git a/src/openrct2/actions/PlaceParkEntranceAction.h b/src/openrct2/actions/ParkEntrancePlaceAction.h similarity index 73% rename from src/openrct2/actions/PlaceParkEntranceAction.h rename to src/openrct2/actions/ParkEntrancePlaceAction.h index 691a110f66..9e055bda47 100644 --- a/src/openrct2/actions/PlaceParkEntranceAction.h +++ b/src/openrct2/actions/ParkEntrancePlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,15 +11,17 @@ #include "GameAction.h" -class PlaceParkEntranceAction final : public GameActionBase +class ParkEntrancePlaceAction final : public GameActionBase { private: CoordsXYZD _loc; ObjectEntryIndex _pathType; public: - PlaceParkEntranceAction() = default; - PlaceParkEntranceAction(const CoordsXYZD& location, ObjectEntryIndex pathType); + ParkEntrancePlaceAction() = default; + ParkEntrancePlaceAction(const CoordsXYZD& location, ObjectEntryIndex pathType); + + void AcceptParameters(GameActionParameterVisitor& visitor) override; uint16_t GetActionFlags() const override; diff --git a/src/openrct2/actions/ParkEntranceRemoveAction.cpp b/src/openrct2/actions/ParkEntranceRemoveAction.cpp index 37991f9adc..e564d0c756 100644 --- a/src/openrct2/actions/ParkEntranceRemoveAction.cpp +++ b/src/openrct2/actions/ParkEntranceRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,6 +19,11 @@ ParkEntranceRemoveAction::ParkEntranceRemoveAction(const CoordsXYZ& loc) { } +void ParkEntranceRemoveAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); +} + uint16_t ParkEntranceRemoveAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::EditorOnly; @@ -46,7 +51,7 @@ GameActions::Result ParkEntranceRemoveAction::Query() const auto entranceIndex = ParkEntranceGetIndex(_loc); if (!LocationValid(_loc) || entranceIndex == -1) { - log_error("Could not find entrance at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); + LOG_ERROR("Could not find entrance at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } return res; @@ -62,7 +67,7 @@ GameActions::Result ParkEntranceRemoveAction::Execute() const auto entranceIndex = ParkEntranceGetIndex(_loc); if (entranceIndex == -1) { - log_error("Could not find entrance at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); + LOG_ERROR("Could not find entrance at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_NONE); } diff --git a/src/openrct2/actions/ParkEntranceRemoveAction.h b/src/openrct2/actions/ParkEntranceRemoveAction.h index be2e7bb684..82143fba20 100644 --- a/src/openrct2/actions/ParkEntranceRemoveAction.h +++ b/src/openrct2/actions/ParkEntranceRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,8 @@ public: ParkEntranceRemoveAction() = default; ParkEntranceRemoveAction(const CoordsXYZ& loc); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/ParkMarketingAction.cpp b/src/openrct2/actions/ParkMarketingAction.cpp index dfdecc196b..3d0cda0b99 100644 --- a/src/openrct2/actions/ParkMarketingAction.cpp +++ b/src/openrct2/actions/ParkMarketingAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -76,7 +76,7 @@ GameActions::Result ParkMarketingAction::Execute() const { campaign.ShopItemType = ShopItem(_item); } - marketing_new_campaign(campaign); + MarketingNewCampaign(campaign); // We are only interested in invalidating the finances (marketing) window auto windowManager = OpenRCT2::GetContext()->GetUiContext()->GetWindowManager(); @@ -94,7 +94,7 @@ GameActions::Result ParkMarketingAction::CreateResult() const return result; } -money32 ParkMarketingAction::CalculatePrice() const +money64 ParkMarketingAction::CalculatePrice() const { return _numWeeks * AdvertisingCampaignPricePerWeek[_type]; } diff --git a/src/openrct2/actions/ParkMarketingAction.h b/src/openrct2/actions/ParkMarketingAction.h index c77c11d9ed..9b0b4cbb05 100644 --- a/src/openrct2/actions/ParkMarketingAction.h +++ b/src/openrct2/actions/ParkMarketingAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,5 +32,5 @@ public: private: GameActions::Result CreateResult() const; - money32 CalculatePrice() const; + money64 CalculatePrice() const; }; diff --git a/src/openrct2/actions/ParkSetDateAction.cpp b/src/openrct2/actions/ParkSetDateAction.cpp index ddd27c1f4a..c0a0367596 100644 --- a/src/openrct2/actions/ParkSetDateAction.cpp +++ b/src/openrct2/actions/ParkSetDateAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -54,6 +54,6 @@ GameActions::Result ParkSetDateAction::Query() const GameActions::Result ParkSetDateAction::Execute() const { - date_set(_year, _month, _day); + DateSet(_year, _month, _day); return GameActions::Result(); } diff --git a/src/openrct2/actions/ParkSetDateAction.h b/src/openrct2/actions/ParkSetDateAction.h index d3269841ed..f1e4a92d23 100644 --- a/src/openrct2/actions/ParkSetDateAction.h +++ b/src/openrct2/actions/ParkSetDateAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/SetParkEntranceFeeAction.cpp b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp similarity index 71% rename from src/openrct2/actions/SetParkEntranceFeeAction.cpp rename to src/openrct2/actions/ParkSetEntranceFeeAction.cpp index 81de841a04..7fe95f73c3 100644 --- a/src/openrct2/actions/SetParkEntranceFeeAction.cpp +++ b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "SetParkEntranceFeeAction.h" +#include "ParkSetEntranceFeeAction.h" #include "../Cheats.h" #include "../core/MemoryStream.h" @@ -15,29 +15,29 @@ #include "../localisation/StringIds.h" #include "../world/Park.h" -SetParkEntranceFeeAction::SetParkEntranceFeeAction(money16 fee) +ParkSetEntranceFeeAction::ParkSetEntranceFeeAction(money64 fee) : _fee(fee) { } -void SetParkEntranceFeeAction::AcceptParameters(GameActionParameterVisitor& visitor) +void ParkSetEntranceFeeAction::AcceptParameters(GameActionParameterVisitor& visitor) { visitor.Visit("value", _fee); } -uint16_t SetParkEntranceFeeAction::GetActionFlags() const +uint16_t ParkSetEntranceFeeAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; } -void SetParkEntranceFeeAction::Serialise(DataSerialiser& stream) +void ParkSetEntranceFeeAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); stream << DS_TAG(_fee); } -GameActions::Result SetParkEntranceFeeAction::Query() const +GameActions::Result ParkSetEntranceFeeAction::Query() const { bool noMoney = (gParkFlags & PARK_FLAGS_NO_MONEY) != 0; bool forceFreeEntry = !ParkEntranceFeeUnlocked(); @@ -52,9 +52,9 @@ GameActions::Result SetParkEntranceFeeAction::Query() const return GameActions::Result(); } -GameActions::Result SetParkEntranceFeeAction::Execute() const +GameActions::Result ParkSetEntranceFeeAction::Execute() const { gParkEntranceFee = _fee; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); return GameActions::Result(); } diff --git a/src/openrct2/actions/SetParkEntranceFeeAction.h b/src/openrct2/actions/ParkSetEntranceFeeAction.h similarity index 76% rename from src/openrct2/actions/SetParkEntranceFeeAction.h rename to src/openrct2/actions/ParkSetEntranceFeeAction.h index af937b2e40..a929913b2b 100644 --- a/src/openrct2/actions/SetParkEntranceFeeAction.h +++ b/src/openrct2/actions/ParkSetEntranceFeeAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,14 +11,14 @@ #include "GameAction.h" -class SetParkEntranceFeeAction final : public GameActionBase +class ParkSetEntranceFeeAction final : public GameActionBase { private: - money16 _fee{ MONEY16_UNDEFINED }; + money64 _fee{ MONEY64_UNDEFINED }; public: - SetParkEntranceFeeAction() = default; - SetParkEntranceFeeAction(money16 fee); + ParkSetEntranceFeeAction() = default; + ParkSetEntranceFeeAction(money64 fee); void AcceptParameters(GameActionParameterVisitor& visitor) override; diff --git a/src/openrct2/actions/ParkSetLoanAction.cpp b/src/openrct2/actions/ParkSetLoanAction.cpp index 448a491f0d..1c7384f4cf 100644 --- a/src/openrct2/actions/ParkSetLoanAction.cpp +++ b/src/openrct2/actions/ParkSetLoanAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,23 +40,22 @@ void ParkSetLoanAction::Serialise(DataSerialiser& stream) GameActions::Result ParkSetLoanAction::Query() const { - auto currentLoan = gBankLoan; - auto loanDifference = currentLoan - _value; - if (_value > currentLoan) + if (_value > gBankLoan && _value > gMaxBankLoan) { - if (_value > gMaxBankLoan) - { - return GameActions::Result( - GameActions::Status::Disallowed, STR_CANT_BORROW_ANY_MORE_MONEY, STR_BANK_REFUSES_TO_INCREASE_LOAN); - } + return GameActions::Result( + GameActions::Status::Disallowed, STR_CANT_BORROW_ANY_MORE_MONEY, STR_BANK_REFUSES_TO_INCREASE_LOAN); } - else + if (_value < gBankLoan && _value < 0.00_GBP) { - if (loanDifference > gCash) - { - return GameActions::Result( - GameActions::Status::InsufficientFunds, STR_CANT_PAY_BACK_LOAN, STR_NOT_ENOUGH_CASH_AVAILABLE); - } + return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_PAY_BACK_LOAN, STR_LOAN_CANT_BE_NEGATIVE); + } + // The “isPayingBack” check is needed to allow increasing the loan when the player is in debt. + const auto isPayingBack = gBankLoan > _value; + const auto amountToPayBack = gBankLoan - _value; + if (isPayingBack && amountToPayBack > gCash) + { + return GameActions::Result( + GameActions::Status::InsufficientFunds, STR_CANT_PAY_BACK_LOAN, STR_NOT_ENOUGH_CASH_AVAILABLE); } return GameActions::Result(); } diff --git a/src/openrct2/actions/ParkSetLoanAction.h b/src/openrct2/actions/ParkSetLoanAction.h index afad1a7aa4..573d075242 100644 --- a/src/openrct2/actions/ParkSetLoanAction.h +++ b/src/openrct2/actions/ParkSetLoanAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,7 +14,7 @@ class ParkSetLoanAction final : public GameActionBase { private: - money32 _value{ MONEY32_UNDEFINED }; + money64 _value{ MONEY64_UNDEFINED }; public: ParkSetLoanAction() = default; diff --git a/src/openrct2/actions/ParkSetNameAction.cpp b/src/openrct2/actions/ParkSetNameAction.cpp index bfc4188ed8..602f3e6dfb 100644 --- a/src/openrct2/actions/ParkSetNameAction.cpp +++ b/src/openrct2/actions/ParkSetNameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -59,8 +59,8 @@ GameActions::Result ParkSetNameAction::Execute() const if (_name != park.Name) { park.Name = _name; - scrolling_text_invalidate(); - gfx_invalidate_screen(); + ScrollingTextInvalidate(); + GfxInvalidateScreen(); } return GameActions::Result(); } diff --git a/src/openrct2/actions/ParkSetNameAction.h b/src/openrct2/actions/ParkSetNameAction.h index 8aa5bb168c..fa49ca111e 100644 --- a/src/openrct2/actions/ParkSetNameAction.h +++ b/src/openrct2/actions/ParkSetNameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/ParkSetParameterAction.cpp b/src/openrct2/actions/ParkSetParameterAction.cpp index e009db1a17..c8e29a57ff 100644 --- a/src/openrct2/actions/ParkSetParameterAction.cpp +++ b/src/openrct2/actions/ParkSetParameterAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,12 @@ ParkSetParameterAction::ParkSetParameterAction(ParkParameter parameter, uint64_t { } +void ParkSetParameterAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("parameter", _parameter); + visitor.Visit("value", _value); +} + uint16_t ParkSetParameterAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -51,19 +57,19 @@ GameActions::Result ParkSetParameterAction::Execute() const if (gParkFlags & PARK_FLAGS_PARK_OPEN) { gParkFlags &= ~PARK_FLAGS_PARK_OPEN; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } break; case ParkParameter::Open: if (!(gParkFlags & PARK_FLAGS_PARK_OPEN)) { gParkFlags |= PARK_FLAGS_PARK_OPEN; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } break; case ParkParameter::SamePriceInPark: gSamePriceThroughoutPark = _value; - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); break; default: return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); diff --git a/src/openrct2/actions/ParkSetParameterAction.h b/src/openrct2/actions/ParkSetParameterAction.h index 58dffc6c63..39e1c0b759 100644 --- a/src/openrct2/actions/ParkSetParameterAction.h +++ b/src/openrct2/actions/ParkSetParameterAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,6 +36,8 @@ public: ParkSetParameterAction() = default; ParkSetParameterAction(ParkParameter parameter, uint64_t value = 0); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/ParkSetResearchFundingAction.cpp b/src/openrct2/actions/ParkSetResearchFundingAction.cpp index 3c5e889bc3..9f9a6ee234 100644 --- a/src/openrct2/actions/ParkSetResearchFundingAction.cpp +++ b/src/openrct2/actions/ParkSetResearchFundingAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,12 @@ ParkSetResearchFundingAction::ParkSetResearchFundingAction(uint32_t priorities, { } +void ParkSetResearchFundingAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("priorities", _priorities); + visitor.Visit("fundingAmount", _fundingAmount); +} + uint16_t ParkSetResearchFundingAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; diff --git a/src/openrct2/actions/ParkSetResearchFundingAction.h b/src/openrct2/actions/ParkSetResearchFundingAction.h index 69c4031e41..623ae3f10e 100644 --- a/src/openrct2/actions/ParkSetResearchFundingAction.h +++ b/src/openrct2/actions/ParkSetResearchFundingAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,8 @@ public: ParkSetResearchFundingAction() = default; ParkSetResearchFundingAction(uint32_t priorities, uint8_t fundingAmount); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/PauseToggleAction.cpp b/src/openrct2/actions/PauseToggleAction.cpp index 2ddc7381b8..dc699c18fa 100644 --- a/src/openrct2/actions/PauseToggleAction.cpp +++ b/src/openrct2/actions/PauseToggleAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,6 @@ GameActions::Result PauseToggleAction::Query() const GameActions::Result PauseToggleAction::Execute() const { - pause_toggle(); + PauseToggle(); return GameActions::Result(); } diff --git a/src/openrct2/actions/PauseToggleAction.h b/src/openrct2/actions/PauseToggleAction.h index c0126a429b..34923fd74e 100644 --- a/src/openrct2/actions/PauseToggleAction.h +++ b/src/openrct2/actions/PauseToggleAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/PeepPickupAction.cpp b/src/openrct2/actions/PeepPickupAction.cpp index c18ae82f11..971f91a993 100644 --- a/src/openrct2/actions/PeepPickupAction.cpp +++ b/src/openrct2/actions/PeepPickupAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,14 +15,22 @@ #include "../network/network.h" #include "../util/Util.h" -PeepPickupAction::PeepPickupAction(PeepPickupType type, EntityId spriteId, const CoordsXYZ& loc, NetworkPlayerId_t owner) +PeepPickupAction::PeepPickupAction(PeepPickupType type, EntityId entityId, const CoordsXYZ& loc, NetworkPlayerId_t owner) : _type(type) - , _spriteId(spriteId) + , _entityId(entityId) , _loc(loc) , _owner(owner) { } +void PeepPickupAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("type", _type); + visitor.Visit("id", _entityId); + visitor.Visit(_loc); + visitor.Visit("playerId", _owner); +} + uint16_t PeepPickupAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -32,14 +40,14 @@ void PeepPickupAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); - stream << DS_TAG(_type) << DS_TAG(_spriteId) << DS_TAG(_loc) << DS_TAG(_owner); + stream << DS_TAG(_type) << DS_TAG(_entityId) << DS_TAG(_loc) << DS_TAG(_owner); } GameActions::Result PeepPickupAction::Query() const { - if (_spriteId.ToUnderlying() >= MAX_ENTITIES || _spriteId.IsNull()) + if (_entityId.ToUnderlying() >= MAX_ENTITIES || _entityId.IsNull()) { - log_error("Failed to pick up peep for sprite %d", _spriteId); + LOG_ERROR("Failed to pick up peep for sprite %d", _entityId); return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } @@ -48,10 +56,10 @@ GameActions::Result PeepPickupAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } - auto* const peep = TryGetEntity(_spriteId); + auto* const peep = TryGetEntity(_entityId); if (peep == nullptr) { - log_error("Failed to pick up peep for sprite %d", _spriteId); + LOG_ERROR("Failed to pick up peep for sprite %d", _entityId); return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } @@ -66,12 +74,12 @@ GameActions::Result PeepPickupAction::Query() const { return GameActions::Result(GameActions::Status::Disallowed, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } - Peep* existing = network_get_pickup_peep(_owner); + Peep* existing = NetworkGetPickupPeep(_owner); if (existing != nullptr) { // already picking up a peep PeepPickupAction existingPickupAction{ - PeepPickupType::Cancel, existing->sprite_index, { network_get_pickup_peep_old_x(_owner), 0, 0 }, _owner + PeepPickupType::Cancel, existing->Id, { NetworkGetPickupPeepOldX(_owner), 0, 0 }, _owner }; auto result = GameActions::QueryNested(&existingPickupAction); @@ -87,7 +95,7 @@ GameActions::Result PeepPickupAction::Query() const break; case PeepPickupType::Place: res.Position = _loc; - if (network_get_pickup_peep(_owner) != peep) + if (NetworkGetPickupPeep(_owner) != peep) { return GameActions::Result(GameActions::Status::Unknown, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } @@ -98,7 +106,7 @@ GameActions::Result PeepPickupAction::Query() const } break; default: - log_error("Invalid pickup type: %u", _type); + LOG_ERROR("Invalid pickup type: %u", _type); return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } return res; @@ -106,10 +114,10 @@ GameActions::Result PeepPickupAction::Query() const GameActions::Result PeepPickupAction::Execute() const { - Peep* const peep = TryGetEntity(_spriteId); + Peep* const peep = TryGetEntity(_entityId); if (peep == nullptr) { - log_error("Failed to pick up peep for sprite %d", _spriteId); + LOG_ERROR("Failed to pick up peep for sprite %d", _entityId); return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } @@ -121,12 +129,12 @@ GameActions::Result PeepPickupAction::Execute() const { res.Position = peep->GetLocation(); - Peep* existing = network_get_pickup_peep(_owner); + Peep* existing = NetworkGetPickupPeep(_owner); if (existing != nullptr) { // already picking up a peep PeepPickupAction existingPickupAction{ - PeepPickupType::Cancel, existing->sprite_index, { network_get_pickup_peep_old_x(_owner), 0, 0 }, _owner + PeepPickupType::Cancel, existing->Id, { NetworkGetPickupPeepOldX(_owner), 0, 0 }, _owner }; auto result = GameActions::ExecuteNested(&existingPickupAction); @@ -134,15 +142,15 @@ GameActions::Result PeepPickupAction::Execute() const { return result; } - if (_owner == network_get_current_player_id()) + if (_owner == NetworkGetCurrentPlayerId()) { // prevent tool_cancel() - input_set_flag(INPUT_FLAG_TOOL_ACTIVE, false); + InputSetFlag(INPUT_FLAG_TOOL_ACTIVE, false); } } - network_set_pickup_peep(_owner, peep); - network_set_pickup_peep_old_x(_owner, peep->x); + NetworkSetPickupPeep(_owner, peep); + NetworkSetPickupPeepOldX(_owner, peep->x); peep->Pickup(); } break; @@ -150,13 +158,12 @@ GameActions::Result PeepPickupAction::Execute() const { res.Position = peep->GetLocation(); - Peep* const pickedUpPeep = network_get_pickup_peep(_owner); + Peep* const pickedUpPeep = NetworkGetPickupPeep(_owner); if (pickedUpPeep != nullptr) { pickedUpPeep->PickupAbort(_loc.x); } - - network_set_pickup_peep(_owner, nullptr); + NetworkSetPickupPeep(_owner, nullptr); } break; case PeepPickupType::Place: @@ -168,7 +175,7 @@ GameActions::Result PeepPickupAction::Execute() const CancelConcurrentPickups(peep); break; default: - log_error("Invalid pickup type: %u", _type); + LOG_ERROR("Invalid pickup type: %u", _type); return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_CANT_PLACE_PERSON_HERE, STR_NONE); } return res; @@ -177,20 +184,20 @@ GameActions::Result PeepPickupAction::Execute() const void PeepPickupAction::CancelConcurrentPickups(Peep* pickedPeep) const { // This part is only relevant in multiplayer games. - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) return; // Not relevant for owner, owner gets to place it normally. - NetworkPlayerId_t currentPlayerId = network_get_current_player_id(); + NetworkPlayerId_t currentPlayerId = NetworkGetCurrentPlayerId(); if (currentPlayerId == _owner) return; - Peep* peep = network_get_pickup_peep(network_get_current_player_id()); + Peep* peep = NetworkGetPickupPeep(NetworkGetCurrentPlayerId()); if (peep != pickedPeep) return; // By assigning the peep to null before calling tool_cancel we can avoid // resetting the peep to the initial position. - network_set_pickup_peep(currentPlayerId, nullptr); - tool_cancel(); + NetworkSetPickupPeep(currentPlayerId, nullptr); + ToolCancel(); } diff --git a/src/openrct2/actions/PeepPickupAction.h b/src/openrct2/actions/PeepPickupAction.h index b8cc065d51..79a0631684 100644 --- a/src/openrct2/actions/PeepPickupAction.h +++ b/src/openrct2/actions/PeepPickupAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,13 +24,15 @@ class PeepPickupAction final : public GameActionBase { private: PeepPickupType _type{ PeepPickupType::Count }; - EntityId _spriteId{ EntityId::GetNull() }; + EntityId _entityId{ EntityId::GetNull() }; CoordsXYZ _loc; NetworkPlayerId_t _owner{ -1 }; public: PeepPickupAction() = default; - PeepPickupAction(PeepPickupType type, EntityId spriteId, const CoordsXYZ& loc, NetworkPlayerId_t owner); + PeepPickupAction(PeepPickupType type, EntityId entityId, const CoordsXYZ& loc, NetworkPlayerId_t owner); + + void AcceptParameters(GameActionParameterVisitor& visitor) override; uint16_t GetActionFlags() const override; diff --git a/src/openrct2/actions/PlacePeepSpawnAction.cpp b/src/openrct2/actions/PeepSpawnPlaceAction.cpp similarity index 89% rename from src/openrct2/actions/PlacePeepSpawnAction.cpp rename to src/openrct2/actions/PeepSpawnPlaceAction.cpp index a90b004e9c..061bdadaa8 100644 --- a/src/openrct2/actions/PlacePeepSpawnAction.cpp +++ b/src/openrct2/actions/PeepSpawnPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "PlacePeepSpawnAction.h" +#include "PeepSpawnPlaceAction.h" #include "../Cheats.h" #include "../OpenRCT2.h" @@ -18,24 +18,29 @@ #include "../world/Park.h" #include "../world/Surface.h" -PlacePeepSpawnAction::PlacePeepSpawnAction(const CoordsXYZD& location) +PeepSpawnPlaceAction::PeepSpawnPlaceAction(const CoordsXYZD& location) : _location(location) { } -uint16_t PlacePeepSpawnAction::GetActionFlags() const +void PeepSpawnPlaceAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_location); +} + +uint16_t PeepSpawnPlaceAction::GetActionFlags() const { return GameActionBase::GetActionFlags() | GameActions::Flags::EditorOnly | GameActions::Flags::AllowWhilePaused; } -void PlacePeepSpawnAction::Serialise(DataSerialiser& stream) +void PeepSpawnPlaceAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); stream << DS_TAG(_location.x) << DS_TAG(_location.y) << DS_TAG(_location.z) << DS_TAG(_location.direction); } -GameActions::Result PlacePeepSpawnAction::Query() const +GameActions::Result PeepSpawnPlaceAction::Query() const { if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !gCheatsSandboxMode) { @@ -78,7 +83,7 @@ GameActions::Result PlacePeepSpawnAction::Query() const return res; } -GameActions::Result PlacePeepSpawnAction::Execute() const +GameActions::Result PeepSpawnPlaceAction::Execute() const { auto res = GameActions::Result(); res.Expenditure = ExpenditureType::LandPurchase; diff --git a/src/openrct2/actions/PlacePeepSpawnAction.h b/src/openrct2/actions/PeepSpawnPlaceAction.h similarity index 71% rename from src/openrct2/actions/PlacePeepSpawnAction.h rename to src/openrct2/actions/PeepSpawnPlaceAction.h index fa73ffc7f1..3bbd6b6aae 100644 --- a/src/openrct2/actions/PlacePeepSpawnAction.h +++ b/src/openrct2/actions/PeepSpawnPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,14 +11,16 @@ #include "GameAction.h" -class PlacePeepSpawnAction final : public GameActionBase +class PeepSpawnPlaceAction final : public GameActionBase { private: CoordsXYZD _location; public: - PlacePeepSpawnAction() = default; - PlacePeepSpawnAction(const CoordsXYZD& location); + PeepSpawnPlaceAction() = default; + PeepSpawnPlaceAction(const CoordsXYZD& location); + + void AcceptParameters(GameActionParameterVisitor& visitor) override; uint16_t GetActionFlags() const override; diff --git a/src/openrct2/actions/PlayerKickAction.cpp b/src/openrct2/actions/PlayerKickAction.cpp index 357e47ff70..97e79505ad 100644 --- a/src/openrct2/actions/PlayerKickAction.cpp +++ b/src/openrct2/actions/PlayerKickAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,11 @@ PlayerKickAction::PlayerKickAction(NetworkPlayerId_t playerId) { } +void PlayerKickAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("playerId", _playerId); +} + uint16_t PlayerKickAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -29,10 +34,10 @@ void PlayerKickAction::Serialise(DataSerialiser& stream) } GameActions::Result PlayerKickAction::Query() const { - return network_kick_player(_playerId, false); + return NetworkKickPlayer(_playerId, false); } GameActions::Result PlayerKickAction::Execute() const { - return network_kick_player(_playerId, true); + return NetworkKickPlayer(_playerId, true); } diff --git a/src/openrct2/actions/PlayerKickAction.h b/src/openrct2/actions/PlayerKickAction.h index b4e96c9a38..6d843455cb 100644 --- a/src/openrct2/actions/PlayerKickAction.h +++ b/src/openrct2/actions/PlayerKickAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,8 @@ public: PlayerKickAction(NetworkPlayerId_t playerId); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/PlayerSetGroupAction.cpp b/src/openrct2/actions/PlayerSetGroupAction.cpp index 8e13120efe..2262199878 100644 --- a/src/openrct2/actions/PlayerSetGroupAction.cpp +++ b/src/openrct2/actions/PlayerSetGroupAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,6 +17,12 @@ PlayerSetGroupAction::PlayerSetGroupAction(NetworkPlayerId_t playerId, uint8_t g { } +void PlayerSetGroupAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("playerId", _playerId); + visitor.Visit("groupId", _groupId); +} + uint16_t PlayerSetGroupAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -30,10 +36,10 @@ void PlayerSetGroupAction::Serialise(DataSerialiser& stream) } GameActions::Result PlayerSetGroupAction::Query() const { - return network_set_player_group(GetPlayer(), _playerId, _groupId, false); + return NetworkSetPlayerGroup(GetPlayer(), _playerId, _groupId, false); } GameActions::Result PlayerSetGroupAction::Execute() const { - return network_set_player_group(GetPlayer(), _playerId, _groupId, true); + return NetworkSetPlayerGroup(GetPlayer(), _playerId, _groupId, true); } diff --git a/src/openrct2/actions/PlayerSetGroupAction.h b/src/openrct2/actions/PlayerSetGroupAction.h index 23bef33c2b..fb1ceb0163 100644 --- a/src/openrct2/actions/PlayerSetGroupAction.h +++ b/src/openrct2/actions/PlayerSetGroupAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,8 @@ public: PlayerSetGroupAction() = default; PlayerSetGroupAction(NetworkPlayerId_t playerId, uint8_t groupId); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/ResultWithMessage.h b/src/openrct2/actions/ResultWithMessage.h index 873d7439a5..93753119c1 100644 --- a/src/openrct2/actions/ResultWithMessage.h +++ b/src/openrct2/actions/ResultWithMessage.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,4 +16,9 @@ struct ResultWithMessage { bool Successful{}; StringId Message = STR_NONE; + + bool HasMessage() const + { + return Message != STR_NONE; + } }; diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index d5b434bf7f..0d70ab429b 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -84,7 +84,7 @@ GameActions::Result RideCreateAction::Query() const GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_INVALID_RIDE_TYPE); } - int32_t rideEntryIndex = ride_get_entry_index(_rideType, _subType); + int32_t rideEntryIndex = RideGetEntryIndex(_rideType, _subType); if (rideEntryIndex >= MAX_RIDE_OBJECTS) { return GameActions::Result( @@ -97,13 +97,13 @@ GameActions::Result RideCreateAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_NONE); } - rct_ride_entry* rideEntry = get_ride_entry(rideEntryIndex); + const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry == nullptr) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_NONE); } - vehicle_colour_preset_list* presetList = rideEntry->vehicle_preset_list; + const auto* presetList = rideEntry->vehicle_preset_list; if ((presetList->count > 0 && presetList->count != 255) && _colour2 >= presetList->count) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_NONE); @@ -117,17 +117,16 @@ GameActions::Result RideCreateAction::Query() const GameActions::Result RideCreateAction::Execute() const { - rct_ride_entry* rideEntry; auto res = GameActions::Result(); - int32_t rideEntryIndex = ride_get_entry_index(_rideType, _subType); + int32_t rideEntryIndex = RideGetEntryIndex(_rideType, _subType); auto rideIndex = GetNextFreeRideId(); - auto ride = GetOrAllocateRide(rideIndex); - rideEntry = get_ride_entry(rideEntryIndex); + auto ride = RideAllocateAtIndex(rideIndex); + const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry == nullptr) { - log_warning("Invalid request for ride %u", rideIndex); + LOG_WARNING("Invalid request for ride %u", rideIndex); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_UNKNOWN_OBJECT_TYPE); } @@ -237,12 +236,12 @@ GameActions::Result RideCreateAction::Execute() const if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_TOILET)) { - if (shop_item_has_common_price(ShopItem::Admission)) + if (ShopItemHasCommonPrice(ShopItem::Admission)) { - money32 price = ride_get_common_price(ride); - if (price != MONEY32_UNDEFINED) + auto price = RideGetCommonPrice(*ride); + if (price != MONEY64_UNDEFINED) { - ride->price[0] = static_cast(price); + ride->price[0] = price; } } } @@ -251,24 +250,24 @@ GameActions::Result RideCreateAction::Execute() const { if (rideEntry->shop_item[i] != ShopItem::None) { - if (shop_item_has_common_price(rideEntry->shop_item[i])) + if (ShopItemHasCommonPrice(rideEntry->shop_item[i])) { - money32 price = shop_item_get_common_price(ride, rideEntry->shop_item[i]); - if (price != MONEY32_UNDEFINED) + auto price = ShopItemGetCommonPrice(ride, rideEntry->shop_item[i]); + if (price != MONEY64_UNDEFINED) { - ride->price[i] = static_cast(price); + ride->price[i] = price; } } } } // Set the on-ride photo price, whether the ride has one or not (except shops). - if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY) && shop_item_has_common_price(ShopItem::Photo)) + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY) && ShopItemHasCommonPrice(ShopItem::Photo)) { - money32 price = shop_item_get_common_price(ride, ShopItem::Photo); - if (price != MONEY32_UNDEFINED) + auto price = ShopItemGetCommonPrice(ride, ShopItem::Photo); + if (price != MONEY64_UNDEFINED) { - ride->price[1] = static_cast(price); + ride->price[1] = price; } } } @@ -291,7 +290,7 @@ GameActions::Result RideCreateAction::Execute() const ride->music_tune_id = TUNE_ID_NULL; ride->breakdown_reason = 255; - ride->upkeep_cost = MONEY16_UNDEFINED; + ride->upkeep_cost = MONEY64_UNDEFINED; ride->reliability = RIDE_INITIAL_RELIABILITY; ride->unreliability_factor = 1; ride->inspection_interval = RIDE_INSPECTION_EVERY_30_MINUTES; @@ -318,8 +317,8 @@ GameActions::Result RideCreateAction::Execute() const ride->mode = ride->GetDefaultMode(); ride->MinCarsPerTrain = rideEntry->min_cars_in_train; ride->MaxCarsPerTrain = rideEntry->max_cars_in_train; - ride_set_vehicle_colours_to_random_preset(ride, _colour2); - window_invalidate_by_class(WindowClass::RideList); + RideSetVehicleColoursToRandomPreset(*ride, _colour2); + WindowInvalidateByClass(WindowClass::RideList); res.Expenditure = ExpenditureType::RideConstruction; res.SetData(RideId{ rideIndex }); diff --git a/src/openrct2/actions/RideCreateAction.h b/src/openrct2/actions/RideCreateAction.h index 6b11cd8df7..fe5a21f5f1 100644 --- a/src/openrct2/actions/RideCreateAction.h +++ b/src/openrct2/actions/RideCreateAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideDemolishAction.cpp b/src/openrct2/actions/RideDemolishAction.cpp index 0c5a2fe371..244c66a352 100644 --- a/src/openrct2/actions/RideDemolishAction.cpp +++ b/src/openrct2/actions/RideDemolishAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -57,10 +57,10 @@ void RideDemolishAction::Serialise(DataSerialiser& stream) GameActions::Result RideDemolishAction::Query() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DEMOLISH_RIDE, STR_NONE); } @@ -93,7 +93,7 @@ GameActions::Result RideDemolishAction::Query() const } result.ErrorTitle = STR_CANT_REFURBISH_RIDE; - result.Cost = GetRefurbishPrice(ride); + result.Cost = GetRefurbishPrice(*ride); } return result; @@ -101,44 +101,44 @@ GameActions::Result RideDemolishAction::Query() const GameActions::Result RideDemolishAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DEMOLISH_RIDE, STR_NONE); } switch (_modifyType) { case RIDE_MODIFY_DEMOLISH: - return DemolishRide(ride); + return DemolishRide(*ride); case RIDE_MODIFY_RENEW: - return RefurbishRide(ride); + return RefurbishRide(*ride); } return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DO_THIS, STR_NONE); } -GameActions::Result RideDemolishAction::DemolishRide(Ride* ride) const +GameActions::Result RideDemolishAction::DemolishRide(Ride& ride) const { - money32 refundPrice = DemolishTracks(); + money64 refundPrice = DemolishTracks(); - ride_clear_for_construction(ride); - ride->RemovePeeps(); - ride->StopGuestsQueuing(); + RideClearForConstruction(ride); + ride.RemovePeeps(); + ride.StopGuestsQueuing(); - ride->ValidateStations(); - ride_clear_leftover_entrances(ride); + ride.ValidateStations(); + RideClearLeftoverEntrances(ride); - const auto rideId = ride->id; + const auto rideId = ride.id; News::DisableNewsItems(News::ItemType::Ride, rideId.ToUnderlying()); - UnlinkAllBannersForRide(ride->id); + UnlinkAllBannersForRide(ride.id); - RideUse::GetHistory().RemoveValue(ride->id); + RideUse::GetHistory().RemoveValue(ride.id); for (auto peep : EntityList()) { - peep->RemoveRideFromMemory(ride->id); + peep->RemoveRideFromMemory(ride.id); } MarketingCancelCampaignsForRide(_rideIndex); @@ -147,20 +147,20 @@ GameActions::Result RideDemolishAction::DemolishRide(Ride* ride) const res.Expenditure = ExpenditureType::RideConstruction; res.Cost = refundPrice; - if (!ride->overall_view.IsNull()) + if (!ride.overall_view.IsNull()) { - auto xy = ride->overall_view.ToTileCentre(); + auto xy = ride.overall_view.ToTileCentre(); res.Position = { xy, TileElementHeight(xy) }; } - ride->Delete(); + ride.Delete(); gParkValue = GetContext()->GetGameState()->GetPark().CalculateParkValue(); // Close windows related to the demolished ride - window_close_by_number(WindowClass::RideConstruction, rideId.ToUnderlying()); - window_close_by_number(WindowClass::Ride, rideId.ToUnderlying()); - window_close_by_number(WindowClass::DemolishRidePrompt, rideId.ToUnderlying()); - window_close_by_class(WindowClass::NewCampaign); + WindowCloseByNumber(WindowClass::RideConstruction, rideId.ToUnderlying()); + WindowCloseByNumber(WindowClass::Ride, rideId.ToUnderlying()); + WindowCloseByNumber(WindowClass::DemolishRidePrompt, rideId.ToUnderlying()); + WindowCloseByClass(WindowClass::NewCampaign); // Refresh windows that display the ride name auto windowManager = OpenRCT2::GetContext()->GetUiContext()->GetWindowManager(); @@ -168,13 +168,13 @@ GameActions::Result RideDemolishAction::DemolishRide(Ride* ride) const windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_RIDE_LIST)); windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_GUEST_LIST)); - scrolling_text_invalidate(); - gfx_invalidate_screen(); + ScrollingTextInvalidate(); + GfxInvalidateScreen(); return res; } -money32 RideDemolishAction::MazeRemoveTrack(const CoordsXYZD& coords) const +money64 RideDemolishAction::MazeRemoveTrack(const CoordsXYZD& coords) const { auto setMazeTrack = MazeSetTrackAction(coords, false, _rideIndex, GC_SET_MAZE_TRACK_FILL); setMazeTrack.SetFlags(GetFlags()); @@ -185,12 +185,12 @@ money32 RideDemolishAction::MazeRemoveTrack(const CoordsXYZD& coords) const return execRes.Cost; } - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; } -money32 RideDemolishAction::DemolishTracks() const +money64 RideDemolishAction::DemolishTracks() const { - money32 refundPrice = 0; + money64 refundPrice = 0; uint8_t oldpaused = gGamePaused; gGamePaused = 0; @@ -247,8 +247,8 @@ money32 RideDemolishAction::DemolishTracks() const for (Direction dir : ALL_DIRECTIONS) { const CoordsXYZ off = { DirOffsets[dir], 0 }; - money32 removePrice = MazeRemoveTrack({ location + off, dir }); - if (removePrice != MONEY32_UNDEFINED) + money64 removePrice = MazeRemoveTrack({ location + off, dir }); + if (removePrice != MONEY64_UNDEFINED) { refundPrice += removePrice; } @@ -265,36 +265,36 @@ money32 RideDemolishAction::DemolishTracks() const return refundPrice; } -GameActions::Result RideDemolishAction::RefurbishRide(Ride* ride) const +GameActions::Result RideDemolishAction::RefurbishRide(Ride& ride) const { auto res = GameActions::Result(); res.Expenditure = ExpenditureType::RideConstruction; res.Cost = GetRefurbishPrice(ride); - ride->Renew(); + ride.Renew(); - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_EVER_BEEN_OPENED; - ride->last_crash_type = RIDE_CRASH_TYPE_NONE; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_EVER_BEEN_OPENED; + ride.last_crash_type = RIDE_CRASH_TYPE_NONE; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_CUSTOMER; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_CUSTOMER; - if (!ride->overall_view.IsNull()) + if (!ride.overall_view.IsNull()) { - auto location = ride->overall_view.ToTileCentre(); + auto location = ride.overall_view.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } - window_close_by_number(WindowClass::DemolishRidePrompt, _rideIndex.ToUnderlying()); + WindowCloseByNumber(WindowClass::DemolishRidePrompt, _rideIndex.ToUnderlying()); return res; } -money32 RideDemolishAction::GetRefurbishPrice(const Ride* ride) const +money64 RideDemolishAction::GetRefurbishPrice(const Ride& ride) const { return -GetRefundPrice(ride) / 2; } -money32 RideDemolishAction::GetRefundPrice(const Ride* ride) const +money64 RideDemolishAction::GetRefundPrice(const Ride& ride) const { - return ride_get_refund_price(ride); + return RideGetRefundPrice(ride); } diff --git a/src/openrct2/actions/RideDemolishAction.h b/src/openrct2/actions/RideDemolishAction.h index 6deff064ab..881e00439a 100644 --- a/src/openrct2/actions/RideDemolishAction.h +++ b/src/openrct2/actions/RideDemolishAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,10 +30,10 @@ public: GameActions::Result Execute() const override; private: - GameActions::Result DemolishRide(Ride* ride) const; - money32 MazeRemoveTrack(const CoordsXYZD& coords) const; - money32 DemolishTracks() const; - GameActions::Result RefurbishRide(Ride* ride) const; - money32 GetRefurbishPrice(const Ride* ride) const; - money32 GetRefundPrice(const Ride* ride) const; + GameActions::Result DemolishRide(Ride& ride) const; + money64 MazeRemoveTrack(const CoordsXYZD& coords) const; + money64 DemolishTracks() const; + GameActions::Result RefurbishRide(Ride& ride) const; + money64 GetRefurbishPrice(const Ride& ride) const; + money64 GetRefundPrice(const Ride& ride) const; }; diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp index fef741ca27..2df6f79e89 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -52,16 +52,16 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const const auto errorTitle = _isExit ? STR_CANT_BUILD_MOVE_EXIT_FOR_THIS_RIDE_ATTRACTION : STR_CANT_BUILD_MOVE_ENTRANCE_FOR_THIS_RIDE_ATTRACTION; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_NONE); } if (_stationNum.ToUnderlying() >= OpenRCT2::Limits::MaxStationsPerRide) { - log_warning("Invalid station number for ride. stationNum: %u", _stationNum.ToUnderlying()); + LOG_WARNING("Invalid station number for ride. stationNum: %u", _stationNum.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_NONE); } @@ -133,16 +133,16 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const // When in known station num mode rideIndex is known and z is unknown const auto errorTitle = _isExit ? STR_CANT_BUILD_MOVE_EXIT_FOR_THIS_RIDE_ATTRACTION : STR_CANT_BUILD_MOVE_ENTRANCE_FOR_THIS_RIDE_ATTRACTION; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_NONE); } if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); } diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.h b/src/openrct2/actions/RideEntranceExitPlaceAction.h index 9cbac0fc1d..e6958657a9 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.h +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideEntranceExitRemoveAction.cpp b/src/openrct2/actions/RideEntranceExitRemoveAction.cpp index 1825b59787..c5cc59c3d9 100644 --- a/src/openrct2/actions/RideEntranceExitRemoveAction.cpp +++ b/src/openrct2/actions/RideEntranceExitRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -66,10 +66,10 @@ static TileElement* FindEntranceElement( GameActions::Result RideEntranceExitRemoveAction::Query() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid ride id %u for entrance/exit removal", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride id %u for entrance/exit removal", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -98,7 +98,7 @@ GameActions::Result RideEntranceExitRemoveAction::Query() const } else if (entranceElement == nullptr) { - log_warning( + LOG_WARNING( "Track Element not found. x = %d, y = %d, ride = %u, station = %u", _loc.x, _loc.y, _rideIndex.ToUnderlying(), _stationNum.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); @@ -109,19 +109,19 @@ GameActions::Result RideEntranceExitRemoveAction::Query() const GameActions::Result RideEntranceExitRemoveAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid ride id %u for entrance/exit removal", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride id %u for entrance/exit removal", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } const bool isGhost = GetFlags() & GAME_COMMAND_FLAG_GHOST; if (!isGhost) { - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); - invalidate_test_results(ride); + InvalidateTestResults(*ride); } auto* entranceElement = FindEntranceElement( @@ -134,7 +134,7 @@ GameActions::Result RideEntranceExitRemoveAction::Execute() const } else if (entranceElement == nullptr) { - log_warning( + LOG_WARNING( "Track Element not found. x = %d, y = %d, ride = %u, station = %d", _loc.x, _loc.y, _rideIndex.ToUnderlying(), _stationNum); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); diff --git a/src/openrct2/actions/RideEntranceExitRemoveAction.h b/src/openrct2/actions/RideEntranceExitRemoveAction.h index 709d1a2691..f1ba21e9b3 100644 --- a/src/openrct2/actions/RideEntranceExitRemoveAction.h +++ b/src/openrct2/actions/RideEntranceExitRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideFreezeRatingAction.cpp b/src/openrct2/actions/RideFreezeRatingAction.cpp index c01c28284e..11b63f73b6 100644 --- a/src/openrct2/actions/RideFreezeRatingAction.cpp +++ b/src/openrct2/actions/RideFreezeRatingAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,13 @@ RideFreezeRatingAction::RideFreezeRatingAction(RideId rideIndex, RideRatingType { } +void RideFreezeRatingAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("ride", _rideIndex); + visitor.Visit("type", _type); + visitor.Visit("value", _value); +} + void RideFreezeRatingAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); @@ -24,16 +31,16 @@ void RideFreezeRatingAction::Serialise(DataSerialiser& stream) GameActions::Result RideFreezeRatingAction::Query() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } if (_value <= 0) { - log_warning("Rating value must be positive", _rideIndex.ToUnderlying()); + LOG_WARNING("Rating value must be positive", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -42,7 +49,7 @@ GameActions::Result RideFreezeRatingAction::Query() const GameActions::Result RideFreezeRatingAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); switch (_type) { @@ -59,7 +66,7 @@ GameActions::Result RideFreezeRatingAction::Execute() const ride->lifecycle_flags |= RIDE_LIFECYCLE_FIXED_RATINGS; - window_invalidate_by_number(WindowClass::Ride, _rideIndex.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); auto res = GameActions::Result(); return res; diff --git a/src/openrct2/actions/RideFreezeRatingAction.h b/src/openrct2/actions/RideFreezeRatingAction.h index bde58fa53b..ab5fe35492 100644 --- a/src/openrct2/actions/RideFreezeRatingAction.h +++ b/src/openrct2/actions/RideFreezeRatingAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,6 +29,8 @@ public: RideFreezeRatingAction() = default; RideFreezeRatingAction(RideId rideIndex, RideRatingType type, ride_rating value); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + void Serialise(DataSerialiser& stream) override; GameActions::Result Query() const override; GameActions::Result Execute() const override; diff --git a/src/openrct2/actions/RideSetAppearanceAction.cpp b/src/openrct2/actions/RideSetAppearanceAction.cpp index 4a0b9dc45d..63a4aefe28 100644 --- a/src/openrct2/actions/RideSetAppearanceAction.cpp +++ b/src/openrct2/actions/RideSetAppearanceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -50,10 +50,10 @@ void RideSetAppearanceAction::Serialise(DataSerialiser& stream) GameActions::Result RideSetAppearanceAction::Query() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -64,7 +64,7 @@ GameActions::Result RideSetAppearanceAction::Query() const case RideSetAppearanceType::TrackColourSupports: if (_index >= std::size(ride->track_colour)) { - log_warning("Invalid game command, index %d out of bounds", _index); + LOG_WARNING("Invalid game command, index %d out of bounds", _index); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } break; @@ -73,7 +73,7 @@ GameActions::Result RideSetAppearanceAction::Query() const case RideSetAppearanceType::VehicleColourTernary: if (_index >= std::size(ride->vehicle_colours)) { - log_warning("Invalid game command, index %d out of bounds", _index); + LOG_WARNING("Invalid game command, index %d out of bounds", _index); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } break; @@ -82,7 +82,7 @@ GameActions::Result RideSetAppearanceAction::Query() const case RideSetAppearanceType::SellingItemColourIsRandom: break; default: - log_warning("Invalid game command, type %d not recognised", _type); + LOG_WARNING("Invalid game command, type %d not recognised", _type); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -91,10 +91,10 @@ GameActions::Result RideSetAppearanceAction::Query() const GameActions::Result RideSetAppearanceAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -102,27 +102,27 @@ GameActions::Result RideSetAppearanceAction::Execute() const { case RideSetAppearanceType::TrackColourMain: ride->track_colour[_index].main = _value; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case RideSetAppearanceType::TrackColourAdditional: ride->track_colour[_index].additional = _value; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case RideSetAppearanceType::TrackColourSupports: ride->track_colour[_index].supports = _value; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case RideSetAppearanceType::VehicleColourBody: ride->vehicle_colours[_index].Body = _value; - ride_update_vehicle_colours(ride); + RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourTrim: ride->vehicle_colours[_index].Trim = _value; - ride_update_vehicle_colours(ride); + RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourTernary: ride->vehicle_colours[_index].Tertiary = _value; - ride_update_vehicle_colours(ride); + RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourScheme: ride->colour_scheme_type &= ~( @@ -132,17 +132,17 @@ GameActions::Result RideSetAppearanceAction::Execute() const { ride->vehicle_colours[i] = ride->vehicle_colours[0]; } - ride_update_vehicle_colours(ride); + RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::EntranceStyle: ride->entrance_style = _value; - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; case RideSetAppearanceType::SellingItemColourIsRandom: ride->SetLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS, static_cast(_value)); break; } - window_invalidate_by_number(WindowClass::Ride, _rideIndex.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); auto res = GameActions::Result(); if (!ride->overall_view.IsNull()) diff --git a/src/openrct2/actions/RideSetAppearanceAction.h b/src/openrct2/actions/RideSetAppearanceAction.h index 8b3eeb9182..eb7050d358 100644 --- a/src/openrct2/actions/RideSetAppearanceAction.h +++ b/src/openrct2/actions/RideSetAppearanceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideSetColourSchemeAction.cpp b/src/openrct2/actions/RideSetColourSchemeAction.cpp index dcf5548404..140cd4cb01 100644 --- a/src/openrct2/actions/RideSetColourSchemeAction.cpp +++ b/src/openrct2/actions/RideSetColourSchemeAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideSetColourSchemeAction.h b/src/openrct2/actions/RideSetColourSchemeAction.h index 639863ca9c..287a48cfe3 100644 --- a/src/openrct2/actions/RideSetColourSchemeAction.h +++ b/src/openrct2/actions/RideSetColourSchemeAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideSetNameAction.cpp b/src/openrct2/actions/RideSetNameAction.cpp index 6090e18a9d..9f7c6d37fd 100644 --- a/src/openrct2/actions/RideSetNameAction.cpp +++ b/src/openrct2/actions/RideSetNameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,10 +47,10 @@ void RideSetNameAction::Serialise(DataSerialiser& stream) GameActions::Result RideSetNameAction::Query() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_RIDE_ATTRACTION, STR_NONE); } @@ -65,10 +65,10 @@ GameActions::Result RideSetNameAction::Query() const GameActions::Result RideSetNameAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_RIDE_ATTRACTION, STR_NONE); } @@ -81,8 +81,8 @@ GameActions::Result RideSetNameAction::Execute() const ride->custom_name = _name; } - scrolling_text_invalidate(); - gfx_invalidate_screen(); + ScrollingTextInvalidate(); + GfxInvalidateScreen(); // Refresh windows that display ride name auto windowManager = OpenRCT2::GetContext()->GetUiContext()->GetWindowManager(); diff --git a/src/openrct2/actions/RideSetNameAction.h b/src/openrct2/actions/RideSetNameAction.h index 639c82a545..3d63651f8f 100644 --- a/src/openrct2/actions/RideSetNameAction.h +++ b/src/openrct2/actions/RideSetNameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideSetPriceAction.cpp b/src/openrct2/actions/RideSetPriceAction.cpp index ca36271e63..cf365e968c 100644 --- a/src/openrct2/actions/RideSetPriceAction.cpp +++ b/src/openrct2/actions/RideSetPriceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,7 +21,7 @@ #include "../ride/ShopItem.h" #include "../world/Park.h" -RideSetPriceAction::RideSetPriceAction(RideId rideIndex, money16 price, bool primaryPrice) +RideSetPriceAction::RideSetPriceAction(RideId rideIndex, money64 price, bool primaryPrice) : _rideIndex(rideIndex) , _price(price) , _primaryPrice(primaryPrice) @@ -51,17 +51,17 @@ GameActions::Result RideSetPriceAction::Query() const { GameActions::Result res = GameActions::Result(); - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -73,17 +73,17 @@ GameActions::Result RideSetPriceAction::Execute() const GameActions::Result res = GameActions::Result(); res.Expenditure = ExpenditureType::ParkRideTickets; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -105,15 +105,15 @@ GameActions::Result RideSetPriceAction::Execute() const if (shopItem == ShopItem::None) { ride->price[0] = _price; - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); return res; } } // Check same price in park flags - if (!shop_item_has_common_price(shopItem)) + if (!ShopItemHasCommonPrice(shopItem)) { ride->price[0] = _price; - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); return res; } } @@ -126,15 +126,15 @@ GameActions::Result RideSetPriceAction::Execute() const if ((ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) == 0) { ride->price[1] = _price; - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); return res; } } // Check same price in park flags - if (!shop_item_has_common_price(shopItem)) + if (!ShopItemHasCommonPrice(shopItem)) { ride->price[1] = _price; - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Ride); return res; } } @@ -150,7 +150,7 @@ void RideSetPriceAction::RideSetCommonPrice(ShopItem shopItem) const for (auto& ride : GetRideManager()) { auto invalidate = false; - auto rideEntry = get_ride_entry(ride.subtype); + auto rideEntry = GetRideEntryByIndex(ride.subtype); const auto& rtd = ride.GetRideTypeDescriptor(); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_TOILET) && shopItem == ShopItem::Admission) { @@ -183,7 +183,7 @@ void RideSetPriceAction::RideSetCommonPrice(ShopItem shopItem) const } if (invalidate) { - window_invalidate_by_number(WindowClass::Ride, ride.id.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); } } } diff --git a/src/openrct2/actions/RideSetPriceAction.h b/src/openrct2/actions/RideSetPriceAction.h index 662bce577e..bacc67e43a 100644 --- a/src/openrct2/actions/RideSetPriceAction.h +++ b/src/openrct2/actions/RideSetPriceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,12 +15,12 @@ class RideSetPriceAction final : public GameActionBase 250) { - log_warning("Invalid minimum waiting time: %u", _value); + LOG_WARNING("Invalid minimum waiting time: %u", _value); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; case RideSetSetting::MaxWaitingTime: if (_value > 250) { - log_warning("Invalid maximum waiting time: %u", _value); + LOG_WARNING("Invalid maximum waiting time: %u", _value); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; case RideSetSetting::Operation: - if (!ride_is_valid_operation_option(ride)) + if (!RideIsValidOperationOption(*ride)) { - log_warning("Invalid operation option value: %u", _value); + LOG_WARNING("Invalid operation option value: %u", _value); return GameActions::Result( - GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, GetOperationErrorMessage(ride)); + GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, GetOperationErrorMessage(*ride)); } break; case RideSetSetting::InspectionInterval: if (_value > RIDE_INSPECTION_NEVER) { - log_warning("Invalid inspection interval: %u", _value); + LOG_WARNING("Invalid inspection interval: %u", _value); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; @@ -109,15 +109,15 @@ GameActions::Result RideSetSettingAction::Query() const auto musicObj = objManager.GetLoadedObject(ObjectType::Music, _value); if (musicObj == nullptr) { - log_warning("Invalid music style: %u", _value); + LOG_WARNING("Invalid music style: %u", _value); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; } case RideSetSetting::LiftHillSpeed: - if (!ride_is_valid_lift_hill_speed(ride)) + if (!RideIsValidLiftHillSpeed(*ride)) { - log_warning("Invalid lift hill speed: %u", _value); + LOG_WARNING("Invalid lift hill speed: %u", _value); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; @@ -129,21 +129,21 @@ GameActions::Result RideSetSettingAction::Query() const STR_MULTICIRCUIT_NOT_POSSIBLE_WITH_CABLE_LIFT_HILL); } - if (!ride_is_valid_num_circuits()) + if (!RideIsValidNumCircuits()) { - log_warning("Invalid number of circuits: %u", _value); + LOG_WARNING("Invalid number of circuits: %u", _value); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; case RideSetSetting::RideType: if (!gCheatsAllowArbitraryRideTypeChanges) { - log_warning("Arbitrary ride type changes not allowed."); + LOG_WARNING("Arbitrary ride type changes not allowed."); return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } break; default: - log_warning("Invalid RideSetSetting: %u", static_cast(_setting)); + LOG_WARNING("Invalid RideSetSetting: %u", static_cast(_setting)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } @@ -152,18 +152,18 @@ GameActions::Result RideSetSettingAction::Query() const GameActions::Result RideSetSettingAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid ride: #%u.", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride: #%u.", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, STR_NONE); } switch (_setting) { case RideSetSetting::Mode: - invalidate_test_results(ride); - ride_clear_for_construction(ride); + InvalidateTestResults(*ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); ride->mode = static_cast(_value); @@ -182,7 +182,7 @@ GameActions::Result RideSetSettingAction::Execute() const ride->min_waiting_time = std::min(_value, ride->min_waiting_time); break; case RideSetSetting::Operation: - invalidate_test_results(ride); + InvalidateTestResults(*ride); ride->operation_option = _value; break; case RideSetSetting::InspectionInterval: @@ -212,21 +212,21 @@ GameActions::Result RideSetSettingAction::Execute() const if (_value != ride->lift_hill_speed) { ride->lift_hill_speed = _value; - invalidate_test_results(ride); + InvalidateTestResults(*ride); } break; case RideSetSetting::NumCircuits: if (_value != ride->num_circuits) { ride->num_circuits = _value; - invalidate_test_results(ride); + InvalidateTestResults(*ride); } break; case RideSetSetting::RideType: ride->type = _value; ride->UpdateRideTypeForAllPieces(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; } @@ -236,32 +236,32 @@ GameActions::Result RideSetSettingAction::Execute() const auto location = ride->overall_view.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } - window_invalidate_by_number(WindowClass::Ride, _rideIndex.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); return res; } -bool RideSetSettingAction::ride_is_mode_valid(Ride* ride) const +bool RideSetSettingAction::RideIsModeValid(const Ride& ride) const { - return ride->GetRideTypeDescriptor().RideModes & (1uLL << _value); + return ride.GetRideTypeDescriptor().RideModes & (1uLL << _value); } -bool RideSetSettingAction::ride_is_valid_lift_hill_speed(Ride* ride) const +bool RideSetSettingAction::RideIsValidLiftHillSpeed(const Ride& ride) const { - int32_t minSpeed = gCheatsUnlockOperatingLimits ? 0 : ride->GetRideTypeDescriptor().LiftData.minimum_speed; - int32_t maxSpeed = gCheatsUnlockOperatingLimits ? 255 : ride->GetRideTypeDescriptor().LiftData.maximum_speed; + int32_t minSpeed = gCheatsUnlockOperatingLimits ? 0 : ride.GetRideTypeDescriptor().LiftData.minimum_speed; + int32_t maxSpeed = gCheatsUnlockOperatingLimits ? 255 : ride.GetRideTypeDescriptor().LiftData.maximum_speed; return _value >= minSpeed && _value <= maxSpeed; } -bool RideSetSettingAction::ride_is_valid_num_circuits() const +bool RideSetSettingAction::RideIsValidNumCircuits() const { int32_t minNumCircuits = 1; int32_t maxNumCircuits = gCheatsUnlockOperatingLimits ? 255 : OpenRCT2::Limits::MaxCircuitsPerRide; return _value >= minNumCircuits && _value <= maxNumCircuits; } -bool RideSetSettingAction::ride_is_valid_operation_option(Ride* ride) const +bool RideSetSettingAction::RideIsValidOperationOption(const Ride& ride) const { - const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; + const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings; uint8_t minValue = operatingSettings.MinValue; uint8_t maxValue = operatingSettings.MaxValue; if (gCheatsUnlockOperatingLimits) @@ -273,9 +273,9 @@ bool RideSetSettingAction::ride_is_valid_operation_option(Ride* ride) const return _value >= minValue && _value <= maxValue; } -StringId RideSetSettingAction::GetOperationErrorMessage(Ride* ride) const +StringId RideSetSettingAction::GetOperationErrorMessage(const Ride& ride) const { - switch (ride->mode) + switch (ride.mode) { case RideMode::StationToStation: return STR_CANT_CHANGE_SPEED; @@ -290,7 +290,7 @@ StringId RideSetSettingAction::GetOperationErrorMessage(Ride* ride) const case RideMode::BackwardRotation: return STR_CANT_CHANGE_NUMBER_OF_ROTATIONS; default: - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) { return STR_CANT_CHANGE_THIS; } diff --git a/src/openrct2/actions/RideSetSettingAction.h b/src/openrct2/actions/RideSetSettingAction.h index 2be343a2c1..04a8c59c0f 100644 --- a/src/openrct2/actions/RideSetSettingAction.h +++ b/src/openrct2/actions/RideSetSettingAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -46,9 +46,9 @@ public: GameActions::Result Execute() const override; private: - bool ride_is_mode_valid(Ride* ride) const; - bool ride_is_valid_lift_hill_speed(Ride* ride) const; - bool ride_is_valid_num_circuits() const; - bool ride_is_valid_operation_option(Ride* ride) const; - StringId GetOperationErrorMessage(Ride* ride) const; + bool RideIsModeValid(const Ride& ride) const; + bool RideIsValidLiftHillSpeed(const Ride& ride) const; + bool RideIsValidNumCircuits() const; + bool RideIsValidOperationOption(const Ride& ride) const; + StringId GetOperationErrorMessage(const Ride& ride) const; }; diff --git a/src/openrct2/actions/RideSetStatusAction.cpp b/src/openrct2/actions/RideSetStatusAction.cpp index a71e22bc3a..95d9366123 100644 --- a/src/openrct2/actions/RideSetStatusAction.cpp +++ b/src/openrct2/actions/RideSetStatusAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -57,10 +57,10 @@ GameActions::Result RideSetStatusAction::Query() const { GameActions::Result res = GameActions::Result(); - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); res.Error = GameActions::Status::InvalidParameters; res.ErrorTitle = STR_RIDE_DESCRIPTION_UNKNOWN; res.ErrorMessage = STR_NONE; @@ -69,7 +69,7 @@ GameActions::Result RideSetStatusAction::Query() const if (_status >= RideStatus::Count) { - log_warning("Invalid ride status %u for ride %u", EnumValue(_status), _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride status %u for ride %u", EnumValue(_status), _rideIndex.ToUnderlying()); res.Error = GameActions::Status::InvalidParameters; res.ErrorTitle = STR_RIDE_DESCRIPTION_UNKNOWN; res.ErrorMessage = STR_NONE; @@ -90,25 +90,27 @@ GameActions::Result RideSetStatusAction::Query() const return res; } - if (_status == RideStatus::Testing || _status == RideStatus::Simulating) + ResultWithMessage modeSwitchResult = { true }; + switch (_status) { - const auto modeSwitchResult = ride->Test(_status, false); - if (!modeSwitchResult.Successful) - { - res.Error = GameActions::Status::Unknown; - res.ErrorMessage = modeSwitchResult.Message; - return res; - } + case RideStatus::Open: + modeSwitchResult = ride->Open(false); + break; + case RideStatus::Testing: + modeSwitchResult = ride->Test(false); + break; + case RideStatus::Simulating: + modeSwitchResult = ride->Simulate(false); + break; + default: + break; } - else if (_status == RideStatus::Open) + + if (!modeSwitchResult.Successful) { - const auto modeSwitchResult = ride->Open(false); - if (!modeSwitchResult.Successful) - { - res.Error = GameActions::Status::Unknown; - res.ErrorMessage = modeSwitchResult.Message; - return res; - } + res.Error = GameActions::Status::Unknown; + res.ErrorMessage = modeSwitchResult.Message; + return res; } } return GameActions::Result(); @@ -119,10 +121,10 @@ GameActions::Result RideSetStatusAction::Execute() const GameActions::Result res = GameActions::Result(); res.Expenditure = ExpenditureType::RideRunningCosts; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for ride %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command for ride %u", _rideIndex.ToUnderlying()); res.Error = GameActions::Status::InvalidParameters; res.ErrorTitle = STR_RIDE_DESCRIPTION_UNKNOWN; res.ErrorMessage = STR_NONE; @@ -148,7 +150,7 @@ GameActions::Result RideSetStatusAction::Execute() const if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) { ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED; - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); } } @@ -157,15 +159,15 @@ GameActions::Result RideSetStatusAction::Execute() const ride->lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; ride->race_winner = EntityId::GetNull(); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; - window_invalidate_by_number(WindowClass::Ride, _rideIndex.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); break; case RideStatus::Simulating: { ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED; - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); - const auto modeSwitchResult = ride->Test(_status, true); + const auto modeSwitchResult = ride->Simulate(true); if (!modeSwitchResult.Successful) { res.Error = GameActions::Status::Unknown; @@ -180,7 +182,7 @@ GameActions::Result RideSetStatusAction::Execute() const ride->last_issue_time = 0; ride->GetMeasurement(); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; - window_invalidate_by_number(WindowClass::Ride, _rideIndex.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); break; } case RideStatus::Testing: @@ -193,21 +195,21 @@ GameActions::Result RideSetStatusAction::Execute() const if (ride->status == RideStatus::Simulating) { - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); } // Fix #3183: Make sure we close the construction window so the ride finishes any editing code before opening // otherwise vehicles get added to the ride incorrectly (such as to a ghost station) - rct_window* constructionWindow = window_find_by_number(WindowClass::RideConstruction, _rideIndex.ToUnderlying()); + WindowBase* constructionWindow = WindowFindByNumber(WindowClass::RideConstruction, _rideIndex.ToUnderlying()); if (constructionWindow != nullptr) { - window_close(*constructionWindow); + WindowClose(*constructionWindow); } if (_status == RideStatus::Testing) { - const auto modeSwitchResult = ride->Test(_status, true); + const auto modeSwitchResult = ride->Test(true); if (!modeSwitchResult.Successful) { res.Error = GameActions::Status::Unknown; @@ -232,7 +234,7 @@ GameActions::Result RideSetStatusAction::Execute() const ride->last_issue_time = 0; ride->GetMeasurement(); ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; - window_invalidate_by_number(WindowClass::Ride, _rideIndex.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); break; } default: diff --git a/src/openrct2/actions/RideSetStatusAction.h b/src/openrct2/actions/RideSetStatusAction.h index 56924bdbef..bb0f317666 100644 --- a/src/openrct2/actions/RideSetStatusAction.h +++ b/src/openrct2/actions/RideSetStatusAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/RideSetVehicleAction.cpp b/src/openrct2/actions/RideSetVehicleAction.cpp index 1ed84e90c4..5aa0875270 100644 --- a/src/openrct2/actions/RideSetVehicleAction.cpp +++ b/src/openrct2/actions/RideSetVehicleAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -62,14 +62,14 @@ GameActions::Result RideSetVehicleAction::Query() const { if (_type >= RideSetVehicleType::Count) { - log_warning("Invalid type. type = %d", _type); + LOG_WARNING("Invalid type. type = %d", _type); } auto errTitle = SetVehicleTypeErrorTitle[EnumValue(_type)]; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } @@ -90,30 +90,30 @@ GameActions::Result RideSetVehicleAction::Query() const break; case RideSetVehicleType::RideEntry: { - if (!ride_is_vehicle_type_valid(ride)) + if (!RideIsVehicleTypeValid(*ride)) { - log_error("Invalid vehicle type. type = %d", _value); + LOG_ERROR("Invalid vehicle type. type = %d", _value); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } - auto rideEntry = get_ride_entry(_value); + auto rideEntry = GetRideEntryByIndex(_value); if (rideEntry == nullptr) { - log_warning("Invalid ride entry, ride->subtype = %d", ride->subtype); + LOG_WARNING("Invalid ride entry, ride->subtype = %d", ride->subtype); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } // Validate preset - vehicle_colour_preset_list* presetList = rideEntry->vehicle_preset_list; + VehicleColourPresetList* presetList = rideEntry->vehicle_preset_list; if (_colour >= presetList->count && _colour != 255 && _colour != 0) { - log_error("Unknown vehicle colour preset. colour = %d", _colour); + LOG_ERROR("Unknown vehicle colour preset. colour = %d", _colour); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } break; } default: - log_error("Unknown vehicle command. type = %d", _type); + LOG_ERROR("Unknown vehicle command. type = %d", _type); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } @@ -123,17 +123,17 @@ GameActions::Result RideSetVehicleAction::Query() const GameActions::Result RideSetVehicleAction::Execute() const { auto errTitle = SetVehicleTypeErrorTitle[EnumValue(_type)]; - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid game command, ride_id = %u", _rideIndex.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } switch (_type) { case RideSetVehicleType::NumTrains: - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); ride->vehicle_change_timeout = 100; @@ -141,15 +141,15 @@ GameActions::Result RideSetVehicleAction::Execute() const break; case RideSetVehicleType::NumCarsPerTrain: { - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); ride->vehicle_change_timeout = 100; - invalidate_test_results(ride); - auto rideEntry = get_ride_entry(ride->subtype); + InvalidateTestResults(*ride); + auto rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { - log_warning("Invalid ride entry, ride->subtype = %d", ride->subtype); + LOG_WARNING("Invalid ride entry, ride->subtype = %d", ride->subtype); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } uint8_t clampValue = _value; @@ -163,20 +163,20 @@ GameActions::Result RideSetVehicleAction::Execute() const } case RideSetVehicleType::RideEntry: { - ride_clear_for_construction(ride); + RideClearForConstruction(*ride); ride->RemovePeeps(); ride->vehicle_change_timeout = 100; - invalidate_test_results(ride); + InvalidateTestResults(*ride); ride->subtype = _value; - auto rideEntry = get_ride_entry(ride->subtype); + auto rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { - log_warning("Invalid ride entry, ride->subtype = %d", ride->subtype); + LOG_WARNING("Invalid ride entry, ride->subtype = %d", ride->subtype); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } - ride_set_vehicle_colours_to_random_preset(ride, _colour); + RideSetVehicleColoursToRandomPreset(*ride, _colour); if (!gCheatsDisableTrainLengthLimit) { ride->proposed_num_cars_per_train = std::clamp( @@ -186,7 +186,7 @@ GameActions::Result RideSetVehicleAction::Execute() const } default: - log_error("Unknown vehicle command. type = %d", _type); + LOG_ERROR("Unknown vehicle command. type = %d", _type); return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, STR_NONE); } @@ -201,32 +201,35 @@ GameActions::Result RideSetVehicleAction::Execute() const } auto intent = Intent(INTENT_ACTION_RIDE_PAINT_RESET_VEHICLE); - intent.putExtra(INTENT_EXTRA_RIDE_ID, _rideIndex.ToUnderlying()); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, _rideIndex.ToUnderlying()); ContextBroadcastIntent(&intent); - gfx_invalidate_screen(); + GfxInvalidateScreen(); return res; } -bool RideSetVehicleAction::ride_is_vehicle_type_valid(Ride* ride) const +bool RideSetVehicleAction::RideIsVehicleTypeValid(const Ride& ride) const { bool selectionShouldBeExpanded; int32_t rideTypeIterator, rideTypeIteratorMax; - if (gCheatsShowVehiclesFromOtherTrackTypes - && !( - ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) || ride->type == RIDE_TYPE_MAZE - || ride->type == RIDE_TYPE_MINI_GOLF)) { - selectionShouldBeExpanded = true; - rideTypeIterator = 0; - rideTypeIteratorMax = RIDE_TYPE_COUNT - 1; - } - else - { - selectionShouldBeExpanded = false; - rideTypeIterator = ride->type; - rideTypeIteratorMax = ride->type; + const auto& rtd = ride.GetRideTypeDescriptor(); + if (gCheatsShowVehiclesFromOtherTrackTypes + && !( + ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE) || rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE) + || ride.type == RIDE_TYPE_MINI_GOLF)) + { + selectionShouldBeExpanded = true; + rideTypeIterator = 0; + rideTypeIteratorMax = RIDE_TYPE_COUNT - 1; + } + else + { + selectionShouldBeExpanded = false; + rideTypeIterator = ride.type; + rideTypeIteratorMax = ride.type; + } } for (; rideTypeIterator <= rideTypeIteratorMax; rideTypeIterator++) @@ -235,7 +238,9 @@ bool RideSetVehicleAction::ride_is_vehicle_type_valid(Ride* ride) const { if (GetRideTypeDescriptor(rideTypeIterator).HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) continue; - if (rideTypeIterator == RIDE_TYPE_MAZE || rideTypeIterator == RIDE_TYPE_MINI_GOLF) + + const auto& rtd = GetRideTypeDescriptor(rideTypeIterator); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE) || rideTypeIterator == RIDE_TYPE_MINI_GOLF) continue; } @@ -245,7 +250,7 @@ bool RideSetVehicleAction::ride_is_vehicle_type_valid(Ride* ride) const { if (rideEntryIndex == _value) { - if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) { return false; } diff --git a/src/openrct2/actions/RideSetVehicleAction.h b/src/openrct2/actions/RideSetVehicleAction.h index 5442d378f8..dac2df252f 100644 --- a/src/openrct2/actions/RideSetVehicleAction.h +++ b/src/openrct2/actions/RideSetVehicleAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,7 @@ public: GameActions::Result Execute() const override; private: - bool ride_is_vehicle_type_valid(Ride* ride) const; + bool RideIsVehicleTypeValid(const Ride& ride) const; static_assert(sizeof(_value) >= sizeof(ObjectEntryIndex)); }; diff --git a/src/openrct2/actions/ScenarioSetSettingAction.cpp b/src/openrct2/actions/ScenarioSetSettingAction.cpp index 67da42831f..576061128b 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.cpp +++ b/src/openrct2/actions/ScenarioSetSettingAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,11 +26,17 @@ void ScenarioSetSettingAction::Serialise(DataSerialiser& stream) stream << DS_TAG(_setting) << DS_TAG(_value); } +void ScenarioSetSettingAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("setting", _setting); + visitor.Visit("value", _value); +} + GameActions::Result ScenarioSetSettingAction::Query() const { if (_setting >= ScenarioSetSetting::Count) { - log_error("Invalid setting: %u", _setting); + LOG_ERROR("Invalid setting: %u", _setting); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -64,33 +70,33 @@ GameActions::Result ScenarioSetSettingAction::Execute() const gParkFlags &= ~PARK_FLAGS_NO_MONEY; } // Invalidate all windows that have anything to do with finance - window_invalidate_by_class(WindowClass::Ride); - window_invalidate_by_class(WindowClass::Peep); - window_invalidate_by_class(WindowClass::ParkInformation); - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::BottomToolbar); - window_invalidate_by_class(WindowClass::TopToolbar); + WindowInvalidateByClass(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::Peep); + WindowInvalidateByClass(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::TopToolbar); } break; case ScenarioSetSetting::InitialCash: gInitialCash = std::clamp(_value, 0.00_GBP, 1000000.00_GBP); gCash = gInitialCash; - window_invalidate_by_class(WindowClass::Finances); - window_invalidate_by_class(WindowClass::BottomToolbar); + WindowInvalidateByClass(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::BottomToolbar); break; case ScenarioSetSetting::InitialLoan: gBankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); gMaxBankLoan = std::max(gBankLoan, gMaxBankLoan); - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); break; case ScenarioSetSetting::MaximumLoanSize: gMaxBankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); gBankLoan = std::min(gBankLoan, gMaxBankLoan); - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); break; case ScenarioSetSetting::AnnualInterestRate: gBankLoanInterestRate = std::clamp(_value, 0, MaxBankLoanInterestRate); - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); break; case ScenarioSetSetting::ForbidMarketingCampaigns: if (_value != 0) @@ -135,10 +141,10 @@ GameActions::Result ScenarioSetSettingAction::Execute() const } break; case ScenarioSetSetting::CostToBuyLand: - gLandPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); + gLandPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); break; case ScenarioSetSetting::CostToBuyConstructionRights: - gConstructionRightsPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); + gConstructionRightsPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); break; case ScenarioSetSetting::ParkChargeMethod: if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) @@ -179,13 +185,13 @@ GameActions::Result ScenarioSetSettingAction::Execute() const gParkFlags |= PARK_FLAGS_PARK_FREE_ENTRY; gParkFlags |= PARK_FLAGS_UNLOCK_ALL_PRICES; } - window_invalidate_by_class(WindowClass::ParkInformation); - window_invalidate_by_class(WindowClass::Ride); + WindowInvalidateByClass(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::Ride); } break; case ScenarioSetSetting::ParkChargeEntryFee: - gParkEntranceFee = std::clamp(_value, 0.00_GBP, MAX_ENTRANCE_FEE); - window_invalidate_by_class(WindowClass::ParkInformation); + gParkEntranceFee = std::clamp(_value, 0.00_GBP, MAX_ENTRANCE_FEE); + WindowInvalidateByClass(WindowClass::ParkInformation); break; case ScenarioSetSetting::ForbidTreeRemoval: if (_value != 0) @@ -240,10 +246,22 @@ GameActions::Result ScenarioSetSettingAction::Execute() const case ScenarioSetSetting::AllowEarlyCompletion: gAllowEarlyCompletionInNetworkPlay = _value; break; + case ScenarioSetSetting::UseRCT1Interest: + { + if (_value != 0) + { + gParkFlags |= PARK_FLAGS_RCT1_INTEREST; + } + else + { + gParkFlags &= ~PARK_FLAGS_RCT1_INTEREST; + } + break; + } default: - log_error("Invalid setting: %u", _setting); + LOG_ERROR("Invalid setting: %u", _setting); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } - window_invalidate_by_class(WindowClass::EditorScenarioOptions); + WindowInvalidateByClass(WindowClass::EditorScenarioOptions); return GameActions::Result(); } diff --git a/src/openrct2/actions/ScenarioSetSettingAction.h b/src/openrct2/actions/ScenarioSetSettingAction.h index 987b0e187a..f0b74cd4c0 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.h +++ b/src/openrct2/actions/ScenarioSetSettingAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,6 +35,7 @@ enum class ScenarioSetSetting : uint8_t ParkRatingHigherDifficultyLevel, GuestGenerationHigherDifficultyLevel, AllowEarlyCompletion, + UseRCT1Interest, Count }; @@ -52,6 +53,8 @@ public: { } + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; diff --git a/src/openrct2/actions/SignSetNameAction.cpp b/src/openrct2/actions/SignSetNameAction.cpp index 969e9cee88..37f3186570 100644 --- a/src/openrct2/actions/SignSetNameAction.cpp +++ b/src/openrct2/actions/SignSetNameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -48,7 +48,7 @@ GameActions::Result SignSetNameAction::Query() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_warning("Invalid game command for setting sign name, banner id = %d", _bannerIndex); + LOG_WARNING("Invalid game command for setting sign name, banner id = %d", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_SIGN, STR_NONE); } return GameActions::Result(); @@ -59,7 +59,7 @@ GameActions::Result SignSetNameAction::Execute() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_warning("Invalid game command for setting sign name, banner id = %d", _bannerIndex); + LOG_WARNING("Invalid game command for setting sign name, banner id = %d", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_SIGN, STR_NONE); } @@ -87,7 +87,7 @@ GameActions::Result SignSetNameAction::Execute() const } } - scrolling_text_invalidate(); - gfx_invalidate_screen(); + ScrollingTextInvalidate(); + GfxInvalidateScreen(); return GameActions::Result(); } diff --git a/src/openrct2/actions/SignSetNameAction.h b/src/openrct2/actions/SignSetNameAction.h index 3a8998f177..f3c3b71c52 100644 --- a/src/openrct2/actions/SignSetNameAction.h +++ b/src/openrct2/actions/SignSetNameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/SignSetStyleAction.cpp b/src/openrct2/actions/SignSetStyleAction.cpp index f35643b13a..e7bf058b40 100644 --- a/src/openrct2/actions/SignSetStyleAction.cpp +++ b/src/openrct2/actions/SignSetStyleAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,6 +26,14 @@ SignSetStyleAction::SignSetStyleAction(BannerIndex bannerIndex, uint8_t mainColo { } +void SignSetStyleAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("id", _bannerIndex); + visitor.Visit("mainColour", _mainColour); + visitor.Visit("textColour", _textColour); + visitor.Visit("isLarge", _isLarge); +} + uint16_t SignSetStyleAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -42,7 +50,7 @@ GameActions::Result SignSetStyleAction::Query() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_error("Invalid banner id. id = ", _bannerIndex); + LOG_ERROR("Invalid banner id. id = ", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -51,12 +59,12 @@ GameActions::Result SignSetStyleAction::Query() const TileElement* tileElement = BannerGetTileElement(_bannerIndex); if (tileElement == nullptr) { - log_warning("Invalid game command for setting sign style, banner id '%d' not found", _bannerIndex); + LOG_WARNING("Invalid game command for setting sign style, banner id '%d' not found", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (tileElement->GetType() != TileElementType::LargeScenery) { - log_warning("Invalid game command for setting sign style, banner id '%d' is not large", _bannerIndex); + LOG_WARNING("Invalid game command for setting sign style, banner id '%d' is not large", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } } @@ -66,7 +74,7 @@ GameActions::Result SignSetStyleAction::Query() const if (wallElement == nullptr) { - log_warning("Invalid game command for setting sign style, banner id '%d' not found", _bannerIndex); + LOG_WARNING("Invalid game command for setting sign style, banner id '%d' not found", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } } @@ -79,7 +87,7 @@ GameActions::Result SignSetStyleAction::Execute() const auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { - log_error("Invalid banner id. id = ", _bannerIndex); + LOG_ERROR("Invalid banner id. id = ", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -105,7 +113,7 @@ GameActions::Result SignSetStyleAction::Execute() const } auto intent = Intent(INTENT_ACTION_UPDATE_BANNER); - intent.putExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex); + intent.PutExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex); ContextBroadcastIntent(&intent); return GameActions::Result(); diff --git a/src/openrct2/actions/SignSetStyleAction.h b/src/openrct2/actions/SignSetStyleAction.h index 8ba51d3753..385dab13b9 100644 --- a/src/openrct2/actions/SignSetStyleAction.h +++ b/src/openrct2/actions/SignSetStyleAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,8 @@ public: SignSetStyleAction() = default; SignSetStyleAction(BannerIndex bannerIndex, uint8_t mainColour, uint8_t textColour, bool isLarge); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.cpp b/src/openrct2/actions/SmallSceneryPlaceAction.cpp index 371e246d66..fc41ed17f0 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.cpp +++ b/src/openrct2/actions/SmallSceneryPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,12 +17,14 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" +#include "../object/ObjectEntryManager.h" +#include "../object/SmallSceneryEntry.h" #include "../ride/Ride.h" #include "../ride/TrackDesign.h" #include "../world/ConstructionClearance.h" #include "../world/MapAnimation.h" #include "../world/Park.h" -#include "../world/SmallScenery.h" +#include "../world/Scenery.h" #include "../world/Surface.h" #include "../world/TileElement.h" #include "GameAction.h" @@ -111,7 +113,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); } - auto* sceneryEntry = GetSmallSceneryEntry(_sceneryType); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (sceneryEntry == nullptr) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); @@ -145,7 +147,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const // If on water if (waterHeight > 0) { - // base_height2 is now the water height + // BaseHeight2 is now the water height surfaceHeight = waterHeight; if (_loc.z == 0) { @@ -221,7 +223,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } int32_t zLow = targetHeight; - int32_t zHigh = zLow + ceil2(sceneryEntry->height, COORDS_Z_STEP); + int32_t zHigh = zLow + Ceil2(sceneryEntry->height, COORDS_Z_STEP); uint8_t collisionQuadrants = 0b1111; auto quadRotation{ 0 }; if (!(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE))) @@ -303,7 +305,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const res.Position.z = surfaceHeight; } - auto* sceneryEntry = GetSmallSceneryEntry(_sceneryType); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (sceneryEntry == nullptr) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); @@ -339,7 +341,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const // If on water if (waterHeight > 0) { - // base_height2 is now the water height + // BaseHeight2 is now the water height surfaceHeight = waterHeight; } auto targetHeight = _loc.z; @@ -358,7 +360,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const } int32_t zLow = targetHeight; - int32_t zHigh = zLow + ceil2(sceneryEntry->height, 8); + int32_t zHigh = zLow + Ceil2(sceneryEntry->height, 8); uint8_t collisionQuadrants = 0b1111; auto quadRotation{ 0 }; if (!(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE))) diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.h b/src/openrct2/actions/SmallSceneryPlaceAction.h index 94976dfed8..c7a1330dc4 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.h +++ b/src/openrct2/actions/SmallSceneryPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/SmallSceneryRemoveAction.cpp b/src/openrct2/actions/SmallSceneryRemoveAction.cpp index d6f8511625..be1de0c84c 100644 --- a/src/openrct2/actions/SmallSceneryRemoveAction.cpp +++ b/src/openrct2/actions/SmallSceneryRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,9 +17,10 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../management/Finance.h" +#include "../object/ObjectEntryManager.h" +#include "../object/SmallSceneryEntry.h" #include "../ride/Ride.h" #include "../world/Park.h" -#include "../world/SmallScenery.h" #include "../world/TileElementsView.h" #include "GameAction.h" #include "SmallSceneryPlaceAction.h" @@ -61,7 +62,7 @@ GameActions::Result SmallSceneryRemoveAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_LAND_NOT_OWNED_BY_PARK); } - auto* entry = GetSmallSceneryEntry(_sceneryType); + auto* entry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (entry == nullptr) { return GameActions::Result( @@ -110,7 +111,7 @@ GameActions::Result SmallSceneryRemoveAction::Execute() const { GameActions::Result res = GameActions::Result(); - auto* entry = GetSmallSceneryEntry(_sceneryType); + auto* entry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (entry == nullptr) { return GameActions::Result( diff --git a/src/openrct2/actions/SmallSceneryRemoveAction.h b/src/openrct2/actions/SmallSceneryRemoveAction.h index 380f748cd1..00be9c2196 100644 --- a/src/openrct2/actions/SmallSceneryRemoveAction.h +++ b/src/openrct2/actions/SmallSceneryRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/SmallScenerySetColourAction.cpp b/src/openrct2/actions/SmallScenerySetColourAction.cpp index c9ae6c08f2..bedc876de8 100644 --- a/src/openrct2/actions/SmallScenerySetColourAction.cpp +++ b/src/openrct2/actions/SmallScenerySetColourAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,7 +21,6 @@ #include "../ride/TrackDesign.h" #include "../world/MapAnimation.h" #include "../world/Park.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/TileElement.h" @@ -37,6 +36,16 @@ SmallScenerySetColourAction::SmallScenerySetColourAction( { } +void SmallScenerySetColourAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); + visitor.Visit("quadrant", _quadrant); + visitor.Visit("sceneryType", _sceneryType); + visitor.Visit("primaryColour", _primaryColour); + visitor.Visit("secondaryColour", _secondaryColour); + visitor.Visit("tertiaryColour", _tertiaryColour); +} + uint16_t SmallScenerySetColourAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -85,7 +94,7 @@ GameActions::Result SmallScenerySetColourAction::QueryExecute(bool isExecuting) if (sceneryElement == nullptr) { - log_error("Small scenery not found at: x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); + LOG_ERROR("Small scenery not found at: x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } diff --git a/src/openrct2/actions/SmallScenerySetColourAction.h b/src/openrct2/actions/SmallScenerySetColourAction.h index b723d58116..4c81e9d91b 100644 --- a/src/openrct2/actions/SmallScenerySetColourAction.h +++ b/src/openrct2/actions/SmallScenerySetColourAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,6 +27,8 @@ public: const CoordsXYZ& loc, uint8_t quadrant, ObjectEntryIndex sceneryType, uint8_t primaryColour, uint8_t secondaryColour, uint8_t tertiaryColour); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/StaffFireAction.cpp b/src/openrct2/actions/StaffFireAction.cpp index 7483bdffbe..2bc1623ac5 100644 --- a/src/openrct2/actions/StaffFireAction.cpp +++ b/src/openrct2/actions/StaffFireAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,14 +38,14 @@ GameActions::Result StaffFireAction::Query() const { if (_spriteId.ToUnderlying() >= MAX_ENTITIES || _spriteId.IsNull()) { - log_error("Invalid spriteId. spriteId = %u", _spriteId); + LOG_ERROR("Invalid spriteId. spriteId = %u", _spriteId); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } auto staff = TryGetEntity(_spriteId); if (staff == nullptr) { - log_error("Invalid spriteId. spriteId = %u", _spriteId); + LOG_ERROR("Invalid spriteId. spriteId = %u", _spriteId); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -57,12 +57,12 @@ GameActions::Result StaffFireAction::Execute() const auto staff = TryGetEntity(_spriteId); if (staff == nullptr) { - log_error("Invalid spriteId. spriteId = %u", _spriteId); + LOG_ERROR("Invalid spriteId. spriteId = %u", _spriteId); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } - window_close_by_class(WindowClass::FirePrompt); - peep_sprite_remove(staff); + WindowCloseByClass(WindowClass::FirePrompt); + PeepEntityRemove(staff); // Due to patrol areas best to invalidate the whole screen on removal of staff - gfx_invalidate_screen(); + GfxInvalidateScreen(); return GameActions::Result(); } diff --git a/src/openrct2/actions/StaffFireAction.h b/src/openrct2/actions/StaffFireAction.h index d076564db0..3d249842a0 100644 --- a/src/openrct2/actions/StaffFireAction.h +++ b/src/openrct2/actions/StaffFireAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index dfeddc6b05..10a979c03c 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,6 +26,8 @@ #include "../world/Entrance.h" #include "../world/Park.h" +#include + /* rct2: 0x009929FC */ static constexpr const PeepSpriteType spriteTypes[] = { PeepSpriteType::Handyman, @@ -81,7 +83,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const if (_staffType >= static_cast(StaffType::Count)) { // Invalid staff type. - log_error("Tried to use invalid staff type: %u", static_cast(_staffType)); + LOG_ERROR("Tried to use invalid staff type: %u", static_cast(_staffType)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE); } @@ -96,16 +98,16 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const if (static_cast(_entertainerType) >= static_cast(EntertainerCostume::Count)) { // Invalid entertainer costume - log_error("Tried to use invalid entertainer type: %u", static_cast(_entertainerType)); + LOG_ERROR("Tried to use invalid entertainer type: %u", static_cast(_entertainerType)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE); } - uint32_t availableCostumes = staff_get_available_entertainer_costumes(); + uint32_t availableCostumes = StaffGetAvailableEntertainerCostumes(); if (!(availableCostumes & (1 << static_cast(_entertainerType)))) { // Entertainer costume unavailable - log_error("Tried to use unavailable entertainer type: %u", static_cast(_entertainerType)); + LOG_ERROR("Tried to use unavailable entertainer type: %u", static_cast(_entertainerType)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_HIRE_NEW_STAFF, STR_NONE); } @@ -142,28 +144,23 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->StaffOrders = _staffOrders; // We search for the first available Id for a given staff type - uint32_t newStaffId = 0; - for (;;) + std::set usedStaffIds; + + for (auto searchPeep : EntityList()) { - bool found = false; - ++newStaffId; - for (auto searchPeep : EntityList()) - { - if (static_cast(searchPeep->AssignedStaffType) != _staffType) - continue; + if (static_cast(searchPeep->AssignedStaffType) != _staffType) + continue; - if (searchPeep->Id == newStaffId) - { - found = true; - break; - } - } - - if (!found) - break; + usedStaffIds.insert(searchPeep->PeepId); } - newPeep->Id = newStaffId; + uint32_t newStaffId = 1; + while (usedStaffIds.find(newStaffId) != usedStaffIds.end()) + { + newStaffId++; + } + + newPeep->PeepId = newStaffId; newPeep->AssignedStaffType = static_cast(_staffType); PeepSpriteType spriteType = spriteTypes[_staffType]; @@ -174,7 +171,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->Name = nullptr; newPeep->SpriteType = spriteType; - const rct_sprite_bounds* spriteBounds = &GetSpriteBounds(spriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(spriteType); newPeep->sprite_width = spriteBounds->sprite_width; newPeep->sprite_height_negative = spriteBounds->sprite_height_negative; newPeep->sprite_height_positive = spriteBounds->sprite_height_positive; @@ -199,7 +196,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->PathfindGoal.z = 0xFF; newPeep->PathfindGoal.direction = INVALID_DIRECTION; - uint8_t colour = staff_get_colour(static_cast(_staffType)); + uint8_t colour = StaffGetColour(static_cast(_staffType)); newPeep->TshirtColour = colour; newPeep->TrousersColour = colour; @@ -210,7 +207,7 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->PatrolInfo = nullptr; - res.SetData(StaffHireNewActionResult{ newPeep->sprite_index }); + res.SetData(StaffHireNewActionResult{ newPeep->Id }); } return res; @@ -242,7 +239,7 @@ void StaffHireNewAction::AutoPositionNewStaff(Peep* newPeep) const if (count > 0) { // Place staff at a random guest - uint32_t rand = scenario_rand_max(count); + uint32_t rand = ScenarioRandMax(count); Guest* chosenGuest = nullptr; for (auto guest : EntityList()) @@ -278,7 +275,7 @@ void StaffHireNewAction::AutoPositionNewStaff(Peep* newPeep) const // No walking guests; pick random park entrance if (!gParkEntrances.empty()) { - auto rand = scenario_rand_max(static_cast(gParkEntrances.size())); + auto rand = ScenarioRandMax(static_cast(gParkEntrances.size())); const auto& entrance = gParkEntrances[rand]; auto dir = entrance.direction; newLocation = entrance; diff --git a/src/openrct2/actions/StaffHireNewAction.h b/src/openrct2/actions/StaffHireNewAction.h index 5cd9ba61f6..e7b1ab7617 100644 --- a/src/openrct2/actions/StaffHireNewAction.h +++ b/src/openrct2/actions/StaffHireNewAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/StaffSetColourAction.cpp b/src/openrct2/actions/StaffSetColourAction.cpp index 7004b5f1c9..7c4f136059 100644 --- a/src/openrct2/actions/StaffSetColourAction.cpp +++ b/src/openrct2/actions/StaffSetColourAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,6 +25,12 @@ StaffSetColourAction::StaffSetColourAction(StaffType staffType, uint8_t colour) { } +void StaffSetColourAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("staffType", _staffType); + visitor.Visit("colour", _colour); +} + uint16_t StaffSetColourAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -49,7 +55,7 @@ GameActions::Result StaffSetColourAction::Query() const GameActions::Result StaffSetColourAction::Execute() const { // Update global uniform colour property - if (!staff_set_colour(static_cast(_staffType), _colour)) + if (!StaffSetColour(static_cast(_staffType), _colour)) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -64,6 +70,6 @@ GameActions::Result StaffSetColourAction::Execute() const } } - gfx_invalidate_screen(); + GfxInvalidateScreen(); return GameActions::Result(); } diff --git a/src/openrct2/actions/StaffSetColourAction.h b/src/openrct2/actions/StaffSetColourAction.h index 96db9a276b..caff23e0d0 100644 --- a/src/openrct2/actions/StaffSetColourAction.h +++ b/src/openrct2/actions/StaffSetColourAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,8 @@ public: StaffSetColourAction() = default; StaffSetColourAction(StaffType staffType, uint8_t colour); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/StaffSetCostumeAction.cpp b/src/openrct2/actions/StaffSetCostumeAction.cpp index 779e665331..4e9b213f40 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.cpp +++ b/src/openrct2/actions/StaffSetCostumeAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,6 +42,12 @@ StaffSetCostumeAction::StaffSetCostumeAction(EntityId spriteIndex, EntertainerCo { } +void StaffSetCostumeAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("id", _spriteIndex); + visitor.Visit("costume", _costume); +} + uint16_t StaffSetCostumeAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -64,14 +70,14 @@ GameActions::Result StaffSetCostumeAction::Query() const auto* staff = TryGetEntity(_spriteIndex); if (staff == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } auto spriteType = EntertainerCostumeToSprite(_costume); if (EnumValue(spriteType) > std::size(peep_slow_walking_types)) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } return GameActions::Result(); @@ -82,7 +88,7 @@ GameActions::Result StaffSetCostumeAction::Execute() const auto* staff = TryGetEntity(_spriteIndex); if (staff == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -97,7 +103,7 @@ GameActions::Result StaffSetCostumeAction::Execute() const staff->UpdateCurrentActionSpriteType(); staff->Invalidate(); - window_invalidate_by_number(WindowClass::Peep, _spriteIndex); + WindowInvalidateByNumber(WindowClass::Peep, _spriteIndex); auto intent = Intent(INTENT_ACTION_REFRESH_STAFF_LIST); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/actions/StaffSetCostumeAction.h b/src/openrct2/actions/StaffSetCostumeAction.h index c445ffced6..fdbe4e156b 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.h +++ b/src/openrct2/actions/StaffSetCostumeAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,8 @@ public: StaffSetCostumeAction() = default; StaffSetCostumeAction(EntityId spriteIndex, EntertainerCostume costume); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/StaffSetNameAction.cpp b/src/openrct2/actions/StaffSetNameAction.cpp index b5b99cff63..92a520ad88 100644 --- a/src/openrct2/actions/StaffSetNameAction.cpp +++ b/src/openrct2/actions/StaffSetNameAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,6 +27,12 @@ StaffSetNameAction::StaffSetNameAction(EntityId spriteIndex, const std::string& { } +void StaffSetNameAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("id", _spriteIndex); + visitor.Visit("name", _name); +} + uint16_t StaffSetNameAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -49,7 +55,7 @@ GameActions::Result StaffSetNameAction::Query() const auto staff = TryGetEntity(_spriteIndex); if (staff == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE); } @@ -61,7 +67,7 @@ GameActions::Result StaffSetNameAction::Execute() const auto staff = TryGetEntity(_spriteIndex); if (staff == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_STAFF_ERROR_CANT_NAME_STAFF_MEMBER, STR_NONE); } @@ -76,7 +82,7 @@ GameActions::Result StaffSetNameAction::Execute() const return GameActions::Result(GameActions::Status::Unknown, STR_CANT_NAME_GUEST, STR_NONE); } - gfx_invalidate_screen(); + GfxInvalidateScreen(); auto intent = Intent(INTENT_ACTION_REFRESH_STAFF_LIST); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/actions/StaffSetNameAction.h b/src/openrct2/actions/StaffSetNameAction.h index 0c53451003..d3a9ffd257 100644 --- a/src/openrct2/actions/StaffSetNameAction.h +++ b/src/openrct2/actions/StaffSetNameAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,8 @@ public: StaffSetNameAction() = default; StaffSetNameAction(EntityId spriteIndex, const std::string& name); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; GameActions::Result Query() const override; diff --git a/src/openrct2/actions/StaffSetOrdersAction.cpp b/src/openrct2/actions/StaffSetOrdersAction.cpp index d8d4fbd425..e6e8e794d8 100644 --- a/src/openrct2/actions/StaffSetOrdersAction.cpp +++ b/src/openrct2/actions/StaffSetOrdersAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,12 @@ StaffSetOrdersAction::StaffSetOrdersAction(EntityId spriteIndex, uint8_t ordersI { } +void StaffSetOrdersAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit("id", _spriteIndex); + visitor.Visit("staffOrders", _ordersId); +} + uint16_t StaffSetOrdersAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -46,7 +52,7 @@ GameActions::Result StaffSetOrdersAction::Query() const if (staff == nullptr || (staff->AssignedStaffType != StaffType::Handyman && staff->AssignedStaffType != StaffType::Mechanic)) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -58,12 +64,12 @@ GameActions::Result StaffSetOrdersAction::Execute() const auto* staff = TryGetEntity(_spriteIndex); if (staff == nullptr) { - log_warning("Invalid game command for sprite %u", _spriteIndex); + LOG_WARNING("Invalid game command for sprite %u", _spriteIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } staff->StaffOrders = _ordersId; - window_invalidate_by_number(WindowClass::Peep, _spriteIndex); + WindowInvalidateByNumber(WindowClass::Peep, _spriteIndex); auto intent = Intent(INTENT_ACTION_REFRESH_STAFF_LIST); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/actions/StaffSetOrdersAction.h b/src/openrct2/actions/StaffSetOrdersAction.h index 9fc0e66a42..385d154463 100644 --- a/src/openrct2/actions/StaffSetOrdersAction.h +++ b/src/openrct2/actions/StaffSetOrdersAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,8 @@ public: StaffSetOrdersAction() = default; StaffSetOrdersAction(EntityId spriteIndex, uint8_t ordersId); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/StaffSetPatrolAreaAction.cpp b/src/openrct2/actions/StaffSetPatrolAreaAction.cpp index a764583be2..0a518e9f33 100644 --- a/src/openrct2/actions/StaffSetPatrolAreaAction.cpp +++ b/src/openrct2/actions/StaffSetPatrolAreaAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,7 +60,7 @@ GameActions::Result StaffSetPatrolAreaAction::QueryExecute(bool executing) const auto staff = TryGetEntity(_spriteId); if (staff == nullptr) { - log_error("Invalid entity ID: %u", _spriteId.ToUnderlying()); + LOG_ERROR("Invalid entity ID: %u", _spriteId.ToUnderlying()); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -94,7 +94,7 @@ GameActions::Result StaffSetPatrolAreaAction::QueryExecute(bool executing) const break; case StaffSetPatrolAreaMode::ClearAll: staff->ClearPatrolArea(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); break; } UpdateConsolidatedPatrolAreas(); diff --git a/src/openrct2/actions/StaffSetPatrolAreaAction.h b/src/openrct2/actions/StaffSetPatrolAreaAction.h index 1430882bc4..22e2770a57 100644 --- a/src/openrct2/actions/StaffSetPatrolAreaAction.h +++ b/src/openrct2/actions/StaffSetPatrolAreaAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/SurfaceSetStyleAction.cpp b/src/openrct2/actions/SurfaceSetStyleAction.cpp index b40081c95a..47e67d0a31 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.cpp +++ b/src/openrct2/actions/SurfaceSetStyleAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,6 +26,13 @@ SurfaceSetStyleAction::SurfaceSetStyleAction(MapRange range, ObjectEntryIndex su { } +void SurfaceSetStyleAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_range); + visitor.Visit("surfaceStyle", _surfaceStyle); + visitor.Visit("edgeStyle", _edgeStyle); +} + void SurfaceSetStyleAction::Serialise(DataSerialiser& stream) { GameAction::Serialise(stream); @@ -45,7 +52,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const { if (_surfaceStyle > 0x1F) { - log_error("Invalid surface style."); + LOG_ERROR("Invalid surface style."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); } @@ -54,7 +61,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (surfaceObj == nullptr) { - log_error("Invalid surface style."); + LOG_ERROR("Invalid surface style."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); } } @@ -63,7 +70,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const { if (_edgeStyle > 0xF) { - log_error("Invalid edge style."); + LOG_ERROR("Invalid edge style."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); } @@ -71,7 +78,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (edgeObj == nullptr) { - log_error("Invalid edge style."); + LOG_ERROR("Invalid edge style."); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); } } @@ -92,8 +99,8 @@ GameActions::Result SurfaceSetStyleAction::Query() const GameActions::Status::Disallowed, STR_CANT_CHANGE_LAND_TYPE, STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY); } - money32 surfaceCost = 0; - money32 edgeCost = 0; + money64 surfaceCost = 0; + money64 edgeCost = 0; for (CoordsXY coords = { validRange.GetLeft(), validRange.GetTop() }; coords.x <= validRange.GetRight(); coords.x += COORDS_XY_STEP) { @@ -160,8 +167,8 @@ GameActions::Result SurfaceSetStyleAction::Execute() const res.Position.y = yMid; res.Position.z = heightMid; - money32 surfaceCost = 0; - money32 edgeCost = 0; + money64 surfaceCost = 0; + money64 edgeCost = 0; for (CoordsXY coords = { validRange.GetLeft(), validRange.GetTop() }; coords.x <= validRange.GetRight(); coords.x += COORDS_XY_STEP) { diff --git a/src/openrct2/actions/SurfaceSetStyleAction.h b/src/openrct2/actions/SurfaceSetStyleAction.h index 6325e34776..3fd67b72ed 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.h +++ b/src/openrct2/actions/SurfaceSetStyleAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,8 @@ public: SurfaceSetStyleAction() = default; SurfaceSetStyleAction(MapRange range, ObjectEntryIndex surfaceStyle, ObjectEntryIndex edgeStyle); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + void Serialise(DataSerialiser& stream) override; GameActions::Result Query() const override; GameActions::Result Execute() const override; diff --git a/src/openrct2/actions/TileModifyAction.cpp b/src/openrct2/actions/TileModifyAction.cpp index ba2a8a0cac..72bf7d7acb 100644 --- a/src/openrct2/actions/TileModifyAction.cpp +++ b/src/openrct2/actions/TileModifyAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,14 @@ TileModifyAction::TileModifyAction( { } +void TileModifyAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); + visitor.Visit("setting", _setting); + visitor.Visit("value1", _value1); + visitor.Visit("value2", _value2); +} + uint16_t TileModifyAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -120,6 +128,13 @@ GameActions::Result TileModifyAction::QueryExecute(bool isExecuting) const res = TileInspector::PathSetSloped(_loc, elementIndex, sloped, isExecuting); break; } + case TileModifyType::PathSetJunctionRailings: + { + const auto elementIndex = _value1; + const bool hasJunctionRailing = _value2; + res = TileInspector::PathSetJunctionRailings(_loc, elementIndex, hasJunctionRailing, isExecuting); + break; + } case TileModifyType::PathSetBroken: { const auto elementIndex = _value1; @@ -175,11 +190,11 @@ GameActions::Result TileModifyAction::QueryExecute(bool isExecuting) const res = TileInspector::TrackSetChain(_loc, elementIndex, false, setChain, isExecuting); break; } - case TileModifyType::TrackSetBlockBrake: + case TileModifyType::TrackSetBrake: { const auto elementIndex = _value1; - const bool blockBrake = _value2; - res = TileInspector::TrackSetBlockBrake(_loc, elementIndex, blockBrake, isExecuting); + const bool isClosed = _value2; + res = TileInspector::TrackSetBrakeClosed(_loc, elementIndex, isClosed, isExecuting); break; } case TileModifyType::TrackSetIndestructible: @@ -211,7 +226,7 @@ GameActions::Result TileModifyAction::QueryExecute(bool isExecuting) const break; } default: - log_error("invalid instruction"); + LOG_ERROR("invalid instruction"); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } diff --git a/src/openrct2/actions/TileModifyAction.h b/src/openrct2/actions/TileModifyAction.h index eec1eb2cf1..c4c218fc76 100644 --- a/src/openrct2/actions/TileModifyAction.h +++ b/src/openrct2/actions/TileModifyAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,13 +26,14 @@ enum class TileModifyType : uint8_t PathSetSlope, PathSetBroken, PathToggleEdge, + PathSetJunctionRailings, EntranceMakeUsable, WallSetSlope, WallSetAnimationFrame, TrackBaseHeightOffset, TrackSetChain, TrackSetChainBlock, - TrackSetBlockBrake, + TrackSetBrake, TrackSetIndestructible, ScenerySetQuarterLocation, ScenerySetQuarterCollision, @@ -54,6 +55,8 @@ public: TileModifyAction( CoordsXY loc, TileModifyType setting, uint32_t value1 = 0, uint32_t value2 = 0, TileElement pasteElement = {}); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/TrackDesignAction.cpp b/src/openrct2/actions/TrackDesignAction.cpp index d21711929b..b79f14ede3 100644 --- a/src/openrct2/actions/TrackDesignAction.cpp +++ b/src/openrct2/actions/TrackDesignAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -68,7 +68,7 @@ GameActions::Result TrackDesignAction::Query() const { // Force a fallback if the entry is not invented yet a td6 of it is selected, // which can happen in select-by-track-type mode - if (!ride_entry_is_invented(entryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(entryIndex) && !gCheatsIgnoreResearchStatus) { entryIndex = OBJECT_ENTRY_INDEX_NULL; } @@ -84,10 +84,10 @@ GameActions::Result TrackDesignAction::Query() const } const auto rideIndex = r.GetData(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for track placement, ride id = %d", rideIndex); + LOG_WARNING("Invalid game command for track placement, ride id = %d", rideIndex); return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } @@ -99,11 +99,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(const_cast(&_td), flags, placeScenery, *ride, _loc); if (_trackDesignPlaceStateSceneryUnavailable) { placeScenery = false; - queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, ride, _loc); + queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); } auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); @@ -140,7 +140,7 @@ GameActions::Result TrackDesignAction::Execute() const { // Force a fallback if the entry is not invented yet a track design using it is selected. // This can happen on rides with multiple vehicles where some have been invented and some haven’t. - if (!ride_entry_is_invented(entryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(entryIndex) && !gCheatsIgnoreResearchStatus) { entryIndex = OBJECT_ENTRY_INDEX_NULL; } @@ -156,10 +156,10 @@ GameActions::Result TrackDesignAction::Execute() const } const auto rideIndex = r.GetData(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { - log_warning("Invalid game command for track placement, ride id = %d", rideIndex); + LOG_WARNING("Invalid game command for track placement, ride id = %d", rideIndex); return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } @@ -172,11 +172,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(const_cast(&_td), flags, placeScenery, *ride, _loc); if (_trackDesignPlaceStateSceneryUnavailable) { placeScenery = false; - queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, ride, _loc); + queryRes = TrackDesignPlace(const_cast(&_td), flags, placeScenery, *ride, _loc); } if (queryRes.Error != GameActions::Status::Ok) @@ -196,7 +196,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(const_cast(&_td), flags, placeScenery, *ride, _loc); if (execRes.Error != GameActions::Status::Ok) { auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); @@ -213,12 +213,12 @@ GameActions::Result TrackDesignAction::Execute() const if (entryIndex != OBJECT_ENTRY_INDEX_NULL) { - auto colour = ride_get_unused_preset_vehicle_colour(entryIndex); + auto colour = RideGetUnusedPresetVehicleColour(entryIndex); auto rideSetVehicleAction = RideSetVehicleAction(ride->id, RideSetVehicleType::RideEntry, entryIndex, colour); GameActions::ExecuteNested(&rideSetVehicleAction); } - set_operating_setting_nested(ride->id, RideSetSetting::Mode, static_cast(_td.ride_mode), GAME_COMMAND_FLAG_APPLY); + 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); GameActions::ExecuteNested(&rideSetVehicleAction2); @@ -226,18 +226,18 @@ GameActions::Result TrackDesignAction::Execute() const ride->id, RideSetVehicleType::NumCarsPerTrain, _td.number_of_cars_per_train); GameActions::ExecuteNested(&rideSetVehicleAction3); - set_operating_setting_nested(ride->id, RideSetSetting::Departure, _td.depart_flags, GAME_COMMAND_FLAG_APPLY); - set_operating_setting_nested(ride->id, RideSetSetting::MinWaitingTime, _td.min_waiting_time, GAME_COMMAND_FLAG_APPLY); - set_operating_setting_nested(ride->id, RideSetSetting::MaxWaitingTime, _td.max_waiting_time, GAME_COMMAND_FLAG_APPLY); - set_operating_setting_nested(ride->id, RideSetSetting::Operation, _td.operation_setting, GAME_COMMAND_FLAG_APPLY); - set_operating_setting_nested(ride->id, RideSetSetting::LiftHillSpeed, _td.lift_hill_speed & 0x1F, GAME_COMMAND_FLAG_APPLY); + 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); uint8_t num_circuits = _td.num_circuits; if (num_circuits == 0) { num_circuits = 1; } - set_operating_setting_nested(ride->id, RideSetSetting::NumCircuits, num_circuits, GAME_COMMAND_FLAG_APPLY); + SetOperatingSettingNested(ride->id, RideSetSetting::NumCircuits, num_circuits, GAME_COMMAND_FLAG_APPLY); ride->SetToDefaultInspectionInterval(); ride->lifecycle_flags |= RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN; ride->colour_scheme_type = _td.colour_scheme; diff --git a/src/openrct2/actions/TrackDesignAction.h b/src/openrct2/actions/TrackDesignAction.h index 99922e070b..2d05a9636c 100644 --- a/src/openrct2/actions/TrackDesignAction.h +++ b/src/openrct2/actions/TrackDesignAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index 5697e2d90e..df2715671c 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -67,24 +67,24 @@ void TrackPlaceAction::Serialise(DataSerialiser& stream) GameActions::Result TrackPlaceAction::Query() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid ride for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { - log_warning("Invalid ride subtype for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride subtype for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } if (!DirectionValid(_origin.direction)) { - log_warning("Invalid direction for track placement, direction = %d", _origin.direction); + LOG_WARNING("Invalid direction for track placement, direction = %d", _origin.direction); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } @@ -97,7 +97,7 @@ GameActions::Result TrackPlaceAction::Query() const if (_rideType > RIDE_TYPE_COUNT) { - log_warning("Invalid ride type for track placement, rideType = %d", _rideType); + LOG_WARNING("Invalid ride type for track placement, rideType = %d", _rideType); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } @@ -120,7 +120,7 @@ GameActions::Result TrackPlaceAction::Query() const if (!(GetActionFlags() & GameActions::Flags::AllowWhilePaused)) { - if (game_is_paused() && !gCheatsBuildInPauseMode) + if (GameIsPaused() && !gCheatsBuildInPauseMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -163,7 +163,7 @@ GameActions::Result TrackPlaceAction::Query() const } const auto& ted = GetTrackElementDescriptor(_trackType); - const rct_preview_track* trackBlock = ted.Block; + const PreviewTrack* trackBlock = ted.Block; uint32_t numElements = 0; // First check if any of the track pieces are outside the park for (; trackBlock->index != 0xFF; trackBlock++) @@ -181,7 +181,7 @@ GameActions::Result TrackPlaceAction::Query() const if (!CheckMapCapacity(numElements)) { - log_warning("Not enough free map elements to place track."); + LOG_WARNING("Not enough free map elements to place track."); return GameActions::Result( GameActions::Status::NoFreeElements, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_TILE_ELEMENT_LIMIT_REACHED); @@ -209,8 +209,9 @@ GameActions::Result TrackPlaceAction::Query() const // If that is not the case, then perform the remaining checks trackBlock = ted.Block; + auto clearanceHeight = rideEntry->Clearance; - money32 costs = 0; + money64 costs = 0; money64 supportCosts = 0; for (int32_t blockIndex = 0; trackBlock->index != 0xFF; trackBlock++, blockIndex++) { @@ -224,20 +225,19 @@ GameActions::Result TrackPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_TOO_LOW); } - int32_t baseZ = floor2(mapLoc.z, COORDS_Z_STEP); + int32_t baseZ = Floor2(mapLoc.z, COORDS_Z_STEP); int32_t clearanceZ = trackBlock->var_07; - if (trackBlock->flags & RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL - && ride->GetRideTypeDescriptor().Heights.ClearanceHeight > 24) + if (trackBlock->flags & RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL && clearanceHeight > 24) { clearanceZ += 24; } else { - clearanceZ += ride->GetRideTypeDescriptor().Heights.ClearanceHeight; + clearanceZ += clearanceHeight; } - clearanceZ = floor2(clearanceZ, COORDS_Z_STEP) + baseZ; + clearanceZ = Floor2(clearanceZ, COORDS_Z_STEP) + baseZ; if (clearanceZ > MAX_TRACK_HEIGHT) { @@ -345,7 +345,7 @@ GameActions::Result TrackPlaceAction::Query() const int32_t entranceDirections = std::get<0>(ted.SequenceProperties); if ((entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN) && trackBlock->index == 0) { - const auto addElementResult = track_add_station_element( + const auto addElementResult = TrackAddStationElement( { mapLoc, baseZ, _origin.direction }, _rideIndex, 0, _fromTrackDesign); if (!addElementResult.Successful) { @@ -409,18 +409,18 @@ GameActions::Result TrackPlaceAction::Query() const GameActions::Result TrackPlaceAction::Execute() const { - auto ride = get_ride(_rideIndex); + auto ride = GetRide(_rideIndex); if (ride == nullptr) { - log_warning("Invalid ride for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry == nullptr) { - log_warning("Invalid ride subtype for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); + LOG_WARNING("Invalid ride subtype for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); } @@ -438,9 +438,12 @@ GameActions::Result TrackPlaceAction::Execute() const const auto& ted = GetTrackElementDescriptor(_trackType); const auto& wallEdges = ted.SequenceElementAllowedWallEdges; - money32 costs = 0; + money64 costs = 0; money64 supportCosts = 0; - const rct_preview_track* trackBlock = ted.Block; + const PreviewTrack* trackBlock = ted.Block; + auto clearanceHeight = rideEntry->Clearance; + CoordsXYZ originLocation = CoordsXYZ{ _origin.x, _origin.y, _origin.z } + + CoordsXYZ{ CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(_origin.direction), trackBlock->z }; for (int32_t blockIndex = 0; trackBlock->index != 0xFF; trackBlock++, blockIndex++) { auto rotatedTrack = CoordsXYZ{ CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(_origin.direction), trackBlock->z }; @@ -448,19 +451,18 @@ GameActions::Result TrackPlaceAction::Execute() const auto quarterTile = trackBlock->var_08.Rotate(_origin.direction); - int32_t baseZ = floor2(mapLoc.z, COORDS_Z_STEP); + int32_t baseZ = Floor2(mapLoc.z, COORDS_Z_STEP); int32_t clearanceZ = trackBlock->var_07; - if (trackBlock->flags & RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL - && ride->GetRideTypeDescriptor().Heights.ClearanceHeight > 24) + if (trackBlock->flags & RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL && clearanceHeight > 24) { clearanceZ += 24; } else { - clearanceZ += ride->GetRideTypeDescriptor().Heights.ClearanceHeight; + clearanceZ += clearanceHeight; } - clearanceZ = floor2(clearanceZ, COORDS_Z_STEP) + baseZ; + 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) @@ -525,60 +527,6 @@ GameActions::Result TrackPlaceAction::Execute() const supportCosts += (supportHeight / (2 * COORDS_Z_STEP)) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice; - if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) - { - invalidate_test_results(ride); - switch (_trackType) - { - case TrackElemType::OnRidePhoto: - ride->lifecycle_flags |= RIDE_LIFECYCLE_ON_RIDE_PHOTO; - break; - case TrackElemType::CableLiftHill: - if (trackBlock->index != 0) - break; - ride->lifecycle_flags |= RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED; - ride->CableLiftLoc = mapLoc; - break; - case TrackElemType::BlockBrakes: - { - ride->num_block_brakes++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_OPERATING; - - // change the current mode to its circuit blocked equivalent - RideMode newMode = RideMode::ContinuousCircuitBlockSectioned; - if (ride->mode == RideMode::PoweredLaunch) - { - if (ride->GetRideTypeDescriptor().SupportsRideMode(RideMode::PoweredLaunchBlockSectioned) - || gCheatsShowAllOperatingModes) - newMode = RideMode::PoweredLaunchBlockSectioned; - else - newMode = RideMode::PoweredLaunch; - } - - auto rideSetSetting = RideSetSettingAction(ride->id, RideSetSetting::Mode, static_cast(newMode)); - GameActions::ExecuteNested(&rideSetSetting); - break; - } - } - - if (trackBlock->index == 0) - { - switch (_trackType) - { - case TrackElemType::Up25ToFlat: - case TrackElemType::Up60ToFlat: - case TrackElemType::DiagUp25ToFlat: - case TrackElemType::DiagUp60ToFlat: - if (!(_trackPlaceFlags & CONSTRUCTION_LIFT_HILL_SELECTED)) - break; - [[fallthrough]]; - case TrackElemType::CableLiftHill: - ride->num_block_brakes++; - break; - } - } - } - int32_t entranceDirections = 0; if (!ride->overall_view.IsNull()) { @@ -596,7 +544,7 @@ GameActions::Result TrackPlaceAction::Execute() const auto* trackElement = TileElementInsert(mapLoc, quarterTile.GetBaseQuarterOccupied()); if (trackElement == nullptr) { - log_warning("Cannot create track element for ride = %d", _rideIndex.ToUnderlying()); + LOG_WARNING("Cannot create track element for ride = %d", _rideIndex.ToUnderlying()); return GameActions::Result( GameActions::Status::NoFreeElements, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_TILE_ELEMENT_LIMIT_REACHED); @@ -654,8 +602,8 @@ GameActions::Result TrackPlaceAction::Execute() const { if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gCheatsDisableClearanceChecks) { - for (int32_t chosenDirection = bitscanforward(availableDirections); chosenDirection != -1; - chosenDirection = bitscanforward(availableDirections)) + for (int32_t chosenDirection = UtilBitScanForward(availableDirections); chosenDirection != -1; + chosenDirection = UtilBitScanForward(availableDirections)) { availableDirections &= ~(1 << chosenDirection); CoordsXY tempLoc{ mapLoc.x, mapLoc.y }; @@ -676,7 +624,7 @@ GameActions::Result TrackPlaceAction::Execute() const { if (trackBlock->index == 0) { - track_add_station_element({ mapLoc, _origin.direction }, _rideIndex, GAME_COMMAND_FLAG_APPLY, _fromTrackDesign); + TrackAddStationElement({ mapLoc, _origin.direction }, _rideIndex, GAME_COMMAND_FLAG_APPLY, _fromTrackDesign); } ride->ValidateStations(); ride->UpdateMaxVehicles(); @@ -701,6 +649,56 @@ GameActions::Result TrackPlaceAction::Execute() const MapInvalidateTileFull(mapLoc); } + // Update ride stats and block brake count if the piece was successfully built + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + { + InvalidateTestResults(*ride); + switch (_trackType) + { + case TrackElemType::OnRidePhoto: + ride->lifecycle_flags |= RIDE_LIFECYCLE_ON_RIDE_PHOTO; + break; + case TrackElemType::CableLiftHill: + ride->lifecycle_flags |= RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED; + ride->CableLiftLoc = originLocation; + break; + case TrackElemType::BlockBrakes: + { + ride->num_block_brakes++; + ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_OPERATING; + + // change the current mode to its circuit blocked equivalent + RideMode newMode = RideMode::ContinuousCircuitBlockSectioned; + if (ride->mode == RideMode::PoweredLaunch) + { + if (ride->GetRideTypeDescriptor().SupportsRideMode(RideMode::PoweredLaunchBlockSectioned) + || gCheatsShowAllOperatingModes) + newMode = RideMode::PoweredLaunchBlockSectioned; + else + newMode = RideMode::PoweredLaunch; + } + + auto rideSetSetting = RideSetSettingAction(ride->id, RideSetSetting::Mode, static_cast(newMode)); + GameActions::ExecuteNested(&rideSetSetting); + break; + } + } + + switch (_trackType) + { + case TrackElemType::Up25ToFlat: + case TrackElemType::Up60ToFlat: + case TrackElemType::DiagUp25ToFlat: + case TrackElemType::DiagUp60ToFlat: + if (!(_trackPlaceFlags & CONSTRUCTION_LIFT_HILL_SELECTED)) + break; + [[fallthrough]]; + case TrackElemType::CableLiftHill: + ride->num_block_brakes++; + break; + } + } + money64 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; price *= ted.PriceModifier; @@ -714,7 +712,7 @@ GameActions::Result TrackPlaceAction::Execute() const bool TrackPlaceAction::CheckMapCapacity(int16_t numTiles) const { const auto& ted = GetTrackElementDescriptor(_trackType); - for (const rct_preview_track* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) + for (const PreviewTrack* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) { auto rotatedTrack = CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(_origin.direction); diff --git a/src/openrct2/actions/TrackPlaceAction.h b/src/openrct2/actions/TrackPlaceAction.h index b5db9931e1..ac8ed29dc6 100644 --- a/src/openrct2/actions/TrackPlaceAction.h +++ b/src/openrct2/actions/TrackPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index 2e1a6840c0..687dc9b065 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -108,7 +108,7 @@ GameActions::Result TrackRemoveAction::Query() const if (!found) { - log_warning( + LOG_WARNING( "Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", _origin.x, _origin.y, _origin.z, _origin.direction, _sequence); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); @@ -124,24 +124,24 @@ GameActions::Result TrackRemoveAction::Query() const RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); const auto trackType = tileElement->AsTrack()->GetTrackType(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { - log_warning("Ride not found. ride index = %d.", rideIndex); + LOG_WARNING("Ride not found. ride index = %d.", rideIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } if (ride->type >= RIDE_TYPE_COUNT) { - log_warning("Ride type not found. ride type = %d.", ride->type); + LOG_WARNING("Ride type not found. ride type = %d.", ride->type); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } const auto& ted = GetTrackElementDescriptor(trackType); auto sequenceIndex = tileElement->AsTrack()->GetSequenceIndex(); - const rct_preview_track* trackBlock = ted.GetBlockForSequence(sequenceIndex); + const PreviewTrack* trackBlock = ted.GetBlockForSequence(sequenceIndex); if (trackBlock == nullptr) { - log_warning("Track block %d not found for track type %d.", sequenceIndex, trackType); + LOG_WARNING("Track block %d not found for track type %d.", sequenceIndex, trackType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } @@ -202,7 +202,7 @@ GameActions::Result TrackRemoveAction::Query() const if (!found) { - log_warning( + LOG_WARNING( "Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", mapLoc.x, mapLoc.y, mapLoc.z, _origin.direction, trackBlock->index); return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); @@ -211,7 +211,7 @@ GameActions::Result TrackRemoveAction::Query() const int32_t entranceDirections = std::get<0>(ted.SequenceProperties); if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && (tileElement->AsTrack()->GetSequenceIndex() == 0)) { - const auto removeElementResult = track_remove_station_element({ mapLoc, _origin.direction }, rideIndex, 0); + const auto removeElementResult = TrackRemoveStationElement({ mapLoc, _origin.direction }, rideIndex, 0); if (!removeElementResult.Successful) { return GameActions::Result( @@ -222,11 +222,11 @@ GameActions::Result TrackRemoveAction::Query() const auto* surfaceElement = MapGetSurfaceElementAt(mapLoc); if (surfaceElement == nullptr) { - log_warning("Surface Element not found. x = %d, y = %d", mapLoc.x, mapLoc.y); + LOG_WARNING("Surface Element not found. x = %d, y = %d", mapLoc.x, mapLoc.y); return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } - int8_t _support_height = tileElement->base_height - surfaceElement->base_height; + int8_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight; if (_support_height < 0) { _support_height = 10; @@ -309,7 +309,7 @@ GameActions::Result TrackRemoveAction::Execute() const if (!found) { - log_warning( + LOG_WARNING( "Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", _origin.x, _origin.y, _origin.z, _origin.direction, _sequence); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); @@ -319,18 +319,18 @@ GameActions::Result TrackRemoveAction::Execute() const const auto trackType = tileElement->AsTrack()->GetTrackType(); bool isLiftHill = tileElement->AsTrack()->HasChain(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { - log_warning("Ride not found. ride index = %d.", rideIndex); + LOG_WARNING("Ride not found. ride index = %d.", rideIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } const auto& ted = GetTrackElementDescriptor(trackType); auto sequenceIndex = tileElement->AsTrack()->GetSequenceIndex(); - const rct_preview_track* trackBlock = ted.GetBlockForSequence(sequenceIndex); + const PreviewTrack* trackBlock = ted.GetBlockForSequence(sequenceIndex); if (trackBlock == nullptr) { - log_warning("Track block %d not found for track type %d.", sequenceIndex, trackType); + LOG_WARNING("Track block %d not found for track type %d.", sequenceIndex, trackType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } @@ -386,7 +386,7 @@ GameActions::Result TrackRemoveAction::Execute() const if (!found) { - log_warning( + LOG_WARNING( "Track Element not found. x = %d, y = %d, z = %d, d = %d, seq = %d.", mapLoc.x, mapLoc.y, mapLoc.z, _origin.direction, trackBlock->index); return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); @@ -395,7 +395,7 @@ GameActions::Result TrackRemoveAction::Execute() const int32_t entranceDirections = std::get<0>(ted.SequenceProperties); if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN && (tileElement->AsTrack()->GetSequenceIndex() == 0)) { - const auto removeElementResult = track_remove_station_element({ mapLoc, _origin.direction }, rideIndex, 0); + const auto removeElementResult = TrackRemoveStationElement({ mapLoc, _origin.direction }, rideIndex, 0); if (!removeElementResult.Successful) { return GameActions::Result( @@ -406,11 +406,11 @@ GameActions::Result TrackRemoveAction::Execute() const auto* surfaceElement = MapGetSurfaceElementAt(mapLoc); if (surfaceElement == nullptr) { - log_warning("Surface Element not found. x = %d, y = %d", mapLoc.x, mapLoc.y); + LOG_WARNING("Surface Element not found. x = %d, y = %d", mapLoc.x, mapLoc.y); return GameActions::Result(GameActions::Status::Unknown, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_NONE); } - int8_t _support_height = tileElement->base_height - surfaceElement->base_height; + int8_t _support_height = tileElement->BaseHeight - surfaceElement->BaseHeight; if (_support_height < 0) { _support_height = 10; @@ -424,7 +424,7 @@ GameActions::Result TrackRemoveAction::Execute() const && !(ride->status == RideStatus::Simulating && tileElement->Flags & TILE_ELEMENT_FLAG_GHOST) && (tileElement->AsTrack()->GetSequenceIndex() == 0)) { - const auto removeElementResult = track_remove_station_element( + const auto removeElementResult = TrackRemoveStationElement( { mapLoc, _origin.direction }, rideIndex, GAME_COMMAND_FLAG_APPLY); if (!removeElementResult.Successful) { @@ -438,7 +438,7 @@ GameActions::Result TrackRemoveAction::Execute() const surfaceElement->SetHasTrackThatNeedsWater(false); } - invalidate_test_results(ride); + InvalidateTestResults(*ride); FootpathQueueChainReset(); if (!gCheatsDisableClearanceChecks || !(tileElement->IsGhost())) { diff --git a/src/openrct2/actions/TrackRemoveAction.h b/src/openrct2/actions/TrackRemoveAction.h index 45e225efd0..d05e24feb1 100644 --- a/src/openrct2/actions/TrackRemoveAction.h +++ b/src/openrct2/actions/TrackRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp b/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp index b6dfed02bb..0c564f7fc7 100644 --- a/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp +++ b/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -63,7 +63,7 @@ GameActions::Result TrackSetBrakeSpeedAction::QueryExecute(bool isExecuting) con TileElement* tileElement = MapGetTrackElementAtOfType(_loc, _trackType); if (tileElement == nullptr) { - log_warning("Invalid game command for setting brakes speed. x = %d, y = %d", _loc.x, _loc.y); + LOG_WARNING("Invalid game command for setting brakes speed. x = %d, y = %d", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } diff --git a/src/openrct2/actions/TrackSetBrakeSpeedAction.h b/src/openrct2/actions/TrackSetBrakeSpeedAction.h index 17d24a8448..1ee1145627 100644 --- a/src/openrct2/actions/TrackSetBrakeSpeedAction.h +++ b/src/openrct2/actions/TrackSetBrakeSpeedAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 9eb392ca9d..4dd23dcb79 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,13 +11,15 @@ #include "../OpenRCT2.h" #include "../management/Finance.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/ObjectEntryManager.h" +#include "../object/SmallSceneryEntry.h" +#include "../object/WallSceneryEntry.h" #include "../ride/Track.h" #include "../ride/TrackDesign.h" #include "../world/Banner.h" #include "../world/ConstructionClearance.h" -#include "../world/LargeScenery.h" #include "../world/MapAnimation.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/Wall.h" @@ -95,7 +97,7 @@ GameActions::Result WallPlaceAction::Query() const } else if (!_trackDesignDrawingPreview && (_loc.x > mapSizeMax.x || _loc.y > mapSizeMax.y)) { - log_error("Invalid x/y coordinates. x = %d y = %d", _loc.x, _loc.y); + LOG_ERROR("Invalid x/y coordinates. x = %d y = %d", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); } @@ -111,7 +113,7 @@ GameActions::Result WallPlaceAction::Query() const auto* surfaceElement = MapGetSurfaceElementAt(_loc); if (surfaceElement == nullptr) { - log_error("Surface element not found at %d, %d.", _loc.x, _loc.y); + LOG_ERROR("Surface element not found at %d, %d.", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); } targetHeight = surfaceElement->GetBaseZ(); @@ -128,7 +130,7 @@ GameActions::Result WallPlaceAction::Query() const auto* surfaceElement = MapGetSurfaceElementAt(_loc); if (surfaceElement == nullptr) { - log_error("Surface element not found at %d, %d.", _loc.x, _loc.y); + LOG_ERROR("Surface element not found at %d, %d.", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); } @@ -152,7 +154,7 @@ GameActions::Result WallPlaceAction::Query() const if (!(edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS))) { uint8_t newEdge = (_edge + 2) & 3; - uint8_t newBaseHeight = surfaceElement->base_height; + uint8_t newBaseHeight = surfaceElement->BaseHeight; newBaseHeight += 2; if (surfaceElement->GetSlope() & (1 << newEdge)) { @@ -215,11 +217,11 @@ GameActions::Result WallPlaceAction::Query() const } } - auto* wallEntry = GetWallEntry(_wallType); + auto* wallEntry = OpenRCT2::ObjectManager::GetObjectEntry(_wallType); if (wallEntry == nullptr) { - log_error("Wall Type not found %d", _wallType); + LOG_ERROR("Wall Type not found %d", _wallType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); } @@ -227,7 +229,7 @@ GameActions::Result WallPlaceAction::Query() const { if (HasReachedBannerLimit()) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_TOO_MANY_BANNERS_IN_GAME); } @@ -290,7 +292,7 @@ GameActions::Result WallPlaceAction::Execute() const auto* surfaceElement = MapGetSurfaceElementAt(_loc); if (surfaceElement == nullptr) { - log_error("Surface element not found at %d, %d.", _loc.x, _loc.y); + LOG_ERROR("Surface element not found at %d, %d.", _loc.x, _loc.y); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); } targetHeight = surfaceElement->GetBaseZ(); @@ -305,11 +307,11 @@ GameActions::Result WallPlaceAction::Execute() const } auto targetLoc = CoordsXYZ(_loc, targetHeight); - auto* wallEntry = GetWallEntry(_wallType); + auto* wallEntry = OpenRCT2::ObjectManager::GetObjectEntry(_wallType); if (wallEntry == nullptr) { - log_error("Wall Type not found %d", _wallType); + LOG_ERROR("Wall Type not found %d", _wallType); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); } @@ -336,7 +338,7 @@ GameActions::Result WallPlaceAction::Execute() const banner = CreateBanner(); if (banner == nullptr) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_TOO_MANY_BANNERS_IN_GAME); } @@ -363,7 +365,7 @@ GameActions::Result WallPlaceAction::Execute() const GameActions::Status::NoFreeElements, STR_CANT_POSITION_THIS_HERE, STR_TILE_ELEMENT_LIMIT_REACHED); } - wallElement->clearance_height = clearanceHeight; + wallElement->ClearanceHeight = clearanceHeight; wallElement->SetDirection(_edge); wallElement->SetSlope(edgeSlope); @@ -397,7 +399,7 @@ GameActions::Result WallPlaceAction::Execute() const * rct2: 0x006E5CBA */ bool WallPlaceAction::WallCheckObstructionWithTrack( - WallSceneryEntry* wall, int32_t z0, TrackElement* trackElement, bool* wallAcrossTrack) const + const WallSceneryEntry* wall, int32_t z0, TrackElement* trackElement, bool* wallAcrossTrack) const { track_type_t trackType = trackElement->GetTrackType(); @@ -405,7 +407,7 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( const auto& ted = GetTrackElementDescriptor(trackType); int32_t sequence = trackElement->GetSequenceIndex(); int32_t direction = (_edge - trackElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK; - auto ride = get_ride(trackElement->GetRideIndex()); + auto ride = GetRide(trackElement->GetRideIndex()); if (ride == nullptr) { return false; @@ -447,9 +449,9 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( direction = DirectionReverse(trackElement->GetDirection()); if (direction == _edge) { - const rct_preview_track* trackBlock = ted.GetBlockForSequence(sequence); + const PreviewTrack* trackBlock = ted.GetBlockForSequence(sequence); z = ted.Coordinates.z_begin; - z = trackElement->base_height + ((z - trackBlock->z) * 8); + z = trackElement->BaseHeight + ((z - trackBlock->z) * 8); if (z == z0) { return true; @@ -459,7 +461,7 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( } } - const rct_preview_track* trackBlock = &ted.Block[sequence + 1]; + const PreviewTrack* trackBlock = &ted.Block[sequence + 1]; if (trackBlock->index != 0xFF) { return false; @@ -484,7 +486,7 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( trackBlock = ted.GetBlockForSequence(sequence); z = ted.Coordinates.z_end; - z = trackElement->base_height + ((z - trackBlock->z) * 8); + z = trackElement->BaseHeight + ((z - trackBlock->z) * 8); return z == z0; } @@ -493,7 +495,7 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( * rct2: 0x006E5C1A */ GameActions::Result WallPlaceAction::WallCheckObstruction( - WallSceneryEntry* wall, int32_t z0, int32_t z1, bool* wallAcrossTrack) const + const WallSceneryEntry* wall, int32_t z0, int32_t z1, bool* wallAcrossTrack) const { *wallAcrossTrack = false; if (MapIsLocationAtEdge(_loc)) @@ -511,9 +513,9 @@ GameActions::Result WallPlaceAction::WallCheckObstruction( continue; if (tileElement->IsGhost()) continue; - if (z0 >= tileElement->clearance_height) + if (z0 >= tileElement->ClearanceHeight) continue; - if (z1 <= tileElement->base_height) + if (z1 <= tileElement->BaseHeight) continue; if (elementType == TileElementType::Wall) { @@ -551,7 +553,7 @@ GameActions::Result WallPlaceAction::WallCheckObstruction( break; auto sequence = largeSceneryElement->GetSequenceIndex(); - const rct_large_scenery_tile& tile = sceneryEntry->tiles[sequence]; + const LargeSceneryTile& tile = sceneryEntry->tiles[sequence]; int32_t direction = ((_edge - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK) + 8; if (!(tile.flags & (1 << direction))) diff --git a/src/openrct2/actions/WallPlaceAction.h b/src/openrct2/actions/WallPlaceAction.h index ae821c1d51..e5bb715f6e 100644 --- a/src/openrct2/actions/WallPlaceAction.h +++ b/src/openrct2/actions/WallPlaceAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -51,12 +51,12 @@ private: * rct2: 0x006E5CBA */ bool WallCheckObstructionWithTrack( - WallSceneryEntry* wall, int32_t z0, TrackElement* trackElement, bool* wallAcrossTrack) const; + const WallSceneryEntry* wall, int32_t z0, TrackElement* trackElement, bool* wallAcrossTrack) const; /** * * rct2: 0x006E5C1A */ - GameActions::Result WallCheckObstruction(WallSceneryEntry* wall, int32_t z0, int32_t z1, bool* wallAcrossTrack) const; + GameActions::Result WallCheckObstruction(const WallSceneryEntry* wall, int32_t z0, int32_t z1, bool* wallAcrossTrack) const; /** * Gets whether the given track type can have a wall placed on the edge of the given direction. diff --git a/src/openrct2/actions/WallRemoveAction.cpp b/src/openrct2/actions/WallRemoveAction.cpp index 168afe49ef..e96bdd1726 100644 --- a/src/openrct2/actions/WallRemoveAction.cpp +++ b/src/openrct2/actions/WallRemoveAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/WallRemoveAction.h b/src/openrct2/actions/WallRemoveAction.h index 6f8849ae44..bf1ba4e2ac 100644 --- a/src/openrct2/actions/WallRemoveAction.h +++ b/src/openrct2/actions/WallRemoveAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/actions/WallSetColourAction.cpp b/src/openrct2/actions/WallSetColourAction.cpp index 656bd932cc..b696dd89fc 100644 --- a/src/openrct2/actions/WallSetColourAction.cpp +++ b/src/openrct2/actions/WallSetColourAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,13 +11,12 @@ #include "../OpenRCT2.h" #include "../management/Finance.h" +#include "../object/WallSceneryEntry.h" #include "../ride/Track.h" #include "../ride/TrackData.h" #include "../world/Banner.h" -#include "../world/LargeScenery.h" #include "../world/MapAnimation.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" WallSetColourAction::WallSetColourAction( @@ -29,6 +28,14 @@ WallSetColourAction::WallSetColourAction( { } +void WallSetColourAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_loc); + visitor.Visit("primaryColour", _primaryColour); + visitor.Visit("secondaryColour", _secondaryColour); + visitor.Visit("tertiaryColour", _tertiaryColour); +} + uint16_t WallSetColourAction::GetActionFlags() const { return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused; @@ -64,7 +71,7 @@ GameActions::Result WallSetColourAction::Query() const auto wallElement = MapGetWallElementAt(_loc); if (wallElement == nullptr) { - log_error( + LOG_ERROR( "Could not find wall element at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -77,19 +84,19 @@ GameActions::Result WallSetColourAction::Query() const auto* wallEntry = wallElement->GetEntry(); if (wallEntry == nullptr) { - log_error("Could not find wall object"); + LOG_ERROR("Could not find wall object"); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } if (_primaryColour > 31) { - log_error("Primary colour invalid: colour = %d", _primaryColour); + LOG_ERROR("Primary colour invalid: colour = %d", _primaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } if (_secondaryColour > 31) { - log_error("Secondary colour invalid: colour = %d", _secondaryColour); + LOG_ERROR("Secondary colour invalid: colour = %d", _secondaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -97,7 +104,7 @@ GameActions::Result WallSetColourAction::Query() const { if (_tertiaryColour > 31) { - log_error("Tertiary colour invalid: colour = %d", _tertiaryColour); + LOG_ERROR("Tertiary colour invalid: colour = %d", _tertiaryColour); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } } @@ -116,7 +123,7 @@ GameActions::Result WallSetColourAction::Execute() const auto wallElement = MapGetWallElementAt(_loc); if (wallElement == nullptr) { - log_error( + LOG_ERROR( "Could not find wall element at: x = %d, y = %d, z = %d, direction = %u", _loc.x, _loc.y, _loc.z, _loc.direction); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_NONE); } @@ -129,7 +136,7 @@ GameActions::Result WallSetColourAction::Execute() const auto* wallEntry = wallElement->GetEntry(); if (wallEntry == nullptr) { - log_error("Could not find wall object"); + LOG_ERROR("Could not find wall object"); return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, STR_NONE); } diff --git a/src/openrct2/actions/WallSetColourAction.h b/src/openrct2/actions/WallSetColourAction.h index 61675f5287..d98b883ed1 100644 --- a/src/openrct2/actions/WallSetColourAction.h +++ b/src/openrct2/actions/WallSetColourAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,8 @@ public: WallSetColourAction() = default; WallSetColourAction(const CoordsXYZD& loc, int32_t primaryColour, int32_t secondaryColour, int32_t tertiaryColour); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/WaterLowerAction.cpp b/src/openrct2/actions/WaterLowerAction.cpp index b2f70f583f..dd345f032e 100644 --- a/src/openrct2/actions/WaterLowerAction.cpp +++ b/src/openrct2/actions/WaterLowerAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,6 +19,11 @@ WaterLowerAction::WaterLowerAction(MapRange range) { } +void WaterLowerAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_range); +} + uint16_t WaterLowerAction::GetActionFlags() const { return GameAction::GetActionFlags(); diff --git a/src/openrct2/actions/WaterLowerAction.h b/src/openrct2/actions/WaterLowerAction.h index 6b777caafc..283c3386d7 100644 --- a/src/openrct2/actions/WaterLowerAction.h +++ b/src/openrct2/actions/WaterLowerAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,8 @@ public: WaterLowerAction() = default; WaterLowerAction(MapRange range); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/WaterRaiseAction.cpp b/src/openrct2/actions/WaterRaiseAction.cpp index 74779abaa8..a94e716664 100644 --- a/src/openrct2/actions/WaterRaiseAction.cpp +++ b/src/openrct2/actions/WaterRaiseAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,6 +19,11 @@ WaterRaiseAction::WaterRaiseAction(MapRange range) { } +void WaterRaiseAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_range); +} + uint16_t WaterRaiseAction::GetActionFlags() const { return GameAction::GetActionFlags(); @@ -82,7 +87,7 @@ GameActions::Result WaterRaiseAction::QueryExecute(bool isExecuting) const uint8_t height = surfaceElement->GetWaterHeight() / COORDS_Z_STEP; - if (surfaceElement->base_height > maxHeight) + if (surfaceElement->BaseHeight > maxHeight) continue; if (height != 0) @@ -93,7 +98,7 @@ GameActions::Result WaterRaiseAction::QueryExecute(bool isExecuting) const } else { - height = surfaceElement->base_height + 2; + height = surfaceElement->BaseHeight + 2; } auto waterSetHeightAction = WaterSetHeightAction({ x, y }, height); waterSetHeightAction.SetFlags(GetFlags()); diff --git a/src/openrct2/actions/WaterRaiseAction.h b/src/openrct2/actions/WaterRaiseAction.h index 3b5c8e28ee..dee77c17e2 100644 --- a/src/openrct2/actions/WaterRaiseAction.h +++ b/src/openrct2/actions/WaterRaiseAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,8 @@ public: WaterRaiseAction() = default; WaterRaiseAction(MapRange range); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/actions/WaterSetHeightAction.cpp b/src/openrct2/actions/WaterSetHeightAction.cpp index 8b0490b15f..31ac689261 100644 --- a/src/openrct2/actions/WaterSetHeightAction.cpp +++ b/src/openrct2/actions/WaterSetHeightAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,12 @@ WaterSetHeightAction::WaterSetHeightAction(const CoordsXY& coords, uint8_t heigh { } +void WaterSetHeightAction::AcceptParameters(GameActionParameterVisitor& visitor) +{ + visitor.Visit(_coords); + visitor.Visit("height", _height); +} + uint16_t WaterSetHeightAction::GetActionFlags() const { return GameAction::GetActionFlags(); @@ -67,7 +73,7 @@ GameActions::Result WaterSetHeightAction::Query() const SurfaceElement* surfaceElement = MapGetSurfaceElementAt(_coords); if (surfaceElement == nullptr) { - log_error("Could not find surface element at: x %u, y %u", _coords.x, _coords.y); + LOG_ERROR("Could not find surface element at: x %u, y %u", _coords.x, _coords.y); return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); } @@ -112,11 +118,11 @@ GameActions::Result WaterSetHeightAction::Execute() const SurfaceElement* surfaceElement = MapGetSurfaceElementAt(_coords); if (surfaceElement == nullptr) { - log_error("Could not find surface element at: x %u, y %u", _coords.x, _coords.y); + LOG_ERROR("Could not find surface element at: x %u, y %u", _coords.x, _coords.y); return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); } - if (_height > surfaceElement->base_height) + if (_height > surfaceElement->BaseHeight) { surfaceElement->SetWaterHeight(_height * COORDS_Z_STEP); } diff --git a/src/openrct2/actions/WaterSetHeightAction.h b/src/openrct2/actions/WaterSetHeightAction.h index 951f9c33dc..ae5ab4e0ff 100644 --- a/src/openrct2/actions/WaterSetHeightAction.h +++ b/src/openrct2/actions/WaterSetHeightAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,6 +21,8 @@ public: WaterSetHeightAction() = default; WaterSetHeightAction(const CoordsXY& coords, uint8_t height); + void AcceptParameters(GameActionParameterVisitor& visitor) override; + uint16_t GetActionFlags() const override; void Serialise(DataSerialiser& stream) override; diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index 63430a8305..e9ef18924c 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -107,7 +107,7 @@ namespace OpenRCT2::Audio auto env = GetContext()->GetPlatformEnvironment(); if (env->IsUsingClassic()) { - baseAudio = objManager.LoadObject(AudioObjectIdentifiers::Rct2cBase); + baseAudio = objManager.LoadObject(AudioObjectIdentifiers::RCTCBase); if (baseAudio != nullptr) { _soundsAudioObjectEntryIndex = objManager.GetLoadedObjectEntryIndex(baseAudio); @@ -117,7 +117,7 @@ namespace OpenRCT2::Audio if (baseAudio == nullptr) { // Fallback to vanilla RCT2 audio object - baseAudio = objManager.LoadObject(AudioObjectIdentifiers::Rct2Base); + baseAudio = objManager.LoadObject(AudioObjectIdentifiers::RCT2Base); if (baseAudio != nullptr) { _soundsAudioObjectEntryIndex = objManager.GetLoadedObjectEntryIndex(baseAudio); @@ -127,7 +127,7 @@ namespace OpenRCT2::Audio objManager.LoadObject(AudioObjectIdentifiers::OpenRCT2Additional); _soundsAdditionalAudioObjectEntryIndex = objManager.GetLoadedObjectEntryIndex( AudioObjectIdentifiers::OpenRCT2Additional); - objManager.LoadObject(AudioObjectIdentifiers::Rct2Circus); + objManager.LoadObject(AudioObjectIdentifiers::RCT2Circus); } void PopulateDevices() @@ -140,13 +140,13 @@ namespace OpenRCT2::Audio { if (device.empty()) { - device = language_get_string(STR_OPTIONS_SOUND_VALUE_DEFAULT); + device = LanguageGetString(STR_OPTIONS_SOUND_VALUE_DEFAULT); } } #ifndef __linux__ // The first device is always system default on Windows and macOS - std::string defaultDevice = language_get_string(STR_OPTIONS_SOUND_VALUE_DEFAULT); + std::string defaultDevice = LanguageGetString(STR_OPTIONS_SOUND_VALUE_DEFAULT); devices.insert(devices.begin(), defaultDevice); #endif @@ -173,11 +173,11 @@ namespace OpenRCT2::Audio volumeDown = 10; } - uint8_t rotation = get_current_rotation(); + uint8_t rotation = GetCurrentRotation(); auto pos2 = Translate3DTo2DWithZ(rotation, location); - rct_viewport* viewport = nullptr; - while ((viewport = window_get_previous_viewport(viewport)) != nullptr) + Viewport* viewport = nullptr; + while ((viewport = WindowGetPreviousViewport(viewport)) != nullptr) { if (viewport->flags & VIEWPORT_FLAG_SOUND_ON) { @@ -275,14 +275,14 @@ namespace OpenRCT2::Audio { default: return {}; - case TitleMusicKind::Rct1: - return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::Rct1Title); - case TitleMusicKind::Rct2: - return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::Rct2Title); + case TitleMusicKind::RCT1: + return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT1Title); + case TitleMusicKind::RCT2: + return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT2Title); case TitleMusicKind::Random: return ObjectEntryDescriptor( ObjectType::Audio, - (util_rand() & 1) ? AudioObjectIdentifiers::Rct1Title : AudioObjectIdentifiers::Rct2Title); + (UtilRand() & 1) ? AudioObjectIdentifiers::RCT1Title : AudioObjectIdentifiers::RCT2Title); } } @@ -321,7 +321,7 @@ namespace OpenRCT2::Audio StopTitleMusic(); StopVehicleSounds(); RideAudio::StopAllChannels(); - peep_stop_crowd_noise(); + PeepStopCrowdNoise(); ClimateStopWeatherSound(); } @@ -385,7 +385,7 @@ namespace OpenRCT2::Audio void Close() { - peep_stop_crowd_noise(); + PeepStopCrowdNoise(); StopTitleMusic(); RideAudio::StopAllChannels(); ClimateStopWeatherSound(); @@ -398,15 +398,13 @@ namespace OpenRCT2::Audio if (gConfigSound.MasterSoundEnabled) { Resume(); - PlayTitleMusic(); } else { - StopTitleMusic(); Pause(); } - window_invalidate_by_class(WindowClass::Options); + WindowInvalidateByClass(WindowClass::Options); } void Pause() @@ -414,13 +412,15 @@ namespace OpenRCT2::Audio gGameSoundsOff = true; StopVehicleSounds(); RideAudio::StopAllChannels(); - peep_stop_crowd_noise(); + PeepStopCrowdNoise(); ClimateStopWeatherSound(); + StopTitleMusic(); } void Resume() { gGameSoundsOff = false; + PlayTitleMusic(); } void StopVehicleSounds() diff --git a/src/openrct2/audio/AudioChannel.h b/src/openrct2/audio/AudioChannel.h index ea14d683da..c2354670e7 100644 --- a/src/openrct2/audio/AudioChannel.h +++ b/src/openrct2/audio/AudioChannel.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/audio/AudioContext.h b/src/openrct2/audio/AudioContext.h index f21a344ed1..ea42366f22 100644 --- a/src/openrct2/audio/AudioContext.h +++ b/src/openrct2/audio/AudioContext.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/audio/AudioMixer.h b/src/openrct2/audio/AudioMixer.h index ba53b24a9a..09e7707559 100644 --- a/src/openrct2/audio/AudioMixer.h +++ b/src/openrct2/audio/AudioMixer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/audio/AudioSource.h b/src/openrct2/audio/AudioSource.h index a3528e5e25..af8b2817a5 100644 --- a/src/openrct2/audio/AudioSource.h +++ b/src/openrct2/audio/AudioSource.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/audio/DummyAudioContext.cpp b/src/openrct2/audio/DummyAudioContext.cpp index b59beb5129..9b8a5accb8 100644 --- a/src/openrct2/audio/DummyAudioContext.cpp +++ b/src/openrct2/audio/DummyAudioContext.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/audio/audio.h b/src/openrct2/audio/audio.h index fa3e8c527f..34849ad5f2 100644 --- a/src/openrct2/audio/audio.h +++ b/src/openrct2/audio/audio.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,6 +15,7 @@ #include "AudioMixer.h" #include +#include #include class AudioObject; @@ -137,11 +138,11 @@ namespace OpenRCT2::Audio namespace AudioObjectIdentifiers { - constexpr std::string_view Rct1Title = "rct1.audio.title"; - constexpr std::string_view Rct2Base = "rct2.audio.base"; - constexpr std::string_view Rct2cBase = "rct2.audio.base.rctc"; - constexpr std::string_view Rct2Title = "rct2.audio.title"; - constexpr std::string_view Rct2Circus = "rct2.audio.circus"; + constexpr std::string_view RCT1Title = "rct1.audio.title"; + constexpr std::string_view RCT2Base = "rct2.audio.base"; + constexpr std::string_view RCTCBase = "rct2.audio.base.rctc"; + constexpr std::string_view RCT2Title = "rct2.audio.title"; + constexpr std::string_view RCT2Circus = "rct2.audio.circus"; constexpr std::string_view OpenRCT2Additional = "openrct2.audio.additional"; } // namespace AudioObjectIdentifiers diff --git a/src/openrct2/cmdline/BenchGfxCommmands.cpp b/src/openrct2/command_line/BenchGfxCommmands.cpp similarity index 90% rename from src/openrct2/cmdline/BenchGfxCommmands.cpp rename to src/openrct2/command_line/BenchGfxCommmands.cpp index 9de6a2f5e0..439e6fbd58 100644 --- a/src/openrct2/cmdline/BenchGfxCommmands.cpp +++ b/src/openrct2/command_line/BenchGfxCommmands.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,7 +21,7 @@ static exitcode_t HandleBenchGfx(CommandLineArgEnumerator* argEnumerator) { const char** argv = const_cast(argEnumerator->GetArguments()) + argEnumerator->GetIndex(); int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); - int32_t result = cmdline_for_gfxbench(argv, argc); + int32_t result = CommandLineForGfxbench(argv, argc); if (result < 0) { return EXITCODE_FAIL; diff --git a/src/openrct2/cmdline/BenchSpriteSort.cpp b/src/openrct2/command_line/BenchSpriteSort.cpp similarity index 91% rename from src/openrct2/cmdline/BenchSpriteSort.cpp rename to src/openrct2/command_line/BenchSpriteSort.cpp index 6f5f02008e..4c8fb2d3a9 100644 --- a/src/openrct2/cmdline/BenchSpriteSort.cpp +++ b/src/openrct2/command_line/BenchSpriteSort.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -74,13 +74,13 @@ static std::vector extract_paint_session(std::string_view gOpenRCT2Headless = true; auto context = OpenRCT2::CreateContext(); std::vector sessions; - log_info("Starting..."); + LOG_INFO("Starting..."); if (context->Initialise()) { - drawing_engine_init(); + DrawingEngineInit(); if (!context->LoadParkFromFile(std::string(parkFileName))) { - log_error("Failed to load park!"); + LOG_ERROR("Failed to load park!"); return {}; } @@ -93,7 +93,7 @@ static std::vector extract_paint_session(std::string_view resolutionWidth += 8; resolutionHeight += 128; - rct_viewport viewport; + Viewport viewport; viewport.pos = { 0, 0 }; viewport.width = resolutionWidth; viewport.height = resolutionHeight; @@ -111,9 +111,9 @@ static std::vector extract_paint_session(std::string_view gCurrentRotation = 0; // Ensure sprites appear regardless of rotation - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.x = 0; dpi.y = 0; dpi.width = resolutionWidth; @@ -121,17 +121,17 @@ static std::vector extract_paint_session(std::string_view dpi.pitch = 0; dpi.bits = static_cast(malloc(dpi.width * dpi.height)); - log_info("Obtaining sprite data..."); - viewport_render(&dpi, &viewport, { { 0, 0 }, { viewport.width, viewport.height } }, &sessions); + LOG_INFO("Obtaining sprite data..."); + ViewportRender(&dpi, &viewport, { { 0, 0 }, { viewport.width, viewport.height } }, &sessions); free(dpi.bits); - drawing_engine_dispose(); + DrawingEngineDispose(); } - log_info("Got %u paint sessions.", std::size(sessions)); + LOG_INFO("Got %u paint sessions.", std::size(sessions)); return sessions; } -// This function is based on benchgfx_render_screenshots +// This function is based on BenchgfxRenderScreenshots static void BM_paint_session_arrange(benchmark::State& state, const std::vector inputSessions) { auto sessions = inputSessions; @@ -153,7 +153,7 @@ static void BM_paint_session_arrange(benchmark::State& state, const std::vector< delete[] local_s; } -static int cmdline_for_bench_sprite_sort(int argc, const char** argv) +static int command_line_for_bench_sprite_sort(int argc, const char** argv) { { // Register some basic "baseline" benchmark @@ -204,7 +204,7 @@ static exitcode_t HandleBenchSpriteSort(CommandLineArgEnumerator* argEnumerator) { const char** argv = const_cast(argEnumerator->GetArguments()) + argEnumerator->GetIndex(); int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); - int32_t result = cmdline_for_bench_sprite_sort(argc, argv); + int32_t result = command_line_for_bench_sprite_sort(argc, argv); if (result < 0) { return EXITCODE_FAIL; @@ -215,7 +215,7 @@ static exitcode_t HandleBenchSpriteSort(CommandLineArgEnumerator* argEnumerator) #else static exitcode_t HandleBenchSpriteSort(CommandLineArgEnumerator* argEnumerator) { - log_error("Sorry, Google benchmark not enabled in this build"); + LOG_ERROR("Sorry, Google benchmark not enabled in this build"); return EXITCODE_FAIL; } #endif // USE_BENCHMARK diff --git a/src/openrct2/cmdline/BenchUpdate.cpp b/src/openrct2/command_line/BenchUpdate.cpp similarity index 96% rename from src/openrct2/cmdline/BenchUpdate.cpp rename to src/openrct2/command_line/BenchUpdate.cpp index 8c6bdeaa12..ec1b628197 100644 --- a/src/openrct2/cmdline/BenchUpdate.cpp +++ b/src/openrct2/command_line/BenchUpdate.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -87,7 +87,7 @@ static void BM_update(benchmark::State& state, const std::string& filename) } } -static int CmdlineForBenchSpriteSort(int argc, const char* const* argv) +static int CommandLineForBenchSpriteSort(int argc, const char* const* argv) { // Add a baseline test on an empty park benchmark::RegisterBenchmark("baseline", BM_update, std::string{}); @@ -129,7 +129,7 @@ static exitcode_t HandleBenchUpdate(CommandLineArgEnumerator* argEnumerator) { const char* const* argv = static_cast(argEnumerator->GetArguments()) + argEnumerator->GetIndex(); int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); - int32_t result = CmdlineForBenchSpriteSort(argc, argv); + int32_t result = CommandLineForBenchSpriteSort(argc, argv); if (result < 0) { return EXITCODE_FAIL; @@ -140,7 +140,7 @@ static exitcode_t HandleBenchUpdate(CommandLineArgEnumerator* argEnumerator) #else static exitcode_t HandleBenchUpdate(CommandLineArgEnumerator* argEnumerator) { - log_error("Sorry, Google benchmark not enabled in this build"); + LOG_ERROR("Sorry, Google benchmark not enabled in this build"); return EXITCODE_FAIL; } #endif // USE_BENCHMARK diff --git a/src/openrct2/cmdline/CommandLine.cpp b/src/openrct2/command_line/CommandLine.cpp similarity index 99% rename from src/openrct2/cmdline/CommandLine.cpp rename to src/openrct2/command_line/CommandLine.cpp index e24ff2d2e3..3984f7e2d5 100644 --- a/src/openrct2/cmdline/CommandLine.cpp +++ b/src/openrct2/command_line/CommandLine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -524,7 +524,7 @@ namespace CommandLine } } // namespace CommandLine -int32_t cmdline_run(const char** argv, int32_t argc) +int32_t CommandLineRun(const char** argv, int32_t argc) { auto argEnumerator = CommandLineArgEnumerator(argv, argc); diff --git a/src/openrct2/cmdline/CommandLine.hpp b/src/openrct2/command_line/CommandLine.hpp similarity index 98% rename from src/openrct2/cmdline/CommandLine.hpp rename to src/openrct2/command_line/CommandLine.hpp index 8923e8432d..3f2f6aa161 100644 --- a/src/openrct2/cmdline/CommandLine.hpp +++ b/src/openrct2/command_line/CommandLine.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/cmdline/ConvertCommand.cpp b/src/openrct2/command_line/ConvertCommand.cpp similarity index 94% rename from src/openrct2/cmdline/ConvertCommand.cpp rename to src/openrct2/command_line/ConvertCommand.cpp index 26e85358b8..ccac025d1f 100644 --- a/src/openrct2/cmdline/ConvertCommand.cpp +++ b/src/openrct2/command_line/ConvertCommand.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,7 +42,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato } const auto sourcePath = Path::GetAbsolute(rawSourcePath); - auto sourceFileType = get_file_extension_type(sourcePath.c_str()); + auto sourceFileType = GetFileExtensionType(sourcePath.c_str()); // Get the destination path const utf8* rawDestinationPath; @@ -53,7 +53,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato } const auto destinationPath = Path::GetAbsolute(rawDestinationPath); - auto destinationFileType = get_file_extension_type(destinationPath.c_str()); + auto destinationFileType = GetFileExtensionType(destinationPath.c_str()); // Validate target type if (destinationFileType != FileExtension::PARK) @@ -109,7 +109,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato if (sourceFileType == FileExtension::SC4 || sourceFileType == FileExtension::SC6) { // We are converting a scenario, so reset the park - scenario_begin(); + ScenarioBegin(); } try @@ -118,7 +118,7 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato // HACK remove the main window so it saves the park with the // correct initial view - window_close_by_class(WindowClass::MainWindow); + WindowCloseByClass(WindowClass::MainWindow); exporter->Export(destinationPath); } diff --git a/src/openrct2/cmdline/ParkInfoCommands.cpp b/src/openrct2/command_line/ParkInfoCommands.cpp similarity index 99% rename from src/openrct2/cmdline/ParkInfoCommands.cpp rename to src/openrct2/command_line/ParkInfoCommands.cpp index 8ce5ec2838..b03c003bd6 100644 --- a/src/openrct2/cmdline/ParkInfoCommands.cpp +++ b/src/openrct2/command_line/ParkInfoCommands.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/cmdline/RootCommands.cpp b/src/openrct2/command_line/RootCommands.cpp similarity index 98% rename from src/openrct2/cmdline/RootCommands.cpp rename to src/openrct2/command_line/RootCommands.cpp index d38e06c653..ae28980fd6 100644 --- a/src/openrct2/cmdline/RootCommands.cpp +++ b/src/openrct2/command_line/RootCommands.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -442,11 +442,11 @@ static void PrintAbout() static void PrintVersion() { char buffer[256]; - openrct2_write_full_version_info(buffer, sizeof(buffer)); + OpenRCT2WriteFullVersionInfo(buffer, sizeof(buffer)); Console::WriteLine(buffer); Console::WriteFormat("%s (%s)", OPENRCT2_PLATFORM, OPENRCT2_ARCHITECTURE); Console::WriteLine(); - Console::WriteFormat("Network version: %s", network_get_version().c_str()); + Console::WriteFormat("Network version: %s", NetworkGetVersion().c_str()); Console::WriteLine(); #ifdef ENABLE_SCRIPTING Console::WriteFormat("Plugin API version: %d", OpenRCT2::Scripting::OPENRCT2_PLUGIN_API_VERSION); @@ -475,7 +475,7 @@ static void PrintLaunchInformation() struct tm* tmInfo; // Print name and version information - openrct2_write_full_version_info(buffer, sizeof(buffer)); + OpenRCT2WriteFullVersionInfo(buffer, sizeof(buffer)); Console::WriteFormat("%s", buffer); Console::WriteLine(); Console::WriteFormat("%s (%s)", OPENRCT2_PLATFORM, OPENRCT2_ARCHITECTURE); diff --git a/src/openrct2/cmdline/ScreenshotCommands.cpp b/src/openrct2/command_line/ScreenshotCommands.cpp similarity index 95% rename from src/openrct2/cmdline/ScreenshotCommands.cpp rename to src/openrct2/command_line/ScreenshotCommands.cpp index 75c03584e9..2a2ce066e4 100644 --- a/src/openrct2/cmdline/ScreenshotCommands.cpp +++ b/src/openrct2/command_line/ScreenshotCommands.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -43,7 +43,7 @@ static exitcode_t HandleScreenshot(CommandLineArgEnumerator* argEnumerator) { const char** argv = const_cast(argEnumerator->GetArguments()) + argEnumerator->GetIndex(); int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex(); - int32_t result = cmdline_for_screenshot(argv, argc, &_options); + int32_t result = CommandLineForScreenshot(argv, argc, &_options); if (result < 0) { return EXITCODE_FAIL; diff --git a/src/openrct2/cmdline/SimulateCommands.cpp b/src/openrct2/command_line/SimulateCommands.cpp similarity index 97% rename from src/openrct2/cmdline/SimulateCommands.cpp rename to src/openrct2/command_line/SimulateCommands.cpp index 6d012d55c5..1dfc7526dc 100644 --- a/src/openrct2/cmdline/SimulateCommands.cpp +++ b/src/openrct2/command_line/SimulateCommands.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/cmdline/SpriteCommands.cpp b/src/openrct2/command_line/SpriteCommands.cpp similarity index 91% rename from src/openrct2/cmdline/SpriteCommands.cpp rename to src/openrct2/command_line/SpriteCommands.cpp index 27304f790c..d3cdc75460 100644 --- a/src/openrct2/cmdline/SpriteCommands.cpp +++ b/src/openrct2/command_line/SpriteCommands.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,7 +7,7 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "../CmdlineSprite.h" +#include "../CommandLineSprite.h" #include "../core/Memory.hpp" #include "../core/String.hpp" #include "CommandLine.hpp" @@ -36,6 +36,7 @@ const CommandLineCommand CommandLine::SpriteCommands[] // Main commands DefineCommand("append", " [x_offset y_offset]", SpriteOptions, HandleSprite), DefineCommand("build", " [silent]", SpriteOptions, HandleSprite), + DefineCommand("combine", " ", SpriteOptions, HandleSprite), DefineCommand("create", "", SpriteOptions, HandleSprite), DefineCommand("details", " [idx]", SpriteOptions, HandleSprite), DefineCommand("export", " ", SpriteOptions, HandleSprite), @@ -56,7 +57,7 @@ static exitcode_t HandleSprite(CommandLineArgEnumerator* argEnumerator) const char** argv = const_cast(argEnumerator->GetArguments()) + argEnumerator->GetIndex() - 1; int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex() + 1; - int32_t result = cmdline_for_sprite(argv, argc); + int32_t result = CommandLineForSprite(argv, argc); if (result < 0) { return EXITCODE_FAIL; diff --git a/src/openrct2/cmdline/UriHandler.cpp b/src/openrct2/command_line/UriHandler.cpp similarity index 98% rename from src/openrct2/cmdline/UriHandler.cpp rename to src/openrct2/command_line/UriHandler.cpp index 95b79772f4..15afe69744 100644 --- a/src/openrct2/cmdline/UriHandler.cpp +++ b/src/openrct2/command_line/UriHandler.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/common.h b/src/openrct2/common.h index d4423807b9..0038928dba 100644 --- a/src/openrct2/common.h +++ b/src/openrct2/common.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,9 +9,6 @@ #pragma once -#ifndef _USE_MATH_DEFINES -# define _USE_MATH_DEFINES -#endif #undef M_PI #ifdef _MSC_VER @@ -37,11 +34,10 @@ using colour_t = uint8_t; #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) # include -# define STUB() log_warning("Function %s at %s:%d is a stub.", __PRETTY_FUNCTION__, __FILE__, __LINE__) +# define STUB() LOG_WARNING("Function %s at %s:%d is a stub.", __PRETTY_FUNCTION__, __FILE__, __LINE__) # define _strcmpi _stricmp # define _stricmp(x, y) strcasecmp((x), (y)) # define _strnicmp(x, y, n) strncasecmp((x), (y), (n)) -# define _strdup(x) strdup((x)) # if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ # define RCT2_ENDIANNESS __ORDER_LITTLE_ENDIAN__ @@ -81,7 +77,6 @@ using fixed32_2dp = int32_t; using fixed64_1dp = int64_t; // Money is stored as a multiple of 0.10. -using money8 = fixed8_1dp; using money16 = fixed16_1dp; using money32 = fixed32_1dp; using money64 = fixed64_1dp; @@ -92,18 +87,25 @@ using money64 = fixed64_1dp; #define FIXED_1DP(whole, fraction) FIXED_XDP(1, whole, fraction) #define FIXED_2DP(whole, fraction) FIXED_XDP(10, whole, fraction) -// User defined literal to convert money literal to money32 -constexpr money32 operator"" _GBP(long double money) noexcept +// 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 money32 ToMoney32FromGBP(int32_t money) noexcept -{ - return money * 10; -} - -constexpr money32 ToMoney32FromGBP(double money) noexcept +constexpr money64 ToMoney64FromGBP(int64_t money) noexcept { return money * 10; } @@ -117,6 +119,11 @@ constexpr money64 ToMoney64FromGBP(double money) noexcept #define MONEY32_UNDEFINED (static_cast(0x80000000)) #define MONEY64_UNDEFINED (static_cast(0x8000000000000000)) +constexpr money16 ToMoney16(money64 value) +{ + return value == MONEY64_UNDEFINED ? MONEY16_UNDEFINED : value; +} + constexpr money64 ToMoney64(money32 value) { return value == MONEY32_UNDEFINED ? MONEY64_UNDEFINED : value; @@ -127,14 +134,12 @@ constexpr money64 ToMoney64(money16 value) return value == MONEY16_UNDEFINED ? MONEY64_UNDEFINED : value; } -constexpr money32 ToMoney32(money64 value) +// Note: Only valid for 5 decimal places. +constexpr int32_t operator"" _mph(long double speedMph) { - return value == MONEY64_UNDEFINED ? MONEY32_UNDEFINED : static_cast(value); -} - -constexpr money16 ToMoney16(money64 value) -{ - return value == MONEY64_UNDEFINED ? MONEY16_UNDEFINED : static_cast(value); + uint32_t wholeNumber = speedMph; + uint64_t fraction = (speedMph - wholeNumber) * 100000; + return wholeNumber << 16 | ((fraction << 16) / 100000); } using StringId = uint16_t; diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index f8fd4c840c..d6caff1787 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -147,7 +147,7 @@ namespace Config model->CustomCurrencyRate = reader->GetInt32("custom_currency_rate", 10); model->CustomCurrencyAffix = reader->GetEnum( "custom_currency_affix", CurrencyAffix::Suffix, Enum_CurrencySymbolAffix); - model->CustomCurrencySymbol = reader->GetCString("custom_currency_symbol", "Ctm"); + model->CustomCurrencySymbol = reader->GetString("custom_currency_symbol", "Ctm"); model->EdgeScrolling = reader->GetBoolean("edge_scrolling", true); model->EdgeScrollingSpeed = reader->GetInt32("edge_scrolling_speed", 12); model->FullscreenMode = reader->GetInt32("fullscreen_mode", 0); @@ -325,8 +325,8 @@ namespace Config model->ToolbarShowChat = reader->GetBoolean("toolbar_show_chat", false); model->ToolbarShowZoom = reader->GetBoolean("toolbar_show_zoom", true); model->ConsoleSmallFont = reader->GetBoolean("console_small_font", false); - model->CurrentThemePreset = reader->GetCString("current_theme", "*RCT2"); - model->CurrentTitleSequencePreset = reader->GetCString("current_title_sequence", "*OPENRCT2"); + model->CurrentThemePreset = reader->GetString("current_theme", "*RCT2"); + model->CurrentTitleSequencePreset = reader->GetString("current_title_sequence", "*OPENRCT2"); model->RandomTitleSequence = reader->GetBoolean("random_title_sequence", false); model->ObjectSelectionFilterFlags = reader->GetInt32("object_selection_filter_flags", 0x3FFF); model->ScenarioselectLastTab = reader->GetInt32("scenarioselect_last_tab", 0); @@ -362,7 +362,7 @@ namespace Config model->Device = reader->GetString("audio_device", ""); model->MasterSoundEnabled = reader->GetBoolean("master_sound", true); model->MasterVolume = reader->GetInt32("master_volume", 100); - model->TitleMusic = static_cast(reader->GetInt32("title_music", EnumValue(TitleMusicKind::Rct2))); + model->TitleMusic = static_cast(reader->GetInt32("title_music", EnumValue(TitleMusicKind::RCT2))); model->SoundEnabled = reader->GetBoolean("sound", true); model->SoundVolume = reader->GetInt32("sound_volume", 100); model->RideMusicEnabled = reader->GetBoolean("ride_music", true); @@ -511,8 +511,8 @@ namespace Config if (reader->ReadSection("font")) { auto model = &gConfigFonts; - model->FileName = reader->GetCString("file_name", nullptr); - model->FontName = reader->GetCString("font_name", nullptr); + model->FileName = reader->GetString("file_name", ""); + model->FontName = reader->GetString("font_name", ""); model->OffsetX = reader->GetInt32("x_offset", false); model->OffsetY = reader->GetInt32("y_offset", true); model->SizeTiny = reader->GetInt32("size_tiny", true); @@ -639,7 +639,7 @@ namespace Config */ static u8string FindRCT1Path() { - log_verbose("config_find_rct1_path(...)"); + LOG_VERBOSE("config_find_rct1_path(...)"); static constexpr u8string_view searchLocations[] = { R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon Deluxe)", @@ -684,7 +684,7 @@ namespace Config */ static u8string FindRCT2Path() { - log_verbose("config_find_rct2_path(...)"); + LOG_VERBOSE("config_find_rct2_path(...)"); static constexpr u8string_view searchLocations[] = { R"(C:\Program Files\Steam\steamapps\common\Rollercoaster Tycoon 2)", @@ -736,9 +736,9 @@ namespace Config { FileDialogDesc desc{}; desc.Type = FileDialogType::Open; - desc.Title = language_get_string(STR_SELECT_GOG_INSTALLER); - desc.Filters.emplace_back(language_get_string(STR_GOG_INSTALLER), "*.exe"); - desc.Filters.emplace_back(language_get_string(STR_ALL_FILES), "*"); + desc.Title = LanguageGetString(STR_SELECT_GOG_INSTALLER); + desc.Filters.emplace_back(LanguageGetString(STR_GOG_INSTALLER), "*.exe"); + desc.Filters.emplace_back(LanguageGetString(STR_ALL_FILES), "*"); const auto userHomePath = Platform::GetFolderPath(SPECIAL_FOLDER::USER_HOME); desc.InitialDirectory = userHomePath; @@ -753,14 +753,14 @@ namespace Config if (!Platform::FindApp("innoextract", &path)) { - log_error("Please install innoextract to extract files from GOG."); + LOG_ERROR("Please install innoextract to extract files from GOG."); return false; } int32_t exit_status = Platform::Execute( String::StdFormat( "%s '%s' --exclude-temp --output-dir '%s'", path.c_str(), installerPath.c_str(), targetPath.c_str()), &output); - log_info("Exit status %d", exit_status); + LOG_INFO("Exit status %d", exit_status); return exit_status == 0; } } // namespace Config @@ -775,7 +775,6 @@ PluginConfiguration gConfigPlugin; void ConfigSetDefaults() { - ConfigRelease(); Config::SetDefaults(); } @@ -786,11 +785,10 @@ bool ConfigOpen(u8string_view path) return false; } - ConfigRelease(); auto result = Config::ReadFile(path); if (result) { - currency_load_custom_currency_config(); + CurrencyLoadCustomCurrencyConfig(); } return result; } @@ -800,15 +798,6 @@ bool ConfigSave(u8string_view path) return Config::WriteFile(path); } -void ConfigRelease() -{ - SafeFree(gConfigGeneral.CustomCurrencySymbol); - SafeFree(gConfigInterface.CurrentThemePreset); - SafeFree(gConfigInterface.CurrentTitleSequencePreset); - SafeFree(gConfigFonts.FileName); - SafeFree(gConfigFonts.FontName); -} - u8string ConfigGetDefaultPath() { auto env = GetContext()->GetPlatformEnvironment(); @@ -838,7 +827,7 @@ bool ConfigFindOrBrowseInstallDirectory() auto uiContext = GetContext()->GetUiContext(); if (!uiContext->HasFilePicker()) { - uiContext->ShowMessageBox(format_string(STR_NEEDS_RCT2_FILES_MANUAL, nullptr)); + uiContext->ShowMessageBox(FormatStringID(STR_NEEDS_RCT2_FILES_MANUAL, nullptr)); return false; } @@ -847,9 +836,9 @@ bool ConfigFindOrBrowseInstallDirectory() const char* g1DatPath = PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat"; while (true) { - uiContext->ShowMessageBox(format_string(STR_NEEDS_RCT2_FILES, nullptr)); - std::string gog = language_get_string(STR_OWN_ON_GOG); - std::string hdd = language_get_string(STR_INSTALLED_ON_HDD); + uiContext->ShowMessageBox(FormatStringID(STR_NEEDS_RCT2_FILES, nullptr)); + std::string gog = LanguageGetString(STR_OWN_ON_GOG); + std::string hdd = LanguageGetString(STR_INSTALLED_ON_HDD); std::vector options; std::string chosenOption; @@ -859,7 +848,7 @@ bool ConfigFindOrBrowseInstallDirectory() options.push_back(hdd); options.push_back(gog); int optionIndex = uiContext->ShowMenuDialog( - options, language_get_string(STR_OPENRCT2_SETUP), language_get_string(STR_WHICH_APPLIES_BEST)); + 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 @@ -878,7 +867,7 @@ bool ConfigFindOrBrowseInstallDirectory() std::string installPath; if (chosenOption == hdd) { - installPath = uiContext->ShowDirectoryDialog(language_get_string(STR_PICK_RCT2_DIR)); + installPath = uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)); } else if (chosenOption == gog) { @@ -886,7 +875,7 @@ bool ConfigFindOrBrowseInstallDirectory() std::string dummy; if (!Platform::FindApp("innoextract", &dummy)) { - uiContext->ShowMessageBox(format_string(STR_INSTALL_INNOEXTRACT, nullptr)); + uiContext->ShowMessageBox(FormatStringID(STR_INSTALL_INNOEXTRACT, nullptr)); return false; } @@ -895,7 +884,7 @@ bool ConfigFindOrBrowseInstallDirectory() while (true) { - uiContext->ShowMessageBox(language_get_string(STR_PLEASE_SELECT_GOG_INSTALLER)); + uiContext->ShowMessageBox(LanguageGetString(STR_PLEASE_SELECT_GOG_INSTALLER)); utf8 gogPath[4096]; if (!Config::SelectGogInstaller(gogPath)) { @@ -903,12 +892,12 @@ bool ConfigFindOrBrowseInstallDirectory() return false; } - uiContext->ShowMessageBox(language_get_string(STR_THIS_WILL_TAKE_A_FEW_MINUTES)); + uiContext->ShowMessageBox(LanguageGetString(STR_THIS_WILL_TAKE_A_FEW_MINUTES)); if (Config::ExtractGogInstaller(gogPath, dest)) break; - uiContext->ShowMessageBox(language_get_string(STR_NOT_THE_GOG_INSTALLER)); + uiContext->ShowMessageBox(LanguageGetString(STR_NOT_THE_GOG_INSTALLER)); } installPath = Path::Combine(dest, u8"app"); @@ -924,7 +913,7 @@ bool ConfigFindOrBrowseInstallDirectory() return true; } - uiContext->ShowMessageBox(format_string(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath)); + uiContext->ShowMessageBox(FormatStringID(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath)); } } catch (const std::exception& ex) @@ -987,7 +976,7 @@ bool RCT1DataPresentAtLocation(u8string_view path) return Csg1datPresentAtLocation(path) && Csg1idatPresentAtLocation(path) && CsgAtLocationIsUsable(path); } -bool CsgIsUsable(const rct_gx& csg) +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; @@ -1012,8 +1001,8 @@ bool CsgAtLocationIsUsable(u8string_view path) size_t fileHeaderSize = fileHeader.GetLength(); size_t fileDataSize = fileData.GetLength(); - rct_gx csg = {}; - csg.header.num_entries = static_cast(fileHeaderSize / sizeof(rct_g1_element_32bit)); + 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/config/Config.h b/src/openrct2/config/Config.h index 618b6d8470..9992cf0f49 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -77,7 +77,7 @@ struct GeneralConfiguration CurrencyType CurrencyFormat; int32_t CustomCurrencyRate; CurrencyAffix CustomCurrencyAffix; - utf8* CustomCurrencySymbol; + u8string CustomCurrencySymbol; // Controls bool EdgeScrolling; @@ -130,8 +130,8 @@ struct InterfaceConfiguration bool ToolbarShowZoom; bool ConsoleSmallFont; bool RandomTitleSequence; - utf8* CurrentThemePreset; - utf8* CurrentTitleSequencePreset; + u8string CurrentThemePreset; + u8string CurrentTitleSequencePreset; int32_t ObjectSelectionFilterFlags; int32_t ScenarioselectLastTab; bool ListRideVehiclesSeparately; @@ -139,7 +139,7 @@ struct InterfaceConfiguration struct SoundConfiguration { - std::string Device; + u8string Device; bool MasterSoundEnabled; uint8_t MasterVolume; TitleMusicKind TitleMusic; @@ -152,21 +152,21 @@ struct SoundConfiguration struct NetworkConfiguration { - std::string PlayerName; + u8string PlayerName; int32_t DefaultPort; - std::string ListenAddress; - std::string DefaultPassword; + u8string ListenAddress; + u8string DefaultPassword; bool StayConnected; bool Advertise; - std::string AdvertiseAddress; + u8string AdvertiseAddress; int32_t Maxplayers; - std::string ServerName; - std::string ServerDescription; - std::string ServerGreeting; - std::string MasterServerUrl; - std::string ProviderName; - std::string ProviderEmail; - std::string ProviderWebsite; + u8string ServerName; + u8string ServerDescription; + u8string ServerGreeting; + u8string MasterServerUrl; + u8string ProviderName; + u8string ProviderEmail; + u8string ProviderWebsite; bool KnownKeysOnly; bool LogChat; bool LogServerActions; @@ -198,8 +198,8 @@ struct NotificationConfiguration struct FontConfiguration { - utf8* FileName; - utf8* FontName; + u8string FileName; + u8string FontName; int32_t OffsetX; int32_t OffsetY; int32_t SizeTiny; @@ -217,7 +217,7 @@ struct FontConfiguration struct PluginConfiguration { bool EnableHotReloading; - std::string AllowedHosts; + u8string AllowedHosts; }; enum class Sort : int32_t @@ -251,8 +251,8 @@ enum class MeasurementFormat : int32_t enum class TitleMusicKind : int32_t { None, - Rct1, - Rct2, + RCT1, + RCT2, Random }; @@ -268,7 +268,6 @@ bool ConfigOpen(u8string_view path); bool ConfigSave(u8string_view path); u8string ConfigGetDefaultPath(); void ConfigSetDefaults(); -void ConfigRelease(); bool ConfigSaveDefault(); bool ConfigFindOrBrowseInstallDirectory(); @@ -277,5 +276,5 @@ 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 rct_gx& csg); +bool CsgIsUsable(const Gx& csg); bool CsgAtLocationIsUsable(u8string_view path); diff --git a/src/openrct2/config/ConfigEnum.hpp b/src/openrct2/config/ConfigEnum.hpp index 0bfd18d1ee..302626ac48 100644 --- a/src/openrct2/config/ConfigEnum.hpp +++ b/src/openrct2/config/ConfigEnum.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/config/IniReader.cpp b/src/openrct2/config/IniReader.cpp index 2a4791ce2e..46fbbc783d 100644 --- a/src/openrct2/config/IniReader.cpp +++ b/src/openrct2/config/IniReader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -427,17 +427,6 @@ public: } }; -utf8* IIniReader::GetCString(const std::string& name, const utf8* defaultValue) const -{ - std::string szValue; - if (!TryGetString(name, &szValue)) - { - return String::Duplicate(defaultValue); - } - - return String::Duplicate(szValue.c_str()); -} - std::unique_ptr CreateIniReader(OpenRCT2::IStream* stream) { return std::make_unique(stream); diff --git a/src/openrct2/config/IniReader.hpp b/src/openrct2/config/IniReader.hpp index 99a8855e6f..7a0181329b 100644 --- a/src/openrct2/config/IniReader.hpp +++ b/src/openrct2/config/IniReader.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -45,8 +45,6 @@ struct IIniReader return configEnum.GetValue(szValue, defaultValue); } - - utf8* GetCString(const std::string& name, const utf8* defaultValue) const; }; [[nodiscard]] std::unique_ptr CreateIniReader(OpenRCT2::IStream* stream); diff --git a/src/openrct2/config/IniWriter.cpp b/src/openrct2/config/IniWriter.cpp index bfcb9e32a0..ae1372b276 100644 --- a/src/openrct2/config/IniWriter.cpp +++ b/src/openrct2/config/IniWriter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/config/IniWriter.hpp b/src/openrct2/config/IniWriter.hpp index 71851bdb29..16fd46ab88 100644 --- a/src/openrct2/config/IniWriter.hpp +++ b/src/openrct2/config/IniWriter.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Algorithm.hpp b/src/openrct2/core/Algorithm.hpp index 1dbeb32cda..e8ad32d512 100644 --- a/src/openrct2/core/Algorithm.hpp +++ b/src/openrct2/core/Algorithm.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,7 +13,7 @@ #include template> -ForwardIt binary_find(ForwardIt first, ForwardIt last, const T& value, Compare comp = {}) +ForwardIt BinaryFind(ForwardIt first, ForwardIt last, const T& value, Compare comp = {}) { first = std::lower_bound(first, last, value, comp); return first != last && !comp(value, *first) ? first : last; diff --git a/src/openrct2/core/BitSet.hpp b/src/openrct2/core/BitSet.hpp index 3c6df5c753..cd198485de 100644 --- a/src/openrct2/core/BitSet.hpp +++ b/src/openrct2/core/BitSet.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/ChecksumStream.cpp b/src/openrct2/core/ChecksumStream.cpp index 4834203c5b..e88e7a3f09 100644 --- a/src/openrct2/core/ChecksumStream.cpp +++ b/src/openrct2/core/ChecksumStream.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/ChecksumStream.h b/src/openrct2/core/ChecksumStream.h index 57f276cabf..26309b0e31 100644 --- a/src/openrct2/core/ChecksumStream.h +++ b/src/openrct2/core/ChecksumStream.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/CircularBuffer.h b/src/openrct2/core/CircularBuffer.h index 630886b2da..9348098be0 100644 --- a/src/openrct2/core/CircularBuffer.h +++ b/src/openrct2/core/CircularBuffer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Collections.hpp b/src/openrct2/core/Collections.hpp index 176dedaf71..23b5c972de 100644 --- a/src/openrct2/core/Collections.hpp +++ b/src/openrct2/core/Collections.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Console.cpp b/src/openrct2/core/Console.cpp index 8454617055..8e54204fd3 100644 --- a/src/openrct2/core/Console.cpp +++ b/src/openrct2/core/Console.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Console.hpp b/src/openrct2/core/Console.hpp index a1dd893793..e34cebc65f 100644 --- a/src/openrct2/core/Console.hpp +++ b/src/openrct2/core/Console.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Crypt.CNG.cpp b/src/openrct2/core/Crypt.CNG.cpp index 25bc2f5fd9..7e0abf6dbd 100644 --- a/src/openrct2/core/Crypt.CNG.cpp +++ b/src/openrct2/core/Crypt.CNG.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Crypt.OpenRCT2.cpp b/src/openrct2/core/Crypt.OpenRCT2.cpp index 7e948c3eea..da0ea59320 100644 --- a/src/openrct2/core/Crypt.OpenRCT2.cpp +++ b/src/openrct2/core/Crypt.OpenRCT2.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Crypt.OpenSSL.cpp b/src/openrct2/core/Crypt.OpenSSL.cpp index 6a3f33e08a..c796129ada 100644 --- a/src/openrct2/core/Crypt.OpenSSL.cpp +++ b/src/openrct2/core/Crypt.OpenSSL.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Crypt.h b/src/openrct2/core/Crypt.h index 45241b4239..8ef5d5faf6 100644 --- a/src/openrct2/core/Crypt.h +++ b/src/openrct2/core/Crypt.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/DataSerialiser.h b/src/openrct2/core/DataSerialiser.h index 3ce00b1769..bf6af6f2be 100644 --- a/src/openrct2/core/DataSerialiser.h +++ b/src/openrct2/core/DataSerialiser.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/DataSerialiserTag.h b/src/openrct2/core/DataSerialiserTag.h index 199e1e47eb..b48a54da29 100644 --- a/src/openrct2/core/DataSerialiserTag.h +++ b/src/openrct2/core/DataSerialiserTag.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/DataSerialiserTraits.h b/src/openrct2/core/DataSerialiserTraits.h index d12b9d44c0..017d7a6792 100644 --- a/src/openrct2/core/DataSerialiserTraits.h +++ b/src/openrct2/core/DataSerialiserTraits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,14 +31,14 @@ #include #include -template struct DataSerializerTraits_t +template struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const T& v) = delete; static void decode(OpenRCT2::IStream* stream, T& val) = delete; static void log(OpenRCT2::IStream* stream, const T& val) = delete; }; -template struct DataSerializerTraits_enum +template struct DataSerializerTraitsEnum { using TUnderlying = std::underlying_type_t; @@ -64,7 +64,7 @@ template struct DataSerializerTraits_enum }; template -using DataSerializerTraits = std::conditional_t, DataSerializerTraits_enum, DataSerializerTraits_t>; +using DataSerializerTraits = std::conditional_t, DataSerializerTraitsEnum, DataSerializerTraitsT>; template struct DataSerializerTraitsIntegral { @@ -89,7 +89,7 @@ template struct DataSerializerTraitsIntegral } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const bool& val) { @@ -108,43 +108,43 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t : public DataSerializerTraitsIntegral +template<> struct DataSerializerTraitsT : public DataSerializerTraitsIntegral { }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const std::string& str) { @@ -181,7 +181,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const NetworkPlayerId_t& val) { @@ -202,10 +202,10 @@ template<> struct DataSerializerTraits_t stream->Write(playerId, strlen(playerId)); - int32_t playerIndex = network_get_player_index(val.id); + int32_t playerIndex = NetworkGetPlayerIndex(val.id); if (playerIndex != -1) { - const char* playerName = network_get_player_name(playerIndex); + const char* playerName = NetworkGetPlayerName(playerIndex); if (playerName != nullptr) { stream->Write(" \"", 2); @@ -216,7 +216,7 @@ template<> struct DataSerializerTraits_t } }; -template struct DataSerializerTraits_t> +template struct DataSerializerTraitsT> { static void encode(OpenRCT2::IStream* stream, const DataSerialiserTag& tag) { @@ -241,7 +241,7 @@ template struct DataSerializerTraits_t> } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const OpenRCT2::MemoryStream& val) { @@ -309,33 +309,33 @@ template struct DataSerializerTraitsPODArray } }; -template struct DataSerializerTraits_t : public DataSerializerTraitsPODArray +template struct DataSerializerTraitsT : public DataSerializerTraitsPODArray { }; -template struct DataSerializerTraits_t : public DataSerializerTraitsPODArray +template struct DataSerializerTraitsT : public DataSerializerTraitsPODArray { }; -template struct DataSerializerTraits_t : public DataSerializerTraitsPODArray +template struct DataSerializerTraitsT : public DataSerializerTraitsPODArray { }; -template struct DataSerializerTraits_t : public DataSerializerTraitsPODArray +template struct DataSerializerTraitsT : public DataSerializerTraitsPODArray { }; -template struct DataSerializerTraits_t : public DataSerializerTraitsPODArray +template struct DataSerializerTraitsT : public DataSerializerTraitsPODArray { }; template -struct DataSerializerTraits_t[_Size]> +struct DataSerializerTraitsT[_Size]> : public DataSerializerTraitsPODArray, _Size> { }; -template struct DataSerializerTraits_t> +template struct DataSerializerTraitsT> { static void encode(OpenRCT2::IStream* stream, const std::array<_Ty, _Size>& val) { @@ -377,7 +377,7 @@ template struct DataSerializerTraits_t struct DataSerializerTraits_t> +template struct DataSerializerTraitsT> { static void encode(OpenRCT2::IStream* stream, const std::vector<_Ty>& val) { @@ -418,7 +418,7 @@ template struct DataSerializerTraits_t> } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const MapRange& v) { @@ -446,36 +446,36 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TileElement& tileElement) { - stream->WriteValue(tileElement.type); + stream->WriteValue(tileElement.Type); stream->WriteValue(tileElement.Flags); - stream->WriteValue(tileElement.base_height); - stream->WriteValue(tileElement.clearance_height); - stream->WriteValue(tileElement.owner); - for (auto v : tileElement.pad_05) + stream->WriteValue(tileElement.BaseHeight); + stream->WriteValue(tileElement.ClearanceHeight); + stream->WriteValue(tileElement.Owner); + for (auto v : tileElement.Pad05) { stream->WriteValue(v); } - for (auto v : tileElement.pad_08) + for (auto v : tileElement.Pad08) { stream->WriteValue(v); } } static void decode(OpenRCT2::IStream* stream, TileElement& tileElement) { - tileElement.type = stream->ReadValue(); + tileElement.Type = stream->ReadValue(); tileElement.Flags = stream->ReadValue(); - tileElement.base_height = stream->ReadValue(); - tileElement.clearance_height = stream->ReadValue(); - tileElement.owner = stream->ReadValue(); - for (auto& v : tileElement.pad_05) + tileElement.BaseHeight = stream->ReadValue(); + tileElement.ClearanceHeight = stream->ReadValue(); + tileElement.Owner = stream->ReadValue(); + for (auto& v : tileElement.Pad05) { v = stream->ReadValue(); } - for (auto& v : tileElement.pad_08) + for (auto& v : tileElement.Pad08) { v = stream->ReadValue(); } @@ -484,13 +484,13 @@ template<> struct DataSerializerTraits_t { char msg[128] = {}; snprintf( - msg, sizeof(msg), "TileElement(type = %u, flags = %u, base_height = %u)", tileElement.type, tileElement.Flags, - tileElement.base_height); + msg, sizeof(msg), "TileElement(type = %u, flags = %u, BaseHeight = %u)", tileElement.Type, tileElement.Flags, + tileElement.BaseHeight); stream->Write(msg, strlen(msg)); } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TileCoordsXY& coords) { @@ -511,7 +511,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const CoordsXY& coords) { @@ -532,7 +532,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const CoordsXYZ& coord) { @@ -557,7 +557,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const CoordsXYZD& coord) { @@ -585,7 +585,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const NetworkCheatType_t& val) { @@ -605,15 +605,15 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { - static void encode(OpenRCT2::IStream* stream, const rct_object_entry& val) + static void encode(OpenRCT2::IStream* stream, const RCTObjectEntry& val) { uint32_t temp = ByteSwapBE(val.flags); stream->Write(&temp); stream->WriteArray(val.nameWOC, 12); } - static void decode(OpenRCT2::IStream* stream, rct_object_entry& val) + static void decode(OpenRCT2::IStream* stream, RCTObjectEntry& val) { uint32_t temp; stream->Read(&temp); @@ -621,20 +621,20 @@ template<> struct DataSerializerTraits_t auto str = stream->ReadArray(12); memcpy(val.nameWOC, str.get(), 12); } - static void log(OpenRCT2::IStream* stream, const rct_object_entry& val) + static void log(OpenRCT2::IStream* stream, const RCTObjectEntry& val) { stream->WriteArray(val.name, 8); } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const ObjectEntryDescriptor& val) { stream->WriteValue(static_cast(val.Generation)); if (val.Generation == ObjectGeneration::DAT) { - DataSerializerTraits s; + DataSerializerTraits s; s.encode(stream, val.Entry); } else @@ -649,8 +649,8 @@ template<> struct DataSerializerTraits_t auto generation = static_cast(stream->ReadValue()); if (generation == ObjectGeneration::DAT) { - DataSerializerTraits s; - rct_object_entry entry; + DataSerializerTraits s; + RCTObjectEntry entry; s.decode(stream, entry); val = ObjectEntryDescriptor(entry); } @@ -671,7 +671,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignTrackElement& val) { @@ -691,7 +691,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignMazeElement& val) { @@ -712,7 +712,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignEntranceElement& val) { @@ -740,7 +740,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TrackDesignSceneryElement& val) { @@ -773,7 +773,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const VehicleColour& val) { @@ -795,7 +795,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const IntensityRange& val) { @@ -815,7 +815,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const PeepThought& val) { @@ -841,7 +841,7 @@ template<> struct DataSerializerTraits_t } }; -template<> struct DataSerializerTraits_t +template<> struct DataSerializerTraitsT { static void encode(OpenRCT2::IStream* stream, const TileCoordsXYZD& coord) { @@ -870,7 +870,7 @@ template<> struct DataSerializerTraits_t } }; -template struct DataSerializerTraits_t> +template struct DataSerializerTraitsT> { static void encode(OpenRCT2::IStream* stream, const TIdentifier& id) { diff --git a/src/openrct2/core/Diagnostics.cpp b/src/openrct2/core/Diagnostics.cpp index 9be2b25712..1b3f75cfab 100644 --- a/src/openrct2/core/Diagnostics.cpp +++ b/src/openrct2/core/Diagnostics.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Diagnostics.hpp b/src/openrct2/core/Diagnostics.hpp index 48bd135df6..6cda83d478 100644 --- a/src/openrct2/core/Diagnostics.hpp +++ b/src/openrct2/core/Diagnostics.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Endianness.h b/src/openrct2/core/Endianness.h index 94fa861f86..d74c2870a5 100644 --- a/src/openrct2/core/Endianness.h +++ b/src/openrct2/core/Endianness.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/EnumMap.hpp b/src/openrct2/core/EnumMap.hpp index 5d3305812f..5c2a45bca5 100644 --- a/src/openrct2/core/EnumMap.hpp +++ b/src/openrct2/core/EnumMap.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/File.cpp b/src/openrct2/core/File.cpp index 9f38c66ab9..8bdfce3093 100644 --- a/src/openrct2/core/File.cpp +++ b/src/openrct2/core/File.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ namespace File bool Exists(u8string_view path) { fs::path file = fs::u8path(path); - log_verbose("Checking if file exists: %s", u8string(path).c_str()); + LOG_VERBOSE("Checking if file exists: %s", u8string(path).c_str()); std::error_code ec; const auto result = fs::exists(file, ec); return result && ec.value() == 0; @@ -36,7 +36,7 @@ namespace File { if (!overwrite && Exists(dstPath)) { - log_warning("File::Copy(): Not overwriting %s, because overwrite flag == false", u8string(dstPath).c_str()); + LOG_WARNING("File::Copy(): Not overwriting %s, because overwrite flag == false", u8string(dstPath).c_str()); return false; } diff --git a/src/openrct2/core/File.h b/src/openrct2/core/File.h index 7c88332711..6c6dd4d075 100644 --- a/src/openrct2/core/File.h +++ b/src/openrct2/core/File.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index 7caa874ec0..7fa6b9e759 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -143,7 +143,7 @@ private: for (const auto& directory : SearchPaths) { auto absoluteDirectory = Path::GetAbsolute(directory); - log_verbose("FileIndex:Scanning for %s in '%s'", _pattern.c_str(), absoluteDirectory.c_str()); + LOG_VERBOSE("FileIndex:Scanning for %s in '%s'", _pattern.c_str(), absoluteDirectory.c_str()); auto pattern = Path::Combine(absoluteDirectory, _pattern); auto scanner = Path::ScanDirectory(pattern, true); @@ -177,7 +177,7 @@ private: if (_log_levels[static_cast(DiagnosticLevel::Verbose)]) { std::lock_guard lock(printLock); - log_verbose("FileIndex:Indexing '%s'", filePath.c_str()); + LOG_VERBOSE("FileIndex:Indexing '%s'", filePath.c_str()); } if (auto item = Create(language, filePath); item.has_value()) @@ -254,7 +254,7 @@ private: { try { - log_verbose("FileIndex:Loading index: '%s'", _indexPath.c_str()); + LOG_VERBOSE("FileIndex:Loading index: '%s'", _indexPath.c_str()); auto fs = OpenRCT2::FileStream(_indexPath, OpenRCT2::FILE_MODE_OPEN); // Read header, check if we need to re-scan @@ -294,7 +294,7 @@ private: { try { - log_verbose("FileIndex:Writing index: '%s'", _indexPath.c_str()); + LOG_VERBOSE("FileIndex:Writing index: '%s'", _indexPath.c_str()); Path::CreateDirectory(Path::GetDirectory(_indexPath)); auto fs = OpenRCT2::FileStream(_indexPath, OpenRCT2::FILE_MODE_WRITE); diff --git a/src/openrct2/core/FileScanner.cpp b/src/openrct2/core/FileScanner.cpp index e700714153..2394cad7a1 100644 --- a/src/openrct2/core/FileScanner.cpp +++ b/src/openrct2/core/FileScanner.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -73,7 +73,7 @@ private: std::stack _directoryStack; // Current - FileInfo* _currentFileInfo; + FileScanner::FileInfo* _currentFileInfo; utf8* _currentPath; public: @@ -84,7 +84,7 @@ public: _patterns = GetPatterns(Path::GetFileName(pattern)); _currentPath = Memory::Allocate(MAX_PATH); - _currentFileInfo = Memory::Allocate(); + _currentFileInfo = Memory::Allocate(); Reset(); } @@ -95,7 +95,7 @@ public: Memory::Free(_currentFileInfo); } - const FileInfo* GetFileInfo() const override + const FileScanner::FileInfo* GetFileInfo() const override { return _currentFileInfo; } @@ -349,7 +349,7 @@ void Path::QueryDirectory(QueryDirectoryResult* result, const std::string& patte auto scanner = Path::ScanDirectory(pattern, true); while (scanner->Next()) { - const FileInfo* fileInfo = scanner->GetFileInfo(); + const FileScanner::FileInfo* fileInfo = scanner->GetFileInfo(); const utf8* path = scanner->GetPath(); result->TotalFiles++; diff --git a/src/openrct2/core/FileScanner.h b/src/openrct2/core/FileScanner.h index d0c5e804af..da319d3fbd 100644 --- a/src/openrct2/core/FileScanner.h +++ b/src/openrct2/core/FileScanner.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,18 +16,21 @@ #include #include -struct FileInfo +namespace FileScanner { - const utf8* Name; - uint64_t Size; - uint64_t LastModified; -}; + struct FileInfo + { + const utf8* Name; + uint64_t Size; + uint64_t LastModified; + }; +} // namespace FileScanner struct IFileScanner { virtual ~IFileScanner() = default; - virtual const FileInfo* GetFileInfo() const abstract; + virtual const FileScanner::FileInfo* GetFileInfo() const abstract; virtual const utf8* GetPath() const abstract; virtual const utf8* GetPathRelative() const abstract; diff --git a/src/openrct2/core/FileStream.cpp b/src/openrct2/core/FileStream.cpp index 8e0818123c..90a7f7a366 100644 --- a/src/openrct2/core/FileStream.cpp +++ b/src/openrct2/core/FileStream.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/FileStream.h b/src/openrct2/core/FileStream.h index a1d2427b2a..a41711cc10 100644 --- a/src/openrct2/core/FileStream.h +++ b/src/openrct2/core/FileStream.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/FileSystem.hpp b/src/openrct2/core/FileSystem.hpp index 791bd3cca6..7e1213078d 100644 --- a/src/openrct2/core/FileSystem.hpp +++ b/src/openrct2/core/FileSystem.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/FileWatcher.cpp b/src/openrct2/core/FileWatcher.cpp index c38a0263cb..439be15859 100644 --- a/src/openrct2/core/FileWatcher.cpp +++ b/src/openrct2/core/FileWatcher.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,8 +18,11 @@ # include # include # include +#elif defined(__APPLE__) +# include #endif +#include "../core/Guard.hpp" #include "../core/Path.hpp" #include "../core/String.hpp" #include "FileSystem.hpp" @@ -41,11 +44,11 @@ void FileWatcher::FileDescriptor::Initialise() fcntl(fd, F_SETFL, flags | O_NONBLOCK); Fd = fd; - log_verbose("FileWatcher: inotify_init succeeded"); + LOG_VERBOSE("FileWatcher: inotify_init succeeded"); } else { - log_verbose("FileWatcher: inotify_init failed"); + LOG_VERBOSE("FileWatcher: inotify_init failed"); throw std::runtime_error("inotify_init failed"); } } @@ -66,11 +69,11 @@ FileWatcher::WatchDescriptor::WatchDescriptor(int fd, const std::string& path) { if (Wd >= 0) { - log_verbose("FileWatcher: inotify watch added for %s", path.c_str()); + LOG_VERBOSE("FileWatcher: inotify watch added for %s", path.c_str()); } else { - log_verbose("FileWatcher: inotify_add_watch failed for %s", path.c_str()); + LOG_VERBOSE("FileWatcher: inotify_add_watch failed for %s", path.c_str()); throw std::runtime_error("inotify_add_watch failed for '" + path + "'"); } } @@ -78,7 +81,40 @@ FileWatcher::WatchDescriptor::WatchDescriptor(int fd, const std::string& path) FileWatcher::WatchDescriptor::~WatchDescriptor() { inotify_rm_watch(Fd, Wd); - log_verbose("FileWatcher: inotify watch removed"); + LOG_VERBOSE("FileWatcher: inotify watch removed"); +} +#endif + +#if defined(__APPLE__) + +static int eventModified = kFSEventStreamEventFlagItemFinderInfoMod | kFSEventStreamEventFlagItemModified + | kFSEventStreamEventFlagItemInodeMetaMod | kFSEventStreamEventFlagItemChangeOwner | kFSEventStreamEventFlagItemXattrMod; + +static int eventRenamed = kFSEventStreamEventFlagItemCreated | kFSEventStreamEventFlagItemRemoved + | kFSEventStreamEventFlagItemRenamed; + +void FileWatcher::FSEventsCallback( + ConstFSEventStreamRef streamRef, void* clientCallBackInfo, size_t numEvents, void* eventPaths, + const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) +{ + FileWatcher* fileWatcher = static_cast(clientCallBackInfo); + + Guard::Assert(fileWatcher != nullptr, "FileWatcher is null"); + Guard::Assert(fileWatcher->OnFileChanged != nullptr, "OnFileChanged is null"); + + char** paths = static_cast(eventPaths); + for (size_t i = 0; i < numEvents; i++) + { + if (eventFlags[i] & eventModified) + LOG_VERBOSE("Modified: %s\n", paths[i]); + if (eventFlags[i] & eventRenamed) + LOG_VERBOSE("Renamed: %s\n", paths[i]); + + if (eventFlags[i] & eventModified || eventFlags[i] & eventRenamed) + { + fileWatcher->OnFileChanged(paths[i]); + } + } } #endif @@ -103,6 +139,22 @@ FileWatcher::FileWatcher(u8string_view directoryPath) _watchDescs.emplace_back(_fileDesc.Fd, p.path().string()); } } +#elif defined(__APPLE__) + CFStringRef path = CFStringCreateWithCString(kCFAllocatorDefault, directoryPath.data(), kCFStringEncodingUTF8); + CFArrayRef pathsToWatch = CFArrayCreate(kCFAllocatorDefault, reinterpret_cast(&path), 1, nullptr); + CFAbsoluteTime latencyInSeconds = 0.5; + FSEventStreamContext context = { 0, this, nullptr, nullptr, nullptr }; + + _stream = FSEventStreamCreate( + NULL, &FSEventsCallback, &context, pathsToWatch, kFSEventStreamEventIdSinceNow, latencyInSeconds, + kFSEventStreamCreateFlagFileEvents); + + if (!_stream) + { + throw std::runtime_error("Unable to create FSEventStream"); + } + + _runLoop = CFRunLoopGetCurrent(); #else throw std::runtime_error("FileWatcher not supported on this platform."); #endif @@ -119,6 +171,16 @@ FileWatcher::~FileWatcher() _finished = true; _watchThread.join(); _fileDesc.Close(); +#elif defined(__APPLE__) + if (_stream) + { + FSEventStreamStop(_stream); + FSEventStreamUnscheduleFromRunLoop(_stream, _runLoop, kCFRunLoopDefaultMode); + FSEventStreamInvalidate(_stream); + FSEventStreamRelease(_stream); + } + _watchThread.join(); + _stream = nullptr; #else return; #endif @@ -149,14 +211,14 @@ void FileWatcher::WatchDirectory() } } #elif defined(__linux__) - log_verbose("FileWatcher: reading event data..."); + LOG_VERBOSE("FileWatcher: reading event data..."); std::array eventData; while (!_finished) { int length = read(_fileDesc.Fd, eventData.data(), eventData.size()); if (length >= 0) { - log_verbose("FileWatcher: inotify event data received"); + LOG_VERBOSE("FileWatcher: inotify event data received"); auto onFileChanged = OnFileChanged; if (onFileChanged) { @@ -166,7 +228,7 @@ void FileWatcher::WatchDirectory() auto e = reinterpret_cast(eventData.data() + offset); if ((e->mask & IN_CLOSE_WRITE) && !(e->mask & IN_ISDIR)) { - log_verbose("FileWatcher: inotify event received for %s", e->name); + LOG_VERBOSE("FileWatcher: inotify event received for %s", e->name); // Find watch descriptor int wd = e->wd; @@ -186,5 +248,12 @@ void FileWatcher::WatchDirectory() // Sleep for 1/2 second usleep(500000); } +#elif defined(__APPLE__) + if (_stream) + { + FSEventStreamScheduleWithRunLoop(_stream, _runLoop, kCFRunLoopDefaultMode); + FSEventStreamStart(_stream); + CFRunLoopRun(); + } #endif } diff --git a/src/openrct2/core/FileWatcher.h b/src/openrct2/core/FileWatcher.h index 8fcc0f5a2c..bac6617866 100644 --- a/src/openrct2/core/FileWatcher.h +++ b/src/openrct2/core/FileWatcher.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,8 @@ # include "FileSystem.hpp" typedef void* HANDLE; +#elif defined(__APPLE__) +# include #endif /** @@ -54,6 +56,9 @@ private: FileDescriptor _fileDesc; std::vector _watchDescs; +#elif defined(__APPLE__) + FSEventStreamRef _stream{}; + CFRunLoopRef _runLoop{}; #endif public: @@ -65,6 +70,10 @@ public: private: #if defined(_WIN32) || defined(__linux__) bool _finished{}; +#elif defined(__APPLE__) + static void FSEventsCallback( + ConstFSEventStreamRef streamRef, void* clientCallBackInfo, size_t numEvents, void* eventPaths, + const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]); #endif void WatchDirectory(); diff --git a/src/openrct2/core/FixedVector.h b/src/openrct2/core/FixedVector.h index c2a59e8b1f..058b5865dd 100644 --- a/src/openrct2/core/FixedVector.h +++ b/src/openrct2/core/FixedVector.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/GroupVector.hpp b/src/openrct2/core/GroupVector.hpp index 8a9be3d1f4..74f596dbfb 100644 --- a/src/openrct2/core/GroupVector.hpp +++ b/src/openrct2/core/GroupVector.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Guard.cpp b/src/openrct2/core/Guard.cpp index fdeefaf688..72433fc238 100644 --- a/src/openrct2/core/Guard.cpp +++ b/src/openrct2/core/Guard.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Guard.hpp b/src/openrct2/core/Guard.hpp index ff61fd7198..58d4b3d690 100644 --- a/src/openrct2/core/Guard.hpp +++ b/src/openrct2/core/Guard.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Http.WinHttp.cpp b/src/openrct2/core/Http.WinHttp.cpp index 9c84f1e1fb..742a5ef09e 100644 --- a/src/openrct2/core/Http.WinHttp.cpp +++ b/src/openrct2/core/Http.WinHttp.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Http.cURL.cpp b/src/openrct2/core/Http.cURL.cpp index 85d4a3c9b3..ec57f1c7df 100644 --- a/src/openrct2/core/Http.cURL.cpp +++ b/src/openrct2/core/Http.cURL.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,7 +29,7 @@ namespace Http { - static size_t writeData(const char* src, size_t size, size_t nmemb, void* userdata) + static size_t WriteData(const char* src, size_t size, size_t nmemb, void* userdata) { size_t realsize = size * nmemb; Response* res = static_cast(userdata); @@ -38,7 +38,7 @@ namespace Http return realsize; } - static size_t header_callback(const char* src, size_t size, size_t nitems, void* userdata) + static size_t HeaderCallback(const char* src, size_t size, size_t nitems, void* userdata) { size_t realsize = nitems * size; Response* res = static_cast(userdata); @@ -62,7 +62,7 @@ namespace Http size_t sizeleft; }; - static size_t read_callback(void* dst, size_t size, size_t nmemb, void* userp) + static size_t ReadCallback(void* dst, size_t size, size_t nmemb, void* userp) { WriteThis* wt = static_cast(userp); size_t buffer_size = size * nmemb; @@ -98,7 +98,7 @@ namespace Http wt.readptr = req.body.c_str(); wt.sizeleft = req.body.size(); - curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); + curl_easy_setopt(curl, CURLOPT_READFUNCTION, ReadCallback); curl_easy_setopt(curl, CURLOPT_READDATA, &wt); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, static_cast(wt.sizeleft)); } @@ -114,9 +114,9 @@ namespace Http curl_easy_setopt(curl, CURLOPT_URL, req.url.c_str()); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeData); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteData); curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast(&res)); - curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback); + curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, HeaderCallback); curl_easy_setopt(curl, CURLOPT_HEADERDATA, static_cast(&res)); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, true); diff --git a/src/openrct2/core/Http.h b/src/openrct2/core/Http.h index 3f0dd478f3..f790e6b020 100644 --- a/src/openrct2/core/Http.h +++ b/src/openrct2/core/Http.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/IStream.cpp b/src/openrct2/core/IStream.cpp index 46d4da54cc..418d967c72 100644 --- a/src/openrct2/core/IStream.cpp +++ b/src/openrct2/core/IStream.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/IStream.hpp b/src/openrct2/core/IStream.hpp index e586d407cb..389283c7a2 100644 --- a/src/openrct2/core/IStream.hpp +++ b/src/openrct2/core/IStream.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Identifier.hpp b/src/openrct2/core/Identifier.hpp index 110f889fe3..906a642155 100644 --- a/src/openrct2/core/Identifier.hpp +++ b/src/openrct2/core/Identifier.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Imaging.cpp b/src/openrct2/core/Imaging.cpp index e250b8b3ff..1d4e59aca3 100644 --- a/src/openrct2/core/Imaging.cpp +++ b/src/openrct2/core/Imaging.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -51,12 +51,12 @@ namespace Imaging static void PngWarning(png_structp, const char* b) { - log_warning(b); + LOG_WARNING(b); } static void PngError(png_structp, const char* b) { - log_error(b); + LOG_ERROR(b); } static Image ReadPng(std::istream& istream, bool expandTo32) diff --git a/src/openrct2/core/Imaging.h b/src/openrct2/core/Imaging.h index cf2090adb5..879f1c0198 100644 --- a/src/openrct2/core/Imaging.h +++ b/src/openrct2/core/Imaging.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,7 +18,7 @@ #include #include -struct rct_drawpixelinfo; +struct DrawPixelInfo; enum class IMAGE_FORMAT { diff --git a/src/openrct2/core/JobPool.cpp b/src/openrct2/core/JobPool.cpp index ad848dccff..9c71a7d795 100644 --- a/src/openrct2/core/JobPool.cpp +++ b/src/openrct2/core/JobPool.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/JobPool.h b/src/openrct2/core/JobPool.h index 80c2654edc..5d321f66e8 100644 --- a/src/openrct2/core/JobPool.h +++ b/src/openrct2/core/JobPool.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Json.cpp b/src/openrct2/core/Json.cpp index 2bca8f93cd..f5fbbfd7c3 100644 --- a/src/openrct2/core/Json.cpp +++ b/src/openrct2/core/Json.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -63,7 +63,7 @@ namespace Json } catch (const json_t::exception& e) { - log_error("Unable to parse JSON string (%.*s)\n\t%s", static_cast(raw.length()), raw.data(), e.what()); + LOG_ERROR("Unable to parse JSON string (%.*s)\n\t%s", static_cast(raw.length()), raw.data(), e.what()); } return json; @@ -79,7 +79,7 @@ namespace Json } catch (const json_t::exception& e) { - log_error("Unable to parse JSON vector (%.*s)\n\t%s", static_cast(vec.size()), vec.data(), e.what()); + LOG_ERROR("Unable to parse JSON vector (%.*s)\n\t%s", static_cast(vec.size()), vec.data(), e.what()); } return json; diff --git a/src/openrct2/core/Json.hpp b/src/openrct2/core/Json.hpp index 98ff45f188..ac3df41d8b 100644 --- a/src/openrct2/core/Json.hpp +++ b/src/openrct2/core/Json.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/JsonFwd.hpp b/src/openrct2/core/JsonFwd.hpp index c0b85f3536..11713c2e8d 100644 --- a/src/openrct2/core/JsonFwd.hpp +++ b/src/openrct2/core/JsonFwd.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Memory.hpp b/src/openrct2/core/Memory.hpp index 2479dc72b3..d351f9bfc2 100644 --- a/src/openrct2/core/Memory.hpp +++ b/src/openrct2/core/Memory.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/MemoryStream.cpp b/src/openrct2/core/MemoryStream.cpp index 8726122fcc..4bd6a265d8 100644 --- a/src/openrct2/core/MemoryStream.cpp +++ b/src/openrct2/core/MemoryStream.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/MemoryStream.h b/src/openrct2/core/MemoryStream.h index f58f5b8ec2..3872680538 100644 --- a/src/openrct2/core/MemoryStream.h +++ b/src/openrct2/core/MemoryStream.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Meta.hpp b/src/openrct2/core/Meta.hpp index cc09c04e23..b230b29b8b 100644 --- a/src/openrct2/core/Meta.hpp +++ b/src/openrct2/core/Meta.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Numerics.hpp b/src/openrct2/core/Numerics.hpp index 23db82e463..41621dad4e 100644 --- a/src/openrct2/core/Numerics.hpp +++ b/src/openrct2/core/Numerics.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/OrcaStream.hpp b/src/openrct2/core/OrcaStream.hpp index ae8843e945..9560ff02b5 100644 --- a/src/openrct2/core/OrcaStream.hpp +++ b/src/openrct2/core/OrcaStream.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Path.cpp b/src/openrct2/core/Path.cpp index 0ec1d14942..894a097224 100644 --- a/src/openrct2/core/Path.cpp +++ b/src/openrct2/core/Path.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Path.hpp b/src/openrct2/core/Path.hpp index 98b7063dc6..8ccf2aea39 100644 --- a/src/openrct2/core/Path.hpp +++ b/src/openrct2/core/Path.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/RTL.FriBidi.cpp b/src/openrct2/core/RTL.FriBidi.cpp index f4b9fa30a6..3b398a5e08 100644 --- a/src/openrct2/core/RTL.FriBidi.cpp +++ b/src/openrct2/core/RTL.FriBidi.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -59,7 +59,7 @@ std::string FixRTL(std::string& input) { if (!hasWarned) { - log_warning("This build of OpenRCT2 cannot properly handle right-to-left text!"); + LOG_WARNING("This build of OpenRCT2 cannot properly handle right-to-left text!"); hasWarned = true; } diff --git a/src/openrct2/core/RTL.ICU.cpp b/src/openrct2/core/RTL.ICU.cpp index 687aa88b44..98f228b83e 100644 --- a/src/openrct2/core/RTL.ICU.cpp +++ b/src/openrct2/core/RTL.ICU.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/RTL.h b/src/openrct2/core/RTL.h index 09c2eccda6..11d00f0d5a 100644 --- a/src/openrct2/core/RTL.h +++ b/src/openrct2/core/RTL.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Random.hpp b/src/openrct2/core/Random.hpp index f04bbca789..3ba33a1681 100644 --- a/src/openrct2/core/Random.hpp +++ b/src/openrct2/core/Random.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -186,10 +186,10 @@ namespace Random } }; - namespace Rct2 + namespace RCT2 { using Engine = RotateEngine; using Seed = FixedSeedSequence<2>; using State = Engine::state_type; - } // namespace Rct2 + } // namespace RCT2 } // namespace Random diff --git a/src/openrct2/core/Range.hpp b/src/openrct2/core/Range.hpp index 9a2732894f..ae05c0b409 100644 --- a/src/openrct2/core/Range.hpp +++ b/src/openrct2/core/Range.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index 76c4574ed6..ccdd7d0fbf 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -297,7 +297,7 @@ namespace String size_t LengthOf(const utf8* str) { - return utf8_length(str); + return UTF8Length(str); } size_t SizeOf(const utf8* str) @@ -307,7 +307,7 @@ namespace String utf8* Set(utf8* buffer, size_t bufferSize, const utf8* src) { - return safe_strcpy(buffer, src, bufferSize); + return SafeStrCpy(buffer, src, bufferSize); } utf8* Set(utf8* buffer, size_t bufferSize, const utf8* src, size_t srcSize) @@ -327,7 +327,7 @@ namespace String utf8* Append(utf8* buffer, size_t bufferSize, const utf8* src) { - return safe_strcat(buffer, src, bufferSize); + return SafeStrCat(buffer, src, bufferSize); } utf8* Format(utf8* buffer, size_t bufferSize, const utf8* format, ...) @@ -374,7 +374,7 @@ namespace String return u8string(buffer, buffer + len); } - log_warning("Encoding error occured"); + LOG_WARNING("Encoding error occured"); return u8string{}; } @@ -403,35 +403,6 @@ namespace String return buffer; } - utf8* Duplicate(const std::string& src) - { - return String::Duplicate(src.c_str()); - } - - utf8* Duplicate(const utf8* src) - { - utf8* result = nullptr; - if (src != nullptr) - { - size_t srcSize = SizeOf(src) + 1; - result = Memory::Allocate(srcSize); - std::memcpy(result, src, srcSize); - } - return result; - } - - utf8* DiscardUse(utf8** ptr, utf8* replacement) - { - Memory::Free(*ptr); - *ptr = replacement; - return replacement; - } - - utf8* DiscardDuplicate(utf8** ptr, const utf8* replacement) - { - return DiscardUse(ptr, String::Duplicate(replacement)); - } - std::vector Split(std::string_view s, std::string_view delimiter) { if (delimiter.empty()) @@ -478,7 +449,7 @@ namespace String size_t GetCodepointLength(codepoint_t codepoint) { - return utf8_get_codepoint_length(codepoint); + return UTF8GetCodepointLength(codepoint); } codepoint_t GetNextCodepoint(utf8* ptr, utf8** nextPtr) @@ -488,18 +459,18 @@ namespace String codepoint_t GetNextCodepoint(const utf8* ptr, const utf8** nextPtr) { - return utf8_get_next(ptr, nextPtr); + return UTF8GetNext(ptr, nextPtr); } utf8* WriteCodepoint(utf8* dst, codepoint_t codepoint) { - return utf8_write_codepoint(dst, codepoint); + return UTF8WriteCodepoint(dst, codepoint); } void AppendCodepoint(std::string& str, codepoint_t codepoint) { char buffer[8]{}; - utf8_write_codepoint(buffer, codepoint); + UTF8WriteCodepoint(buffer, codepoint); str.append(buffer); } @@ -695,7 +666,7 @@ namespace String { // Check the error auto error = GetLastError(); - log_warning("LCMapStringEx failed with %d", error); + LOG_WARNING("LCMapStringEx failed with %d", error); return std::string(src); } @@ -755,5 +726,5 @@ namespace String char32_t CodepointView::iterator::GetNextCodepoint(const char* ch, const char** next) { - return utf8_get_next(ch, next); + return UTF8GetNext(ch, next); } diff --git a/src/openrct2/core/String.hpp b/src/openrct2/core/String.hpp index 8b01fb4f60..49389b0804 100644 --- a/src/openrct2/core/String.hpp +++ b/src/openrct2/core/String.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -82,18 +82,6 @@ namespace String u8string StdFormat(const utf8* format, ...); u8string Format_VA(const utf8* format, va_list args); utf8* AppendFormat(utf8* buffer, size_t bufferSize, const utf8* format, ...); - utf8* Duplicate(const std::string& src); - utf8* Duplicate(const utf8* src); - - /** - * Helper method to free the string a string pointer points to and set it to a replacement string. - */ - utf8* DiscardUse(utf8** ptr, utf8* replacement); - - /** - * Helper method to free the string a string pointer points to and set it to a copy of a replacement string. - */ - utf8* DiscardDuplicate(utf8** ptr, const utf8* replacement); /** * Splits the given string by a delimiter and returns the values as a new string array. diff --git a/src/openrct2/core/StringBuilder.cpp b/src/openrct2/core/StringBuilder.cpp index b5730df0e2..96842d6760 100644 --- a/src/openrct2/core/StringBuilder.cpp +++ b/src/openrct2/core/StringBuilder.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/StringBuilder.h b/src/openrct2/core/StringBuilder.h index 1723d114d1..52c46ed983 100644 --- a/src/openrct2/core/StringBuilder.h +++ b/src/openrct2/core/StringBuilder.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/StringReader.cpp b/src/openrct2/core/StringReader.cpp index f0e329ff3e..b26f4e3bfe 100644 --- a/src/openrct2/core/StringReader.cpp +++ b/src/openrct2/core/StringReader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/StringReader.h b/src/openrct2/core/StringReader.h index 477daf8608..8918ec45a1 100644 --- a/src/openrct2/core/StringReader.h +++ b/src/openrct2/core/StringReader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Timer.hpp b/src/openrct2/core/Timer.hpp index 9ee2913a2c..4372ab861a 100644 --- a/src/openrct2/core/Timer.hpp +++ b/src/openrct2/core/Timer.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/Zip.cpp b/src/openrct2/core/Zip.cpp index 4aa9c6f280..fea5e7366f 100644 --- a/src/openrct2/core/Zip.cpp +++ b/src/openrct2/core/Zip.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -169,13 +169,19 @@ public: auto source = zip_source_buffer(_zip, writeBuffer.data(), writeBuffer.size(), 0); auto index = GetIndexFromPath(path); + zip_int64_t res = 0; if (index.has_value()) { - zip_replace(_zip, index.value(), source); + res = zip_file_replace(_zip, index.value(), source, 0); } else { - zip_add(_zip, path.data(), source); + res = zip_file_add(_zip, path.data(), source, 0); + } + if (res == -1) + { + zip_source_free(source); + throw std::runtime_error(std::string(zip_strerror(_zip))); } } diff --git a/src/openrct2/core/Zip.h b/src/openrct2/core/Zip.h index 19d9ba9f7b..e4f006f370 100644 --- a/src/openrct2/core/Zip.h +++ b/src/openrct2/core/Zip.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/core/ZipAndroid.cpp b/src/openrct2/core/ZipAndroid.cpp index 0430c026cc..6b1083fa9a 100644 --- a/src/openrct2/core/ZipAndroid.cpp +++ b/src/openrct2/core/ZipAndroid.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,7 @@ # include # include +# include using namespace OpenRCT2; @@ -76,11 +77,7 @@ public: jstring jniString = (jstring)env->CallObjectMethod(_zip, fileNameMethod, (jint)index); const char* jniChars = env->GetStringUTFChars(jniString, nullptr); - - utf8* string = (char*)malloc(strlen(jniChars) + 1); - std::memcpy((void*)string, jniChars, strlen(jniChars)); - string[strlen(jniChars)] = 0x00; - + std::string string = jniChars; env->ReleaseStringUTFChars(jniString, jniChars); return string; diff --git a/src/openrct2/core/ZipStream.hpp b/src/openrct2/core/ZipStream.hpp index 244aaa09d9..e37ed8e4f5 100644 --- a/src/openrct2/core/ZipStream.hpp +++ b/src/openrct2/core/ZipStream.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/drawing/AVX2Drawing.cpp b/src/openrct2/drawing/AVX2Drawing.cpp index a586eb0638..f83a210494 100644 --- a/src/openrct2/drawing/AVX2Drawing.cpp +++ b/src/openrct2/drawing/AVX2Drawing.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ # include -void mask_avx2( +void MaskAvx2( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { @@ -38,7 +38,7 @@ void mask_avx2( } else { - mask_scalar(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); + MaskScalar(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); } } @@ -48,7 +48,7 @@ void mask_avx2( # error You have to compile this file with AVX2 enabled, when targeting x86! # endif -void mask_avx2( +void MaskAvx2( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { diff --git a/src/openrct2/drawing/Drawing.Sprite.BMP.cpp b/src/openrct2/drawing/Drawing.Sprite.BMP.cpp index 2dabac0c43..7da0fdf90c 100644 --- a/src/openrct2/drawing/Drawing.Sprite.BMP.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.BMP.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,7 +9,7 @@ #include "Drawing.h" -template static void FASTCALL DrawBMPSpriteMagnify(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +template static void FASTCALL DrawBMPSpriteMagnify(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { auto& g1 = args.SourceImage; auto src = g1.offset + ((static_cast(g1.width) * args.SrcY) + args.SrcX); @@ -35,7 +35,7 @@ template static void FASTCALL DrawBMPSpriteMagnify(rct_dra } } -template static void FASTCALL DrawBMPSpriteMinify(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +template static void FASTCALL DrawBMPSpriteMinify(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { auto& g1 = args.SourceImage; auto src = g1.offset + ((static_cast(g1.width) * args.SrcY) + args.SrcX); @@ -60,7 +60,7 @@ template static void FASTCALL DrawBMPSpriteMinify(rct_draw } } -template static void FASTCALL DrawBMPSprite(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +template static void FASTCALL DrawBMPSprite(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { if (dpi.zoom_level < ZoomLevel{ 0 }) { @@ -78,7 +78,7 @@ template static void FASTCALL DrawBMPSprite(rct_drawpixeli * rct2: 0x0067A690 * @param imageId Only flags are used. */ -void FASTCALL gfx_bmp_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +void FASTCALL GfxBmpSpriteToBuffer(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { auto imageId = args.Image; diff --git a/src/openrct2/drawing/Drawing.Sprite.RLE.cpp b/src/openrct2/drawing/Drawing.Sprite.RLE.cpp index 6deeb6a5b9..d1911e43eb 100644 --- a/src/openrct2/drawing/Drawing.Sprite.RLE.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.RLE.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,7 +13,7 @@ #include template -static void FASTCALL DrawRLESpriteMagnify(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +static void FASTCALL DrawRLESpriteMagnify(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { auto src0 = args.SourceImage.offset; auto dst0 = args.DestinationBits; @@ -84,7 +84,7 @@ static void FASTCALL DrawRLESpriteMagnify(rct_drawpixelinfo& dpi, const DrawSpri } template -static void FASTCALL DrawRLESpriteMinify(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +static void FASTCALL DrawRLESpriteMinify(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { auto src0 = args.SourceImage.offset; auto dst0 = args.DestinationBits; @@ -178,7 +178,7 @@ static void FASTCALL DrawRLESpriteMinify(rct_drawpixelinfo& dpi, const DrawSprit } } -template static void FASTCALL DrawRLESprite(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +template static void FASTCALL DrawRLESprite(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { auto zoom_level = static_cast(dpi.zoom_level); switch (zoom_level) @@ -213,7 +213,7 @@ template static void FASTCALL DrawRLESprite(rct_drawpixeli * rct2: 0x0067AA18 * @param imageId Only flags are used. */ -void FASTCALL gfx_rle_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +void FASTCALL GfxRleSpriteToBuffer(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { if (args.Image.HasPrimary()) { diff --git a/src/openrct2/drawing/Drawing.Sprite.cpp b/src/openrct2/drawing/Drawing.Sprite.cpp index f063af8d34..d60fe22e17 100644 --- a/src/openrct2/drawing/Drawing.Sprite.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -70,10 +70,10 @@ static inline uint32_t rctc_to_rct2_index(uint32_t image) } // clang-format on -static void read_and_convert_gxdat(IStream* stream, size_t count, bool is_rctc, rct_g1_element* elements) +static void ReadAndConvertGxDat(IStream* stream, size_t count, bool is_rctc, G1Element* elements) { - auto g1Elements32 = std::make_unique(count); - stream->Read(g1Elements32.get(), count * sizeof(rct_g1_element_32bit)); + auto g1Elements32 = std::make_unique(count); + stream->Read(g1Elements32.get(), count * sizeof(RCTG1Element)); if (is_rctc) { // Process RCTC's g1.dat file @@ -102,7 +102,7 @@ static void read_and_convert_gxdat(IStream* stream, size_t count, bool is_rctc, break; } - const rct_g1_element_32bit& src = g1Elements32[rctc]; + const RCTG1Element& src = g1Elements32[rctc]; // Double cast to silence compiler warning about casting to // pointer from integer of mismatched length. @@ -141,7 +141,7 @@ static void read_and_convert_gxdat(IStream* stream, size_t count, bool is_rctc, { for (size_t i = 0; i < count; i++) { - const rct_g1_element_32bit& src = g1Elements32[i]; + const RCTG1Element& src = g1Elements32[i]; // Double cast to silence compiler warning about casting to // pointer from integer of mismatched length. @@ -156,7 +156,7 @@ static void read_and_convert_gxdat(IStream* stream, size_t count, bool is_rctc, } } -void mask_scalar( +void MaskScalar( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { @@ -180,30 +180,30 @@ void mask_scalar( } } -static rct_gx _g1 = {}; -static rct_gx _g2 = {}; -static rct_gx _csg = {}; -static rct_g1_element _scrollingText[MaxScrollingTextEntries]{}; +static Gx _g1 = {}; +static Gx _g2 = {}; +static Gx _csg = {}; +static G1Element _scrollingText[MaxScrollingTextEntries]{}; static bool _csgLoaded = false; -static rct_g1_element _g1Temp = {}; -static std::vector _imageListElements; +static G1Element _g1Temp = {}; +static std::vector _imageListElements; bool gTinyFontAntiAliased = false; /** * * rct2: 0x00678998 */ -bool gfx_load_g1(const IPlatformEnvironment& env) +bool GfxLoadG1(const IPlatformEnvironment& env) { - log_verbose("gfx_load_g1(...)"); + LOG_VERBOSE("GfxLoadG1(...)"); try { auto path = env.FindFile(DIRBASE::RCT2, DIRID::DATA, u8"g1.dat"); auto fs = FileStream(path, FILE_MODE_OPEN); - _g1.header = fs.ReadValue(); + _g1.header = fs.ReadValue(); - log_verbose("g1.dat, number of entries: %u", _g1.header.num_entries); + LOG_VERBOSE("g1.dat, number of entries: %u", _g1.header.num_entries); if (_g1.header.num_entries < SPR_G1_END) { @@ -213,7 +213,7 @@ bool gfx_load_g1(const IPlatformEnvironment& env) // Read element headers bool is_rctc = _g1.header.num_entries == SPR_RCTC_G1_END; _g1.elements.resize(_g1.header.num_entries); - read_and_convert_gxdat(&fs, _g1.header.num_entries, is_rctc, _g1.elements.data()); + ReadAndConvertGxDat(&fs, _g1.header.num_entries, is_rctc, _g1.elements.data()); gTinyFontAntiAliased = is_rctc; // Read element data @@ -231,7 +231,7 @@ bool gfx_load_g1(const IPlatformEnvironment& env) _g1.elements.clear(); _g1.elements.shrink_to_fit(); - log_fatal("Unable to load g1 graphics"); + LOG_FATAL("Unable to load g1 graphics"); if (!gOpenRCT2Headless) { auto uiContext = GetContext()->GetUiContext(); @@ -241,30 +241,30 @@ bool gfx_load_g1(const IPlatformEnvironment& env) } } -void gfx_unload_g1() +void GfxUnloadG1() { _g1.data.reset(); _g1.elements.clear(); _g1.elements.shrink_to_fit(); } -void gfx_unload_g2() +void GfxUnloadG2() { _g2.data.reset(); _g2.elements.clear(); _g2.elements.shrink_to_fit(); } -void gfx_unload_csg() +void GfxUnloadCsg() { _csg.data.reset(); _csg.elements.clear(); _csg.elements.shrink_to_fit(); } -bool gfx_load_g2() +bool GfxLoadG2() { - log_verbose("gfx_load_g2()"); + LOG_VERBOSE("GfxLoadG2()"); auto env = GetContext()->GetPlatformEnvironment(); @@ -273,11 +273,11 @@ bool gfx_load_g2() try { auto fs = FileStream(path, FILE_MODE_OPEN); - _g2.header = fs.ReadValue(); + _g2.header = fs.ReadValue(); // Read element headers _g2.elements.resize(_g2.header.num_entries); - read_and_convert_gxdat(&fs, _g2.header.num_entries, false, _g2.elements.data()); + ReadAndConvertGxDat(&fs, _g2.header.num_entries, false, _g2.elements.data()); // Read element data _g2.data = fs.ReadArray(_g2.header.total_size); @@ -287,7 +287,7 @@ bool gfx_load_g2() std::string errorMessage = "Mismatched g2.dat size.\nExpected: " + std::to_string(G2_SPRITE_COUNT) + "\nActual: " + std::to_string(_g2.header.num_entries) + "\ng2.dat may be installed improperly.\nPath to g2.dat: " + path; - log_error(errorMessage.c_str()); + LOG_ERROR(errorMessage.c_str()); if (!gOpenRCT2Headless) { @@ -310,7 +310,7 @@ bool gfx_load_g2() _g2.elements.clear(); _g2.elements.shrink_to_fit(); - log_fatal("Unable to load g2 graphics"); + LOG_FATAL("Unable to load g2 graphics"); if (!gOpenRCT2Headless) { auto uiContext = GetContext()->GetUiContext(); @@ -320,13 +320,13 @@ bool gfx_load_g2() return false; } -bool gfx_load_csg() +bool GfxLoadCsg() { - log_verbose("gfx_load_csg()"); + LOG_VERBOSE("GfxLoadCsg()"); if (gConfigGeneral.RCT1Path.empty()) { - log_verbose(" unable to load CSG, RCT1 path not set"); + LOG_VERBOSE(" unable to load CSG, RCT1 path not set"); return false; } @@ -339,18 +339,18 @@ bool gfx_load_csg() size_t fileHeaderSize = fileHeader.GetLength(); size_t fileDataSize = fileData.GetLength(); - _csg.header.num_entries = static_cast(fileHeaderSize / sizeof(rct_g1_element_32bit)); + _csg.header.num_entries = static_cast(fileHeaderSize / sizeof(RCTG1Element)); _csg.header.total_size = static_cast(fileDataSize); if (!CsgIsUsable(_csg)) { - log_warning("Cannot load CSG1.DAT, it has too few entries. Only CSG1.DAT from Loopy Landscapes will work."); + LOG_WARNING("Cannot load CSG1.DAT, it has too few entries. Only CSG1.DAT from Loopy Landscapes will work."); return false; } // Read element headers _csg.elements.resize(_csg.header.num_entries); - read_and_convert_gxdat(&fileHeader, _csg.header.num_entries, false, _csg.elements.data()); + ReadAndConvertGxDat(&fileHeader, _csg.header.num_entries, false, _csg.elements.data()); // Read element data _csg.data = fileData.ReadArray(_csg.header.total_size); @@ -373,23 +373,23 @@ bool gfx_load_csg() _csg.elements.clear(); _csg.elements.shrink_to_fit(); - log_error("Unable to load csg graphics"); + LOG_ERROR("Unable to load csg graphics"); return false; } } -std::optional GfxLoadGx(const std::vector& buffer) +std::optional GfxLoadGx(const std::vector& buffer) { try { OpenRCT2::MemoryStream istream(buffer.data(), buffer.size()); - rct_gx gx; + Gx gx; - gx.header = istream.ReadValue(); + gx.header = istream.ReadValue(); // Read element headers gx.elements.resize(gx.header.num_entries); - read_and_convert_gxdat(&istream, gx.header.num_entries, false, gx.elements.data()); + ReadAndConvertGxDat(&istream, gx.header.num_entries, false, gx.elements.data()); // Read element data gx.data = istream.ReadArray(gx.header.total_size); @@ -398,12 +398,12 @@ std::optional GfxLoadGx(const std::vector& buffer) } catch (const std::exception&) { - log_verbose("Unable to load rct_gx graphics"); + LOG_VERBOSE("Unable to load Gx graphics"); } return std::nullopt; } -static std::optional FASTCALL gfx_draw_sprite_get_palette(ImageId imageId) +static std::optional FASTCALL GfxDrawSpriteGetPalette(ImageId imageId) { if (!imageId.HasSecondary()) { @@ -444,16 +444,16 @@ static std::optional FASTCALL gfx_draw_sprite_get_palette(ImageId im return paletteMap; } -void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo* dpi, const ImageId imageId, const ScreenCoordsXY& spriteCoords) +void FASTCALL GfxDrawSpriteSoftware(DrawPixelInfo* dpi, const ImageId imageId, const ScreenCoordsXY& spriteCoords) { if (imageId.HasValue()) { - auto palette = gfx_draw_sprite_get_palette(imageId); + auto palette = GfxDrawSpriteGetPalette(imageId); if (!palette) { palette = PaletteMap::GetDefault(); } - gfx_draw_sprite_palette_set_software(dpi, imageId, spriteCoords, *palette); + GfxDrawSpritePaletteSetSoftware(dpi, imageId, spriteCoords, *palette); } } @@ -466,13 +466,13 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo* dpi, const ImageId ima * x (cx) * y (dx) */ -void FASTCALL gfx_draw_sprite_palette_set_software( - rct_drawpixelinfo* dpi, const ImageId imageId, const ScreenCoordsXY& coords, const PaletteMap& paletteMap) +void FASTCALL GfxDrawSpritePaletteSetSoftware( + DrawPixelInfo* dpi, const ImageId imageId, const ScreenCoordsXY& coords, const PaletteMap& paletteMap) { int32_t x = coords.x; int32_t y = coords.y; - const auto* g1 = gfx_get_g1_element(imageId); + const auto* g1 = GfxGetG1Element(imageId); if (g1 == nullptr) { return; @@ -480,7 +480,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software( if (dpi->zoom_level > ZoomLevel{ 0 } && (g1->flags & G1_FLAG_HAS_ZOOM_SPRITE)) { - rct_drawpixelinfo zoomed_dpi = *dpi; + DrawPixelInfo zoomed_dpi = *dpi; zoomed_dpi.bits = dpi->bits; zoomed_dpi.x = dpi->x >> 1; zoomed_dpi.y = dpi->y >> 1; @@ -490,7 +490,7 @@ void FASTCALL gfx_draw_sprite_palette_set_software( zoomed_dpi.zoom_level = dpi->zoom_level - 1; const auto spriteCoords = ScreenCoordsXY{ x >> 1, y >> 1 }; - gfx_draw_sprite_palette_set_software( + GfxDrawSpritePaletteSetSoftware( &zoomed_dpi, imageId.WithIndex(imageId.GetIndex() - g1->zoomed_offset), spriteCoords, paletteMap); return; } @@ -617,18 +617,18 @@ void FASTCALL gfx_draw_sprite_palette_set_software( dest_pointer += (zoom_level.ApplyInversedTo(dpi->width) + dpi->pitch) * dest_start_y + dest_start_x; DrawSpriteArgs args(imageId, paletteMap, *g1, source_start_x, source_start_y, width, height, dest_pointer); - gfx_sprite_to_buffer(*dpi, args); + GfxSpriteToBuffer(*dpi, args); } -void FASTCALL gfx_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args) +void FASTCALL GfxSpriteToBuffer(DrawPixelInfo& dpi, const DrawSpriteArgs& args) { if (args.SourceImage.flags & G1_FLAG_RLE_COMPRESSION) { - gfx_rle_sprite_to_buffer(dpi, args); + GfxRleSpriteToBuffer(dpi, args); } else if (!(args.SourceImage.flags & G1_FLAG_1)) { - gfx_bmp_sprite_to_buffer(dpi, args); + GfxBmpSpriteToBuffer(dpi, args); } } @@ -638,12 +638,12 @@ void FASTCALL gfx_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& * * rct2: 0x00681DE2 */ -void FASTCALL gfx_draw_sprite_raw_masked_software( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& scrCoords, const ImageId maskImage, const ImageId colourImage) +void FASTCALL GfxDrawSpriteRawMaskedSoftware( + DrawPixelInfo* dpi, const ScreenCoordsXY& scrCoords, const ImageId maskImage, const ImageId colourImage) { int32_t left, top, right, bottom, width, height; - auto imgMask = gfx_get_g1_element(maskImage); - auto imgColour = gfx_get_g1_element(colourImage); + auto imgMask = GfxGetG1Element(maskImage); + auto imgColour = GfxGetG1Element(colourImage); if (imgMask == nullptr || imgColour == nullptr) { return; @@ -652,7 +652,7 @@ void FASTCALL gfx_draw_sprite_raw_masked_software( // Must have transparency in order to pass check if (!(imgMask->flags & G1_FLAG_HAS_TRANSPARENCY) || !(imgColour->flags & G1_FLAG_HAS_TRANSPARENCY)) { - gfx_draw_sprite_software(dpi, colourImage, scrCoords); + GfxDrawSpriteSoftware(dpi, colourImage, scrCoords); return; } @@ -689,17 +689,17 @@ void FASTCALL gfx_draw_sprite_raw_masked_software( int32_t colourWrap = imgColour->width - width; int32_t dstWrap = ((dpi->width + dpi->pitch) - width); - mask_fn(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); + MaskFn(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); } -const rct_g1_element* gfx_get_g1_element(const ImageId imageId) +const G1Element* GfxGetG1Element(const ImageId imageId) { - return gfx_get_g1_element(imageId.GetIndex()); + return GfxGetG1Element(imageId.GetIndex()); } -const rct_g1_element* gfx_get_g1_element(ImageIndex image_id) +const G1Element* GfxGetG1Element(ImageIndex image_id) { - openrct2_assert(!gOpenRCT2NoGraphics, "gfx_get_g1_element called on headless instance"); + openrct2_assert(!gOpenRCT2NoGraphics, "GfxGetG1Element called on headless instance"); auto offset = static_cast(image_id); if (offset == 0x7FFFF || offset == ImageIndexUndefined) @@ -727,11 +727,11 @@ const rct_g1_element* gfx_get_g1_element(ImageIndex image_id) return &_g2.elements[idx]; } - log_warning("Invalid entry in g2.dat requested, idx = %u. You may have to update your g2.dat.", idx); + LOG_WARNING("Invalid entry in g2.dat requested, idx = %u. You may have to update your g2.dat.", idx); } else if (offset < SPR_CSG_END) { - if (is_csg_loaded()) + if (IsCsgLoaded()) { size_t idx = offset - SPR_CSG_BEGIN; if (idx < _csg.header.num_entries) @@ -739,7 +739,7 @@ const rct_g1_element* gfx_get_g1_element(ImageIndex image_id) return &_csg.elements[idx]; } - log_warning("Invalid entry in csg.dat requested, idx = %u.", idx); + LOG_WARNING("Invalid entry in csg.dat requested, idx = %u.", idx); } } else if (offset < SPR_SCROLLING_TEXT_END) @@ -761,15 +761,15 @@ const rct_g1_element* gfx_get_g1_element(ImageIndex image_id) return nullptr; } -void gfx_set_g1_element(ImageIndex imageId, const rct_g1_element* g1) +void GfxSetG1Element(ImageIndex imageId, const G1Element* g1) { bool isTemp = imageId == SPR_TEMP; bool isValid = (imageId >= SPR_IMAGE_LIST_BEGIN && imageId < SPR_IMAGE_LIST_END) || (imageId >= SPR_SCROLLING_TEXT_START && imageId < SPR_SCROLLING_TEXT_END); #ifdef DEBUG - openrct2_assert(!gOpenRCT2NoGraphics, "gfx_set_g1_element called on headless instance"); - openrct2_assert(isValid || isTemp, "gfx_set_g1_element called with unexpected image id"); + openrct2_assert(!gOpenRCT2NoGraphics, "GfxSetG1Element called on headless instance"); + openrct2_assert(isValid || isTemp, "GfxSetG1Element called with unexpected image id"); openrct2_assert(g1 != nullptr, "g1 was nullptr"); #endif @@ -810,12 +810,12 @@ void gfx_set_g1_element(ImageIndex imageId, const rct_g1_element* g1) } } -bool is_csg_loaded() +bool IsCsgLoaded() { return _csgLoaded; } -size_t g1_calculate_data_size(const rct_g1_element* g1) +size_t G1CalculateDataSize(const G1Element* g1) { if (g1->flags & G1_FLAG_PALETTE) { diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index b5c79288b8..e96d5e3eb2 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,16 +40,15 @@ enum : uint32_t TEXT_DRAW_FLAG_NO_DRAW = 1u << 31 }; -static int32_t ttf_get_string_width(std::string_view text, FontStyle fontStyle, bool noFormatting); +static int32_t TTFGetStringWidth(std::string_view text, FontStyle fontStyle, bool noFormatting); /** * * rct2: 0x006C23B1 */ -int32_t gfx_get_string_width_new_lined(std::string_view text, FontStyle fontStyle) +int32_t GfxGetStringWidthNewLined(std::string_view text, FontStyle fontStyle) { - thread_local std::string buffer; - buffer.clear(); + u8string buffer; std::optional maxWidth; FmtString fmt(text); @@ -57,7 +56,7 @@ int32_t gfx_get_string_width_new_lined(std::string_view text, FontStyle fontStyl { if (token.kind == FormatToken::Newline || token.kind == FormatToken::NewlineSmall) { - auto width = gfx_get_string_width(buffer, fontStyle); + auto width = GfxGetStringWidth(buffer, fontStyle); if (!maxWidth.has_value() || maxWidth.value() > width) { maxWidth = width; @@ -71,7 +70,7 @@ int32_t gfx_get_string_width_new_lined(std::string_view text, FontStyle fontStyl } if (!maxWidth.has_value()) { - maxWidth = gfx_get_string_width(buffer, fontStyle); + maxWidth = GfxGetStringWidth(buffer, fontStyle); } return maxWidth.value(); } @@ -82,14 +81,14 @@ int32_t gfx_get_string_width_new_lined(std::string_view text, FontStyle fontStyl * rct2: 0x006C2321 * buffer (esi) */ -int32_t gfx_get_string_width(std::string_view text, FontStyle fontStyle) +int32_t GfxGetStringWidth(std::string_view text, FontStyle fontStyle) { - return ttf_get_string_width(text, fontStyle, false); + return TTFGetStringWidth(text, fontStyle, false); } -int32_t gfx_get_string_width_no_formatting(std::string_view text, FontStyle fontStyle) +int32_t GfxGetStringWidthNoFormatting(std::string_view text, FontStyle fontStyle) { - return ttf_get_string_width(text, fontStyle, true); + return TTFGetStringWidth(text, fontStyle, true); } /** @@ -99,7 +98,7 @@ int32_t gfx_get_string_width_no_formatting(std::string_view text, FontStyle font * buffer (esi) * width (edi) */ -int32_t gfx_clip_string(utf8* text, int32_t width, FontStyle fontStyle) +int32_t GfxClipString(utf8* text, int32_t width, FontStyle fontStyle) { if (width < 6) { @@ -108,7 +107,7 @@ int32_t gfx_clip_string(utf8* text, int32_t width, FontStyle fontStyle) } // If width of the full string is less than allowed width then we don't need to clip - auto clippedWidth = gfx_get_string_width(text, fontStyle); + auto clippedWidth = GfxGetStringWidth(text, fontStyle); if (clippedWidth <= width) { return clippedWidth; @@ -130,7 +129,7 @@ int32_t gfx_clip_string(utf8* text, int32_t width, FontStyle fontStyle) // Add the ellipsis before checking the width buffer.append("..."); - auto currentWidth = gfx_get_string_width(buffer, fontStyle); + auto currentWidth = GfxGetStringWidth(buffer, fontStyle); if (currentWidth < width) { bestLength = buffer.size(); @@ -154,11 +153,11 @@ int32_t gfx_clip_string(utf8* text, int32_t width, FontStyle fontStyle) } char cb[8]{}; - utf8_write_codepoint(cb, codepoint); + UTF8WriteCodepoint(cb, codepoint); buffer.append(cb); } } - return gfx_get_string_width(text, fontStyle); + return GfxGetStringWidth(text, fontStyle); } /** @@ -174,11 +173,10 @@ int32_t gfx_clip_string(utf8* text, int32_t width, FontStyle fontStyle) * num_lines (edi) - out * font_height (ebx) - out */ -int32_t gfx_wrap_string(utf8* text, int32_t width, FontStyle fontStyle, int32_t* outNumLines) +int32_t GfxWrapString(u8string_view text, int32_t width, FontStyle fontStyle, u8string* outWrappedText, int32_t* outNumLines) { constexpr size_t NULL_INDEX = std::numeric_limits::max(); - thread_local std::string buffer; - buffer.resize(0); + u8string buffer; size_t currentLineIndex = 0; size_t splitIndex = NULL_INDEX; @@ -186,7 +184,7 @@ int32_t gfx_wrap_string(utf8* text, int32_t width, FontStyle fontStyle, int32_t* size_t numLines = 0; int32_t maxWidth = 0; - FmtString fmt = text; + FmtString fmt(text); for (const auto& token : fmt) { if (token.IsLiteral()) @@ -195,10 +193,10 @@ int32_t gfx_wrap_string(utf8* text, int32_t width, FontStyle fontStyle, int32_t* for (auto codepoint : codepoints) { char cb[8]{}; - utf8_write_codepoint(cb, codepoint); + UTF8WriteCodepoint(cb, codepoint); buffer.append(cb); - auto lineWidth = gfx_get_string_width(&buffer[currentLineIndex], fontStyle); + auto lineWidth = GfxGetStringWidth(&buffer[currentLineIndex], fontStyle); if (lineWidth <= width || (splitIndex == NULL_INDEX && bestSplitIndex == NULL_INDEX)) { if (codepoint == ' ') @@ -222,7 +220,7 @@ int32_t gfx_wrap_string(utf8* text, int32_t width, FontStyle fontStyle, int32_t* buffer.insert(buffer.begin() + splitIndex, '\0'); // Recalculate the line length after splitting - lineWidth = gfx_get_string_width(&buffer[currentLineIndex], fontStyle); + lineWidth = GfxGetStringWidth(&buffer[currentLineIndex], fontStyle); maxWidth = std::max(maxWidth, lineWidth); numLines++; @@ -242,7 +240,7 @@ int32_t gfx_wrap_string(utf8* text, int32_t width, FontStyle fontStyle, int32_t* { buffer.push_back('\0'); - auto lineWidth = gfx_get_string_width(&buffer[currentLineIndex], fontStyle); + auto lineWidth = GfxGetStringWidth(&buffer[currentLineIndex], fontStyle); maxWidth = std::max(maxWidth, lineWidth); numLines++; @@ -257,35 +255,40 @@ int32_t gfx_wrap_string(utf8* text, int32_t width, FontStyle fontStyle, int32_t* } { // Final line width calculation - auto lineWidth = gfx_get_string_width(&buffer[currentLineIndex], fontStyle); + auto lineWidth = GfxGetStringWidth(&buffer[currentLineIndex], fontStyle); maxWidth = std::max(maxWidth, lineWidth); } - std::memcpy(text, buffer.data(), buffer.size() + 1); - *outNumLines = static_cast(numLines); + if (outWrappedText != nullptr) + { + *outWrappedText = std::move(buffer); + } + if (outNumLines != nullptr) + { + *outNumLines = static_cast(numLines); + } return maxWidth; } /** * Draws text that is left aligned and vertically centred. */ -void gfx_draw_string_left_centred( - rct_drawpixelinfo* dpi, StringId format, void* args, colour_t colour, const ScreenCoordsXY& coords) +void GfxDrawStringLeftCentred(DrawPixelInfo& dpi, StringId format, void* args, colour_t colour, const ScreenCoordsXY& coords) { char buffer[CommonTextBufferSize]; auto bufferPtr = buffer; - format_string(bufferPtr, sizeof(buffer), format, args); - int32_t height = string_get_height_raw(bufferPtr, FontStyle::Medium); - gfx_draw_string(dpi, coords - ScreenCoordsXY{ 0, (height / 2) }, bufferPtr, { colour }); + FormatStringLegacy(bufferPtr, sizeof(buffer), format, args); + int32_t height = StringGetHeightRaw(bufferPtr, FontStyle::Medium); + GfxDrawString(dpi, coords - ScreenCoordsXY{ 0, (height / 2) }, bufferPtr, { colour }); } /** * Changes the palette so that the next character changes colour */ -static void colour_char(uint8_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) +static void ColourCharacter(uint8_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) { int32_t colour32 = 0; - const rct_g1_element* g1 = gfx_get_g1_element(SPR_TEXT_PALETTE); + const G1Element* g1 = GfxGetG1Element(SPR_TEXT_PALETTE); if (g1 != nullptr) { uint32_t idx = (colour & 0xFF) * 4; @@ -307,7 +310,7 @@ static void colour_char(uint8_t colour, const uint16_t* current_font_flags, uint * Changes the palette so that the next character changes colour * This is specific to changing to a predefined window related colour */ -static void colour_char_window(uint8_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) +static void ColourCharacterWindow(uint8_t colour, const uint16_t* current_font_flags, uint8_t* palette_pointer) { int32_t eax; @@ -334,32 +337,32 @@ static void colour_char_window(uint8_t colour, const uint16_t* current_font_flag * text : esi * dpi : edi */ -void draw_string_centred_raw( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t numLines, char* text, FontStyle fontStyle) +void DrawStringCentredRaw( + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle) { - ScreenCoordsXY screenCoords(dpi->x, dpi->y); - gfx_draw_string(dpi, screenCoords, "", { COLOUR_BLACK, fontStyle }); + ScreenCoordsXY screenCoords(dpi.x, dpi.y); + GfxDrawString(dpi, screenCoords, "", { COLOUR_BLACK, fontStyle }); screenCoords = coords; for (int32_t i = 0; i <= numLines; i++) { - int32_t width = gfx_get_string_width(text, fontStyle); - gfx_draw_string(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, text, { TEXT_COLOUR_254, fontStyle }); + int32_t width = GfxGetStringWidth(text, fontStyle); + GfxDrawString(dpi, screenCoords - ScreenCoordsXY{ width / 2, 0 }, text, { TEXT_COLOUR_254, fontStyle }); const utf8* ch = text; const utf8* nextCh = nullptr; - while ((utf8_get_next(ch, &nextCh)) != 0) + while ((UTF8GetNext(ch, &nextCh)) != 0) { ch = nextCh; } text = const_cast(ch + 1); - screenCoords.y += font_get_line_height(fontStyle); + screenCoords.y += FontGetLineHeight(fontStyle); } } -int32_t string_get_height_raw(std::string_view text, FontStyle fontStyle) +int32_t StringGetHeightRaw(std::string_view text, FontStyle fontStyle) { int32_t height = 0; if (fontStyle <= FontStyle::Medium) @@ -430,26 +433,26 @@ int32_t string_get_height_raw(std::string_view text, FontStyle fontStyle) * ticks : ebp >> 16 */ void DrawNewsTicker( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, colour_t colour, StringId format, void* args, + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, colour_t colour, StringId format, u8string_view args, int32_t ticks) { int32_t numLines, lineHeight, lineY; - utf8* buffer = gCommonStringFormatBuffer; - ScreenCoordsXY screenCoords(dpi->x, dpi->y); + ScreenCoordsXY screenCoords(dpi.x, dpi.y); - gfx_draw_string(dpi, screenCoords, "", { colour }); - format_string(buffer, 256, format, args); + GfxDrawString(dpi, screenCoords, "", { colour }); - gfx_wrap_string(buffer, width, FontStyle::Small, &numLines); - lineHeight = font_get_line_height(FontStyle::Small); + u8string wrappedString; + GfxWrapString(FormatStringID(format, args), width, FontStyle::Small, &wrappedString, &numLines); + lineHeight = FontGetLineHeight(FontStyle::Small); int32_t numCharactersDrawn = 0; int32_t numCharactersToDraw = ticks; + const utf8* buffer = wrappedString.data(); lineY = coords.y - ((numLines * lineHeight) / 2); for (int32_t line = 0; line <= numLines; line++) { - int32_t halfWidth = gfx_get_string_width(buffer, FontStyle::Small) / 2; + int32_t halfWidth = GfxGetStringWidth(buffer, FontStyle::Small) / 2; FmtString fmt(buffer); for (const auto& token : fmt) @@ -475,19 +478,19 @@ void DrawNewsTicker( } screenCoords = { coords.x - halfWidth, lineY }; - gfx_draw_string(dpi, screenCoords, buffer, { TEXT_COLOUR_254, FontStyle::Small }); + GfxDrawString(dpi, screenCoords, buffer, { TEXT_COLOUR_254, FontStyle::Small }); if (numCharactersDrawn > numCharactersToDraw) { break; } - buffer = get_string_end(buffer) + 1; + buffer = GetStringEnd(buffer) + 1; lineY += lineHeight; } } -struct text_draw_info +struct TextDrawInfo { int32_t startX; int32_t startY; @@ -501,10 +504,10 @@ struct text_draw_info const int8_t* y_offset; }; -static void ttf_draw_character_sprite(rct_drawpixelinfo* dpi, int32_t codepoint, text_draw_info* info) +static void TTFDrawCharacterSprite(DrawPixelInfo& dpi, int32_t codepoint, TextDrawInfo* info) { - int32_t characterWidth = font_sprite_get_codepoint_width(info->FontStyle, codepoint); - auto sprite = font_sprite_get_codepoint_sprite(info->FontStyle, codepoint); + int32_t characterWidth = FontSpriteGetCodepointWidth(info->FontStyle, codepoint); + auto sprite = FontSpriteGetCodepointSprite(info->FontStyle, codepoint); if (!(info->flags & TEXT_DRAW_FLAG_NO_DRAW)) { @@ -515,44 +518,44 @@ static void ttf_draw_character_sprite(rct_drawpixelinfo* dpi, int32_t codepoint, } PaletteMap paletteMap(info->palette); - gfx_draw_glyph(dpi, sprite, screenCoords, paletteMap); + GfxDrawGlyph(&dpi, sprite, screenCoords, paletteMap); } info->x += characterWidth; } -static void ttf_draw_string_raw_sprite(rct_drawpixelinfo* dpi, std::string_view text, text_draw_info* info) +static void TTFDrawStringRawSprite(DrawPixelInfo& dpi, std::string_view text, TextDrawInfo* info) { CodepointView codepoints(text); for (auto codepoint : codepoints) { - ttf_draw_character_sprite(dpi, codepoint, info); + TTFDrawCharacterSprite(dpi, codepoint, info); } } #ifndef NO_TTF static int _ttfGlId = 0; -static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view text, text_draw_info* info) +static void TTFDrawStringRawTTF(DrawPixelInfo& dpi, std::string_view text, TextDrawInfo* info) { - if (!ttf_initialise()) + if (!TTFInitialise()) return; - TTFFontDescriptor* fontDesc = ttf_get_font_from_sprite_base(info->FontStyle); + TTFFontDescriptor* fontDesc = TTFGetFontFromSpriteBase(info->FontStyle); if (fontDesc->font == nullptr) { - ttf_draw_string_raw_sprite(dpi, text, info); + TTFDrawStringRawSprite(dpi, text, info); return; } if (info->flags & TEXT_DRAW_FLAG_NO_DRAW) { - info->x += ttf_getwidth_cache_get_or_add(fontDesc->font, text); + info->x += TTFGetWidthCacheGetOrAdd(fontDesc->font, text); return; } uint8_t colour = info->palette[1]; - TTFSurface* surface = ttf_surface_cache_get_or_add(fontDesc->font, text); + TTFSurface* surface = TTFSurfaceCacheGetOrAdd(fontDesc->font, text); if (surface == nullptr) return; @@ -579,10 +582,10 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex auto baseId = uint32_t(0x7FFFF) - 1024; auto imageId = baseId + _ttfGlId; - auto drawingEngine = dpi->DrawingEngine; + auto drawingEngine = dpi.DrawingEngine; auto drawingContext = drawingEngine->GetDrawingContext(); drawingEngine->InvalidateImage(imageId); - drawingContext->DrawBitmap(dpi, imageId, surface->pixels, surface->pitch, surface->h, drawX, drawY); + drawingContext->DrawBitmap(&dpi, imageId, surface->pixels, surface->pitch, surface->h, drawX, drawY); _ttfGlId++; if (_ttfGlId >= 1023) @@ -592,18 +595,18 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex return; } - int32_t overflowX = (dpi->x + dpi->width) - (drawX + width); - int32_t overflowY = (dpi->y + dpi->height) - (drawY + height); + int32_t overflowX = (dpi.x + dpi.width) - (drawX + width); + int32_t overflowY = (dpi.y + dpi.height) - (drawY + height); if (overflowX < 0) width += overflowX; if (overflowY < 0) height += overflowY; - int32_t skipX = drawX - dpi->x; - int32_t skipY = drawY - dpi->y; + int32_t skipX = drawX - dpi.x; + int32_t skipY = drawY - dpi.y; info->x += width; auto src = static_cast(surface->pixels); - uint8_t* dst = dpi->bits; + uint8_t* dst = dpi.bits; if (skipX < 0) { @@ -619,10 +622,10 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex } dst += skipX; - dst += skipY * (dpi->width + dpi->pitch); + dst += skipY * (dpi.width + dpi.pitch); int32_t srcScanSkip = surface->pitch - width; - int32_t dstScanSkip = dpi->width + dpi->pitch - width; + int32_t dstScanSkip = dpi.width + dpi.pitch - width; uint8_t* dst_orig = dst; const uint8_t* src_orig = src; @@ -636,7 +639,7 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex if (*src != 0) { // right - if (xx + skipX < dpi->width + dpi->pitch - 1) + if (xx + skipX < dpi.width + dpi.pitch - 1) { *(dst + 1) = info->palette[3]; } @@ -651,7 +654,7 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex *(dst - width - dstScanSkip) = info->palette[3]; } // bottom - if (yy + skipY < dpi->height - 1) + if (yy + skipY < dpi.height - 1) { *(dst + width + dstScanSkip) = info->palette[3]; } @@ -691,11 +694,11 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex { // As outlines are black, these texts should always use a darker shade // of the foreground colour for font hinting. - *dst = blendColours(colour, PALETTE_INDEX_0); + *dst = BlendColours(colour, PALETTE_INDEX_0); } else { - *dst = blendColours(colour, *dst); + *dst = BlendColours(colour, *dst); } } } @@ -709,7 +712,7 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo* dpi, std::string_view tex #endif // NO_TTF -static void ttf_process_format_code(rct_drawpixelinfo* dpi, const FmtString::token& token, text_draw_info* info) +static void TTFProcessFormatCode(DrawPixelInfo& dpi, const FmtString::Token& token, TextDrawInfo* info) { switch (token.kind) { @@ -718,11 +721,11 @@ static void ttf_process_format_code(rct_drawpixelinfo* dpi, const FmtString::tok break; case FormatToken::Newline: info->x = info->startX; - info->y += font_get_line_height(info->FontStyle); + info->y += FontGetLineHeight(info->FontStyle); break; case FormatToken::NewlineSmall: info->x = info->startX; - info->y += font_get_line_height_small(info->FontStyle); + info->y += FontGetLineHeightSmall(info->FontStyle); break; case FormatToken::FontTiny: info->FontStyle = FontStyle::Tiny; @@ -742,30 +745,30 @@ static void ttf_process_format_code(rct_drawpixelinfo* dpi, const FmtString::tok case FormatToken::ColourWindow1: { uint16_t flags = info->flags; - colour_char_window(gCurrentWindowColours[0], &flags, info->palette); + ColourCharacterWindow(gCurrentWindowColours[0], &flags, info->palette); break; } case FormatToken::ColourWindow2: { uint16_t flags = info->flags; - colour_char_window(gCurrentWindowColours[1], &flags, info->palette); + ColourCharacterWindow(gCurrentWindowColours[1], &flags, info->palette); break; } case FormatToken::ColourWindow3: { uint16_t flags = info->flags; - colour_char_window(gCurrentWindowColours[2], &flags, info->palette); + ColourCharacterWindow(gCurrentWindowColours[2], &flags, info->palette); break; } case FormatToken::InlineSprite: { auto imageId = ImageId::FromUInt32(token.parameter); - auto g1 = gfx_get_g1_element(imageId.GetIndex()); + auto g1 = GfxGetG1Element(imageId.GetIndex()); if (g1 != nullptr && g1->width <= 32 && g1->height <= 32) { if (!(info->flags & TEXT_DRAW_FLAG_NO_DRAW)) { - gfx_draw_sprite(dpi, imageId, { info->x, info->y }); + GfxDrawSprite(&dpi, imageId, { info->x, info->y }); } info->x += g1->width; } @@ -776,7 +779,7 @@ static void ttf_process_format_code(rct_drawpixelinfo* dpi, const FmtString::tok { uint16_t flags = info->flags; auto colourIndex = FormatTokenGetTextColourIndex(token.kind); - colour_char(static_cast(colourIndex), &flags, info->palette); + ColourCharacter(static_cast(colourIndex), &flags, info->palette); } break; } @@ -813,7 +816,7 @@ static bool ShouldUseSpriteForCodepoint(char32_t codepoint) } #endif // NO_TTF -static void ttf_process_string_literal(rct_drawpixelinfo* dpi, std::string_view text, text_draw_info* info) +static void TTFProcessStringLiteral(DrawPixelInfo& dpi, std::string_view text, TextDrawInfo* info) { #ifndef NO_TTF bool isTTF = info->flags & TEXT_DRAW_FLAG_TTF; @@ -823,7 +826,7 @@ static void ttf_process_string_literal(rct_drawpixelinfo* dpi, std::string_view if (!isTTF) { - ttf_draw_string_raw_sprite(dpi, text, info); + TTFDrawStringRawSprite(dpi, text, info); } #ifndef NO_TTF else @@ -846,7 +849,7 @@ static void ttf_process_string_literal(rct_drawpixelinfo* dpi, std::string_view # pragma GCC diagnostic ignored "-Wmaybe-uninitialized" # endif auto len = it.GetIndex() - ttfRunIndex.value(); - ttf_draw_string_raw_ttf(dpi, text.substr(ttfRunIndex.value(), len), info); + TTFDrawStringRawTTF(dpi, text.substr(ttfRunIndex.value(), len), info); # ifdef __MINGW32__ # pragma GCC diagnostic pop # endif @@ -854,7 +857,7 @@ static void ttf_process_string_literal(rct_drawpixelinfo* dpi, std::string_view } // Draw the sprite font glyph - ttf_draw_character_sprite(dpi, codepoint, info); + TTFDrawCharacterSprite(dpi, codepoint, info); } else { @@ -869,24 +872,24 @@ static void ttf_process_string_literal(rct_drawpixelinfo* dpi, std::string_view { // Final TTF run auto len = text.size() - *ttfRunIndex; - ttf_draw_string_raw_ttf(dpi, text.substr(ttfRunIndex.value(), len), info); + TTFDrawStringRawTTF(dpi, text.substr(ttfRunIndex.value(), len), info); } } #endif // NO_TTF } -static void ttf_process_string_codepoint(rct_drawpixelinfo* dpi, codepoint_t codepoint, text_draw_info* info) +static void TTFProcessStringCodepoint(DrawPixelInfo& dpi, codepoint_t codepoint, TextDrawInfo* info) { char buffer[8]{}; - utf8_write_codepoint(buffer, codepoint); - ttf_process_string_literal(dpi, buffer, info); + UTF8WriteCodepoint(buffer, codepoint); + TTFProcessStringLiteral(dpi, buffer, info); } -static void ttf_process_string(rct_drawpixelinfo* dpi, std::string_view text, text_draw_info* info) +static void TTFProcessString(DrawPixelInfo& dpi, std::string_view text, TextDrawInfo* info) { if (info->flags & TEXT_DRAW_FLAG_NO_FORMATTING) { - ttf_process_string_literal(dpi, text, info); + TTFProcessStringLiteral(dpi, text, info); info->maxX = std::max(info->maxX, info->x); info->maxY = std::max(info->maxY, info->y); } @@ -897,16 +900,16 @@ static void ttf_process_string(rct_drawpixelinfo* dpi, std::string_view text, te { if (token.IsLiteral()) { - ttf_process_string_literal(dpi, token.text, info); + TTFProcessStringLiteral(dpi, token.text, info); } else if (token.IsCodepoint()) { auto codepoint = token.GetCodepoint(); - ttf_process_string_codepoint(dpi, codepoint, info); + TTFProcessStringCodepoint(dpi, codepoint, info); } else { - ttf_process_format_code(dpi, token, info); + TTFProcessFormatCode(dpi, token, info); } info->maxX = std::max(info->maxX, info->x); info->maxY = std::max(info->maxY, info->y); @@ -914,7 +917,7 @@ static void ttf_process_string(rct_drawpixelinfo* dpi, std::string_view text, te } } -static void ttf_process_initial_colour(int32_t colour, text_draw_info* info) +static void TTFProcessInitialColour(int32_t colour, TextDrawInfo* info) { if (colour != TEXT_COLOUR_254 && colour != TEXT_COLOUR_255) { @@ -929,7 +932,7 @@ static void ttf_process_initial_colour(int32_t colour, text_draw_info* info) if (!(info->flags & TEXT_DRAW_FLAG_INSET)) { uint16_t flags = info->flags; - colour_char_window(colour, &flags, reinterpret_cast(&info->palette)); + ColourCharacterWindow(colour, &flags, reinterpret_cast(&info->palette)); } } else @@ -969,14 +972,14 @@ static void ttf_process_initial_colour(int32_t colour, text_draw_info* info) } } -void ttf_draw_string( - rct_drawpixelinfo* dpi, const_utf8string text, int32_t colour, const ScreenCoordsXY& coords, bool noFormatting, +void TTFDrawString( + DrawPixelInfo& dpi, const_utf8string text, int32_t colour, const ScreenCoordsXY& coords, bool noFormatting, FontStyle fontStyle, TextDarkness darkness) { if (text == nullptr) return; - text_draw_info info; + TextDrawInfo info; info.FontStyle = fontStyle; info.flags = 0; info.startX = coords.x; @@ -1004,16 +1007,16 @@ void ttf_draw_string( } std::memcpy(info.palette, gTextPalette, sizeof(info.palette)); - ttf_process_initial_colour(colour, &info); - ttf_process_string(dpi, text, &info); + TTFProcessInitialColour(colour, &info); + TTFProcessString(dpi, text, &info); std::memcpy(gTextPalette, info.palette, sizeof(info.palette)); - dpi->lastStringPos = { info.x, info.y }; + dpi.lastStringPos = { info.x, info.y }; } -static int32_t ttf_get_string_width(std::string_view text, FontStyle fontStyle, bool noFormatting) +static int32_t TTFGetStringWidth(std::string_view text, FontStyle fontStyle, bool noFormatting) { - text_draw_info info; + TextDrawInfo info; info.FontStyle = fontStyle; info.flags = 0; info.startX = 0; @@ -1034,7 +1037,8 @@ static int32_t ttf_get_string_width(std::string_view text, FontStyle fontStyle, info.flags |= TEXT_DRAW_FLAG_NO_FORMATTING; } - ttf_process_string(nullptr, text, &info); + DrawPixelInfo dummy{}; + TTFProcessString(dummy, text, &info); return info.maxX; } @@ -1043,11 +1047,11 @@ static int32_t ttf_get_string_width(std::string_view text, FontStyle fontStyle, * * rct2: 0x00682F28 */ -void gfx_draw_string_with_y_offsets( - rct_drawpixelinfo* dpi, const utf8* text, int32_t colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, +void GfxDrawStringWithYOffsets( + DrawPixelInfo& dpi, const utf8* text, int32_t colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, bool forceSpriteFont, FontStyle fontStyle) { - text_draw_info info; + TextDrawInfo info; info.FontStyle = fontStyle; info.flags = 0; info.startX = coords.x; @@ -1064,21 +1068,21 @@ void gfx_draw_string_with_y_offsets( } std::memcpy(info.palette, gTextPalette, sizeof(info.palette)); - ttf_process_initial_colour(colour, &info); - ttf_process_string(dpi, text, &info); + TTFProcessInitialColour(colour, &info); + TTFProcessString(dpi, text, &info); std::memcpy(gTextPalette, info.palette, sizeof(info.palette)); - dpi->lastStringPos = { info.x, info.y }; + dpi.lastStringPos = { info.x, info.y }; } -void shorten_path(utf8* buffer, size_t bufferSize, const utf8* path, int32_t availableWidth, FontStyle fontStyle) +void ShortenPath(utf8* buffer, size_t bufferSize, const utf8* path, int32_t availableWidth, FontStyle fontStyle) { size_t length = strlen(path); // Return full string if it fits - if (gfx_get_string_width(const_cast(path), fontStyle) <= availableWidth) + if (GfxGetStringWidth(const_cast(path), fontStyle) <= availableWidth) { - safe_strcpy(buffer, path, bufferSize); + SafeStrCpy(buffer, path, bufferSize); return; } @@ -1093,7 +1097,7 @@ void shorten_path(utf8* buffer, size_t bufferSize, const utf8* path, int32_t ava } // TODO: Replace with unicode ellipsis when supported - safe_strcpy(buffer, "...", bufferSize); + SafeStrCpy(buffer, "...", bufferSize); // Abbreviate beginning with xth separator int32_t begin = -1; @@ -1104,12 +1108,12 @@ void shorten_path(utf8* buffer, size_t bufferSize, const utf8* path, int32_t ava begin++; } while (path[begin] != *PATH_SEPARATOR && path[begin] != '/'); - safe_strcpy(buffer + 3, path + begin, bufferSize - 3); - if (gfx_get_string_width(buffer, fontStyle) <= availableWidth) + SafeStrCpy(buffer + 3, path + begin, bufferSize - 3); + if (GfxGetStringWidth(buffer, fontStyle) <= availableWidth) { return; } } - safe_strcpy(buffer, path, bufferSize); + SafeStrCpy(buffer, path, bufferSize); } diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 7c8e35c6a7..0f27f2bae5 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,12 +16,13 @@ #include "../config/Config.h" #include "../core/Guard.hpp" #include "../object/Object.h" +#include "../object/ObjectEntryManager.h" +#include "../object/WaterEntry.h" #include "../platform/Platform.h" #include "../sprites.h" #include "../util/Util.h" #include "../world/Climate.h" #include "../world/Location.hpp" -#include "../world/Water.h" #include "LightFX.h" #include @@ -492,7 +493,7 @@ static const uint16_t palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = { #define WINDOW_PALETTE_BRIGHT_RED {FilterPaletteID::PaletteTranslucentBrightRed, FilterPaletteID::PaletteTranslucentBrightRedHighlight, FilterPaletteID::PaletteTranslucentBrightRedShadow} #define WINDOW_PALETTE_BRIGHT_PINK {FilterPaletteID::PaletteTranslucentBrightPink, FilterPaletteID::PaletteTranslucentBrightPinkHighlight, FilterPaletteID::PaletteTranslucentBrightPinkShadow} -const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT] = { +const TranslucentWindowPalette TranslucentWindowPalettes[COLOUR_COUNT] = { WINDOW_PALETTE_GREY, // COLOUR_BLACK WINDOW_PALETTE_GREY, // COLOUR_GREY {FilterPaletteID::PaletteTranslucentWhite, FilterPaletteID::PaletteTranslucentWhiteHighlight, FilterPaletteID::PaletteTranslucentWhiteShadow}, @@ -554,33 +555,33 @@ ImageCatalogue ImageId::GetCatalogue() const return ImageCatalogue::UNKNOWN; } -void (*mask_fn)( +void (*MaskFn)( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) = nullptr; -void mask_init() +void MaskInit() { - if (avx2_available()) + if (AVX2Available()) { - log_verbose("registering AVX2 mask function"); - mask_fn = mask_avx2; + LOG_VERBOSE("registering AVX2 mask function"); + MaskFn = MaskAvx2; } - else if (sse41_available()) + else if (SSE41Available()) { - log_verbose("registering SSE4.1 mask function"); - mask_fn = mask_sse4_1; + LOG_VERBOSE("registering SSE4.1 mask function"); + MaskFn = MaskSse4_1; } else { - log_verbose("registering scalar mask function"); - mask_fn = mask_scalar; + LOG_VERBOSE("registering scalar mask function"); + MaskFn = MaskScalar; } } -void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, FilterPaletteID palette) +void GfxFilterPixel(DrawPixelInfo* dpi, const ScreenCoordsXY& coords, FilterPaletteID palette) { - gfx_filter_rect(dpi, { coords, coords }, palette); + GfxFilterRect(dpi, { coords, coords }, palette); } /** @@ -589,9 +590,9 @@ void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, Filt * a1 (ebx) * product (cl) */ -void gfx_transpose_palette(int32_t pal, uint8_t product) +void GfxTransposePalette(int32_t pal, uint8_t product) { - const rct_g1_element* g1 = gfx_get_g1_element(pal); + const G1Element* g1 = GfxGetG1Element(pal); if (g1 != nullptr) { int32_t width = g1->width; @@ -615,14 +616,14 @@ void gfx_transpose_palette(int32_t pal, uint8_t product) * * rct2: 0x006837E3 */ -void load_palette() +void LoadPalette() { if (gOpenRCT2NoGraphics) { return; } - auto water_type = static_cast(object_entry_get_chunk(ObjectType::Water, 0)); + auto water_type = OpenRCT2::ObjectManager::GetObjectEntry(0); uint32_t palette = 0x5FC; @@ -632,7 +633,7 @@ void load_palette() palette = water_type->image_id; } - const rct_g1_element* g1 = gfx_get_g1_element(palette); + const G1Element* g1 = GfxGetG1Element(palette); if (g1 != nullptr) { int32_t width = g1->width; @@ -649,16 +650,16 @@ void load_palette() } } UpdatePalette(gGamePalette, 10, 236); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } /** * * rct2: 0x006ED7E5 */ -void gfx_invalidate_screen() +void GfxInvalidateScreen() { - gfx_set_dirty_blocks({ { 0, 0 }, { ContextGetWidth(), ContextGetHeight() } }); + GfxSetDirtyBlocks({ { 0, 0 }, { ContextGetWidth(), ContextGetHeight() } }); } /* @@ -670,8 +671,7 @@ void gfx_invalidate_screen() * height (dx) * drawpixelinfo (edi) */ -bool clip_drawpixelinfo( - rct_drawpixelinfo* dst, rct_drawpixelinfo* src, const ScreenCoordsXY& coords, int32_t width, int32_t height) +bool ClipDrawPixelInfo(DrawPixelInfo* dst, DrawPixelInfo* src, const ScreenCoordsXY& coords, int32_t width, int32_t height) { int32_t right = coords.x + width; int32_t bottom = coords.y + height; @@ -720,28 +720,28 @@ bool clip_drawpixelinfo( return false; } -void gfx_invalidate_pickedup_peep() +void GfxInvalidatePickedUpPeep() { auto imageId = gPickupPeepImage; if (imageId.HasValue()) { - auto* g1 = gfx_get_g1_element(imageId); + auto* g1 = GfxGetG1Element(imageId); if (g1 != nullptr) { int32_t left = gPickupPeepX + g1->x_offset; int32_t top = gPickupPeepY + g1->y_offset; int32_t right = left + g1->width; int32_t bottom = top + g1->height; - gfx_set_dirty_blocks({ { left, top }, { right, bottom } }); + GfxSetDirtyBlocks({ { left, top }, { right, bottom } }); } } } -void gfx_draw_pickedup_peep(rct_drawpixelinfo* dpi) +void GfxDrawPickedUpPeep(DrawPixelInfo* dpi) { if (gPickupPeepImage.HasValue()) { - gfx_draw_sprite(dpi, gPickupPeepImage, { gPickupPeepX, gPickupPeepY }); + GfxDrawSprite(dpi, gPickupPeepImage, { gPickupPeepX, gPickupPeepY }); } } @@ -759,7 +759,7 @@ std::optional GetPaletteMapForColour(colour_t paletteId) auto g1Index = GetPaletteG1Index(paletteId); if (g1Index.has_value()) { - auto g1 = gfx_get_g1_element(g1Index.value()); + auto g1 = GfxGetG1Element(g1Index.value()); if (g1 != nullptr) { return PaletteMap(g1->offset, g1->height, g1->width); @@ -768,19 +768,19 @@ std::optional GetPaletteMapForColour(colour_t paletteId) return std::nullopt; } -size_t rct_drawpixelinfo::GetBytesPerRow() const +size_t DrawPixelInfo::GetBytesPerRow() const { return static_cast(width) + pitch; } -uint8_t* rct_drawpixelinfo::GetBitsOffset(const ScreenCoordsXY& pos) const +uint8_t* DrawPixelInfo::GetBitsOffset(const ScreenCoordsXY& pos) const { return bits + pos.x + (pos.y * GetBytesPerRow()); } -rct_drawpixelinfo rct_drawpixelinfo::Crop(const ScreenCoordsXY& pos, const ScreenSize& size) const +DrawPixelInfo DrawPixelInfo::Crop(const ScreenCoordsXY& pos, const ScreenSize& size) const { - rct_drawpixelinfo result = *this; + DrawPixelInfo result = *this; result.bits = GetBitsOffset(pos); result.x = static_cast(pos.x); result.y = static_cast(pos.y); @@ -805,18 +805,18 @@ void UpdatePalette(const uint8_t* colours, int32_t start_index, int32_t num_colo uint8_t g = colours[1]; uint8_t b = colours[0]; - if (lightfx_is_available()) + if (LightFXIsAvailable()) { - lightfx_apply_palette_filter(i, &r, &g, &b); + LightFXApplyPaletteFilter(i, &r, &g, &b); } else { float night = gDayNightCycle; if (night >= 0 && gClimateLightningFlash == 0) { - r = lerp(r, soft_light(r, 8), night); - g = lerp(g, soft_light(g, 8), night); - b = lerp(b, soft_light(b, 128), night); + r = Lerp(r, SoftLight(r, 8), night); + g = Lerp(g, SoftLight(g, 8), night); + b = Lerp(b, SoftLight(b, 128), night); } } @@ -835,7 +835,7 @@ void UpdatePalette(const uint8_t* colours, int32_t start_index, int32_t num_colo if (!gOpenRCT2Headless) { - drawing_engine_set_palette(gPalette); + DrawingEngineSetPalette(gPalette); } } @@ -847,13 +847,13 @@ void RefreshVideo(bool recreateWindow) } else { - drawing_engine_dispose(); - drawing_engine_init(); - drawing_engine_resize(); + DrawingEngineDispose(); + DrawingEngineInit(); + DrawingEngineResize(); } - drawing_engine_set_palette(gPalette); - gfx_invalidate_screen(); + DrawingEngineSetPalette(gPalette); + GfxInvalidateScreen(); } void ToggleWindowedMode() diff --git a/src/openrct2/drawing/Drawing.h b/src/openrct2/drawing/Drawing.h index 7329d49be3..075d13a42b 100644 --- a/src/openrct2/drawing/Drawing.h +++ b/src/openrct2/drawing/Drawing.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -77,7 +77,7 @@ struct GamePalette } }; -struct rct_g1_element +struct G1Element { uint8_t* offset = nullptr; // 0x00 int16_t width = 0; // 0x04 @@ -89,22 +89,22 @@ struct rct_g1_element }; #pragma pack(push, 1) -struct rct_g1_header +struct RCTG1Header { uint32_t num_entries = 0; uint32_t total_size = 0; }; -assert_struct_size(rct_g1_header, 8); +assert_struct_size(RCTG1Header, 8); #pragma pack(pop) -struct rct_gx +struct Gx { - rct_g1_header header; - std::vector elements; + RCTG1Header header; + std::vector elements; std::unique_ptr data; }; -struct rct_drawpixelinfo +struct DrawPixelInfo { uint8_t* bits{}; int32_t x{}; @@ -129,10 +129,10 @@ struct rct_drawpixelinfo size_t GetBytesPerRow() const; uint8_t* GetBitsOffset(const ScreenCoordsXY& pos) const; - rct_drawpixelinfo Crop(const ScreenCoordsXY& pos, const ScreenSize& size) const; + DrawPixelInfo Crop(const ScreenCoordsXY& pos, const ScreenSize& size) const; }; -struct rct_g1_element_32bit +struct RCTG1Element { uint32_t offset; // 0x00 note: uint32_t always! int16_t width; // 0x04 @@ -142,7 +142,7 @@ struct rct_g1_element_32bit uint16_t flags; // 0x0C uint16_t zoomed_offset; // 0x0E }; -assert_struct_size(rct_g1_element_32bit, 0x10); +assert_struct_size(RCTG1Element, 0x10); enum { @@ -154,16 +154,6 @@ enum G1_FLAG_NO_ZOOM_DRAW = (1 << 5), // Does not get drawn at higher zoom levels (only zoom 0) }; -enum : uint32_t -{ - IMAGE_TYPE_DEFAULT = 0, - IMAGE_TYPE_REMAP = (1 << 29), - IMAGE_TYPE_TRANSPARENT = (1 << 30), - IMAGE_TYPE_REMAP_2_PLUS = (1u << 31) - // REMAP_2_PLUS + REMAP = REMAP 2 - // REMAP_2_PLUS = REMAP 3 -}; - using DrawBlendOp = uint8_t; constexpr DrawBlendOp BLEND_NONE = 0; @@ -308,19 +298,13 @@ enum class FilterPaletteID : int32_t PaletteGlassLightPink = PaletteGlass + COLOUR_LIGHT_PINK, }; -struct translucent_window_palette +struct TranslucentWindowPalette { FilterPaletteID base; FilterPaletteID highlight; FilterPaletteID shadow; }; -struct rct_size16 -{ - int16_t width; - int16_t height; -}; - /** * Represents an 8-bit indexed map that maps from one palette index to another. */ @@ -367,7 +351,7 @@ struct DrawSpriteArgs { ImageId Image; const PaletteMap& PalMap; - const rct_g1_element& SourceImage; + const G1Element& SourceImage; int32_t SrcX; int32_t SrcY; int32_t Width; @@ -375,7 +359,7 @@ struct DrawSpriteArgs uint8_t* DestinationBits; DrawSpriteArgs( - ImageId image, const PaletteMap& palMap, const rct_g1_element& sourceImage, int32_t srcX, int32_t srcY, int32_t width, + ImageId image, const PaletteMap& palMap, const G1Element& sourceImage, int32_t srcX, int32_t srcY, int32_t width, int32_t height, uint8_t* destinationBits) : Image(image) , PalMap(palMap) @@ -476,7 +460,7 @@ extern const FilterPaletteID GlassPaletteIds[COLOUR_COUNT]; extern thread_local uint8_t gPeepPalette[256]; extern thread_local uint8_t gOtherPalette[256]; extern uint8_t gTextPalette[]; -extern const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT]; +extern const TranslucentWindowPalette TranslucentWindowPalettes[COLOUR_COUNT]; extern ImageId gPickupPeepImage; extern int32_t gPickupPeepX; @@ -484,109 +468,104 @@ extern int32_t gPickupPeepY; extern bool gTinyFontAntiAliased; -bool clip_drawpixelinfo( - rct_drawpixelinfo* dst, rct_drawpixelinfo* src, const ScreenCoordsXY& coords, int32_t width, int32_t height); -void gfx_set_dirty_blocks(const ScreenRect& rect); -void gfx_invalidate_screen(); +bool ClipDrawPixelInfo(DrawPixelInfo* dst, DrawPixelInfo* src, const ScreenCoordsXY& coords, int32_t width, int32_t height); +void GfxSetDirtyBlocks(const ScreenRect& rect); +void GfxInvalidateScreen(); // palette -void gfx_transpose_palette(int32_t pal, uint8_t product); -void load_palette(); +void GfxTransposePalette(int32_t pal, uint8_t product); +void LoadPalette(); // other -void gfx_clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex); -void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, FilterPaletteID palette); -void gfx_invalidate_pickedup_peep(); -void gfx_draw_pickedup_peep(rct_drawpixelinfo* dpi); +void GfxClear(DrawPixelInfo* dpi, uint8_t paletteIndex); +void GfxFilterPixel(DrawPixelInfo* dpi, const ScreenCoordsXY& coords, FilterPaletteID palette); +void GfxInvalidatePickedUpPeep(); +void GfxDrawPickedUpPeep(DrawPixelInfo* dpi); // line -void gfx_draw_line(rct_drawpixelinfo* dpi, const ScreenLine& line, int32_t colour); -void gfx_draw_line_software(rct_drawpixelinfo* dpi, const ScreenLine& line, int32_t colour); -void gfx_draw_dashed_line( - rct_drawpixelinfo* dpi, const ScreenLine& screenLine, const int32_t dashedLineSegmentLength, const int32_t color); +void GfxDrawLine(DrawPixelInfo* dpi, const ScreenLine& line, int32_t colour); +void GfxDrawLineSoftware(DrawPixelInfo* dpi, const ScreenLine& line, int32_t colour); +void GfxDrawDashedLine( + DrawPixelInfo* dpi, const ScreenLine& screenLine, const int32_t dashedLineSegmentLength, const int32_t color); // rect -void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour); -void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour, uint8_t flags); -void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPaletteID palette); +void GfxFillRect(DrawPixelInfo* dpi, const ScreenRect& rect, int32_t colour); +void GfxFillRectInset(DrawPixelInfo* dpi, const ScreenRect& rect, int32_t colour, uint8_t flags); +void GfxFilterRect(DrawPixelInfo* dpi, const ScreenRect& rect, FilterPaletteID palette); // sprite -bool gfx_load_g1(const OpenRCT2::IPlatformEnvironment& env); -bool gfx_load_g2(); -bool gfx_load_csg(); -void gfx_unload_g1(); -void gfx_unload_g2(); -void gfx_unload_csg(); -const rct_g1_element* gfx_get_g1_element(const ImageId imageId); -const rct_g1_element* gfx_get_g1_element(ImageIndex image_id); -void gfx_set_g1_element(ImageIndex imageId, const rct_g1_element* g1); -std::optional GfxLoadGx(const std::vector& buffer); -bool is_csg_loaded(); -void FASTCALL gfx_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args); -void FASTCALL gfx_bmp_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args); -void FASTCALL gfx_rle_sprite_to_buffer(rct_drawpixelinfo& dpi, const DrawSpriteArgs& args); -void FASTCALL gfx_draw_sprite(rct_drawpixelinfo* dpi, const ImageId image_id, const ScreenCoordsXY& coords); -void FASTCALL - gfx_draw_glyph(rct_drawpixelinfo* dpi, const ImageId image, const ScreenCoordsXY& coords, const PaletteMap& paletteMap); -void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo* dpi, const ImageId image, const ScreenCoordsXY& coords, uint8_t colour); -void FASTCALL gfx_draw_sprite_raw_masked( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const ImageId maskImage, const ImageId colourImage); -void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo* dpi, const ImageId imageId, const ScreenCoordsXY& spriteCoords); -void FASTCALL gfx_draw_sprite_palette_set_software( - rct_drawpixelinfo* dpi, const ImageId imageId, const ScreenCoordsXY& coords, const PaletteMap& paletteMap); -void FASTCALL gfx_draw_sprite_raw_masked_software( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& scrCoords, const ImageId maskImage, const ImageId colourImage); +bool GfxLoadG1(const OpenRCT2::IPlatformEnvironment& env); +bool GfxLoadG2(); +bool GfxLoadCsg(); +void GfxUnloadG1(); +void GfxUnloadG2(); +void GfxUnloadCsg(); +const G1Element* GfxGetG1Element(const ImageId imageId); +const G1Element* GfxGetG1Element(ImageIndex image_id); +void GfxSetG1Element(ImageIndex imageId, const G1Element* g1); +std::optional GfxLoadGx(const std::vector& buffer); +bool IsCsgLoaded(); +void FASTCALL GfxSpriteToBuffer(DrawPixelInfo& dpi, const DrawSpriteArgs& args); +void FASTCALL GfxBmpSpriteToBuffer(DrawPixelInfo& dpi, const DrawSpriteArgs& args); +void FASTCALL GfxRleSpriteToBuffer(DrawPixelInfo& dpi, const DrawSpriteArgs& args); +void FASTCALL GfxDrawSprite(DrawPixelInfo* dpi, const ImageId image_id, const ScreenCoordsXY& coords); +void FASTCALL GfxDrawGlyph(DrawPixelInfo* dpi, const ImageId image, const ScreenCoordsXY& coords, const PaletteMap& paletteMap); +void FASTCALL GfxDrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, const ScreenCoordsXY& coords, uint8_t colour); +void FASTCALL GfxDrawSpriteRawMasked( + DrawPixelInfo* dpi, const ScreenCoordsXY& coords, const ImageId maskImage, const ImageId colourImage); +void FASTCALL GfxDrawSpriteSoftware(DrawPixelInfo* dpi, const ImageId imageId, const ScreenCoordsXY& spriteCoords); +void FASTCALL GfxDrawSpritePaletteSetSoftware( + DrawPixelInfo* dpi, const ImageId imageId, const ScreenCoordsXY& coords, const PaletteMap& paletteMap); +void FASTCALL GfxDrawSpriteRawMaskedSoftware( + DrawPixelInfo* dpi, const ScreenCoordsXY& scrCoords, const ImageId maskImage, const ImageId colourImage); // string -void gfx_draw_string(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint = {}); -void gfx_draw_string_no_formatting( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint); +void GfxDrawString(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint = {}); -void gfx_draw_string_left_centred( - rct_drawpixelinfo* dpi, StringId format, void* args, colour_t colour, const ScreenCoordsXY& coords); -void draw_string_centred_raw( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t numLines, char* text, FontStyle fontStyle); +void GfxDrawStringLeftCentred(DrawPixelInfo& dpi, StringId format, void* args, colour_t colour, const ScreenCoordsXY& coords); +void DrawStringCentredRaw( + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle); void DrawNewsTicker( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, colour_t colour, StringId format, void* args, + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, colour_t colour, StringId format, u8string_view args, int32_t ticks); -void gfx_draw_string_with_y_offsets( - rct_drawpixelinfo* dpi, const utf8* text, int32_t colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, +void GfxDrawStringWithYOffsets( + DrawPixelInfo& dpi, const utf8* text, int32_t colour, const ScreenCoordsXY& coords, const int8_t* yOffsets, bool forceSpriteFont, FontStyle fontStyle); -int32_t gfx_wrap_string(char* buffer, int32_t width, FontStyle fontStyle, int32_t* num_lines); -int32_t gfx_get_string_width(std::string_view text, FontStyle fontStyle); -int32_t gfx_get_string_width_new_lined(std::string_view text, FontStyle fontStyle); -int32_t gfx_get_string_width_no_formatting(std::string_view text, FontStyle fontStyle); -int32_t string_get_height_raw(std::string_view text, FontStyle fontStyle); -int32_t gfx_clip_string(char* buffer, int32_t width, FontStyle fontStyle); -void shorten_path(utf8* buffer, size_t bufferSize, const utf8* path, int32_t availableWidth, FontStyle fontStyle); -void ttf_draw_string( - rct_drawpixelinfo* dpi, const_utf8string text, int32_t colour, const ScreenCoordsXY& coords, bool noFormatting, +int32_t GfxWrapString(u8string_view text, int32_t width, FontStyle fontStyle, u8string* outWrappedText, int32_t* outNumLines); +int32_t GfxGetStringWidth(std::string_view text, FontStyle fontStyle); +int32_t GfxGetStringWidthNewLined(std::string_view text, FontStyle fontStyle); +int32_t GfxGetStringWidthNoFormatting(std::string_view text, FontStyle fontStyle); +int32_t StringGetHeightRaw(std::string_view text, FontStyle fontStyle); +int32_t GfxClipString(char* buffer, int32_t width, FontStyle fontStyle); +void ShortenPath(utf8* buffer, size_t bufferSize, const utf8* path, int32_t availableWidth, FontStyle fontStyle); +void TTFDrawString( + DrawPixelInfo& dpi, const_utf8string text, int32_t colour, const ScreenCoordsXY& coords, bool noFormatting, FontStyle fontStyle, TextDarkness darkness); // scrolling text -void scrolling_text_initialise_bitmaps(); -void scrolling_text_invalidate(); +void ScrollingTextInitialiseBitmaps(); +void ScrollingTextInvalidate(); class Formatter; -ImageId scrolling_text_setup( +ImageId ScrollingTextSetup( struct PaintSession& session, StringId stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode, colour_t colour); -size_t g1_calculate_data_size(const rct_g1_element* g1); +size_t G1CalculateDataSize(const G1Element* g1); -void mask_scalar( +void MaskScalar( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); -void mask_sse4_1( +void MaskSse4_1( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); -void mask_avx2( +void MaskAvx2( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); -void mask_init(); +void MaskInit(); -extern void (*mask_fn)( +extern void (*MaskFn)( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap); diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index 04dc86a7f7..98b72bc3da 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -86,6 +86,10 @@ static const std::unordered_map codepointOffsetMap = { { UnicodeChar::u_ring, SPR_G2_U_RING_LOWER - SPR_CHAR_START }, { UnicodeChar::u_double_acute_uc, SPR_G2_U_DOUBLE_ACUTE_UPPER - SPR_CHAR_START }, { UnicodeChar::u_double_acute, SPR_G2_U_DOUBLE_ACUTE_LOWER - SPR_CHAR_START }, + { UnicodeChar::w_circumflex_uc, SPR_G2_W_CIRCUMFLEX_UPPER - SPR_CHAR_START }, + { UnicodeChar::w_circumflex, SPR_G2_W_CIRCUMFLEX_LOWER - SPR_CHAR_START }, + { UnicodeChar::y_circumflex_uc, SPR_G2_Y_CIRCUMFLEX_UPPER - SPR_CHAR_START }, + { UnicodeChar::y_circumflex, SPR_G2_Y_CIRCUMFLEX_LOWER - SPR_CHAR_START }, { UnicodeChar::z_acute_uc, CSChar::z_acute_uc - CS_SPRITE_FONT_OFFSET }, { UnicodeChar::z_acute, CSChar::z_acute - CS_SPRITE_FONT_OFFSET }, { UnicodeChar::z_dot_uc, CSChar::z_dot_uc - CS_SPRITE_FONT_OFFSET }, @@ -235,7 +239,7 @@ static char32_t _biggestCodepointValue = 0; * * rct2: 0x006C19AC */ -void font_sprite_initialise_characters() +void FontSpriteInitialiseCharacters() { // Compute min and max that helps avoiding lookups for no reason. _smallestCodepointValue = std::numeric_limits::max(); @@ -250,7 +254,7 @@ void font_sprite_initialise_characters() int32_t glyphOffset = EnumValue(fontStyle) * FONT_SPRITE_GLYPH_COUNT; for (uint8_t glyphIndex = 0; glyphIndex < FONT_SPRITE_GLYPH_COUNT; glyphIndex++) { - const rct_g1_element* g1 = gfx_get_g1_element(glyphIndex + SPR_CHAR_START + glyphOffset); + const G1Element* g1 = GfxGetG1Element(glyphIndex + SPR_CHAR_START + glyphOffset); int32_t width = 0; if (g1 != nullptr) { @@ -266,7 +270,7 @@ void font_sprite_initialise_characters() int32_t glyphOffset = EnumValue(fontStyle) * SPR_G2_GLYPH_COUNT; for (int32_t glyphIndex = 0; glyphIndex < SPR_G2_GLYPH_COUNT; glyphIndex++) { - const rct_g1_element* g1 = gfx_get_g1_element(glyphIndex + SPR_G2_CHAR_BEGIN + glyphOffset); + const G1Element* g1 = GfxGetG1Element(glyphIndex + SPR_G2_CHAR_BEGIN + glyphOffset); int32_t width = 0; if (g1 != nullptr) { @@ -277,10 +281,10 @@ void font_sprite_initialise_characters() } } - scrolling_text_initialise_bitmaps(); + ScrollingTextInitialiseBitmaps(); } -int32_t font_sprite_get_codepoint_offset(int32_t codepoint) +int32_t FontSpriteGetCodepointOffset(int32_t codepoint) { // Only search the table when its in range of the map. if (static_cast(codepoint) >= _smallestCodepointValue @@ -297,9 +301,9 @@ int32_t font_sprite_get_codepoint_offset(int32_t codepoint) return codepoint - 32; } -int32_t font_sprite_get_codepoint_width(FontStyle fontStyle, int32_t codepoint) +int32_t FontSpriteGetCodepointWidth(FontStyle fontStyle, int32_t codepoint) { - int32_t glyphIndex = font_sprite_get_codepoint_offset(codepoint); + int32_t glyphIndex = FontSpriteGetCodepointOffset(codepoint); auto baseFontIndex = EnumValue(fontStyle); if (glyphIndex >= FONT_SPRITE_GLYPH_COUNT) { @@ -307,7 +311,7 @@ int32_t font_sprite_get_codepoint_width(FontStyle fontStyle, int32_t codepoint) if (glyphIndex >= static_cast(std::size(_additionalSpriteFontCharacterWidth[baseFontIndex]))) { - log_warning("Invalid glyph index %u", glyphIndex); + LOG_WARNING("Invalid glyph index %u", glyphIndex); glyphIndex = 0; } return _additionalSpriteFontCharacterWidth[baseFontIndex][glyphIndex]; @@ -315,16 +319,16 @@ int32_t font_sprite_get_codepoint_width(FontStyle fontStyle, int32_t codepoint) if (glyphIndex < 0 || glyphIndex >= static_cast(FONT_SPRITE_GLYPH_COUNT)) { - log_warning("Invalid glyph index %u", glyphIndex); + LOG_WARNING("Invalid glyph index %u", glyphIndex); glyphIndex = 0; } return _spriteFontCharacterWidths[baseFontIndex][glyphIndex]; } -ImageId font_sprite_get_codepoint_sprite(FontStyle fontStyle, int32_t codepoint) +ImageId FontSpriteGetCodepointSprite(FontStyle fontStyle, int32_t codepoint) { int32_t offset = EnumValue(fontStyle) * FONT_SPRITE_GLYPH_COUNT; - auto codePointOffset = font_sprite_get_codepoint_offset(codepoint); + auto codePointOffset = FontSpriteGetCodepointOffset(codepoint); if (codePointOffset > FONT_SPRITE_GLYPH_COUNT) { offset = EnumValue(fontStyle) * SPR_G2_GLYPH_COUNT; @@ -333,7 +337,7 @@ ImageId font_sprite_get_codepoint_sprite(FontStyle fontStyle, int32_t codepoint) return ImageId(SPR_CHAR_START + offset + codePointOffset, COLOUR_BLACK); } -int32_t font_get_line_height(FontStyle fontStyle) +int32_t FontGetLineHeight(FontStyle fontStyle) { auto fontSize = EnumValue(fontStyle); #ifndef NO_TTF @@ -345,17 +349,17 @@ int32_t font_get_line_height(FontStyle fontStyle) return SpriteFontLineHeight[fontSize]; } -int32_t font_get_line_height_small(FontStyle fontStyle) +int32_t FontGetLineHeightSmall(FontStyle fontStyle) { - return font_get_line_height(fontStyle) / 2; + return FontGetLineHeight(fontStyle) / 2; } -bool font_supports_string_sprite(const utf8* text) +bool FontSupportsStringSprite(const utf8* text) { const utf8* src = text; uint32_t codepoint; - while ((codepoint = utf8_get_next(src, &src)) != 0) + while ((codepoint = UTF8GetNext(src, &src)) != 0) { bool supported = false; @@ -377,7 +381,7 @@ bool font_supports_string_sprite(const utf8* text) return true; } -bool font_supports_string_ttf(const utf8* text, FontStyle fontStyle) +bool FontSupportsStringTTF(const utf8* text, FontStyle fontStyle) { #ifndef NO_TTF const utf8* src = text; @@ -388,9 +392,9 @@ bool font_supports_string_ttf(const utf8* text, FontStyle fontStyle) } uint32_t codepoint; - while ((codepoint = utf8_get_next(src, &src)) != 0) + while ((codepoint = UTF8GetNext(src, &src)) != 0) { - bool supported = ttf_provides_glyph(font, codepoint); + bool supported = TTFProvidesGlyph(font, codepoint); if (!supported) { return false; @@ -402,12 +406,12 @@ bool font_supports_string_ttf(const utf8* text, FontStyle fontStyle) #endif // NO_TTF } -bool font_supports_string(const utf8* text, FontStyle fontStyle) +bool FontSupportsString(const utf8* text, FontStyle fontStyle) { if (LocalisationService_UseTrueTypeFont()) { - return font_supports_string_ttf(text, fontStyle); + return FontSupportsStringTTF(text, fontStyle); } - return font_supports_string_sprite(text); + return FontSupportsStringSprite(text); } diff --git a/src/openrct2/drawing/Font.h b/src/openrct2/drawing/Font.h index e5e527334e..4f8440aef6 100644 --- a/src/openrct2/drawing/Font.h +++ b/src/openrct2/drawing/Font.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -52,12 +52,12 @@ extern TTFFontSetDescriptor* gCurrentTTFFontSet; #endif // NO_TTF -void font_sprite_initialise_characters(); -int32_t font_sprite_get_codepoint_offset(int32_t codepoint); -int32_t font_sprite_get_codepoint_width(FontStyle fontStyle, int32_t codepoint); -ImageId font_sprite_get_codepoint_sprite(FontStyle fontStyle, int32_t codepoint); -int32_t font_get_line_height(FontStyle fontStyle); -int32_t font_get_line_height_small(FontStyle fontStyle); -bool font_supports_string_sprite(const utf8* text); -bool font_supports_string_ttf(const utf8* text, FontStyle fontStyle); -bool font_supports_string(const utf8* text, FontStyle fontStyle); +void FontSpriteInitialiseCharacters(); +int32_t FontSpriteGetCodepointOffset(int32_t codepoint); +int32_t FontSpriteGetCodepointWidth(FontStyle fontStyle, int32_t codepoint); +ImageId FontSpriteGetCodepointSprite(FontStyle fontStyle, int32_t codepoint); +int32_t FontGetLineHeight(FontStyle fontStyle); +int32_t FontGetLineHeightSmall(FontStyle fontStyle); +bool FontSupportsStringSprite(const utf8* text); +bool FontSupportsStringTTF(const utf8* text, FontStyle fontStyle); +bool FontSupportsString(const utf8* text, FontStyle fontStyle); diff --git a/src/openrct2/drawing/IDrawingContext.h b/src/openrct2/drawing/IDrawingContext.h index ebffd179ec..273b72ca89 100644 --- a/src/openrct2/drawing/IDrawingContext.h +++ b/src/openrct2/drawing/IDrawingContext.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,21 +20,20 @@ namespace OpenRCT2::Drawing { virtual ~IDrawingContext() = default; - virtual void Clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) abstract; + virtual void Clear(DrawPixelInfo* dpi, uint8_t paletteIndex) abstract; virtual void FillRect( - rct_drawpixelinfo* dpi, uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; + DrawPixelInfo* dpi, uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; virtual void FilterRect( - rct_drawpixelinfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; - virtual void DrawLine(rct_drawpixelinfo* dpi, uint32_t colour, const ScreenLine& line) abstract; - virtual void DrawSprite(rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y) abstract; + DrawPixelInfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract; + virtual void DrawLine(DrawPixelInfo* dpi, uint32_t colour, const ScreenLine& line) abstract; + virtual void DrawSprite(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y) abstract; virtual void DrawSpriteRawMasked( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) abstract; - virtual void DrawSpriteSolid( - rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) abstract; + DrawPixelInfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) abstract; + virtual void DrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) abstract; virtual void DrawGlyph( - rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) abstract; + DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) abstract; virtual void DrawBitmap( - rct_drawpixelinfo* dpi, ImageIndex image, const void* pixels, int32_t width, int32_t height, int32_t x, + DrawPixelInfo* dpi, ImageIndex image, const void* pixels, int32_t width, int32_t height, int32_t x, int32_t y) abstract; }; diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index 1d45c378da..974819b226 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ enum DRAWING_ENGINE_FLAGS DEF_PARALLEL_DRAWING = 1 << 1, }; -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct GamePalette; namespace OpenRCT2::Ui @@ -72,7 +72,7 @@ namespace OpenRCT2::Drawing virtual std::string Screenshot() abstract; virtual IDrawingContext* GetDrawingContext() abstract; - virtual rct_drawpixelinfo* GetDrawingPixelInfo() abstract; + virtual DrawPixelInfo* GetDrawingPixelInfo() abstract; virtual DRAWING_ENGINE_FLAGS GetFlags() abstract; @@ -92,7 +92,7 @@ namespace OpenRCT2::Drawing { virtual ~IWeatherDrawer() = default; virtual void Draw( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, + DrawPixelInfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, const uint8_t* weatherpattern) abstract; }; } // namespace OpenRCT2::Drawing diff --git a/src/openrct2/drawing/Image.cpp b/src/openrct2/drawing/Image.cpp index ab4a055066..254bf244f4 100644 --- a/src/openrct2/drawing/Image.cpp +++ b/src/openrct2/drawing/Image.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -162,7 +162,7 @@ static void FreeImageList(uint32_t baseImageId, uint32_t count) #ifdef DEBUG_LEVEL_1 if (!AllocatedListRemove(baseImageId, count)) { - log_error("Cannot unload %u items from offset %u", count, baseImageId); + LOG_ERROR("Cannot unload %u items from offset %u", count, baseImageId); } #endif _allocatedImageCount -= count; @@ -186,7 +186,7 @@ static void FreeImageList(uint32_t baseImageId, uint32_t count) _freeLists.push_back({ baseImageId, count }); } -uint32_t gfx_object_allocate_images(const rct_g1_element* images, uint32_t count) +uint32_t GfxObjectAllocateImages(const G1Element* images, uint32_t count) { if (count == 0 || gOpenRCT2NoGraphics) { @@ -196,22 +196,22 @@ uint32_t gfx_object_allocate_images(const rct_g1_element* images, uint32_t count uint32_t baseImageId = AllocateImageList(count); if (baseImageId == INVALID_IMAGE_ID) { - log_error("Reached maximum image limit."); + LOG_ERROR("Reached maximum image limit."); return INVALID_IMAGE_ID; } uint32_t imageId = baseImageId; for (uint32_t i = 0; i < count; i++) { - gfx_set_g1_element(imageId, &images[i]); - drawing_engine_invalidate_image(imageId); + GfxSetG1Element(imageId, &images[i]); + DrawingEngineInvalidateImage(imageId); imageId++; } return baseImageId; } -void gfx_object_free_images(uint32_t baseImageId, uint32_t count) +void GfxObjectFreeImages(uint32_t baseImageId, uint32_t count) { if (baseImageId != 0 && baseImageId != INVALID_IMAGE_ID) { @@ -220,16 +220,16 @@ void gfx_object_free_images(uint32_t baseImageId, uint32_t count) for (uint32_t i = 0; i < count; i++) { uint32_t imageId = baseImageId + i; - rct_g1_element g1 = {}; - gfx_set_g1_element(imageId, &g1); - drawing_engine_invalidate_image(imageId); + G1Element g1 = {}; + GfxSetG1Element(imageId, &g1); + DrawingEngineInvalidateImage(imageId); } FreeImageList(baseImageId, count); } } -void gfx_object_check_all_images_freed() +void GfxObjectCheckAllImagesFreed() { if (_allocatedImageCount != 0) { diff --git a/src/openrct2/drawing/Image.h b/src/openrct2/drawing/Image.h index 330f2ee602..b5e2d8674e 100644 --- a/src/openrct2/drawing/Image.h +++ b/src/openrct2/drawing/Image.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ #include #include -struct rct_g1_element; +struct G1Element; struct ImageList { @@ -55,9 +55,9 @@ constexpr bool operator!=(const ImageList& lhs, const ImageList& rhs) return !(lhs == rhs); } -uint32_t gfx_object_allocate_images(const rct_g1_element* images, uint32_t count); -void gfx_object_free_images(uint32_t baseImageId, uint32_t count); -void gfx_object_check_all_images_freed(); +uint32_t GfxObjectAllocateImages(const G1Element* images, uint32_t count); +void GfxObjectFreeImages(uint32_t baseImageId, uint32_t count); +void GfxObjectCheckAllImagesFreed(); size_t ImageListGetUsedCount(); size_t ImageListGetMaximum(); const std::list& GetAvailableAllocationRanges(); diff --git a/src/openrct2/drawing/ImageId.hpp b/src/openrct2/drawing/ImageId.hpp index fff3a95c1c..6821f9cc2e 100644 --- a/src/openrct2/drawing/ImageId.hpp +++ b/src/openrct2/drawing/ImageId.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -121,7 +121,7 @@ public: { } - [[nodiscard]] uint32_t ToUInt32() const + [[nodiscard]] constexpr uint32_t ToUInt32() const { auto result = (_index & MASK_INDEX); result |= (_primary << SHIFT_REMAP) & MASK_REMAP; @@ -287,5 +287,16 @@ public: result._flags &= ~NEW_FLAG_BLEND; return result; } + + constexpr bool operator==(const ImageId& rhs) const + { + return _index == rhs._index && _primary == rhs._primary && _secondary == rhs._secondary && _tertiary == rhs._tertiary + && _flags == rhs._flags; + } + + constexpr bool operator!=(const ImageId& rhs) const + { + return !(*this == rhs); + } }; static_assert(sizeof(ImageId) == 8, "The size of this struct is expected to fit in 64 bits for perfomance reasons. See #18555"); diff --git a/src/openrct2/drawing/ImageImporter.cpp b/src/openrct2/drawing/ImageImporter.cpp index 06d68cb065..3137f1603f 100644 --- a/src/openrct2/drawing/ImageImporter.cpp +++ b/src/openrct2/drawing/ImageImporter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -43,7 +43,7 @@ ImportResult ImageImporter::Import( auto pixels = GetPixels(image.Pixels.data(), image.Stride, srcX, srcY, width, height, palette, flags, mode); auto buffer = flags & ImportFlags::RLE ? EncodeRLE(pixels.data(), width, height) : EncodeRaw(pixels.data(), width, height); - rct_g1_element outElement; + G1Element outElement; outElement.width = width; outElement.height = height; outElement.flags = (flags & ImportFlags::RLE ? G1_FLAG_RLE_COMPRESSION : G1_FLAG_HAS_TRANSPARENCY); diff --git a/src/openrct2/drawing/ImageImporter.h b/src/openrct2/drawing/ImageImporter.h index a9fd1637a8..9fb532f4cf 100644 --- a/src/openrct2/drawing/ImageImporter.h +++ b/src/openrct2/drawing/ImageImporter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,7 +27,7 @@ namespace OpenRCT2::Drawing public: struct ImportResult { - rct_g1_element Element{}; + G1Element Element{}; std::vector Buffer; }; diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index 05828bab77..c6b8721b8a 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,7 +37,7 @@ static uint8_t _bakedLightTexture_spot_0[32 * 32]; static uint8_t _bakedLightTexture_spot_1[64 * 64]; static uint8_t _bakedLightTexture_spot_2[128 * 128]; static uint8_t _bakedLightTexture_spot_3[256 * 256]; -static rct_drawpixelinfo _pixelInfo; +static DrawPixelInfo _pixelInfo; static bool _lightfxAvailable = false; static void* _light_rendered_buffer_back = nullptr; @@ -85,7 +85,7 @@ static ZoomLevel _current_view_zoom_back_delay{ 0 }; static GamePalette gPalette_light; -static uint8_t calc_light_intensity_lantern(int32_t x, int32_t y) +static uint8_t CalcLightIntensityLantern(int32_t x, int32_t y) { double distance = static_cast(x * x + y * y); @@ -96,7 +96,7 @@ static uint8_t calc_light_intensity_lantern(int32_t x, int32_t y) return static_cast(std::min(255.0, light * 255.0)); } -static uint8_t calc_light_intensity_spot(int32_t x, int32_t y) +static uint8_t CalcLightIntensitySpot(int32_t x, int32_t y) { double distance = static_cast(x * x + y * y); @@ -107,7 +107,7 @@ static uint8_t calc_light_intensity_spot(int32_t x, int32_t y) return static_cast(std::min(255.0, light * 255.0)) >> 4; } -static void calc_rescale_light_half(uint8_t* target, uint8_t* source, uint32_t targetWidth, uint32_t targetHeight) +static void CalcRescaleLightHalf(uint8_t* target, uint8_t* source, uint32_t targetWidth, uint32_t targetHeight) { uint8_t* parcerRead = source; uint8_t* parcerWrite = target; @@ -124,22 +124,22 @@ static void calc_rescale_light_half(uint8_t* target, uint8_t* source, uint32_t t } } -void lightfx_set_available(bool available) +void LightFXSetAvailable(bool available) { _lightfxAvailable = available; } -bool lightfx_is_available() +bool LightFXIsAvailable() { return _lightfxAvailable && gConfigGeneral.EnableLightFx != 0; } -bool lightfx_for_vehicles_is_available() +bool LightFXForVehiclesIsAvailable() { - return lightfx_is_available() && gConfigGeneral.EnableLightFxForVehicles != 0; + return LightFXIsAvailable() && gConfigGeneral.EnableLightFxForVehicles != 0; } -void lightfx_init() +void LightFXInit() { _LightListBack = _LightListA; _LightListFront = _LightListB; @@ -155,7 +155,7 @@ void lightfx_init() { for (int32_t x = 0; x < 256; x++) { - *parcer = calc_light_intensity_lantern(x - 128, y - 128); + *parcer = CalcLightIntensityLantern(x - 128, y - 128); parcer++; } } @@ -166,28 +166,28 @@ void lightfx_init() { for (int32_t x = 0; x < 256; x++) { - *parcer = calc_light_intensity_spot(x - 128, y - 128); + *parcer = CalcLightIntensitySpot(x - 128, y - 128); parcer++; } } - calc_rescale_light_half(_bakedLightTexture_lantern_2, _bakedLightTexture_lantern_3, 128, 128); - calc_rescale_light_half(_bakedLightTexture_lantern_1, _bakedLightTexture_lantern_2, 64, 64); - calc_rescale_light_half(_bakedLightTexture_lantern_0, _bakedLightTexture_lantern_1, 32, 32); + CalcRescaleLightHalf(_bakedLightTexture_lantern_2, _bakedLightTexture_lantern_3, 128, 128); + CalcRescaleLightHalf(_bakedLightTexture_lantern_1, _bakedLightTexture_lantern_2, 64, 64); + CalcRescaleLightHalf(_bakedLightTexture_lantern_0, _bakedLightTexture_lantern_1, 32, 32); - calc_rescale_light_half(_bakedLightTexture_spot_2, _bakedLightTexture_spot_3, 128, 128); - calc_rescale_light_half(_bakedLightTexture_spot_1, _bakedLightTexture_spot_2, 64, 64); - calc_rescale_light_half(_bakedLightTexture_spot_0, _bakedLightTexture_spot_1, 32, 32); + CalcRescaleLightHalf(_bakedLightTexture_spot_2, _bakedLightTexture_spot_3, 128, 128); + CalcRescaleLightHalf(_bakedLightTexture_spot_1, _bakedLightTexture_spot_2, 64, 64); + CalcRescaleLightHalf(_bakedLightTexture_spot_0, _bakedLightTexture_spot_1, 32, 32); } -void lightfx_update_buffers(rct_drawpixelinfo* info) +void LightFXUpdateBuffers(DrawPixelInfo* info) { _light_rendered_buffer_front = realloc(_light_rendered_buffer_front, info->width * info->height); _light_rendered_buffer_back = realloc(_light_rendered_buffer_back, info->width * info->height); _pixelInfo = *info; } -void lightfx_prepare_light_list() +void LightFXPrepareLightList() { for (uint32_t light = 0; light < LightListCurrentCountFront; light++) { @@ -294,11 +294,11 @@ void lightfx_prepare_light_list() ViewportInteractionItem interactionType = ViewportInteractionItem::None; - auto* w = window_get_main(); + auto* w = WindowGetMain(); if (w != nullptr) { - // based on get_map_coordinates_from_pos_window - rct_drawpixelinfo dpi; + // based on GetMapCoordinatesFromPosWindow + DrawPixelInfo dpi; dpi.x = entry->ViewCoords.x + offsetPattern[0 + pat * 2] / mapFrontDiv; dpi.y = entry->ViewCoords.y + offsetPattern[1 + pat * 2] / mapFrontDiv; dpi.height = 1; @@ -308,11 +308,10 @@ void lightfx_prepare_light_list() PaintSession* session = PaintSessionAlloc(&dpi, w->viewport->flags); PaintSessionGenerate(*session); PaintSessionArrange(*session); - auto info = set_interaction_info_from_paint_session( - session, w->viewport->flags, ViewportInteractionItemAll); + auto info = SetInteractionInfoFromPaintSession(session, w->viewport->flags, ViewportInteractionItemAll); PaintSessionFree(session); - // log_warning("[%i, %i]", dpi->x, dpi->y); + // LOG_WARNING("[%i, %i]", dpi->x, dpi->y); mapCoord = info.Loc; mapCoord.x += tileOffsetX; @@ -347,7 +346,7 @@ void lightfx_prepare_light_list() lightIntensityOccluded += std::max(0, 200 - (projDot * 20)); } - // log_warning("light %i [%i, %i, %i], [%i, %i] minDist to %i: %i; projdot: %i", light, coord_3d.x, coord_3d.y, + // LOG_WARNING("light %i [%i, %i, %i], [%i, %i] minDist to %i: %i; projdot: %i", light, coord_3d.x, coord_3d.y, // coord_3d.z, mapCoord.x, mapCoord.y, baseHeight, minDist, projDot); if (pat == 0) @@ -402,7 +401,7 @@ void lightfx_prepare_light_list() } } -void lightfx_swap_buffers() +void LightFXSwapBuffers() { void* tmp = _light_rendered_buffer_back; _light_rendered_buffer_back = _light_rendered_buffer_front; @@ -430,20 +429,20 @@ void lightfx_swap_buffers() _current_view_zoom_back_delay = _current_view_zoom_back; } -void lightfx_update_viewport_settings() +void LightFXUpdateViewportSettings() { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - rct_viewport* viewport = window_get_viewport(mainWindow); + Viewport* viewport = WindowGetViewport(mainWindow); _current_view_x_back = viewport->viewPos.x; _current_view_y_back = viewport->viewPos.y; - _current_view_rotation_back = get_current_rotation(); + _current_view_rotation_back = GetCurrentRotation(); _current_view_zoom_back = viewport->zoom; } } -void lightfx_render_lights_to_frontbuffer() +void LightFXRenderLightsToFrontBuffer() { if (_light_rendered_buffer_front == nullptr) { @@ -454,7 +453,7 @@ void lightfx_render_lights_to_frontbuffer() _lightPolution_back = 0; - // log_warning("%i lights", LightListCurrentCountFront); + // LOG_WARNING("%i lights", LightListCurrentCountFront); for (uint32_t light = 0; light < LightListCurrentCountFront; light++) { @@ -615,17 +614,17 @@ void lightfx_render_lights_to_frontbuffer() } } -void* lightfx_get_front_buffer() +void* LightFXGetFrontBuffer() { return _light_rendered_buffer_front; } -const GamePalette& lightfx_get_palette() +const GamePalette& LightFXGetPalette() { return gPalette_light; } -static void LightfxAdd3DLight( +static void LightFXAdd3DLight( const uint32_t lightHash, const LightFXQualifier qualifier, const uint8_t id, const CoordsXYZ& loc, const LightType lightType) { @@ -634,7 +633,7 @@ static void LightfxAdd3DLight( return; } - // log_warning("%i lights in back", LightListCurrentCountBack); + // LOG_WARNING("%i lights in back", LightListCurrentCountBack); for (uint32_t i = 0; i < LightListCurrentCountBack; i++) { @@ -647,7 +646,7 @@ static void LightfxAdd3DLight( continue; entry->Position = loc; - entry->ViewCoords = Translate3DTo2DWithZ(get_current_rotation(), loc); + entry->ViewCoords = Translate3DTo2DWithZ(GetCurrentRotation(), loc); entry->Type = lightType; entry->LightIntensity = 0xFF; entry->LightHash = lightHash; @@ -661,7 +660,7 @@ static void LightfxAdd3DLight( LightListEntry* entry = &_LightListBack[LightListCurrentCountBack++]; entry->Position = loc; - entry->ViewCoords = Translate3DTo2DWithZ(get_current_rotation(), loc); + entry->ViewCoords = Translate3DTo2DWithZ(GetCurrentRotation(), loc); entry->Type = lightType; entry->LightIntensity = 0xFF; entry->LightHash = lightHash; @@ -669,29 +668,29 @@ static void LightfxAdd3DLight( entry->LightID = id; entry->LightLinger = 1; - // log_warning("new 3d light"); + // LOG_WARNING("new 3d light"); } -static void LightfxAdd3DLight(const CoordsXYZ& loc, const LightType lightType) +static void LightFXAdd3DLight(const CoordsXYZ& loc, const LightType lightType) { - LightfxAdd3DLight(((loc.x << 16) | loc.y), LightFXQualifier::Map, loc.z, loc, lightType); + LightFXAdd3DLight(((loc.x << 16) | loc.y), LightFXQualifier::Map, loc.z, loc, lightType); } -void LightfxAdd3DLight(const EntityBase& entity, const uint8_t id, const CoordsXYZ& loc, const LightType lightType) +void LightFXAdd3DLight(const EntityBase& entity, const uint8_t id, const CoordsXYZ& loc, const LightType lightType) { - LightfxAdd3DLight(entity.sprite_index.ToUnderlying(), LightFXQualifier::Entity, id, loc, lightType); + LightFXAdd3DLight(entity.Id.ToUnderlying(), LightFXQualifier::Entity, id, loc, lightType); } -void lightfx_add_3d_light_magic_from_drawing_tile( +void LightFXAdd3DLightMagicFromDrawingTile( const CoordsXY& mapPosition, int16_t offsetX, int16_t offsetY, int16_t offsetZ, LightType lightType) { int16_t x = mapPosition.x + offsetX + 16; int16_t y = mapPosition.y + offsetY + 16; - LightfxAdd3DLight({ x, y, offsetZ }, lightType); + LightFXAdd3DLight({ x, y, offsetZ }, lightType); } -uint32_t lightfx_get_light_polution() +uint32_t LightFXGetLightPolution() { return _lightPolution_front; } @@ -701,10 +700,10 @@ static constexpr const int16_t offsetLookup[] = { }; void LightFxAddLightsMagicVehicle_ObservationTower(const Vehicle* vehicle) { - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y + 16, vehicle->z }, LightType::Spot3); - LightfxAdd3DLight(*vehicle, 1, { vehicle->x + 16, vehicle->y, vehicle->z }, LightType::Spot3); - LightfxAdd3DLight(*vehicle, 2, { vehicle->x - 16, vehicle->y, vehicle->z }, LightType::Spot3); - LightfxAdd3DLight(*vehicle, 3, { vehicle->x, vehicle->y - 16, vehicle->z }, LightType::Spot3); + LightFXAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y + 16, vehicle->z }, LightType::Spot3); + LightFXAdd3DLight(*vehicle, 1, { vehicle->x + 16, vehicle->y, vehicle->z }, LightType::Spot3); + LightFXAdd3DLight(*vehicle, 2, { vehicle->x - 16, vehicle->y, vehicle->z }, LightType::Spot3); + LightFXAdd3DLight(*vehicle, 3, { vehicle->x, vehicle->y - 16, vehicle->z }, LightType::Spot3); } void LightFxAddLightsMagicVehicle_MineTrainCoaster(const Vehicle* vehicle) @@ -713,13 +712,13 @@ void LightFxAddLightsMagicVehicle_MineTrainCoaster(const Vehicle* vehicle) { int16_t place_x = vehicle->x - offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; int16_t place_y = vehicle->y - offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle->z }, LightType::Spot3); + LightFXAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle->z }, LightType::Spot3); } } void LightFxAddLightsMagicVehicle_ChairLift(const Vehicle* vehicle) { - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z - 16 }, LightType::Lantern2); + LightFXAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z - 16 }, LightType::Lantern2); } void LightFxAddLightsMagicVehicle_BoatHire(const Vehicle* vehicle) { @@ -733,33 +732,33 @@ void LightFxAddLightsMagicVehicle_BoatHire(const Vehicle* vehicle) int16_t place_y = vehicle_draw->y; place_x -= offsetLookup[(vehicle_draw->sprite_direction + 0) % 32]; place_y -= offsetLookup[(vehicle_draw->sprite_direction + 8) % 32]; - LightfxAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); + LightFXAdd3DLight(*vehicle, 0, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); place_x -= offsetLookup[(vehicle_draw->sprite_direction + 0) % 32]; place_y -= offsetLookup[(vehicle_draw->sprite_direction + 8) % 32]; - LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); + LightFXAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle_draw->z }, LightType::Spot2); } void LightFxAddLightsMagicVehicle_Monorail(const Vehicle* vehicle) { - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 12 }, LightType::Spot2); + LightFXAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 12 }, LightType::Spot2); int16_t place_x = vehicle->x; int16_t place_y = vehicle->y; if (vehicle == vehicle->TrainHead()) { place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 3; place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 3; - LightfxAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); } if (vehicle == vehicle->TrainTail()) { place_x += offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; place_y += offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 3, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 3, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); place_x += offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; place_y += offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 4, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 4, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); } } void LightFxAddLightsMagicVehicle_MiniatureRailway(const Vehicle* vehicle) @@ -768,18 +767,18 @@ void LightFxAddLightsMagicVehicle_MiniatureRailway(const Vehicle* vehicle) { int16_t place_x = vehicle->x - offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; int16_t place_y = vehicle->y - offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 1, { place_x, place_y, vehicle->z + 10 }, LightType::Lantern3); place_x -= offsetLookup[(vehicle->sprite_direction + 0) % 32] * 2; place_y -= offsetLookup[(vehicle->sprite_direction + 8) % 32] * 2; - LightfxAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 2, { place_x, place_y, vehicle->z + 2 }, LightType::Lantern3); } else { - LightfxAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 10 }, LightType::Lantern3); + LightFXAdd3DLight(*vehicle, 0, { vehicle->x, vehicle->y, vehicle->z + 10 }, LightType::Lantern3); } } -void LightfxAddLightsMagicVehicle(const Vehicle* vehicle) +void LightFXAddLightsMagicVehicle(const Vehicle* vehicle) { auto ride = vehicle->GetRide(); if (ride == nullptr) @@ -792,52 +791,52 @@ void LightfxAddLightsMagicVehicle(const Vehicle* vehicle) void LightFxAddKioskLights(const CoordsXY& mapPosition, const int32_t height, const uint8_t zOffset) { - uint8_t relativeRotation = (4 - get_current_rotation()) % 4; + uint8_t relativeRotation = (4 - GetCurrentRotation()) % 4; CoordsXY lanternOffset1 = CoordsXY(0, 16).Rotate(relativeRotation); CoordsXY lanternOffset2 = CoordsXY(16, 0).Rotate(relativeRotation); - lightfx_add_3d_light_magic_from_drawing_tile( + LightFXAdd3DLightMagicFromDrawingTile( mapPosition, lanternOffset1.x, lanternOffset1.y, height + zOffset, LightType::Lantern3); - lightfx_add_3d_light_magic_from_drawing_tile( + LightFXAdd3DLightMagicFromDrawingTile( mapPosition, lanternOffset2.x, lanternOffset2.y, height + zOffset, LightType::Lantern3); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, 8, 32, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, 32, 8, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, -32, 8, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, 8, -32, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, -8, 32, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, 32, -8, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, -32, -8, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, -8, -32, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, 8, 32, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, 32, 8, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, -32, 8, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, 8, -32, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, -8, 32, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, 32, -8, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, -32, -8, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, -8, -32, height, LightType::Spot1); } void LightFxAddShopLights(const CoordsXY& mapPosition, const uint8_t direction, const int32_t height, const uint8_t zOffset) { - if (direction == (4 - get_current_rotation()) % 4) // Back Right Facing Stall + if (direction == (4 - GetCurrentRotation()) % 4) // Back Right Facing Stall { CoordsXY spotOffset1 = CoordsXY(-32, 8).Rotate(direction); CoordsXY spotOffset2 = CoordsXY(-32, 4).Rotate(direction); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, spotOffset1.x, spotOffset1.y, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, spotOffset2.x, spotOffset2.y, height, LightType::Spot2); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, spotOffset1.x, spotOffset1.y, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, spotOffset2.x, spotOffset2.y, height, LightType::Spot2); } - else if (direction == (7 - get_current_rotation()) % 4) // Back left Facing Stall + else if (direction == (7 - GetCurrentRotation()) % 4) // Back left Facing Stall { CoordsXY spotOffset1 = CoordsXY(-32, -8).Rotate(direction); CoordsXY spotOffset2 = CoordsXY(-32, -4).Rotate(direction); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, spotOffset1.x, spotOffset1.y, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, spotOffset2.x, spotOffset2.y, height, LightType::Spot2); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, spotOffset1.x, spotOffset1.y, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, spotOffset2.x, spotOffset2.y, height, LightType::Spot2); } else // Forward Facing Stall { CoordsXY spotOffset1 = CoordsXY(-32, 8).Rotate(direction); CoordsXY spotOffset2 = CoordsXY(-32, -8).Rotate(direction); CoordsXY lanternOffset = CoordsXY(-16, 0).Rotate(direction); - lightfx_add_3d_light_magic_from_drawing_tile( + LightFXAdd3DLightMagicFromDrawingTile( mapPosition, lanternOffset.x, lanternOffset.y, height + zOffset, LightType::Lantern3); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, spotOffset1.x, spotOffset1.y, height, LightType::Spot1); - lightfx_add_3d_light_magic_from_drawing_tile(mapPosition, spotOffset2.x, spotOffset2.y, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, spotOffset1.x, spotOffset1.y, height, LightType::Spot1); + LightFXAdd3DLightMagicFromDrawingTile(mapPosition, spotOffset2.x, spotOffset2.y, height, LightType::Spot1); } } -void lightfx_apply_palette_filter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) +void LightFXApplyPaletteFilter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) { float night = static_cast(pow(gDayNightCycle, 1.5)); @@ -856,9 +855,9 @@ void lightfx_apply_palette_filter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) float sunLight = std::max(0.0f, std::min(1.0f, 2.0f - night * 3.0f)); // Night version - natLightR = flerp(natLightR * 4.0f, 0.635f, (std::pow(night, 0.035f + sunLight * 10.50f))); - natLightG = flerp(natLightG * 4.0f, 0.650f, (std::pow(night, 0.100f + sunLight * 5.50f))); - natLightB = flerp(natLightB * 4.0f, 0.850f, (std::pow(night, 0.200f + sunLight * 1.5f))); + natLightR = FLerp(natLightR * 4.0f, 0.635f, (std::pow(night, 0.035f + sunLight * 10.50f))); + natLightG = FLerp(natLightG * 4.0f, 0.650f, (std::pow(night, 0.100f + sunLight * 5.50f))); + natLightB = FLerp(natLightB * 4.0f, 0.850f, (std::pow(night, 0.200f + sunLight * 1.5f))); float overExpose = 0.0f; float lightAvg = (natLightR + natLightG + natLightB) / 3.0f; @@ -920,7 +919,7 @@ void lightfx_apply_palette_filter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) reduceColourLit *= night / static_cast(std::pow(std::max(1.01f, 0.4f + lightAvg), 2.0)); float targetLightPollution = reduceColourLit - * std::max(0.0f, 0.0f + 0.000001f * static_cast(lightfx_get_light_polution())); + * std::max(0.0f, 0.0f + 0.000001f * static_cast(LightFXGetLightPolution())); lightPolution -= (lightPolution - targetLightPollution) * 0.001f; // lightPollution /= 1.0f + fogginess * 1.0f; @@ -954,9 +953,9 @@ void lightfx_apply_palette_filter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) if (night >= 0 && gClimateLightningFlash != 1) { - *r = lerp(*r, soft_light(*r, 8), night); - *g = lerp(*g, soft_light(*g, 8), night); - *b = lerp(*b, soft_light(*b, 128), night); + *r = Lerp(*r, SoftLight(*r, 8), night); + *g = Lerp(*g, SoftLight(*g, 8), night); + *b = Lerp(*b, SoftLight(*b, 128), night); // if (i == 32) // boost = 300000.0f; @@ -1008,7 +1007,7 @@ void lightfx_apply_palette_filter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) } } -static uint8_t mix_light(uint32_t a, uint32_t b, uint32_t intensity) +static uint8_t MixLight(uint32_t a, uint32_t b, uint32_t intensity) { intensity = intensity * 6; uint32_t bMul = (b * intensity) >> 8; @@ -1017,16 +1016,16 @@ static uint8_t mix_light(uint32_t a, uint32_t b, uint32_t intensity) return result; } -void lightfx_render_to_texture( +void LightFXRenderToTexture( void* dstPixels, uint32_t dstPitch, uint8_t* bits, uint32_t width, uint32_t height, const uint32_t* palette, const uint32_t* lightPalette) { - lightfx_update_viewport_settings(); - lightfx_swap_buffers(); - lightfx_prepare_light_list(); - lightfx_render_lights_to_frontbuffer(); + LightFXUpdateViewportSettings(); + LightFXSwapBuffers(); + LightFXPrepareLightList(); + LightFXRenderLightsToFrontBuffer(); - uint8_t* lightBits = static_cast(lightfx_get_front_buffer()); + uint8_t* lightBits = static_cast(LightFXGetFrontBuffer()); if (lightBits == nullptr) { return; @@ -1050,10 +1049,10 @@ void lightfx_render_to_texture( } else { - colour |= mix_light((darkColour >> 0) & 0xFF, (lightColour >> 0) & 0xFF, lightIntensity); - colour |= mix_light((darkColour >> 8) & 0xFF, (lightColour >> 8) & 0xFF, lightIntensity) << 8; - colour |= mix_light((darkColour >> 16) & 0xFF, (lightColour >> 16) & 0xFF, lightIntensity) << 16; - colour |= mix_light((darkColour >> 24) & 0xFF, (lightColour >> 24) & 0xFF, lightIntensity) << 24; + colour |= MixLight((darkColour >> 0) & 0xFF, (lightColour >> 0) & 0xFF, lightIntensity); + colour |= MixLight((darkColour >> 8) & 0xFF, (lightColour >> 8) & 0xFF, lightIntensity) << 8; + colour |= MixLight((darkColour >> 16) & 0xFF, (lightColour >> 16) & 0xFF, lightIntensity) << 16; + colour |= MixLight((darkColour >> 24) & 0xFF, (lightColour >> 24) & 0xFF, lightIntensity) << 24; } *dst++ = colour; } diff --git a/src/openrct2/drawing/LightFX.h b/src/openrct2/drawing/LightFX.h index e6dc3614be..e65b787f83 100644 --- a/src/openrct2/drawing/LightFX.h +++ b/src/openrct2/drawing/LightFX.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,7 +13,7 @@ struct CoordsXY; struct Vehicle; -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct GamePalette; struct CoordsXYZ; struct EntityBase; @@ -42,28 +42,28 @@ constexpr LightType SetLightTypeSize(LightType type, uint8_t size) return static_cast(((static_cast(type) & ~0x3) | size)); } -void lightfx_set_available(bool available); -bool lightfx_is_available(); -bool lightfx_for_vehicles_is_available(); +void LightFXSetAvailable(bool available); +bool LightFXIsAvailable(); +bool LightFXForVehiclesIsAvailable(); -void lightfx_init(); +void LightFXInit(); -void lightfx_update_buffers(rct_drawpixelinfo*); +void LightFXUpdateBuffers(DrawPixelInfo*); -void lightfx_prepare_light_list(); -void lightfx_swap_buffers(); -void lightfx_render_lights_to_frontbuffer(); -void lightfx_update_viewport_settings(); +void LightFXPrepareLightList(); +void LightFXSwapBuffers(); +void LightFXRenderLightsToFrontBuffer(); +void LightFXUpdateViewportSettings(); -void* lightfx_get_front_buffer(); -const GamePalette& lightfx_get_palette(); +void* LightFXGetFrontBuffer(); +const GamePalette& LightFXGetPalette(); -void LightfxAdd3DLight(const EntityBase& entity, const uint8_t id, const CoordsXYZ& loc, const LightType lightType); +void LightFXAdd3DLight(const EntityBase& entity, const uint8_t id, const CoordsXYZ& loc, const LightType lightType); -void lightfx_add_3d_light_magic_from_drawing_tile( +void LightFXAdd3DLightMagicFromDrawingTile( const CoordsXY& mapPosition, int16_t offsetX, int16_t offsetY, int16_t offsetZ, LightType lightType); -void LightfxAddLightsMagicVehicle(const Vehicle* vehicle); +void LightFXAddLightsMagicVehicle(const Vehicle* vehicle); void LightFxAddLightsMagicVehicle_ObservationTower(const Vehicle* vehicle); void LightFxAddLightsMagicVehicle_MineTrainCoaster(const Vehicle* vehicle); void LightFxAddLightsMagicVehicle_ChairLift(const Vehicle* vehicle); @@ -74,9 +74,9 @@ void LightFxAddLightsMagicVehicle_MiniatureRailway(const Vehicle* vehicle); void LightFxAddKioskLights(const CoordsXY& mapPosition, const int32_t height, const uint8_t zOffset); void LightFxAddShopLights(const CoordsXY& mapPosition, const uint8_t direction, const int32_t height, const uint8_t zOffset); -uint32_t lightfx_get_light_polution(); +uint32_t LightFXGetLightPolution(); -void lightfx_apply_palette_filter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b); -void lightfx_render_to_texture( +void LightFXApplyPaletteFilter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b); +void LightFXRenderToTexture( void* dstPixels, uint32_t dstPitch, uint8_t* bits, uint32_t width, uint32_t height, const uint32_t* palette, const uint32_t* lightPalette); diff --git a/src/openrct2/drawing/Line.cpp b/src/openrct2/drawing/Line.cpp index 9518d462b8..0a19d98dd6 100644 --- a/src/openrct2/drawing/Line.cpp +++ b/src/openrct2/drawing/Line.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,7 +16,7 @@ * Draws a horizontal line of specified colour to a buffer. * rct2: 0x0068474C */ -static void gfx_draw_line_on_buffer(rct_drawpixelinfo* dpi, char colour, const ScreenCoordsXY& coords, int32_t no_pixels) +static void GfxDrawLineOnBuffer(DrawPixelInfo* dpi, char colour, const ScreenCoordsXY& coords, int32_t no_pixels) { ScreenCoordsXY offset{ coords.x - dpi->x, coords.y - dpi->y }; @@ -72,7 +72,7 @@ static void gfx_draw_line_on_buffer(rct_drawpixelinfo* dpi, char colour, const S * colour (ebp) */ -void gfx_draw_line_software(rct_drawpixelinfo* dpi, const ScreenLine& line, int32_t colour) +void GfxDrawLineSoftware(DrawPixelInfo* dpi, const ScreenLine& line, int32_t colour) { int32_t x1 = line.GetX1(); int32_t x2 = line.GetX2(); @@ -140,14 +140,14 @@ void gfx_draw_line_software(rct_drawpixelinfo* dpi, const ScreenLine& line, int3 { // Vertical lines are drawn 1 pixel at a time if (steep) - gfx_draw_line_on_buffer(dpi, colour, { y, x }, 1); + GfxDrawLineOnBuffer(dpi, colour, { y, x }, 1); error -= delta_y; if (error < 0) { // Non vertical lines are drawn with as many pixels in a horizontal line as possible if (!steep) - gfx_draw_line_on_buffer(dpi, colour, { x_start, y }, no_pixels); + GfxDrawLineOnBuffer(dpi, colour, { x_start, y }, no_pixels); // Reset non vertical line vars x_start = x + 1; @@ -159,7 +159,7 @@ void gfx_draw_line_software(rct_drawpixelinfo* dpi, const ScreenLine& line, int3 // Catch the case of the last line if (x + 1 == x2 && !steep) { - gfx_draw_line_on_buffer(dpi, colour, { x_start, y }, no_pixels); + GfxDrawLineOnBuffer(dpi, colour, { x_start, y }, no_pixels); } } } diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index bddf3a1273..308f141b04 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -51,13 +51,13 @@ static IDrawingEngine* GetDrawingEngine() return result; } -bool drawing_engine_requires_new_window(DrawingEngine srcEngine, DrawingEngine dstEngine) +bool DrawingEngineRequiresNewWindow(DrawingEngine srcEngine, DrawingEngine dstEngine) { bool openGL = srcEngine == DrawingEngine::OpenGL || dstEngine == DrawingEngine::OpenGL; return Platform::RequireNewWindow(openGL); } -void drawing_engine_init() +void DrawingEngineInit() { auto context = GetContext(); if (context != nullptr) @@ -66,7 +66,7 @@ void drawing_engine_init() } } -void drawing_engine_resize() +void DrawingEngineResize() { auto context = GetContext(); if (context != nullptr) @@ -80,7 +80,7 @@ void drawing_engine_resize() } } -void drawing_engine_set_palette(const GamePalette& colours) +void DrawingEngineSetPalette(const GamePalette& colours) { auto context = GetContext(); if (context != nullptr) @@ -93,7 +93,7 @@ void drawing_engine_set_palette(const GamePalette& colours) } } -void drawing_engine_copy_rect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) +void DrawingEngineCopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) { auto context = GetContext(); if (context != nullptr) @@ -106,7 +106,7 @@ void drawing_engine_copy_rect(int32_t x, int32_t y, int32_t width, int32_t heigh } } -void drawing_engine_dispose() +void DrawingEngineDispose() { auto context = GetContext(); if (context != nullptr) @@ -115,14 +115,14 @@ void drawing_engine_dispose() } } -rct_drawpixelinfo* drawing_engine_get_dpi() +DrawPixelInfo* DrawingEngineGetDpi() { auto context = GetContext(); auto drawingEngine = context->GetDrawingEngine(); return drawingEngine->GetDrawingPixelInfo(); } -bool drawing_engine_has_dirty_optimisations() +bool DrawingEngineHasDirtyOptimisations() { bool result = false; auto drawingEngine = GetDrawingEngine(); @@ -133,7 +133,7 @@ bool drawing_engine_has_dirty_optimisations() return result; } -void drawing_engine_invalidate_image(uint32_t image) +void DrawingEngineInvalidateImage(uint32_t image) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -142,7 +142,7 @@ void drawing_engine_invalidate_image(uint32_t image) } } -void drawing_engine_set_vsync(bool vsync) +void DrawingEngineSetVSync(bool vsync) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -151,7 +151,7 @@ void drawing_engine_set_vsync(bool vsync) } } -void gfx_set_dirty_blocks(const ScreenRect& rect) +void GfxSetDirtyBlocks(const ScreenRect& rect) { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) @@ -160,7 +160,7 @@ void gfx_set_dirty_blocks(const ScreenRect& rect) } } -void gfx_clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) +void GfxClear(DrawPixelInfo* dpi, uint8_t paletteIndex) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -170,7 +170,7 @@ void gfx_clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) } } -void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour) +void GfxFillRect(DrawPixelInfo* dpi, const ScreenRect& rect, int32_t colour) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -180,7 +180,7 @@ void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colou } } -void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPaletteID palette) +void GfxFilterRect(DrawPixelInfo* dpi, const ScreenRect& rect, FilterPaletteID palette) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -190,7 +190,7 @@ void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPalet } } -void gfx_draw_line(rct_drawpixelinfo* dpi, const ScreenLine& line, int32_t colour) +void GfxDrawLine(DrawPixelInfo* dpi, const ScreenLine& line, int32_t colour) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -200,8 +200,8 @@ void gfx_draw_line(rct_drawpixelinfo* dpi, const ScreenLine& line, int32_t colou } } -void gfx_draw_dashed_line( - rct_drawpixelinfo* dpi, const ScreenLine& screenLine, const int32_t dashedLineSegmentLength, const int32_t color) +void GfxDrawDashedLine( + DrawPixelInfo* dpi, const ScreenLine& screenLine, const int32_t dashedLineSegmentLength, const int32_t color) { assert(dashedLineSegmentLength > 0); @@ -233,7 +233,7 @@ void gfx_draw_dashed_line( } } -void FASTCALL gfx_draw_sprite(rct_drawpixelinfo* dpi, const ImageId imageId, const ScreenCoordsXY& coords) +void FASTCALL GfxDrawSprite(DrawPixelInfo* dpi, const ImageId imageId, const ScreenCoordsXY& coords) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -243,8 +243,7 @@ void FASTCALL gfx_draw_sprite(rct_drawpixelinfo* dpi, const ImageId imageId, con } } -void FASTCALL - gfx_draw_glyph(rct_drawpixelinfo* dpi, const ImageId image, const ScreenCoordsXY& coords, const PaletteMap& paletteMap) +void FASTCALL GfxDrawGlyph(DrawPixelInfo* dpi, const ImageId image, const ScreenCoordsXY& coords, const PaletteMap& paletteMap) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -254,8 +253,8 @@ void FASTCALL } } -void FASTCALL gfx_draw_sprite_raw_masked( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const ImageId maskImage, const ImageId colourImage) +void FASTCALL + GfxDrawSpriteRawMasked(DrawPixelInfo* dpi, const ScreenCoordsXY& coords, const ImageId maskImage, const ImageId colourImage) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -265,7 +264,7 @@ void FASTCALL gfx_draw_sprite_raw_masked( } } -void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo* dpi, const ImageId image, const ScreenCoordsXY& coords, uint8_t colour) +void FASTCALL GfxDrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, const ScreenCoordsXY& coords, uint8_t colour) { auto drawingEngine = dpi->DrawingEngine; if (drawingEngine != nullptr) @@ -275,7 +274,7 @@ void FASTCALL gfx_draw_sprite_solid(rct_drawpixelinfo* dpi, const ImageId image, } } -std::string screenshot_dump() +std::string ScreenshotDump() { auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) diff --git a/src/openrct2/drawing/NewDrawing.h b/src/openrct2/drawing/NewDrawing.h index d706c7e2f2..19dd91bad6 100644 --- a/src/openrct2/drawing/NewDrawing.h +++ b/src/openrct2/drawing/NewDrawing.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,21 +11,21 @@ #include "../common.h" -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct GamePalette; enum class DrawingEngine : int32_t; extern StringId DrawingEngineStringIds[3]; DrawingEngine drawing_engine_get_type(); -bool drawing_engine_requires_new_window(DrawingEngine srcEngine, DrawingEngine dstEngine); -void drawing_engine_init(); -void drawing_engine_resize(); -void drawing_engine_set_palette(const GamePalette& colours); -void drawing_engine_copy_rect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy); -void drawing_engine_dispose(); +bool DrawingEngineRequiresNewWindow(DrawingEngine srcEngine, DrawingEngine dstEngine); +void DrawingEngineInit(); +void DrawingEngineResize(); +void DrawingEngineSetPalette(const GamePalette& colours); +void DrawingEngineCopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy); +void DrawingEngineDispose(); -rct_drawpixelinfo* drawing_engine_get_dpi(); -bool drawing_engine_has_dirty_optimisations(); -void drawing_engine_invalidate_image(uint32_t image); -void drawing_engine_set_vsync(bool vsync); +DrawPixelInfo* DrawingEngineGetDpi(); +bool DrawingEngineHasDirtyOptimisations(); +void DrawingEngineInvalidateImage(uint32_t image); +void DrawingEngineSetVSync(bool vsync); diff --git a/src/openrct2/drawing/Rect.cpp b/src/openrct2/drawing/Rect.cpp index 76cee9138e..7423a10f5e 100644 --- a/src/openrct2/drawing/Rect.cpp +++ b/src/openrct2/drawing/Rect.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ * colour (ebp) * flags (si) */ -void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour, uint8_t flags) +void GfxFillRectInset(DrawPixelInfo* dpi, const ScreenRect& rect, int32_t colour, uint8_t flags) { const auto leftTop = ScreenCoordsXY{ rect.GetLeft(), rect.GetTop() }; const auto leftBottom = ScreenCoordsXY{ rect.GetLeft(), rect.GetBottom() }; @@ -32,7 +32,7 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t const auto rightBottom = ScreenCoordsXY{ rect.GetRight(), rect.GetBottom() }; if (colour & (COLOUR_FLAG_TRANSLUCENT | COLOUR_FLAG_8)) { - translucent_window_palette palette; + TranslucentWindowPalette palette; if (colour & COLOUR_FLAG_8) { // TODO: This can't be added up @@ -45,32 +45,32 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t if (flags & INSET_RECT_FLAG_BORDER_NONE) { - gfx_filter_rect(dpi, rect, palette.base); + GfxFilterRect(dpi, rect, palette.base); } else if (flags & INSET_RECT_FLAG_BORDER_INSET) { // Draw outline of box - gfx_filter_rect(dpi, { leftTop, leftBottom }, palette.highlight); - gfx_filter_rect(dpi, { leftTop, rightTop }, palette.highlight); - gfx_filter_rect(dpi, { rightTop, rightBottom }, palette.shadow); - gfx_filter_rect(dpi, { leftBottom, rightBottom }, palette.shadow); + GfxFilterRect(dpi, { leftTop, leftBottom }, palette.highlight); + GfxFilterRect(dpi, { leftTop, rightTop }, palette.highlight); + GfxFilterRect(dpi, { rightTop, rightBottom }, palette.shadow); + GfxFilterRect(dpi, { leftBottom, rightBottom }, palette.shadow); if (!(flags & INSET_RECT_FLAG_FILL_NONE)) { - gfx_filter_rect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, palette.base); + GfxFilterRect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, palette.base); } } else { // Draw outline of box - gfx_filter_rect(dpi, { leftTop, leftBottom }, palette.shadow); - gfx_filter_rect(dpi, { leftTop, rightTop }, palette.shadow); - gfx_filter_rect(dpi, { rightTop, rightBottom }, palette.highlight); - gfx_filter_rect(dpi, { leftBottom, rightBottom }, palette.highlight); + GfxFilterRect(dpi, { leftTop, leftBottom }, palette.shadow); + GfxFilterRect(dpi, { leftTop, rightTop }, palette.shadow); + GfxFilterRect(dpi, { rightTop, rightBottom }, palette.highlight); + GfxFilterRect(dpi, { leftBottom, rightBottom }, palette.highlight); if (!(flags & INSET_RECT_FLAG_FILL_NONE)) { - gfx_filter_rect( + GfxFilterRect( dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, { rightBottom - ScreenCoordsXY{ 1, 1 } } }, palette.base); } } @@ -93,15 +93,15 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t if (flags & INSET_RECT_FLAG_BORDER_NONE) { - gfx_fill_rect(dpi, rect, fill); + GfxFillRect(dpi, rect, fill); } else if (flags & INSET_RECT_FLAG_BORDER_INSET) { // Draw outline of box - gfx_fill_rect(dpi, { leftTop, leftBottom }, shadow); - gfx_fill_rect(dpi, { leftTop + ScreenCoordsXY{ 1, 0 }, rightTop }, shadow); - gfx_fill_rect(dpi, { rightTop + ScreenCoordsXY{ 0, 1 }, rightBottom - ScreenCoordsXY{ 0, 1 } }, hilight); - gfx_fill_rect(dpi, { leftBottom + ScreenCoordsXY{ 1, 0 }, rightBottom }, hilight); + GfxFillRect(dpi, { leftTop, leftBottom }, shadow); + GfxFillRect(dpi, { leftTop + ScreenCoordsXY{ 1, 0 }, rightTop }, shadow); + GfxFillRect(dpi, { rightTop + ScreenCoordsXY{ 0, 1 }, rightBottom - ScreenCoordsXY{ 0, 1 } }, hilight); + GfxFillRect(dpi, { leftBottom + ScreenCoordsXY{ 1, 0 }, rightBottom }, hilight); if (!(flags & INSET_RECT_FLAG_FILL_NONE)) { @@ -116,16 +116,16 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t fill = ColourMapA[colour].lighter; } } - gfx_fill_rect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, fill); + GfxFillRect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, fill); } } else { // Draw outline of box - gfx_fill_rect(dpi, { leftTop, leftBottom - ScreenCoordsXY{ 0, 1 } }, hilight); - gfx_fill_rect(dpi, { leftTop + ScreenCoordsXY{ 1, 0 }, rightTop - ScreenCoordsXY{ 1, 0 } }, hilight); - gfx_fill_rect(dpi, { rightTop, rightBottom - ScreenCoordsXY{ 0, 1 } }, shadow); - gfx_fill_rect(dpi, { leftBottom, rightBottom }, shadow); + GfxFillRect(dpi, { leftTop, leftBottom - ScreenCoordsXY{ 0, 1 } }, hilight); + GfxFillRect(dpi, { leftTop + ScreenCoordsXY{ 1, 0 }, rightTop - ScreenCoordsXY{ 1, 0 } }, hilight); + GfxFillRect(dpi, { rightTop, rightBottom - ScreenCoordsXY{ 0, 1 } }, shadow); + GfxFillRect(dpi, { leftBottom, rightBottom }, shadow); if (!(flags & INSET_RECT_FLAG_FILL_NONE)) { @@ -133,7 +133,7 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t { fill = ColourMapA[COLOUR_BLACK].light; } - gfx_fill_rect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, fill); + GfxFillRect(dpi, { leftTop + ScreenCoordsXY{ 1, 1 }, rightBottom - ScreenCoordsXY{ 1, 1 } }, fill); } } } diff --git a/src/openrct2/drawing/SSE41Drawing.cpp b/src/openrct2/drawing/SSE41Drawing.cpp index 98bcb23ad9..8e24a80e2b 100644 --- a/src/openrct2/drawing/SSE41Drawing.cpp +++ b/src/openrct2/drawing/SSE41Drawing.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ # include -void mask_sse4_1( +void MaskSse4_1( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { @@ -52,7 +52,7 @@ void mask_sse4_1( } else { - mask_scalar(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); + MaskScalar(width, height, maskSrc, colourSrc, dst, maskWrap, colourWrap, dstWrap); } } @@ -62,7 +62,7 @@ void mask_sse4_1( # error You have to compile this file with SSE4.1 enabled, when targeting x86! # endif -void mask_sse4_1( +void MaskSse4_1( int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc, uint8_t* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap) { diff --git a/src/openrct2/drawing/ScrollingText.cpp b/src/openrct2/drawing/ScrollingText.cpp index 66fd82c1ff..e8d53944b9 100644 --- a/src/openrct2/drawing/ScrollingText.cpp +++ b/src/openrct2/drawing/ScrollingText.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ using namespace OpenRCT2; -struct rct_draw_scroll_text +struct DrawScrollText { StringId string_id; uint8_t string_args[32]; @@ -37,20 +37,20 @@ struct rct_draw_scroll_text uint8_t bitmap[64 * 40]; }; -static rct_draw_scroll_text _drawScrollTextList[OpenRCT2::MaxScrollingTextEntries]; +static DrawScrollText _drawScrollTextList[OpenRCT2::MaxScrollingTextEntries]; static uint8_t _characterBitmaps[FONT_SPRITE_GLYPH_COUNT + SPR_G2_GLYPH_COUNT][8]; static uint32_t _drawSCrollNextIndex = 0; static std::mutex _scrollingTextMutex; -static void scrolling_text_set_bitmap_for_sprite( +static void ScrollingTextSetBitmapForSprite( std::string_view text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets, colour_t colour); -static void scrolling_text_set_bitmap_for_ttf( +static void ScrollingTextSetBitmapForTTF( std::string_view text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets, colour_t colour); static void ScrollingTextInitialiseCharacterBitmaps(uint32_t glyphStart, uint16_t offset, uint16_t count, bool isAntiAliased) { uint8_t drawingSurface[64]; - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.bits = reinterpret_cast(&drawingSurface); dpi.width = 8; dpi.height = 8; @@ -58,7 +58,7 @@ static void ScrollingTextInitialiseCharacterBitmaps(uint32_t glyphStart, uint16_ for (int32_t i = 0; i < count; i++) { std::fill_n(drawingSurface, sizeof(drawingSurface), 0x00); - gfx_draw_sprite_software(&dpi, ImageId(glyphStart + (EnumValue(FontStyle::Tiny) * count) + i), { -1, 0 }); + GfxDrawSpriteSoftware(&dpi, ImageId(glyphStart + (EnumValue(FontStyle::Tiny) * count) + i), { -1, 0 }); for (int32_t x = 0; x < 8; x++) { @@ -84,7 +84,7 @@ static void ScrollingTextInitialiseScrollingText() const int32_t imageId = SPR_SCROLLING_TEXT_START + i; // Initialize the scrolling text sprite. - rct_g1_element g1{}; + G1Element g1{}; g1.offset = _drawScrollTextList[i].bitmap; g1.x_offset = -32; g1.y_offset = 0; @@ -98,20 +98,20 @@ static void ScrollingTextInitialiseScrollingText() g1.offset[16] = 0; g1.offset[17] = 0; - gfx_set_g1_element(imageId, &g1); + GfxSetG1Element(imageId, &g1); } } -void scrolling_text_initialise_bitmaps() +void ScrollingTextInitialiseBitmaps() { ScrollingTextInitialiseCharacterBitmaps(SPR_CHAR_START, 0, FONT_SPRITE_GLYPH_COUNT, gTinyFontAntiAliased); ScrollingTextInitialiseCharacterBitmaps(SPR_G2_CHAR_BEGIN, FONT_SPRITE_GLYPH_COUNT, SPR_G2_GLYPH_COUNT, false); ScrollingTextInitialiseScrollingText(); } -static uint8_t* font_sprite_get_codepoint_bitmap(int32_t codepoint) +static uint8_t* FontSpriteGetCodepointBitmap(int32_t codepoint) { - auto offset = font_sprite_get_codepoint_offset(codepoint); + auto offset = FontSpriteGetCodepointOffset(codepoint); if (offset >= FONT_SPRITE_GLYPH_COUNT) { return _characterBitmaps[offset - (SPR_G2_CHAR_BEGIN - SPR_CHAR_START) + FONT_SPRITE_GLYPH_COUNT]; @@ -120,14 +120,14 @@ static uint8_t* font_sprite_get_codepoint_bitmap(int32_t codepoint) return _characterBitmaps[offset]; } -static int32_t scrolling_text_get_matching_or_oldest( +static int32_t ScrollingTextGetMatchingOrOldest( StringId stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode, colour_t colour) { uint32_t oldestId = 0xFFFFFFFF; int32_t scrollIndex = -1; for (size_t i = 0; i < std::size(_drawScrollTextList); i++) { - rct_draw_scroll_text* scrollText = &_drawScrollTextList[i]; + DrawScrollText* scrollText = &_drawScrollTextList[i]; if (oldestId >= scrollText->id) { oldestId = scrollText->id; @@ -146,15 +146,15 @@ static int32_t scrolling_text_get_matching_or_oldest( return scrollIndex; } -static void scrolling_text_format(utf8* dst, size_t size, rct_draw_scroll_text* scrollText) +static void ScrollingTextFormat(utf8* dst, size_t size, DrawScrollText* scrollText) { if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper(dst, size, scrollText->string_id, scrollText->string_args); + FormatStringToUpper(dst, size, scrollText->string_id, scrollText->string_args); } else { - format_string(dst, size, scrollText->string_id, scrollText->string_args); + FormatStringLegacy(dst, size, scrollText->string_id, scrollText->string_args); } } @@ -1424,7 +1424,7 @@ static constexpr const int16_t* _scrollPositions[MAX_SCROLLING_TEXT_MODES] = { }; // clang-format on -void scrolling_text_invalidate() +void ScrollingTextInvalidate() { for (auto& scrollText : _drawScrollTextList) { @@ -1433,21 +1433,21 @@ void scrolling_text_invalidate() } } -ImageId scrolling_text_setup( +ImageId ScrollingTextSetup( PaintSession& session, StringId stringId, Formatter& ft, uint16_t scroll, uint16_t scrollingMode, colour_t colour) { std::scoped_lock lock(_scrollingTextMutex); assert(scrollingMode < MAX_SCROLLING_TEXT_MODES); - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if (dpi->zoom_level > ZoomLevel{ 0 }) return ImageId(SPR_SCROLLING_TEXT_DEFAULT); _drawSCrollNextIndex++; ft.Rewind(); - int32_t scrollIndex = scrolling_text_get_matching_or_oldest(stringId, ft, scroll, scrollingMode, colour); + int32_t scrollIndex = ScrollingTextGetMatchingOrOldest(stringId, ft, scroll, scrollingMode, colour); if (scrollIndex >= SPR_SCROLLING_TEXT_START) return ImageId(scrollIndex); @@ -1462,26 +1462,26 @@ ImageId scrolling_text_setup( // Create the string to draw utf8 scrollString[256]; - scrolling_text_format(scrollString, 256, scrollText); + ScrollingTextFormat(scrollString, 256, scrollText); const int16_t* scrollingModePositions = _scrollPositions[scrollingMode]; std::fill_n(scrollText->bitmap, 320 * 8, 0x00); if (LocalisationService_UseTrueTypeFont()) { - scrolling_text_set_bitmap_for_ttf(scrollString, scroll, scrollText->bitmap, scrollingModePositions, colour); + ScrollingTextSetBitmapForTTF(scrollString, scroll, scrollText->bitmap, scrollingModePositions, colour); } else { - scrolling_text_set_bitmap_for_sprite(scrollString, scroll, scrollText->bitmap, scrollingModePositions, colour); + ScrollingTextSetBitmapForSprite(scrollString, scroll, scrollText->bitmap, scrollingModePositions, colour); } uint32_t imageId = SPR_SCROLLING_TEXT_START + scrollIndex; - drawing_engine_invalidate_image(imageId); + DrawingEngineInvalidateImage(imageId); return ImageId(imageId); } -static void scrolling_text_set_bitmap_for_sprite( +static void ScrollingTextSetBitmapForSprite( std::string_view text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets, colour_t colour) { auto characterColour = colour; @@ -1497,8 +1497,8 @@ static void scrolling_text_set_bitmap_for_sprite( CodepointView codepoints(token.text); for (auto codepoint : codepoints) { - auto characterWidth = font_sprite_get_codepoint_width(FontStyle::Tiny, codepoint); - auto characterBitmap = font_sprite_get_codepoint_bitmap(codepoint); + auto characterWidth = FontSpriteGetCodepointWidth(FontStyle::Tiny, codepoint); + auto characterBitmap = FontSpriteGetCodepointBitmap(codepoint); for (; characterWidth != 0; characterWidth--, characterBitmap++) { // Skip any non-displayed columns @@ -1530,7 +1530,7 @@ static void scrolling_text_set_bitmap_for_sprite( } else if (FormatTokenIsColour(token.kind)) { - auto g1 = gfx_get_g1_element(SPR_TEXT_PALETTE); + auto g1 = GfxGetG1Element(SPR_TEXT_PALETTE); if (g1 != nullptr) { auto colourIndex = FormatTokenGetTextColourIndex(token.kind); @@ -1541,14 +1541,14 @@ static void scrolling_text_set_bitmap_for_sprite( } } -static void scrolling_text_set_bitmap_for_ttf( +static void ScrollingTextSetBitmapForTTF( std::string_view text, int32_t scroll, uint8_t* bitmap, const int16_t* scrollPositionOffsets, colour_t colour) { #ifndef NO_TTF - auto fontDesc = ttf_get_font_from_sprite_base(FontStyle::Tiny); + auto fontDesc = TTFGetFontFromSpriteBase(FontStyle::Tiny); if (fontDesc->font == nullptr) { - scrolling_text_set_bitmap_for_sprite(text, scroll, bitmap, scrollPositionOffsets, colour); + ScrollingTextSetBitmapForSprite(text, scroll, bitmap, scrollPositionOffsets, colour); return; } @@ -1564,7 +1564,7 @@ static void scrolling_text_set_bitmap_for_ttf( } else if (FormatTokenIsColour(token.kind)) { - auto g1 = gfx_get_g1_element(SPR_TEXT_PALETTE); + auto g1 = GfxGetG1Element(SPR_TEXT_PALETTE); if (g1 != nullptr) { auto colourIndex = FormatTokenGetTextColourIndex(token.kind); @@ -1573,7 +1573,7 @@ static void scrolling_text_set_bitmap_for_ttf( } } - auto surface = ttf_surface_cache_get_or_add(fontDesc->font, ttfBuffer.c_str()); + auto surface = TTFSurfaceCacheGetOrAdd(fontDesc->font, ttfBuffer.c_str()); if (surface == nullptr) { return; @@ -1619,7 +1619,7 @@ static void scrolling_text_set_bitmap_for_ttf( else if (use_hinting && src_pixel > fontDesc->hinting_threshold) { // Simulate font hinting by shading the background colour instead. - *dst = blendColours(colour, *dst); + *dst = BlendColours(colour, *dst); } // Jump to next row diff --git a/src/openrct2/drawing/TTF.cpp b/src/openrct2/drawing/TTF.cpp index 5b5403afdf..b551f6a3b8 100644 --- a/src/openrct2/drawing/TTF.cpp +++ b/src/openrct2/drawing/TTF.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -59,14 +59,14 @@ static int32_t _ttfGetWidthCacheMissCount = 0; static std::mutex _mutex; -static TTF_Font* ttf_open_font(const utf8* fontPath, int32_t ptSize); -static void ttf_close_font(TTF_Font* font); -static void ttf_surface_cache_dispose(ttf_cache_entry* entry); -static void ttf_surface_cache_dispose_all(); -static void ttf_getwidth_cache_dispose_all(); -static bool ttf_get_size(TTF_Font* font, std::string_view text, int32_t* outWidth, int32_t* outHeight); -static void ttf_toggle_hinting(bool); -static TTFSurface* ttf_render(TTF_Font* font, std::string_view text); +static TTF_Font* TTFOpenFont(const utf8* fontPath, int32_t ptSize); +static void TTFCloseFont(TTF_Font* font); +static void TTFSurfaceCacheDispose(ttf_cache_entry* entry); +static void TTFSurfaceCacheDisposeAll(); +static void TTFGetWidthCacheDisposeAll(); +static bool TTFGetSize(TTF_Font* font, std::string_view text, int32_t* outWidth, int32_t* outHeight); +static void TTFToggleHinting(bool); +static TTFSurface* TTFRender(TTF_Font* font, std::string_view text); template class FontLockHelper { @@ -88,7 +88,7 @@ public: } }; -static void ttf_toggle_hinting(bool) +static void TTFToggleHinting(bool) { if (!LocalisationService_UseTrueTypeFont()) { @@ -104,11 +104,11 @@ static void ttf_toggle_hinting(bool) if (_ttfSurfaceCacheCount) { - ttf_surface_cache_dispose_all(); + TTFSurfaceCacheDisposeAll(); } } -bool ttf_initialise() +bool TTFInitialise() { FontLockHelper lock(_mutex); @@ -117,7 +117,7 @@ bool ttf_initialise() if (TTF_Init() != 0) { - log_error("Couldn't initialise FreeType engine"); + LOG_ERROR("Couldn't initialise FreeType engine"); return false; } @@ -128,41 +128,41 @@ bool ttf_initialise() auto fontPath = Platform::GetFontPath(*fontDesc); if (fontPath.empty()) { - log_verbose("Unable to load font '%s'", fontDesc->font_name); + LOG_VERBOSE("Unable to load font '%s'", fontDesc->font_name); return false; } - fontDesc->font = ttf_open_font(fontPath.c_str(), fontDesc->ptSize); + fontDesc->font = TTFOpenFont(fontPath.c_str(), fontDesc->ptSize); if (fontDesc->font == nullptr) { - log_verbose("Unable to load '%s'", fontPath.c_str()); + LOG_VERBOSE("Unable to load '%s'", fontPath.c_str()); return false; } } - ttf_toggle_hinting(true); + TTFToggleHinting(true); _ttfInitialised = true; return true; } -void ttf_dispose() +void TTFDispose() { FontLockHelper lock(_mutex); if (!_ttfInitialised) return; - ttf_surface_cache_dispose_all(); - ttf_getwidth_cache_dispose_all(); + TTFSurfaceCacheDisposeAll(); + TTFGetWidthCacheDisposeAll(); for (int32_t i = 0; i < FontStyleCount; i++) { TTFFontDescriptor* fontDesc = &(gCurrentTTFFontSet->size[i]); if (fontDesc->font != nullptr) { - ttf_close_font(fontDesc->font); + TTFCloseFont(fontDesc->font); fontDesc->font = nullptr; } } @@ -172,17 +172,17 @@ void ttf_dispose() _ttfInitialised = false; } -static TTF_Font* ttf_open_font(const utf8* fontPath, int32_t ptSize) +static TTF_Font* TTFOpenFont(const utf8* fontPath, int32_t ptSize) { return TTF_OpenFont(fontPath, ptSize); } -static void ttf_close_font(TTF_Font* font) +static void TTFCloseFont(TTF_Font* font) { TTF_CloseFont(font); } -static uint32_t ttf_surface_cache_hash(TTF_Font* font, std::string_view text) +static uint32_t TTFSurfaceCacheHash(TTF_Font* font, std::string_view text) { uint32_t hash = static_cast(((reinterpret_cast(font) * 23) ^ 0xAAAAAAAA) & 0xFFFFFFFF); for (auto c : text) @@ -192,11 +192,11 @@ static uint32_t ttf_surface_cache_hash(TTF_Font* font, std::string_view text) return hash; } -static void ttf_surface_cache_dispose(ttf_cache_entry* entry) +static void TTFSurfaceCacheDispose(ttf_cache_entry* entry) { if (entry->surface != nullptr) { - ttf_free_surface(entry->surface); + TTFFreeSurface(entry->surface); free(entry->text); entry->surface = nullptr; @@ -205,26 +205,26 @@ static void ttf_surface_cache_dispose(ttf_cache_entry* entry) } } -static void ttf_surface_cache_dispose_all() +static void TTFSurfaceCacheDisposeAll() { for (int32_t i = 0; i < TTF_SURFACE_CACHE_SIZE; i++) { - ttf_surface_cache_dispose(&_ttfSurfaceCache[i]); + TTFSurfaceCacheDispose(&_ttfSurfaceCache[i]); _ttfSurfaceCacheCount--; } } -void ttf_toggle_hinting() +void TTFToggleHinting() { FontLockHelper lock(_mutex); - ttf_toggle_hinting(true); + TTFToggleHinting(true); } -TTFSurface* ttf_surface_cache_get_or_add(TTF_Font* font, std::string_view text) +TTFSurface* TTFSurfaceCacheGetOrAdd(TTF_Font* font, std::string_view text) { ttf_cache_entry* entry; - uint32_t hash = ttf_surface_cache_hash(font, text); + uint32_t hash = TTFSurfaceCacheHash(font, text); int32_t index = hash % TTF_SURFACE_CACHE_SIZE; FontLockHelper lock(_mutex); @@ -256,9 +256,9 @@ TTFSurface* ttf_surface_cache_get_or_add(TTF_Font* font, std::string_view text) // Cache miss, replace entry with new surface entry = &_ttfSurfaceCache[index]; - ttf_surface_cache_dispose(entry); + TTFSurfaceCacheDispose(entry); - TTFSurface* surface = ttf_render(font, text); + TTFSurface* surface = TTFRender(font, text); if (surface == nullptr) { return nullptr; @@ -275,7 +275,7 @@ TTFSurface* ttf_surface_cache_get_or_add(TTF_Font* font, std::string_view text) return entry->surface; } -static void ttf_getwidth_cache_dispose(ttf_getwidth_cache_entry* entry) +static void TTFGetWidthCacheDispose(ttf_getwidth_cache_entry* entry) { if (entry->text != nullptr) { @@ -287,20 +287,20 @@ static void ttf_getwidth_cache_dispose(ttf_getwidth_cache_entry* entry) } } -static void ttf_getwidth_cache_dispose_all() +static void TTFGetWidthCacheDisposeAll() { for (int32_t i = 0; i < TTF_GETWIDTH_CACHE_SIZE; i++) { - ttf_getwidth_cache_dispose(&_ttfGetWidthCache[i]); + TTFGetWidthCacheDispose(&_ttfGetWidthCache[i]); _ttfGetWidthCacheCount--; } } -uint32_t ttf_getwidth_cache_get_or_add(TTF_Font* font, std::string_view text) +uint32_t TTFGetWidthCacheGetOrAdd(TTF_Font* font, std::string_view text) { ttf_getwidth_cache_entry* entry; - uint32_t hash = ttf_surface_cache_hash(font, text); + uint32_t hash = TTFSurfaceCacheHash(font, text); int32_t index = hash % TTF_GETWIDTH_CACHE_SIZE; FontLockHelper lock(_mutex); @@ -332,10 +332,10 @@ uint32_t ttf_getwidth_cache_get_or_add(TTF_Font* font, std::string_view text) // Cache miss, replace entry with new width entry = &_ttfGetWidthCache[index]; - ttf_getwidth_cache_dispose(entry); + TTFGetWidthCacheDispose(entry); int32_t width, height; - ttf_get_size(font, text, &width, &height); + TTFGetSize(font, text, &width, &height); _ttfGetWidthCacheMissCount++; @@ -347,25 +347,25 @@ uint32_t ttf_getwidth_cache_get_or_add(TTF_Font* font, std::string_view text) return entry->width; } -TTFFontDescriptor* ttf_get_font_from_sprite_base(FontStyle fontStyle) +TTFFontDescriptor* TTFGetFontFromSpriteBase(FontStyle fontStyle) { FontLockHelper lock(_mutex); return &gCurrentTTFFontSet->size[EnumValue(fontStyle)]; } -bool ttf_provides_glyph(const TTF_Font* font, codepoint_t codepoint) +bool TTFProvidesGlyph(const TTF_Font* font, codepoint_t codepoint) { return TTF_GlyphIsProvided(font, codepoint); } -static bool ttf_get_size(TTF_Font* font, std::string_view text, int32_t* outWidth, int32_t* outHeight) +static bool TTFGetSize(TTF_Font* font, std::string_view text, int32_t* outWidth, int32_t* outHeight) { thread_local std::string buffer; buffer.assign(text); return TTF_SizeUTF8(font, buffer.c_str(), outWidth, outHeight); } -static TTFSurface* ttf_render(TTF_Font* font, std::string_view text) +static TTFSurface* TTFRender(TTF_Font* font, std::string_view text) { thread_local std::string buffer; buffer.assign(text); @@ -377,7 +377,7 @@ static TTFSurface* ttf_render(TTF_Font* font, std::string_view text) return TTF_RenderUTF8_Solid(font, buffer.c_str(), 0x000000FF); } -void ttf_free_surface(TTFSurface* surface) +void TTFFreeSurface(TTFSurface* surface) { free(const_cast(surface->pixels)); free(surface); @@ -387,12 +387,12 @@ void ttf_free_surface(TTFSurface* surface) # include "TTF.h" -bool ttf_initialise() +bool TTFInitialise() { return false; } -void ttf_dispose() +void TTFDispose() { } diff --git a/src/openrct2/drawing/TTF.h b/src/openrct2/drawing/TTF.h index cc59baac54..9cdf83fc94 100644 --- a/src/openrct2/drawing/TTF.h +++ b/src/openrct2/drawing/TTF.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,8 +13,8 @@ #include -bool ttf_initialise(); -void ttf_dispose(); +bool TTFInitialise(); +void TTFDispose(); #ifndef NO_TTF @@ -26,12 +26,12 @@ struct TTFSurface int32_t pitch; }; -TTFFontDescriptor* ttf_get_font_from_sprite_base(FontStyle fontStyle); -void ttf_toggle_hinting(); -TTFSurface* ttf_surface_cache_get_or_add(TTF_Font* font, std::string_view text); -uint32_t ttf_getwidth_cache_get_or_add(TTF_Font* font, std::string_view text); -bool ttf_provides_glyph(const TTF_Font* font, codepoint_t codepoint); -void ttf_free_surface(TTFSurface* surface); +TTFFontDescriptor* TTFGetFontFromSpriteBase(FontStyle fontStyle); +void TTFToggleHinting(); +TTFSurface* TTFSurfaceCacheGetOrAdd(TTF_Font* font, std::string_view text); +uint32_t TTFGetWidthCacheGetOrAdd(TTF_Font* font, std::string_view text); +bool TTFProvidesGlyph(const TTF_Font* font, codepoint_t codepoint); +void TTFFreeSurface(TTFSurface* surface); // TTF_SDLPORT int TTF_Init(void); diff --git a/src/openrct2/drawing/TTFSDLPort.cpp b/src/openrct2/drawing/TTFSDLPort.cpp index f75557ea8c..e27207919f 100644 --- a/src/openrct2/drawing/TTFSDLPort.cpp +++ b/src/openrct2/drawing/TTFSDLPort.cpp @@ -159,7 +159,7 @@ struct InternalTTFFont static FT_Library library; static int TTF_initialized = 0; -# define TTF_SetError log_error +# define TTF_SetError LOG_ERROR # define TTF_CHECKPOINTER(p, errval) \ if (!TTF_initialized) \ @@ -1325,7 +1325,7 @@ TTFSurface* TTF_RenderUTF8_Solid(TTF_Font* font, const char* text, [[maybe_unuse if (error) { TTF_SetFTError("Couldn't find glyph", error); - ttf_free_surface(textbuf); + TTFFreeSurface(textbuf); return NULL; } glyph = font->current; @@ -1458,7 +1458,7 @@ TTFSurface* TTF_RenderUTF8_Shaded(TTF_Font* font, const char* text, [[maybe_unus if (error) { TTF_SetFTError("Couldn't find glyph", error); - ttf_free_surface(textbuf); + TTFFreeSurface(textbuf); return NULL; } diff --git a/src/openrct2/drawing/Text.cpp b/src/openrct2/drawing/Text.cpp index 13f58850a4..aaf97f0822 100644 --- a/src/openrct2/drawing/Text.cpp +++ b/src/openrct2/drawing/Text.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,36 +10,29 @@ #include "Text.h" #include "../localisation/Formatter.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "Drawing.h" -static void DrawText( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const TextPaint& paint, const_utf8string text, - bool noFormatting = false); -static void DrawText( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const TextPaint& paint, StringId format, const void* args); - class StaticLayout { private: - utf8string Buffer; + u8string Buffer; TextPaint Paint; int32_t LineCount = 0; int32_t LineHeight; int32_t MaxWidth; public: - StaticLayout(utf8string source, const TextPaint& paint, int32_t width) + StaticLayout(u8string_view source, const TextPaint& paint, int32_t width) + : Paint(paint) { - Buffer = source; - Paint = paint; - - MaxWidth = gfx_wrap_string(Buffer, width, paint.FontStyle, &LineCount); + MaxWidth = GfxWrapString(source, width, paint.FontStyle, &Buffer, &LineCount); LineCount += 1; - LineHeight = font_get_line_height(paint.FontStyle); + LineHeight = FontGetLineHeight(paint.FontStyle); } - void Draw(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords) + void Draw(DrawPixelInfo& dpi, const ScreenCoordsXY& coords) { TextPaint tempPaint = Paint; @@ -55,12 +48,12 @@ public: lineCoords.x += MaxWidth; break; } - utf8* buffer = Buffer; + const utf8* buffer = Buffer.data(); for (int32_t line = 0; line < LineCount; ++line) { DrawText(dpi, lineCoords, tempPaint, buffer); tempPaint.Colour = TEXT_COLOUR_254; - buffer = get_string_end(buffer) + 1; + buffer = GetStringEnd(buffer) + 1; lineCoords.y += LineHeight; } } @@ -81,11 +74,11 @@ public: } }; -static void DrawText( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const TextPaint& paint, const_utf8string text, bool noFormatting) +void DrawText( + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, const TextPaint& paint, const_utf8string text, bool noFormatting) { - int32_t width = noFormatting ? gfx_get_string_width_no_formatting(text, paint.FontStyle) - : gfx_get_string_width(text, paint.FontStyle); + int32_t width = noFormatting ? GfxGetStringWidthNoFormatting(text, paint.FontStyle) + : GfxGetStringWidth(text, paint.FontStyle); auto alignedCoords = coords; switch (paint.Alignment) @@ -100,44 +93,37 @@ static void DrawText( break; } - ttf_draw_string(dpi, text, paint.Colour, alignedCoords, noFormatting, paint.FontStyle, paint.Darkness); + TTFDrawString(dpi, text, paint.Colour, alignedCoords, noFormatting, paint.FontStyle, paint.Darkness); if (paint.UnderlineText == TextUnderline::On) { - gfx_fill_rect( - dpi, { { alignedCoords + ScreenCoordsXY{ 0, 11 } }, { alignedCoords + ScreenCoordsXY{ width, 11 } } }, + GfxFillRect( + &dpi, { { alignedCoords + ScreenCoordsXY{ 0, 11 } }, { alignedCoords + ScreenCoordsXY{ width, 11 } } }, gTextPalette[1]); if (gTextPalette[2] != 0) { - gfx_fill_rect( - dpi, { { alignedCoords + ScreenCoordsXY{ 1, 12 } }, { alignedCoords + ScreenCoordsXY{ width + 1, 12 } } }, + GfxFillRect( + &dpi, { { alignedCoords + ScreenCoordsXY{ 1, 12 } }, { alignedCoords + ScreenCoordsXY{ width + 1, 12 } } }, gTextPalette[2]); } } } -static void DrawText( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const TextPaint& paint, StringId format, const void* args) -{ - utf8 buffer[512]; - format_string(buffer, sizeof(buffer), format, args); - DrawText(dpi, coords, paint, buffer); -} - -void DrawTextBasic(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, StringId format) +void DrawTextBasic(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, StringId format) { Formatter ft{}; TextPaint textPaint{}; DrawTextBasic(dpi, coords, format, ft, textPaint); } -void DrawTextBasic( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, StringId format, const Formatter& ft, TextPaint textPaint) +void DrawTextBasic(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, StringId format, const Formatter& ft, TextPaint textPaint) { - DrawText(dpi, coords, textPaint, format, ft.Data()); + utf8 buffer[512]; + OpenRCT2::FormatStringLegacy(buffer, sizeof(buffer), format, ft.Data()); + DrawText(dpi, coords, textPaint, buffer); } -void DrawTextEllipsised(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format) +void DrawTextEllipsised(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format) { Formatter ft{}; TextPaint textPaint{}; @@ -145,28 +131,21 @@ void DrawTextEllipsised(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, in } void DrawTextEllipsised( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, - TextPaint textPaint) + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, TextPaint textPaint) { utf8 buffer[512]; - format_string(buffer, sizeof(buffer), format, ft.Data()); - gfx_clip_string(buffer, width, textPaint.FontStyle); + OpenRCT2::FormatStringLegacy(buffer, sizeof(buffer), format, ft.Data()); + GfxClipString(buffer, width, textPaint.FontStyle); DrawText(dpi, coords, textPaint, buffer); } -void gfx_draw_string(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint) +void GfxDrawString(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint) { DrawText(dpi, coords, textPaint, buffer); } -void gfx_draw_string_no_formatting( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, const_utf8string buffer, TextPaint textPaint) -{ - DrawText(dpi, coords, textPaint, buffer, true); -} - -int32_t DrawTextWrapped(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format) +int32_t DrawTextWrapped(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format) { Formatter ft{}; TextPaint textPaint{}; @@ -174,14 +153,11 @@ int32_t DrawTextWrapped(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, in } int32_t DrawTextWrapped( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, - TextPaint textPaint) + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, TextPaint textPaint) { const void* args = ft.Data(); - // TODO: Refactor StaticLayout to take a std::string_view instead. It shouldn't have to write to the buffer. - const std::string buffer = format_string(format, args); - StaticLayout layout(const_cast(buffer.c_str()), textPaint, width); + StaticLayout layout(FormatStringID(format, args), textPaint, width); if (textPaint.Alignment == TextAlignment::CENTRE) { diff --git a/src/openrct2/drawing/Text.h b/src/openrct2/drawing/Text.h index 2430a76823..68fb0b0ddb 100644 --- a/src/openrct2/drawing/Text.h +++ b/src/openrct2/drawing/Text.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,7 +14,7 @@ #include "Font.h" struct ScreenCoordsXY; -struct rct_drawpixelinfo; +struct DrawPixelInfo; class Formatter; enum class TextAlignment @@ -142,15 +142,17 @@ struct TextPaint } }; -void DrawTextBasic(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, StringId format); -void DrawTextEllipsised(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format); -int32_t DrawTextWrapped(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format); +void DrawTextBasic(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, StringId format); +void DrawTextEllipsised(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format); +int32_t DrawTextWrapped(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format); +void DrawText( + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, const TextPaint& paint, const_utf8string text, bool noFormatting = false); void DrawTextBasic( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, StringId format, const Formatter& ft, TextPaint textPaint = {}); + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, StringId format, const Formatter& ft, TextPaint textPaint = {}); void DrawTextEllipsised( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, TextPaint textPaint = {}); int32_t DrawTextWrapped( - rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, + DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t width, StringId format, const Formatter& ft, TextPaint textPaint = {}); diff --git a/src/openrct2/drawing/Weather.cpp b/src/openrct2/drawing/Weather.cpp index 89a48d51c0..3a5c30fd47 100644 --- a/src/openrct2/drawing/Weather.cpp +++ b/src/openrct2/drawing/Weather.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,13 +23,13 @@ using namespace OpenRCT2; using namespace OpenRCT2::Drawing; static void DrawLightRain( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); static void DrawHeavyRain( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); static void DrawLightSnow( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); static void DrawHeavySnow( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); /** * @@ -51,13 +51,13 @@ const DrawWeatherFunc DrawSnowFunctions[] = { * * rct2: 0x00684218 */ -void DrawWeather(rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer) +void DrawWeather(DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer) { if (gConfigGeneral.RenderWeatherEffects) { uint32_t viewFlags = 0; - const auto* viewport = window_get_viewport(window_get_main()); + const auto* viewport = WindowGetViewport(WindowGetMain()); if (viewport != nullptr) viewFlags = viewport->flags; @@ -81,7 +81,7 @@ void DrawWeather(rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer) * rct2: 0x00684114 */ static void DrawLightRain( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { int32_t x_start = -static_cast(gCurrentTicks) + 8; int32_t y_start = (gCurrentTicks * 3) + 7; @@ -103,7 +103,7 @@ static void DrawLightRain( * rct2: 0x0068416D */ static void DrawHeavyRain( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { int32_t x_start = -static_cast(gCurrentTicks); int32_t y_start = gCurrentTicks * 5; @@ -135,7 +135,7 @@ static void DrawHeavyRain( } static void DrawLightSnow( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { const uint32_t t = gCurrentTicks / 2; const int32_t negT = -static_cast(t); @@ -157,7 +157,7 @@ static void DrawLightSnow( } static void DrawHeavySnow( - rct_drawpixelinfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) + DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { int32_t x_start = -static_cast(gCurrentTicks * 3) + 1; int32_t y_start = gCurrentTicks + 23; diff --git a/src/openrct2/drawing/Weather.h b/src/openrct2/drawing/Weather.h index 2e163fcb78..20d1acb032 100644 --- a/src/openrct2/drawing/Weather.h +++ b/src/openrct2/drawing/Weather.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,7 +11,7 @@ #include "../common.h" -struct rct_drawpixelinfo; +struct DrawPixelInfo; namespace OpenRCT2::Drawing { @@ -37,4 +37,4 @@ static constexpr const uint8_t SnowPattern[] = // clang-format on -void DrawWeather(rct_drawpixelinfo* dpi, OpenRCT2::Drawing::IWeatherDrawer* weatherDrawer); +void DrawWeather(DrawPixelInfo* dpi, OpenRCT2::Drawing::IWeatherDrawer* weatherDrawer); diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index c1fa3d18b2..9271ea4b43 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -44,7 +44,7 @@ X8WeatherDrawer::~X8WeatherDrawer() } void X8WeatherDrawer::Draw( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, + DrawPixelInfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, const uint8_t* weatherpattern) { const uint8_t* pattern = weatherpattern; @@ -92,7 +92,7 @@ void X8WeatherDrawer::Draw( } } -void X8WeatherDrawer::Restore(rct_drawpixelinfo* dpi) +void X8WeatherDrawer::Restore(DrawPixelInfo* dpi) { if (_weatherPixelsCount > 0) { @@ -122,7 +122,7 @@ X8DrawingEngine::X8DrawingEngine([[maybe_unused]] const std::shared_ptrbits = _bits; dpi->x = 0; dpi->y = 0; @@ -338,9 +338,9 @@ void X8DrawingEngine::ConfigureBits(uint32_t width, uint32_t height, uint32_t pi ConfigureDirtyGrid(); - if (lightfx_is_available()) + if (LightFXIsAvailable()) { - lightfx_update_buffers(dpi); + LightFXUpdateBuffers(dpi); } } @@ -437,7 +437,7 @@ void X8DrawingEngine::DrawDirtyBlocks(uint32_t x, uint32_t y, uint32_t columns, // Draw region OnDrawDirtyBlock(x, y, columns, rows); - window_draw_all(&_bitsDPI, left, top, right, bottom); + WindowDrawAll(&_bitsDPI, left, top, right, bottom); } #ifdef __WARN_SUGGEST_FINAL_METHODS__ @@ -449,7 +449,7 @@ X8DrawingContext::X8DrawingContext(X8DrawingEngine* engine) _engine = engine; } -void X8DrawingContext::Clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) +void X8DrawingContext::Clear(DrawPixelInfo* dpi, uint8_t paletteIndex) { int32_t w = dpi->zoom_level.ApplyInversedTo(dpi->width); int32_t h = dpi->zoom_level.ApplyInversedTo(dpi->height); @@ -510,8 +510,7 @@ static constexpr const uint16_t* Patterns[] = { }; // clang-format on -void X8DrawingContext::FillRect( - rct_drawpixelinfo* dpi, uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) +void X8DrawingContext::FillRect(DrawPixelInfo* dpi, uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) { if (left > right) return; @@ -631,7 +630,7 @@ void X8DrawingContext::FillRect( } void X8DrawingContext::FilterRect( - rct_drawpixelinfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) + DrawPixelInfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) { if (left > right) return; @@ -703,34 +702,33 @@ void X8DrawingContext::FilterRect( } } -void X8DrawingContext::DrawLine(rct_drawpixelinfo* dpi, uint32_t colour, const ScreenLine& line) +void X8DrawingContext::DrawLine(DrawPixelInfo* dpi, uint32_t colour, const ScreenLine& line) { - gfx_draw_line_software(dpi, line, colour); + GfxDrawLineSoftware(dpi, line, colour); } -void X8DrawingContext::DrawSprite(rct_drawpixelinfo* dpi, const ImageId imageId, int32_t x, int32_t y) +void X8DrawingContext::DrawSprite(DrawPixelInfo* dpi, const ImageId imageId, int32_t x, int32_t y) { - gfx_draw_sprite_software(dpi, imageId, { x, y }); + GfxDrawSpriteSoftware(dpi, imageId, { x, y }); } void X8DrawingContext::DrawSpriteRawMasked( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) + DrawPixelInfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) { - gfx_draw_sprite_raw_masked_software(dpi, { x, y }, maskImage, colourImage); + GfxDrawSpriteRawMaskedSoftware(dpi, { x, y }, maskImage, colourImage); } -void X8DrawingContext::DrawSpriteSolid(rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) +void X8DrawingContext::DrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) { uint8_t palette[256]; std::fill_n(palette, sizeof(palette), colour); palette[0] = 0; const auto spriteCoords = ScreenCoordsXY{ x, y }; - gfx_draw_sprite_palette_set_software(dpi, ImageId(image.GetIndex(), 0), spriteCoords, PaletteMap(palette)); + GfxDrawSpritePaletteSetSoftware(dpi, ImageId(image.GetIndex(), 0), spriteCoords, PaletteMap(palette)); } -void X8DrawingContext::DrawGlyph( - rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& paletteMap) +void X8DrawingContext::DrawGlyph(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& paletteMap) { - gfx_draw_sprite_palette_set_software(dpi, image, { x, y }, paletteMap); + GfxDrawSpritePaletteSetSoftware(dpi, image, { x, y }, paletteMap); } diff --git a/src/openrct2/drawing/X8DrawingEngine.h b/src/openrct2/drawing/X8DrawingEngine.h index af4e5237d3..7db0a27e34 100644 --- a/src/openrct2/drawing/X8DrawingEngine.h +++ b/src/openrct2/drawing/X8DrawingEngine.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -56,9 +56,9 @@ namespace OpenRCT2 X8WeatherDrawer(); ~X8WeatherDrawer(); void Draw( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, + DrawPixelInfo* dpi, int32_t x, int32_t y, int32_t width, int32_t height, int32_t xStart, int32_t yStart, const uint8_t* weatherpattern) override; - void Restore(rct_drawpixelinfo* dpi); + void Restore(DrawPixelInfo* dpi); }; #ifdef __WARN_SUGGEST_FINAL_TYPES__ @@ -76,7 +76,7 @@ namespace OpenRCT2 DirtyGrid _dirtyGrid = {}; - rct_drawpixelinfo _bitsDPI = {}; + DrawPixelInfo _bitsDPI = {}; bool _lastLightFXenabled = false; @@ -108,11 +108,11 @@ namespace OpenRCT2 void CopyRect(int32_t x, int32_t y, int32_t width, int32_t height, int32_t dx, int32_t dy) override; std::string Screenshot() override; IDrawingContext* GetDrawingContext() override; - rct_drawpixelinfo* GetDrawingPixelInfo() override; + DrawPixelInfo* GetDrawingPixelInfo() override; DRAWING_ENGINE_FLAGS GetFlags() override; void InvalidateImage(uint32_t image) override; - rct_drawpixelinfo* GetDPI(); + DrawPixelInfo* GetDPI(); protected: void ConfigureBits(uint32_t width, uint32_t height, uint32_t pitch); @@ -136,20 +136,19 @@ namespace OpenRCT2 public: explicit X8DrawingContext(X8DrawingEngine* engine); - void Clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex) override; - void FillRect(rct_drawpixelinfo* dpi, uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override; + void Clear(DrawPixelInfo* dpi, uint8_t paletteIndex) override; + void FillRect(DrawPixelInfo* dpi, uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override; void FilterRect( - rct_drawpixelinfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, - int32_t bottom) override; - void DrawLine(rct_drawpixelinfo* dpi, uint32_t colour, const ScreenLine& line) override; - void DrawSprite(rct_drawpixelinfo* dpi, const ImageId imageId, int32_t x, int32_t y) override; + DrawPixelInfo* dpi, FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override; + void DrawLine(DrawPixelInfo* dpi, uint32_t colour, const ScreenLine& line) override; + void DrawSprite(DrawPixelInfo* dpi, const ImageId imageId, int32_t x, int32_t y) override; void DrawSpriteRawMasked( - rct_drawpixelinfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) override; - void DrawSpriteSolid(rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) override; + DrawPixelInfo* dpi, int32_t x, int32_t y, const ImageId maskImage, const ImageId colourImage) override; + void DrawSpriteSolid(DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) override; void DrawGlyph( - rct_drawpixelinfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& paletteMap) override; + DrawPixelInfo* dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& paletteMap) override; void DrawBitmap( - rct_drawpixelinfo* dpi, uint32_t image, const void* pixels, int32_t width, int32_t height, int32_t x, + DrawPixelInfo* dpi, uint32_t image, const void* pixels, int32_t width, int32_t height, int32_t x, int32_t y) override { } diff --git a/src/openrct2/entity/Balloon.cpp b/src/openrct2/entity/Balloon.cpp index 735726e74a..473d4a0893 100644 --- a/src/openrct2/entity/Balloon.cpp +++ b/src/openrct2/entity/Balloon.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -64,8 +64,8 @@ void Balloon::Press() { // There is a random chance that pressing the balloon will not pop it // and instead shift it slightly - uint32_t random = scenario_rand(); - if ((sprite_index.ToUnderlying() & 7) || (random & 0xFFFF) < 0x2000) + uint32_t random = ScenarioRand(); + if ((Id.ToUnderlying() & 7) || (random & 0xFFFF) < 0x2000) { Pop(); } diff --git a/src/openrct2/entity/Balloon.h b/src/openrct2/entity/Balloon.h index 444cb23328..5d9c193f7c 100644 --- a/src/openrct2/entity/Balloon.h +++ b/src/openrct2/entity/Balloon.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/Duck.cpp b/src/openrct2/entity/Duck.cpp index 9883949c39..ab2d06b21d 100644 --- a/src/openrct2/entity/Duck.cpp +++ b/src/openrct2/entity/Duck.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -150,10 +150,10 @@ void Duck::UpdateFlyToWater() void Duck::UpdateSwim() { - if (((gCurrentTicks + sprite_index.ToUnderlying()) & 3) != 0) + if (((gCurrentTicks + Id.ToUnderlying()) & 3) != 0) return; - uint32_t randomNumber = scenario_rand(); + uint32_t randomNumber = ScenarioRand(); if ((randomNumber & 0xFFFF) < 0x666) { if (randomNumber & 0x80000000) @@ -171,7 +171,7 @@ void Duck::UpdateSwim() } else { - int32_t currentMonth = date_get_month(gDateMonthsElapsed); + int32_t currentMonth = DateGetMonth(gDateMonthsElapsed); if (currentMonth >= MONTH_SEPTEMBER && (randomNumber >> 16) < 218) { state = DuckState::FlyAway; @@ -191,7 +191,7 @@ void Duck::UpdateSwim() else { z = waterZ; - randomNumber = scenario_rand(); + randomNumber = ScenarioRand(); if ((randomNumber & 0xFFFF) <= 0xAAA) { randomNumber >>= 16; @@ -290,7 +290,7 @@ void Duck::Create(const CoordsXY& pos) CoordsXY targetPos = pos; - int32_t offsetXY = scenario_rand() & 0x1E; + int32_t offsetXY = ScenarioRand() & 0x1E; targetPos.x += offsetXY; targetPos.y += offsetXY; @@ -299,20 +299,20 @@ void Duck::Create(const CoordsXY& pos) duck->sprite_height_positive = 9; duck->target_x = targetPos.x; duck->target_y = targetPos.y; - uint8_t direction = scenario_rand() & 3; + uint8_t direction = ScenarioRand() & 3; switch (direction) { case 0: - targetPos.x = GetMapSizeMaxXY().x - (scenario_rand() & 0x3F); + targetPos.x = GetMapSizeMaxXY().x - (ScenarioRand() & 0x3F); break; case 1: - targetPos.y = scenario_rand() & 0x3F; + targetPos.y = ScenarioRand() & 0x3F; break; case 2: - targetPos.x = scenario_rand() & 0x3F; + targetPos.x = ScenarioRand() & 0x3F; break; case 3: - targetPos.y = GetMapSizeMaxXY().y - (scenario_rand() & 0x3F); + targetPos.y = GetMapSizeMaxXY().y - (ScenarioRand() & 0x3F); break; } duck->sprite_direction = direction << 3; @@ -369,7 +369,7 @@ void Duck::Paint(PaintSession& session, int32_t imageDirection) const { PROFILED_FUNCTION(); - rct_drawpixelinfo& dpi = session.DPI; + DrawPixelInfo& dpi = session.DPI; if (dpi.zoom_level > ZoomLevel{ 1 }) return; diff --git a/src/openrct2/entity/Duck.h b/src/openrct2/entity/Duck.h index 36918a956c..f45820205c 100644 --- a/src/openrct2/entity/Duck.h +++ b/src/openrct2/entity/Duck.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/EntityBase.cpp b/src/openrct2/entity/EntityBase.cpp index 8a864b09fc..5148f3ecc3 100644 --- a/src/openrct2/entity/EntityBase.cpp +++ b/src/openrct2/entity/EntityBase.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -64,13 +64,13 @@ void EntityBase::Invalidate() break; } - viewports_invalidate(SpriteRect, maxZoom); + ViewportsInvalidate(SpriteRect, maxZoom); } void EntityBase::Serialise(DataSerialiser& stream) { stream << Type; - stream << sprite_index; + stream << Id; stream << x; stream << y; stream << z; diff --git a/src/openrct2/entity/EntityBase.h b/src/openrct2/entity/EntityBase.h index 391f72d997..cfd1d310f8 100644 --- a/src/openrct2/entity/EntityBase.h +++ b/src/openrct2/entity/EntityBase.h @@ -26,7 +26,7 @@ enum class EntityType : uint8_t struct EntityBase { EntityType Type; - EntityId sprite_index; + EntityId Id; int32_t x; int32_t y; int32_t z; diff --git a/src/openrct2/entity/EntityList.h b/src/openrct2/entity/EntityList.h index 221830f33e..91a053387f 100644 --- a/src/openrct2/entity/EntityList.h +++ b/src/openrct2/entity/EntityList.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/EntityRegistry.cpp b/src/openrct2/entity/EntityRegistry.cpp index 03456148a4..06694a8e55 100644 --- a/src/openrct2/entity/EntityRegistry.cpp +++ b/src/openrct2/entity/EntityRegistry.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,10 +38,10 @@ union Entity { - uint8_t pad_00[0x200]; + uint8_t Pad00[0x200]; EntityBase base; Entity() - : pad_00() + : Pad00() { } }; @@ -195,7 +195,7 @@ void ResetAllEntities() continue; } spr->Type = EntityType::Null; - spr->sprite_index = EntityId::FromUnderlying(i); + spr->Id = EntityId::FromUnderlying(i); _entityFlashingList[i] = false; } @@ -265,13 +265,13 @@ EntitiesChecksum GetAllEntitiesChecksum() static void EntityReset(EntityBase* entity) { // Need to retain how the sprite is linked in lists - auto entityIndex = entity->sprite_index; + auto entityIndex = entity->Id; _entityFlashingList[entityIndex.ToUnderlying()] = false; Entity* spr = reinterpret_cast(entity); *spr = Entity(); - entity->sprite_index = entityIndex; + entity->Id = entityIndex; entity->Type = EntityType::Null; } @@ -280,7 +280,7 @@ static void AddToEntityList(EntityBase* entity) { auto& list = gEntityLists[EnumValue(entity->Type)]; // Entity list must be in sprite_index order to prevent desync issues - list.insert(std::lower_bound(std::begin(list), std::end(list), entity->sprite_index), entity->sprite_index); + list.insert(std::lower_bound(std::begin(list), std::end(list), entity->Id), entity->Id); } static void AddToFreeList(EntityId index) @@ -292,7 +292,7 @@ static void AddToFreeList(EntityId index) static void RemoveFromEntityList(EntityBase* entity) { auto& list = gEntityLists[EnumValue(entity->Type)]; - auto ptr = binary_find(std::begin(list), std::end(list), entity->sprite_index); + auto ptr = BinaryFind(std::begin(list), std::end(list), entity->Id); if (ptr != std::end(list)) { list.erase(ptr); @@ -365,7 +365,7 @@ EntityBase* CreateEntity(EntityType type) EntityBase* CreateEntityAt(const EntityId index, const EntityType type) { - auto id = binary_find(std::rbegin(_freeIdList), std::rend(_freeIdList), index); + auto id = BinaryFind(std::rbegin(_freeIdList), std::rend(_freeIdList), index); if (id == std::rend(_freeIdList)) { return nullptr; @@ -414,22 +414,22 @@ static void EntitySpatialInsert(EntityBase* entity, const CoordsXY& newLoc) { size_t newIndex = GetSpatialIndexOffset(newLoc); auto& spatialVector = gEntitySpatialIndex[newIndex]; - auto index = std::lower_bound(std::begin(spatialVector), std::end(spatialVector), entity->sprite_index); - spatialVector.insert(index, entity->sprite_index); + auto index = std::lower_bound(std::begin(spatialVector), std::end(spatialVector), entity->Id); + spatialVector.insert(index, entity->Id); } static void EntitySpatialRemove(EntityBase* entity) { size_t currentIndex = GetSpatialIndexOffset({ entity->x, entity->y }); auto& spatialVector = gEntitySpatialIndex[currentIndex]; - auto index = binary_find(std::begin(spatialVector), std::end(spatialVector), entity->sprite_index); + auto index = BinaryFind(std::begin(spatialVector), std::end(spatialVector), entity->Id); if (index != std::end(spatialVector)) { spatialVector.erase(index, index + 1); } else { - log_warning("Bad sprite spatial index. Rebuilding the spatial index..."); + LOG_WARNING("Bad sprite spatial index. Rebuilding the spatial index..."); ResetEntitySpatialIndices(); } } @@ -476,7 +476,7 @@ void EntityBase::MoveTo(const CoordsXYZ& newLocation) void EntitySetCoordinates(const CoordsXYZ& entityPos, EntityBase* entity) { - auto screenCoords = Translate3DTo2DWithZ(get_current_rotation(), entityPos); + auto screenCoords = Translate3DTo2DWithZ(GetCurrentRotation(), entityPos); entity->SpriteRect = ScreenRect( screenCoords - ScreenCoordsXY{ entity->sprite_width, entity->sprite_height_negative }, @@ -499,8 +499,8 @@ static void FreeEntity(EntityBase& entity) else if (guest != nullptr) { guest->SetName({}); - OpenRCT2::RideUse::GetHistory().RemoveHandle(guest->sprite_index); - OpenRCT2::RideUse::GetTypeHistory().RemoveHandle(guest->sprite_index); + OpenRCT2::RideUse::GetHistory().RemoveHandle(guest->Id); + OpenRCT2::RideUse::GetTypeHistory().RemoveHandle(guest->Id); } } @@ -514,7 +514,7 @@ void EntityRemove(EntityBase* entity) EntityTweener::Get().RemoveEntity(entity); RemoveFromEntityList(entity); // remove from existing list - AddToFreeList(entity->sprite_index); + AddToFreeList(entity->Id); EntitySpatialRemove(entity); EntityReset(entity); @@ -550,12 +550,12 @@ uint16_t RemoveFloatingEntities() void EntitySetFlashing(EntityBase* entity, bool flashing) { - assert(entity->sprite_index.ToUnderlying() < MAX_ENTITIES); - _entityFlashingList[entity->sprite_index.ToUnderlying()] = flashing; + assert(entity->Id.ToUnderlying() < MAX_ENTITIES); + _entityFlashingList[entity->Id.ToUnderlying()] = flashing; } bool EntityGetFlashing(EntityBase* entity) { - assert(entity->sprite_index.ToUnderlying() < MAX_ENTITIES); - return _entityFlashingList[entity->sprite_index.ToUnderlying()]; + assert(entity->Id.ToUnderlying() < MAX_ENTITIES); + return _entityFlashingList[entity->Id.ToUnderlying()]; } diff --git a/src/openrct2/entity/EntityRegistry.h b/src/openrct2/entity/EntityRegistry.h index ac5b53bf7c..a0f9531b13 100644 --- a/src/openrct2/entity/EntityRegistry.h +++ b/src/openrct2/entity/EntityRegistry.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/EntityTweener.cpp b/src/openrct2/entity/EntityTweener.cpp index 714d71cd6b..64d7bec49b 100644 --- a/src/openrct2/entity/EntityTweener.cpp +++ b/src/openrct2/entity/EntityTweener.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/EntityTweener.h b/src/openrct2/entity/EntityTweener.h index b90065234b..1759370b37 100644 --- a/src/openrct2/entity/EntityTweener.h +++ b/src/openrct2/entity/EntityTweener.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/Fountain.cpp b/src/openrct2/entity/Fountain.cpp index 8b29329002..5de7404804 100644 --- a/src/openrct2/entity/Fountain.cpp +++ b/src/openrct2/entity/Fountain.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,7 @@ #include "../Game.h" #include "../core/DataSerialiser.h" +#include "../object/FootpathItemEntry.h" #include "../paint/Paint.h" #include "../profiling/Profiling.h" #include "../scenario/Scenario.h" @@ -103,7 +104,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co break; case PATTERN::BOUNCING_PAIRS: // random [0, 2 or 1, 3] - randomIndex = scenario_rand() & 1; + randomIndex = ScenarioRand() & 1; for (int32_t i = randomIndex; i < NumOrthogonalDirections; i += 2) { JumpingFountain::Create( @@ -113,7 +114,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co break; case PATTERN::RACING_PAIRS: // random [0 - 3 and 4 - 7] - randomIndex = scenario_rand() & 3; + randomIndex = ScenarioRand() & 3; JumpingFountain::Create( newType, { newLoc + _fountainDirectionsPositive[randomIndex], newZ }, _fountainDirections[randomIndex], _fountainDirectionFlags[randomIndex] | _fountainPatternFlags[pattern], 0); @@ -124,7 +125,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co break; default: // random [0 - 7] - randomIndex = scenario_rand() & 7; + randomIndex = ScenarioRand() & 7; JumpingFountain::Create( newType, { newLoc + _fountainDirectionsPositive[randomIndex], newZ }, _fountainDirections[randomIndex], _fountainDirectionFlags[randomIndex] | _fountainPatternFlags[pattern], 0); @@ -291,7 +292,7 @@ void JumpingFountain::GoToEdge(const CoordsXYZ& newLoc, const int32_t availableD return; } - const uint32_t randomIndex = scenario_rand(); + const uint32_t randomIndex = ScenarioRand(); if ((randomIndex & 0xFFFF) < _FountainChanceOfStoppingEdgeMode) { return; @@ -361,7 +362,7 @@ void JumpingFountain::Split(const CoordsXYZ& newLoc, int32_t availableDirections void JumpingFountain::Random(const CoordsXYZ& newLoc, int32_t availableDirections) const { - const uint32_t randomIndex = scenario_rand(); + const uint32_t randomIndex = ScenarioRand(); if ((randomIndex & 0xFFFF) >= _FountainChanceOfStoppingRandomMode) { int32_t direction = randomIndex & 7; @@ -404,7 +405,7 @@ void JumpingFountain::Paint(PaintSession& session, int32_t imageDirection) const constexpr uint32_t JumpingFountainSnowBaseImage = 23037; constexpr uint32_t JumpingFountainWaterBaseImage = 22973; - rct_drawpixelinfo& dpi = session.DPI; + DrawPixelInfo& dpi = session.DPI; if (dpi.zoom_level > ZoomLevel{ 0 }) { return; @@ -440,5 +441,5 @@ void JumpingFountain::Paint(PaintSession& session, int32_t imageDirection) const auto bb = isAntiClockwise ? antiClockWiseBoundingBoxes : clockWiseBoundingBoxes; PaintAddImageAsParentRotated( - session, imageDirection, imageId, { 0, 0, height }, { 32, 1, 3 }, { bb[imageDirection & 1], height }); + session, imageDirection, imageId, { 0, 0, height }, { { bb[imageDirection & 1], height }, { 32, 1, 3 } }); } diff --git a/src/openrct2/entity/Fountain.h b/src/openrct2/entity/Fountain.h index 1a516a05f4..90b0635f32 100644 --- a/src/openrct2/entity/Fountain.h +++ b/src/openrct2/entity/Fountain.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 652e49dc96..04a82658e8 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,12 +23,16 @@ #include "../entity/Particle.h" #include "../interface/Window_internal.h" #include "../localisation/Formatter.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../management/Marketing.h" #include "../management/NewsItem.h" #include "../network/network.h" +#include "../object/FootpathItemEntry.h" +#include "../object/LargeSceneryEntry.h" #include "../object/MusicObject.h" +#include "../object/WallSceneryEntry.h" #include "../peep/GuestPathfinding.h" #include "../peep/RideUseSystem.h" #include "../rct2/RCT2.h" @@ -45,7 +49,6 @@ #include "../windows/Intent.h" #include "../world/Climate.h" #include "../world/Footpath.h" -#include "../world/LargeScenery.h" #include "../world/Location.hpp" #include "../world/Map.h" #include "../world/Park.h" @@ -422,24 +425,24 @@ static constexpr const ride_rating NauseaMinimumThresholds[] = { 400, }; -static bool peep_has_voucher_for_free_ride(Guest* peep, Ride* ride); -static void peep_ride_is_too_intense(Guest* peep, Ride* ride, bool peepAtRide); -static void peep_reset_ride_heading(Guest* peep); -static void peep_tried_to_enter_full_queue(Guest* peep, Ride* ride); -static int16_t peep_calculate_ride_satisfaction(Guest* peep, Ride* ride); -static void peep_update_favourite_ride(Guest* peep, Ride* ride); -static int16_t peep_calculate_ride_value_satisfaction(Guest* peep, Ride* ride); -static int16_t peep_calculate_ride_intensity_nausea_satisfaction(Guest* peep, Ride* ride); -static void peep_update_ride_nausea_growth(Guest* peep, Ride* ride); -static bool peep_should_go_on_ride_again(Guest* peep, Ride* ride); -static bool peep_should_preferred_intensity_increase(Guest* peep); -static bool peep_really_liked_ride(Guest* peep, Ride* ride); -static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z); -static void peep_update_hunger(Guest* peep); -static void peep_decide_whether_to_leave_park(Guest* peep); -static void peep_leave_park(Guest* peep); +static bool PeepHasVoucherForFreeRide(Guest* peep, const Ride& ride); +static void PeepRideIsTooIntense(Guest* peep, Ride& ride, bool peepAtRide); +static void PeepResetRideHeading(Guest* peep); +static void PeepTriedToEnterFullQueue(Guest* peep, Ride& ride); +static int16_t PeepCalculateRideSatisfaction(Guest* peep, const Ride& ride); +static void PeepUpdateFavouriteRide(Guest* peep, const Ride& ride); +static int16_t PeepCalculateRideValueSatisfaction(Guest* peep, const Ride& ride); +static int16_t PeepCalculateRideIntensityNauseaSatisfaction(Guest* peep, const Ride& ride); +static void PeepUpdateRideNauseaGrowth(Guest* peep, const Ride& ride); +static bool PeepShouldGoOnRideAgain(Guest* peep, const Ride& ride); +static bool PeepShouldPreferredIntensityIncrease(Guest* peep); +static bool PeepReallyLikedRide(Guest* peep, const Ride& ride); +static PeepThoughtType PeepAssessSurroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z); +static void PeepUpdateHunger(Guest* peep); +static void PeepDecideWhetherToLeavePark(Guest* peep); +static void PeepLeavePark(Guest* peep); static void PeepHeadForNearestRideWithFlags(Guest* peep, bool considerOnlyCloseRides, int64_t rideTypeFlags); -bool loc_690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement); +bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement); template<> bool EntityBase::Is() const { @@ -562,7 +565,7 @@ void Guest::UpdateEasterEggInteractions() if (PeepFlags & PEEP_FLAGS_JOY) { - if ((scenario_rand() & 0xFFFF) <= 1456) + if ((ScenarioRand() & 0xFFFF) <= 1456) { if (IsActionInterruptable()) { @@ -581,7 +584,7 @@ int32_t Guest::GetEasterEggNameId() const Formatter ft; FormatNameTo(ft); - format_string(buffer, sizeof(buffer), STR_STRINGID, ft.Data()); + FormatStringLegacy(buffer, sizeof(buffer), STR_STRINGID, ft.Data()); for (uint32_t i = 0; i < std::size(gPeepEasterEggNames); i++) if (_stricmp(buffer, gPeepEasterEggNames[i]) == 0) @@ -728,12 +731,12 @@ int32_t Guest::CheckEasterEggName(int32_t index) const Formatter ft; FormatNameTo(ft); - format_string(buffer, sizeof(buffer), STR_STRINGID, ft.Data()); + FormatStringLegacy(buffer, sizeof(buffer), STR_STRINGID, ft.Data()); return _stricmp(buffer, gPeepEasterEggNames[index]) == 0; } -void Guest::loc_68F9F3() +void Guest::Loc68F9F3() { // Idle peep happiness tends towards 127 (50%). if (HappinessTarget >= 128) @@ -765,7 +768,7 @@ void Guest::loc_68F9F3() if (State == PeepState::Walking && NauseaTarget >= 128) { - if ((scenario_rand() & 0xFF) <= static_cast((Nausea - 128) / 2)) + if ((ScenarioRand() & 0xFF) <= static_cast((Nausea - 128) / 2)) { if (IsActionInterruptable()) { @@ -778,7 +781,7 @@ void Guest::loc_68F9F3() } } -void Guest::loc_68FA89() +void Guest::Loc68FA89() { // 68FA89 if (TimeToConsume == 0 && HasFoodOrDrink()) @@ -803,7 +806,7 @@ void Guest::loc_68FA89() if (TimeToConsume == 0) { - int32_t chosen_food = bitscanforward(GetFoodOrDrinkFlags()); + int32_t chosen_food = UtilBitScanForward(GetFoodOrDrinkFlags()); if (chosen_food != -1) { ShopItem food = ShopItem(chosen_food); @@ -901,7 +904,7 @@ void Guest::Tick128UpdateGuest(int32_t index) * is executed to once every four calls. */ if (PeepFlags & PEEP_FLAGS_CROWDED) { - PeepThoughtType thought_type = crowded_thoughts[scenario_rand() & 0xF]; + PeepThoughtType thought_type = crowded_thoughts[ScenarioRand() & 0xF]; if (thought_type != PeepThoughtType::None) { InsertNewThought(thought_type); @@ -959,7 +962,7 @@ void Guest::Tick128UpdateGuest(int32_t index) SurroundingsThoughtTimeout = 0; if (x != LOCATION_NULL) { - PeepThoughtType thought_type = peep_assess_surroundings(x & 0xFFE0, y & 0xFFE0, z); + PeepThoughtType thought_type = PeepAssessSurroundings(x & 0xFFE0, y & 0xFFE0, z); if (thought_type != PeepThoughtType::None) { @@ -987,7 +990,7 @@ void Guest::Tick128UpdateGuest(int32_t index) if (GuestTimeOnRide > 22) { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { PeepThoughtType thought_type = ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE) @@ -1013,16 +1016,16 @@ void Guest::Tick128UpdateGuest(int32_t index) if (GuestHeadingToRideId.IsNull()) { HappinessTarget = std::max(HappinessTarget - 128, 0); - peep_leave_park(this); - peep_update_hunger(this); - loc_68F9F3(); - loc_68FA89(); + PeepLeavePark(this); + PeepUpdateHunger(this); + Loc68F9F3(); + Loc68FA89(); return; } } } - if ((scenario_rand() & 0xFFFF) <= ((HasItem(ShopItem::Map)) ? 8192u : 2184u)) + if ((ScenarioRand() & 0xFFFF) <= ((HasItem(ShopItem::Map)) ? 8192u : 2184u)) { PickRideToGoOn(); } @@ -1081,7 +1084,7 @@ void Guest::Tick128UpdateGuest(int32_t index) if (num_thoughts != 0) { - PeepThoughtType chosen_thought = possible_thoughts[scenario_rand() % num_thoughts]; + PeepThoughtType chosen_thought = possible_thoughts[ScenarioRand() % num_thoughts]; InsertNewThought(chosen_thought); @@ -1128,8 +1131,8 @@ void Guest::Tick128UpdateGuest(int32_t index) case PeepState::Walking: case PeepState::LeavingPark: case PeepState::EnteringPark: - peep_decide_whether_to_leave_park(this); - peep_update_hunger(this); + PeepDecideWhetherToLeavePark(this); + PeepUpdateHunger(this); break; case PeepState::Sitting: @@ -1148,7 +1151,7 @@ void Guest::Tick128UpdateGuest(int32_t index) // In the original this branched differently // but it would mean setting the peep happiness from // a thought type entry which i think is incorrect. - peep_update_hunger(this); + PeepUpdateHunger(this); break; case PeepState::Queuing: @@ -1193,23 +1196,23 @@ void Guest::Tick128UpdateGuest(int32_t index) HappinessTarget = std::max(HappinessTarget - 4, 0); } } - peep_update_hunger(this); + PeepUpdateHunger(this); break; case PeepState::EnteringRide: if (SubState == 17 || SubState == 15) { - peep_decide_whether_to_leave_park(this); + PeepDecideWhetherToLeavePark(this); } - peep_update_hunger(this); + PeepUpdateHunger(this); break; default: break; } - loc_68F9F3(); + Loc68F9F3(); } - loc_68FA89(); + Loc68FA89(); } /** @@ -1297,7 +1300,7 @@ void Guest::UpdateSitting() if (HasFoodOrDrink()) { - if ((scenario_rand() & 0xFFFF) > 1310) + if ((ScenarioRand() & 0xFFFF) > 1310) { TryGetUpFromSitting(); return; @@ -1309,7 +1312,7 @@ void Guest::UpdateSitting() return; } - int32_t rand = scenario_rand(); + int32_t rand = ScenarioRand(); if ((rand & 0xFFFF) > 131) { TryGetUpFromSitting(); @@ -1380,7 +1383,7 @@ void Guest::CheckIfLost() { if (!(PeepFlags & PEEP_FLAGS_LOST)) { - if (ride_get_count() < 2) + if (RideGetCount() < 2) return; PeepFlags ^= PEEP_FLAGS_21; @@ -1419,14 +1422,14 @@ void Guest::CheckCantFindRide() return; GuestHeadingToRideId = RideId::GetNull(); - rct_window* w = window_find_by_number(WindowClass::Peep, sprite_index); + WindowBase* w = WindowFindByNumber(WindowClass::Peep, Id); if (w != nullptr) { - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); } - window_invalidate_by_number(WindowClass::Peep, sprite_index); + WindowInvalidateByNumber(WindowClass::Peep, Id); } /** @@ -1463,9 +1466,9 @@ void Guest::CheckCantFindExit() * * rct2: 0x0069AF1E */ -bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) +bool Guest::DecideAndBuyItem(Ride& ride, ShopItem shopItem, money64 price) { - money32 itemValue; + money64 itemValue; bool hasVoucher = false; @@ -1484,7 +1487,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) if (GetShopItemDescriptor(shopItem).IsFoodOrDrink()) { - int32_t food = bitscanforward(GetFoodOrDrinkFlags()); + int32_t food = UtilBitScanForward(GetFoodOrDrinkFlags()); if (food != -1) { InsertNewThought(PeepThoughtType::HaventFinished, static_cast(food)); @@ -1521,7 +1524,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) if (!isRainingAndUmbrella && (shopItem != ShopItem::Map) && GetShopItemDescriptor(shopItem).IsSouvenir() && !hasVoucher) { - if (((scenario_rand() & 0x7F) + 0x73) > Happiness || GuestNumRides < 3) + if (((ScenarioRand() & 0x7F) + 0x73) > Happiness || GuestNumRides < 3) return false; } @@ -1561,10 +1564,10 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) if (Happiness >= 180) itemValue /= 2; } - if (itemValue > (static_cast(scenario_rand() & 0x07))) + if (itemValue > (static_cast(ScenarioRand() & 0x07))) { // "I'm not paying that much for x" - InsertNewThought(GetShopItemDescriptor(shopItem).TooMuchThought, ride->id); + InsertNewThought(GetShopItemDescriptor(shopItem).TooMuchThought, ride.id); return false; } } @@ -1572,14 +1575,14 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) else { itemValue -= price; - itemValue = std::max(8, itemValue); + itemValue = std::max(0.80_GBP, itemValue); if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { - if (itemValue >= static_cast(scenario_rand() & 0x07)) + if (itemValue >= static_cast(ScenarioRand() & 0x07)) { // "This x is a really good value" - InsertNewThought(GetShopItemDescriptor(shopItem).GoodValueThought, ride->id); + InsertNewThought(GetShopItemDescriptor(shopItem).GoodValueThought, ride.id); } } @@ -1607,25 +1610,25 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) satisfaction++; } } - ride->UpdateSatisfaction(satisfaction); + ride.UpdateSatisfaction(satisfaction); } // The peep has now decided to buy the item (or, specifically, has not been // dissuaded so far). GiveItem(shopItem); - const auto hasRandomShopColour = ride->HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); + const auto hasRandomShopColour = ride.HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); if (shopItem == ShopItem::TShirt) - TshirtColour = hasRandomShopColour ? scenario_rand_max(COLOUR_COUNT - 1) : ride->track_colour[0].main; + TshirtColour = hasRandomShopColour ? ScenarioRandMax(COLOUR_COUNT - 1) : ride.track_colour[0].main; if (shopItem == ShopItem::Hat) - HatColour = hasRandomShopColour ? scenario_rand_max(COLOUR_COUNT - 1) : ride->track_colour[0].main; + HatColour = hasRandomShopColour ? ScenarioRandMax(COLOUR_COUNT - 1) : ride.track_colour[0].main; if (shopItem == ShopItem::Balloon) - BalloonColour = hasRandomShopColour ? scenario_rand_max(COLOUR_COUNT - 1) : ride->track_colour[0].main; + BalloonColour = hasRandomShopColour ? ScenarioRandMax(COLOUR_COUNT - 1) : ride.track_colour[0].main; if (shopItem == ShopItem::Umbrella) - UmbrellaColour = hasRandomShopColour ? scenario_rand_max(COLOUR_COUNT - 1) : ride->track_colour[0].main; + UmbrellaColour = hasRandomShopColour ? ScenarioRandMax(COLOUR_COUNT - 1) : ride.track_colour[0].main; if (shopItem == ShopItem::Map) ResetPathfindGoal(); @@ -1634,16 +1637,16 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) TimeToConsume = std::min((TimeToConsume + consumptionTime), 255); if (shopItem == ShopItem::Photo) - Photo1RideRef = ride->id; + Photo1RideRef = ride.id; if (shopItem == ShopItem::Photo2) - Photo2RideRef = ride->id; + Photo2RideRef = ride.id; if (shopItem == ShopItem::Photo3) - Photo3RideRef = ride->id; + Photo3RideRef = ride.id; if (shopItem == ShopItem::Photo4) - Photo4RideRef = ride->id; + Photo4RideRef = ride.id; WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; UpdateSpriteType(); @@ -1654,7 +1657,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) ft.Add(GetShopItemDescriptor(shopItem).Naming.Indefinite); if (gConfigNotifications.GuestBoughtItem) { - News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, sprite_index, ft); + News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, Id, ft); } } @@ -1667,7 +1670,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) if (GetShopItemDescriptor(shopItem).IsSouvenir()) AmountOfSouvenirs++; - money16* expend_type = &PaidOnSouvenirs; + money64* expend_type = &PaidOnSouvenirs; ExpenditureType expenditure = ExpenditureType::ShopStock; if (GetShopItemDescriptor(shopItem).IsFood()) @@ -1683,7 +1686,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) } if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) - finance_payment(GetShopItemDescriptor(shopItem).Cost, expenditure); + FinancePayment(GetShopItemDescriptor(shopItem).Cost, expenditure); // Sets the expenditure type to *_FOODDRINK_SALES or *_SHOP_SALES appropriately. expenditure = static_cast(static_cast(expenditure) - 1); @@ -1696,11 +1699,11 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) { SpendMoney(*expend_type, price, expenditure); } - ride->total_profit += (price - GetShopItemDescriptor(shopItem).Cost); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->cur_num_customers++; - ride->total_customers++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + ride.total_profit += (price - GetShopItemDescriptor(shopItem).Cost); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.cur_num_customers++; + ride.total_customers++; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; return true; } @@ -1710,13 +1713,10 @@ bool Guest::DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price) * ride's satisfaction value. * rct2: 0x0069545B */ -void Guest::OnEnterRide(Ride* ride) +void Guest::OnEnterRide(Ride& ride) { - if (ride == nullptr) - return; - // Calculate how satisfying the ride is for the peep. Can range from -140 to +105. - int16_t satisfaction = peep_calculate_ride_satisfaction(this, ride); + int16_t satisfaction = PeepCalculateRideSatisfaction(this, ride); // Update the satisfaction stat of the ride. uint8_t rideSatisfaction = 0; @@ -1727,28 +1727,28 @@ void Guest::OnEnterRide(Ride* ride) else if (satisfaction >= 0) rideSatisfaction = 1; - ride->UpdateSatisfaction(rideSatisfaction); + ride.UpdateSatisfaction(rideSatisfaction); // Update various peep stats. if (GuestNumRides < 255) GuestNumRides++; SetHasRidden(ride); - peep_update_favourite_ride(this, ride); + PeepUpdateFavouriteRide(this, ride); HappinessTarget = std::clamp(HappinessTarget + satisfaction, 0, PEEP_MAX_HAPPINESS); - peep_update_ride_nausea_growth(this, ride); + PeepUpdateRideNauseaGrowth(this, ride); } /** * * rct2: 0x0069576E */ -void Guest::OnExitRide(Ride* ride) +void Guest::OnExitRide(Ride& ride) { if (PeepFlags & PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE) { PeepFlags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE; - FavouriteRide = ride->id; + FavouriteRide = ride.id; // TODO fix this flag name or add another one WindowInvalidateFlags |= PEEP_INVALIDATE_STAFF_STATS; } @@ -1759,15 +1759,15 @@ void Guest::OnExitRide(Ride* ride) if (PeepFlags & PEEP_FLAGS_LEAVING_PARK) PeepFlags &= ~(PEEP_FLAGS_PARK_ENTRANCE_CHOSEN); - if (ride != nullptr && peep_should_go_on_ride_again(this, ride)) + if (PeepShouldGoOnRideAgain(this, ride)) { - GuestHeadingToRideId = ride->id; + GuestHeadingToRideId = ride.id; GuestIsLostCountdown = 200; ResetPathfindGoal(); WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_ACTION; } - if (peep_should_preferred_intensity_increase(this)) + if (PeepShouldPreferredIntensityIncrease(this)) { if (Intensity.GetMaximum() < 15) { @@ -1775,27 +1775,24 @@ void Guest::OnExitRide(Ride* ride) } } - if (ride != nullptr && peep_really_liked_ride(this, ride)) + if (PeepReallyLikedRide(this, ride)) { - InsertNewThought(PeepThoughtType::WasGreat, ride->id); + InsertNewThought(PeepThoughtType::WasGreat, ride.id); static constexpr OpenRCT2::Audio::SoundId laughs[3] = { OpenRCT2::Audio::SoundId::Laugh1, OpenRCT2::Audio::SoundId::Laugh2, OpenRCT2::Audio::SoundId::Laugh3, }; - int32_t laughType = scenario_rand() & 7; + int32_t laughType = ScenarioRand() & 7; if (laughType < 3) { OpenRCT2::Audio::Play3D(laughs[laughType], GetLocation()); } } - if (ride != nullptr) - { - ride->total_customers++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; - } + ride.total_customers++; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; } /** @@ -1844,7 +1841,7 @@ Ride* Guest::FindBestRideToGoOn() { if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_QUEUE_FULL)) { - if (ShouldGoOnRide(&ride, StationIndex::FromUnderlying(0), false, true) && ride_has_ratings(&ride)) + if (ShouldGoOnRide(ride, StationIndex::FromUnderlying(0), false, true) && RideHasRatings(ride)) { if (mostExcitingRide == nullptr || ride.excitement > mostExcitingRide->excitement) { @@ -1857,9 +1854,9 @@ Ride* Guest::FindBestRideToGoOn() return mostExcitingRide; } -BitSet Guest::FindRidesToGoOn() +OpenRCT2::BitSet Guest::FindRidesToGoOn() { - 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 @@ -1869,7 +1866,7 @@ BitSet Guest::FindRidesToGoOn() // Consider rides that peep hasn't been on yet for (auto& ride : GetRideManager()) { - if (!HasRidden(&ride)) + if (!HasRidden(ride)) { rideConsideration[ride.id.ToUnderlying()] = true; } @@ -1879,8 +1876,8 @@ BitSet Guest::FindRidesToGoOn() { // Take nearby rides into consideration constexpr auto radius = 10 * 32; - int32_t cx = floor2(x, 32); - int32_t cy = floor2(y, 32); + int32_t cx = Floor2(x, 32); + int32_t cy = Floor2(y, 32); for (int32_t tileX = cx - radius; tileX <= cx + radius; tileX += COORDS_XY_STEP) { for (int32_t tileY = cy - radius; tileY <= cy + radius; tileY += COORDS_XY_STEP) @@ -1919,17 +1916,17 @@ BitSet Guest::FindRidesToGoOn() * ride/shop, or they may just be thinking about it. * rct2: 0x006960AB */ -bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, bool thinking) +bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, bool thinking) { // Indicates whether a peep is physically at the ride, or is just thinking about going on the ride. bool peepAtRide = !thinking; - if (ride->status == RideStatus::Open && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.status == RideStatus::Open && !(ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) { // Peeps that are leaving the park will refuse to go on any rides, with the exception of free transport rides. - assert(ride->type < std::size(RideTypeDescriptors)); - if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_TRANSPORT_RIDE) || ride->value == RIDE_VALUE_UNDEFINED - || ride_get_price(ride) != 0) + assert(ride.type < std::size(RideTypeDescriptors)); + if (!ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_TRANSPORT_RIDE) || ride.value == RIDE_VALUE_UNDEFINED + || RideGetPrice(ride) != 0) { if (PeepFlags & PEEP_FLAGS_LEAVING_PARK) { @@ -1938,7 +1935,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b } } - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) { return ShouldGoToShop(ride, peepAtRide); } @@ -1947,14 +1944,14 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b // This means we can use the existing !(flags & 4) check. if (peepAtRide) { - auto& station = ride->GetStation(entranceNum); + auto& station = ride.GetStation(entranceNum); // Rides without queues can only have one peep waiting at a time. if (!atQueue) { if (!station.LastPeepInQueue.IsNull()) { - peep_tried_to_enter_full_queue(this, ride); + PeepTriedToEnterFullQueue(this, ride); return false; } } @@ -1972,14 +1969,14 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b // This check enforces a minimum distance between peeps entering the queue. if (maxD < 8) { - peep_tried_to_enter_full_queue(this, ride); + PeepTriedToEnterFullQueue(this, ride); return false; } // This checks if there's a peep standing still at the very end of the queue. if (maxD <= 13 && lastPeepInQueue->TimeInQueue > 10) { - peep_tried_to_enter_full_queue(this, ride); + PeepTriedToEnterFullQueue(this, ride); return false; } } @@ -1988,18 +1985,18 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b // Assuming the queue conditions are met, peeps will always go on free transport rides. // Ride ratings, recent crashes and weather will all be ignored. - money16 ridePrice = ride_get_price(ride); - if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_TRANSPORT_RIDE) || ride->value == RIDE_VALUE_UNDEFINED + auto ridePrice = RideGetPrice(ride); + if (!ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_TRANSPORT_RIDE) || ride.value == RIDE_VALUE_UNDEFINED || ridePrice != 0) { - if (PreviousRide == ride->id) + if (PreviousRide == ride.id) { ChoseNotToGoOnRide(ride, peepAtRide, false); return false; } // Basic price checks - if (ridePrice != 0 && !peep_has_voucher_for_free_ride(this, ride) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) + if (ridePrice != 0 && !PeepHasVoucherForFreeRide(this, ride) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { if (ridePrice > CashInPocket) { @@ -2011,7 +2008,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b } else { - InsertNewThought(PeepThoughtType::CantAffordRide, ride->id); + InsertNewThought(PeepThoughtType::CantAffordRide, ride.id); } } ChoseNotToGoOnRide(ride, peepAtRide, true); @@ -2020,52 +2017,52 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b } // If happy enough, peeps will ignore the fact that a ride has recently crashed. - if (ride->last_crash_type != RIDE_CRASH_TYPE_NONE && Happiness < 225) + if (ride.last_crash_type != RIDE_CRASH_TYPE_NONE && Happiness < 225) { if (peepAtRide) { - InsertNewThought(PeepThoughtType::NotSafe, ride->id); + InsertNewThought(PeepThoughtType::NotSafe, ride.id); if (HappinessTarget >= 64) { HappinessTarget -= 8; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; } - if (ride_has_ratings(ride)) + if (RideHasRatings(ride)) { // If a peep has already decided that they're going to go on a ride, they'll skip the weather and // excitement check and will only do a basic intensity check when they arrive at the ride itself. - if (ride->id == GuestHeadingToRideId) + if (ride.id == GuestHeadingToRideId) { - if (ride->intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) + if (ride.intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) { - peep_ride_is_too_intense(this, ride, peepAtRide); + PeepRideIsTooIntense(this, ride, peepAtRide); return false; } } else { - if (ClimateIsRaining() && !ShouldRideWhileRaining(*ride)) + if (ClimateIsRaining() && !ShouldRideWhileRaining(ride)) { if (peepAtRide) { - InsertNewThought(PeepThoughtType::NotWhileRaining, ride->id); + InsertNewThought(PeepThoughtType::NotWhileRaining, ride.id); if (HappinessTarget >= 64) { HappinessTarget -= 8; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; } // 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 (!ClimateIsRaining() || !ShouldRideWhileRaining(ride)) { if (!gCheatsIgnoreRideIntensity) { @@ -2074,46 +2071,46 @@ 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.intensity < minIntensity) { if (peepAtRide) { - InsertNewThought(PeepThoughtType::MoreThrilling, ride->id); + InsertNewThought(PeepThoughtType::MoreThrilling, ride.id); if (HappinessTarget >= 64) { HappinessTarget -= 8; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; } - if (ride->intensity > maxIntensity) + if (ride.intensity > maxIntensity) { - peep_ride_is_too_intense(this, ride, peepAtRide); + PeepRideIsTooIntense(this, ride, peepAtRide); return false; } // Nausea calculations. ride_rating maxNausea = NauseaMaximumThresholds[(EnumValue(NauseaTolerance) & 3)] + Happiness; - if (ride->nausea > maxNausea) + if (ride.nausea > maxNausea) { if (peepAtRide) { - InsertNewThought(PeepThoughtType::Sickening, ride->id); + InsertNewThought(PeepThoughtType::Sickening, ride.id); if (HappinessTarget >= 64) { HappinessTarget -= 8; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; } // Very nauseous peeps will only go on very gentle rides. - if (ride->nausea >= FIXED_2DP(1, 40) && Nausea > 160) + if (ride.nausea >= FIXED_2DP(1, 40) && Nausea > 160) { ChoseNotToGoOnRide(ride, peepAtRide, false); return false; @@ -2125,9 +2122,9 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b // If the ride has not yet been rated and is capable of having g-forces, // there's a 90% chance that the peep will ignore it. - if (!ride_has_ratings(ride) && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES)) + if (!RideHasRatings(ride) && ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES)) { - if ((scenario_rand() & 0xFFFF) > 0x1999U) + if ((ScenarioRand() & 0xFFFF) > 0x1999U) { ChoseNotToGoOnRide(ride, peepAtRide, false); return false; @@ -2135,8 +2132,8 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b if (!gCheatsIgnoreRideIntensity) { - if (ride->max_positive_vertical_g > FIXED_2DP(5, 00) || ride->max_negative_vertical_g < FIXED_2DP(-4, 00) - || ride->max_lateral_g > FIXED_2DP(4, 00)) + if (ride.max_positive_vertical_g > FIXED_2DP(5, 00) || ride.max_negative_vertical_g < FIXED_2DP(-4, 00) + || ride.max_lateral_g > FIXED_2DP(4, 00)) { ChoseNotToGoOnRide(ride, peepAtRide, false); return false; @@ -2144,40 +2141,40 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b } } - uint32_t value = ride->value; + money64 value = ride.value; // If the value of the ride hasn't yet been calculated, peeps will be willing to pay any amount for the ride. - if (value != 0xFFFF && !peep_has_voucher_for_free_ride(this, ride) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) + if (value != RIDE_VALUE_UNDEFINED && !PeepHasVoucherForFreeRide(this, ride) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { // The amount peeps are willing to pay is decreased by 75% if they had to pay to enter the park. if (PeepFlags & PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY) value /= 4; // Peeps won't pay more than twice the value of the ride. - ridePrice = ride_get_price(ride); - if (ridePrice > static_cast(value * 2)) + ridePrice = RideGetPrice(ride); + if (ridePrice > (value * 2)) { if (peepAtRide) { - InsertNewThought(PeepThoughtType::BadValue, ride->id); + InsertNewThought(PeepThoughtType::BadValue, ride.id); if (HappinessTarget >= 60) { HappinessTarget -= 16; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; } // A ride is good value if the price is 50% or less of the ride value and the peep didn't pay to enter the park. - if (ridePrice <= static_cast(value / 2) && peepAtRide) + if (ridePrice <= (value / 2) && peepAtRide) { if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { if (!(PeepFlags & PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY)) { - InsertNewThought(PeepThoughtType::GoodValue, ride->id); + InsertNewThought(PeepThoughtType::GoodValue, ride.id); } } } @@ -2187,15 +2184,15 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b // At this point, the peep has decided to go on the ride. if (peepAtRide) { - ride->UpdatePopularity(1); + ride.UpdatePopularity(1); } - if (ride->id == GuestHeadingToRideId) + if (ride.id == GuestHeadingToRideId) { - peep_reset_ride_heading(this); + PeepResetRideHeading(this); } - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_QUEUE_FULL; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_QUEUE_FULL; return true; } @@ -2203,16 +2200,16 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b return false; } -bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop) +bool Guest::ShouldGoToShop(Ride& ride, bool peepAtShop) { // Peeps won't go to the same shop twice in a row. - if (ride->id == PreviousRide) + if (ride.id == PreviousRide) { ChoseNotToGoOnRide(ride, peepAtShop, true); return false; } - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride.GetRideTypeDescriptor(); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_TOILET)) { if (Toilet < 70) @@ -2223,16 +2220,16 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop) // The amount that peeps are willing to pay to use the Toilets scales with their toilet stat. // It effectively has a minimum of $0.10 (due to the check above) and a maximum of $0.60. - if (ride_get_price(ride) * 40 > Toilet) + if (RideGetPrice(ride) * 40 > Toilet) { if (peepAtShop) { - InsertNewThought(PeepThoughtType::NotPaying, ride->id); + InsertNewThought(PeepThoughtType::NotPaying, ride.id); if (HappinessTarget >= 60) { HappinessTarget -= 16; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtShop, true); return false; @@ -2249,7 +2246,7 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop) } // Basic price checks - auto ridePrice = ride_get_price(ride); + auto ridePrice = RideGetPrice(ride); if (ridePrice != 0 && ridePrice > CashInPocket) { if (peepAtShop) @@ -2260,7 +2257,7 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop) } else { - InsertNewThought(PeepThoughtType::CantAffordRide, ride->id); + InsertNewThought(PeepThoughtType::CantAffordRide, ride.id); } } ChoseNotToGoOnRide(ride, peepAtShop, true); @@ -2269,19 +2266,19 @@ bool Guest::ShouldGoToShop(Ride* ride, bool peepAtShop) if (peepAtShop) { - ride->UpdatePopularity(1); - if (ride->id == GuestHeadingToRideId) + ride.UpdatePopularity(1); + if (ride.id == GuestHeadingToRideId) { - peep_reset_ride_heading(this); + PeepResetRideHeading(this); } } return true; } // Used when no logging to an expend type required -void Guest::SpendMoney(money32 amount, ExpenditureType expenditure) +void Guest::SpendMoney(money64 amount, ExpenditureType expenditure) { - money16 unused; + money64 unused; SpendMoney(unused, amount, expenditure); } @@ -2290,52 +2287,44 @@ void Guest::SpendMoney(money32 amount, ExpenditureType expenditure) * rct2: 0x0069926C * Expend type was previously an offset saved in 0x00F1AEC0 */ -void Guest::SpendMoney(money16& peep_expend_type, money32 amount, ExpenditureType expenditure) +void Guest::SpendMoney(money64& peep_expend_type, money64 amount, ExpenditureType expenditure) { assert(!(gParkFlags & PARK_FLAGS_NO_MONEY)); - CashInPocket = std::max(0, CashInPocket - amount); + CashInPocket = std::max(0.00_GBP, static_cast(CashInPocket) - amount); CashSpent += amount; - peep_expend_type += static_cast(amount); + peep_expend_type += amount; - window_invalidate_by_number(WindowClass::Peep, sprite_index); + WindowInvalidateByNumber(WindowClass::Peep, Id); - finance_payment(-amount, expenditure); + FinancePayment(-amount, expenditure); - if (gConfigGeneral.ShowGuestPurchases && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) - { - // HACK Currently disabled for multiplayer due to limitation of all sprites - // needing to be synchronised - if (network_get_mode() == NETWORK_MODE_NONE && !gOpenRCT2Headless) - { - MoneyEffect::CreateAt(amount, GetLocation(), true); - } - } + MoneyEffect::CreateAt(amount, GetLocation(), true); OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::Purchase, GetLocation()); } -void Guest::SetHasRidden(const Ride* ride) +void Guest::SetHasRidden(const Ride& ride) { - OpenRCT2::RideUse::GetHistory().Add(sprite_index, ride->id); + OpenRCT2::RideUse::GetHistory().Add(Id, ride.id); - SetHasRiddenRideType(ride->type); + SetHasRiddenRideType(ride.type); } -bool Guest::HasRidden(const Ride* ride) const +bool Guest::HasRidden(const Ride& ride) const { - return OpenRCT2::RideUse::GetHistory().Contains(sprite_index, ride->id); + return OpenRCT2::RideUse::GetHistory().Contains(Id, ride.id); } void Guest::SetHasRiddenRideType(int32_t rideType) { - OpenRCT2::RideUse::GetTypeHistory().Add(sprite_index, rideType); + OpenRCT2::RideUse::GetTypeHistory().Add(Id, rideType); } bool Guest::HasRiddenRideType(int32_t rideType) const { - return OpenRCT2::RideUse::GetTypeHistory().Contains(sprite_index, rideType); + return OpenRCT2::RideUse::GetTypeHistory().Contains(Id, rideType); } void Guest::SetParkEntryTime(int32_t entryTime) @@ -2359,7 +2348,7 @@ bool Guest::ShouldRideWhileRaining(const Ride& ride) // Peeps with umbrellas will go on rides where they can use their umbrella on it (like the Maze) 50% of the time if (HasItem(ShopItem::Umbrella) && ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA) - && (scenario_rand() & 2) == 0) + && (ScenarioRand() & 2) == 0) { return true; } @@ -2367,17 +2356,17 @@ bool Guest::ShouldRideWhileRaining(const Ride& ride) return false; } -void Guest::ChoseNotToGoOnRide(Ride* ride, bool peepAtRide, bool updateLastRide) +void Guest::ChoseNotToGoOnRide(const Ride& ride, bool peepAtRide, bool updateLastRide) { if (peepAtRide && updateLastRide) { - PreviousRide = ride->id; + PreviousRide = ride.id; PreviousRideTimeOut = 0; } - if (ride->id == GuestHeadingToRideId) + if (ride.id == GuestHeadingToRideId) { - peep_reset_ride_heading(this); + PeepResetRideHeading(this); } } @@ -2392,9 +2381,9 @@ void Guest::ReadMap() } } -static bool peep_has_voucher_for_free_ride(Guest* peep, Ride* ride) +static bool PeepHasVoucherForFreeRide(Guest* peep, const Ride& ride) { - return peep->HasItem(ShopItem::Voucher) && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherRideId == ride->id; + return peep->HasItem(ShopItem::Voucher) && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherRideId == ride.id; } /** @@ -2402,34 +2391,34 @@ static bool peep_has_voucher_for_free_ride(Guest* peep, Ride* ride) * Does not effect peeps that walk up to the queue entrance. * This flag is reset the next time a peep successfully joins the queue. */ -static void peep_tried_to_enter_full_queue(Guest* peep, Ride* ride) +static void PeepTriedToEnterFullQueue(Guest* peep, Ride& ride) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_QUEUE_FULL; - peep->PreviousRide = ride->id; + ride.lifecycle_flags |= RIDE_LIFECYCLE_QUEUE_FULL; + peep->PreviousRide = ride.id; peep->PreviousRideTimeOut = 0; // Change status "Heading to" to "Walking" if queue is full - if (ride->id == peep->GuestHeadingToRideId) + if (ride.id == peep->GuestHeadingToRideId) { - peep_reset_ride_heading(peep); + PeepResetRideHeading(peep); } } -static void peep_reset_ride_heading(Guest* peep) +static void PeepResetRideHeading(Guest* peep) { peep->GuestHeadingToRideId = RideId::GetNull(); peep->WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_ACTION; } -static void peep_ride_is_too_intense(Guest* peep, Ride* ride, bool peepAtRide) +static void PeepRideIsTooIntense(Guest* peep, Ride& ride, bool peepAtRide) { if (peepAtRide) { - peep->InsertNewThought(PeepThoughtType::Intense, ride->id); + peep->InsertNewThought(PeepThoughtType::Intense, ride.id); if (peep->HappinessTarget >= 64) { peep->HappinessTarget -= 8; } - ride->UpdatePopularity(0); + ride.UpdatePopularity(0); } peep->ChoseNotToGoOnRide(ride, peepAtRide, true); } @@ -2438,12 +2427,12 @@ static void peep_ride_is_too_intense(Guest* peep, Ride* ride, bool peepAtRide) * * rct2: 0x00691C6E */ -static Vehicle* peep_choose_car_from_ride(Peep* peep, Ride* ride, std::vector& car_array) +static Vehicle* PeepChooseCarFromRide(Peep* peep, const Ride& ride, std::vector& car_array) { - uint8_t chosen_car = scenario_rand(); - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES) && ((chosen_car & 0xC) != 0xC)) + uint8_t chosen_car = ScenarioRand(); + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES) && ((chosen_car & 0xC) != 0xC)) { - chosen_car = (scenario_rand() & 1) ? 0 : static_cast(car_array.size()) - 1; + chosen_car = (ScenarioRand() & 1) ? 0 : static_cast(car_array.size()) - 1; } else { @@ -2452,7 +2441,7 @@ static Vehicle* peep_choose_car_from_ride(Peep* peep, Ride* ride, std::vectorCurrentCar = car_array[chosen_car]; - Vehicle* vehicle = GetEntity(ride->vehicles[peep->CurrentTrain]); + Vehicle* vehicle = GetEntity(ride.vehicles[peep->CurrentTrain]); if (vehicle == nullptr) { return nullptr; @@ -2464,7 +2453,7 @@ static Vehicle* peep_choose_car_from_ride(Peep* peep, Ride* ride, std::vectornext_free_seat; - if (ride->mode == RideMode::ForwardRotation || ride->mode == RideMode::BackwardRotation) + if (ride.mode == RideMode::ForwardRotation || ride.mode == RideMode::BackwardRotation) { chosen_seat = (((~vehicle->Pitch + 1) >> 3) & 0xF) * 2; if (vehicle->next_free_seat & 1) @@ -2483,7 +2472,7 @@ static void peep_choose_seat_from_car(Peep* peep, Ride* ride, Vehicle* vehicle) peep->CurrentSeat = chosen_seat; vehicle->next_free_seat++; - vehicle->peep[peep->CurrentSeat] = peep->sprite_index; + vehicle->peep[peep->CurrentSeat] = peep->Id; vehicle->peep_tshirt_colours[peep->CurrentSeat] = peep->TshirtColour; } @@ -2491,9 +2480,9 @@ static void peep_choose_seat_from_car(Peep* peep, Ride* ride, Vehicle* vehicle) * * rct2: 0x00691D27 */ -void Guest::GoToRideEntrance(Ride* ride) +void Guest::GoToRideEntrance(const Ride& ride) { - const auto& station = ride->GetStation(CurrentRideStation); + const auto& station = ride.GetStation(CurrentRideStation); if (station.Entrance.IsNull()) { RemoveFromQueue(); @@ -2505,7 +2494,7 @@ void Guest::GoToRideEntrance(Ride* ride) int16_t y_shift = DirectionOffsets[location.direction].y; uint8_t shift_multiplier = 21; - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry != nullptr) { if (rideEntry->Cars[rideEntry->DefaultCar].flags & CAR_ENTRY_FLAG_MINI_GOLF @@ -2531,18 +2520,18 @@ void Guest::GoToRideEntrance(Ride* ride) RemoveFromQueue(); } -bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) +bool Guest::FindVehicleToEnter(const Ride& ride, std::vector& car_array) { uint8_t chosen_train = RideStation::NO_TRAIN; - if (ride->mode == RideMode::Dodgems || ride->mode == RideMode::Race) + if (ride.mode == RideMode::Dodgems || ride.mode == RideMode::Race) { - if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) return false; - for (int32_t i = 0; i < ride->NumTrains; ++i) + for (int32_t i = 0; i < ride.NumTrains; ++i) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) continue; @@ -2557,7 +2546,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) } else { - chosen_train = ride->GetStation(CurrentRideStation).TrainAtStation; + chosen_train = ride.GetStation(CurrentRideStation).TrainAtStation; } if (chosen_train >= OpenRCT2::Limits::MaxTrainsPerRide) { @@ -2568,7 +2557,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) int32_t i = 0; - auto vehicle_id = ride->vehicles[chosen_train]; + auto vehicle_id = ride.vehicles[chosen_train]; for (Vehicle* vehicle = GetEntity(vehicle_id); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train), ++i) { @@ -2586,7 +2575,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) if (num_seats == vehicle->next_free_seat) continue; - if (ride->mode == RideMode::ForwardRotation || ride->mode == RideMode::BackwardRotation) + if (ride.mode == RideMode::ForwardRotation || ride.mode == RideMode::BackwardRotation) { uint8_t position = (((~vehicle->Pitch + 1) >> 3) & 0xF) * 2; if (!vehicle->peep[position].IsNull()) @@ -2598,7 +2587,7 @@ bool Guest::FindVehicleToEnter(Ride* ride, std::vector& car_array) return !car_array.empty(); } -static void peep_update_ride_at_entrance_try_leave(Guest* peep) +static void PeepUpdateRideAtEntranceTryLeave(Guest* peep) { // Destination Tolerance is zero when peep has completely // entered entrance @@ -2609,7 +2598,7 @@ static void peep_update_ride_at_entrance_try_leave(Guest* peep) } } -static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 ridePrice) +static bool PeepCheckRidePriceAtEntrance(Guest* peep, const Ride& ride, money64 ridePrice) { if ((peep->HasItem(ShopItem::Voucher)) && peep->VoucherType == VOUCHER_TYPE_RIDE_FREE && peep->VoucherRideId == peep->CurrentRide) @@ -2618,7 +2607,7 @@ static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 r if (peep->CashInPocket <= 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { peep->InsertNewThought(PeepThoughtType::SpentMoney); - peep_update_ride_at_entrance_try_leave(peep); + PeepUpdateRideAtEntranceTryLeave(peep); return false; } @@ -2631,17 +2620,17 @@ static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 r { peep->InsertNewThought(PeepThoughtType::CantAffordRide, peep->CurrentRide); } - peep_update_ride_at_entrance_try_leave(peep); + PeepUpdateRideAtEntranceTryLeave(peep); return false; } - uint16_t value = ride->value; + auto value = ride.value; if (value != RIDE_VALUE_UNDEFINED) { - if (value * 2 < ridePrice) + if ((value * 2) < ridePrice) { peep->InsertNewThought(PeepThoughtType::BadValue, peep->CurrentRide); - peep_update_ride_at_entrance_try_leave(peep); + PeepUpdateRideAtEntranceTryLeave(peep); return false; } } @@ -2656,10 +2645,10 @@ static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 r * - How long the peep was waiting in the queue * - If the peep has been on the ride before, or on another ride of the same type */ -static int16_t peep_calculate_ride_satisfaction(Guest* peep, Ride* ride) +static int16_t PeepCalculateRideSatisfaction(Guest* peep, const Ride& ride) { - int16_t satisfaction = peep_calculate_ride_value_satisfaction(peep, ride); - satisfaction += peep_calculate_ride_intensity_nausea_satisfaction(peep, ride); + int16_t satisfaction = PeepCalculateRideValueSatisfaction(peep, ride); + satisfaction += PeepCalculateRideIntensityNauseaSatisfaction(peep, ride); // Calculate satisfaction based on how long the peep has been in the queue for. // (For comparison: peeps start thinking "I've been queueing for a long time" at 3500 and @@ -2673,10 +2662,10 @@ static int16_t peep_calculate_ride_satisfaction(Guest* peep, Ride* ride) // Peeps get a small boost in satisfaction if they've been on a ride of the same type before, // and this boost is doubled if they've already been on this particular ride. - if (peep->HasRiddenRideType(ride->type)) + if (peep->HasRiddenRideType(ride.type)) satisfaction += 10; - if (peep->HasRidden(get_ride(peep->CurrentRide))) + if (peep->HasRidden(*GetRide(peep->CurrentRide))) satisfaction += 10; return satisfaction; @@ -2692,10 +2681,10 @@ static int16_t peep_calculate_ride_satisfaction(Guest* peep, Ride* ride) * the ride becomes the peep's favourite. (This doesn't happen right away, but will be updated once the peep * exits the ride.) */ -static void peep_update_favourite_ride(Guest* peep, 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, PEEP_MAX_HAPPINESS); + uint8_t peepRideRating = std::clamp((ride.excitement / 4) + peep->Happiness, 0, PEEP_MAX_HAPPINESS); if (peepRideRating >= peep->FavouriteRideRating) { if (peep->Happiness >= 160 && peep->HappinessTarget >= 160) @@ -2707,25 +2696,25 @@ static void peep_update_favourite_ride(Guest* peep, Ride* ride) } /* rct2: 0x00695555 */ -static int16_t peep_calculate_ride_value_satisfaction(Guest* peep, Ride* ride) +static int16_t PeepCalculateRideValueSatisfaction(Guest* peep, const Ride& ride) { if (gParkFlags & PARK_FLAGS_NO_MONEY) { return -30; } - if (ride->value == RIDE_VALUE_UNDEFINED) + if (ride.value == RIDE_VALUE_UNDEFINED) { return -30; } - money16 ridePrice = ride_get_price(ride); - if (ride->value >= ridePrice) + auto ridePrice = RideGetPrice(ride); + if (ride.value >= ridePrice) { return -5; } - if ((ride->value + ((ride->value * peep->Happiness) / 256)) >= ridePrice) + if ((ride.value + ((ride.value * peep->Happiness) / 256)) >= ridePrice) { return -30; } @@ -2739,9 +2728,9 @@ static int16_t peep_calculate_ride_value_satisfaction(Guest* peep, Ride* ride) * of the ride fall exactly within the peep's preferences, but lower scores can still be achieved * if the peep's happiness is enough to offset it. */ -static int16_t peep_calculate_ride_intensity_nausea_satisfaction(Guest* peep, Ride* ride) +static int16_t PeepCalculateRideIntensityNauseaSatisfaction(Guest* peep, const Ride& ride) { - if (!ride_has_ratings(ride)) + if (!RideHasRatings(ride)) { return 70; } @@ -2750,19 +2739,19 @@ static int16_t peep_calculate_ride_intensity_nausea_satisfaction(Guest* peep, Ri 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.intensity && maxIntensity >= ride.intensity) { intensitySatisfaction--; } minIntensity -= peep->Happiness * 2; maxIntensity += peep->Happiness; - if (minIntensity <= ride->intensity && maxIntensity >= ride->intensity) + if (minIntensity <= ride.intensity && maxIntensity >= ride.intensity) { intensitySatisfaction--; } minIntensity -= peep->Happiness * 2; maxIntensity += peep->Happiness; - if (minIntensity <= ride->intensity && maxIntensity >= ride->intensity) + if (minIntensity <= ride.intensity && maxIntensity >= ride.intensity) { intensitySatisfaction--; } @@ -2771,19 +2760,19 @@ static int16_t peep_calculate_ride_intensity_nausea_satisfaction(Guest* peep, Ri // 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.nausea && maxNausea >= ride.nausea) { nauseaSatisfaction--; } minNausea -= peep->Happiness * 2; maxNausea += peep->Happiness; - if (minNausea <= ride->nausea && maxNausea >= ride->nausea) + if (minNausea <= ride.nausea && maxNausea >= ride.nausea) { nauseaSatisfaction--; } minNausea -= peep->Happiness * 2; maxNausea += peep->Happiness; - if (minNausea <= ride->nausea && maxNausea >= ride->nausea) + if (minNausea <= ride.nausea && maxNausea >= ride.nausea) { nauseaSatisfaction--; } @@ -2839,22 +2828,22 @@ static int16_t peep_calculate_ride_intensity_nausea_satisfaction(Guest* peep, Ri * - How hungry the peep is (+0% nausea at 50% hunger up to +100% nausea at 100% hunger) * - The peep's nausea tolerance (Final modifier: none: 100%, low: 50%, average: 25%, high: 12.5%) */ -static void peep_update_ride_nausea_growth(Guest* peep, Ride* ride) +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.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)); } -static bool peep_should_go_on_ride_again(Guest* peep, Ride* ride) +static bool PeepShouldGoOnRideAgain(Guest* peep, const Ride& ride) { - if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN)) + if (!ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN)) return false; - if (!ride_has_ratings(ride)) + if (!RideHasRatings(ride)) return false; - if (ride->intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) + if (ride.intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) return false; if (peep->Happiness < 180) return false; @@ -2869,7 +2858,7 @@ static bool peep_should_go_on_ride_again(Guest* peep, Ride* ride) if (peep->Toilet > 170) return false; - uint8_t r = (scenario_rand() & 0xFF); + uint8_t r = (ScenarioRand() & 0xFF); if (r <= 128) { if (peep->GuestNumRides > 7) @@ -2881,25 +2870,25 @@ static bool peep_should_go_on_ride_again(Guest* peep, Ride* ride) return true; } -static bool peep_should_preferred_intensity_increase(Guest* peep) +static bool PeepShouldPreferredIntensityIncrease(Guest* peep) { if (gParkFlags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) return false; if (peep->Happiness < 200) return false; - return (scenario_rand() & 0xFF) >= static_cast(peep->Intensity); + return (ScenarioRand() & 0xFF) >= static_cast(peep->Intensity); } -static bool peep_really_liked_ride(Guest* peep, Ride* ride) +static bool PeepReallyLikedRide(Guest* peep, const Ride& ride) { if (peep->Happiness < 215) return false; if (peep->Nausea > 120) return false; - if (!ride_has_ratings(ride)) + if (!RideHasRatings(ride)) return false; - if (ride->intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) + if (ride.intensity > RIDE_RATING(10, 00) && !gCheatsIgnoreRideIntensity) return false; return true; } @@ -2908,7 +2897,7 @@ static bool peep_really_liked_ride(Guest* peep, Ride* ride) * * rct2: 0x0069BC9A */ -static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z) +static PeepThoughtType PeepAssessSurroundings(int16_t centre_x, int16_t centre_y, int16_t centre_z) { if ((TileElementHeight({ centre_x, centre_y })) > centre_z) return PeepThoughtType::None; @@ -2929,8 +2918,6 @@ static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre { for (auto* tileElement : TileElementsView({ x, y })) { - Ride* ride; - if (tileElement->IsGhost()) { continue; @@ -2968,7 +2955,7 @@ static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre break; case TileElementType::Track: { - ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto* ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr) break; @@ -3029,7 +3016,7 @@ static PeepThoughtType peep_assess_surroundings(int16_t centre_x, int16_t centre * * rct2: 0x0068F9A9 */ -static void peep_update_hunger(Guest* peep) +static void PeepUpdateHunger(Guest* peep) { if (peep->Hunger >= 3) { @@ -3046,7 +3033,7 @@ static void peep_update_hunger(Guest* peep) * * rct2: 0x0068F8CD */ -static void peep_decide_whether_to_leave_park(Guest* peep) +static void PeepDecideWhetherToLeavePark(Guest* peep) { if (peep->EnergyTarget >= 33) { @@ -3085,20 +3072,20 @@ static void peep_decide_whether_to_leave_park(Guest* peep) } // Approx 95% chance of staying in the park - if ((scenario_rand() & 0xFFFF) > 3276) + if ((ScenarioRand() & 0xFFFF) > 3276) { return; } // In the remaining 5% chance the peep leaves the park. - peep_leave_park(peep); + PeepLeavePark(peep); } /** * * rct2: 0x0068F93E */ -static void peep_leave_park(Guest* peep) +static void PeepLeavePark(Guest* peep) { peep->GuestHeadingToRideId = RideId::GetNull(); if (peep->PeepFlags & PEEP_FLAGS_LEAVING_PARK) @@ -3117,13 +3104,13 @@ static void peep_leave_park(Guest* peep) peep->InsertNewThought(PeepThoughtType::GoHome); - rct_window* w = window_find_by_number(WindowClass::Peep, peep->sprite_index); + WindowBase* w = WindowFindByNumber(WindowClass::Peep, peep->Id); if (w != nullptr) - window_event_invalidate_call(w); - window_invalidate_by_number(WindowClass::Peep, peep->sprite_index); + WindowEventInvalidateCall(w); + WindowInvalidateByNumber(WindowClass::Peep, peep->Id); } -template static void peep_head_for_nearest_ride(Guest* peep, bool considerOnlyCloseRides, T predicate) +template static void PeepHeadForNearestRide(Guest* peep, bool considerOnlyCloseRides, T predicate) { if (peep->State != PeepState::Sitting && peep->State != PeepState::Watching && peep->State != PeepState::Walking) { @@ -3135,14 +3122,14 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co return; if (!peep->GuestHeadingToRideId.IsNull()) { - auto ride = get_ride(peep->GuestHeadingToRideId); + auto ride = GetRide(peep->GuestHeadingToRideId); if (ride != nullptr && predicate(*ride)) { return; } } - BitSet rideConsideration; + OpenRCT2::BitSet rideConsideration; if (!considerOnlyCloseRides && (peep->HasItem(ShopItem::Map))) { // Consider all rides in the park @@ -3158,8 +3145,8 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co { // Take nearby rides into consideration constexpr auto searchRadius = 10 * 32; - int32_t cx = floor2(peep->x, 32); - int32_t cy = floor2(peep->y, 32); + int32_t cx = Floor2(peep->x, 32); + int32_t cy = Floor2(peep->y, 32); for (auto x = cx - searchRadius; x <= cx + searchRadius; x += COORDS_XY_STEP) { for (auto y = cy - searchRadius; y <= cy + searchRadius; y += COORDS_XY_STEP) @@ -3171,7 +3158,7 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co for (auto* trackElement : TileElementsView(location)) { auto rideIndex = trackElement->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) continue; @@ -3193,7 +3180,7 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co { if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_QUEUE_FULL)) { - if (peep->ShouldGoOnRide(&ride, StationIndex::FromUnderlying(0), false, true)) + if (peep->ShouldGoOnRide(ride, StationIndex::FromUnderlying(0), false, true)) { potentialRides[numPotentialRides++] = ride.id; } @@ -3206,7 +3193,7 @@ template static void peep_head_for_nearest_ride(Guest* peep, bool co auto closestRideDistance = std::numeric_limits::max(); for (size_t i = 0; i < numPotentialRides; i++) { - auto ride = get_ride(potentialRides[i]); + auto ride = GetRide(potentialRides[i]); if (ride != nullptr) { auto rideLocation = ride->GetStation().Start; @@ -3235,7 +3222,7 @@ static void PeepHeadForNearestRideWithFlags(Guest* peep, bool considerOnlyCloseR { return; } - peep_head_for_nearest_ride(peep, considerOnlyCloseRides, [rideTypeFlags](const Ride& ride) { + PeepHeadForNearestRide(peep, considerOnlyCloseRides, [rideTypeFlags](const Ride& ride) { return ride.GetRideTypeDescriptor().HasFlag(rideTypeFlags); }); } @@ -3296,7 +3283,7 @@ void Guest::StopPurchaseThought(ride_type_t rideType) * * rct2: 0x0069AEB7 */ -static bool peep_should_use_cash_machine(Guest* peep, RideId rideIndex) +static bool PeepShouldUseCashMachine(Guest* peep, RideId rideIndex) { if (gParkFlags & PARK_FLAGS_NO_MONEY) return false; @@ -3304,12 +3291,12 @@ static bool peep_should_use_cash_machine(Guest* peep, RideId rideIndex) return false; if (peep->CashInPocket > 20.00_GBP) return false; - if (115 + (scenario_rand() % 128) > peep->Happiness) + if (115 + (ScenarioRand() % 128) > peep->Happiness) return false; if (peep->Energy < 80) return false; - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { ride->UpdateSatisfaction(peep->Happiness >> 6); @@ -3329,7 +3316,7 @@ void Guest::UpdateBuying() if (!CheckForPath()) return; - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr || ride->status != RideStatus::Open) { SetState(PeepState::Falling); @@ -3352,7 +3339,7 @@ void Guest::UpdateBuying() { CashInPocket += 50.00_GBP; } - window_invalidate_by_number(WindowClass::Peep, sprite_index); + WindowInvalidateByNumber(WindowClass::Peep, Id); } sprite_direction ^= 0x10; @@ -3371,7 +3358,7 @@ void Guest::UpdateBuying() const auto& rtd = GetRideTypeDescriptor(ride->type); if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_CASH_MACHINE)) { - item_bought = peep_should_use_cash_machine(this, CurrentRide); + item_bought = PeepShouldUseCashMachine(this, CurrentRide); if (!item_bought) { PreviousRide = CurrentRide; @@ -3390,16 +3377,16 @@ void Guest::UpdateBuying() } else { - rct_ride_entry* ride_type = get_ride_entry(ride->subtype); + const auto* ride_type = GetRideEntryByIndex(ride->subtype); if (ride_type == nullptr) { return; } if (ride_type->shop_item[1] != ShopItem::None) { - money16 price = ride->price[1]; + auto price = ride->price[1]; - item_bought = DecideAndBuyItem(ride, ride_type->shop_item[1], price); + item_bought = DecideAndBuyItem(*ride, ride_type->shop_item[1], price); if (item_bought) { ride->no_secondary_items_sold++; @@ -3408,9 +3395,9 @@ void Guest::UpdateBuying() if (!item_bought && ride_type->shop_item[0] != ShopItem::None) { - money16 price = ride->price[0]; + auto price = ride->price[0]; - item_bought = DecideAndBuyItem(ride, ride_type->shop_item[0], price); + item_bought = DecideAndBuyItem(*ride, ride_type->shop_item[0], price); if (item_bought) { ride->no_primary_items_sold++; @@ -3438,7 +3425,7 @@ void Guest::UpdateBuying() */ void Guest::UpdateRideAtEntrance() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -3479,32 +3466,32 @@ void Guest::UpdateRideAtEntrance() } else { - if (!FindVehicleToEnter(ride, carArray)) + if (!FindVehicleToEnter(*ride, carArray)) return; } if (ride->status != RideStatus::Open || ride->vehicle_change_timeout != 0) { - peep_update_ride_at_entrance_try_leave(this); + PeepUpdateRideAtEntranceTryLeave(this); return; } if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) return; - money16 ridePrice = ride_get_price(ride); + auto ridePrice = RideGetPrice(*ride); if (ridePrice != 0) { - if (!peep_check_ride_price_at_entrance(this, ride, ridePrice)) + if (!PeepCheckRidePriceAtEntrance(this, *ride, ridePrice)) return; } if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) { - Vehicle* vehicle = peep_choose_car_from_ride(this, ride, carArray); - peep_choose_seat_from_car(this, ride, vehicle); + Vehicle* vehicle = PeepChooseCarFromRide(this, *ride, carArray); + PeepChooseSeatFromCar(this, *ride, vehicle); } - GoToRideEntrance(ride); + GoToRideEntrance(*ride); } /** rct2: 0x00981FD4, 0x00981FD6 */ @@ -3515,7 +3502,7 @@ static constexpr const CoordsXY _MazeEntranceStart[] = { { 24, 8 }, }; -void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc) +void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc) { peep->MazeLastEdge = entrance_loc.direction + 1; @@ -3523,7 +3510,7 @@ void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride* ride, CoordsXYZD& entran entrance_loc.y += CoordsDirectionDelta[entrance_loc.direction].y; uint8_t direction = entrance_loc.direction * 4 + 11; - if (scenario_rand() & 0x40) + if (ScenarioRand() & 0x40) { direction += 4; peep->MazeLastEdge += 2; @@ -3539,16 +3526,16 @@ void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride* ride, CoordsXYZD& entran peep->SetDestination(entrance_loc, 3); - ride->cur_num_customers++; + ride.cur_num_customers++; peep->OnEnterRide(ride); peep->RideSubState = PeepRideSubState::MazePathfinding; } -void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc) +void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc) { - entrance_loc = { ride->GetStation(peep->CurrentRideStation).GetStart(), entrance_loc.direction }; + entrance_loc = { ride.GetStation(peep->CurrentRideStation).GetStart(), entrance_loc.direction }; - TileElement* tile_element = ride_get_station_start_track_element(ride, peep->CurrentRideStation); + TileElement* tile_element = RideGetStationStartTrackElement(ride, peep->CurrentRideStation); uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element->GetDirection()); @@ -3559,22 +3546,22 @@ void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride* ride, CoordsXYZD& peep->SetDestination(entrance_loc); peep->CurrentCar = 0; - ride->cur_num_customers++; + ride.cur_num_customers++; peep->OnEnterRide(ride); peep->RideSubState = PeepRideSubState::ApproachSpiralSlide; } -void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc) +void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc) { // If the ride type was changed guests will become stuck. // Inform the player about this if its a new issue or hasn't been addressed within 120 seconds. - if ((ride->current_issues & RIDE_ISSUE_GUESTS_STUCK) == 0 || gCurrentTicks - ride->last_issue_time > 3000) + if ((ride.current_issues & RIDE_ISSUE_GUESTS_STUCK) == 0 || gCurrentTicks - ride.last_issue_time > 3000) { - ride->current_issues |= RIDE_ISSUE_GUESTS_STUCK; - ride->last_issue_time = gCurrentTicks; + ride.current_issues |= RIDE_ISSUE_GUESTS_STUCK; + ride.last_issue_time = gCurrentTicks; auto ft = Formatter(); - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); if (gConfigNotifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_GUESTS_GETTING_STUCK_ON_RIDE, peep->CurrentRide.ToUnderlying(), ft); @@ -3582,7 +3569,7 @@ void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride* ride, CoordsXYZD& ent } } -uint8_t Guest::GetWaypointedSeatLocation(const Ride& ride, CarEntry* vehicle_type, uint8_t track_direction) const +uint8_t Guest::GetWaypointedSeatLocation(const Ride& ride, const CarEntry* vehicle_type, uint8_t track_direction) const { // The seatlocation can be split into segments around the ride base // to decide the segment first split off the segmentable seat location @@ -3610,10 +3597,13 @@ uint8_t Guest::GetWaypointedSeatLocation(const Ride& ride, CarEntry* vehicle_typ void Guest::UpdateRideLeaveEntranceWaypoints(const Ride& ride) { const auto& station = ride.GetStation(CurrentRideStation); - Guard::Assert(!station.Entrance.IsNull()); + if (station.Entrance.IsNull()) + { + return; + } uint8_t direction_entrance = station.Entrance.direction; - TileElement* tile_element = ride_get_station_start_track_element(&ride, CurrentRideStation); + TileElement* tile_element = RideGetStationStartTrackElement(ride, CurrentRideStation); uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element->GetDirection()); @@ -3623,18 +3613,21 @@ void Guest::UpdateRideLeaveEntranceWaypoints(const Ride& ride) // TODO: Goto ride exit on failure. return; } - auto ride_entry = vehicle->GetRideEntry(); - auto vehicle_type = &ride_entry->Cars[vehicle->vehicle_type]; + const auto* rideEntry = vehicle->GetRideEntry(); + const auto* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; - Var37 = (direction_entrance | GetWaypointedSeatLocation(ride, vehicle_type, direction_track) * 4) * 4; + Var37 = (direction_entrance | GetWaypointedSeatLocation(ride, carEntry, direction_track) * 4) * 4; const auto& rtd = ride.GetRideTypeDescriptor(); CoordsXY waypoint = rtd.GetGuestWaypointLocation(*vehicle, ride, CurrentRideStation); - const auto waypointIndex = Var37 / 4; - Guard::Assert(vehicle_type->peep_loading_waypoints.size() >= static_cast(waypointIndex)); - waypoint.x += vehicle_type->peep_loading_waypoints[waypointIndex][0].x; - waypoint.y += vehicle_type->peep_loading_waypoints[waypointIndex][0].y; + const auto waypointIndex = Var37 / 4U; + if (waypointIndex < carEntry->peep_loading_waypoints.size()) + { + Guard::Assert(carEntry->peep_loading_waypoints.size() >= static_cast(waypointIndex)); + waypoint.x += carEntry->peep_loading_waypoints[waypointIndex][0].x; + waypoint.y += carEntry->peep_loading_waypoints[waypointIndex][0].y; + } SetDestination(waypoint); RideSubState = PeepRideSubState::ApproachVehicleWaypoints; @@ -3646,22 +3639,22 @@ void Guest::UpdateRideLeaveEntranceWaypoints(const Ride& ride) */ void Guest::UpdateRideAdvanceThroughEntrance() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; int16_t actionZ, xy_distance; - auto ride_entry = ride->GetRideEntry(); + const auto* rideEntry = ride->GetRideEntry(); if (auto loc = UpdateAction(xy_distance); loc.has_value()) { uint16_t distanceThreshold = 16; - if (ride_entry != nullptr) + if (rideEntry != nullptr) { - uint8_t vehicle = ride_entry->DefaultCar; - if (ride_entry->Cars[vehicle].flags & CAR_ENTRY_FLAG_MINI_GOLF - || ride_entry->Cars[vehicle].flags & (CAR_ENTRY_FLAG_CHAIRLIFT | CAR_ENTRY_FLAG_GO_KART)) + uint8_t vehicle = rideEntry->DefaultCar; + if (rideEntry->Cars[vehicle].flags & CAR_ENTRY_FLAG_MINI_GOLF + || rideEntry->Cars[vehicle].flags & (CAR_ENTRY_FLAG_CHAIRLIFT | CAR_ENTRY_FLAG_GO_KART)) { distanceThreshold = 28; } @@ -3694,10 +3687,13 @@ void Guest::UpdateRideAdvanceThroughEntrance() { const auto& station = ride->GetStation(CurrentRideStation); auto entranceLocation = station.Entrance.ToCoordsXYZD(); - Guard::Assert(!entranceLocation.IsNull()); + if (entranceLocation.IsNull()) + { + return; + } const auto& rtd = GetRideTypeDescriptor(ride->type); - rtd.UpdateLeaveEntrance(this, ride, entranceLocation); + rtd.UpdateLeaveEntrance(this, *ride, entranceLocation); return; } @@ -3713,13 +3709,13 @@ void Guest::UpdateRideAdvanceThroughEntrance() return; } - ride_entry = vehicle->GetRideEntry(); - if (ride_entry == nullptr) + rideEntry = vehicle->GetRideEntry(); + if (rideEntry == nullptr) { return; } - CarEntry* vehicle_type = &ride_entry->Cars[vehicle->vehicle_type]; + const auto* vehicle_type = &rideEntry->Cars[vehicle->vehicle_type]; if (vehicle_type->flags & CAR_ENTRY_FLAG_LOADING_WAYPOINTS) { @@ -3772,15 +3768,14 @@ void Guest::UpdateRideAdvanceThroughEntrance() * * rct2: 0x0069321D */ -static void peep_go_to_ride_exit(Peep* peep, Ride* ride, int16_t x, int16_t y, int16_t z, uint8_t exit_direction) +static void PeepGoToRideExit(Peep* peep, const Ride& ride, int16_t x, int16_t y, int16_t z, uint8_t exit_direction) { - z += ride->GetRideTypeDescriptor().Heights.PlatformHeight; + z += ride.GetRideTypeDescriptor().Heights.PlatformHeight; peep->MoveTo({ x, y, z }); Guard::Assert(peep->CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::MaxStationsPerRide); - auto exit = ride->GetStation(peep->CurrentRideStation).Exit; - Guard::Assert(!exit.IsNull()); + auto exit = ride.GetStation(peep->CurrentRideStation).Exit; x = exit.x; y = exit.y; x *= 32; @@ -3788,16 +3783,24 @@ static void peep_go_to_ride_exit(Peep* peep, Ride* ride, int16_t x, int16_t y, i x += 16; y += 16; - int16_t x_shift = DirectionOffsets[exit_direction].x; - int16_t y_shift = DirectionOffsets[exit_direction].y; + auto [x_shift, y_shift] = [exit_direction]() { + if (exit_direction < DirectionOffsets.size()) + { + return std::pair(DirectionOffsets[exit_direction].x, DirectionOffsets[exit_direction].y); + } + else + { + return std::pair(0, 0); + } + }(); int16_t shift_multiplier = 20; - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry != nullptr) { - CarEntry* carEntry = &rideEntry->Cars[rideEntry->DefaultCar]; - if (carEntry->flags & CAR_ENTRY_FLAG_MINI_GOLF || carEntry->flags & (CAR_ENTRY_FLAG_CHAIRLIFT | CAR_ENTRY_FLAG_GO_KART)) + const CarEntry& carEntry = rideEntry->Cars[rideEntry->DefaultCar]; + if (carEntry.flags & CAR_ENTRY_FLAG_MINI_GOLF || carEntry.flags & (CAR_ENTRY_FLAG_CHAIRLIFT | CAR_ENTRY_FLAG_GO_KART)) { shift_multiplier = 32; } @@ -3819,9 +3822,9 @@ static void peep_go_to_ride_exit(Peep* peep, Ride* ride, int16_t x, int16_t y, i * * rct2: 0x006920B4 */ -void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) +void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) { - money16 ridePrice = ride_get_price(ride); + auto ridePrice = RideGetPrice(ride); if (ridePrice != 0) { if ((HasItem(ShopItem::Voucher)) && (VoucherType == VOUCHER_TYPE_RIDE_FREE) && (VoucherRideId == CurrentRide)) @@ -3831,8 +3834,8 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) } else { - ride->total_profit += ridePrice; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.total_profit = AddClamp_money64(ride.total_profit, ridePrice); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; SpendMoney(PaidOnRides, ridePrice, ExpenditureType::ParkRideTickets); } } @@ -3843,32 +3846,33 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) queueTime += 3; queueTime /= 2; - auto& station = ride->GetStation(CurrentRideStation); + auto& station = ride.GetStation(CurrentRideStation); if (queueTime != station.QueueTime) { station.QueueTime = queueTime; - window_invalidate_by_number(WindowClass::Ride, CurrentRide.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, CurrentRide.ToUnderlying()); } if (PeepFlags & PEEP_FLAGS_TRACKING) { auto ft = Formatter(); FormatNameTo(ft); - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); StringId msg_string; - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE)) msg_string = STR_PEEP_TRACKING_PEEP_IS_IN_X; else msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X; if (gConfigNotifications.GuestOnRide) { - News::AddItemToQueue(News::ItemType::PeepOnRide, msg_string, sprite_index, ft); + News::AddItemToQueue(News::ItemType::PeepOnRide, msg_string, Id, ft); } } - if (ride->type == RIDE_TYPE_SPIRAL_SLIDE) + const auto& rtd = ride.GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE)) { SwitchToSpecialSprite(1); } @@ -3880,20 +3884,23 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride* ride) * * rct2: 0x00691FD4 */ -static void peep_update_ride_no_free_vehicle_rejoin_queue(Guest* peep, Ride* ride) +static void PeepUpdateRideNoFreeVehicleRejoinQueue(Guest* peep, Ride& ride) { - TileCoordsXYZD entranceLocation = ride->GetStation(peep->CurrentRideStation).Entrance; + TileCoordsXYZD entranceLocation = ride.GetStation(peep->CurrentRideStation).Entrance; int32_t x = entranceLocation.x * 32; int32_t y = entranceLocation.y * 32; - x += 16 - DirectionOffsets[entranceLocation.direction].x * 20; - y += 16 - DirectionOffsets[entranceLocation.direction].y * 20; + if (entranceLocation.direction < DirectionOffsets.size()) + { + x += 16 - DirectionOffsets[entranceLocation.direction].x * 20; + y += 16 - DirectionOffsets[entranceLocation.direction].y * 20; + } peep->SetDestination({ x, y }, 2); peep->SetState(PeepState::QueuingFront); peep->RideSubState = PeepRideSubState::AtEntrance; - ride->QueueInsertGuestAtFront(peep->CurrentRideStation, peep); + ride.QueueInsertGuestAtFront(peep->CurrentRideStation, peep); } /** @@ -3907,7 +3914,7 @@ static void peep_update_ride_no_free_vehicle_rejoin_queue(Guest* peep, Ride* rid */ void Guest::UpdateRideFreeVehicleCheck() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -3915,11 +3922,11 @@ void Guest::UpdateRideFreeVehicleCheck() { if (ride->status != RideStatus::Open || ride->vehicle_change_timeout != 0 || (++RejoinQueueTimeout) == 0) { - peep_update_ride_no_free_vehicle_rejoin_queue(this, ride); + PeepUpdateRideNoFreeVehicleRejoinQueue(this, *ride); return; } - UpdateRideFreeVehicleEnterRide(ride); + UpdateRideFreeVehicleEnterRide(*ride); return; } @@ -3933,13 +3940,13 @@ void Guest::UpdateRideFreeVehicleCheck() if (vehicle == nullptr) return; - rct_ride_entry* ride_entry = vehicle->GetRideEntry(); - if (ride_entry == nullptr) + const auto* rideEntry = vehicle->GetRideEntry(); + if (rideEntry == nullptr) { return; } - if (ride_entry->Cars[0].flags & CAR_ENTRY_FLAG_MINI_GOLF) + if (rideEntry->Cars[0].flags & CAR_ENTRY_FLAG_MINI_GOLF) { vehicle->mini_golf_flags &= ~MiniGolfFlag::Flag5; @@ -3965,7 +3972,7 @@ void Guest::UpdateRideFreeVehicleCheck() if (!vehicle->IsUsedInPairs()) { - UpdateRideFreeVehicleEnterRide(ride); + UpdateRideFreeVehicleEnterRide(*ride); return; } @@ -3973,7 +3980,7 @@ void Guest::UpdateRideFreeVehicleCheck() { if (CurrentSeat & 1 || !(vehicle->next_free_seat & 1)) { - UpdateRideFreeVehicleEnterRide(ride); + UpdateRideFreeVehicleEnterRide(*ride); return; } } @@ -3982,7 +3989,7 @@ void Guest::UpdateRideFreeVehicleCheck() uint8_t seat = CurrentSeat | 1; if (seat < vehicle->next_free_seat) { - UpdateRideFreeVehicleEnterRide(ride); + UpdateRideFreeVehicleEnterRide(*ride); return; } } @@ -3992,8 +3999,7 @@ void Guest::UpdateRideFreeVehicleCheck() { return; } - if (ride->status == RideStatus::Open && ++RejoinQueueTimeout != 0 - && !currentTrain->HasUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART)) + if (ride->status == RideStatus::Open && ++RejoinQueueTimeout != 0 && !currentTrain->HasFlag(VehicleFlags::ReadyToDepart)) { return; } @@ -4007,7 +4013,7 @@ void Guest::UpdateRideFreeVehicleCheck() vehicle->next_free_seat--; vehicle->peep[CurrentSeat] = EntityId::GetNull(); - peep_update_ride_no_free_vehicle_rejoin_queue(this, ride); + PeepUpdateRideNoFreeVehicleRejoinQueue(this, *ride); } void Guest::UpdateRideApproachVehicle() @@ -4022,7 +4028,7 @@ void Guest::UpdateRideApproachVehicle() void Guest::UpdateRideEnterVehicle() { - auto* ride = get_ride(CurrentRide); + auto* ride = GetRide(CurrentRide); if (ride != nullptr) { auto* vehicle = GetEntity(ride->vehicles[CurrentTrain]); @@ -4056,7 +4062,7 @@ void Guest::UpdateRideEnterVehicle() seatedGuest->SetState(PeepState::OnRide); seatedGuest->GuestTimeOnRide = 0; seatedGuest->RideSubState = PeepRideSubState::OnRide; - seatedGuest->OnEnterRide(ride); + seatedGuest->OnEnterRide(*ride); } } @@ -4072,7 +4078,7 @@ void Guest::UpdateRideEnterVehicle() GuestTimeOnRide = 0; RideSubState = PeepRideSubState::OnRide; - OnEnterRide(ride); + OnEnterRide(*ride); } } } @@ -4083,7 +4089,7 @@ void Guest::UpdateRideEnterVehicle() */ void Guest::UpdateRideLeaveVehicle() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4118,7 +4124,7 @@ void Guest::UpdateRideLeaveVehicle() if (ride_station.ToUnderlying() >= OpenRCT2::Limits::MaxStationsPerRide) { // HACK #5658: Some parks have hacked rides which end up in this state - auto bestStationIndex = ride_get_first_valid_station_exit(ride); + auto bestStationIndex = RideGetFirstValidStationExit(*ride); if (bestStationIndex.IsNull()) { bestStationIndex = StationIndex::FromUnderlying(0); @@ -4126,13 +4132,13 @@ void Guest::UpdateRideLeaveVehicle() ride_station = bestStationIndex; } CurrentRideStation = ride_station; - rct_ride_entry* rideEntry = vehicle->GetRideEntry(); + const auto* rideEntry = vehicle->GetRideEntry(); if (rideEntry == nullptr) { return; } - CarEntry* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; + const auto* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; assert(CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::MaxStationsPerRide); auto& station = ride->GetStation(CurrentRideStation); @@ -4177,7 +4183,7 @@ void Guest::UpdateRideLeaveVehicle() uint8_t shiftMultiplier = 12; uint8_t specialDirection = platformLocation.direction; - rideEntry = get_ride_entry(ride->subtype); + rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry != nullptr) { @@ -4198,14 +4204,22 @@ void Guest::UpdateRideLeaveVehicle() } } - int16_t xShift = DirectionOffsets[specialDirection].x; - int16_t yShift = DirectionOffsets[specialDirection].y; + auto [xShift, yShift] = [specialDirection]() { + if (specialDirection < DirectionOffsets.size()) + { + return std::pair(DirectionOffsets[specialDirection].x, DirectionOffsets[specialDirection].y); + } + else + { + return std::pair(0, 0); + } + }(); platformLocation.x = vehicle->x + xShift * shiftMultiplier; platformLocation.y = vehicle->y + yShift * shiftMultiplier; - peep_go_to_ride_exit( - this, ride, platformLocation.x, platformLocation.y, platformLocation.z, platformLocation.direction); + PeepGoToRideExit( + this, *ride, platformLocation.x, platformLocation.y, platformLocation.z, platformLocation.direction); return; } @@ -4235,22 +4249,24 @@ void Guest::UpdateRideLeaveVehicle() } else { - log_verbose( + LOG_VERBOSE( "CurrentSeat %d is too large! (Vehicle entry has room for %d.)", CurrentSeat, carEntry->peep_loading_positions.size()); } platformLocation.z = station.GetBaseZ(); - peep_go_to_ride_exit( - this, ride, platformLocation.x, platformLocation.y, platformLocation.z, platformLocation.direction); + PeepGoToRideExit(this, *ride, platformLocation.x, platformLocation.y, platformLocation.z, platformLocation.direction); return; } auto exitLocation = station.Exit.ToCoordsXYZD(); - Guard::Assert(!exitLocation.IsNull()); + if (exitLocation.IsNull()) + { + return; + } - TileElement* trackElement = ride_get_station_start_track_element(ride, CurrentRideStation); + TileElement* trackElement = RideGetStationStartTrackElement(*ride, CurrentRideStation); Direction station_direction = (trackElement == nullptr ? 0 : trackElement->GetDirection()); @@ -4271,19 +4287,26 @@ void Guest::UpdateRideLeaveVehicle() return; Var37 = ((exitLocation.direction | GetWaypointedSeatLocation(*ride, carEntry, station_direction) * 4) * 4) | 1; - Guard::Assert(carEntry->peep_loading_waypoints.size() >= static_cast(Var37 / 4)); + CoordsXYZ exitWaypointLoc = waypointLoc; - exitWaypointLoc.x += carEntry->peep_loading_waypoints[Var37 / 4][2].x; - exitWaypointLoc.y += carEntry->peep_loading_waypoints[Var37 / 4][2].y; + const auto waypointIndex = Var37 / 4U; + if (waypointIndex < carEntry->peep_loading_waypoints.size()) + { + exitWaypointLoc.x += carEntry->peep_loading_waypoints[waypointIndex][2].x; + exitWaypointLoc.y += carEntry->peep_loading_waypoints[waypointIndex][2].y; + } if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) exitWaypointLoc.z += 15; MoveTo(exitWaypointLoc); - waypointLoc.x += carEntry->peep_loading_waypoints[Var37 / 4][1].x; - waypointLoc.y += carEntry->peep_loading_waypoints[Var37 / 4][1].y; + if (waypointIndex < carEntry->peep_loading_waypoints.size()) + { + waypointLoc.x += carEntry->peep_loading_waypoints[waypointIndex][1].x; + waypointLoc.y += carEntry->peep_loading_waypoints[waypointIndex][1].y; + } SetDestination(waypointLoc, 2); RideSubState = PeepRideSubState::ApproachExitWaypoints; @@ -4295,22 +4318,31 @@ void Guest::UpdateRideLeaveVehicle() */ void Guest::UpdateRidePrepareForExit() { - auto ride = get_ride(CurrentRide); + const auto* ride = GetRide(CurrentRide); if (ride == nullptr || CurrentRideStation.ToUnderlying() >= std::size(ride->GetStations())) return; auto exit = ride->GetStation(CurrentRideStation).Exit; auto newDestination = exit.ToCoordsXY().ToTileCentre(); - auto xShift = DirectionOffsets[exit.direction].x; - auto yShift = DirectionOffsets[exit.direction].y; + + auto [xShift, yShift] = [exit]() { + if (exit.direction < DirectionOffsets.size()) + { + return std::pair(DirectionOffsets[exit.direction].x, DirectionOffsets[exit.direction].y); + } + else + { + return std::pair(0, 0); + } + }(); int16_t shiftMultiplier = 20; - rct_ride_entry* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->GetRideEntry(); if (rideEntry != nullptr) { - CarEntry* carEntry = &rideEntry->Cars[rideEntry->DefaultCar]; - if (carEntry->flags & (CAR_ENTRY_FLAG_CHAIRLIFT | CAR_ENTRY_FLAG_GO_KART)) + const auto& carEntry = rideEntry->Cars[rideEntry->DefaultCar]; + if (carEntry.flags & (CAR_ENTRY_FLAG_CHAIRLIFT | CAR_ENTRY_FLAG_GO_KART)) { shiftMultiplier = 32; } @@ -4347,7 +4379,7 @@ void Guest::UpdateRideApproachExit() */ void Guest::UpdateRideInExit() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4371,7 +4403,7 @@ void Guest::UpdateRideInExit() if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { ShopItem secondaryItem = ride->GetRideTypeDescriptor().PhotoItem; - if (DecideAndBuyItem(ride, secondaryItem, ride->price[1])) + if (DecideAndBuyItem(*ride, secondaryItem, ride->price[1])) { ride->no_secondary_items_sold++; } @@ -4396,7 +4428,7 @@ CoordsXY GetGuestWaypointLocationEnterprise(const Vehicle& vehicle, const Ride& */ void Guest::UpdateRideApproachVehicleWaypoints() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4428,16 +4460,20 @@ void Guest::UpdateRideApproachVehicleWaypoints() CoordsXY targetLoc = rtd.GetGuestWaypointLocation(*vehicle, *ride, CurrentRideStation); - rct_ride_entry* ride_entry = vehicle->GetRideEntry(); - if (ride_entry == nullptr) + const auto* rideEntry = vehicle->GetRideEntry(); + if (rideEntry == nullptr) { return; } - CarEntry* vehicle_type = &ride_entry->Cars[vehicle->vehicle_type]; - Guard::Assert(waypoint < 3); - targetLoc.x += vehicle_type->peep_loading_waypoints[Var37 / 4][waypoint].x; - targetLoc.y += vehicle_type->peep_loading_waypoints[Var37 / 4][waypoint].y; + const auto& vehicle_type = rideEntry->Cars[vehicle->vehicle_type]; + const auto waypointIndex = Var37 / 4U; + if (waypointIndex < vehicle_type.peep_loading_waypoints.size()) + { + Guard::Assert(waypoint < 3); + targetLoc.x += vehicle_type.peep_loading_waypoints[waypointIndex][waypoint].x; + targetLoc.y += vehicle_type.peep_loading_waypoints[waypointIndex][waypoint].y; + } SetDestination(targetLoc); } @@ -4445,7 +4481,7 @@ void Guest::UpdateRideApproachVehicleWaypoints() void UpdateRideApproachVehicleWaypointsMotionSimulator(Guest& guest, const CoordsXY& loc, int16_t& xy_distance) { int16_t actionZ; - auto ride = get_ride(guest.CurrentRide); + auto ride = GetRide(guest.CurrentRide); // Motion simulators have steps this moves the peeps up the steps actionZ = ride->GetStation(guest.CurrentRideStation).GetBaseZ() + 2; @@ -4475,7 +4511,7 @@ void UpdateRideApproachVehicleWaypointsDefault(Guest& guest, const CoordsXY& loc */ void Guest::UpdateRideApproachExitWaypoints() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4520,16 +4556,26 @@ void Guest::UpdateRideApproachExitWaypoints() return; } + const auto* rideEntry = vehicle->GetRideEntry(); + if (rideEntry == nullptr) + return; + + if (vehicle->vehicle_type >= std::size(rideEntry->Cars)) + return; + + const CarEntry& carEntry = rideEntry->Cars[vehicle->vehicle_type]; + + const size_t carPosition = Var37 / 4; + if (carPosition >= carEntry.peep_loading_waypoints.size()) + return; + + const auto waypoint = Var37 & 3; + Guard::Assert(waypoint < 3); + const auto& rtd = ride->GetRideTypeDescriptor(); + CoordsXY targetLoc = rtd.GetGuestWaypointLocation(*vehicle, *ride, CurrentRideStation); - - rct_ride_entry* rideEntry = vehicle->GetRideEntry(); - CarEntry* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; - - Guard::Assert((Var37 & 3) < 3); - targetLoc.x += carEntry->peep_loading_waypoints[Var37 / 4][Var37 & 3].x; - targetLoc.y += carEntry->peep_loading_waypoints[Var37 / 4][Var37 & 3].y; - + targetLoc += carEntry.peep_loading_waypoints[carPosition][waypoint]; SetDestination(targetLoc); return; } @@ -4544,7 +4590,7 @@ void Guest::UpdateRideApproachExitWaypoints() int16_t shift_multiplier = 20; - auto rideEntry = get_ride_entry(ride->subtype); + auto rideEntry = GetRideEntryByIndex(ride->subtype); if (rideEntry != nullptr) { auto carEntry = &rideEntry->Cars[rideEntry->DefaultCar]; @@ -4569,7 +4615,7 @@ void Guest::UpdateRideApproachExitWaypoints() */ void Guest::UpdateRideApproachSpiralSlide() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4590,6 +4636,7 @@ void Guest::UpdateRideApproachSpiralSlide() return; } + [[maybe_unused]] const auto& rtd = ride->GetRideTypeDescriptor(); if (waypoint == 2) { bool lastRide = false; @@ -4599,7 +4646,7 @@ void Guest::UpdateRideApproachSpiralSlide() { if (ride->mode == RideMode::SingleRidePerAdmission) lastRide = true; - if (static_cast(CurrentCar - 1) > (scenario_rand() & 0xF)) + if (static_cast(CurrentCar - 1) > (ScenarioRand() & 0xF)) lastRide = true; } @@ -4607,10 +4654,15 @@ void Guest::UpdateRideApproachSpiralSlide() { auto exit = ride->GetStation(CurrentRideStation).Exit; waypoint = 1; - Var37 = (exit.direction * 4) | (Var37 & 0x30) | waypoint; + auto directionTemp = exit.direction; + if (exit.direction == INVALID_DIRECTION) + { + directionTemp = 0; + } + Var37 = (directionTemp * 4) | (Var37 & 0x30) | waypoint; CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; - assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); + assert(rtd.HasFlag(RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE)); targetLoc += SpiralSlideWalkingPath[Var37]; SetDestination(targetLoc); @@ -4624,7 +4676,7 @@ void Guest::UpdateRideApproachSpiralSlide() CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; - assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); + assert(rtd.HasFlag(RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE)); targetLoc += SpiralSlideWalkingPath[Var37]; SetDestination(targetLoc); @@ -4652,8 +4704,13 @@ static constexpr const CoordsXY _SpiralSlideEndWaypoint[] = { */ void Guest::UpdateRideOnSpiralSlide() { - auto ride = get_ride(CurrentRide); - if (ride == nullptr || ride->type != RIDE_TYPE_SPIRAL_SLIDE) + auto ride = GetRide(CurrentRide); + + if (ride == nullptr) + return; + + const auto& rtd = ride->GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE)) return; auto destination = GetDestination(); @@ -4673,7 +4730,7 @@ void Guest::UpdateRideOnSpiralSlide() return; ride->slide_in_use++; - ride->slide_peep = sprite_index; + ride->slide_peep = Id; ride->slide_peep_t_shirt_colour = TshirtColour; ride->spiral_slide_progress = 0; destination.x++; @@ -4718,7 +4775,6 @@ void Guest::UpdateRideOnSpiralSlide() CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; - assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); targetLoc += SpiralSlideWalkingPath[Var37]; SetDestination(targetLoc); @@ -4739,7 +4795,7 @@ void Guest::UpdateRideLeaveSpiralSlide() return; } - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4758,7 +4814,8 @@ void Guest::UpdateRideLeaveSpiralSlide() Var37--; CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; - assert(ride->type == RIDE_TYPE_SPIRAL_SLIDE); + [[maybe_unused]] const auto& rtd = ride->GetRideTypeDescriptor(); + assert(rtd.HasFlag(RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE)); targetLoc += SpiralSlideWalkingPath[Var37]; SetDestination(targetLoc); @@ -4812,7 +4869,7 @@ void Guest::UpdateRideMazePathfinding() return; } - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -4824,7 +4881,7 @@ void Guest::UpdateRideMazePathfinding() if (IsActionInterruptable()) { - if (Energy > 80 && !(PeepFlags & PEEP_FLAGS_SLOW_WALK) && !ClimateIsRaining() && (scenario_rand() & 0xFFFF) <= 2427) + if (Energy > 80 && !(PeepFlags & PEEP_FLAGS_SLOW_WALK) && !ClimateIsRaining() && (ScenarioRand() & 0xFFFF) <= 2427) { Action = PeepActionType::Jump; ActionFrame = 0; @@ -4866,7 +4923,7 @@ void Guest::UpdateRideMazePathfinding() hedges[openCount++] = mazeReverseLastEdge; } - uint8_t chosenEdge = hedges[scenario_rand() % openCount]; + uint8_t chosenEdge = hedges[ScenarioRand() % openCount]; assert(chosenEdge != 0xFF); targetLoc = GetDestination() + CoordsDirectionDelta[chosenEdge] / 2; @@ -4941,7 +4998,7 @@ void Guest::UpdateRideMazePathfinding() */ void Guest::UpdateRideLeaveExit() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (auto loc = UpdateAction(); loc.has_value()) { @@ -4952,7 +5009,7 @@ void Guest::UpdateRideLeaveExit() return; } - OnExitRide(ride); + OnExitRide(*ride); if (ride != nullptr && (PeepFlags & PEEP_FLAGS_TRACKING)) { @@ -4962,7 +5019,7 @@ void Guest::UpdateRideLeaveExit() if (gConfigNotifications.GuestLeftRide) { - News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_RIDE_X, sprite_index, ft); + News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_RIDE_X, Id, ft); } } @@ -5007,7 +5064,7 @@ void Guest::UpdateRideShopApproach() */ void Guest::UpdateRideShopInteract() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -5075,7 +5132,7 @@ void Guest::UpdateRideShopLeave() // #11758 Previously SetState(PeepState::Walking) caused Peeps to double-back to exit point of shop SetState(PeepState::Falling); - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ride->total_customers++; @@ -5205,8 +5262,8 @@ void Guest::UpdateRide() } } -static void peep_update_walking_break_scenery(Guest* peep); -static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToView, uint8_t* rideSeatToView); +static void PeepUpdateWalkingBreakScenery(Guest* peep); +static bool PeepFindRideToLookAt(Peep* peep, uint8_t edge, RideId* rideToView, uint8_t* rideSeatToView); /** * @@ -5219,7 +5276,7 @@ void Guest::UpdateWalking() if (!IsOnLevelCrossing()) { - if (PeepFlags & PEEP_FLAGS_WAVING && IsActionInterruptable() && (0xFFFF & scenario_rand()) < 936) + if (PeepFlags & PEEP_FLAGS_WAVING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::Wave2; ActionFrame = 0; @@ -5228,7 +5285,7 @@ void Guest::UpdateWalking() UpdateCurrentActionSpriteType(); } - if (PeepFlags & PEEP_FLAGS_PHOTO && IsActionInterruptable() && (0xFFFF & scenario_rand()) < 936) + if (PeepFlags & PEEP_FLAGS_PHOTO && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::TakePhoto; ActionFrame = 0; @@ -5237,7 +5294,7 @@ void Guest::UpdateWalking() UpdateCurrentActionSpriteType(); } - if (PeepFlags & PEEP_FLAGS_PAINTING && IsActionInterruptable() && (0xFFFF & scenario_rand()) < 936) + if (PeepFlags & PEEP_FLAGS_PAINTING && IsActionInterruptable() && (0xFFFF & ScenarioRand()) < 936) { Action = PeepActionType::DrawPicture; ActionFrame = 0; @@ -5251,7 +5308,7 @@ void Guest::UpdateWalking() { if (!GetNextIsSurface()) { - if ((0xFFFF & scenario_rand()) <= 4096) + if ((0xFFFF & ScenarioRand()) <= 4096) { static constexpr const Litter::Type litter_types[] = { Litter::Type::EmptyCan, @@ -5259,11 +5316,11 @@ void Guest::UpdateWalking() Litter::Type::BurgerBox, Litter::Type::EmptyCup, }; - auto litterType = litter_types[scenario_rand() & 0x3]; + auto litterType = litter_types[ScenarioRand() & 0x3]; const auto loc = GetLocation(); - int32_t litterX = loc.x + (scenario_rand() & 0x7) - 3; - int32_t litterY = loc.y + (scenario_rand() & 0x7) - 3; - Direction litterDirection = (scenario_rand() & 0x3); + int32_t litterX = loc.x + (ScenarioRand() & 0x7) - 3; + int32_t litterY = loc.y + (ScenarioRand() & 0x7) - 3; + Direction litterDirection = (ScenarioRand() & 0x3); Litter::Create({ litterX, litterY, loc.z, litterDirection }, litterType); } @@ -5271,10 +5328,10 @@ void Guest::UpdateWalking() } else if (HasEmptyContainer()) { - if ((!GetNextIsSurface()) && (static_cast(sprite_index.ToUnderlying() & 0x1FF) == (gCurrentTicks & 0x1FF)) - && ((0xFFFF & scenario_rand()) <= 4096)) + if ((!GetNextIsSurface()) && (static_cast(Id.ToUnderlying() & 0x1FF) == (gCurrentTicks & 0x1FF)) + && ((0xFFFF & ScenarioRand()) <= 4096)) { - int32_t container = bitscanforward(GetEmptyContainerFlags()); + int32_t container = UtilBitScanForward(GetEmptyContainerFlags()); auto litterType = Litter::Type::Vomit; if (container != -1) @@ -5288,9 +5345,9 @@ void Guest::UpdateWalking() UpdateSpriteType(); const auto loc = GetLocation(); - int32_t litterX = loc.x + (scenario_rand() & 0x7) - 3; - int32_t litterY = loc.y + (scenario_rand() & 0x7) - 3; - Direction litterDirection = (scenario_rand() & 0x3); + int32_t litterX = loc.x + (ScenarioRand() & 0x7) - 3; + int32_t litterY = loc.y + (ScenarioRand() & 0x7) - 3; + Direction litterDirection = (ScenarioRand() & 0x3); Litter::Create({ litterX, litterY, loc.z, litterDirection }, litterType); } @@ -5335,7 +5392,7 @@ void Guest::UpdateWalking() if (UpdateWalkingFindBin()) return; - peep_update_walking_break_scenery(this); + PeepUpdateWalkingBreakScenery(this); if (State != PeepState::Walking) return; @@ -5354,7 +5411,7 @@ void Guest::UpdateWalking() uint16_t chance = HasFoodOrDrink() ? 13107 : 2849; - if ((scenario_rand() & 0xFFFF) > chance) + if ((ScenarioRand() & 0xFFFF) > chance) return; if (GetNextIsSurface() || GetNextIsSloped()) @@ -5398,14 +5455,14 @@ void Guest::UpdateWalking() if (edges == 0) return; - uint8_t chosen_edge = scenario_rand() & 0x3; + uint8_t chosen_edge = ScenarioRand() & 0x3; for (; !(edges & (1 << chosen_edge));) chosen_edge = (chosen_edge + 1) & 3; RideId ride_to_view; uint8_t ride_seat_to_view; - if (IsOnLevelCrossing() || !peep_find_ride_to_look_at(this, chosen_edge, &ride_to_view, &ride_seat_to_view)) + if (IsOnLevelCrossing() || !PeepFindRideToLookAt(this, chosen_edge, &ride_to_view, &ride_seat_to_view)) return; // Check if there is a peep watching (and if there is place for us) @@ -5426,7 +5483,7 @@ void Guest::UpdateWalking() if (!positions_free) return; - uint8_t chosen_position = scenario_rand() & 0x3; + uint8_t chosen_position = ScenarioRand() & 0x3; for (; !(positions_free & (1 << chosen_position));) chosen_position = (chosen_position + 1) & 3; @@ -5469,7 +5526,7 @@ void Guest::UpdateWaitingAtCrossing() if (HasFoodOrDrink()) { - if ((scenario_rand() & 0xFFFF) <= 1310) + if ((ScenarioRand() & 0xFFFF) <= 1310) { Action = PeepActionType::EatFood; ActionFrame = 0; @@ -5481,7 +5538,7 @@ void Guest::UpdateWaitingAtCrossing() return; } - if ((scenario_rand() & 0xFFFF) <= 64) + if ((ScenarioRand() & 0xFFFF) <= 64) { Action = PeepActionType::Wave2; ActionFrame = 0; @@ -5502,7 +5559,7 @@ void Guest::UpdateQueuing() RemoveFromQueue(); return; } - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr || ride->status != RideStatus::Open) { RemoveFromQueue(); @@ -5545,7 +5602,7 @@ void Guest::UpdateQueuing() return; if (SpriteType == PeepSpriteType::Normal) { - if (TimeInQueue >= 2000 && (0xFFFF & scenario_rand()) <= 119) + if (TimeInQueue >= 2000 && (0xFFFF & ScenarioRand()) <= 119) { // Eat Food/Look at watch Action = PeepActionType::EatFood; @@ -5553,7 +5610,7 @@ void Guest::UpdateQueuing() ActionSpriteImageOffset = 0; UpdateCurrentActionSpriteType(); } - if (TimeInQueue >= 3500 && (0xFFFF & scenario_rand()) <= 93) + if (TimeInQueue >= 3500 && (0xFFFF & ScenarioRand()) <= 93) { // Create the I have been waiting in line ages thought InsertNewThought(PeepThoughtType::QueuingAges, CurrentRide); @@ -5601,7 +5658,7 @@ void Guest::UpdateQueuing() if (TimeInQueue < 4300) return; - if (Happiness <= 65 && (0xFFFF & scenario_rand()) < 2184) + if (Happiness <= 65 && (0xFFFF & ScenarioRand()) < 2184) { // Give up queueing for the ride sprite_direction ^= (1 << 4); @@ -5622,8 +5679,8 @@ void Guest::UpdateEnteringPark() PerformNextAction(pathingResult); if ((pathingResult & PATHING_OUTSIDE_PARK)) { - decrement_guests_heading_for_park(); - peep_sprite_remove(this); + DecrementGuestsHeadingForPark(); + PeepEntityRemove(this); } return; } @@ -5636,8 +5693,8 @@ void Guest::UpdateEnteringPark() OutsideOfPark = false; ParkEntryTime = gCurrentTicks; - increment_guests_in_park(); - decrement_guests_heading_for_park(); + IncrementGuestsInPark(); + DecrementGuestsHeadingForPark(); auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); ContextBroadcastIntent(&intent); } @@ -5654,7 +5711,7 @@ void Guest::UpdateLeavingPark() PerformNextAction(pathingResult); if (!(pathingResult & PATHING_OUTSIDE_PARK)) return; - peep_sprite_remove(this); + PeepEntityRemove(this); return; } @@ -5666,12 +5723,12 @@ void Guest::UpdateLeavingPark() OutsideOfPark = true; DestinationTolerance = 5; - decrement_guests_in_park(); + DecrementGuestsInPark(); auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); ContextBroadcastIntent(&intent); Var37 = 1; - window_invalidate_by_class(WindowClass::GuestList); + WindowInvalidateByClass(WindowClass::GuestList); uint8_t pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_OUTSIDE_PARK)) @@ -5723,7 +5780,7 @@ void Guest::UpdateWatching() { if (HasFoodOrDrink()) { - if ((scenario_rand() & 0xFFFF) <= 1310) + if ((ScenarioRand() & 0xFFFF) <= 1310) { Action = PeepActionType::EatFood; ActionFrame = 0; @@ -5733,7 +5790,7 @@ void Guest::UpdateWatching() } } - if ((scenario_rand() & 0xFFFF) <= 655) + if ((ScenarioRand() & 0xFFFF) <= 655) { Action = PeepActionType::TakePhoto; ActionFrame = 0; @@ -5744,7 +5801,7 @@ void Guest::UpdateWatching() if ((StandingFlags & 1)) { - if ((scenario_rand() & 0xFFFF) <= 655) + if ((ScenarioRand() & 0xFFFF) <= 655) { Action = PeepActionType::Wave; ActionFrame = 0; @@ -5850,7 +5907,7 @@ void Guest::UpdateUsingBin() // OpenRCT2 modification: This previously used // the tick count as a simple random function // switched to scenario_rand as it is more reliable - if ((scenario_rand() & 7) == 0) + if ((ScenarioRand() & 7) == 0) spaceLeftInBin--; RemoveItem(item); WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; @@ -5860,10 +5917,10 @@ void Guest::UpdateUsingBin() auto litterType = Litter::Type(GetShopItemDescriptor(item).Type); - int32_t litterX = x + (scenario_rand() & 7) - 3; - int32_t litterY = y + (scenario_rand() & 7) - 3; + int32_t litterX = x + (ScenarioRand() & 7) - 3; + int32_t litterY = y + (ScenarioRand() & 7) - 3; - Litter::Create({ litterX, litterY, z, static_cast(scenario_rand() & 3) }, litterType); + Litter::Create({ litterX, litterY, z, static_cast(ScenarioRand() & 3) }, litterType); RemoveItem(item); WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; @@ -5957,7 +6014,7 @@ bool Guest::UpdateWalkingFindBench() int32_t edges = pathElement->GetEdges() ^ 0xF; if (edges == 0) return false; - uint8_t chosen_edge = scenario_rand() & 0x3; + uint8_t chosen_edge = ScenarioRand() & 0x3; for (; !(edges & (1 << chosen_edge));) chosen_edge = (chosen_edge + 1) & 0x3; @@ -5985,7 +6042,7 @@ bool Guest::UpdateWalkingFindBench() free_edge ^= 0x3; if (!free_edge) { - if (scenario_rand() & 0x8000000) + if (ScenarioRand() & 0x8000000) free_edge = 1; } @@ -6046,7 +6103,7 @@ bool Guest::UpdateWalkingFindBin() if (edges == 0) return false; - uint8_t chosen_edge = scenario_rand() & 0x3; + uint8_t chosen_edge = ScenarioRand() & 0x3; // Note: Bin quantity is inverted 0 = full, 3 = empty uint8_t bin_quantities = pathElement->GetAdditionStatus(); @@ -6111,7 +6168,7 @@ static PathElement* FindBreakableElement(const CoordsXYZ& loc) * * rct2: 0x00690848 */ -static void peep_update_walking_break_scenery(Guest* peep) +static void PeepUpdateWalkingBreakScenery(Guest* peep) { if (gCheatsDisableVandalism) return; @@ -6128,7 +6185,7 @@ static void peep_update_walking_break_scenery(Guest* peep) if ((peep->LitterCount & 0xC0) != 0xC0 && (peep->DisgustingCount & 0xC0) != 0xC0) return; - if ((scenario_rand() & 0xFFFF) > 3276) + if ((ScenarioRand() & 0xFFFF) > 3276) return; } @@ -6184,17 +6241,17 @@ static void peep_update_walking_break_scenery(Guest* peep) * * @return (CF) */ -static bool peep_should_watch_ride(TileElement* tileElement) +static bool PeepShouldWatchRide(TileElement* tileElement) { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) return false; } - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr || !ride->IsRide()) { return false; @@ -6218,14 +6275,14 @@ static bool peep_should_watch_ride(TileElement* tileElement) if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT)) { - if ((scenario_rand() & 0xFFFF) > 0x3333) + if ((ScenarioRand() & 0xFFFF) > 0x3333) { return false; } } else if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SLIGHTLY_INTERESTING_TO_LOOK_AT)) { - if ((scenario_rand() & 0xFFFF) > 0x1000) + if ((ScenarioRand() & 0xFFFF) > 0x1000) { return false; } @@ -6238,9 +6295,9 @@ static bool peep_should_watch_ride(TileElement* tileElement) return true; } -bool loc_690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement) +bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement) { - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr) return false; @@ -6285,7 +6342,7 @@ bool loc_690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileEle * @param[out] rideSeatToView (ch) * @return !CF */ -static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToView, uint8_t* rideSeatToView) +static bool PeepFindRideToLookAt(Peep* peep, uint8_t edge, RideId* rideToView, uint8_t* rideSeatToView) { TileElement* tileElement; @@ -6301,7 +6358,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6340,7 +6397,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6367,7 +6424,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6380,9 +6437,9 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi if (tileElement->GetType() == TileElementType::Track) { - if (peep_should_watch_ride(tileElement)) + if (PeepShouldWatchRide(tileElement)) { - return loc_690FD0(peep, rideToView, rideSeatToView, tileElement); + return Loc690FD0(peep, rideToView, rideSeatToView, tileElement); } } @@ -6412,7 +6469,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6459,7 +6516,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6485,7 +6542,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6497,9 +6554,9 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi if (tileElement->GetType() == TileElementType::Track) { - if (peep_should_watch_ride(tileElement)) + if (PeepShouldWatchRide(tileElement)) { - return loc_690FD0(peep, rideToView, rideSeatToView, tileElement); + return Loc690FD0(peep, rideToView, rideSeatToView, tileElement); } } @@ -6529,7 +6586,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6575,7 +6632,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6601,7 +6658,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -6613,9 +6670,9 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi if (tileElement->GetType() == TileElementType::Track) { - if (peep_should_watch_ride(tileElement)) + if (PeepShouldWatchRide(tileElement)) { - return loc_690FD0(peep, rideToView, rideSeatToView, tileElement); + return Loc690FD0(peep, rideToView, rideSeatToView, tileElement); } } @@ -6679,14 +6736,14 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type) } } -struct item_pref_t +struct ItemPref { ShopItem item; PeepSpriteType sprite_type; }; // clang-format off -static item_pref_t item_order_preference[] = { +static ItemPref item_order_preference[] = { { ShopItem::IceCream, PeepSpriteType::IceCream }, { ShopItem::Chips, PeepSpriteType::Chips }, { ShopItem::Pizza, PeepSpriteType::Pizza }, @@ -6727,12 +6784,12 @@ static item_pref_t item_order_preference[] = { */ void Guest::UpdateSpriteType() { - if (SpriteType == PeepSpriteType::Balloon && (scenario_rand() & 0xFFFF) <= 327) + if (SpriteType == PeepSpriteType::Balloon && (ScenarioRand() & 0xFFFF) <= 327) { bool isBalloonPopped = false; if (x != LOCATION_NULL) { - if ((scenario_rand() & 0xFFFF) <= 13107) + if ((ScenarioRand() & 0xFFFF) <= 13107) { isBalloonPopped = true; OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::BalloonPop, { x, y, z }); @@ -6826,14 +6883,14 @@ bool Guest::HeadingForRideOrParkExit() const * argument_1 (esi & ebx) * argument_2 (esi+2) */ -void peep_thought_set_format_args(const PeepThought* thought, Formatter& ft) +void PeepThoughtSetFormatArgs(const PeepThought* thought, Formatter& ft) { ft.Add(PeepThoughts[EnumValue(thought->type)]); PeepThoughtToActionFlag flags = PeepThoughtToActionMap[EnumValue(thought->type)].flags; if (flags & PEEP_THOUGHT_ACTION_FLAG_RIDE) { - auto ride = get_ride(thought->rideId); + auto ride = GetRide(thought->rideId); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -7014,21 +7071,21 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->FavouriteRide = RideId::GetNull(); peep->FavouriteRideRating = 0; - const rct_sprite_bounds* spriteBounds = &GetSpriteBounds(peep->SpriteType, peep->ActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(peep->SpriteType, peep->ActionSpriteType); peep->sprite_width = spriteBounds->sprite_width; peep->sprite_height_negative = spriteBounds->sprite_height_negative; peep->sprite_height_positive = spriteBounds->sprite_height_positive; peep->MoveTo(coords); peep->sprite_direction = 0; - peep->Mass = (scenario_rand() & 0x1F) + 45; + peep->Mass = (ScenarioRand() & 0x1F) + 45; peep->PathCheckOptimisation = 0; peep->InteractionRideIndex = RideId::GetNull(); peep->PreviousRide = RideId::GetNull(); std::get<0>(peep->Thoughts).type = PeepThoughtType::None; peep->WindowInvalidateFlags = 0; - uint8_t intensityHighest = (scenario_rand() & 0x7) + 3; + uint8_t intensityHighest = (ScenarioRand() & 0x7) + 3; uint8_t intensityLowest = std::min(intensityHighest, static_cast(7)) - 3; if (intensityHighest >= 7) @@ -7057,7 +7114,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->Intensity = IntensityRange(intensityLowest, intensityHighest); - uint8_t nauseaTolerance = scenario_rand() & 0x7; + uint8_t nauseaTolerance = ScenarioRand() & 0x7; if (gParkFlags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) { nauseaTolerance += 4; @@ -7074,7 +7131,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) if (gGuestInitialHappiness == 0) peep->Happiness = 128; /* Initial value will vary by -15..16 */ - int8_t happinessDelta = (scenario_rand() & 0x1F) - 15; + int8_t happinessDelta = (ScenarioRand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ peep->Happiness = std::clamp(peep->Happiness + happinessDelta, 0, PEEP_MAX_HAPPINESS); peep->HappinessTarget = peep->Happiness; @@ -7086,7 +7143,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) * to any value 0..255. */ peep->Hunger = gGuestInitialHunger; /* Initial value will vary by -15..16 */ - int8_t hungerDelta = (scenario_rand() & 0x1F) - 15; + int8_t hungerDelta = (ScenarioRand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ peep->Hunger = std::clamp(peep->Hunger + hungerDelta, 0, PEEP_MAX_HUNGER); @@ -7095,7 +7152,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) * to any value 0..255. */ peep->Thirst = gGuestInitialThirst; /* Initial value will vary by -15..16 */ - int8_t thirstDelta = (scenario_rand() & 0x1F) - 15; + int8_t thirstDelta = (ScenarioRand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ peep->Thirst = std::clamp(peep->Thirst + thirstDelta, 0, PEEP_MAX_THIRST); @@ -7103,14 +7160,14 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->TimeToConsume = 0; peep->GuestNumRides = 0; - peep->Id = gNextGuestNumber++; + peep->PeepId = gNextGuestNumber++; peep->Name = nullptr; - money32 cash = (scenario_rand() & 0x3) * 100 - 100 + gGuestInitialCash; + money64 cash = (static_cast(ScenarioRand() & 0x3) * 100) - 100 + gGuestInitialCash; if (cash < 0) cash = 0; - if (gGuestInitialCash == 0) + if (gGuestInitialCash == 0.00_GBP) { cash = 500; } @@ -7120,7 +7177,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) cash = 0; } - if (gGuestInitialCash == MONEY16_UNDEFINED) + if (gGuestInitialCash == MONEY64_UNDEFINED) { cash = 0; } @@ -7146,19 +7203,19 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->Angriness = 0; peep->TimeLost = 0; - uint8_t tshirtColour = static_cast(scenario_rand() % std::size(tshirt_colours)); + uint8_t tshirtColour = static_cast(ScenarioRand() % std::size(tshirt_colours)); peep->TshirtColour = tshirt_colours[tshirtColour]; - uint8_t trousersColour = static_cast(scenario_rand() % std::size(trouser_colours)); + uint8_t trousersColour = static_cast(ScenarioRand() % std::size(trouser_colours)); peep->TrousersColour = trouser_colours[trousersColour]; /* Minimum energy is capped at 32 and maximum at 128, so this initialises * a peep with approx 34%-100% energy. (65 - 32) / (128 - 32) ≈ 34% */ - uint8_t energy = (scenario_rand() % 64) + 65; + uint8_t energy = (ScenarioRand() % 64) + 65; peep->Energy = energy; peep->EnergyTarget = energy; - increment_guests_heading_for_park(); + IncrementGuestsHeadingForPark(); #ifdef ENABLE_SCRIPTING auto& hookEngine = OpenRCT2::GetContext()->GetScriptEngine().GetHookEngine(); @@ -7168,7 +7225,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) // Create event args object auto obj = OpenRCT2::Scripting::DukObject(ctx); - obj.Set("id", peep->sprite_index.ToUnderlying()); + obj.Set("id", peep->Id.ToUnderlying()); // Call the subscriptions auto e = obj.Take(); @@ -7228,7 +7285,7 @@ static constexpr const int32_t face_sprite_large[] = { SPR_PEEP_LARGE_FACE_VERY_VERY_HAPPY, }; -static int32_t get_face_sprite_offset(Guest* peep) +static int32_t GetFaceSpriteOffset(Guest* peep) { // ANGRY if (peep->Angriness > 0) @@ -7268,18 +7325,18 @@ static int32_t get_face_sprite_offset(Guest* peep) * Function split into large and small sprite * rct2: 0x00698721 */ -int32_t get_peep_face_sprite_small(Guest* peep) +int32_t GetPeepFaceSpriteSmall(Guest* peep) { - return face_sprite_small[get_face_sprite_offset(peep)]; + return face_sprite_small[GetFaceSpriteOffset(peep)]; } /** * Function split into large and small sprite * rct2: 0x00698721 */ -int32_t get_peep_face_sprite_large(Guest* peep) +int32_t GetPeepFaceSpriteLarge(Guest* peep) { - return face_sprite_large[get_face_sprite_offset(peep)]; + return face_sprite_large[GetFaceSpriteOffset(peep)]; } /** @@ -7319,10 +7376,10 @@ bool Guest::UpdateQueuePosition(PeepActionType previous_action) return false; } - if (sprite_direction != guestNext->sprite_direction) + if (PeepDirection != guestNext->PeepDirection) return false; - switch (guestNext->sprite_direction / 8) + switch (guestNext->PeepDirection) { case 0: if (x >= guestNext->x) @@ -7362,7 +7419,7 @@ bool Guest::UpdateQueuePosition(PeepActionType previous_action) */ void Guest::RemoveFromQueue() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) return; @@ -7374,7 +7431,7 @@ void Guest::RemoveFromQueue() station.QueueLength--; } - if (sprite_index == station.LastPeepInQueue) + if (Id == station.LastPeepInQueue) { station.LastPeepInQueue = GuestNextInQueue; return; @@ -7383,12 +7440,12 @@ void Guest::RemoveFromQueue() auto* otherGuest = GetEntity(station.LastPeepInQueue); if (otherGuest == nullptr) { - log_error("Invalid Guest Queue list!"); + LOG_ERROR("Invalid Guest Queue list!"); return; } for (; otherGuest != nullptr; otherGuest = GetEntity(otherGuest->GuestNextInQueue)) { - if (sprite_index == otherGuest->GuestNextInQueue) + if (Id == otherGuest->GuestNextInQueue) { otherGuest->GuestNextInQueue = GuestNextInQueue; return; diff --git a/src/openrct2/entity/Guest.h b/src/openrct2/entity/Guest.h index ed98769b3f..9fb234e310 100644 --- a/src/openrct2/entity/Guest.h +++ b/src/openrct2/entity/Guest.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -267,11 +267,11 @@ public: RideId GuestHeadingToRideId; uint8_t GuestIsLostCountdown; uint8_t GuestTimeOnRide; - money16 PaidToEnter; - money16 PaidOnRides; - money16 PaidOnFood; - money16 PaidOnDrink; - money16 PaidOnSouvenirs; + money64 PaidToEnter; + money64 PaidOnRides; + money64 PaidOnFood; + money64 PaidOnDrink; + money64 PaidOnSouvenirs; bool OutsideOfPark; uint8_t Happiness; uint8_t HappinessTarget; @@ -284,8 +284,8 @@ public: IntensityRange Intensity{ 0 }; PeepNauseaTolerance NauseaTolerance; uint16_t TimeInQueue; - money32 CashInPocket; - money32 CashSpent; + money64 CashInPocket; + money64 CashSpent; RideId Photo1RideRef; RideId Photo2RideRef; RideId Photo3RideRef; @@ -327,25 +327,25 @@ public: bool HasDrink() const; bool HasFoodOrDrink() const; bool HasEmptyContainer() const; - void OnEnterRide(Ride* ride); - void OnExitRide(Ride* ride); + void OnEnterRide(Ride& ride); + void OnExitRide(Ride& ride); void UpdateSpriteType(); bool HeadingForRideOrParkExit() const; void StopPurchaseThought(ride_type_t rideType); void TryGetUpFromSitting(); bool ShouldRideWhileRaining(const Ride& ride); - void ChoseNotToGoOnRide(Ride* ride, bool peepAtRide, bool updateLastRide); + void ChoseNotToGoOnRide(const Ride& ride, bool peepAtRide, bool updateLastRide); void PickRideToGoOn(); void ReadMap(); - bool ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, bool thinking); - bool ShouldGoToShop(Ride* ride, bool peepAtShop); + bool ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, bool thinking); + bool ShouldGoToShop(Ride& ride, bool peepAtShop); bool ShouldFindBench(); bool UpdateWalkingFindBench(); bool UpdateWalkingFindBin(); - void SpendMoney(money16& peep_expend_type, money32 amount, ExpenditureType type); - void SpendMoney(money32 amount, ExpenditureType type); - void SetHasRidden(const Ride* ride); - bool HasRidden(const Ride* ride) const; + void SpendMoney(money64& peep_expend_type, money64 amount, ExpenditureType type); + void SpendMoney(money64 amount, ExpenditureType type); + void SetHasRidden(const Ride& ride); + bool HasRidden(const Ride& ride) const; void SetHasRiddenRideType(int32_t rideType); bool HasRiddenRideType(int32_t rideType) const; void SetParkEntryTime(int32_t entryTime); @@ -353,7 +353,7 @@ public: void CheckIfLost(); void CheckCantFindRide(); void CheckCantFindExit(); - bool DecideAndBuyItem(Ride* ride, ShopItem shopItem, money32 price); + bool DecideAndBuyItem(Ride& ride, ShopItem shopItem, money64 price); void SetSpriteType(PeepSpriteType new_sprite_type); void HandleEasterEggName(); int32_t GetEasterEggNameId() const; @@ -393,9 +393,9 @@ private: void UpdateRideAtEntrance(); void UpdateRideAdvanceThroughEntrance(); void UpdateRideLeaveEntranceWaypoints(const Ride& ride); - uint8_t GetWaypointedSeatLocation(const Ride& ride, CarEntry* vehicle_type, uint8_t track_direction) const; + uint8_t GetWaypointedSeatLocation(const Ride& ride, const CarEntry* vehicle_type, uint8_t track_direction) const; void UpdateRideFreeVehicleCheck(); - void UpdateRideFreeVehicleEnterRide(Ride* ride); + void UpdateRideFreeVehicleEnterRide(Ride& ride); void UpdateRideApproachVehicle(); void UpdateRideEnterVehicle(); void UpdateRideLeaveVehicle(); @@ -414,18 +414,17 @@ private: void UpdateRideShopInteract(); void UpdateRideShopLeave(); void UpdateRidePrepareForExit(); - void loc_68F9F3(); - void loc_68FA89(); + void Loc68F9F3(); + void Loc68FA89(); int32_t CheckEasterEggName(int32_t index) const; - bool GuestHasValidXY() const; void GivePassingPeepsPurpleClothes(Guest* passingPeep); void GivePassingPeepsPizza(Guest* passingPeep); void MakePassingPeepsSick(Guest* passingPeep); void GivePassingPeepsIceCream(Guest* passingPeep); Ride* FindBestRideToGoOn(); OpenRCT2::BitSet FindRidesToGoOn(); - bool FindVehicleToEnter(Ride* ride, std::vector& car_array); - void GoToRideEntrance(Ride* ride); + bool FindVehicleToEnter(const Ride& ride, std::vector& car_array); + void GoToRideEntrance(const Ride& ride); }; void UpdateRideApproachVehicleWaypointsMotionSimulator(Guest&, const CoordsXY&, int16_t&); @@ -466,23 +465,23 @@ extern uint32_t gNumGuestsInPark; extern uint32_t gNumGuestsInParkLastWeek; extern uint32_t gNumGuestsHeadingForPark; -extern money16 gGuestInitialCash; +extern money64 gGuestInitialCash; extern uint8_t gGuestInitialHappiness; extern uint8_t gGuestInitialHunger; extern uint8_t gGuestInitialThirst; extern uint32_t gNextGuestNumber; -void peep_thought_set_format_args(const PeepThought* thought, Formatter& ft); +void PeepThoughtSetFormatArgs(const PeepThought* thought, Formatter& ft); -void increment_guests_in_park(); -void increment_guests_heading_for_park(); -void decrement_guests_in_park(); -void decrement_guests_heading_for_park(); +void IncrementGuestsInPark(); +void IncrementGuestsHeadingForPark(); +void DecrementGuestsInPark(); +void DecrementGuestsHeadingForPark(); -void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc); -void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc); -void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride* ride, CoordsXYZD& entrance_loc); +void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc); +void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc); +void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc); CoordsXY GetGuestWaypointLocationDefault(const Vehicle& vehicle, const Ride& ride, const StationIndex& CurrentRideStation); CoordsXY GetGuestWaypointLocationEnterprise(const Vehicle& vehicle, const Ride& ride, const StationIndex& CurrentRideStation); diff --git a/src/openrct2/entity/Litter.cpp b/src/openrct2/entity/Litter.cpp index 973d511a22..699d9dc13e 100644 --- a/src/openrct2/entity/Litter.cpp +++ b/src/openrct2/entity/Litter.cpp @@ -16,7 +16,7 @@ template<> bool EntityBase::Is() const return Type == EntityType::Litter; } -static bool isLocationLitterable(const CoordsXYZ& mapPos) +static bool IsLocationLitterable(const CoordsXYZ& mapPos) { TileElement* tileElement; @@ -53,7 +53,7 @@ void Litter::Create(const CoordsXYZD& litterPos, Type type) + CoordsXY{ CoordsDirectionDelta[litterPos.direction >> 3].x / 8, CoordsDirectionDelta[litterPos.direction >> 3].y / 8 }; - if (!isLocationLitterable(offsetLitterPos)) + if (!IsLocationLitterable(offsetLitterPos)) return; if (GetEntityListCount(EntityType::Litter) >= 500) @@ -174,7 +174,7 @@ void Litter::Paint(PaintSession& session, int32_t imageDirection) const { PROFILED_FUNCTION(); - rct_drawpixelinfo& dpi = session.DPI; + DrawPixelInfo& dpi = session.DPI; if (dpi.zoom_level > ZoomLevel{ 0 }) return; // If zoomed at all no litter drawn diff --git a/src/openrct2/entity/Litter.h b/src/openrct2/entity/Litter.h index 5ba13df9de..b10657005f 100644 --- a/src/openrct2/entity/Litter.h +++ b/src/openrct2/entity/Litter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/MoneyEffect.cpp b/src/openrct2/entity/MoneyEffect.cpp index 67778888b4..b72f87f97d 100644 --- a/src/openrct2/entity/MoneyEffect.cpp +++ b/src/openrct2/entity/MoneyEffect.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,10 +9,12 @@ #include "MoneyEffect.h" #include "../OpenRCT2.h" +#include "../config/Config.h" #include "../core/DataSerialiser.h" #include "../drawing/Drawing.h" #include "../interface/Viewport.h" #include "../interface/Window.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../network/network.h" #include "../paint/Paint.h" @@ -36,7 +38,7 @@ template<> bool EntityBase::Is() const * * rct2: 0x0067351F */ -void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool vertical) +void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool guestPurchase) { if (value == 0.00_GBP) return; @@ -46,7 +48,7 @@ void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool verti return; moneyEffect->Value = value; - moneyEffect->Vertical = (vertical ? 1 : 0); + moneyEffect->GuestPurchase = (guestPurchase ? 1 : 0); moneyEffect->sprite_width = 64; moneyEffect->sprite_height_negative = 20; moneyEffect->sprite_height_positive = 30; @@ -59,8 +61,8 @@ void MoneyEffect::CreateAt(money64 value, const CoordsXYZ& effectPos, bool verti { auto [stringId, newValue] = moneyEffect->GetStringId(); char buffer[128]; - format_string(buffer, 128, stringId, &newValue); - offsetX = -(gfx_get_string_width(buffer, FontStyle::Medium) / 2); + OpenRCT2::FormatStringLegacy(buffer, 128, stringId, &newValue); + offsetX = -(GfxGetStringWidth(buffer, FontStyle::Medium) / 2); } moneyEffect->OffsetX = offsetX; moneyEffect->Wiggle = 0; @@ -77,18 +79,18 @@ void MoneyEffect::Create(money64 value, const CoordsXYZ& loc) { // If game actions return no valid location of the action we can not use the screen // coordinates as every client will have different ones. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { - log_warning("Attempted to create money effect without a valid location in multiplayer"); + LOG_WARNING("Attempted to create money effect without a valid location in multiplayer"); return; } - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow == nullptr) return; - rct_viewport* mainViewport = window_get_viewport(mainWindow); - auto mapPositionXY = screen_get_map_xy( + Viewport* mainViewport = WindowGetViewport(mainWindow); + auto mapPositionXY = ScreenGetMapXY( { mainViewport->pos.x + (mainViewport->width / 2), mainViewport->pos.y + (mainViewport->height / 2) }, nullptr); if (!mapPositionXY.has_value()) return; @@ -122,12 +124,12 @@ void MoneyEffect::Update() int32_t newZ = z; MoveDelay = 0; - if (Vertical) + if (GuestPurchase) { newZ += 1; } - newY += _moneyEffectMoveOffset[get_current_rotation()].y; - newX += _moneyEffectMoveOffset[get_current_rotation()].x; + newY += _moneyEffectMoveOffset[GetCurrentRotation()].y; + newX += _moneyEffectMoveOffset[GetCurrentRotation()].x; MoveTo({ newX, newY, newZ }); @@ -142,8 +144,8 @@ void MoneyEffect::Update() std::pair MoneyEffect::GetStringId() const { - StringId spentStringId = Vertical ? STR_MONEY_EFFECT_SPEND_HIGHP : STR_MONEY_EFFECT_SPEND; - StringId receiveStringId = Vertical ? STR_MONEY_EFFECT_RECEIVE_HIGHP : STR_MONEY_EFFECT_RECEIVE; + StringId spentStringId = GuestPurchase ? STR_MONEY_EFFECT_SPEND_HIGHP : STR_MONEY_EFFECT_SPEND; + StringId receiveStringId = GuestPurchase ? STR_MONEY_EFFECT_RECEIVE_HIGHP : STR_MONEY_EFFECT_RECEIVE; StringId stringId = receiveStringId; money64 outValue = Value; if (Value < 0) @@ -161,7 +163,7 @@ void MoneyEffect::Serialise(DataSerialiser& stream) stream << frame; stream << MoveDelay; stream << NumMovements; - stream << Vertical; + stream << GuestPurchase; stream << Value; stream << OffsetX; stream << Wiggle; @@ -171,7 +173,19 @@ void MoneyEffect::Paint(PaintSession& session, int32_t imageDirection) const { PROFILED_FUNCTION(); - rct_drawpixelinfo& dpi = session.DPI; + if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + { + // Don't render any money in the title screen. + return; + } + + if (GuestPurchase && !gConfigGeneral.ShowGuestPurchases) + { + // Don't show the money effect for guest purchases when the option is disabled. + return; + } + + DrawPixelInfo& dpi = session.DPI; if (dpi.zoom_level > ZoomLevel{ 0 }) { return; diff --git a/src/openrct2/entity/MoneyEffect.h b/src/openrct2/entity/MoneyEffect.h index c7a0738764..4f743613ab 100644 --- a/src/openrct2/entity/MoneyEffect.h +++ b/src/openrct2/entity/MoneyEffect.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,12 +22,12 @@ struct MoneyEffect : EntityBase uint16_t frame; uint16_t MoveDelay; uint8_t NumMovements; - uint8_t Vertical; + uint8_t GuestPurchase; money64 Value; int16_t OffsetX; uint16_t Wiggle; - static void CreateAt(money64 value, const CoordsXYZ& effectPos, bool vertical); + static void CreateAt(money64 value, const CoordsXYZ& effectPos, bool guestPurchase); static void Create(money64 value, const CoordsXYZ& loc); void Update(); std::pair GetStringId() const; diff --git a/src/openrct2/entity/Particle.cpp b/src/openrct2/entity/Particle.cpp index 94db19ca2f..99f76b5f3e 100644 --- a/src/openrct2/entity/Particle.cpp +++ b/src/openrct2/entity/Particle.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -63,12 +63,12 @@ void VehicleCrashParticle::Create(VehicleColour& colours, const CoordsXYZ& vehic sprite->sprite_height_positive = 8; sprite->MoveTo(vehiclePos); - sprite->frame = (scenario_rand() & 0xFF) * 12; - sprite->time_to_live = (scenario_rand() & 0x7F) + 140; - sprite->crashed_sprite_base = scenario_rand_max(static_cast(std::size(_VehicleCrashParticleSprites))); - sprite->acceleration_x = (static_cast(scenario_rand() & 0xFFFF)) * 4; - sprite->acceleration_y = (static_cast(scenario_rand() & 0xFFFF)) * 4; - sprite->acceleration_z = (scenario_rand() & 0xFFFF) * 4 + 0x10000; + 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; @@ -155,7 +155,7 @@ void VehicleCrashParticle::Paint(PaintSession& session, int32_t imageDirection) { PROFILED_FUNCTION(); - rct_drawpixelinfo& dpi = session.DPI; + DrawPixelInfo& dpi = session.DPI; if (dpi.zoom_level > ZoomLevel{ 0 }) { return; diff --git a/src/openrct2/entity/Particle.h b/src/openrct2/entity/Particle.h index 23c0b068b7..adce428a1c 100644 --- a/src/openrct2/entity/Particle.h +++ b/src/openrct2/entity/Particle.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/PatrolArea.cpp b/src/openrct2/entity/PatrolArea.cpp index 95405958c5..edcd0bc295 100644 --- a/src/openrct2/entity/PatrolArea.cpp +++ b/src/openrct2/entity/PatrolArea.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -57,7 +57,7 @@ bool PatrolArea::Get(const TileCoordsXY& pos) const if (area == nullptr) return false; - auto it = binary_find(area->SortedTiles.begin(), area->SortedTiles.end(), pos, CompareTileCoordsXY); + auto it = BinaryFind(area->SortedTiles.begin(), area->SortedTiles.end(), pos, CompareTileCoordsXY); auto found = it != area->SortedTiles.end(); return found; } diff --git a/src/openrct2/entity/PatrolArea.h b/src/openrct2/entity/PatrolArea.h index 222249a061..3d98aec790 100644 --- a/src/openrct2/entity/PatrolArea.h +++ b/src/openrct2/entity/PatrolArea.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 9534596bf2..9c51a3927c 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,6 +26,7 @@ #include "../entity/EntityTweener.h" #include "../interface/Window.h" #include "../localisation/Formatter.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../management/Marketing.h" @@ -47,11 +48,9 @@ #include "../world/ConstructionClearance.h" #include "../world/Entrance.h" #include "../world/Footpath.h" -#include "../world/LargeScenery.h" #include "../world/Map.h" #include "../world/Park.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "PatrolArea.h" #include "Staff.h" @@ -70,7 +69,7 @@ uint32_t gNumGuestsInPark; uint32_t gNumGuestsInParkLastWeek; uint32_t gNumGuestsHeadingForPark; -money16 gGuestInitialCash; +money64 gGuestInitialCash; uint8_t gGuestInitialHappiness; uint8_t gGuestInitialHunger; uint8_t gGuestInitialThirst; @@ -86,8 +85,8 @@ static TileElement* _peepRideEntranceExitElement; static std::shared_ptr _crowdSoundChannel = nullptr; -static void peep_128_tick_update(Peep* peep, int32_t index); -static void peep_release_balloon(Guest* peep, int16_t spawn_height); +static void Peep128TickUpdate(Peep* peep, int32_t index); +static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height); static PeepActionSpriteType PeepSpecialSpriteToSpriteTypeMap[] = { PeepActionSpriteType::None, @@ -196,7 +195,7 @@ bool Peep::CanBePickedUp() const return false; } -int32_t peep_get_staff_count() +int32_t PeepGetStaffCount() { return GetEntityListCount(EntityType::Staff); } @@ -205,7 +204,7 @@ int32_t peep_get_staff_count() * * rct2: 0x0068F0A9 */ -void peep_update_all() +void PeepUpdateAll() { PROFILED_FUNCTION(); @@ -222,7 +221,7 @@ void peep_update_all() } else { - peep_128_tick_update(peep, i); + Peep128TickUpdate(peep, i); // 128 tick can delete so double check its not deleted if (peep->Type == EntityType::Guest) { @@ -241,7 +240,7 @@ void peep_update_all() } else { - peep_128_tick_update(staff, i); + Peep128TickUpdate(staff, i); // 128 tick can delete so double check its not deleted if (staff->Type == EntityType::Staff) { @@ -258,7 +257,7 @@ void peep_update_all() * rct2: 0x0068F41A * Called every 128 ticks */ -static void peep_128_tick_update(Peep* peep, int32_t index) +static void Peep128TickUpdate(Peep* peep, int32_t index) { PROFILED_FUNCTION(); @@ -286,7 +285,7 @@ bool Peep::CheckForPath() PROFILED_FUNCTION(); PathCheckOptimisation++; - if ((PathCheckOptimisation & 0xF) != (sprite_index.ToUnderlying() & 0xF)) + if ((PathCheckOptimisation & 0xF) != (Id.ToUnderlying() & 0xF)) { // This condition makes the check happen less often // As a side effect peeps hover for a short, @@ -387,7 +386,7 @@ void Peep::UpdateCurrentActionSpriteType() Invalidate(); ActionSpriteType = newActionSpriteType; - const rct_sprite_bounds* spriteBounds = &GetSpriteBounds(SpriteType, ActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, ActionSpriteType); sprite_width = spriteBounds->sprite_width; sprite_height_negative = spriteBounds->sprite_height_negative; sprite_height_positive = spriteBounds->sprite_height_positive; @@ -483,7 +482,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) CoordsXY loc = { x, y }; loc += word_981D7C[nextDirection / 8]; WalkingFrameNum++; - const rct_peep_animation* peepAnimation = &GetPeepAnimation(SpriteType); + const PeepAnimation* peepAnimation = &GetPeepAnimation(SpriteType); const uint8_t* imageOffset = peepAnimation[EnumValue(ActionSpriteType)].frame_offsets; if (WalkingFrameNum >= peepAnimation[EnumValue(ActionSpriteType)].num_frames) { @@ -493,7 +492,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) return loc; } - const rct_peep_animation* peepAnimation = &GetPeepAnimation(SpriteType); + const PeepAnimation* peepAnimation = &GetPeepAnimation(SpriteType); ActionFrame++; // If last frame of action @@ -525,8 +524,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_2; const auto curLoc = GetLocation(); - Litter::Create( - { curLoc, sprite_direction }, (sprite_index.ToUnderlying() & 1) ? Litter::Type::VomitAlt : Litter::Type::Vomit); + Litter::Create({ curLoc, sprite_direction }, (Id.ToUnderlying() & 1) ? Litter::Type::VomitAlt : Litter::Type::Vomit); static constexpr OpenRCT2::Audio::SoundId coughs[4] = { OpenRCT2::Audio::SoundId::Cough1, @@ -534,7 +532,7 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) OpenRCT2::Audio::SoundId::Cough3, OpenRCT2::Audio::SoundId::Cough4, }; - auto soundId = coughs[scenario_rand() & 3]; + auto soundId = coughs[ScenarioRand() & 3]; OpenRCT2::Audio::Play3D(soundId, curLoc); return { { x, y } }; @@ -544,11 +542,11 @@ std::optional Peep::UpdateAction(int16_t& xy_distance) * rct2: 0x0069A409 * Decreases rider count if on/entering a ride. */ -void peep_decrement_num_riders(Peep* peep) +void PeepDecrementNumRiders(Peep* peep) { if (peep->State == PeepState::OnRide || peep->State == PeepState::EnteringRide) { - auto ride = get_ride(peep->CurrentRide); + auto ride = GetRide(peep->CurrentRide); if (ride != nullptr) { ride->num_riders = std::max(0, ride->num_riders - 1); @@ -562,17 +560,17 @@ void peep_decrement_num_riders(Peep* peep) * Note also increase ride count if on/entering a ride. * rct2: 0x0069A42F */ -void peep_window_state_update(Peep* peep) +void PeepWindowStateUpdate(Peep* peep) { - rct_window* w = window_find_by_number(WindowClass::Peep, peep->sprite_index.ToUnderlying()); + WindowBase* w = WindowFindByNumber(WindowClass::Peep, peep->Id.ToUnderlying()); if (w != nullptr) - window_event_invalidate_call(w); + WindowEventInvalidateCall(w); if (peep->Is()) { if (peep->State == PeepState::OnRide || peep->State == PeepState::EnteringRide) { - auto ride = get_ride(peep->CurrentRide); + auto ride = GetRide(peep->CurrentRide); if (ride != nullptr) { ride->num_riders++; @@ -580,13 +578,13 @@ void peep_window_state_update(Peep* peep) } } - window_invalidate_by_number(WindowClass::Peep, peep->sprite_index); - window_invalidate_by_class(WindowClass::GuestList); + WindowInvalidateByNumber(WindowClass::Peep, peep->Id); + WindowInvalidateByClass(WindowClass::GuestList); } else { - window_invalidate_by_number(WindowClass::Peep, peep->sprite_index); - window_invalidate_by_class(WindowClass::StaffList); + WindowInvalidateByNumber(WindowClass::Peep, peep->Id); + WindowInvalidateByClass(WindowClass::StaffList); } } @@ -683,7 +681,7 @@ GameActions::Result Peep::Place(const TileCoordsXYZ& location, bool apply) * * rct2: 0x0069A535 */ -void peep_sprite_remove(Peep* peep) +void PeepEntityRemove(Peep* peep) { auto* guest = peep->As(); if (guest != nullptr) @@ -692,23 +690,23 @@ void peep_sprite_remove(Peep* peep) } peep->Invalidate(); - window_close_by_number(WindowClass::Peep, peep->sprite_index); + WindowCloseByNumber(WindowClass::Peep, peep->Id); - window_close_by_number(WindowClass::FirePrompt, EnumValue(peep->Type)); + WindowCloseByNumber(WindowClass::FirePrompt, EnumValue(peep->Type)); auto* staff = peep->As(); // Needed for invalidations after sprite removal bool wasGuest = staff == nullptr; if (wasGuest) { - News::DisableNewsItems(News::ItemType::PeepOnRide, peep->sprite_index.ToUnderlying()); + News::DisableNewsItems(News::ItemType::PeepOnRide, peep->Id.ToUnderlying()); } else { staff->ClearPatrolArea(); UpdateConsolidatedPatrolAreas(); - News::DisableNewsItems(News::ItemType::Peep, staff->sprite_index.ToUnderlying()); + News::DisableNewsItems(News::ItemType::Peep, staff->Id.ToUnderlying()); } EntityRemove(peep); @@ -726,16 +724,16 @@ void Peep::Remove() { if (!guest->OutsideOfPark) { - decrement_guests_in_park(); + DecrementGuestsInPark(); auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); ContextBroadcastIntent(&intent); } if (State == PeepState::EnteringPark) { - decrement_guests_heading_for_park(); + DecrementGuestsHeadingForPark(); } } - peep_sprite_remove(this); + PeepEntityRemove(this); } /** @@ -803,7 +801,7 @@ void Peep::UpdateFalling() if (guest != nullptr) { // Drop balloon if held - peep_release_balloon(guest, height); + GuestReleaseBalloon(guest, height); guest->InsertNewThought(PeepThoughtType::Drowning); } @@ -812,7 +810,7 @@ void Peep::UpdateFalling() ActionSpriteImageOffset = 0; UpdateCurrentActionSpriteType(); - peep_window_state_update(this); + PeepWindowStateUpdate(this); return; } } @@ -879,9 +877,9 @@ void Peep::Update1() void Peep::SetState(PeepState new_state) { - peep_decrement_num_riders(this); + PeepDecrementNumRiders(this); State = new_state; - peep_window_state_update(this); + PeepWindowStateUpdate(this); } /** @@ -901,7 +899,7 @@ void Peep::UpdatePicked() } /* From peep_update */ -static void peep_update_thoughts(Guest* peep) +static void GuestUpdateThoughts(Guest* peep) { // Thoughts must always have a gap of at least // 220 ticks in age between them. In order to @@ -973,7 +971,7 @@ void Peep::Update() if (++guest->PreviousRideTimeOut >= 720) guest->PreviousRide = RideId::GetNull(); - peep_update_thoughts(guest); + GuestUpdateThoughts(guest); } // Walking speed logic @@ -1004,7 +1002,7 @@ void Peep::Update() } else { - // loc_68FD2F + // Loc68FD2F switch (State) { case PeepState::Falling: @@ -1047,7 +1045,7 @@ void Peep::Update() * * rct2: 0x0069BF41 */ -void peep_problem_warnings_update() +void PeepProblemWarningsUpdate() { Ride* ride; uint32_t hungerCounter = 0, lostCounter = 0, noexitCounter = 0, thirstCounter = 0, litterCounter = 0, disgustCounter = 0, @@ -1081,7 +1079,7 @@ void peep_problem_warnings_update() hungerCounter++; break; } - ride = get_ride(peep->GuestHeadingToRideId); + ride = GetRide(peep->GuestHeadingToRideId); if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) hungerCounter++; break; @@ -1092,7 +1090,7 @@ void peep_problem_warnings_update() thirstCounter++; break; } - ride = get_ride(peep->GuestHeadingToRideId); + ride = GetRide(peep->GuestHeadingToRideId); if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SELLS_DRINKS)) thirstCounter++; break; @@ -1103,7 +1101,7 @@ void peep_problem_warnings_update() toiletCounter++; break; } - ride = get_ride(peep->GuestHeadingToRideId); + ride = GetRide(peep->GuestHeadingToRideId); if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_TOILET)) toiletCounter++; break; @@ -1239,7 +1237,7 @@ void peep_problem_warnings_update() } } -void peep_stop_crowd_noise() +void PeepStopCrowdNoise() { if (_crowdSoundChannel != nullptr) { @@ -1252,7 +1250,7 @@ void peep_stop_crowd_noise() * * rct2: 0x006BD18A */ -void peep_update_crowd_noise() +void PeepUpdateCrowdNoise() { PROFILED_FUNCTION(); @@ -1332,7 +1330,7 @@ void peep_update_crowd_noise() * * rct2: 0x0069BE9B */ -void peep_applause() +void PeepApplause() { for (auto peep : EntityList()) { @@ -1340,7 +1338,7 @@ void peep_applause() continue; // Release balloon - peep_release_balloon(peep, peep->z + 9); + GuestReleaseBalloon(peep, peep->z + 9); // Clap if ((peep->State == PeepState::Walking || peep->State == PeepState::Queuing) && peep->IsActionInterruptable()) @@ -1360,7 +1358,7 @@ void peep_applause() * * rct2: 0x0069C35E */ -void peep_update_days_in_queue() +void PeepUpdateDaysInQueue() { for (auto peep : EntityList()) { @@ -1388,7 +1386,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::LeavingRide: case PeepState::EnteringRide: { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ft.Add(ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IN_RIDE) ? STR_IN_RIDE : STR_ON_RIDE); @@ -1403,7 +1401,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::Buying: { ft.Add(STR_AT_RIDE); - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -1422,7 +1420,7 @@ void Peep::FormatActionTo(Formatter& ft) const { if (!guest->GuestHeadingToRideId.IsNull()) { - auto ride = get_ride(guest->GuestHeadingToRideId); + auto ride = GetRide(guest->GuestHeadingToRideId); if (ride != nullptr) { ft.Add(STR_HEADING_FOR); @@ -1439,7 +1437,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::QueuingFront: case PeepState::Queuing: { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ft.Add(STR_QUEUING_FOR); @@ -1453,7 +1451,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::Watching: if (!CurrentRide.IsNull()) { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ft.Add((StandingFlags & 0x1) ? STR_WATCHING_CONSTRUCTION_OF : STR_WATCHING_RIDE); @@ -1497,7 +1495,7 @@ void Peep::FormatActionTo(Formatter& ft) const else { ft.Add(STR_RESPONDING_TO_RIDE_BREAKDOWN_CALL); - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -1511,7 +1509,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::Fixing: { ft.Add(STR_FIXING_RIDE); - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -1525,7 +1523,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::HeadingToInspection: { ft.Add(STR_HEADING_TO_RIDE_FOR_INSPECTION); - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -1539,7 +1537,7 @@ void Peep::FormatActionTo(Formatter& ft) const case PeepState::Inspecting: { ft.Add(STR_INSPECTING_RIDE); - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -1574,16 +1572,16 @@ void Peep::FormatNameTo(Formatter& ft) const } ft.Add(_staffNames[staffNameIndex]); - ft.Add(Id); + ft.Add(PeepId); } else if (gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES) { - auto realNameStringId = get_real_name_string_id_from_id(Id); + auto realNameStringId = GetRealNameStringIDFromPeepID(PeepId); ft.Add(realNameStringId); } else { - ft.Add(STR_GUEST_X).Add(Id); + ft.Add(STR_GUEST_X).Add(PeepId); } } else @@ -1596,7 +1594,7 @@ std::string Peep::GetName() const { Formatter ft; FormatNameTo(ft); - return format_string(STR_STRINGID, ft.Data()); + return FormatStringID(STR_STRINGID, ft.Data()); } bool Peep::SetName(std::string_view value) @@ -1635,14 +1633,14 @@ bool Peep::IsActionInterruptable() const return IsActionIdle() || IsActionWalking(); } -void peep_set_map_tooltip(Peep* peep) +void PeepSetMapTooltip(Peep* peep) { auto ft = Formatter(); auto* guest = peep->As(); if (guest != nullptr) { ft.Add((peep->PeepFlags & PEEP_FLAGS_TRACKING) ? STR_TRACKED_GUEST_MAP_TIP : STR_GUEST_MAP_TIP); - ft.Add(get_peep_face_sprite_small(guest)); + ft.Add(GetPeepFaceSpriteSmall(guest)); guest->FormatNameTo(ft); guest->FormatActionTo(ft); } @@ -1654,7 +1652,7 @@ void peep_set_map_tooltip(Peep* peep) } auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } @@ -1668,7 +1666,7 @@ void Peep::SwitchNextActionSpriteType() { Invalidate(); ActionSpriteType = NextActionSpriteType; - const rct_sprite_bounds* spriteBounds = &GetSpriteBounds(SpriteType, NextActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(SpriteType, NextActionSpriteType); sprite_width = spriteBounds->sprite_width; sprite_height_negative = spriteBounds->sprite_height_negative; sprite_height_positive = spriteBounds->sprite_height_positive; @@ -1680,7 +1678,7 @@ void Peep::SwitchNextActionSpriteType() * * rct2: 0x00693EF2 */ -static void peep_return_to_centre_of_tile(Peep* peep) +static void PeepReturnToCentreOfTile(Peep* peep) { peep->PeepDirection = DirectionReverse(peep->PeepDirection); auto destination = peep->GetLocation().ToTileCentre(); @@ -1691,7 +1689,7 @@ static void peep_return_to_centre_of_tile(Peep* peep) * * rct2: 0x00693f2C */ -static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uint8_t& pathing_result) +static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_t& pathing_result) { auto tile_element = coords.element; uint8_t entranceType = tile_element->AsEntrance()->GetEntranceType(); @@ -1725,13 +1723,13 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin // Default guest/staff behaviour attempting to enter a // ride exit is to turn around. peep->InteractionRideIndex = RideId::GetNull(); - peep_return_to_centre_of_tile(peep); + PeepReturnToCentreOfTile(peep); return true; } if (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -1741,7 +1739,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin // Default staff behaviour attempting to enter a // ride entrance is to turn around. peep->InteractionRideIndex = RideId::GetNull(); - peep_return_to_centre_of_tile(peep); + PeepReturnToCentreOfTile(peep); return true; } @@ -1760,7 +1758,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin // the path tile and without trying any other ride // attached to this path tile. i.e. stick with the // peeps previous decision not to go on the ride. - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1769,12 +1767,12 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin // Guest walks up to the ride for the first time since entering // the path tile or since considering another ride attached to // the path tile. - if (!guest->ShouldGoOnRide(ride, stationNum, false, false)) + if (!guest->ShouldGoOnRide(*ride, stationNum, false, false)) { // Peep remembers that this is the last ride they // considered while on this path tile. guest->InteractionRideIndex = rideIndex; - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1784,7 +1782,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin auto& station = ride->GetStation(stationNum); auto previous_last = station.LastPeepInQueue; - station.LastPeepInQueue = guest->sprite_index; + station.LastPeepInQueue = guest->Id; guest->GuestNextInQueue = previous_last; station.QueueLength++; @@ -1801,8 +1799,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin ride->FormatNameTo(ft); if (gConfigNotifications.GuestQueuingForRide) { - News::AddItemToQueue( - News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->sprite_index, ft); + News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); } } } @@ -1813,14 +1810,14 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin if (guest == nullptr) { // Staff cannot leave the park, so go back. - peep_return_to_centre_of_tile(peep); + PeepReturnToCentreOfTile(peep); return true; } // If not the centre of the entrance arch if (tile_element->AsEntrance()->GetSequenceIndex() != 0) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1829,14 +1826,14 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin { if (DirectionReverse(entranceDirection) != guest->PeepDirection) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } // Peep is leaving the park. if (guest->State != PeepState::Walking) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1845,7 +1842,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin // If the park is open and leaving flag isn't set return to centre if (gParkFlags & PARK_FLAGS_PARK_OPEN) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } } @@ -1862,7 +1859,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin guest->FormatNameTo(ft); if (gConfigNotifications.GuestLeftPark) { - News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_PARK, guest->sprite_index, ft); + News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_LEFT_PARK, guest->Id, ft); } } return true; @@ -1872,7 +1869,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin if (guest->State != PeepState::EnteringPark) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1880,9 +1877,9 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin { guest->State = PeepState::LeavingPark; guest->Var37 = 1; - decrement_guests_heading_for_park(); - peep_window_state_update(guest); - peep_return_to_centre_of_tile(guest); + DecrementGuestsHeadingForPark(); + PeepWindowStateUpdate(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1912,7 +1909,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin uint8_t slopeDirection = nextTileElement->AsPath()->GetSlopeDirection(); if (slopeDirection == entranceDirection) { - if (z != nextTileElement->base_height) + if (z != nextTileElement->BaseHeight) { continue; } @@ -1923,13 +1920,13 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin if (DirectionReverse(slopeDirection) != entranceDirection) continue; - if (z - 2 != nextTileElement->base_height) + if (z - 2 != nextTileElement->BaseHeight) continue; found = true; break; } - if (z != nextTileElement->base_height) + if (z != nextTileElement->BaseHeight) { continue; } @@ -1942,13 +1939,13 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin { guest->State = PeepState::LeavingPark; guest->Var37 = 1; - decrement_guests_heading_for_park(); - peep_window_state_update(guest); - peep_return_to_centre_of_tile(guest); + DecrementGuestsHeadingForPark(); + PeepWindowStateUpdate(guest); + PeepReturnToCentreOfTile(guest); return true; } - money16 entranceFee = ParkGetEntranceFee(); + auto entranceFee = ParkGetEntranceFee(); if (entranceFee != 0) { if (guest->HasItem(ShopItem::Voucher)) @@ -1970,9 +1967,9 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin { guest->State = PeepState::LeavingPark; guest->Var37 = 1; - decrement_guests_heading_for_park(); - peep_window_state_update(guest); - peep_return_to_centre_of_tile(guest); + DecrementGuestsHeadingForPark(); + PeepWindowStateUpdate(guest); + PeepReturnToCentreOfTile(guest); return true; } @@ -1982,7 +1979,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin } gTotalAdmissions++; - window_invalidate_by_number(WindowClass::ParkInformation, 0); + WindowInvalidateByNumber(WindowClass::ParkInformation, 0); guest->Var37 = 1; auto destination = guest->GetDestination(); @@ -1997,7 +1994,7 @@ static bool peep_interact_with_entrance(Peep* peep, const CoordsXYE& coords, uin * * rct2: 0x006946D8 */ -static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool vandalism) +static void PeepFootpathMoveForward(Peep* peep, const CoordsXYE& coords, bool vandalism) { auto tile_element = coords.element; peep->NextLoc = { coords.ToTileStart(), tile_element->GetBaseZ() }; @@ -2023,7 +2020,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool // If there has been 2 vandalised tiles in the last 6 if (vandalisedTiles & 0x3E && (vandalThoughtTimeout == 0)) { - if ((scenario_rand() & 0xFFFF) <= 10922) + if ((ScenarioRand() & 0xFFFF) <= 10922) { guest->InsertNewThought(PeepThoughtType::Vandalism); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 17); @@ -2032,7 +2029,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool } } - if (vandalThoughtTimeout && (scenario_rand() & 0xFFFF) <= 4369) + if (vandalThoughtTimeout && (ScenarioRand() & 0xFFFF) <= 4369) { vandalThoughtTimeout--; } @@ -2069,7 +2066,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool } } - if (crowded >= 10 && guest->State == PeepState::Walking && (scenario_rand() & 0xFFFF) <= 21845) + if (crowded >= 10 && guest->State == PeepState::Walking && (ScenarioRand() & 0xFFFF) <= 21845) { guest->InsertNewThought(PeepThoughtType::Crowded); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 14); @@ -2082,7 +2079,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool uint8_t disgusting_count = ((guest->DisgustingCount & 0xF) << 2) | sick_count; guest->DisgustingCount = disgusting_count | disgusting_time; - if (disgusting_time & 0xC0 && (scenario_rand() & 0xFFFF) <= 4369) + if (disgusting_time & 0xC0 && (ScenarioRand() & 0xFFFF) <= 4369) { // Reduce the disgusting time guest->DisgustingCount -= 0x40; @@ -2095,7 +2092,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool total_sick += (disgusting_count >> (2 * time)) & 0x3; } - if (total_sick >= 3 && (scenario_rand() & 0xFFFF) <= 10922) + if (total_sick >= 3 && (ScenarioRand() & 0xFFFF) <= 10922) { guest->InsertNewThought(PeepThoughtType::PathDisgusting); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 17); @@ -2108,7 +2105,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool litter_count = ((guest->LitterCount & 0xF) << 2) | litter_count; guest->LitterCount = litter_count | litter_time; - if (litter_time & 0xC0 && (scenario_rand() & 0xFFFF) <= 4369) + if (litter_time & 0xC0 && (ScenarioRand() & 0xFFFF) <= 4369) { // Reduce the litter time guest->LitterCount -= 0x40; @@ -2121,7 +2118,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool total_litter += (litter_count >> (2 * time)) & 0x3; } - if (total_litter >= 3 && (scenario_rand() & 0xFFFF) <= 10922) + if (total_litter >= 3 && (ScenarioRand() & 0xFFFF) <= 10922) { guest->InsertNewThought(PeepThoughtType::BadLitter); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 17); @@ -2137,7 +2134,7 @@ static void peep_footpath_move_forward(Peep* peep, const CoordsXYE& coords, bool * * rct2: 0x0069455E */ -static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) +static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) { // 0x00F1AEE2 auto tile_element = coords.element; @@ -2154,7 +2151,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) { if (guest != nullptr && guest->OutsideOfPark) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return; } } @@ -2162,7 +2159,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) { if (guest == nullptr || !guest->OutsideOfPark) { - peep_return_to_centre_of_tile(peep); + PeepReturnToCentreOfTile(peep); return; } } @@ -2177,7 +2174,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) // the queue, rebuilt the ride, etc. if (guest->CurrentRide == rideIndex) { - peep_footpath_move_forward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); } else { @@ -2185,7 +2182,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) guest->InteractionRideIndex = RideId::GetNull(); guest->RemoveFromQueue(); guest->SetState(PeepState::One); - peep_footpath_move_forward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); } } else @@ -2201,8 +2198,8 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) { /* Peep is approaching the entrance of a ride queue. * Decide whether to go on the ride. */ - auto ride = get_ride(rideIndex); - if (ride != nullptr && guest->ShouldGoOnRide(ride, stationNum, true, false)) + auto ride = GetRide(rideIndex); + if (ride != nullptr && guest->ShouldGoOnRide(*ride, stationNum, true, false)) { // Peep has decided to go on the ride at the queue. guest->InteractionRideIndex = rideIndex; @@ -2210,16 +2207,16 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) // Add the peep to the ride queue. auto& station = ride->GetStation(stationNum); auto old_last_peep = station.LastPeepInQueue; - station.LastPeepInQueue = guest->sprite_index; + station.LastPeepInQueue = guest->Id; guest->GuestNextInQueue = old_last_peep; station.QueueLength++; - peep_decrement_num_riders(guest); + PeepDecrementNumRiders(guest); guest->CurrentRide = rideIndex; guest->CurrentRideStation = stationNum; guest->State = PeepState::Queuing; guest->DaysInQueue = 0; - peep_window_state_update(guest); + PeepWindowStateUpdate(guest); guest->RideSubState = PeepRideSubState::InQueue; guest->DestinationTolerance = 2; @@ -2232,23 +2229,28 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) if (gConfigNotifications.GuestQueuingForRide) { News::AddItemToQueue( - News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->sprite_index, ft); + News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); } } - peep_footpath_move_forward(guest, { coords, tile_element }, vandalism_present); + // Force set centre of tile to prevent issues with guests accidentally skipping the queue + auto queueTileCentre = CoordsXY{ CoordsXY{ guest->NextLoc } + CoordsDirectionDelta[guest->PeepDirection] } + .ToTileCentre(); + guest->SetDestination(queueTileCentre); + + PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); } else { // Peep has decided not to go on the ride. - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); } } else { /* Peep is approaching a queue tile without a ride * sign facing the peep. */ - peep_footpath_move_forward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); } } } @@ -2260,7 +2262,7 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) guest->RemoveFromQueue(); guest->SetState(PeepState::One); } - peep_footpath_move_forward(peep, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(peep, { coords, tile_element }, vandalism_present); } } @@ -2268,17 +2270,17 @@ static void peep_interact_with_path(Peep* peep, const CoordsXYE& coords) * * rct2: 0x00693F70 */ -static bool peep_interact_with_shop(Peep* peep, const CoordsXYE& coords) +static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) { RideId rideIndex = coords.element->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) return false; auto* guest = peep->As(); if (guest == nullptr) { - peep_return_to_centre_of_tile(peep); + PeepReturnToCentreOfTile(peep); return true; } @@ -2293,40 +2295,37 @@ static bool peep_interact_with_shop(Peep* peep, const CoordsXYE& coords) if (ride->status != RideStatus::Open) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } if (guest->InteractionRideIndex == rideIndex) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } if (guest->PeepFlags & PEEP_FLAGS_LEAVING_PARK) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_SHOULD_GO_INSIDE_FACILITY)) { guest->TimeLost = 0; - if (!guest->ShouldGoOnRide(ride, StationIndex::FromUnderlying(0), false, false)) + if (!guest->ShouldGoOnRide(*ride, StationIndex::FromUnderlying(0), false, false)) { - peep_return_to_centre_of_tile(guest); + PeepReturnToCentreOfTile(guest); return true; } - money16 cost = ride->price[0]; + auto cost = ride->price[0]; if (cost != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { ride->total_profit += cost; ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - // TODO: Refactor? SpendMoney previously accepted nullptr to not track money, passing a temporary variable as a - // workaround - money16 money = 0; - guest->SpendMoney(money, cost, ExpenditureType::ParkRideTickets); + guest->SpendMoney(cost, ExpenditureType::ParkRideTickets); } auto coordsCentre = coords.ToTileCentre(); @@ -2346,7 +2345,7 @@ static bool peep_interact_with_shop(Peep* peep, const CoordsXYE& coords) : STR_PEEP_TRACKING_PEEP_IS_ON_X; if (gConfigNotifications.GuestUsedFacility) { - News::AddItemToQueue(News::ItemType::PeepOnRide, string_id, guest->sprite_index, ft); + News::AddItemToQueue(News::ItemType::PeepOnRide, string_id, guest->Id, ft); } } } @@ -2426,7 +2425,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) { pathing_result |= PATHING_OUTSIDE_PARK; } - peep_return_to_centre_of_tile(this); + PeepReturnToCentreOfTile(this); return; } @@ -2438,23 +2437,23 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) do { - if (base_z > tileElement->base_height) + if (base_z > tileElement->BaseHeight) continue; - if (top_z < tileElement->base_height) + if (top_z < tileElement->BaseHeight) continue; if (tileElement->IsGhost()) continue; if (tileElement->GetType() == TileElementType::Path) { - peep_interact_with_path(this, { newLoc, tileElement }); + PeepInteractWithPath(this, { newLoc, tileElement }); tile_result = tileElement; return; } if (tileElement->GetType() == TileElementType::Track) { - if (peep_interact_with_shop(this, { newLoc, tileElement })) + if (PeepInteractWithShop(this, { newLoc, tileElement })) { tile_result = tileElement; return; @@ -2462,7 +2461,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) } else if (tileElement->GetType() == TileElementType::Entrance) { - if (peep_interact_with_entrance(this, { newLoc, tileElement }, pathing_result)) + if (PeepInteractWithEntrance(this, { newLoc, tileElement }, pathing_result)) { tile_result = tileElement; return; @@ -2484,21 +2483,21 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) if (!MapIsLocationInPark(newLoc)) { - peep_return_to_centre_of_tile(this); + PeepReturnToCentreOfTile(this); return; } auto surfaceElement = MapGetSurfaceElementAt(newLoc); if (surfaceElement == nullptr) { - peep_return_to_centre_of_tile(this); + PeepReturnToCentreOfTile(this); return; } int16_t water_height = surfaceElement->GetWaterHeight(); if (water_height > 0) { - peep_return_to_centre_of_tile(this); + PeepReturnToCentreOfTile(this); return; } @@ -2508,7 +2507,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) // Prevent staff from leaving the path on their own unless they're allowed to mow. if (!((staff->StaffOrders & STAFF_ORDERS_MOWING) && staff->StaffMowingTimeout >= 12)) { - peep_return_to_centre_of_tile(staff); + PeepReturnToCentreOfTile(staff); return; } } @@ -2523,7 +2522,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) } } - peep_return_to_centre_of_tile(this); + PeepReturnToCentreOfTile(this); } /** @@ -2545,7 +2544,7 @@ int32_t Peep::GetZOnSlope(int32_t tile_x, int32_t tile_y) return NextLoc.z + MapHeightFromSlope({ tile_x, tile_y }, slope, GetNextIsSloped()); } -StringId get_real_name_string_id_from_id(uint32_t id) +StringId GetRealNameStringIDFromPeepID(uint32_t id) { // Generate a name_string_idx from the peep Id using bit twiddling uint16_t ax = static_cast(id + 0xF0B); @@ -2570,7 +2569,7 @@ StringId get_real_name_string_id_from_id(uint32_t id) return dx; } -int32_t peep_compare(const EntityId sprite_index_a, const EntityId sprite_index_b) +int32_t PeepCompare(const EntityId sprite_index_a, const EntityId sprite_index_b) { Peep const* peep_a = GetEntity(sprite_index_a); Peep const* peep_b = GetEntity(sprite_index_b); @@ -2594,7 +2593,7 @@ int32_t peep_compare(const EntityId sprite_index_a, const EntityId sprite_index_ else { // Simple ID comparison for when both peeps use a number or a generated name - return peep_a->Id - peep_b->Id; + return peep_a->PeepId - peep_b->PeepId; } } @@ -2602,20 +2601,20 @@ int32_t peep_compare(const EntityId sprite_index_a, const EntityId sprite_index_ char nameA[256]{}; Formatter ft; peep_a->FormatNameTo(ft); - format_string(nameA, sizeof(nameA), STR_STRINGID, ft.Data()); + OpenRCT2::FormatStringLegacy(nameA, sizeof(nameA), STR_STRINGID, ft.Data()); char nameB[256]{}; ft.Rewind(); peep_b->FormatNameTo(ft); - format_string(nameB, sizeof(nameB), STR_STRINGID, ft.Data()); - return strlogicalcmp(nameA, nameB); + OpenRCT2::FormatStringLegacy(nameB, sizeof(nameB), STR_STRINGID, ft.Data()); + return StrLogicalCmp(nameA, nameB); } /** * * rct2: 0x0069926C */ -void peep_update_names(bool realNames) +void PeepUpdateNames(bool realNames) { if (realNames) { @@ -2630,10 +2629,10 @@ void peep_update_names(bool realNames) auto intent = Intent(INTENT_ACTION_REFRESH_GUEST_LIST); ContextBroadcastIntent(&intent); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } -void increment_guests_in_park() +void IncrementGuestsInPark() { if (gNumGuestsInPark < UINT32_MAX) { @@ -2645,7 +2644,7 @@ void increment_guests_in_park() } } -void increment_guests_heading_for_park() +void IncrementGuestsHeadingForPark() { if (gNumGuestsHeadingForPark < UINT32_MAX) { @@ -2657,7 +2656,7 @@ void increment_guests_heading_for_park() } } -void decrement_guests_in_park() +void DecrementGuestsInPark() { if (gNumGuestsInPark > 0) { @@ -2665,11 +2664,11 @@ void decrement_guests_in_park() } else { - log_error("Attempt to decrement guests in park below zero."); + LOG_ERROR("Attempt to decrement guests in park below zero."); } } -void decrement_guests_heading_for_park() +void DecrementGuestsHeadingForPark() { if (gNumGuestsHeadingForPark > 0) { @@ -2677,11 +2676,11 @@ void decrement_guests_heading_for_park() } else { - log_error("Attempt to decrement guests heading for park below zero."); + LOG_ERROR("Attempt to decrement guests heading for park below zero."); } } -static void peep_release_balloon(Guest* peep, int16_t spawn_height) +static void GuestReleaseBalloon(Guest* peep, int16_t spawn_height) { if (peep->HasItem(ShopItem::Balloon)) { @@ -2763,7 +2762,7 @@ void Peep::Serialise(DataSerialiser& stream) stream << StepProgress; stream << PeepDirection; stream << InteractionRideIndex; - stream << Id; + stream << PeepId; stream << PathCheckOptimisation; stream << PathfindGoal; stream << PathfindHistory; @@ -2775,7 +2774,7 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const { PROFILED_FUNCTION(); - if (lightfx_is_available()) + if (LightFXIsAvailable()) { if (Is()) { @@ -2798,11 +2797,11 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const return; } - LightfxAdd3DLight(*this, 0, loc, LightType::Spot1); + LightFXAdd3DLight(*this, 0, loc, LightType::Spot1); } } - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if (dpi->zoom_level > ZoomLevel{ 2 }) { return; diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 48f7399dcb..928fb60359 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -365,7 +365,7 @@ struct Peep : EntityBase Direction PeepDirection; // Direction ? }; RideId InteractionRideIndex; - uint32_t Id; + uint32_t PeepId; uint8_t PathCheckOptimisation; // see peep.checkForPath TileCoordsXYZD PathfindGoal; std::array PathfindHistory; @@ -427,24 +427,24 @@ private: void UpdatePicked(); }; -struct rct_sprite_bounds +struct SpriteBounds { uint8_t sprite_width; // 0x00 uint8_t sprite_height_negative; // 0x01 uint8_t sprite_height_positive; // 0x02 }; -struct rct_peep_animation +struct PeepAnimation { uint32_t base_image; // 0x00 size_t num_frames; const uint8_t* frame_offsets; }; -struct rct_peep_animation_entry +struct PeepAnimationEntry { - const rct_peep_animation* sprite_animation; // 0x00 - const rct_sprite_bounds* sprite_bounds; // 0x04 + const PeepAnimation* sprite_animation; // 0x00 + const SpriteBounds* sprite_bounds; // 0x04 }; enum @@ -456,39 +456,39 @@ enum }; // rct2: 0x00982708 -extern const rct_peep_animation_entry g_peep_animation_entries[EnumValue(PeepSpriteType::Count)]; +extern const PeepAnimationEntry g_peep_animation_entries[EnumValue(PeepSpriteType::Count)]; extern const bool gSpriteTypeToSlowWalkMap[48]; extern uint8_t gPeepWarningThrottle[16]; -int32_t peep_get_staff_count(); -void peep_update_all(); -void peep_problem_warnings_update(); -void peep_stop_crowd_noise(); -void peep_update_crowd_noise(); -void peep_update_days_in_queue(); -void peep_applause(); -int32_t get_peep_face_sprite_small(Guest* peep); -int32_t get_peep_face_sprite_large(Guest* peep); -void peep_sprite_remove(Peep* peep); +int32_t PeepGetStaffCount(); +void PeepUpdateAll(); +void PeepProblemWarningsUpdate(); +void PeepStopCrowdNoise(); +void PeepUpdateCrowdNoise(); +void PeepUpdateDaysInQueue(); +void PeepApplause(); +int32_t GetPeepFaceSpriteSmall(Guest* peep); +int32_t GetPeepFaceSpriteLarge(Guest* peep); +void PeepEntityRemove(Peep* peep); -void peep_window_state_update(Peep* peep); -void peep_decrement_num_riders(Peep* peep); +void PeepWindowStateUpdate(Peep* peep); +void PeepDecrementNumRiders(Peep* peep); -void peep_set_map_tooltip(Peep* peep); -int32_t peep_compare(const EntityId sprite_index_a, const EntityId sprite_index_b); +void PeepSetMapTooltip(Peep* peep); +int32_t PeepCompare(const EntityId sprite_index_a, const EntityId sprite_index_b); -void peep_update_names(bool realNames); +void PeepUpdateNames(bool realNames); -StringId get_real_name_string_id_from_id(uint32_t id); +StringId GetRealNameStringIDFromPeepID(uint32_t id); -inline const rct_peep_animation& GetPeepAnimation( +inline const PeepAnimation& GetPeepAnimation( PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType = PeepActionSpriteType::None) { return g_peep_animation_entries[EnumValue(spriteType)].sprite_animation[EnumValue(actionSpriteType)]; }; -inline const rct_sprite_bounds& GetSpriteBounds( +inline const SpriteBounds& GetSpriteBounds( PeepSpriteType spriteType, PeepActionSpriteType actionSpriteType = PeepActionSpriteType::None) { return g_peep_animation_entries[EnumValue(spriteType)].sprite_bounds[EnumValue(actionSpriteType)]; diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index ed73b6a8ed..eae925d0f1 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,8 +23,12 @@ #include "../localisation/StringIds.h" #include "../management/Finance.h" #include "../network/network.h" +#include "../object/FootpathItemEntry.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" +#include "../object/SceneryGroupEntry.h" +#include "../object/SmallSceneryEntry.h" #include "../object/TerrainSurfaceObject.h" #include "../paint/tile_element/Paint.TileElement.h" #include "../peep/GuestPathfinding.h" @@ -38,7 +42,6 @@ #include "../world/Entrance.h" #include "../world/Footpath.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "PatrolArea.h" #include "Peep.h" @@ -365,7 +368,7 @@ Direction Staff::HandymanDirectionToNearestLitter() const return INVALID_DIRECTION; do { - if (tileElement->base_height != nextZ) + if (tileElement->BaseHeight != nextZ) continue; if (tileElement->GetType() == TileElementType::Entrance || tileElement->GetType() == TileElementType::Track) { @@ -381,7 +384,7 @@ Direction Staff::HandymanDirectionToNearestLitter() const do { - if (tileElement->base_height != nextZ) + if (tileElement->BaseHeight != nextZ) continue; if (tileElement->GetType() == TileElementType::Entrance || tileElement->GetType() == TileElementType::Track) { @@ -416,7 +419,7 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const return INVALID_DIRECTION; } - uint8_t chosenDirection = scenario_rand() & 0x3; + uint8_t chosenDirection = ScenarioRand() & 0x3; for (uint8_t i = 0; i < 4; ++i, ++chosenDirection) { chosenDirection &= 0x3; @@ -452,7 +455,7 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const */ Direction Staff::HandymanDirectionRandSurface(uint8_t validDirections) const { - Direction newDirection = scenario_rand() % NumOrthogonalDirections; + Direction newDirection = ScenarioRand() % NumOrthogonalDirections; for (int32_t i = 0; i < NumOrthogonalDirections; ++i, ++newDirection) { newDirection %= NumOrthogonalDirections; @@ -484,7 +487,7 @@ bool Staff::DoHandymanPathFinding() Direction litterDirection = INVALID_DIRECTION; uint8_t validDirections = GetValidPatrolDirections(NextLoc); - if ((StaffOrders & STAFF_ORDERS_SWEEPING) && ((gCurrentTicks + sprite_index.ToUnderlying()) & 0xFFF) > 110) + if ((StaffOrders & STAFF_ORDERS_SWEEPING) && ((gCurrentTicks + Id.ToUnderlying()) & 0xFFF) > 110) { litterDirection = HandymanDirectionToNearestLitter(); } @@ -523,7 +526,7 @@ bool Staff::DoHandymanPathFinding() /// When in a queue path make the probability of following litter much lower (10% instead of 90%) /// as handymen often get stuck when there is litter on a normal path next to a queue they are in uint32_t chooseRandomProbability = connectedQueue ? 0xE666 : 0x1999; - if ((scenario_rand() & 0xFFFF) >= chooseRandomProbability) + if ((ScenarioRand() & 0xFFFF) >= chooseRandomProbability) { chooseRandom = false; newDirection = litterDirection; @@ -542,7 +545,7 @@ bool Staff::DoHandymanPathFinding() { do { - newDirection = scenario_rand() & 3; + newDirection = ScenarioRand() & 3; } while ((pathDirections & (1 << newDirection)) == 0); } } @@ -564,7 +567,7 @@ bool Staff::DoHandymanPathFinding() SetDestination(chosenTile + CoordsXY{ 16, 16 }, 3); if (State == PeepState::Queuing) { - DestinationTolerance = (scenario_rand() & 7) + 2; + DestinationTolerance = (ScenarioRand() & 7) + 2; } return false; } @@ -579,7 +582,7 @@ Direction Staff::DirectionSurface(Direction initialDirection) const { case 1: direction++; - if (scenario_rand() & 1) + if (ScenarioRand() & 1) { direction -= 2; } @@ -613,10 +616,10 @@ Direction Staff::DirectionSurface(Direction initialDirection) const */ Direction Staff::MechanicDirectionSurface() const { - Direction direction = scenario_rand() & 3; + Direction direction = ScenarioRand() & 3; - auto ride = get_ride(CurrentRide); - if (ride != nullptr && (State == PeepState::Answering || State == PeepState::HeadingToInspection) && (scenario_rand() & 1)) + auto ride = GetRide(CurrentRide); + if (ride != nullptr && (State == PeepState::Answering || State == PeepState::HeadingToInspection) && (ScenarioRand() & 1)) { auto location = ride->GetStation(CurrentRideStation).Exit; if (location.IsNull()) @@ -636,14 +639,14 @@ Direction Staff::MechanicDirectionSurface() const */ Direction Staff::MechanicDirectionPathRand(uint8_t pathDirections) const { - if (scenario_rand() & 1) + if (ScenarioRand() & 1) { if (pathDirections & (1 << PeepDirection)) return PeepDirection; } // Modified from original to spam scenario_rand less - uint8_t direction = scenario_rand() & 3; + uint8_t direction = ScenarioRand() & 3; for (int32_t i = 0; i < 4; ++i, ++direction) { direction &= 3; @@ -675,7 +678,7 @@ Direction Staff::MechanicDirectionPath(uint8_t validDirections, PathElement* pat pathDirections |= (1 << DirectionReverse(PeepDirection)); } - Direction direction = bitscanforward(pathDirections); + Direction direction = UtilBitScanForward(pathDirections); pathDirections &= ~(1 << direction); if (pathDirections == 0) { @@ -694,7 +697,7 @@ Direction Staff::MechanicDirectionPath(uint8_t validDirections, PathElement* pat pathDirections |= (1 << direction); // Mechanic is heading to ride (either broken down or for inspection). - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride != nullptr && (State == PeepState::Answering || State == PeepState::HeadingToInspection)) { /* Find location of the exit for the target ride station @@ -778,7 +781,7 @@ bool Staff::DoMechanicPathFinding() } PeepDirection = newDirection; - auto tolerance = (scenario_rand() & 7) + 2; + auto tolerance = (ScenarioRand() & 7) + 2; SetDestination(chosenTile + CoordsXY{ 16, 16 }, tolerance); return false; @@ -798,7 +801,7 @@ Direction Staff::DirectionPath(uint8_t validDirections, PathElement* pathElement if (pathDirections == 0) { - return DirectionSurface(scenario_rand() & 3); + return DirectionSurface(ScenarioRand() & 3); } pathDirections &= ~(1 << DirectionReverse(PeepDirection)); @@ -807,14 +810,14 @@ Direction Staff::DirectionPath(uint8_t validDirections, PathElement* pathElement pathDirections |= (1 << DirectionReverse(PeepDirection)); } - Direction direction = bitscanforward(pathDirections); + Direction direction = UtilBitScanForward(pathDirections); // If this is the only direction they can go, then go if (pathDirections == (1 << direction)) { return direction; } - direction = scenario_rand() & 3; + direction = ScenarioRand() & 3; for (uint8_t i = 0; i < NumOrthogonalDirections; ++i, direction = DirectionNext(direction)) { if (pathDirections & (1 << direction)) @@ -836,7 +839,7 @@ bool Staff::DoMiscPathFinding() Direction newDirection = INVALID_DIRECTION; if (GetNextIsSurface()) { - newDirection = DirectionSurface(scenario_rand() & 3); + newDirection = DirectionSurface(ScenarioRand() & 3); } else { @@ -851,12 +854,12 @@ bool Staff::DoMiscPathFinding() while (!MapIsLocationValid(chosenTile)) { - newDirection = DirectionSurface(scenario_rand() & 3); + newDirection = DirectionSurface(ScenarioRand() & 3); chosenTile = CoordsXY{ NextLoc } + CoordsDirectionDelta[newDirection]; } PeepDirection = newDirection; - auto tolerance = (scenario_rand() & 7) + 2; + auto tolerance = (ScenarioRand() & 7) + 2; SetDestination(chosenTile + CoordsXY{ 16, 16 }, tolerance); return false; @@ -873,7 +876,7 @@ bool Staff::IsMechanicHeadingToFixRideBlockingPath() if (trackElement == nullptr) return false; - auto ride = get_ride(trackElement->GetRideIndex()); + auto ride = GetRide(trackElement->GetRideIndex()); if (ride == nullptr) return false; @@ -922,9 +925,9 @@ void Staff::EntertainerUpdateNearbyPeeps() const */ bool Staff::DoEntertainerPathFinding() { - if (((scenario_rand() & 0xFFFF) <= 0x4000) && IsActionInterruptable()) + if (((ScenarioRand() & 0xFFFF) <= 0x4000) && IsActionInterruptable()) { - Action = (scenario_rand() & 1) ? PeepActionType::Wave2 : PeepActionType::Joy; + Action = (ScenarioRand() & 1) ? PeepActionType::Wave2 : PeepActionType::Joy; ActionFrame = 0; ActionSpriteImageOffset = 0; @@ -986,7 +989,7 @@ PeepSpriteType EntertainerCostumeToSprite(EntertainerCostume entertainerType) return newSpriteType; } -colour_t staff_get_colour(StaffType staffType) +colour_t StaffGetColour(StaffType staffType) { switch (staffType) { @@ -1004,7 +1007,7 @@ colour_t staff_get_colour(StaffType staffType) } } -bool staff_set_colour(StaffType staffType, colour_t value) +bool StaffSetColour(StaffType staffType, colour_t value) { switch (staffType) { @@ -1023,14 +1026,14 @@ bool staff_set_colour(StaffType staffType, colour_t value) return true; } -uint32_t staff_get_available_entertainer_costumes() +uint32_t StaffGetAvailableEntertainerCostumes() { uint32_t entertainerCostumes = 0; for (int32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { - if (scenery_group_is_invented(i)) + if (SceneryGroupIsInvented(i)) { - const auto sgEntry = GetSceneryGroupEntry(i); + const auto sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(i); entertainerCostumes |= sgEntry->entertainer_costumes; } } @@ -1045,9 +1048,9 @@ uint32_t staff_get_available_entertainer_costumes() return entertainerCostumes; } -int32_t staff_get_available_entertainer_costume_list(EntertainerCostume* costumeList) +int32_t StaffGetAvailableEntertainerCostumeList(EntertainerCostume* costumeList) { - uint32_t availableCostumes = staff_get_available_entertainer_costumes(); + uint32_t availableCostumes = StaffGetAvailableEntertainerCostumes(); int32_t numCostumes = 0; for (uint8_t i = 0; i < static_cast(EntertainerCostume::Count); i++) { @@ -1298,7 +1301,7 @@ void Staff::UpdateSweeping() */ void Staff::UpdateHeadingToInspect() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) { SetState(PeepState::Falling); @@ -1374,7 +1377,7 @@ void Staff::UpdateHeadingToInspect() SetDestination(newDestination, 2); sprite_direction = PeepDirection << 3; - z = rideEntranceExitElement->base_height * 4; + z = rideEntranceExitElement->BaseHeight * 4; SubState = 4; // Falls through into SubState 4 } @@ -1402,7 +1405,7 @@ void Staff::UpdateHeadingToInspect() */ void Staff::UpdateAnswering() { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr || ride->mechanic_status != RIDE_MECHANIC_STATUS_HEADING) { SetState(PeepState::Falling); @@ -1418,7 +1421,7 @@ void Staff::UpdateAnswering() UpdateCurrentActionSpriteType(); SubState = 1; - peep_window_state_update(this); + PeepWindowStateUpdate(this); return; } if (SubState == 1) @@ -1426,7 +1429,7 @@ void Staff::UpdateAnswering() if (IsActionWalking()) { SubState = 2; - peep_window_state_update(this); + PeepWindowStateUpdate(this); MechanicTimeSinceCall = 0; ResetPathfindGoal(); return; @@ -1484,7 +1487,7 @@ void Staff::UpdateAnswering() SetDestination({ destX, destY }, 2); sprite_direction = PeepDirection << 3; - z = rideEntranceExitElement->base_height * 4; + z = rideEntranceExitElement->BaseHeight * 4; SubState = 4; // Falls through into SubState 4 } @@ -1520,7 +1523,7 @@ bool Staff::UpdatePatrollingFindWatering() if (!(StaffOrders & STAFF_ORDERS_WATER_FLOWERS)) return false; - uint8_t chosen_position = scenario_rand() & 7; + uint8_t chosen_position = ScenarioRand() & 7; for (int32_t i = 0; i < 8; ++i, ++chosen_position) { chosen_position &= 7; @@ -1930,7 +1933,7 @@ static constexpr const uint32_t FixingSubstatesForBreakdown[9] = { */ void Staff::UpdateFixing(int32_t steps) { - auto ride = get_ride(CurrentRide); + auto ride = GetRide(CurrentRide); if (ride == nullptr) { SetState(PeepState::Falling); @@ -1954,26 +1957,26 @@ void Staff::UpdateFixing(int32_t steps) { case PEEP_FIXING_ENTER_STATION: NextFlags &= ~PEEP_NEXT_FLAG_IS_SLOPED; - progressToNextSubstate = UpdateFixingEnterStation(ride); + progressToNextSubstate = UpdateFixingEnterStation(*ride); break; case PEEP_FIXING_MOVE_TO_BROKEN_DOWN_VEHICLE: - progressToNextSubstate = UpdateFixingMoveToBrokenDownVehicle(firstRun, ride); + progressToNextSubstate = UpdateFixingMoveToBrokenDownVehicle(firstRun, *ride); break; case PEEP_FIXING_FIX_VEHICLE_CLOSED_RESTRAINTS: case PEEP_FIXING_FIX_VEHICLE_CLOSED_DOORS: case PEEP_FIXING_FIX_VEHICLE_OPEN_RESTRAINTS: case PEEP_FIXING_FIX_VEHICLE_OPEN_DOORS: - progressToNextSubstate = UpdateFixingFixVehicle(firstRun, ride); + progressToNextSubstate = UpdateFixingFixVehicle(firstRun, *ride); break; case PEEP_FIXING_FIX_VEHICLE_MALFUNCTION: - progressToNextSubstate = UpdateFixingFixVehicleMalfunction(firstRun, ride); + progressToNextSubstate = UpdateFixingFixVehicleMalfunction(firstRun, *ride); break; case PEEP_FIXING_MOVE_TO_STATION_END: - progressToNextSubstate = UpdateFixingMoveToStationEnd(firstRun, ride); + progressToNextSubstate = UpdateFixingMoveToStationEnd(firstRun, *ride); break; case PEEP_FIXING_FIX_STATION_END: @@ -1981,31 +1984,31 @@ void Staff::UpdateFixing(int32_t steps) break; case PEEP_FIXING_MOVE_TO_STATION_START: - progressToNextSubstate = UpdateFixingMoveToStationStart(firstRun, ride); + progressToNextSubstate = UpdateFixingMoveToStationStart(firstRun, *ride); break; case PEEP_FIXING_FIX_STATION_START: - progressToNextSubstate = UpdateFixingFixStationStart(firstRun, ride); + progressToNextSubstate = UpdateFixingFixStationStart(firstRun, *ride); break; case PEEP_FIXING_FIX_STATION_BRAKES: - progressToNextSubstate = UpdateFixingFixStationBrakes(firstRun, ride); + progressToNextSubstate = UpdateFixingFixStationBrakes(firstRun, *ride); break; case PEEP_FIXING_MOVE_TO_STATION_EXIT: - progressToNextSubstate = UpdateFixingMoveToStationExit(firstRun, ride); + progressToNextSubstate = UpdateFixingMoveToStationExit(firstRun, *ride); break; case PEEP_FIXING_FINISH_FIX_OR_INSPECT: - progressToNextSubstate = UpdateFixingFinishFixOrInspect(firstRun, steps, ride); + progressToNextSubstate = UpdateFixingFinishFixOrInspect(firstRun, steps, *ride); break; case PEEP_FIXING_LEAVE_BY_ENTRANCE_EXIT: - progressToNextSubstate = UpdateFixingLeaveByEntranceExit(firstRun, ride); + progressToNextSubstate = UpdateFixingLeaveByEntranceExit(firstRun, *ride); break; default: - log_error("Invalid substate"); + LOG_ERROR("Invalid substate"); progressToNextSubstate = false; } @@ -2037,10 +2040,10 @@ void Staff::UpdateFixing(int32_t steps) * rct2: 0x006C0EEC * fixing SubState: enter_station - applies to fixing all break down reasons and ride inspections. */ -bool Staff::UpdateFixingEnterStation(Ride* ride) const +bool Staff::UpdateFixingEnterStation(Ride& ride) const { - ride->mechanic_status = RIDE_MECHANIC_STATUS_FIXING; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanic_status = RIDE_MECHANIC_STATUS_FIXING; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; return true; } @@ -2050,11 +2053,11 @@ bool Staff::UpdateFixingEnterStation(Ride* ride) const * fixing SubState: move_to_broken_down_vehicle - applies to fixing all vehicle specific breakdown reasons * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingMoveToBrokenDownVehicle(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingMoveToBrokenDownVehicle(bool firstRun, const Ride& ride) { if (!firstRun) { - Vehicle* vehicle = ride_get_broken_vehicle(ride); + Vehicle* vehicle = RideGetBrokenVehicle(ride); if (vehicle == nullptr) { return true; @@ -2068,7 +2071,7 @@ bool Staff::UpdateFixingMoveToBrokenDownVehicle(bool firstRun, const Ride* ride) } auto trackType = vehicle->GetTrackType(); - if (track_type_is_station(trackType)) + if (TrackTypeIsStation(trackType)) { break; } @@ -2103,13 +2106,13 @@ bool Staff::UpdateFixingMoveToBrokenDownVehicle(bool firstRun, const Ride* ride) * 4. doors stuck open. * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride& ride) { if (!firstRun) { sprite_direction = PeepDirection << 3; - Action = (scenario_rand() & 1) ? PeepActionType::StaffFix2 : PeepActionType::StaffFix; + Action = (ScenarioRand() & 1) ? PeepActionType::StaffFix2 : PeepActionType::StaffFix; ActionSpriteImageOffset = 0; ActionFrame = 0; UpdateCurrentActionSpriteType(); @@ -2129,13 +2132,13 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride* ride) return false; } - Vehicle* vehicle = ride_get_broken_vehicle(ride); + Vehicle* vehicle = RideGetBrokenVehicle(ride); if (vehicle == nullptr) { return true; } - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_CAR); + vehicle->ClearFlag(VehicleFlags::CarIsBroken); return false; } @@ -2145,7 +2148,7 @@ bool Staff::UpdateFixingFixVehicle(bool firstRun, const Ride* ride) * fixing SubState: fix_vehicle_malfunction - applies fixing to vehicle malfunction. * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride) { if (!firstRun) { @@ -2170,13 +2173,13 @@ bool Staff::UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride* ride) return false; } - Vehicle* vehicle = ride_get_broken_vehicle(ride); + Vehicle* vehicle = RideGetBrokenVehicle(ride); if (vehicle == nullptr) { return true; } - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN); + vehicle->ClearFlag(VehicleFlags::TrainIsBroken); return false; } @@ -2195,16 +2198,16 @@ static constexpr const CoordsXY _StationFixingOffsets[] = { * inspection. * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingMoveToStationEnd(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingMoveToStationEnd(bool firstRun, const Ride& ride) { if (!firstRun) { - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_HAS_NO_TRACK)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_HAS_NO_TRACK)) { return true; } - auto stationPos = ride->GetStation(CurrentRideStation).GetStart(); + auto stationPos = ride.GetStation(CurrentRideStation).GetStart(); if (stationPos.IsNull()) { return true; @@ -2213,7 +2216,7 @@ bool Staff::UpdateFixingMoveToStationEnd(bool firstRun, const Ride* ride) auto tileElement = MapGetTrackElementAt(stationPos); if (tileElement == nullptr) { - log_error("Couldn't find tile_element"); + LOG_ERROR("Couldn't find tile_element"); return false; } @@ -2281,16 +2284,16 @@ bool Staff::UpdateFixingFixStationEnd(bool firstRun) * 3. applies to inspection. * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride& ride) { if (!firstRun) { - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_HAS_NO_TRACK)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_HAS_NO_TRACK)) { return true; } - auto stationPosition = ride->GetStation(CurrentRideStation).GetStart(); + auto stationPosition = ride.GetStation(CurrentRideStation).GetStart(); if (stationPosition.IsNull()) { return true; @@ -2306,8 +2309,8 @@ bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride* ride) } Direction stationDirection = 0; - track_begin_end trackBeginEnd; - while (track_block_get_previous(input, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + while (TrackBlockGetPrevious(input, &trackBeginEnd)) { if (trackBeginEnd.begin_element->AsTrack()->IsStation()) { @@ -2322,7 +2325,7 @@ bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride* ride) break; } - // loc_6C12ED: + // Loc6C12ED: auto destination = CoordsXY{ input.x + 16, input.y + 16 }; auto offset = _StationFixingOffsets[stationDirection]; @@ -2357,11 +2360,11 @@ bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride* ride) * 2. applies to inspection. * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride& ride) { if (!firstRun) { - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_HAS_NO_TRACK)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_HAS_NO_TRACK)) { return true; } @@ -2390,7 +2393,7 @@ bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride* ride) * fixing SubState: fix_station_brakes - applies to fixing brake failure * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride* ride) +bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) { if (!firstRun) { @@ -2413,8 +2416,8 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride* ride) if (ActionFrame == 0x28) { - ride->mechanic_status = RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanic_status = RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; } if (ActionFrame == 0x13 || ActionFrame == 0x19 || ActionFrame == 0x1F || ActionFrame == 0x25 || ActionFrame == 0x2B) @@ -2430,14 +2433,14 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride* ride) * fixing SubState: move_to_station_exit - applies to fixing all failures & inspections * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingMoveToStationExit(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingMoveToStationExit(bool firstRun, const Ride& ride) { if (!firstRun) { - auto stationPosition = ride->GetStation(CurrentRideStation).Exit.ToCoordsXY(); + auto stationPosition = ride.GetStation(CurrentRideStation).Exit.ToCoordsXY(); if (stationPosition.IsNull()) { - stationPosition = ride->GetStation(CurrentRideStation).Entrance.ToCoordsXY(); + stationPosition = ride.GetStation(CurrentRideStation).Entrance.ToCoordsXY(); if (stationPosition.IsNull()) { @@ -2468,7 +2471,7 @@ bool Staff::UpdateFixingMoveToStationExit(bool firstRun, const Ride* ride) * fixing SubState: finish_fix_or_inspect - applies to fixing all failures & inspections * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* ride) +bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& ride) { if (!firstRun) { @@ -2478,7 +2481,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r StaffRidesInspected++; WindowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST; - ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED; + ride.mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED; return true; } @@ -2500,8 +2503,8 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r return false; } - ride_fix_breakdown(ride, steps); - ride->mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED; + RideFixBreakdown(ride, steps); + ride.mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED; return true; } @@ -2510,14 +2513,14 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* r * fixing SubState: leave_by_entrance_exit - applies to fixing all failures & inspections * - see FixingSubstatesForBreakdown[] */ -bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride* ride) +bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride& ride) { if (!firstRun) { - auto exitPosition = ride->GetStation(CurrentRideStation).Exit.ToCoordsXY(); + auto exitPosition = ride.GetStation(CurrentRideStation).Exit.ToCoordsXY(); if (exitPosition.IsNull()) { - exitPosition = ride->GetStation(CurrentRideStation).Entrance.ToCoordsXY(); + exitPosition = ride.GetStation(CurrentRideStation).Entrance.ToCoordsXY(); if (exitPosition.IsNull()) { @@ -2538,10 +2541,10 @@ bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride* ride) int16_t xy_distance; if (auto loc = UpdateAction(xy_distance); loc.has_value()) { - auto stationHeight = ride->GetStation(CurrentRideStation).GetBaseZ(); + auto stationHeight = ride.GetStation(CurrentRideStation).GetBaseZ(); if (xy_distance >= 16) { - stationHeight += ride->GetRideTypeDescriptor().Heights.PlatformHeight; + stationHeight += ride.GetRideTypeDescriptor().Heights.PlatformHeight; } MoveTo({ loc.value(), stationHeight }); @@ -2556,18 +2559,18 @@ bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride* ride) */ void Staff::UpdateRideInspected(RideId rideIndex) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; - ride->reliability += ((100 - ride->reliability_percentage) / 4) * (scenario_rand() & 0xFF); + ride->reliability += ((100 - ride->reliability_percentage) / 4) * (ScenarioRand() & 0xFF); ride->last_inspection = 0; ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } -money32 GetStaffWage(StaffType type) +money64 GetStaffWage(StaffType type) { switch (type) { diff --git a/src/openrct2/entity/Staff.h b/src/openrct2/entity/Staff.h index 9af5009c9f..40b77f5f1b 100644 --- a/src/openrct2/entity/Staff.h +++ b/src/openrct2/entity/Staff.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -75,18 +75,18 @@ private: void UpdateWatering(); void UpdateAnswering(); void UpdateFixing(int32_t steps); - bool UpdateFixingEnterStation(Ride* ride) const; - bool UpdateFixingMoveToBrokenDownVehicle(bool firstRun, const Ride* ride); - bool UpdateFixingFixVehicle(bool firstRun, const Ride* ride); - bool UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride* ride); - bool UpdateFixingMoveToStationEnd(bool firstRun, const Ride* ride); + bool UpdateFixingEnterStation(Ride& ride) const; + bool UpdateFixingMoveToBrokenDownVehicle(bool firstRun, const Ride& ride); + bool UpdateFixingFixVehicle(bool firstRun, const Ride& ride); + bool UpdateFixingFixVehicleMalfunction(bool firstRun, const Ride& ride); + bool UpdateFixingMoveToStationEnd(bool firstRun, const Ride& ride); bool UpdateFixingFixStationEnd(bool firstRun); - bool UpdateFixingMoveToStationStart(bool firstRun, const Ride* ride); - bool UpdateFixingFixStationStart(bool firstRun, const Ride* ride); - bool UpdateFixingFixStationBrakes(bool firstRun, Ride* ride); - bool UpdateFixingMoveToStationExit(bool firstRun, const Ride* ride); - bool UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride* ride); - bool UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride* ride); + bool UpdateFixingMoveToStationStart(bool firstRun, const Ride& ride); + bool UpdateFixingFixStationStart(bool firstRun, const Ride& ride); + bool UpdateFixingFixStationBrakes(bool firstRun, Ride& ride); + bool UpdateFixingMoveToStationExit(bool firstRun, const Ride& ride); + bool UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& ride); + bool UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride& ride); void UpdateRideInspected(RideId rideIndex); void UpdateHeadingToInspect(); @@ -148,12 +148,12 @@ extern colour_t gStaffHandymanColour; extern colour_t gStaffMechanicColour; extern colour_t gStaffSecurityColour; -colour_t staff_get_colour(StaffType staffType); -bool staff_set_colour(StaffType staffType, colour_t value); -uint32_t staff_get_available_entertainer_costumes(); -int32_t staff_get_available_entertainer_costume_list(EntertainerCostume* costumeList); +colour_t StaffGetColour(StaffType staffType); +bool StaffSetColour(StaffType staffType, colour_t value); +uint32_t StaffGetAvailableEntertainerCostumes(); +int32_t StaffGetAvailableEntertainerCostumeList(EntertainerCostume* costumeList); -money32 GetStaffWage(StaffType type); +money64 GetStaffWage(StaffType type); PeepSpriteType EntertainerCostumeToSprite(EntertainerCostume entertainerType); const PatrolArea& GetMergedPatrolArea(const StaffType type); diff --git a/src/openrct2/entity/Yaw.hpp b/src/openrct2/entity/Yaw.hpp index 77a5ba6a4e..aac3bf5537 100644 --- a/src/openrct2/entity/Yaw.hpp +++ b/src/openrct2/entity/Yaw.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -56,6 +56,10 @@ namespace OpenRCT2::Entity::Yaw { return yaw; } + [[nodiscard]] constexpr int32_t YawTo64(int32_t yaw) + { + return yaw << 1; + } [[nodiscard]] constexpr int32_t YawToPrecision(int32_t yaw, SpritePrecision precision) { diff --git a/src/openrct2/interface/Chat.cpp b/src/openrct2/interface/Chat.cpp index 7878a3652f..f9420f5a34 100644 --- a/src/openrct2/interface/Chat.cpp +++ b/src/openrct2/interface/Chat.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,10 +27,9 @@ using namespace OpenRCT2; using namespace OpenRCT2::Audio; bool gChatOpen = false; -static char _chatCurrentLine[CHAT_MAX_MESSAGE_LENGTH]; -static char _chatHistory[CHAT_HISTORY_SIZE][CHAT_INPUT_SIZE]; -static uint32_t _chatHistoryTime[CHAT_HISTORY_SIZE]; -static uint32_t _chatHistoryIndex = 0; +static u8string _chatCurrentLine; +static std::deque _chatHistory; +static std::deque _chatHistoryTime; static uint32_t _chatCaretTicks = 0; static int32_t _chatLeft; static int32_t _chatTop; @@ -40,59 +39,58 @@ static int32_t _chatWidth; static int32_t _chatHeight; static TextInputSession* _chatTextInputSession; -static const char* chat_history_get(uint32_t index); -static uint32_t chat_history_get_time(uint32_t index); -static void chat_clear_input(); -static int32_t chat_history_draw_string( - rct_drawpixelinfo* dpi, const char* text, const ScreenCoordsXY& screenCoords, int32_t width); +static const u8string& ChatGetHistory(size_t index); +static uint32_t ChatHistoryGetTime(size_t index); +static void ChatClearInput(); +static int32_t ChatHistoryDrawString(DrawPixelInfo* dpi, const char* text, const ScreenCoordsXY& screenCoords, int32_t width); -bool chat_available() +bool ChatAvailable() { - return network_get_mode() != NETWORK_MODE_NONE && network_get_status() == NETWORK_STATUS_CONNECTED - && network_get_authstatus() == NetworkAuth::Ok; + return NetworkGetMode() != NETWORK_MODE_NONE && NetworkGetStatus() == NETWORK_STATUS_CONNECTED + && NetworkGetAuthstatus() == NetworkAuth::Ok; } -void chat_open() +void ChatOpen() { gChatOpen = true; - _chatTextInputSession = ContextStartTextInput(_chatCurrentLine, sizeof(_chatCurrentLine)); + _chatTextInputSession = ContextStartTextInput(_chatCurrentLine, CHAT_MAX_MESSAGE_LENGTH); } -void chat_close() +void ChatClose() { gChatOpen = false; ContextStopTextInput(); } -void chat_toggle() +void ChatToggle() { if (gChatOpen) { - chat_close(); + ChatClose(); } else { - chat_open(); + ChatOpen(); } } -void chat_init() +void ChatInit() { - std::memset(_chatHistory, 0x00, sizeof(_chatHistory)); - std::memset(_chatHistoryTime, 0x00, sizeof(_chatHistoryTime)); + _chatHistory.clear(); + _chatHistoryTime.clear(); } -void chat_update() +void ChatUpdate() { // Flash the caret _chatCaretTicks = (_chatCaretTicks + 1) % 30; } -void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor) +void ChatDraw(DrawPixelInfo* dpi, uint8_t chatBackgroundColor) { thread_local std::string lineBuffer; - if (!chat_available()) + if (!ChatAvailable()) { gChatOpen = false; return; @@ -104,25 +102,23 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor) _chatBottom = ContextGetHeight() - 45; _chatTop = _chatBottom - 10; - char* inputLine = _chatCurrentLine; + const char* inputLine = _chatCurrentLine.c_str(); int32_t inputLineHeight = 10; // Draw chat window if (gChatOpen) { - inputLineHeight = chat_string_wrapped_get_height(static_cast(&inputLine), _chatWidth - 10); + inputLineHeight = ChatStringWrappedGetHeight(inputLine, _chatWidth - 10); _chatTop -= inputLineHeight; - for (int32_t i = 0; i < CHAT_HISTORY_SIZE; i++) + for (const auto& entry : _chatHistory) { - if (chat_history_get(i)[0] == '\0') + if (entry.empty()) { continue; } - - lineBuffer.assign(chat_history_get(i)); - auto lineCh = lineBuffer.c_str(); - int32_t lineHeight = chat_string_wrapped_get_height(static_cast(&lineCh), _chatWidth - 10); + lineBuffer = entry; + int32_t lineHeight = ChatStringWrappedGetHeight(lineBuffer, _chatWidth - 10); _chatTop -= (lineHeight + 5); } @@ -141,18 +137,18 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor) ScreenCoordsXY topLeft{ _chatLeft, _chatTop }; ScreenCoordsXY bottomRight{ _chatRight, _chatBottom }; ScreenCoordsXY bottomLeft{ _chatLeft, _chatBottom }; - gfx_set_dirty_blocks( + GfxSetDirtyBlocks( { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }); // Background area + Textbox - gfx_filter_rect( + GfxFilterRect( dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }, FilterPaletteID::Palette51); // Opaque grey background - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }, chatBackgroundColor, INSET_RECT_FLAG_FILL_NONE); - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { topLeft + ScreenCoordsXY{ 1, -4 }, bottomRight - ScreenCoordsXY{ 1, inputLineHeight + 6 } }, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET); - gfx_fill_rect_inset( + GfxFillRectInset( dpi, { bottomLeft + ScreenCoordsXY{ 1, -inputLineHeight - 5 }, bottomRight + ScreenCoordsXY{ -1, 4 } }, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET); // Textbox @@ -162,18 +158,21 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor) int32_t stringHeight = 0; // Draw chat history - for (int32_t i = 0; i < CHAT_HISTORY_SIZE; i++, screenCoords.y -= stringHeight) + for (size_t i = 0; i < CHAT_HISTORY_SIZE; i++, screenCoords.y -= stringHeight) { - uint32_t expireTime = chat_history_get_time(i) + 10000; + if (i >= _chatHistory.size()) + break; + + uint32_t expireTime = ChatHistoryGetTime(i) + 10000; if (!gChatOpen && Platform::GetTicks() > expireTime) { break; } - lineBuffer.assign(chat_history_get(i)); + lineBuffer = ChatGetHistory(i); auto lineCh = lineBuffer.c_str(); - stringHeight = chat_history_draw_string(dpi, lineCh, screenCoords, _chatWidth - 10) + 5; - gfx_set_dirty_blocks( + stringHeight = ChatHistoryDrawString(dpi, lineCh, screenCoords, _chatWidth - 10) + 5; + GfxSetDirtyBlocks( { { screenCoords - ScreenCoordsXY{ 0, stringHeight } }, { screenCoords + ScreenCoordsXY{ _chatWidth, 20 } } }); if ((screenCoords.y - stringHeight) < 50) @@ -194,93 +193,91 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor) auto ft = Formatter(); ft.Add(lineCh); inputLineHeight = DrawTextWrapped( - dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, _chatWidth - 10, STR_STRING, ft, { TEXT_COLOUR_255 }); - gfx_set_dirty_blocks({ screenCoords, { screenCoords + ScreenCoordsXY{ _chatWidth, inputLineHeight + 15 } } }); + *dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, _chatWidth - 10, STR_STRING, ft, { TEXT_COLOUR_255 }); + GfxSetDirtyBlocks({ screenCoords, { screenCoords + ScreenCoordsXY{ _chatWidth, inputLineHeight + 15 } } }); // TODO: Show caret if the input text has multiple lines - if (_chatCaretTicks < 15 && gfx_get_string_width(lineBuffer, FontStyle::Medium) < (_chatWidth - 10)) + if (_chatCaretTicks < 15 && GfxGetStringWidth(lineBuffer, FontStyle::Medium) < (_chatWidth - 10)) { - lineBuffer.assign(_chatCurrentLine, _chatTextInputSession->SelectionStart); - int32_t caretX = screenCoords.x + gfx_get_string_width(lineBuffer, FontStyle::Medium); + lineBuffer.assign(_chatCurrentLine.c_str(), _chatTextInputSession->SelectionStart); + int32_t caretX = screenCoords.x + GfxGetStringWidth(lineBuffer, FontStyle::Medium); int32_t caretY = screenCoords.y + 14; - gfx_fill_rect(dpi, { { caretX, caretY }, { caretX + 6, caretY + 1 } }, PALETTE_INDEX_56); + GfxFillRect(dpi, { { caretX, caretY }, { caretX + 6, caretY + 1 } }, PALETTE_INDEX_56); } } } -void chat_history_add(std::string_view s) +void ChatAddHistory(std::string_view s) { // Format a timestamp time_t timer{}; time(&timer); auto tmInfo = localtime(&timer); char timeBuffer[64]{}; - strcatftime(timeBuffer, sizeof(timeBuffer), "[%H:%M] ", tmInfo); + StrCatFTime(timeBuffer, sizeof(timeBuffer), "[%H:%M] ", tmInfo); std::string buffer = timeBuffer; buffer += s; - // Add to history list - int32_t index = _chatHistoryIndex % CHAT_HISTORY_SIZE; - std::fill_n(_chatHistory[index], CHAT_INPUT_SIZE, 0x00); - std::memcpy(_chatHistory[index], buffer.c_str(), std::min(buffer.size(), CHAT_INPUT_SIZE - 1)); - _chatHistoryTime[index] = Platform::GetTicks(); - _chatHistoryIndex++; + if (_chatHistory.size() >= CHAT_HISTORY_SIZE) + { + _chatHistory.pop_back(); + _chatHistoryTime.pop_back(); + } + + _chatHistory.push_front(buffer); + _chatHistoryTime.push_front(Platform::GetTicks()); // Log to file (src only as logging does its own timestamp) - network_append_chat_log(s); + NetworkAppendChatLog(s); CreateAudioChannel(SoundId::NewsItem, 0, MIXER_VOLUME_MAX, 0.5f, 1.5f, true); } -void chat_input(ChatInput input) +void ChatInput(enum ChatInput input) { switch (input) { case ChatInput::Send: - if (_chatCurrentLine[0] != '\0') + if (!_chatCurrentLine.empty()) { - network_send_chat(_chatCurrentLine); + NetworkSendChat(_chatCurrentLine.c_str()); } - chat_clear_input(); - chat_close(); + ChatClearInput(); + ChatClose(); break; case ChatInput::Close: - chat_close(); + ChatClose(); break; default: break; } } -static const char* chat_history_get(uint32_t index) +static const u8string& ChatGetHistory(size_t index) { - return _chatHistory[(_chatHistoryIndex + CHAT_HISTORY_SIZE - index - 1) % CHAT_HISTORY_SIZE]; + return _chatHistory[index]; } -static uint32_t chat_history_get_time(uint32_t index) +static uint32_t ChatHistoryGetTime(size_t index) { - return _chatHistoryTime[(_chatHistoryIndex + CHAT_HISTORY_SIZE - index - 1) % CHAT_HISTORY_SIZE]; + return _chatHistoryTime[index]; } -static void chat_clear_input() +static void ChatClearInput() { - _chatCurrentLine[0] = 0; + _chatCurrentLine.clear(); } // This method is the same as gfx_draw_string_left_wrapped. // But this adjusts the initial Y coordinate depending of the number of lines. -static int32_t chat_history_draw_string( - rct_drawpixelinfo* dpi, const char* text, const ScreenCoordsXY& screenCoords, int32_t width) +static int32_t ChatHistoryDrawString(DrawPixelInfo* dpi, const char* text, const ScreenCoordsXY& screenCoords, int32_t width) { - char buffer[CommonTextBufferSize]; - auto bufferPtr = buffer; - FormatStringToBuffer(buffer, sizeof(buffer), "{OUTLINE}{WHITE}{STRING}", text); - int32_t numLines; - gfx_wrap_string(bufferPtr, width, FontStyle::Medium, &numLines); - auto lineHeight = font_get_line_height(FontStyle::Medium); + u8string wrappedString; + GfxWrapString(FormatString("{OUTLINE}{WHITE}{STRING}", text), width, FontStyle::Medium, &wrappedString, &numLines); + auto lineHeight = FontGetLineHeight(FontStyle::Medium); int32_t expectedY = screenCoords.y - (numLines * lineHeight); if (expectedY < 50) @@ -288,11 +285,12 @@ static int32_t chat_history_draw_string( return (numLines * lineHeight); // Skip drawing, return total height. } - auto lineY = screenCoords.y; + const utf8* bufferPtr = wrappedString.data(); + int32_t lineY = screenCoords.y; for (int32_t line = 0; line <= numLines; ++line) { - gfx_draw_string(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { TEXT_COLOUR_254 }); - bufferPtr = get_string_end(bufferPtr) + 1; + GfxDrawString(*dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { TEXT_COLOUR_254 }); + bufferPtr = GetStringEnd(bufferPtr) + 1; lineY += lineHeight; } return lineY - screenCoords.y; @@ -300,22 +298,10 @@ static int32_t chat_history_draw_string( // Wrap string without drawing, useful to get the height of a wrapped string. // Almost the same as gfx_draw_string_left_wrapped -int32_t chat_string_wrapped_get_height(void* args, int32_t width) +int32_t ChatStringWrappedGetHeight(u8string_view args, int32_t width) { - char buffer[CommonTextBufferSize]; - auto bufferPtr = buffer; - format_string(bufferPtr, 256, STR_STRING, args); - int32_t numLines; - gfx_wrap_string(bufferPtr, width, FontStyle::Medium, &numLines); - int32_t lineHeight = font_get_line_height(FontStyle::Medium); - - int32_t lineY = 0; - for (int32_t line = 0; line <= numLines; ++line) - { - bufferPtr = get_string_end(bufferPtr) + 1; - lineY += lineHeight; - } - - return lineY; + GfxWrapString(FormatStringID(STR_STRING, args), width, FontStyle::Medium, nullptr, &numLines); + const int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); + return lineHeight * (numLines + 1); } diff --git a/src/openrct2/interface/Chat.h b/src/openrct2/interface/Chat.h index 77bcd61393..54ba3a6a25 100644 --- a/src/openrct2/interface/Chat.h +++ b/src/openrct2/interface/Chat.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,6 +10,7 @@ #pragma once #include "../common.h" +#include "../core/String.hpp" #include @@ -18,7 +19,7 @@ #define CHAT_MAX_MESSAGE_LENGTH 200 #define CHAT_MAX_WINDOW_WIDTH 600 -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct ScreenCoordsXY; enum class ChatInput : uint8_t @@ -30,16 +31,16 @@ enum class ChatInput : uint8_t extern bool gChatOpen; -bool chat_available(); -void chat_open(); -void chat_close(); -void chat_toggle(); +bool ChatAvailable(); +void ChatOpen(); +void ChatClose(); +void ChatToggle(); -void chat_init(); -void chat_update(); -void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColour); +void ChatInit(); +void ChatUpdate(); +void ChatDraw(DrawPixelInfo* dpi, uint8_t chatBackgroundColour); -void chat_history_add(std::string_view s); -void chat_input(ChatInput input); +void ChatAddHistory(std::string_view s); +void ChatInput(ChatInput input); -int32_t chat_string_wrapped_get_height(void* args, int32_t width); +int32_t ChatStringWrappedGetHeight(u8string_view args, int32_t width); diff --git a/src/openrct2/interface/Colour.cpp b/src/openrct2/interface/Colour.cpp index 9c7209c34c..56bb2474a6 100644 --- a/src/openrct2/interface/Colour.cpp +++ b/src/openrct2/interface/Colour.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,7 +16,7 @@ #include #include -rct_colour_map ColourMapA[COLOUR_COUNT] = {}; +ColourShadeMap ColourMapA[COLOUR_COUNT] = {}; enum { @@ -34,12 +34,12 @@ enum INDEX_COLOUR_11 = 254, }; -void colours_init_maps() +void ColoursInitMaps() { // Get colour maps from g1 for (int32_t i = 0; i < COLOUR_COUNT; i++) { - const rct_g1_element* g1 = gfx_get_g1_element(SPR_PALETTE_2_START + i); + const G1Element* g1 = GfxGetG1Element(SPR_PALETTE_2_START + i); if (g1 != nullptr) { ColourMapA[i].colour_0 = g1->offset[INDEX_COLOUR_0]; @@ -106,7 +106,7 @@ namespace Colour #ifndef NO_TTF static uint8_t BlendColourMap[PALETTE_COUNT][PALETTE_COUNT] = { 0 }; -static uint8_t findClosestPaletteIndex(uint8_t red, uint8_t green, uint8_t blue) +static uint8_t FindClosestPaletteIndex(uint8_t red, uint8_t green, uint8_t blue) { int16_t closest = -1; int32_t closestDistance = INT32_MAX; @@ -126,7 +126,7 @@ static uint8_t findClosestPaletteIndex(uint8_t red, uint8_t green, uint8_t blue) return closest; } -uint8_t blendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2) +uint8_t BlendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2) { const uint8_t cMin = std::min(paletteIndex1, paletteIndex2); const uint8_t cMax = std::max(paletteIndex1, paletteIndex2); @@ -140,7 +140,7 @@ uint8_t blendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2) uint8_t green = (gPalette[cMin].Green + gPalette[cMax].Green) / 2; uint8_t blue = (gPalette[cMin].Blue + gPalette[cMax].Blue) / 2; - BlendColourMap[cMin][cMax] = findClosestPaletteIndex(red, green, blue); + BlendColourMap[cMin][cMax] = FindClosestPaletteIndex(red, green, blue); return BlendColourMap[cMin][cMax]; } #endif diff --git a/src/openrct2/interface/Colour.h b/src/openrct2/interface/Colour.h index 92d4da51b3..5a3f8d066c 100644 --- a/src/openrct2/interface/Colour.h +++ b/src/openrct2/interface/Colour.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -189,11 +189,11 @@ enum COLOUR_FLAG_8 = (1 << 8) }; -#define TRANSLUCENT(x) ((x) | COLOUR_FLAG_TRANSLUCENT) -#define NOT_TRANSLUCENT(x) ((x) & ~COLOUR_FLAG_TRANSLUCENT) +#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 rct_colour_map +struct ColourShadeMap { uint8_t colour_0; uint8_t colour_1; @@ -209,9 +209,9 @@ struct rct_colour_map uint8_t colour_11; }; -extern rct_colour_map ColourMapA[COLOUR_COUNT]; +extern ColourShadeMap ColourMapA[COLOUR_COUNT]; -void colours_init_maps(); +void ColoursInitMaps(); namespace Colour { @@ -219,5 +219,5 @@ namespace Colour } #ifndef NO_TTF -uint8_t blendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2); +uint8_t BlendColours(const uint8_t paletteIndex1, const uint8_t paletteIndex2); #endif diff --git a/src/openrct2/interface/Cursors.cpp b/src/openrct2/interface/Cursors.cpp index 5c66b9a29e..78887975f3 100644 --- a/src/openrct2/interface/Cursors.cpp +++ b/src/openrct2/interface/Cursors.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/interface/Cursors.h b/src/openrct2/interface/Cursors.h index c61af227f9..f64627597b 100644 --- a/src/openrct2/interface/Cursors.h +++ b/src/openrct2/interface/Cursors.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/interface/FontFamilies.cpp b/src/openrct2/interface/FontFamilies.cpp index 4c167ee978..7eb9f17253 100644 --- a/src/openrct2/interface/FontFamilies.cpp +++ b/src/openrct2/interface/FontFamilies.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/interface/FontFamilies.h b/src/openrct2/interface/FontFamilies.h index 01ad55765a..084d058426 100644 --- a/src/openrct2/interface/FontFamilies.h +++ b/src/openrct2/interface/FontFamilies.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/interface/Fonts.cpp b/src/openrct2/interface/Fonts.cpp index 14b7a69248..7997494ccf 100644 --- a/src/openrct2/interface/Fonts.cpp +++ b/src/openrct2/interface/Fonts.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -107,7 +107,7 @@ TTFFontSetDescriptor TTFFontMicroHei = { { static void LoadSpriteFont(LocalisationService& localisationService) { - ttf_dispose(); + TTFDispose(); localisationService.UseTrueTypeFont(false); #ifndef NO_TTF gCurrentTTFFontSet = nullptr; @@ -120,27 +120,27 @@ static bool LoadFont(LocalisationService& localisationService, TTFFontSetDescrip localisationService.UseTrueTypeFont(true); gCurrentTTFFontSet = font; - ttf_dispose(); - bool fontInitialised = ttf_initialise(); + TTFDispose(); + bool fontInitialised = TTFInitialise(); return fontInitialised; } static bool LoadCustomConfigFont(LocalisationService& localisationService) { static TTFFontSetDescriptor TTFFontCustom = { { - { gConfigFonts.FileName, gConfigFonts.FontName, gConfigFonts.SizeTiny, gConfigFonts.OffsetX, gConfigFonts.OffsetY, - gConfigFonts.HeightTiny, gConfigFonts.HintingThreshold, nullptr }, - { gConfigFonts.FileName, gConfigFonts.FontName, gConfigFonts.SizeSmall, gConfigFonts.OffsetX, gConfigFonts.OffsetY, - gConfigFonts.HeightSmall, gConfigFonts.HintingThreshold, nullptr }, - { gConfigFonts.FileName, gConfigFonts.FontName, gConfigFonts.SizeMedium, gConfigFonts.OffsetX, gConfigFonts.OffsetY, - gConfigFonts.HeightMedium, gConfigFonts.HintingThreshold, nullptr }, + { 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 }, } }; - ttf_dispose(); + TTFDispose(); localisationService.UseTrueTypeFont(true); gCurrentTTFFontSet = &TTFFontCustom; - bool fontInitialised = ttf_initialise(); + bool fontInitialised = TTFInitialise(); return fontInitialised; } #endif // NO_TTF @@ -153,13 +153,13 @@ void TryLoadFonts(LocalisationService& localisationService) if (fontFamily != FAMILY_OPENRCT2_SPRITE) { - if (!String::IsNullOrEmpty(gConfigFonts.FileName)) + if (!gConfigFonts.FileName.empty()) { if (LoadCustomConfigFont(localisationService)) { return; } - log_verbose("Unable to initialise configured TrueType font -- falling back to the language's default."); + LOG_VERBOSE("Unable to initialise configured TrueType font -- falling back to the language's default."); } for (auto& font : *fontFamily) @@ -170,12 +170,12 @@ void TryLoadFonts(LocalisationService& localisationService) } TTFFontDescriptor smallFont = font->size[EnumValue(FontStyle::Small)]; - log_verbose("Unable to load TrueType font '%s' -- trying the next font in the family.", smallFont.font_name); + LOG_VERBOSE("Unable to load TrueType font '%s' -- trying the next font in the family.", smallFont.font_name); } if (fontFamily != &TTFFamilySansSerif) { - log_verbose("Unable to initialise any of the preferred TrueType fonts -- falling back to sans serif fonts."); + LOG_VERBOSE("Unable to initialise any of the preferred TrueType fonts -- falling back to sans serif fonts."); for (auto& font : TTFFamilySansSerif) { @@ -185,10 +185,10 @@ void TryLoadFonts(LocalisationService& localisationService) } TTFFontDescriptor smallFont = font->size[EnumValue(FontStyle::Small)]; - log_verbose("Unable to load TrueType font '%s' -- trying the next font in the family.", smallFont.font_name); + LOG_VERBOSE("Unable to load TrueType font '%s' -- trying the next font in the family.", smallFont.font_name); } - log_verbose("Unable to initialise any of the preferred TrueType fonts -- falling back to sprite font."); + LOG_VERBOSE("Unable to initialise any of the preferred TrueType fonts -- falling back to sprite font."); } } #endif // NO_TTF diff --git a/src/openrct2/interface/Fonts.h b/src/openrct2/interface/Fonts.h index 89adade5dc..258e72b6e6 100644 --- a/src/openrct2/interface/Fonts.h +++ b/src/openrct2/interface/Fonts.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index c11ebf8609..0d10c88ab0 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,13 +16,13 @@ #include "../PlatformEnvironment.h" #include "../ReplayManager.h" #include "../Version.h" +#include "../actions/CheatSetAction.h" #include "../actions/ClimateSetAction.h" #include "../actions/ParkSetParameterAction.h" #include "../actions/RideFreezeRatingAction.h" #include "../actions/RideSetPriceAction.h" #include "../actions/RideSetSettingAction.h" #include "../actions/ScenarioSetSettingAction.h" -#include "../actions/SetCheatAction.h" #include "../actions/StaffSetCostumeAction.h" #include "../config/Config.h" #include "../core/Console.hpp" @@ -38,6 +38,7 @@ #include "../interface/Chat.h" #include "../interface/Colour.h" #include "../interface/Window_internal.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../management/NewsItem.h" @@ -83,15 +84,15 @@ static constexpr const char* ClimateNames[] = { "cold", }; -static int32_t console_parse_int(const std::string& src, bool* valid); -static double console_parse_double(const std::string& src, bool* valid); +static int32_t ConsoleParseInt(const std::string& src, bool* valid); +static double ConsoleParseDouble(const std::string& src, bool* valid); -static void console_write_all_commands(InteractiveConsole& console); -static int32_t cc_variables(InteractiveConsole& console, const arguments_t& argv); -static int32_t cc_windows(InteractiveConsole& console, const arguments_t& argv); -static int32_t cc_help(InteractiveConsole& console, const arguments_t& argv); +static void ConsoleWriteAllCommands(InteractiveConsole& console); +static int32_t ConsoleCommandVariables(InteractiveConsole& console, const arguments_t& argv); +static int32_t ConsoleCommandWindows(InteractiveConsole& console, const arguments_t& argv); +static int32_t ConsoleCommandHelp(InteractiveConsole& console, const arguments_t& argv); -static bool invalidArguments(bool* invalid, bool arguments); +static bool InvalidArguments(bool* invalid, bool arguments); #define SET_FLAG(variable, flag, value) \ { \ @@ -101,7 +102,7 @@ static bool invalidArguments(bool* invalid, bool arguments); variable &= ~(flag); \ } -static int32_t console_parse_int(const std::string& src, bool* valid) +static int32_t ConsoleParseInt(const std::string& src, bool* valid) { utf8* end; int32_t value; @@ -110,7 +111,7 @@ static int32_t console_parse_int(const std::string& src, bool* valid) return value; } -static double console_parse_double(const std::string& src, bool* valid) +static double ConsoleParseDouble(const std::string& src, bool* valid) { utf8* end; double value; @@ -119,32 +120,32 @@ static double console_parse_double(const std::string& src, bool* valid) return value; } -static int32_t cc_clear(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandClear(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { console.Clear(); return 0; } -static int32_t cc_close(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandClose(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { console.Close(); return 0; } -static int32_t cc_hide(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandHide(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { console.Hide(); return 0; } -static int32_t cc_echo(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandEcho(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) console.WriteLine(argv[0]); return 0; } -static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandRides(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) { @@ -169,7 +170,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) { char mode_name[128] = { 0 }; StringId mode_string_id = RideModeNames[i]; - format_string(mode_name, 128, mode_string_id, nullptr); + OpenRCT2::FormatStringLegacy(mode_name, 128, mode_string_id, nullptr); console.WriteFormatLine("%02d - %s", i, mode_name); } } @@ -188,8 +189,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) if (argv[1] == "type") { bool int_valid[2] = { false }; - int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); - int32_t type = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = ConsoleParseInt(argv[2], &int_valid[0]); + int32_t type = ConsoleParseInt(argv[3], &int_valid[1]); if (!int_valid[0] || !int_valid[1]) { console.WriteFormatLine("This command expects integer arguments"); @@ -200,8 +201,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) } else { - int32_t res = set_operating_setting(RideId::FromUnderlying(ride_index), RideSetSetting::RideType, type); - if (res == MONEY32_UNDEFINED) + auto res = SetOperatingSetting(RideId::FromUnderlying(ride_index), RideSetSetting::RideType, type); + if (res == MONEY64_UNDEFINED) { if (!gCheatsAllowArbitraryRideTypeChanges) { @@ -218,8 +219,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else if (argv[1] == "mode") { bool int_valid[2] = { false }; - int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); - int32_t mode = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = ConsoleParseInt(argv[2], &int_valid[0]); + int32_t mode = ConsoleParseInt(argv[3], &int_valid[1]); if (!int_valid[0] || !int_valid[1]) { console.WriteFormatLine("This command expects integer arguments"); @@ -230,7 +231,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) } else { - auto ride = get_ride(RideId::FromUnderlying(ride_index)); + auto ride = GetRide(RideId::FromUnderlying(ride_index)); if (mode >= static_cast(RideMode::Count)) { console.WriteFormatLine("Invalid ride mode."); @@ -242,15 +243,15 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else { ride->mode = static_cast(mode & 0xFF); - invalidate_test_results(ride); + InvalidateTestResults(*ride); } } } else if (argv[1] == "mass") { bool int_valid[2] = { false }; - int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); - int32_t mass = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = ConsoleParseInt(argv[2], &int_valid[0]); + int32_t mass = ConsoleParseInt(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -262,7 +263,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) } else { - auto ride = get_ride(RideId::FromUnderlying(ride_index)); + auto ride = GetRide(RideId::FromUnderlying(ride_index)); if (mass <= 0) { console.WriteFormatLine("Friction value must be strictly positive"); @@ -287,8 +288,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else if (argv[1] == "excitement") { bool int_valid[2] = { false }; - int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); - ride_rating excitement = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = ConsoleParseInt(argv[2], &int_valid[0]); + ride_rating excitement = ConsoleParseInt(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -301,7 +302,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else { auto rideIndex = RideId::FromUnderlying(ride_index); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (excitement <= 0) { console.WriteFormatLine("Excitement value must be strictly positive"); @@ -320,8 +321,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else if (argv[1] == "intensity") { bool int_valid[2] = { false }; - int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); - ride_rating intensity = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = ConsoleParseInt(argv[2], &int_valid[0]); + ride_rating intensity = ConsoleParseInt(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -334,7 +335,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else { auto rideIndex = RideId::FromUnderlying(ride_index); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (intensity <= 0) { console.WriteFormatLine("Intensity value must be strictly positive"); @@ -353,8 +354,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else if (argv[1] == "nausea") { bool int_valid[2] = { false }; - int32_t ride_index = console_parse_int(argv[2], &int_valid[0]); - ride_rating nausea = console_parse_int(argv[3], &int_valid[1]); + int32_t ride_index = ConsoleParseInt(argv[2], &int_valid[0]); + ride_rating nausea = ConsoleParseInt(argv[3], &int_valid[1]); if (ride_index < 0) { @@ -367,7 +368,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else { auto rideIndex = RideId::FromUnderlying(ride_index); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (nausea <= 0) { console.WriteFormatLine("Nausea value must be strictly positive"); @@ -388,7 +389,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) bool int_valid[2] = { false }; if (argv[2] == "all") { - auto arg1 = console_parse_int(argv[3], &int_valid[0]); + auto arg1 = ConsoleParseInt(argv[3], &int_valid[0]); if (argv.size() <= 4) { auto price = arg1; @@ -408,7 +409,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) else { auto rideType = arg1; - auto price = console_parse_int(argv[4], &int_valid[1]); + auto price = ConsoleParseInt(argv[4], &int_valid[1]); if (int_valid[0] && int_valid[1]) { @@ -429,8 +430,8 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) } else { - int32_t rideId = console_parse_int(argv[2], &int_valid[0]); - money16 price = console_parse_int(argv[3], &int_valid[1]); + int32_t rideId = ConsoleParseInt(argv[2], &int_valid[0]); + money64 price = ConsoleParseInt(argv[3], &int_valid[1]); if (!int_valid[0] || !int_valid[1]) { @@ -452,7 +453,7 @@ static int32_t cc_rides(InteractiveConsole& console, const arguments_t& argv) return 0; } -static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandStaff(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) { @@ -462,7 +463,7 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv) { auto name = peep->GetName(); console.WriteFormatLine( - "staff id %03d type: %02u energy %03u name %s", peep->sprite_index, peep->AssignedStaffType, peep->Energy, + "staff id %03d type: %02u energy %03u name %s", peep->Id, peep->AssignedStaffType, peep->Energy, name.c_str()); } } @@ -476,7 +477,7 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv) { char costume_name[128] = { 0 }; StringId costume = StaffCostumeNames[i]; - format_string(costume_name, 128, STR_DROPDOWN_MENU_LABEL, &costume); + OpenRCT2::FormatStringLegacy(costume_name, 128, STR_DROPDOWN_MENU_LABEL, &costume); // That's a terrible hack here. Costume names include inline sprites // that don't work well with the console, so manually skip past them. console.WriteFormatLine(" costume %i: %s", i, costume_name + 7); @@ -487,8 +488,8 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv) { int32_t int_val[3]; bool int_valid[3] = { false }; - int_val[0] = console_parse_int(argv[2], &int_valid[0]); - int_val[1] = console_parse_int(argv[3], &int_valid[1]); + int_val[0] = ConsoleParseInt(argv[2], &int_valid[0]); + int_val[1] = ConsoleParseInt(argv[3], &int_valid[1]); if (int_valid[0] && int_valid[1]) { @@ -504,8 +505,8 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv) { int32_t int_val[2]; bool int_valid[2] = { false }; - int_val[0] = console_parse_int(argv[2], &int_valid[0]); - int_val[1] = console_parse_int(argv[3], &int_valid[1]); + int_val[0] = ConsoleParseInt(argv[2], &int_valid[0]); + int_val[1] = ConsoleParseInt(argv[3], &int_valid[1]); if (!int_valid[0]) { console.WriteLineError("Invalid staff ID"); @@ -541,7 +542,7 @@ static int32_t cc_staff(InteractiveConsole& console, const arguments_t& argv) return 0; } -static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) { @@ -673,11 +674,11 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv) } else if (argv[0] == "location") { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr) { - rct_viewport* viewport = window_get_viewport(w); - auto info = get_map_coordinates_from_pos( + Viewport* viewport = WindowGetViewport(w); + auto info = GetMapCoordinatesFromPos( { viewport->view_width / 2, viewport->view_height / 2 }, EnumsToFlags(ViewportInteractionItem::Terrain)); auto tileMapCoord = TileCoordsXY(info.Loc); @@ -714,7 +715,7 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv) } else if (argv[0] == "current_rotation") { - console.WriteFormatLine("current_rotation %d", get_current_rotation()); + console.WriteFormatLine("current_rotation %d", GetCurrentRotation()); } else if (argv[0] == "host_timescale") { @@ -733,7 +734,7 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv) } return 0; } -static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t& argv) { if (argv.size() > 1) { @@ -747,8 +748,8 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) { if (i + 1 < argv.size()) { - int_val[i] = console_parse_int(argv[i + 1], &int_valid[i]); - double_val[i] = console_parse_double(argv[i + 1], &double_valid[i]); + int_val[i] = ConsoleParseInt(argv[i + 1], &int_valid[i]); + double_val[i] = ConsoleParseDouble(argv[i + 1], &double_valid[i]); } else { @@ -759,29 +760,29 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) } } - if (argv[0] == "money" && invalidArguments(&invalidArgs, double_valid[0])) + if (argv[0] == "money" && InvalidArguments(&invalidArgs, double_valid[0])) { - money32 money = ToMoney64FromGBP(double_val[0]); + money64 money = ToMoney64FromGBP(double_val[0]); if (gCash != money) { - auto setCheatAction = SetCheatAction(CheatType::SetMoney, money); - setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { + auto cheatSetAction = CheatSetAction(CheatType::SetMoney, money); + cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set money command failed, likely due to permissions."); else console.Execute("get money"); }); - GameActions::Execute(&setCheatAction); + GameActions::Execute(&cheatSetAction); } else { console.Execute("get money"); } } - else if (argv[0] == "scenario_initial_cash" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "scenario_initial_cash" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::InitialCash, std::clamp(ToMoney32FromGBP(int_val[0]), 0.00_GBP, 1000000.00_GBP)); + ScenarioSetSetting::InitialCash, std::clamp(ToMoney64FromGBP(int_val[0]), 0.00_GBP, 1000000.00_GBP)); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set scenario_initial_cash command failed, likely due to permissions."); @@ -790,12 +791,11 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "current_loan" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "current_loan" && InvalidArguments(&invalidArgs, int_valid[0])) { - auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::InitialLoan, - std::clamp( - ToMoney64FromGBP(int_val[0]) - ToMoney64FromGBP(int_val[0] % 1000), 0.00_GBP, gMaxBankLoan)); + auto amount = std::clamp( + ToMoney64FromGBP(int_val[0]) - ToMoney64FromGBP(int_val[0] % 1000), 0.00_GBP, gMaxBankLoan); + auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::InitialLoan, amount); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set current_loan command failed, likely due to permissions."); @@ -804,11 +804,11 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "max_loan" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "max_loan" && InvalidArguments(&invalidArgs, int_valid[0])) { - auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::MaximumLoanSize, - std::clamp(ToMoney32FromGBP(int_val[0]) - ToMoney32FromGBP(int_val[0] % 1000), 0.00_GBP, 5000000.00_GBP)); + auto amount = std::clamp( + ToMoney64FromGBP(int_val[0]) - ToMoney64FromGBP(int_val[0] % 1000), 0.00_GBP, 5000000.00_GBP); + auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::MaximumLoanSize, amount); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set max_loan command failed, likely due to permissions."); @@ -817,10 +817,10 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "guest_initial_cash" && invalidArguments(&invalidArgs, double_valid[0])) + else if (argv[0] == "guest_initial_cash" && InvalidArguments(&invalidArgs, double_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::AverageCashPerGuest, std::clamp(ToMoney32FromGBP(double_val[0]), 0.00_GBP, 1000.00_GBP)); + ScenarioSetSetting::AverageCashPerGuest, std::clamp(ToMoney64FromGBP(double_val[0]), 0.00_GBP, 1000.00_GBP)); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set guest_initial_cash command failed, likely due to permissions."); @@ -829,7 +829,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "guest_initial_happiness" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "guest_initial_happiness" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::GuestInitialHappiness, CalculateGuestInitialHappiness(static_cast(int_val[0]))); @@ -841,7 +841,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "guest_initial_hunger" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "guest_initial_hunger" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::GuestInitialHunger, (std::clamp(int_val[0], 1, 84) * 255 / 100 - 255) * -1); @@ -853,7 +853,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "guest_initial_thirst" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "guest_initial_thirst" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::GuestInitialThirst, (std::clamp(int_val[0], 1, 84) * 255 / 100 - 255) * -1); @@ -865,7 +865,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "guest_prefer_less_intense_rides" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "guest_prefer_less_intense_rides" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::GuestsPreferLessIntenseRides, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -876,7 +876,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "guest_prefer_more_intense_rides" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "guest_prefer_more_intense_rides" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::GuestsPreferMoreIntenseRides, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -887,7 +887,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "forbid_marketing_campaigns" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "forbid_marketing_campaigns" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::ForbidMarketingCampaigns, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -898,7 +898,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "forbid_landscape_changes" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "forbid_landscape_changes" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::ForbidLandscapeChanges, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -909,7 +909,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "forbid_tree_removal" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "forbid_tree_removal" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::ForbidTreeRemoval, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -920,7 +920,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "forbid_high_construction" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "forbid_high_construction" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::ForbidHighConstruction, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -931,23 +931,23 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "pay_for_rides" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "pay_for_rides" && InvalidArguments(&invalidArgs, int_valid[0])) { SET_FLAG(gParkFlags, PARK_FLAGS_PARK_FREE_ENTRY, int_val[0]); console.Execute("get pay_for_rides"); } - else if (argv[0] == "no_money" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "no_money" && InvalidArguments(&invalidArgs, int_valid[0])) { - auto setCheatAction = SetCheatAction(CheatType::NoMoney, int_val[0] != 0); - setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { + auto cheatSetAction = CheatSetAction(CheatType::NoMoney, int_val[0] != 0); + cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set no_money command failed, likely due to permissions."); else console.Execute("get no_money"); }); - GameActions::Execute(&setCheatAction); + GameActions::Execute(&cheatSetAction); } - else if (argv[0] == "difficult_park_rating" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "difficult_park_rating" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::ParkRatingHigherDifficultyLevel, int_val[0]); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -958,7 +958,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "difficult_guest_generation" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "difficult_guest_generation" && InvalidArguments(&invalidArgs, int_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::GuestGenerationHigherDifficultyLevel, int_val[0]); @@ -970,7 +970,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "park_open" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "park_open" && InvalidArguments(&invalidArgs, int_valid[0])) { auto parkSetParameter = ParkSetParameterAction((int_val[0] == 1) ? ParkParameter::Open : ParkParameter::Close); parkSetParameter.SetCallback([&console](const GameAction*, const GameActions::Result* res) { @@ -981,10 +981,10 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&parkSetParameter); } - else if (argv[0] == "land_rights_cost" && invalidArguments(&invalidArgs, double_valid[0])) + else if (argv[0] == "land_rights_cost" && InvalidArguments(&invalidArgs, double_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::CostToBuyLand, std::clamp(ToMoney32FromGBP(double_val[0]), 0.00_GBP, 200.00_GBP)); + ScenarioSetSetting::CostToBuyLand, std::clamp(ToMoney64FromGBP(double_val[0]), 0.00_GBP, 200.00_GBP)); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set land_rights_cost command failed, likely due to permissions."); @@ -993,11 +993,11 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) }); GameActions::Execute(&scenarioSetSetting); } - else if (argv[0] == "construction_rights_cost" && invalidArguments(&invalidArgs, double_valid[0])) + else if (argv[0] == "construction_rights_cost" && InvalidArguments(&invalidArgs, double_valid[0])) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::CostToBuyConstructionRights, - std::clamp(ToMoney32FromGBP(double_val[0]), 0.00_GBP, 200.00_GBP)); + std::clamp(ToMoney64FromGBP(double_val[0]), 0.00_GBP, 200.00_GBP)); scenarioSetSetting.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("set construction_rights_cost command failed, likely due to permissions."); @@ -1030,7 +1030,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) if (invalidArgs) { - console.WriteLine(language_get_string(STR_INVALID_CLIMATE_ID)); + console.WriteLine(LanguageGetString(STR_INVALID_CLIMATE_ID)); } else { @@ -1040,114 +1040,114 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) console.Execute("get climate"); } } - else if (argv[0] == "game_speed" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "game_speed" && InvalidArguments(&invalidArgs, int_valid[0])) { gGameSpeed = std::clamp(int_val[0], 1, 8); console.Execute("get game_speed"); } - else if (argv[0] == "console_small_font" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "console_small_font" && InvalidArguments(&invalidArgs, int_valid[0])) { gConfigInterface.ConsoleSmallFont = (int_val[0] != 0); ConfigSaveDefault(); console.Execute("get console_small_font"); } - else if (argv[0] == "location" && invalidArguments(&invalidArgs, int_valid[0] && int_valid[1])) + else if (argv[0] == "location" && InvalidArguments(&invalidArgs, int_valid[0] && int_valid[1])) { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr) { auto location = TileCoordsXYZ(int_val[0], int_val[1], 0).ToCoordsXYZ().ToTileCentre(); location.z = TileElementHeight(location); w->SetLocation(location); - viewport_update_position(w); + ViewportUpdatePosition(w); console.Execute("get location"); } } - else if (argv[0] == "window_scale" && invalidArguments(&invalidArgs, double_valid[0])) + 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(); - gfx_invalidate_screen(); + GfxInvalidateScreen(); ContextTriggerResize(); ContextUpdateCursorScale(); console.Execute("get window_scale"); } - else if (argv[0] == "window_limit" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "window_limit" && InvalidArguments(&invalidArgs, int_valid[0])) { - window_set_window_limit(int_val[0]); + WindowSetWindowLimit(int_val[0]); console.Execute("get window_limit"); } - else if (argv[0] == "render_weather_effects" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "render_weather_effects" && InvalidArguments(&invalidArgs, int_valid[0])) { gConfigGeneral.RenderWeatherEffects = (int_val[0] != 0); ConfigSaveDefault(); console.Execute("get render_weather_effects"); } - else if (argv[0] == "render_weather_gloom" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "render_weather_gloom" && InvalidArguments(&invalidArgs, int_valid[0])) { gConfigGeneral.RenderWeatherGloom = (int_val[0] != 0); ConfigSaveDefault(); console.Execute("get render_weather_gloom"); } - else if (argv[0] == "cheat_sandbox_mode" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "cheat_sandbox_mode" && InvalidArguments(&invalidArgs, int_valid[0])) { if (gCheatsSandboxMode != (int_val[0] != 0)) { - auto setCheatAction = SetCheatAction(CheatType::SandboxMode, int_val[0] != 0); - setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { + auto cheatSetAction = CheatSetAction(CheatType::SandboxMode, int_val[0] != 0); + cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("Network error: Permission denied!"); else console.Execute("get cheat_sandbox_mode"); }); - GameActions::Execute(&setCheatAction); + GameActions::Execute(&cheatSetAction); } else { console.Execute("get cheat_sandbox_mode"); } } - else if (argv[0] == "cheat_disable_clearance_checks" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "cheat_disable_clearance_checks" && InvalidArguments(&invalidArgs, int_valid[0])) { if (gCheatsDisableClearanceChecks != (int_val[0] != 0)) { - auto setCheatAction = SetCheatAction(CheatType::DisableClearanceChecks, int_val[0] != 0); - setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { + auto cheatSetAction = CheatSetAction(CheatType::DisableClearanceChecks, int_val[0] != 0); + cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("Network error: Permission denied!"); else console.Execute("get cheat_disable_clearance_checks"); }); - GameActions::Execute(&setCheatAction); + GameActions::Execute(&cheatSetAction); } else { console.Execute("get cheat_disable_clearance_checks"); } } - else if (argv[0] == "cheat_disable_support_limits" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "cheat_disable_support_limits" && InvalidArguments(&invalidArgs, int_valid[0])) { if (gCheatsDisableSupportLimits != (int_val[0] != 0)) { - auto setCheatAction = SetCheatAction(CheatType::DisableSupportLimits, int_val[0] != 0); - setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { + auto cheatSetAction = CheatSetAction(CheatType::DisableSupportLimits, int_val[0] != 0); + cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) console.WriteLineError("Network error: Permission denied!"); else console.Execute("get cheat_disable_support_limits"); }); - GameActions::Execute(&setCheatAction); + GameActions::Execute(&cheatSetAction); } else { console.Execute("get cheat_disable_support_limits"); } } - else if (argv[0] == "current_rotation" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "current_rotation" && InvalidArguments(&invalidArgs, int_valid[0])) { - uint8_t currentRotation = get_current_rotation(); - rct_window* mainWindow = window_get_main(); + uint8_t currentRotation = GetCurrentRotation(); + WindowBase* mainWindow = WindowGetMain(); int32_t newRotation = int_val[0]; if (newRotation < 0 || newRotation > 3) { @@ -1155,11 +1155,11 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) } else if (newRotation != currentRotation && mainWindow != nullptr) { - window_rotate_camera(*mainWindow, newRotation - currentRotation); + WindowRotateCamera(*mainWindow, newRotation - currentRotation); } console.Execute("get current_rotation"); } - else if (argv[0] == "host_timescale" && invalidArguments(&invalidArgs, double_valid[0])) + else if (argv[0] == "host_timescale" && InvalidArguments(&invalidArgs, double_valid[0])) { float newScale = static_cast(double_val[0]); @@ -1168,12 +1168,12 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) console.Execute("get host_timescale"); } #ifndef NO_TTF - else if (argv[0] == "enable_hinting" && invalidArguments(&invalidArgs, int_valid[0])) + else if (argv[0] == "enable_hinting" && InvalidArguments(&invalidArgs, int_valid[0])) { gConfigFonts.EnableHinting = (int_val[0] != 0); ConfigSaveDefault(); console.Execute("get enable_hinting"); - ttf_toggle_hinting(); + TTFToggleHinting(); } #endif else if (invalidArgs) @@ -1185,7 +1185,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) console.WriteLineError("Invalid variable."); } - gfx_invalidate_screen(); + GfxInvalidateScreen(); } else { @@ -1194,7 +1194,7 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) return 0; } -static int32_t cc_load_object(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandLoadObject(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) { @@ -1206,36 +1206,34 @@ static int32_t cc_load_object(InteractiveConsole& console, const arguments_t& ar name[i++] = *ch; } - const ObjectRepositoryItem* ori = object_repository_find_object_by_name(name); + const ObjectRepositoryItem* ori = ObjectRepositoryFindObjectByName(name); if (ori == nullptr) { console.WriteLineError("Could not find the object."); return 1; } - const rct_object_entry* entry = &ori->ObjectEntry; - const auto* loadedObject = object_manager_get_loaded_object(ObjectEntryDescriptor(*ori)); + const RCTObjectEntry* entry = &ori->ObjectEntry; + const auto* loadedObject = ObjectManagerGetLoadedObject(ObjectEntryDescriptor(*ori)); if (loadedObject != nullptr) { console.WriteLineError("Object is already in scenario."); return 1; } - loadedObject = object_manager_load_object(entry); + loadedObject = ObjectManagerLoadObject(entry); if (loadedObject == nullptr) { console.WriteLineError("Unable to load object."); return 1; } - auto groupIndex = object_manager_get_loaded_object_entry_index(loadedObject); + auto groupIndex = ObjectManagerGetLoadedObjectEntryIndex(loadedObject); ObjectType objectType = entry->GetType(); if (objectType == ObjectType::Ride) { // Automatically research the ride so it's supported by the game. - rct_ride_entry* rideEntry; - - rideEntry = get_ride_entry(groupIndex); + const auto* rideEntry = GetRideEntryByIndex(groupIndex); for (int32_t j = 0; j < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; j++) { @@ -1243,20 +1241,20 @@ static int32_t cc_load_object(InteractiveConsole& console, const arguments_t& ar if (rideType != RIDE_TYPE_NULL) { ResearchCategory category = GetRideTypeDescriptor(rideType).GetResearchCategory(); - research_insert_ride_entry(rideType, groupIndex, category, true); + ResearchInsertRideEntry(rideType, groupIndex, category, true); } } gSilentResearch = true; - research_reset_current_item(); + ResearchResetCurrentItem(); gSilentResearch = false; } else if (objectType == ObjectType::SceneryGroup) { - research_insert_scenery_group_entry(groupIndex, true); + ResearchInsertSceneryGroupEntry(groupIndex, true); gSilentResearch = true; - research_reset_current_item(); + ResearchResetCurrentItem(); gSilentResearch = false; } ScenerySetDefaultPlacementConfiguration(); @@ -1265,7 +1263,7 @@ static int32_t cc_load_object(InteractiveConsole& console, const arguments_t& ar ContextBroadcastIntent(&intent); gWindowUpdateTicks = 0; - gfx_invalidate_screen(); + GfxInvalidateScreen(); console.WriteLine("Object file loaded."); } @@ -1294,14 +1292,14 @@ constexpr std::array _objectTypeNames = { }; static_assert(_objectTypeNames.size() == EnumValue(ObjectType::Count)); -static int32_t cc_object_count(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandCountObjects(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { for (auto objectType : ObjectTypes) { int32_t entryGroupIndex = 0; for (; entryGroupIndex < object_entry_group_counts[EnumValue(objectType)]; entryGroupIndex++) { - if (object_entry_get_object(objectType, entryGroupIndex) == nullptr) + if (ObjectEntryGetObject(objectType, entryGroupIndex) == nullptr) { break; } @@ -1314,28 +1312,28 @@ static int32_t cc_object_count(InteractiveConsole& console, [[maybe_unused]] con return 0; } -static int32_t cc_open(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandOpen(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) { bool title = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) != 0; bool invalidTitle = false; - if (argv[0] == "object_selection" && invalidArguments(&invalidTitle, !title)) + if (argv[0] == "object_selection" && InvalidArguments(&invalidTitle, !title)) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteLineError("Cannot open this window in multiplayer mode."); } else { // Only this window should be open for safety reasons - window_close_all(); + WindowCloseAll(); ContextOpenWindow(WindowClass::EditorObjectSelection); } } - else if (argv[0] == "inventions_list" && invalidArguments(&invalidTitle, !title)) + else if (argv[0] == "inventions_list" && InvalidArguments(&invalidTitle, !title)) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteLineError("Cannot open this window in multiplayer mode."); } @@ -1344,13 +1342,13 @@ static int32_t cc_open(InteractiveConsole& console, const arguments_t& argv) ContextOpenWindow(WindowClass::EditorInventionList); } } - else if (argv[0] == "scenario_options" && invalidArguments(&invalidTitle, !title)) + else if (argv[0] == "scenario_options" && InvalidArguments(&invalidTitle, !title)) { ContextOpenWindow(WindowClass::EditorScenarioOptions); } - else if (argv[0] == "objective_options" && invalidArguments(&invalidTitle, !title)) + else if (argv[0] == "objective_options" && InvalidArguments(&invalidTitle, !title)) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteLineError("Cannot open this window in multiplayer mode."); } @@ -1379,23 +1377,23 @@ static int32_t cc_open(InteractiveConsole& console, const arguments_t& argv) return 0; } -static int32_t cc_remove_unused_objects(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandRemoveUnusedObjects(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { - int32_t result = editor_remove_unused_objects(); + int32_t result = EditorRemoveUnusedObjects(); console.WriteFormatLine("%d unused object entries have been removed.", result); return 0; } -static int32_t cc_remove_floating_objects(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandRemoveFloatingObjects(InteractiveConsole& console, const arguments_t& argv) { uint16_t result = RemoveFloatingEntities(); console.WriteFormatLine("Removed %d flying objects", result); return 0; } -static int32_t cc_remove_park_fences(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandRemoveParkFences(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do { @@ -1406,18 +1404,18 @@ static int32_t cc_remove_park_fences(InteractiveConsole& console, [[maybe_unused } } while (TileElementIteratorNext(&it)); - gfx_invalidate_screen(); + GfxInvalidateScreen(); console.WriteFormatLine("Park fences have been removed."); return 0; } -static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandShowLimits(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { const auto& tileElements = GetTileElements(); const auto tileElementCount = tileElements.size(); - int32_t rideCount = ride_get_count(); + int32_t rideCount = RideGetCount(); int32_t spriteCount = 0; for (int32_t i = 0; i < static_cast(EntityType::Count); ++i) { @@ -1434,7 +1432,7 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons return 0; } -static int32_t cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandForceDate([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { int32_t year = 0; int32_t month = 0; @@ -1485,13 +1483,13 @@ static int32_t cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe } } - date_set(year, month, day); - window_invalidate_by_class(WindowClass::BottomToolbar); + DateSet(year, month, day); + WindowInvalidateByClass(WindowClass::BottomToolbar); return 1; } -static int32_t cc_load_park([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandLoadPark([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (argv.size() < 1) { @@ -1527,23 +1525,23 @@ static int32_t cc_load_park([[maybe_unused]] InteractiveConsole& console, [[mayb return 1; } -static int32_t cc_save_park([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandSavePark([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (argv.size() < 1) { - save_game_cmd(); + SaveGameCmd(); } else { - save_game_cmd(argv[0].c_str()); + SaveGameCmd(argv[0].c_str()); } return 1; } -static int32_t cc_say(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandSay(InteractiveConsole& console, const arguments_t& argv) { - if (network_get_mode() == NETWORK_MODE_NONE || network_get_status() != NETWORK_STATUS_CONNECTED - || network_get_authstatus() != NetworkAuth::Ok) + if (NetworkGetMode() == NETWORK_MODE_NONE || NetworkGetStatus() != NETWORK_STATUS_CONNECTED + || NetworkGetAuthstatus() != NetworkAuth::Ok) { console.WriteFormatLine("This command only works in multiplayer mode."); return 0; @@ -1551,7 +1549,7 @@ static int32_t cc_say(InteractiveConsole& console, const arguments_t& argv) if (!argv.empty()) { - network_send_chat(argv[0].c_str()); + NetworkSendChat(argv[0].c_str()); return 1; } @@ -1559,9 +1557,9 @@ static int32_t cc_say(InteractiveConsole& console, const arguments_t& argv) return 0; } -static int32_t cc_replay_startrecord(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandReplayStartRecord(InteractiveConsole& console, const arguments_t& argv) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteFormatLine("This command is currently not supported in multiplayer mode."); return 0; @@ -1606,9 +1604,9 @@ static int32_t cc_replay_startrecord(InteractiveConsole& console, const argument return 0; } -static int32_t cc_replay_stoprecord(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandReplayStopRecord(InteractiveConsole& console, const arguments_t& argv) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteFormatLine("This command is currently not supported in multiplayer mode."); return 0; @@ -1641,9 +1639,9 @@ static int32_t cc_replay_stoprecord(InteractiveConsole& console, const arguments return 0; } -static int32_t cc_replay_start(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandReplayStart(InteractiveConsole& console, const arguments_t& argv) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteFormatLine("This command is currently not supported in multiplayer mode."); return 0; @@ -1683,9 +1681,9 @@ static int32_t cc_replay_start(InteractiveConsole& console, const arguments_t& a return 0; } -static int32_t cc_replay_stop(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandReplayStop(InteractiveConsole& console, const arguments_t& argv) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteFormatLine("This command is currently not supported in multiplayer mode."); return 0; @@ -1701,9 +1699,9 @@ static int32_t cc_replay_stop(InteractiveConsole& console, const arguments_t& ar return 0; } -static int32_t cc_replay_normalise(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandReplayNormalise(InteractiveConsole& console, const arguments_t& argv) { - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { console.WriteFormatLine("This command is currently not supported in multiplayer mode."); return 0; @@ -1736,7 +1734,7 @@ static int32_t cc_replay_normalise(InteractiveConsole& console, const arguments_ return 0; } -static int32_t cc_mp_desync(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandMpDesync(InteractiveConsole& console, const arguments_t& argv) { int32_t desyncType = 0; if (argv.size() >= 1) @@ -1763,8 +1761,8 @@ static int32_t cc_mp_desync(InteractiveConsole& console, const arguments_t& argv { auto* guest = guests[0]; if (guests.size() > 1) - guest = guests[util_rand() % guests.size() - 1]; - guest->TshirtColour = util_rand() & 0xFF; + guest = guests[UtilRand() % guests.size() - 1]; + guest->TshirtColour = UtilRand() & 0xFF; guest->Invalidate(); } break; @@ -1779,7 +1777,7 @@ static int32_t cc_mp_desync(InteractiveConsole& console, const arguments_t& argv { auto* guest = guests[0]; if (guests.size() > 1) - guest = guests[util_rand() % guests.size() - 1]; + guest = guests[UtilRand() % guests.size() - 1]; guest->Remove(); } break; @@ -1790,13 +1788,13 @@ static int32_t cc_mp_desync(InteractiveConsole& console, const arguments_t& argv #pragma warning(push) #pragma warning(disable : 4702) // unreachable code -static int32_t cc_abort([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandAbort([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { std::abort(); return 0; } -static int32_t cc_dereference([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandDereference([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnull-dereference" @@ -1807,14 +1805,14 @@ static int32_t cc_dereference([[maybe_unused]] InteractiveConsole& console, [[ma #pragma GCC diagnostic pop } -static int32_t cc_terminate([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandTerminate([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { std::terminate(); return 0; } #pragma warning(pop) -static int32_t cc_assert([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandAssert([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (!argv.empty()) Guard::Assert(false, "%s", argv[0].c_str()); @@ -1823,7 +1821,7 @@ static int32_t cc_assert([[maybe_unused]] InteractiveConsole& console, [[maybe_u return 0; } -static int32_t cc_add_news_item([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandAddNewsItem([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (argv.size() < 2) { @@ -1872,12 +1870,14 @@ static int32_t cc_add_news_item([[maybe_unused]] InteractiveConsole& console, [[ return 0; } -static int32_t cc_profiler_reset([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandProfilerReset( + [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { OpenRCT2::Profiling::ResetData(); return 0; } -static int32_t cc_profiler_start([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandProfilerStart( + [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (!OpenRCT2::Profiling::IsEnabled()) console.WriteLine("Started profiler"); @@ -1885,7 +1885,8 @@ static int32_t cc_profiler_start([[maybe_unused]] InteractiveConsole& console, [ return 0; } -static int32_t cc_profiler_exportcsv([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandProfilerExportCSV( + [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (argv.size() < 1) { @@ -1904,7 +1905,8 @@ static int32_t cc_profiler_exportcsv([[maybe_unused]] InteractiveConsole& consol return 0; } -static int32_t cc_profiler_stop([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandProfilerStop( + [[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { if (OpenRCT2::Profiling::IsEnabled()) console.WriteLine("Stopped profiler"); @@ -1913,14 +1915,14 @@ static int32_t cc_profiler_stop([[maybe_unused]] InteractiveConsole& console, [[ // Export to CSV if argument is provided. if (argv.size() >= 1) { - return cc_profiler_exportcsv(console, argv); + return ConsoleCommandProfilerExportCSV(console, argv); } return 0; } using console_command_func = int32_t (*)(InteractiveConsole& console, const arguments_t& argv); -struct console_command +struct ConsoleCommand { const utf8* command; console_command_func func; @@ -1979,57 +1981,60 @@ static constexpr const utf8* console_window_table[] = { }; // clang-format on -static constexpr const console_command console_command_table[] = { - { "abort", cc_abort, "Calls std::abort(), for testing purposes only.", "abort" }, - { "add_news_item", cc_add_news_item, "Inserts a news item", "add_news_item [ ]" }, - { "assert", cc_assert, "Triggers assertion failure, for testing purposes only", "assert" }, - { "clear", cc_clear, "Clears the console.", "clear" }, - { "close", cc_close, "Closes the console.", "close" }, - { "date", cc_for_date, "Sets the date to a given date.", "Format [ [ ]]." }, - { "dereference", cc_dereference, "Dereferences a nullptr, for testing purposes only", "dereference" }, - { "echo", cc_echo, "Echoes the text to the console.", "echo " }, - { "exit", cc_close, "Closes the console.", "exit" }, - { "get", cc_get, "Gets the value of the specified variable.", "get " }, - { "help", cc_help, "Lists commands or info about a command.", "help [command]" }, - { "hide", cc_hide, "Hides the console.", "hide" }, - { "load_object", cc_load_object, +static constexpr const ConsoleCommand console_command_table[] = { + { "abort", ConsoleCommandAbort, "Calls std::abort(), for testing purposes only.", "abort" }, + { "add_news_item", ConsoleCommandAddNewsItem, "Inserts a news item", "add_news_item [ ]" }, + { "assert", ConsoleCommandAssert, "Triggers assertion failure, for testing purposes only", "assert" }, + { "clear", ConsoleCommandClear, "Clears the console.", "clear" }, + { "close", ConsoleCommandClose, "Closes the console.", "close" }, + { "date", ConsoleCommandForceDate, "Sets the date to a given date.", "Format [ [ ]]." }, + { "dereference", ConsoleCommandDereference, "Dereferences a nullptr, for testing purposes only", "dereference" }, + { "echo", ConsoleCommandEcho, "Echoes the text to the console.", "echo " }, + { "exit", ConsoleCommandClose, "Closes the console.", "exit" }, + { "get", ConsoleCommandGet, "Gets the value of the specified variable.", "get " }, + { "help", ConsoleCommandHelp, "Lists commands or info about a command.", "help [command]" }, + { "hide", ConsoleCommandHide, "Hides the console.", "hide" }, + { "load_object", ConsoleCommandLoadObject, "Loads the object file into the scenario.\n" "Loading a scenery group will not load its associated objects.\n" "This is a safer method opposed to \"open object_selection\".", "load_object " }, - { "load_park", cc_load_park, "Load park from save directory or by absolute path", "load_park " }, - { "object_count", cc_object_count, "Shows the number of objects of each type in the scenario.", "object_count" }, - { "open", cc_open, "Opens the window with the give name.", "open ." }, - { "quit", cc_close, "Closes the console.", "quit" }, - { "remove_park_fences", cc_remove_park_fences, "Removes all park fences from the surface", "remove_park_fences" }, - { "remove_unused_objects", cc_remove_unused_objects, "Removes all the unused objects from the object selection.", + { "load_park", ConsoleCommandLoadPark, "Load park from save directory or by absolute path", "load_park " }, + { "object_count", ConsoleCommandCountObjects, "Shows the number of objects of each type in the scenario.", "object_count" }, + { "open", ConsoleCommandOpen, "Opens the window with the give name.", "open ." }, + { "quit", ConsoleCommandClose, "Closes the console.", "quit" }, + { "remove_park_fences", ConsoleCommandRemoveParkFences, "Removes all park fences from the surface", "remove_park_fences" }, + { "remove_unused_objects", ConsoleCommandRemoveUnusedObjects, "Removes all the unused objects from the object selection.", "remove_unused_objects" }, - { "remove_floating_objects", cc_remove_floating_objects, "Removes floating objects", "remove_floating_objects" }, - { "rides", cc_rides, "Ride management.", "rides " }, - { "save_park", cc_save_park, "Save current state of park. If no name specified default path will be used.", + { "remove_floating_objects", ConsoleCommandRemoveFloatingObjects, "Removes floating objects", "remove_floating_objects" }, + { "rides", ConsoleCommandRides, "Ride management.", "rides " }, + { "save_park", ConsoleCommandSavePark, "Save current state of park. If no name specified default path will be used.", "save_park [name]" }, - { "say", cc_say, "Say to other players.", "say " }, - { "set", cc_set, "Sets the variable to the specified value.", "set " }, - { "show_limits", cc_show_limits, "Shows the map data counts and limits.", "show_limits" }, - { "staff", cc_staff, "Staff management.", "staff " }, - { "terminate", cc_terminate, "Calls std::terminate(), for testing purposes only.", "terminate" }, - { "variables", cc_variables, "Lists all the variables that can be used with get and sometimes set.", "variables" }, - { "windows", cc_windows, "Lists all the windows that can be opened.", "windows" }, - { "replay_startrecord", cc_replay_startrecord, "Starts recording a new replay.", "replay_startrecord [max_ticks]" }, - { "replay_stoprecord", cc_replay_stoprecord, "Stops recording a new replay.", "replay_stoprecord" }, - { "replay_start", cc_replay_start, "Starts a replay", "replay_start " }, - { "replay_stop", cc_replay_stop, "Stops the replay", "replay_stop" }, - { "replay_normalise", cc_replay_normalise, "Normalises the replay to remove all gaps", + { "say", ConsoleCommandSay, "Say to other players.", "say " }, + { "set", ConsoleCommandSet, "Sets the variable to the specified value.", "set " }, + { "show_limits", ConsoleCommandShowLimits, "Shows the map data counts and limits.", "show_limits" }, + { "staff", ConsoleCommandStaff, "Staff management.", "staff " }, + { "terminate", ConsoleCommandTerminate, "Calls std::terminate(), for testing purposes only.", "terminate" }, + { "variables", ConsoleCommandVariables, "Lists all the variables that can be used with get and sometimes set.", + "variables" }, + { "windows", ConsoleCommandWindows, "Lists all the windows that can be opened.", "windows" }, + { "replay_startrecord", ConsoleCommandReplayStartRecord, "Starts recording a new replay.", + "replay_startrecord [max_ticks]" }, + { "replay_stoprecord", ConsoleCommandReplayStopRecord, "Stops recording a new replay.", "replay_stoprecord" }, + { "replay_start", ConsoleCommandReplayStart, "Starts a replay", "replay_start " }, + { "replay_stop", ConsoleCommandReplayStop, "Stops the replay", "replay_stop" }, + { "replay_normalise", ConsoleCommandReplayNormalise, "Normalises the replay to remove all gaps", "replay_normalise " }, - { "mp_desync", cc_mp_desync, "Forces a multiplayer desync", - "cc_mp_desync [desync_type, 0 = Random t-shirt color on random guest, 1 = Remove random guest ]" }, - { "profiler_reset", cc_profiler_reset, "Resets the profiler data.", "profiler_reset" }, - { "profiler_start", cc_profiler_start, "Starts the profiler.", "profiler_start" }, - { "profiler_stop", cc_profiler_stop, "Stops the profiler.", "profiler_stop []" }, - { "profiler_exportcsv", cc_profiler_exportcsv, "Exports the current profiler data.", "profiler_exportcsv " }, + { "mp_desync", ConsoleCommandMpDesync, "Forces a multiplayer desync", + "ConsoleCommandMpDesync [desync_type, 0 = Random t-shirt color on random guest, 1 = Remove random guest ]" }, + { "profiler_reset", ConsoleCommandProfilerReset, "Resets the profiler data.", "profiler_reset" }, + { "profiler_start", ConsoleCommandProfilerStart, "Starts the profiler.", "profiler_start" }, + { "profiler_stop", ConsoleCommandProfilerStop, "Stops the profiler.", "profiler_stop []" }, + { "profiler_exportcsv", ConsoleCommandProfilerExportCSV, "Exports the current profiler data.", + "profiler_exportcsv " }, }; -static int32_t cc_windows(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandWindows(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { for (auto s : console_window_table) { @@ -2038,7 +2043,7 @@ static int32_t cc_windows(InteractiveConsole& console, [[maybe_unused]] const ar return 0; } -static int32_t cc_variables(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) +static int32_t ConsoleCommandVariables(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) { for (auto s : console_variable_table) { @@ -2047,7 +2052,7 @@ static int32_t cc_variables(InteractiveConsole& console, [[maybe_unused]] const return 0; } -static int32_t cc_help(InteractiveConsole& console, const arguments_t& argv) +static int32_t ConsoleCommandHelp(InteractiveConsole& console, const arguments_t& argv) { if (!argv.empty()) { @@ -2062,12 +2067,12 @@ static int32_t cc_help(InteractiveConsole& console, const arguments_t& argv) } else { - console_write_all_commands(console); + ConsoleWriteAllCommands(console); } return 0; } -static void console_write_all_commands(InteractiveConsole& console) +static void ConsoleWriteAllCommands(InteractiveConsole& console) { for (const auto& c : console_command_table) { @@ -2075,7 +2080,7 @@ static void console_write_all_commands(InteractiveConsole& console) } } -static bool invalidArguments(bool* invalid, bool arguments) +static bool InvalidArguments(bool* invalid, bool arguments) { if (!arguments) { diff --git a/src/openrct2/interface/InteractiveConsole.h b/src/openrct2/interface/InteractiveConsole.h index 05e03f140e..b62add6d91 100644 --- a/src/openrct2/interface/InteractiveConsole.h +++ b/src/openrct2/interface/InteractiveConsole.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,7 +17,7 @@ #include #include -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct TextInputSession; enum class ConsoleInput : uint8_t diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index d1d2b0c1aa..297324fdf6 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ #include "../Intro.h" #include "../OpenRCT2.h" #include "../PlatformEnvironment.h" -#include "../actions/SetCheatAction.h" +#include "../actions/CheatSetAction.h" #include "../audio/audio.h" #include "../core/Console.hpp" #include "../core/File.h" @@ -51,7 +51,7 @@ extern uint8_t gClipHeight; uint8_t gScreenshotCountdown = 0; -static bool WriteDpiToFile(std::string_view path, const rct_drawpixelinfo* dpi, const GamePalette& palette) +static bool WriteDpiToFile(std::string_view path, const DrawPixelInfo* dpi, const GamePalette& palette) { auto const pixels8 = dpi->bits; auto const pixelsLen = (dpi->width + dpi->pitch) * dpi->height; @@ -69,7 +69,7 @@ static bool WriteDpiToFile(std::string_view path, const rct_drawpixelinfo* dpi, } catch (const std::exception& e) { - log_error("Unable to write png: %s", e.what()); + LOG_ERROR("Unable to write png: %s", e.what()); return false; } } @@ -78,7 +78,7 @@ static bool WriteDpiToFile(std::string_view path, const rct_drawpixelinfo* dpi, * * rct2: 0x006E3AEC */ -void screenshot_check() +void ScreenshotCheck() { if (gScreenshotCountdown != 0) { @@ -86,7 +86,7 @@ void screenshot_check() if (gScreenshotCountdown == 0) { // update_weather_animation(); - std::string screenshotPath = screenshot_dump(); + std::string screenshotPath = ScreenshotDump(); if (!screenshotPath.empty()) { @@ -102,18 +102,18 @@ void screenshot_check() } } -static std::string screenshot_get_park_name() +static std::string ScreenshotGetParkName() { return GetContext()->GetGameState()->GetPark().Name; } -static std::string screenshot_get_directory() +static std::string ScreenshotGetDirectory() { auto env = GetContext()->GetPlatformEnvironment(); return env->GetDirectoryPath(DIRBASE::USER, DIRID::SCREENSHOT); } -static std::pair screenshot_get_date_time() +static std::pair ScreenshotGetDateTime() { auto date = Platform::GetDateLocal(); auto time = Platform::GetTimeLocal(); @@ -121,9 +121,9 @@ static std::pair screenshot_get_date_time() return { date, time }; } -static std::string screenshot_get_formatted_date_time() +static std::string ScreenshotGetFormattedDateTime() { - auto [date, time] = screenshot_get_date_time(); + auto [date, time] = ScreenshotGetDateTime(); char formatted[64]; snprintf( formatted, sizeof(formatted), "%4d-%02d-%02d %02d-%02d-%02d", date.year, date.month, date.day, time.hour, time.minute, @@ -131,17 +131,17 @@ static std::string screenshot_get_formatted_date_time() return formatted; } -static std::optional screenshot_get_next_path() +static std::optional ScreenshotGetNextPath() { - auto screenshotDirectory = screenshot_get_directory(); + auto screenshotDirectory = ScreenshotGetDirectory(); if (!Platform::EnsureDirectoryExists(screenshotDirectory.c_str())) { - log_error("Unable to save screenshots in OpenRCT2 screenshot directory."); + LOG_ERROR("Unable to save screenshots in OpenRCT2 screenshot directory."); return std::nullopt; } - auto parkName = screenshot_get_park_name(); - auto dateTime = screenshot_get_formatted_date_time(); + auto parkName = ScreenshotGetParkName(); + auto dateTime = ScreenshotGetFormattedDateTime(); auto name = parkName + " " + dateTime; // Generate a path with a `tries` number @@ -160,14 +160,14 @@ static std::optional screenshot_get_next_path() } } - log_error("You have too many saved screenshots saved at exactly the same date and time."); + LOG_ERROR("You have too many saved screenshots saved at exactly the same date and time."); return std::nullopt; }; -std::string screenshot_dump_png(rct_drawpixelinfo* dpi) +std::string ScreenshotDumpPNG(DrawPixelInfo* dpi) { // Get a free screenshot path - auto path = screenshot_get_next_path(); + auto path = ScreenshotGetNextPath(); if (!path.has_value()) { @@ -182,9 +182,9 @@ std::string screenshot_dump_png(rct_drawpixelinfo* dpi) return ""; } -std::string screenshot_dump_png_32bpp(int32_t width, int32_t height, const void* pixels) +std::string ScreenshotDumpPNG32bpp(int32_t width, int32_t height, const void* pixels) { - auto path = screenshot_get_next_path(); + auto path = ScreenshotGetNextPath(); if (!path.has_value()) { @@ -207,7 +207,7 @@ std::string screenshot_dump_png_32bpp(int32_t width, int32_t height, const void* } catch (const std::exception& e) { - log_error("Unable to save screenshot: %s", e.what()); + LOG_ERROR("Unable to save screenshot: %s", e.what()); return ""; } } @@ -249,9 +249,9 @@ static int32_t GetTallestVisibleTileTop( return minViewY - 64; } -static rct_drawpixelinfo CreateDPI(const rct_viewport& viewport) +static DrawPixelInfo CreateDPI(const Viewport& viewport) { - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.width = viewport.width; dpi.height = viewport.height; dpi.bits = new (std::nothrow) uint8_t[dpi.width * dpi.height]; @@ -268,7 +268,7 @@ static rct_drawpixelinfo CreateDPI(const rct_viewport& viewport) return dpi; } -static void ReleaseDPI(rct_drawpixelinfo& dpi) +static void ReleaseDPI(DrawPixelInfo& dpi) { if (dpi.bits != nullptr) delete[] dpi.bits; @@ -277,7 +277,7 @@ static void ReleaseDPI(rct_drawpixelinfo& dpi) dpi.height = 0; } -static rct_viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) +static Viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) { // Get the tile coordinates of each corner const TileCoordsXY cornerCoords[2][4] = { @@ -298,8 +298,8 @@ static rct_viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) }, }; - auto* const mainWindow = window_get_main(); - const auto* const mainViewport = window_get_viewport(mainWindow); + auto* const mainWindow = WindowGetMain(); + const auto* const mainViewport = WindowGetViewport(mainWindow); const bool useViewClipping = (mainViewport != nullptr && mainViewport->flags & VIEWPORT_FLAG_CLIP_VIEW); // Calculate the viewport bounds @@ -314,7 +314,7 @@ static rct_viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) auto bottom = std::max({ screenCoords1.y, screenCoords2.y, screenCoords3.y, screenCoords4.y }); auto right = std::max({ screenCoords1.x, screenCoords2.x, screenCoords3.x, screenCoords4.x }) + 32; - rct_viewport viewport{}; + Viewport viewport{}; viewport.viewPos = { left, top }; viewport.view_width = right - left; viewport.view_height = bottom - top; @@ -324,10 +324,10 @@ static rct_viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) return viewport; } -static void RenderViewport(IDrawingEngine* drawingEngine, const rct_viewport& viewport, rct_drawpixelinfo& dpi) +static void RenderViewport(IDrawingEngine* drawingEngine, const Viewport& viewport, DrawPixelInfo& dpi) { // Ensure sprites appear regardless of rotation - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); std::unique_ptr tempDrawingEngine; if (drawingEngine == nullptr) @@ -336,24 +336,24 @@ static void RenderViewport(IDrawingEngine* drawingEngine, const rct_viewport& vi drawingEngine = tempDrawingEngine.get(); } dpi.DrawingEngine = drawingEngine; - viewport_render(&dpi, &viewport, { { 0, 0 }, { viewport.width, viewport.height } }); + ViewportRender(&dpi, &viewport, { { 0, 0 }, { viewport.width, viewport.height } }); } -void screenshot_giant() +void ScreenshotGiant() { - rct_drawpixelinfo dpi{}; + DrawPixelInfo dpi{}; try { - auto path = screenshot_get_next_path(); + auto path = ScreenshotGetNextPath(); if (!path.has_value()) { throw std::runtime_error("Giant screenshot failed, unable to find a suitable destination path."); } - const auto rotation = get_current_rotation(); + const auto rotation = GetCurrentRotation(); auto zoom = ZoomLevel{ 0 }; - auto* mainWindow = window_get_main(); - const auto* vp = window_get_viewport(mainWindow); + auto* mainWindow = WindowGetMain(); + const auto* vp = WindowGetViewport(mainWindow); if (mainWindow != nullptr && vp != nullptr) { zoom = vp->zoom; @@ -383,7 +383,7 @@ void screenshot_giant() } catch (const std::exception& e) { - log_error("%s", e.what()); + LOG_ERROR("%s", e.what()); ContextShowError(STR_SCREENSHOT_FAILED, STR_NONE, {}); } @@ -399,7 +399,7 @@ template static inline double MeasureFunctionTime(const FN& fn) return std::chrono::duration(endTime - startTime).count(); } -static void benchgfx_render_screenshots(const char* inputPath, std::unique_ptr& context, uint32_t iterationCount) +static void BenchgfxRenderScreenshots(const char* inputPath, std::unique_ptr& context, uint32_t iterationCount) { if (!context->LoadParkFromFile(inputPath)) { @@ -414,8 +414,8 @@ static void benchgfx_render_screenshots(const char* inputPath, std::unique_ptr(ZoomLevel::max()); - std::array dpis; - std::array viewports; + std::array dpis; + std::array viewports; for (ZoomLevel zoom{ 0 }; zoom < ZoomLevel::max(); zoom++) { @@ -461,7 +461,7 @@ static void benchgfx_render_screenshots(const char* inputPath, std::unique_ptr(totalRenderCount); const auto engineStringId = DrawingEngineStringIds[EnumValue(DrawingEngine::Software)]; - const auto engineName = format_string(engineStringId, nullptr); + const auto engineName = FormatStringID(engineStringId, nullptr); std::printf("Engine: %s\n", engineName.c_str()); std::printf("Render Count: %u\n", totalRenderCount); for (ZoomLevel zoom{ 0 }; zoom < ZoomLevel::max(); zoom++) @@ -482,7 +482,7 @@ static void benchgfx_render_screenshots(const char* inputPath, std::unique_ptr context(CreateContext()); if (context->Initialise()) { - drawing_engine_init(); + DrawingEngineInit(); - benchgfx_render_screenshots(inputPath, context, iterationCount); + BenchgfxRenderScreenshots(inputPath, context, iterationCount); - drawing_engine_dispose(); + DrawingEngineDispose(); } return 1; } -static void ApplyOptions(const ScreenshotOptions* options, rct_viewport& viewport) +static void ApplyOptions(const ScreenshotOptions* options, Viewport& viewport) { if (options->weather != WeatherType::Sunny && options->weather != WeatherType::Count) { @@ -562,7 +562,7 @@ static void ApplyOptions(const ScreenshotOptions* options, rct_viewport& viewpor } } -int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOptions* options) +int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOptions* options) { // Don't include options in the count (they have been handled by CommandLine::ParseOptions already) for (int32_t i = 0; i < argc; i++) @@ -584,7 +584,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption } int32_t exitCode = 1; - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; try { Platform::CoreInit(); @@ -602,7 +602,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption throw std::runtime_error("Failed to initialize context."); } - drawing_engine_init(); + DrawingEngineInit(); if (!context->LoadParkFromFile(inputPath)) { @@ -612,7 +612,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption gIntroState = IntroState::None; gScreenFlags = SCREEN_FLAGS_PLAYING; - rct_viewport viewport{}; + Viewport viewport{}; if (giantScreenshot) { auto customZoom = static_cast(std::atoi(argv[3])); @@ -699,7 +699,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption } ReleaseDPI(dpi); - drawing_engine_dispose(); + DrawingEngineDispose(); return exitCode; } @@ -724,7 +724,7 @@ static std::string ResolveFilenameForCapture(const fs::path& filename) if (filename.empty()) { // Automatic filename - auto path = screenshot_get_next_path(); + auto path = ScreenshotGetNextPath(); if (!path) { throw std::runtime_error("Unable to generate a filename for capture."); @@ -732,7 +732,7 @@ static std::string ResolveFilenameForCapture(const fs::path& filename) return *path; } - auto screenshotDirectory = fs::u8path(screenshot_get_directory()); + auto screenshotDirectory = fs::u8path(ScreenshotGetDirectory()); auto screenshotPath = fs::absolute(screenshotDirectory / filename); // Check the filename isn't attempting to leave the screenshot directory for security @@ -755,7 +755,7 @@ static std::string ResolveFilenameForCapture(const fs::path& filename) void CaptureImage(const CaptureOptions& options) { - rct_viewport viewport{}; + Viewport viewport{}; if (options.View.has_value()) { viewport.width = options.View->Width; diff --git a/src/openrct2/interface/Screenshot.h b/src/openrct2/interface/Screenshot.h index 431dd2b009..e068cc1233 100644 --- a/src/openrct2/interface/Screenshot.h +++ b/src/openrct2/interface/Screenshot.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,7 +18,7 @@ #include #include -struct rct_drawpixelinfo; +struct DrawPixelInfo; extern uint8_t gScreenshotCountdown; @@ -52,13 +52,13 @@ struct CaptureOptions bool Transparent{}; }; -void screenshot_check(); -std::string screenshot_dump(); -std::string screenshot_dump_png(rct_drawpixelinfo* dpi); -std::string screenshot_dump_png_32bpp(int32_t width, int32_t height, const void* pixels); +void ScreenshotCheck(); +std::string ScreenshotDump(); +std::string ScreenshotDumpPNG(DrawPixelInfo* dpi); +std::string ScreenshotDumpPNG32bpp(int32_t width, int32_t height, const void* pixels); -void screenshot_giant(); -int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOptions* options); -int32_t cmdline_for_gfxbench(const char** argv, int32_t argc); +void ScreenshotGiant(); +int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOptions* options); +int32_t CommandLineForGfxbench(const char** argv, int32_t argc); void CaptureImage(const CaptureOptions& options); diff --git a/src/openrct2/interface/StdInOutConsole.cpp b/src/openrct2/interface/StdInOutConsole.cpp index 0169895573..23b84349eb 100644 --- a/src/openrct2/interface/StdInOutConsole.cpp +++ b/src/openrct2/interface/StdInOutConsole.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,7 +47,7 @@ void StdInOutConsole::Start() { if (lastPromptQuit) { - openrct2_finish(); + OpenRCT2Finish(); break; } @@ -105,7 +105,7 @@ void StdInOutConsole::Clear() void StdInOutConsole::Close() { - openrct2_finish(); + OpenRCT2Finish(); } void StdInOutConsole::WriteLine(const std::string& s, FormatToken colourFormat) diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 06faa0198e..bf1e5d8df0 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,6 +22,9 @@ #include "../entity/Guest.h" #include "../entity/PatrolArea.h" #include "../entity/Staff.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/SmallSceneryEntry.h" +#include "../object/WallSceneryEntry.h" #include "../paint/Paint.h" #include "../profiling/Profiling.h" #include "../ride/Ride.h" @@ -33,7 +36,6 @@ #include "../util/Math.hpp" #include "../world/Climate.h" #include "../world/Map.h" -#include "../world/SmallScenery.h" #include "Colour.h" #include "Window.h" #include "Window_internal.h" @@ -45,12 +47,19 @@ using namespace OpenRCT2; +enum : uint32_t +{ + IMAGE_TYPE_DEFAULT = 0, + IMAGE_TYPE_REMAP = (1 << 29), + IMAGE_TYPE_TRANSPARENT = (1 << 30), +}; + uint8_t gShowGridLinesRefCount; uint8_t gShowLandRightsRefCount; uint8_t gShowConstructionRightsRefCount; -static std::list _viewports; -rct_viewport* g_music_tracking_viewport; +static std::list _viewports; +Viewport* g_music_tracking_viewport; static std::unique_ptr _paintJobs; static std::vector _paintColumns; @@ -59,7 +68,6 @@ ScreenCoordsXY gSavedView; ZoomLevel gSavedViewZoom; uint8_t gSavedViewRotation; -PaintEntry* gNextFreePaintStruct; uint8_t gCurrentRotation; static uint32_t _currentImageType; @@ -70,31 +78,31 @@ InteractionInfo::InteractionInfo(const PaintStruct* ps) , SpriteType(ps->sprite_type) { } -static void viewport_paint_weather_gloom(rct_drawpixelinfo* dpi); +static void ViewportPaintWeatherGloom(DrawPixelInfo* dpi); /** * This is not a viewport function. It is used to setup many variables for * multiple things. * rct2: 0x006E6EAC */ -void viewport_init_all() +void ViewportInitAll() { if (!gOpenRCT2NoGraphics) { - colours_init_maps(); + ColoursInitMaps(); } - window_init_all(); + WindowInitAll(); // ? - input_reset_flags(); - input_set_state(InputState::Reset); + InputResetFlags(); + InputSetState(InputState::Reset); gPressedWidget.window_classification = WindowClass::Null; gPickupPeepImage = ImageId(); - reset_tooltip_not_shown(); + ResetTooltipNotShown(); gMapSelectFlags = 0; ClearPatrolAreaToRender(); - textinput_cancel(); + TextinputCancel(); } /** @@ -107,7 +115,7 @@ void viewport_init_all() * out_x : ax * out_y : bx */ -std::optional centre_2d_coordinates(const CoordsXYZ& loc, rct_viewport* viewport) +std::optional centre_2d_coordinates(const CoordsXYZ& loc, Viewport* viewport) { // If the start location was invalid // propagate the invalid location to the output. @@ -117,7 +125,7 @@ std::optional centre_2d_coordinates(const CoordsXYZ& loc, rct_vi return std::nullopt; } - auto screenCoord = Translate3DTo2DWithZ(get_current_rotation(), loc); + auto screenCoord = Translate3DTo2DWithZ(GetCurrentRotation(), loc); screenCoord.x -= viewport->view_width / 2; screenCoord.y -= viewport->view_height / 2; return { screenCoord }; @@ -139,7 +147,7 @@ CoordsXYZ Focus::GetPos() const } else { - log_error("Invalid entity for focus."); + LOG_ERROR("Invalid entity for focus."); return CoordsXYZ{}; } } @@ -164,16 +172,16 @@ CoordsXYZ Focus::GetPos() const * flags: edx top most 2 bits 0b_X1 for zoom clear see below for 2nd bit. * w: esi */ -void viewport_create(rct_window* w, const ScreenCoordsXY& screenCoords, int32_t width, int32_t height, const Focus& focus) +void ViewportCreate(WindowBase* w, const ScreenCoordsXY& screenCoords, int32_t width, int32_t height, const Focus& focus) { - rct_viewport* viewport = nullptr; + Viewport* viewport = nullptr; if (_viewports.size() >= MAX_VIEWPORT_COUNT) { - log_error("No more viewport slots left to allocate."); + LOG_ERROR("No more viewport slots left to allocate."); return; } - auto itViewport = _viewports.insert(_viewports.end(), rct_viewport{}); + auto itViewport = _viewports.insert(_viewports.end(), Viewport{}); viewport = &*itViewport; viewport->pos = screenCoords; @@ -204,31 +212,31 @@ void viewport_create(rct_window* w, const ScreenCoordsXY& screenCoords, int32_t auto centreLoc = centre_2d_coordinates(centrePos, viewport); if (!centreLoc.has_value()) { - log_error("Invalid location for viewport."); + LOG_ERROR("Invalid location for viewport."); return; } w->savedViewPos = *centreLoc; viewport->viewPos = *centreLoc; } -void viewport_remove(rct_viewport* viewport) +void ViewportRemove(Viewport* viewport) { auto it = std::find_if(_viewports.begin(), _viewports.end(), [viewport](const auto& vp) { return &vp == viewport; }); if (it == _viewports.end()) { - log_error("Unable to remove viewport: %p", viewport); + LOG_ERROR("Unable to remove viewport: %p", viewport); return; } _viewports.erase(it); } -void viewports_invalidate(const ScreenRect& screenRect, ZoomLevel maxZoom) +void ViewportsInvalidate(const ScreenRect& screenRect, ZoomLevel maxZoom) { for (auto& vp : _viewports) { if (maxZoom == ZoomLevel{ -1 } || vp.zoom <= ZoomLevel{ maxZoom }) { - viewport_invalidate(&vp, screenRect); + ViewportInvalidate(&vp, screenRect); } } } @@ -239,15 +247,15 @@ void viewports_invalidate(const ScreenRect& screenRect, ZoomLevel maxZoom) * edx is assumed to be (and always is) the current rotation, so it is not * needed as parameter. */ -CoordsXYZ viewport_adjust_for_map_height(const ScreenCoordsXY& startCoords) +CoordsXYZ ViewportAdjustForMapHeight(const ScreenCoordsXY& startCoords) { int32_t height = 0; - uint32_t rotation = get_current_rotation(); + uint32_t rotation = GetCurrentRotation(); CoordsXY pos{}; for (int32_t i = 0; i < 6; i++) { - pos = viewport_coord_to_map_coord(startCoords, height); + pos = ViewportPosToMapPos(startCoords, height); height = TileElementHeight(pos); // HACK: This is to prevent the x and y values being set to values outside @@ -272,8 +280,7 @@ CoordsXYZ viewport_adjust_for_map_height(const ScreenCoordsXY& startCoords) /* * rct2: 0x006E7FF3 */ -static void viewport_redraw_after_shift( - rct_drawpixelinfo* dpi, rct_window* window, rct_viewport* viewport, const ScreenCoordsXY& coords) +static void ViewportRedrawAfterShift(DrawPixelInfo* dpi, WindowBase* window, Viewport* viewport, const ScreenCoordsXY& coords) { // sub-divide by intersecting windows if (window != nullptr) @@ -284,63 +291,63 @@ static void viewport_redraw_after_shift( || viewport->pos.y + viewport->height <= window->windowPos.y || viewport->pos.y >= window->windowPos.y + window->height) { - auto itWindowPos = window_get_iterator(window); + auto itWindowPos = WindowGetIterator(window); auto itNextWindow = itWindowPos != g_window_list.end() ? std::next(itWindowPos) : g_window_list.end(); - viewport_redraw_after_shift( + ViewportRedrawAfterShift( dpi, itNextWindow == g_window_list.end() ? nullptr : itNextWindow->get(), viewport, coords); return; } // save viewport - rct_viewport view_copy = *viewport; + Viewport view_copy = *viewport; if (viewport->pos.x < window->windowPos.x) { viewport->width = window->windowPos.x - viewport->pos.x; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); viewport->pos.x += viewport->width; viewport->viewPos.x += viewport->zoom.ApplyTo(viewport->width); viewport->width = view_copy.width - viewport->width; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); } else if (viewport->pos.x + viewport->width > window->windowPos.x + window->width) { viewport->width = window->windowPos.x + window->width - viewport->pos.x; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); viewport->pos.x += viewport->width; viewport->viewPos.x += viewport->zoom.ApplyTo(viewport->width); viewport->width = view_copy.width - viewport->width; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); } else if (viewport->pos.y < window->windowPos.y) { viewport->height = window->windowPos.y - viewport->pos.y; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); viewport->pos.y += viewport->height; viewport->viewPos.y += viewport->zoom.ApplyTo(viewport->height); viewport->height = view_copy.height - viewport->height; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); } else if (viewport->pos.y + viewport->height > window->windowPos.y + window->height) { viewport->height = window->windowPos.y + window->height - viewport->pos.y; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); viewport->pos.y += viewport->height; viewport->viewPos.y += viewport->zoom.ApplyTo(viewport->height); viewport->height = view_copy.height - viewport->height; viewport->view_width = viewport->zoom.ApplyTo(viewport->width); - viewport_redraw_after_shift(dpi, window, viewport, coords); + ViewportRedrawAfterShift(dpi, window, viewport, coords); } // restore viewport @@ -357,20 +364,20 @@ static void viewport_redraw_after_shift( if (abs(coords.x) < viewport->width && abs(coords.y) < viewport->height) { // update whole block ? - drawing_engine_copy_rect(viewport->pos.x, viewport->pos.y, viewport->width, viewport->height, coords.x, coords.y); + DrawingEngineCopyRect(viewport->pos.x, viewport->pos.y, viewport->width, viewport->height, coords.x, coords.y); if (coords.x > 0) { // draw left auto _right = viewport->pos.x + coords.x; - window_draw_all(dpi, left, top, _right, bottom); + WindowDrawAll(dpi, left, top, _right, bottom); left += coords.x; } else if (coords.x < 0) { // draw right auto _left = viewport->pos.x + viewport->width + coords.x; - window_draw_all(dpi, _left, top, right, bottom); + WindowDrawAll(dpi, _left, top, right, bottom); right += coords.x; } @@ -378,27 +385,26 @@ static void viewport_redraw_after_shift( { // draw top bottom = viewport->pos.y + coords.y; - window_draw_all(dpi, left, top, right, bottom); + WindowDrawAll(dpi, left, top, right, bottom); } else if (coords.y < 0) { // draw bottom top = viewport->pos.y + viewport->height + coords.y; - window_draw_all(dpi, left, top, right, bottom); + WindowDrawAll(dpi, left, top, right, bottom); } } else { // redraw whole viewport - window_draw_all(dpi, left, top, right, bottom); + WindowDrawAll(dpi, left, top, right, bottom); } } } -static void viewport_shift_pixels( - rct_drawpixelinfo* dpi, rct_window* window, rct_viewport* viewport, int32_t x_diff, int32_t y_diff) +static void ViewportShiftPixels(DrawPixelInfo* dpi, WindowBase* window, Viewport* viewport, int32_t x_diff, int32_t y_diff) { - auto it = window_get_iterator(window); + auto it = WindowGetIterator(window); for (; it != g_window_list.end(); it++) { auto w = it->get(); @@ -437,13 +443,13 @@ static void viewport_shift_pixels( if (top >= bottom) continue; - window_draw_all(dpi, left, top, right, bottom); + WindowDrawAll(dpi, left, top, right, bottom); } - viewport_redraw_after_shift(dpi, window, viewport, { x_diff, y_diff }); + ViewportRedrawAfterShift(dpi, window, viewport, { x_diff, y_diff }); } -static void viewport_move(const ScreenCoordsXY& coords, rct_window* w, rct_viewport* viewport) +static void ViewportMove(const ScreenCoordsXY& coords, WindowBase* w, Viewport* viewport) { auto zoom = viewport->zoom; @@ -471,15 +477,15 @@ static void viewport_move(const ScreenCoordsXY& coords, rct_window* w, rct_viewp if (top >= bottom) return; - if (drawing_engine_has_dirty_optimisations()) + if (DrawingEngineHasDirtyOptimisations()) { - rct_drawpixelinfo* dpi = drawing_engine_get_dpi(); - window_draw_all(dpi, left, top, right, bottom); + DrawPixelInfo* dpi = DrawingEngineGetDpi(); + WindowDrawAll(dpi, left, top, right, bottom); return; } } - rct_viewport view_copy = *viewport; + Viewport view_copy = *viewport; if (viewport->pos.x < 0) { @@ -523,17 +529,17 @@ static void viewport_move(const ScreenCoordsXY& coords, rct_window* w, rct_viewp return; } - if (drawing_engine_has_dirty_optimisations()) + if (DrawingEngineHasDirtyOptimisations()) { - rct_drawpixelinfo* dpi = drawing_engine_get_dpi(); - viewport_shift_pixels(dpi, w, viewport, x_diff, y_diff); + DrawPixelInfo* dpi = DrawingEngineGetDpi(); + ViewportShiftPixels(dpi, w, viewport, x_diff, y_diff); } *viewport = view_copy; } // rct2: 0x006E7A15 -static void viewport_set_underground_flag(int32_t underground, rct_window* window, rct_viewport* viewport) +static void ViewportSetUndergroundFlag(int32_t underground, WindowBase* window, Viewport* viewport) { if (window->classification != WindowClass::MainWindow || (window->classification == WindowClass::MainWindow && !window->viewport_smart_follow_sprite.IsNull())) @@ -560,31 +566,31 @@ static void viewport_set_underground_flag(int32_t underground, rct_window* windo * * rct2: 0x006E7A3A */ -void viewport_update_position(rct_window* window) +void ViewportUpdatePosition(WindowBase* window) { - window_event_resize_call(window); + WindowEventResizeCall(window); - rct_viewport* viewport = window->viewport; + Viewport* viewport = window->viewport; if (viewport == nullptr) return; if (!window->viewport_smart_follow_sprite.IsNull()) { - viewport_update_smart_sprite_follow(window); + ViewportUpdateSmartFollowEntity(window); } if (!window->viewport_target_sprite.IsNull()) { - viewport_update_sprite_follow(window); + ViewportUpdateFollowSprite(window); return; } - viewport_set_underground_flag(0, window, viewport); + ViewportSetUndergroundFlag(0, window, viewport); auto viewportMidPoint = ScreenCoordsXY{ window->savedViewPos.x + viewport->view_width / 2, window->savedViewPos.y + viewport->view_height / 2 }; - auto mapCoord = viewport_coord_to_map_coord(viewportMidPoint, 0); + auto mapCoord = ViewportPosToMapPos(viewportMidPoint, 0); // Clamp to the map minimum value int32_t at_map_edge = 0; @@ -658,10 +664,10 @@ void viewport_update_position(rct_window* window) windowCoords.y += viewport->viewPos.y; } - viewport_move(windowCoords, window, viewport); + ViewportMove(windowCoords, window, viewport); } -void viewport_update_sprite_follow(rct_window* window) +void ViewportUpdateFollowSprite(WindowBase* window) { if (!window->viewport_target_sprite.IsNull() && window->viewport != nullptr) { @@ -675,19 +681,19 @@ void viewport_update_sprite_follow(rct_window* window) { int32_t height = (TileElementHeight({ sprite->x, sprite->y })) - 16; int32_t underground = sprite->z < height; - viewport_set_underground_flag(underground, window, window->viewport); + ViewportSetUndergroundFlag(underground, window, window->viewport); } auto centreLoc = centre_2d_coordinates(sprite->GetLocation(), window->viewport); if (centreLoc.has_value()) { window->savedViewPos = *centreLoc; - viewport_move(*centreLoc, window, window->viewport); + ViewportMove(*centreLoc, window, window->viewport); } } } -void viewport_update_smart_sprite_follow(rct_window* window) +void ViewportUpdateSmartFollowEntity(WindowBase* window) { auto entity = TryGetEntity(window->viewport_smart_follow_sprite); if (entity == nullptr || entity->Type == EntityType::Null) @@ -700,15 +706,15 @@ void viewport_update_smart_sprite_follow(rct_window* window) switch (entity->Type) { case EntityType::Vehicle: - viewport_update_smart_vehicle_follow(window); + ViewportUpdateSmartFollowVehicle(window); break; case EntityType::Guest: - viewport_update_smart_guest_follow(window, entity->As()); + ViewportUpdateSmartFollowGuest(window, entity->As()); break; case EntityType::Staff: - viewport_update_smart_staff_follow(window, entity->As()); + ViewportUpdateSmartFollowStaff(window, entity->As()); break; default: // All other types don't need any "smart" following; steam particle, duck, money effect, etc. @@ -718,10 +724,10 @@ void viewport_update_smart_sprite_follow(rct_window* window) } } -void viewport_update_smart_guest_follow(rct_window* window, const Guest* peep) +void ViewportUpdateSmartFollowGuest(WindowBase* window, const Guest* peep) { - Focus focus = Focus(peep->sprite_index); - window->viewport_target_sprite = peep->sprite_index; + Focus focus = Focus(peep->Id); + window->viewport_target_sprite = peep->Id; if (peep->State == PeepState::Picked) { @@ -735,7 +741,7 @@ void viewport_update_smart_guest_follow(rct_window* window, const Guest* peep) if (peep->State == PeepState::OnRide || peep->State == PeepState::EnteringRide || (peep->State == PeepState::LeavingRide && peep->x == LOCATION_NULL)) { - auto ride = get_ride(peep->CurrentRide); + auto ride = GetRide(peep->CurrentRide); if (ride != nullptr && (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) { auto train = GetEntity(ride->vehicles[peep->CurrentTrain]); @@ -744,9 +750,9 @@ void viewport_update_smart_guest_follow(rct_window* window, const Guest* peep) const auto car = train->GetCar(peep->CurrentCar); if (car != nullptr) { - focus = Focus(car->sprite_index); + focus = Focus(car->Id); overallFocus = false; - window->viewport_target_sprite = car->sprite_index; + window->viewport_target_sprite = car->Id; } } } @@ -754,7 +760,7 @@ void viewport_update_smart_guest_follow(rct_window* window, const Guest* peep) if (peep->x == LOCATION_NULL && overallFocus) { - auto ride = get_ride(peep->CurrentRide); + auto ride = GetRide(peep->CurrentRide); if (ride != nullptr) { auto xy = ride->overall_view.ToTileCentre(); @@ -770,7 +776,7 @@ void viewport_update_smart_guest_follow(rct_window* window, const Guest* peep) window->focus = focus; } -void viewport_update_smart_staff_follow(rct_window* window, const Staff* peep) +void ViewportUpdateSmartFollowStaff(WindowBase* window, const Staff* peep) { if (peep->State == PeepState::Picked) { @@ -784,7 +790,7 @@ void viewport_update_smart_staff_follow(rct_window* window, const Staff* peep) window->viewport_target_sprite = window->viewport_smart_follow_sprite; } -void viewport_update_smart_vehicle_follow(rct_window* window) +void ViewportUpdateSmartFollowVehicle(WindowBase* window) { window->focus = Focus(window->viewport_smart_follow_sprite); window->viewport_target_sprite = window->viewport_smart_follow_sprite; @@ -800,9 +806,8 @@ void viewport_update_smart_vehicle_follow(rct_window* window) * edi: dpi * ebp: bottom */ -void viewport_render( - rct_drawpixelinfo* dpi, const rct_viewport* viewport, const ScreenRect& screenRect, - std::vector* sessions) +void ViewportRender( + DrawPixelInfo* dpi, const Viewport* viewport, const ScreenRect& screenRect, std::vector* sessions) { auto [topLeft, bottomRight] = screenRect; @@ -832,16 +837,16 @@ void viewport_render( viewport->zoom.ApplyTo(std::min(bottomRight.y, viewport->height)), } + viewport->viewPos; - viewport_paint(viewport, dpi, { topLeft, bottomRight }, sessions); + ViewportPaint(viewport, dpi, { topLeft, bottomRight }, sessions); #ifdef DEBUG_SHOW_DIRTY_BOX // FIXME g_viewport_list doesn't exist anymore if (viewport != g_viewport_list) - gfx_fill_rect_inset(dpi, { dirtyBoxTopLeft, dirtyBoxTopRight }, 0x2, INSET_RECT_F_30); + GfxFillRectInset(dpi, { dirtyBoxTopLeft, dirtyBoxTopRight }, 0x2, INSET_RECT_F_30); #endif } -static void record_session( +static void RecordSession( const PaintSession& session, std::vector* recorded_sessions, size_t record_index) { // Perform a deep copy of the paint session, use relative offsets. @@ -901,20 +906,19 @@ static void record_session( } } -static void viewport_fill_column( - PaintSession& session, std::vector* recorded_sessions, size_t record_index) +static void ViewportFillColumn(PaintSession& session, std::vector* recorded_sessions, size_t record_index) { PROFILED_FUNCTION(); PaintSessionGenerate(session); if (recorded_sessions != nullptr) { - record_session(session, recorded_sessions, record_index); + RecordSession(session, recorded_sessions, record_index); } PaintSessionArrange(session); } -static void viewport_paint_column(PaintSession& session) +static void ViewportPaintColumn(PaintSession& session) { PROFILED_FUNCTION(); @@ -928,7 +932,7 @@ static void viewport_paint_column(PaintSession& session) { colour = COLOUR_BLACK; } - gfx_clear(&session.DPI, colour); + GfxClear(&session.DPI, colour); } PaintDrawStructs(session); @@ -936,7 +940,7 @@ static void viewport_paint_column(PaintSession& session) if (gConfigGeneral.RenderWeatherGloom && !gTrackDesignSaveMode && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_ENTITIES) && !(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { - viewport_paint_weather_gloom(&session.DPI); + ViewportPaintWeatherGloom(&session.DPI); } if (session.PSStringHead != nullptr) @@ -955,8 +959,8 @@ static void viewport_paint_column(PaintSession& session) * edi: dpi * ebp: bottom */ -void viewport_paint( - const rct_viewport* viewport, rct_drawpixelinfo* dpi, const ScreenRect& screenRect, +void ViewportPaint( + const Viewport* viewport, DrawPixelInfo* dpi, const ScreenRect& screenRect, std::vector* recorded_sessions) { PROFILED_FUNCTION(); @@ -980,7 +984,7 @@ void viewport_paint( y = viewport->zoom.ApplyInversedTo(y); y += viewport->pos.y; - rct_drawpixelinfo dpi1; + DrawPixelInfo dpi1; dpi1.DrawingEngine = dpi->DrawingEngine; dpi1.bits = dpi->bits + (x - dpi->x) + ((y - dpi->y) * (dpi->width + dpi->pitch)); dpi1.x = topLeft.x; @@ -995,7 +999,7 @@ void viewport_paint( // make sure, the compare operation is done in int32_t to avoid the loop becoming an infinite loop. // this as well as the [x += 32] in the loop causes signed integer overflow -> undefined behaviour. auto rightBorder = dpi1.x + dpi1.width; - auto alignedX = floor2(dpi1.x, 32); + auto alignedX = Floor2(dpi1.x, 32); _paintColumns.clear(); @@ -1030,7 +1034,7 @@ void viewport_paint( PaintSession* session = PaintSessionAlloc(&dpi1, viewFlags); _paintColumns.push_back(session); - rct_drawpixelinfo& dpi2 = session->DPI; + DrawPixelInfo& dpi2 = session->DPI; if (x >= dpi2.x) { auto leftPitch = x - dpi2.x; @@ -1052,11 +1056,11 @@ void viewport_paint( if (useMultithreading) { _paintJobs->AddTask( - [session, recorded_sessions, index]() -> void { viewport_fill_column(*session, recorded_sessions, index); }); + [session, recorded_sessions, index]() -> void { ViewportFillColumn(*session, recorded_sessions, index); }); } else { - viewport_fill_column(*session, recorded_sessions, index); + ViewportFillColumn(*session, recorded_sessions, index); } } @@ -1070,11 +1074,11 @@ void viewport_paint( { if (useParallelDrawing) { - _paintJobs->AddTask([session]() -> void { viewport_paint_column(*session); }); + _paintJobs->AddTask([session]() -> void { ViewportPaintColumn(*session); }); } else { - viewport_paint_column(*session); + ViewportPaintColumn(*session); } } if (useParallelDrawing) @@ -1089,7 +1093,7 @@ void viewport_paint( } } -static void viewport_paint_weather_gloom(rct_drawpixelinfo* dpi) +static void ViewportPaintWeatherGloom(DrawPixelInfo* dpi) { auto paletteId = ClimateGetWeatherGloomPaletteId(gClimateCurrent); if (paletteId != FilterPaletteID::PaletteNull) @@ -1100,7 +1104,7 @@ static void viewport_paint_weather_gloom(rct_drawpixelinfo* dpi) auto y = dpi->y; auto w = zoomLevel.ApplyInversedTo(dpi->width) - 1; auto h = zoomLevel.ApplyInversedTo(dpi->height) - 1; - gfx_filter_rect(dpi, ScreenRect(x, y, x + w, y + h), paletteId); + GfxFilterRect(dpi, ScreenRect(x, y, x + w, y + h), paletteId); } } @@ -1108,9 +1112,9 @@ static void viewport_paint_weather_gloom(rct_drawpixelinfo* dpi) * * rct2: 0x0068958D */ -std::optional screen_pos_to_map_pos(const ScreenCoordsXY& screenCoords, int32_t* direction) +std::optional ScreenPosToMapPos(const ScreenCoordsXY& screenCoords, int32_t* direction) { - auto mapCoords = screen_get_map_xy(screenCoords, nullptr); + auto mapCoords = ScreenGetMapXY(screenCoords, nullptr); if (!mapCoords.has_value()) return std::nullopt; @@ -1154,7 +1158,7 @@ std::optional screen_pos_to_map_pos(const ScreenCoordsXY& screenCoords return { mapCoords->ToTileStart() }; } -[[nodiscard]] ScreenCoordsXY rct_viewport::ScreenToViewportCoord(const ScreenCoordsXY& screenCoords) const +[[nodiscard]] ScreenCoordsXY Viewport::ScreenToViewportCoord(const ScreenCoordsXY& screenCoords) const { ScreenCoordsXY ret; ret.x = (zoom.ApplyTo(screenCoords.x - pos.x)) + viewPos.x; @@ -1162,16 +1166,16 @@ std::optional screen_pos_to_map_pos(const ScreenCoordsXY& screenCoords return ret; } -void rct_viewport::Invalidate() const +void Viewport::Invalidate() const { - viewport_invalidate(this, { viewPos, viewPos + ScreenCoordsXY{ view_width, view_height } }); + ViewportInvalidate(this, { viewPos, viewPos + ScreenCoordsXY{ view_width, view_height } }); } -CoordsXY viewport_coord_to_map_coord(const ScreenCoordsXY& coords, int32_t z) +CoordsXY ViewportPosToMapPos(const ScreenCoordsXY& coords, int32_t z) { // Reverse of Translate3DTo2DWithZ CoordsXY ret = { coords.y - coords.x / 2 + z, coords.y + coords.x / 2 + z }; - auto inverseRotation = DirectionFlipXAxis(get_current_rotation()); + auto inverseRotation = DirectionFlipXAxis(GetCurrentRotation()); return ret.Rotate(inverseRotation); } @@ -1179,11 +1183,11 @@ CoordsXY viewport_coord_to_map_coord(const ScreenCoordsXY& coords, int32_t z) * * rct2: 0x00664689 */ -void show_gridlines() +void ShowGridlines() { if (gShowGridLinesRefCount == 0) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (!(mainWindow->viewport->flags & VIEWPORT_FLAG_GRIDLINES)) @@ -1200,14 +1204,14 @@ void show_gridlines() * * rct2: 0x006646B4 */ -void hide_gridlines() +void HideGridlines() { if (gShowGridLinesRefCount > 0) gShowGridLinesRefCount--; if (gShowGridLinesRefCount == 0) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (!gConfigGeneral.AlwaysShowGridlines) @@ -1223,11 +1227,11 @@ void hide_gridlines() * * rct2: 0x00664E8E */ -void show_land_rights() +void ShowLandRights() { if (gShowLandRightsRefCount == 0) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (!(mainWindow->viewport->flags & VIEWPORT_FLAG_LAND_OWNERSHIP)) @@ -1244,14 +1248,14 @@ void show_land_rights() * * rct2: 0x00664EB9 */ -void hide_land_rights() +void HideLandRights() { if (gShowLandRightsRefCount > 0) gShowLandRightsRefCount--; if (gShowLandRightsRefCount == 0) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (mainWindow->viewport->flags & VIEWPORT_FLAG_LAND_OWNERSHIP) @@ -1267,11 +1271,11 @@ void hide_land_rights() * * rct2: 0x00664EDD */ -void show_construction_rights() +void ShowConstructionRights() { if (gShowConstructionRightsRefCount == 0) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (!(mainWindow->viewport->flags & VIEWPORT_FLAG_CONSTRUCTION_RIGHTS)) @@ -1288,14 +1292,14 @@ void show_construction_rights() * * rct2: 0x00664F08 */ -void hide_construction_rights() +void HideConstructionRights() { if (gShowConstructionRightsRefCount > 0) gShowConstructionRightsRefCount--; if (gShowConstructionRightsRefCount == 0) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { if (mainWindow->viewport->flags & VIEWPORT_FLAG_CONSTRUCTION_RIGHTS) @@ -1311,13 +1315,13 @@ void hide_construction_rights() * * rct2: 0x006CB70A */ -void viewport_set_visibility(uint8_t mode) +void ViewportSetVisibility(uint8_t mode) { - rct_window* window = window_get_main(); + WindowBase* window = WindowGetMain(); if (window != nullptr) { - rct_viewport* vp = window->viewport; + Viewport* vp = window->viewport; uint32_t invalidate = 0; switch (mode) @@ -1526,8 +1530,7 @@ static bool PSSpriteTypeIsInFilter(PaintStruct* ps, uint16_t filter) /** * rct2: 0x00679236, 0x00679662, 0x00679B0D, 0x00679FF1 */ -static bool is_pixel_present_bmp( - uint32_t imageType, const rct_g1_element* g1, const uint8_t* index, const PaletteMap& paletteMap) +static bool IsPixelPresentBMP(uint32_t imageType, const G1Element* g1, const uint8_t* index, const PaletteMap& paletteMap) { PROFILED_FUNCTION(); @@ -1553,7 +1556,7 @@ static bool is_pixel_present_bmp( /** * rct2: 0x0067933B, 0x00679788, 0x00679C4A, 0x0067A117 */ -static bool is_pixel_present_rle(const uint8_t* esi, int32_t x_start_point, int32_t y_start_point, int32_t round) +static bool IsPixelPresentRLE(const uint8_t* esi, int32_t x_start_point, int32_t y_start_point, int32_t round) { PROFILED_FUNCTION(); @@ -1628,7 +1631,7 @@ static bool is_pixel_present_rle(const uint8_t* esi, int32_t x_start_point, int3 if (round > 1) { // This matches the original implementation, but allows empty lines to cause false positives on zoom 0 - if (ceil2(no_pixels, round) == 0) + if (Ceil2(no_pixels, round) == 0) continue; } @@ -1647,12 +1650,12 @@ static bool is_pixel_present_rle(const uint8_t* esi, int32_t x_start_point, int3 * @param y (dx) * @return value originally stored in 0x00141F569 */ -static bool is_sprite_interacted_with_palette_set( - rct_drawpixelinfo* dpi, ImageId imageId, const ScreenCoordsXY& coords, const PaletteMap& paletteMap) +static bool IsSpriteInteractedWithPaletteSet( + DrawPixelInfo* dpi, ImageId imageId, const ScreenCoordsXY& coords, const PaletteMap& paletteMap) { PROFILED_FUNCTION(); - const rct_g1_element* g1 = gfx_get_g1_element(imageId); + const G1Element* g1 = GfxGetG1Element(imageId); if (g1 == nullptr) { return false; @@ -1668,7 +1671,7 @@ static bool is_sprite_interacted_with_palette_set( if (g1->flags & G1_FLAG_HAS_ZOOM_SPRITE) { // TODO: SAR in dpi done with `>> 1`, in coordinates with `/ 2` - rct_drawpixelinfo zoomed_dpi = { + DrawPixelInfo zoomed_dpi = { /* .bits = */ dpi->bits, /* .x = */ dpi->x >> 1, /* .y = */ dpi->y >> 1, @@ -1679,7 +1682,7 @@ static bool is_sprite_interacted_with_palette_set( }; auto zoomImageId = imageId.WithIndex(imageId.GetIndex() - g1->zoomed_offset); - return is_sprite_interacted_with_palette_set(&zoomed_dpi, zoomImageId, { coords.x / 2, coords.y / 2 }, paletteMap); + return IsSpriteInteractedWithPaletteSet(&zoomed_dpi, zoomImageId, { coords.x / 2, coords.y / 2 }, paletteMap); } } @@ -1717,7 +1720,7 @@ static bool is_sprite_interacted_with_palette_set( } } - origin.y = floor2(origin.y, round); + origin.y = Floor2(origin.y, round); int32_t yEndPoint = height; origin.y -= dpi->y; if (origin.y < 0) @@ -1747,7 +1750,7 @@ static bool is_sprite_interacted_with_palette_set( int32_t xEndPoint = g1->width; origin.x += g1->x_offset; - origin.x = floor2(origin.x, round); + origin.x = Floor2(origin.x, round); origin.x -= dpi->x; if (origin.x < 0) { @@ -1774,7 +1777,7 @@ static bool is_sprite_interacted_with_palette_set( if (g1->flags & G1_FLAG_RLE_COMPRESSION) { - return is_pixel_present_rle(g1->offset, xStartPoint, yStartPoint, round); + return IsPixelPresentRLE(g1->offset, xStartPoint, yStartPoint, round); } uint8_t* offset = g1->offset + (yStartPoint * g1->width) + xStartPoint; @@ -1782,7 +1785,7 @@ static bool is_sprite_interacted_with_palette_set( if (!(g1->flags & G1_FLAG_1)) { - return is_pixel_present_bmp(imageType, g1, offset, paletteMap); + return IsPixelPresentBMP(imageType, g1, offset, paletteMap); } Guard::Assert(false, "Invalid image type encountered."); @@ -1794,7 +1797,7 @@ static bool is_sprite_interacted_with_palette_set( * rct2: 0x00679023 */ -static bool is_sprite_interacted_with(rct_drawpixelinfo* dpi, ImageId imageId, const ScreenCoordsXY& coords) +static bool IsSpriteInteractedWith(DrawPixelInfo* dpi, ImageId imageId, const ScreenCoordsXY& coords) { PROFILED_FUNCTION(); @@ -1818,21 +1821,21 @@ static bool is_sprite_interacted_with(rct_drawpixelinfo* dpi, ImageId imageId, c } else { - _currentImageType = 0; + _currentImageType = IMAGE_TYPE_DEFAULT; } - return is_sprite_interacted_with_palette_set(dpi, imageId, coords, paletteMap); + return IsSpriteInteractedWithPaletteSet(dpi, imageId, coords, paletteMap); } /** * * rct2: 0x0068862C */ -InteractionInfo set_interaction_info_from_paint_session(PaintSession* session, uint32_t viewFlags, uint16_t filter) +InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32_t viewFlags, uint16_t filter) { PROFILED_FUNCTION(); PaintStruct* ps = &session->PaintHead; - rct_drawpixelinfo* dpi = &session->DPI; + DrawPixelInfo* dpi = &session->DPI; InteractionInfo info{}; while ((ps = ps->next_quadrant_ps) != nullptr) @@ -1842,7 +1845,7 @@ InteractionInfo set_interaction_info_from_paint_session(PaintSession* session, u while (next_ps != nullptr) { ps = next_ps; - if (is_sprite_interacted_with(dpi, ps->image_id, { ps->x, ps->y })) + if (IsSpriteInteractedWith(dpi, ps->image_id, { ps->x, ps->y })) { if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) != VisibilityKind::Hidden) { @@ -1856,7 +1859,7 @@ InteractionInfo set_interaction_info_from_paint_session(PaintSession* session, u #pragma GCC diagnostic ignored "-Wnull-dereference" for (AttachedPaintStruct* attached_ps = ps->attached_ps; attached_ps != nullptr; attached_ps = attached_ps->next) { - if (is_sprite_interacted_with(dpi, attached_ps->image_id, { (attached_ps->x + ps->x), (attached_ps->y + ps->y) })) + if (IsSpriteInteractedWith(dpi, attached_ps->image_id, { (attached_ps->x + ps->x), (attached_ps->y + ps->y) })) { if (PSSpriteTypeIsInFilter(ps, filter) && GetPaintStructVisibility(ps, viewFlags) != VisibilityKind::Hidden) { @@ -1883,13 +1886,13 @@ InteractionInfo set_interaction_info_from_paint_session(PaintSession* session, u * tileElement: edx * viewport: edi */ -InteractionInfo get_map_coordinates_from_pos(const ScreenCoordsXY& screenCoords, int32_t flags) +InteractionInfo GetMapCoordinatesFromPos(const ScreenCoordsXY& screenCoords, int32_t flags) { - rct_window* window = window_find_from_point(screenCoords); - return get_map_coordinates_from_pos_window(window, screenCoords, flags); + WindowBase* window = WindowFindFromPoint(screenCoords); + return GetMapCoordinatesFromPosWindow(window, screenCoords, flags); } -InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const ScreenCoordsXY& screenCoords, int32_t flags) +InteractionInfo GetMapCoordinatesFromPosWindow(WindowBase* window, const ScreenCoordsXY& screenCoords, int32_t flags) { InteractionInfo info{}; if (window == nullptr || window->viewport == nullptr) @@ -1897,7 +1900,7 @@ InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const Sc return info; } - rct_viewport* myviewport = window->viewport; + Viewport* myviewport = window->viewport; auto viewLoc = screenCoords; viewLoc -= myviewport->pos; if (viewLoc.x >= 0 && viewLoc.x < static_cast(myviewport->width) && viewLoc.y >= 0 @@ -1911,7 +1914,7 @@ InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const Sc viewLoc.x &= myviewport->zoom.ApplyTo(0xFFFFFFFF) & 0xFFFFFFFF; viewLoc.y &= myviewport->zoom.ApplyTo(0xFFFFFFFF) & 0xFFFFFFFF; } - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.x = viewLoc.x; dpi.y = viewLoc.y; dpi.height = 1; @@ -1921,7 +1924,7 @@ InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const Sc PaintSession* session = PaintSessionAlloc(&dpi, myviewport->flags); PaintSessionGenerate(*session); PaintSessionArrange(*session); - info = set_interaction_info_from_paint_session(session, myviewport->flags, flags & 0xFFFF); + info = SetInteractionInfoFromPaintSession(session, myviewport->flags, flags & 0xFFFF); PaintSessionFree(session); } return info; @@ -1930,7 +1933,7 @@ InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const Sc /** * screenRect represents 2D map coordinates at zoom 0. */ -void viewport_invalidate(const rct_viewport* viewport, const ScreenRect& screenRect) +void ViewportInvalidate(const Viewport* viewport, const ScreenRect& screenRect) { PROFILED_FUNCTION(); @@ -1942,7 +1945,7 @@ void viewport_invalidate(const rct_viewport* viewport, const ScreenRect& screenR if (owner != nullptr && owner->classification != WindowClass::MainWindow) { // note, window_is_visible will update viewport->visibility, so this should have a low hit count - if (!window_is_visible(*owner)) + if (!WindowIsVisible(*owner)) { return; } @@ -1968,17 +1971,17 @@ void viewport_invalidate(const rct_viewport* viewport, const ScreenRect& screenR bottomRight = { viewport->zoom.ApplyInversedTo(bottomRight.x), viewport->zoom.ApplyInversedTo(bottomRight.y) }; bottomRight += viewport->pos; - gfx_set_dirty_blocks({ topLeft, bottomRight }); + GfxSetDirtyBlocks({ topLeft, bottomRight }); } } -static rct_viewport* viewport_find_from_point(const ScreenCoordsXY& screenCoords) +static Viewport* ViewportFindFromPoint(const ScreenCoordsXY& screenCoords) { - rct_window* w = window_find_from_point(screenCoords); + WindowBase* w = WindowFindFromPoint(screenCoords); if (w == nullptr) return nullptr; - rct_viewport* viewport = w->viewport; + Viewport* viewport = w->viewport; if (viewport == nullptr) return nullptr; @@ -2000,16 +2003,16 @@ static rct_viewport* viewport_find_from_point(const ScreenCoordsXY& screenCoords * tile_element: edx ? * viewport: edi */ -std::optional screen_get_map_xy(const ScreenCoordsXY& screenCoords, rct_viewport** viewport) +std::optional ScreenGetMapXY(const ScreenCoordsXY& screenCoords, Viewport** viewport) { // This will get the tile location but we will need the more accuracy - rct_window* window = window_find_from_point(screenCoords); + WindowBase* window = WindowFindFromPoint(screenCoords); if (window == nullptr || window->viewport == nullptr) { return std::nullopt; } auto myViewport = window->viewport; - auto info = get_map_coordinates_from_pos_window(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain)); + auto info = GetMapCoordinatesFromPosWindow(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain)); if (info.SpriteType == ViewportInteractionItem::None) { return std::nullopt; @@ -2022,7 +2025,7 @@ std::optional screen_get_map_xy(const ScreenCoordsXY& screenCoords, rc for (int32_t i = 0; i < 5; i++) { int32_t z = TileElementHeight(cursorMapPos); - cursorMapPos = viewport_coord_to_map_coord(start_vp_pos, z); + cursorMapPos = ViewportPosToMapPos(start_vp_pos, z); cursorMapPos.x = std::clamp(cursorMapPos.x, info.Loc.x, info.Loc.x + 31); cursorMapPos.y = std::clamp(cursorMapPos.y, info.Loc.y, info.Loc.y + 31); } @@ -2037,16 +2040,16 @@ std::optional screen_get_map_xy(const ScreenCoordsXY& screenCoords, rc * * rct2: 0x006894D4 */ -std::optional screen_get_map_xy_with_z(const ScreenCoordsXY& screenCoords, int32_t z) +std::optional ScreenGetMapXYWithZ(const ScreenCoordsXY& screenCoords, int32_t z) { - rct_viewport* viewport = viewport_find_from_point(screenCoords); + Viewport* viewport = ViewportFindFromPoint(screenCoords); if (viewport == nullptr) { return std::nullopt; } auto vpCoords = viewport->ScreenToViewportCoord(screenCoords); - auto mapPosition = viewport_coord_to_map_coord(vpCoords, z); + auto mapPosition = ViewportPosToMapPos(vpCoords, z); if (!MapIsLocationValid(mapPosition)) { return std::nullopt; @@ -2059,9 +2062,9 @@ std::optional screen_get_map_xy_with_z(const ScreenCoordsXY& screenCoo * * rct2: 0x00689604 */ -std::optional screen_get_map_xy_quadrant(const ScreenCoordsXY& screenCoords, uint8_t* quadrant) +std::optional ScreenGetMapXYQuadrant(const ScreenCoordsXY& screenCoords, uint8_t* quadrant) { - auto mapCoords = screen_get_map_xy(screenCoords, nullptr); + auto mapCoords = ScreenGetMapXY(screenCoords, nullptr); if (!mapCoords.has_value()) return std::nullopt; @@ -2073,9 +2076,9 @@ std::optional screen_get_map_xy_quadrant(const ScreenCoordsXY& screenC * * rct2: 0x0068964B */ -std::optional screen_get_map_xy_quadrant_with_z(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* quadrant) +std::optional ScreenGetMapXYQuadrantWithZ(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* quadrant) { - auto mapCoords = screen_get_map_xy_with_z(screenCoords, z); + auto mapCoords = ScreenGetMapXYWithZ(screenCoords, z); if (!mapCoords.has_value()) return std::nullopt; @@ -2087,9 +2090,9 @@ std::optional screen_get_map_xy_quadrant_with_z(const ScreenCoordsXY& * * rct2: 0x00689692 */ -std::optional screen_get_map_xy_side(const ScreenCoordsXY& screenCoords, uint8_t* side) +std::optional ScreenGetMapXYSide(const ScreenCoordsXY& screenCoords, uint8_t* side) { - auto mapCoords = screen_get_map_xy(screenCoords, nullptr); + auto mapCoords = ScreenGetMapXY(screenCoords, nullptr); if (!mapCoords.has_value()) return std::nullopt; @@ -2101,9 +2104,9 @@ std::optional screen_get_map_xy_side(const ScreenCoordsXY& screenCoord * * rct2: 0x006896DC */ -std::optional screen_get_map_xy_side_with_z(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* side) +std::optional ScreenGetMapXYSideWithZ(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* side) { - auto mapCoords = screen_get_map_xy_with_z(screenCoords, z); + auto mapCoords = ScreenGetMapXYWithZ(screenCoords, z); if (!mapCoords.has_value()) return std::nullopt; @@ -2119,14 +2122,14 @@ std::optional screen_get_map_xy_side_with_z(const ScreenCoordsXY& scre * * @returns rotation in range 0-3 (inclusive) */ -uint8_t get_current_rotation() +uint8_t GetCurrentRotation() { uint8_t rotation = gCurrentRotation; uint8_t rotation_masked = rotation & 3; #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (rotation != rotation_masked) { - log_error( + LOG_ERROR( "Found wrong rotation %d! Will return %d instead.", static_cast(rotation), static_cast(rotation_masked)); } @@ -2134,7 +2137,7 @@ uint8_t get_current_rotation() return rotation_masked; } -int32_t get_height_marker_offset() +int32_t GetHeightMarkerOffset() { // Height labels in units if (gConfigGeneral.ShowHeightAsUnits) @@ -2148,17 +2151,17 @@ int32_t get_height_marker_offset() return 2 * 256; } -void viewport_set_saved_view() +void ViewportSetSavedView() { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr) { - rct_viewport* viewport = w->viewport; + Viewport* viewport = w->viewport; gSavedView = ScreenCoordsXY{ viewport->view_width / 2, viewport->view_height / 2 } + viewport->viewPos; gSavedViewZoom = viewport->zoom; - gSavedViewRotation = get_current_rotation(); + gSavedViewRotation = GetCurrentRotation(); } } diff --git a/src/openrct2/interface/Viewport.h b/src/openrct2/interface/Viewport.h index f4fbf17ae8..e77ccd4ba4 100644 --- a/src/openrct2/interface/Viewport.h +++ b/src/openrct2/interface/Viewport.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,9 +19,9 @@ struct PaintSession; struct RecordedPaintSession; struct PaintStruct; -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct TileElement; -struct rct_window; +struct WindowBase; struct EntityBase; struct Guest; struct Staff; @@ -112,49 +112,48 @@ extern uint8_t gShowLandRightsRefCount; extern uint8_t gShowConstructionRightsRefCount; // rct2: 0x014234BC -extern rct_viewport* g_music_tracking_viewport; +extern Viewport* g_music_tracking_viewport; extern ScreenCoordsXY gSavedView; extern ZoomLevel gSavedViewZoom; extern uint8_t gSavedViewRotation; -extern PaintEntry* gNextFreePaintStruct; extern uint8_t gCurrentRotation; -void viewport_init_all(); -std::optional centre_2d_coordinates(const CoordsXYZ& loc, rct_viewport* viewport); -void viewport_create(rct_window* w, const ScreenCoordsXY& screenCoords, int32_t width, int32_t height, const Focus& focus); -void viewport_remove(rct_viewport* viewport); -void viewports_invalidate(const ScreenRect& screenRect, ZoomLevel maxZoom = ZoomLevel{ -1 }); -void viewport_update_position(rct_window* window); -void viewport_update_sprite_follow(rct_window* window); -void viewport_update_smart_sprite_follow(rct_window* window); -void viewport_update_smart_guest_follow(rct_window* window, const Guest* peep); -void viewport_update_smart_staff_follow(rct_window* window, const Staff* peep); -void viewport_update_smart_vehicle_follow(rct_window* window); -void viewport_render( - rct_drawpixelinfo* dpi, const rct_viewport* viewport, const ScreenRect& screenRect, +void ViewportInitAll(); +std::optional centre_2d_coordinates(const CoordsXYZ& loc, Viewport* viewport); +void ViewportCreate(WindowBase* w, const ScreenCoordsXY& screenCoords, int32_t width, int32_t height, const Focus& focus); +void ViewportRemove(Viewport* viewport); +void ViewportsInvalidate(const ScreenRect& screenRect, ZoomLevel maxZoom = ZoomLevel{ -1 }); +void ViewportUpdatePosition(WindowBase* window); +void ViewportUpdateFollowSprite(WindowBase* window); +void ViewportUpdateSmartFollowEntity(WindowBase* window); +void ViewportUpdateSmartFollowGuest(WindowBase* window, const Guest* peep); +void ViewportUpdateSmartFollowStaff(WindowBase* window, const Staff* peep); +void ViewportUpdateSmartFollowVehicle(WindowBase* window); +void ViewportRender( + DrawPixelInfo* dpi, const Viewport* viewport, const ScreenRect& screenRect, std::vector* sessions = nullptr); -void viewport_paint( - const rct_viewport* viewport, rct_drawpixelinfo* dpi, const ScreenRect& screenRect, +void ViewportPaint( + const Viewport* viewport, DrawPixelInfo* dpi, const ScreenRect& screenRect, std::vector* sessions = nullptr); -CoordsXYZ viewport_adjust_for_map_height(const ScreenCoordsXY& startCoords); +CoordsXYZ ViewportAdjustForMapHeight(const ScreenCoordsXY& startCoords); -CoordsXY viewport_coord_to_map_coord(const ScreenCoordsXY& coords, int32_t z); -std::optional screen_pos_to_map_pos(const ScreenCoordsXY& screenCoords, int32_t* direction); +CoordsXY ViewportPosToMapPos(const ScreenCoordsXY& coords, int32_t z); +std::optional ScreenPosToMapPos(const ScreenCoordsXY& screenCoords, int32_t* direction); -void show_gridlines(); -void hide_gridlines(); -void show_land_rights(); -void hide_land_rights(); -void show_construction_rights(); -void hide_construction_rights(); -void viewport_set_visibility(uint8_t mode); +void ShowGridlines(); +void HideGridlines(); +void ShowLandRights(); +void HideLandRights(); +void ShowConstructionRights(); +void HideConstructionRights(); +void ViewportSetVisibility(uint8_t mode); -InteractionInfo get_map_coordinates_from_pos(const ScreenCoordsXY& screenCoords, int32_t flags); -InteractionInfo get_map_coordinates_from_pos_window(rct_window* window, const ScreenCoordsXY& screenCoords, int32_t flags); +InteractionInfo GetMapCoordinatesFromPos(const ScreenCoordsXY& screenCoords, int32_t flags); +InteractionInfo GetMapCoordinatesFromPosWindow(WindowBase* window, const ScreenCoordsXY& screenCoords, int32_t flags); -InteractionInfo set_interaction_info_from_paint_session(PaintSession* session, uint32_t viewFlags, uint16_t filter); +InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32_t viewFlags, uint16_t filter); InteractionInfo ViewportInteractionGetItemLeft(const ScreenCoordsXY& screenCoords); bool ViewportInteractionLeftOver(const ScreenCoordsXY& screenCoords); bool ViewportInteractionLeftClick(const ScreenCoordsXY& screenCoords); @@ -164,18 +163,18 @@ bool ViewportInteractionRightClick(const ScreenCoordsXY& screenCoords); CoordsXY ViewportInteractionGetTileStartAtCursor(const ScreenCoordsXY& screenCoords); -void viewport_invalidate(const rct_viewport* viewport, const ScreenRect& screenRect); +void ViewportInvalidate(const Viewport* viewport, const ScreenRect& screenRect); -std::optional screen_get_map_xy(const ScreenCoordsXY& screenCoords, rct_viewport** viewport); -std::optional screen_get_map_xy_with_z(const ScreenCoordsXY& screenCoords, int32_t z); -std::optional screen_get_map_xy_quadrant(const ScreenCoordsXY& screenCoords, uint8_t* quadrant); -std::optional screen_get_map_xy_quadrant_with_z(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* quadrant); -std::optional screen_get_map_xy_side(const ScreenCoordsXY& screenCoords, uint8_t* side); -std::optional screen_get_map_xy_side_with_z(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* side); +std::optional ScreenGetMapXY(const ScreenCoordsXY& screenCoords, Viewport** viewport); +std::optional ScreenGetMapXYWithZ(const ScreenCoordsXY& screenCoords, int32_t z); +std::optional ScreenGetMapXYQuadrant(const ScreenCoordsXY& screenCoords, uint8_t* quadrant); +std::optional ScreenGetMapXYQuadrantWithZ(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* quadrant); +std::optional ScreenGetMapXYSide(const ScreenCoordsXY& screenCoords, uint8_t* side); +std::optional ScreenGetMapXYSideWithZ(const ScreenCoordsXY& screenCoords, int32_t z, uint8_t* side); -uint8_t get_current_rotation(); -int32_t get_height_marker_offset(); +uint8_t GetCurrentRotation(); +int32_t GetHeightMarkerOffset(); -void viewport_set_saved_view(); +void ViewportSetSavedView(); VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlags); diff --git a/src/openrct2/interface/Widget.h b/src/openrct2/interface/Widget.h index d75b5e96ef..f76149527c 100644 --- a/src/openrct2/interface/Widget.h +++ b/src/openrct2/interface/Widget.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,6 +9,7 @@ #pragma once +#include "../drawing/Drawing.h" #include "../localisation/StringIds.h" #include "Window.h" @@ -40,7 +41,7 @@ enum class WindowWidgetType : uint8_t Last = 26, }; -constexpr const auto WIDGETS_END = rct_widget{ WindowWidgetType::Last, 0, 0, 0, 0, 0, 0, 0 }; +constexpr const auto WIDGETS_END = Widget{ WindowWidgetType::Last, 0, 0, 0, 0, 0, 0, 0 }; #define BAR_BLINK (1u << 31) enum @@ -62,11 +63,11 @@ constexpr uint8_t SCROLLBAR_WIDTH = 10; constexpr const ScreenSize TAB_SIZE = { 31, 27 }; -constexpr rct_widget MakeWidget( +constexpr Widget MakeWidget( const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) { - rct_widget out = {}; + Widget out = {}; out.left = origin.x; out.right = origin.x + size.width - 1; out.top = origin.y; @@ -79,19 +80,36 @@ constexpr rct_widget MakeWidget( return out; } -constexpr rct_widget MakeRemapWidget( - const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, - uint32_t content = 0xFFFFFFFF, StringId tooltip = STR_NONE) +constexpr Widget MakeWidget( + const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, ImageId image, + StringId tooltip = STR_NONE) { - return MakeWidget(origin, size, type, colour, IMAGE_TYPE_REMAP | content, tooltip); + 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 = type; + out.colour = static_cast(colour); + out.image = image; + out.tooltip = tooltip; + + return out; } -constexpr rct_widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = STR_NONE) +constexpr Widget MakeRemapWidget( + const ScreenCoordsXY& origin, const ScreenSize& size, WindowWidgetType type, WindowColour colour, ImageIndex content, + StringId tooltip = STR_NONE) +{ + return MakeWidget(origin, size, type, colour, ImageId(content, FilterPaletteID::PaletteNull), tooltip); +} + +constexpr Widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = STR_NONE) { const ScreenSize size = TAB_SIZE; const WindowWidgetType type = WindowWidgetType::Tab; const WindowColour colour = WindowColour::Secondary; - const uint32_t content = 0xFFFFFFFF; + const auto content = ImageId(ImageIndexUndefined); return MakeWidget(origin, size, type, colour, content, tooltip); } @@ -99,7 +117,7 @@ constexpr rct_widget MakeTab(const ScreenCoordsXY& origin, StringId tooltip = ST #define MakeSpinnerWidgets(...) \ MakeWidget(__VA_ARGS__), MakeSpinnerIncreaseWidget(__VA_ARGS__), MakeSpinnerDecreaseWidget(__VA_ARGS__) -constexpr rct_widget MakeSpinnerDecreaseWidget( +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) { @@ -111,7 +129,7 @@ constexpr rct_widget MakeSpinnerDecreaseWidget( return MakeWidget({ xPos, yPos }, { width, height }, WindowWidgetType::Button, colour, STR_NUMERIC_DOWN, tooltip); } -constexpr rct_widget MakeSpinnerIncreaseWidget( +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) { @@ -125,14 +143,14 @@ constexpr rct_widget MakeSpinnerIncreaseWidget( #define MakeDropdownWidgets(...) MakeDropdownBoxWidget(__VA_ARGS__), MakeDropdownButtonWidget(__VA_ARGS__) -constexpr rct_widget MakeDropdownBoxWidget( +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) { return MakeWidget(origin, size, type, colour, content); } -constexpr rct_widget MakeDropdownButtonWidget( +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) { @@ -144,22 +162,22 @@ constexpr rct_widget MakeDropdownButtonWidget( return MakeWidget({ xPos, yPos }, { width, height }, WindowWidgetType::Button, colour, STR_DROPDOWN_GLYPH, tooltip); } -void WidgetScrollUpdateThumbs(rct_window& w, WidgetIndex widget_index); -void WidgetDraw(rct_drawpixelinfo* dpi, rct_window& w, WidgetIndex widgetIndex); +void WidgetScrollUpdateThumbs(WindowBase& w, WidgetIndex widget_index); +void WidgetDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex); -bool WidgetIsDisabled(const rct_window& w, WidgetIndex widgetIndex); -bool WidgetIsHoldable(const rct_window& w, WidgetIndex widgetIndex); -bool WidgetIsVisible(const rct_window& w, WidgetIndex widgetIndex); -bool WidgetIsPressed(const rct_window& w, WidgetIndex widgetIndex); -bool WidgetIsHighlighted(const rct_window& w, WidgetIndex widgetIndex); -bool WidgetIsActiveTool(const rct_window& w, WidgetIndex widgetIndex); +bool WidgetIsDisabled(const WindowBase& w, WidgetIndex widgetIndex); +bool WidgetIsHoldable(const WindowBase& w, WidgetIndex widgetIndex); +bool WidgetIsVisible(const WindowBase& w, WidgetIndex widgetIndex); +bool WidgetIsPressed(const WindowBase& w, WidgetIndex widgetIndex); +bool WidgetIsHighlighted(const WindowBase& w, WidgetIndex widgetIndex); +bool WidgetIsActiveTool(const WindowBase& w, WidgetIndex widgetIndex); void WidgetScrollGetPart( - rct_window& w, const rct_widget* widget, const ScreenCoordsXY& screenCoords, ScreenCoordsXY& retScreenCoords, + WindowBase& w, const Widget* widget, const ScreenCoordsXY& screenCoords, ScreenCoordsXY& retScreenCoords, int32_t* output_scroll_area, int32_t* scroll_id); -void WidgetSetEnabled(rct_window& w, WidgetIndex widgetIndex, bool enabled); -void WidgetSetDisabled(rct_window& w, WidgetIndex widgetIndex, bool value); -void WidgetSetHoldable(rct_window& w, WidgetIndex widgetIndex, bool value); -void WidgetSetVisible(rct_window& w, WidgetIndex widgetIndex, bool value); -void WidgetSetPressed(rct_window& w, WidgetIndex widgetIndex, bool value); -void WidgetSetCheckboxValue(rct_window& w, WidgetIndex widgetIndex, bool value); +void WidgetSetEnabled(WindowBase& w, WidgetIndex widgetIndex, bool enabled); +void WidgetSetDisabled(WindowBase& w, WidgetIndex widgetIndex, bool value); +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); diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index c38aa3c4ef..9d69e6f893 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,6 +19,7 @@ #include "../core/Guard.hpp" #include "../drawing/Drawing.h" #include "../interface/Cursors.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../platform/Platform.h" @@ -38,11 +39,12 @@ #include #include -std::list> g_window_list; -rct_window* gWindowAudioExclusive; +std::list> g_window_list; +WindowBase* gWindowAudioExclusive; -widget_identifier gCurrentTextBox = { { WindowClass::Null, 0 }, 0 }; -char gTextBoxInput[TEXT_INPUT_SIZE] = { 0 }; +WidgetIdentifier gCurrentTextBox = { { WindowClass::Null, 0 }, 0 }; +WindowCloseModifier gLastCloseModifier = { { WindowClass::Null, 0 }, CloseWindowModifier::None }; +u8string gTextBoxInput; int32_t gTextBoxFrameNo = 0; bool gUsingWidgetTextBox = false; TextInputSession* gTextInput; @@ -82,17 +84,17 @@ namespace WindowCloseFlags static constexpr uint32_t CloseSingle = (1 << 1); } // namespace WindowCloseFlags -static void window_draw_core(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t top, int32_t right, int32_t bottom); -static void window_draw_single(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t top, int32_t right, int32_t bottom); +static void WindowDrawCore(DrawPixelInfo* dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom); +static void WindowDrawSingle(DrawPixelInfo* dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom); -std::list>::iterator window_get_iterator(const rct_window* w) +std::list>::iterator WindowGetIterator(const WindowBase* w) { - return std::find_if(g_window_list.begin(), g_window_list.end(), [w](const std::shared_ptr& w2) -> bool { + return std::find_if(g_window_list.begin(), g_window_list.end(), [w](const std::shared_ptr& w2) -> bool { return w == w2.get(); }); } -void window_visit_each(std::function func) +void WindowVisitEach(std::function func) { auto windowList = g_window_list; for (auto& w : windowList) @@ -105,18 +107,18 @@ void window_visit_each(std::function func) * * rct2: 0x006ED7B0 */ -void window_dispatch_update_all() +void WindowDispatchUpdateAll() { // gTooltipNotShownTicks++; - window_visit_each([&](rct_window* w) { window_event_update_call(w); }); + WindowVisitEach([&](WindowBase* w) { WindowEventUpdateCall(w); }); } -void window_update_all_viewports() +void WindowUpdateAllViewports() { - window_visit_each([&](rct_window* w) { - if (w->viewport != nullptr && window_is_visible(*w)) + WindowVisitEach([&](WindowBase* w) { + if (w->viewport != nullptr && WindowIsVisible(*w)) { - viewport_update_position(w); + ViewportUpdatePosition(w); } }); } @@ -125,9 +127,9 @@ void window_update_all_viewports() * * rct2: 0x006E77A1 */ -void window_update_all() +void WindowUpdateAll() { - // window_update_all_viewports(); + // WindowUpdateAllViewports(); // 1000 tick update gWindowUpdateTicks += gCurrentDeltaTime; @@ -135,11 +137,11 @@ void window_update_all() { gWindowUpdateTicks = 0; - window_visit_each([](rct_window* w) { window_event_periodic_update_call(w); }); + WindowVisitEach([](WindowBase* w) { WindowEventPeriodicUpdateCall(w); }); } // Border flash invalidation - window_visit_each([](rct_window* w) { + WindowVisitEach([](WindowBase* w) { if (w->flags & WF_WHITE_BORDER_MASK) { w->flags -= WF_WHITE_BORDER_ONE; @@ -154,7 +156,7 @@ void window_update_all() windowManager->UpdateMouseWheel(); } -static void window_close_surplus(int32_t cap, WindowClass avoid_classification) +static void WindowCloseSurplus(int32_t cap, WindowClass avoid_classification) { // find the amount of windows that are currently open auto count = static_cast(g_window_list.size()); @@ -163,7 +165,7 @@ static void window_close_surplus(int32_t cap, WindowClass avoid_classification) for (auto i = 0; i < diff; i++) { // iterates through the list until it finds the newest window, or a window that can be closed - rct_window* foundW{}; + WindowBase* foundW{}; for (auto& w : g_window_list) { if (!(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT | WF_NO_AUTO_CLOSE))) @@ -177,14 +179,14 @@ static void window_close_surplus(int32_t cap, WindowClass avoid_classification) { continue; } - window_close(*foundW); + WindowClose(*foundW); } } /* * Changes the maximum amount of windows allowed */ -void window_set_window_limit(int32_t value) +void WindowSetWindowLimit(int32_t value) { int32_t prev = gConfigGeneral.WindowLimit; int32_t val = std::clamp(value, WINDOW_LIMIT_MIN, WINDOW_LIMIT_MAX); @@ -194,7 +196,7 @@ void window_set_window_limit(int32_t value) // windows if one sets a limit lower than the number of windows open if (val < prev) { - window_close_surplus(val, WindowClass::Options); + WindowCloseSurplus(val, WindowClass::Options); } } @@ -204,16 +206,16 @@ void window_set_window_limit(int32_t value) * * @param window The window to close (esi). */ -void window_close(rct_window& w) +void WindowClose(WindowBase& w) { - auto itWindow = window_get_iterator(&w); + auto itWindow = WindowGetIterator(&w); if (itWindow == g_window_list.end()) return; // Explicit copy of the shared ptr to keep the memory valid. - std::shared_ptr window = *itWindow; + std::shared_ptr window = *itWindow; - window_event_close_call(window.get()); + WindowEventCloseCall(window.get()); // Remove viewport window->RemoveViewport(); @@ -222,19 +224,19 @@ void window_close(rct_window& w) window->Invalidate(); // The window list may have been modified in the close event - itWindow = window_get_iterator(&w); + itWindow = WindowGetIterator(&w); if (itWindow != g_window_list.end()) g_window_list.erase(itWindow); } -template static void window_close_by_condition(TPred pred, uint32_t flags = WindowCloseFlags::None) +template static void WindowCloseByCondition(TPred pred, uint32_t flags = WindowCloseFlags::None) { bool listUpdated; do { listUpdated = false; - auto closeSingle = [&](std::shared_ptr window) -> bool { + auto closeSingle = [&](std::shared_ptr window) -> bool { if (!pred(window.get())) { return false; @@ -244,7 +246,7 @@ template static void window_close_by_condition(TPred pred, uint3 // we need to break this current iteration and restart. size_t previousCount = g_window_list.size(); - window_close(*window.get()); + WindowClose(*window.get()); if ((flags & WindowCloseFlags::CloseSingle) != 0) { @@ -283,9 +285,9 @@ template static void window_close_by_condition(TPred pred, uint3 * rct2: 0x006ECCF4 * @param cls (cl) with bit 15 set */ -void window_close_by_class(WindowClass cls) +void WindowCloseByClass(WindowClass cls) { - window_close_by_condition([&](rct_window* w) -> bool { return w->classification == cls; }); + WindowCloseByCondition([&](WindowBase* w) -> bool { return w->classification == cls; }); } /** @@ -294,15 +296,15 @@ void window_close_by_class(WindowClass cls) * @param cls (cl) without bit 15 set * @param number (dx) */ -void window_close_by_number(WindowClass cls, rct_windownumber number) +void WindowCloseByNumber(WindowClass cls, rct_windownumber number) { - window_close_by_condition([cls, number](rct_window* w) -> bool { return w->classification == cls && w->number == number; }); + WindowCloseByCondition([cls, number](WindowBase* w) -> bool { return w->classification == cls && w->number == number; }); } // TODO: Refactor this to use variant once the new window class is done. -void window_close_by_number(WindowClass cls, EntityId number) +void WindowCloseByNumber(WindowClass cls, EntityId number) { - window_close_by_number(cls, static_cast(number.ToUnderlying())); + WindowCloseByNumber(cls, static_cast(number.ToUnderlying())); } /** @@ -311,7 +313,7 @@ void window_close_by_number(WindowClass cls, EntityId number) * @param cls (cl) with bit 15 set * @returns the window or NULL if no window was found. */ -rct_window* window_find_by_class(WindowClass cls) +WindowBase* WindowFindByClass(WindowClass cls) { for (auto& w : g_window_list) { @@ -330,7 +332,7 @@ rct_window* window_find_by_class(WindowClass cls) * @param number (dx) * @returns the window or NULL if no window was found. */ -rct_window* window_find_by_number(WindowClass cls, rct_windownumber number) +WindowBase* WindowFindByNumber(WindowClass cls, rct_windownumber number) { for (auto& w : g_window_list) { @@ -343,9 +345,9 @@ rct_window* window_find_by_number(WindowClass cls, rct_windownumber number) } // TODO: Use variant for this once the window framework is done. -rct_window* window_find_by_number(WindowClass cls, EntityId id) +WindowBase* WindowFindByNumber(WindowClass cls, EntityId id) { - return window_find_by_number(cls, static_cast(id.ToUnderlying())); + return WindowFindByNumber(cls, static_cast(id.ToUnderlying())); } /** @@ -353,9 +355,9 @@ rct_window* window_find_by_number(WindowClass cls, EntityId id) * * rct2: 0x006E403C */ -void window_close_top() +void WindowCloseTop() { - window_close_by_class(WindowClass::Dropdown); + WindowCloseByClass(WindowClass::Dropdown); if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) { @@ -363,8 +365,8 @@ void window_close_top() return; } - auto pred = [](rct_window* w) -> bool { return !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }; - window_close_by_condition(pred, WindowCloseFlags::CloseSingle | WindowCloseFlags::IterateReverse); + auto pred = [](WindowBase* w) -> bool { return !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }; + WindowCloseByCondition(pred, WindowCloseFlags::CloseSingle | WindowCloseFlags::IterateReverse); } /** @@ -372,17 +374,17 @@ void window_close_top() * * rct2: 0x006EE927 */ -void window_close_all() +void WindowCloseAll() { - window_close_by_class(WindowClass::Dropdown); - window_close_by_condition([](rct_window* w) -> bool { return !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }); + WindowCloseByClass(WindowClass::Dropdown); + WindowCloseByCondition([](WindowBase* w) -> bool { return !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }); } -void window_close_all_except_class(WindowClass cls) +void WindowCloseAllExceptClass(WindowClass cls) { - window_close_by_class(WindowClass::Dropdown); + WindowCloseByClass(WindowClass::Dropdown); - window_close_by_condition([cls](rct_window* w) -> bool { + WindowCloseByCondition([cls](WindowBase* w) -> bool { return w->classification != cls && !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }); } @@ -390,16 +392,29 @@ void window_close_all_except_class(WindowClass cls) /** * Closes all windows, save for those having any of the passed flags. */ -void window_close_all_except_flags(uint16_t flags) +void WindowCloseAllExceptFlags(uint16_t flags) { - window_close_by_condition([flags](rct_window* w) -> bool { return !(w->flags & flags); }); + WindowCloseByCondition([flags](WindowBase* w) -> bool { return !(w->flags & flags); }); +} + +/** + * Closes all windows except the specified window number and class. + * @param number (dx) + * @param cls (cl) without bit 15 set + */ +void WindowCloseAllExceptNumberAndClass(rct_windownumber number, WindowClass cls) +{ + WindowCloseByClass(WindowClass::Dropdown); + WindowCloseByCondition([cls, number](WindowBase* w) -> bool { + return (!(w->number == number && w->classification == cls) && !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))); + }); } /** * * rct2: 0x006EA845 */ -rct_window* window_find_from_point(const ScreenCoordsXY& screenCoords) +WindowBase* WindowFindFromPoint(const ScreenCoordsXY& screenCoords) { for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++) { @@ -410,7 +425,7 @@ rct_window* window_find_from_point(const ScreenCoordsXY& screenCoords) if (w->flags & WF_NO_BACKGROUND) { - auto widgetIndex = window_find_widget_from_point(*w.get(), screenCoords); + auto widgetIndex = WindowFindWidgetFromPoint(*w.get(), screenCoords); if (widgetIndex == -1) continue; } @@ -429,10 +444,10 @@ rct_window* window_find_from_point(const ScreenCoordsXY& screenCoords) * returns widget_index (edx) * EDI NEEDS TO BE SET TO w->widgets[widget_index] AFTER */ -WidgetIndex window_find_widget_from_point(rct_window& w, const ScreenCoordsXY& screenCoords) +WidgetIndex WindowFindWidgetFromPoint(WindowBase& w, const ScreenCoordsXY& screenCoords) { // Invalidate the window - window_event_invalidate_call(&w); + WindowEventInvalidateCall(&w); // Find the widget at point x, y WidgetIndex widget_index = -1; @@ -472,9 +487,9 @@ WidgetIndex window_find_widget_from_point(rct_window& w, const ScreenCoordsXY& s * * @param window The window to invalidate (esi). */ -template static void window_invalidate_by_condition(TPred pred) +template static void WindowInvalidateByCondition(TPred pred) { - window_visit_each([pred](rct_window* w) { + WindowVisitEach([pred](WindowBase* w) { if (pred(w)) { w->Invalidate(); @@ -487,40 +502,40 @@ template static void window_invalidate_by_condition(TPred pred) * rct2: 0x006EC3AC * @param cls (al) with bit 14 set */ -void window_invalidate_by_class(WindowClass cls) +void WindowInvalidateByClass(WindowClass cls) { - window_invalidate_by_condition([cls](rct_window* w) -> bool { return w->classification == cls; }); + WindowInvalidateByCondition([cls](WindowBase* w) -> bool { return w->classification == cls; }); } /** * Invalidates all windows with the specified window class and number. * rct2: 0x006EC3AC */ -void window_invalidate_by_number(WindowClass cls, rct_windownumber number) +void WindowInvalidateByNumber(WindowClass cls, rct_windownumber number) { - window_invalidate_by_condition( - [cls, number](rct_window* w) -> bool { return w->classification == cls && w->number == number; }); + WindowInvalidateByCondition( + [cls, number](WindowBase* w) -> bool { return w->classification == cls && w->number == number; }); } // TODO: Use variant for this once the window framework is done. -void window_invalidate_by_number(WindowClass cls, EntityId id) +void WindowInvalidateByNumber(WindowClass cls, EntityId id) { - window_invalidate_by_number(cls, static_cast(id.ToUnderlying())); + WindowInvalidateByNumber(cls, static_cast(id.ToUnderlying())); } /** * Invalidates all windows. */ -void window_invalidate_all() +void WindowInvalidateAll() { - window_visit_each([](rct_window* w) { w->Invalidate(); }); + WindowVisitEach([](WindowBase* w) { w->Invalidate(); }); } /** * Invalidates the specified widget of a window. * rct2: 0x006EC402 */ -void widget_invalidate(rct_window& w, WidgetIndex widgetIndex) +void WidgetInvalidate(WindowBase& w, WidgetIndex widgetIndex) { #ifdef DEBUG for (int32_t i = 0; i <= widgetIndex; i++) @@ -533,13 +548,13 @@ void widget_invalidate(rct_window& w, WidgetIndex widgetIndex) if (widget.left == -2) return; - gfx_set_dirty_blocks({ { w.windowPos + ScreenCoordsXY{ widget.left, widget.top } }, - { w.windowPos + ScreenCoordsXY{ widget.right + 1, widget.bottom + 1 } } }); + GfxSetDirtyBlocks({ { w.windowPos + ScreenCoordsXY{ widget.left, widget.top } }, + { w.windowPos + ScreenCoordsXY{ widget.right + 1, widget.bottom + 1 } } }); } template static void widget_invalidate_by_condition(TPred pred) { - window_visit_each([pred](rct_window* w) { + WindowVisitEach([pred](WindowBase* w) { if (pred(w)) { w->Invalidate(); @@ -550,12 +565,12 @@ template static void widget_invalidate_by_condition(TPred pred) /** * Invalidates the specified widget of all windows that match the specified window class. */ -void widget_invalidate_by_class(WindowClass cls, WidgetIndex widgetIndex) +void WidgetInvalidateByClass(WindowClass cls, WidgetIndex widgetIndex) { - window_visit_each([cls, widgetIndex](rct_window* w) { + WindowVisitEach([cls, widgetIndex](WindowBase* w) { if (w->classification == cls) { - widget_invalidate(*w, widgetIndex); + WidgetInvalidate(*w, widgetIndex); } }); } @@ -564,12 +579,12 @@ void widget_invalidate_by_class(WindowClass cls, WidgetIndex widgetIndex) * Invalidates the specified widget of all windows that match the specified window class and number. * rct2: 0x006EC3AC */ -void widget_invalidate_by_number(WindowClass cls, rct_windownumber number, WidgetIndex widgetIndex) +void WidgetInvalidateByNumber(WindowClass cls, rct_windownumber number, WidgetIndex widgetIndex) { - window_visit_each([cls, number, widgetIndex](rct_window* w) { + WindowVisitEach([cls, number, widgetIndex](WindowBase* w) { if (w->classification == cls && w->number == number) { - widget_invalidate(*w, widgetIndex); + WidgetInvalidate(*w, widgetIndex); } }); } @@ -580,11 +595,11 @@ void widget_invalidate_by_number(WindowClass cls, rct_windownumber number, Widge * * @param w The window (esi). */ -void window_update_scroll_widgets(rct_window& w) +void WindowUpdateScrollWidgets(WindowBase& w) { int32_t scrollIndex, width, height, scrollPositionChanged; WidgetIndex widgetIndex; - rct_widget* widget; + Widget* widget; widgetIndex = 0; scrollIndex = 0; @@ -596,7 +611,7 @@ void window_update_scroll_widgets(rct_window& w) auto& scroll = w.scrolls[scrollIndex]; width = 0; height = 0; - window_get_scroll_size(&w, scrollIndex, &width, &height); + WindowGetScrollSize(&w, scrollIndex, &width, &height); if (height == 0) { scroll.v_top = 0; @@ -630,7 +645,7 @@ void window_update_scroll_widgets(rct_window& w) } } -int32_t window_get_scroll_data_index(const rct_window& w, WidgetIndex widget_index) +int32_t WindowGetScrollDataIndex(const WindowBase& w, WidgetIndex widget_index) { int32_t i, result; @@ -648,11 +663,11 @@ int32_t window_get_scroll_data_index(const rct_window& w, WidgetIndex widget_ind * * rct2: 0x006ECDA4 */ -rct_window* window_bring_to_front(rct_window& w) +WindowBase* WindowBringToFront(WindowBase& w) { if (!(w.flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))) { - auto itSourcePos = window_get_iterator(&w); + auto itSourcePos = WindowGetIterator(&w); if (itSourcePos != g_window_list.end()) { // Insert in front of the first non-stick-to-front window @@ -683,22 +698,22 @@ rct_window* window_bring_to_front(rct_window& w) return &w; } -rct_window* window_bring_to_front_by_class_with_flags(WindowClass cls, uint16_t flags) +WindowBase* WindowBringToFrontByClassWithFlags(WindowClass cls, uint16_t flags) { - rct_window* w = window_find_by_class(cls); + WindowBase* w = WindowFindByClass(cls); if (w != nullptr) { w->flags |= flags; w->Invalidate(); - w = window_bring_to_front(*w); + w = WindowBringToFront(*w); } return w; } -rct_window* window_bring_to_front_by_class(WindowClass cls) +WindowBase* WindowBringToFrontByClass(WindowClass cls) { - return window_bring_to_front_by_class_with_flags(cls, WF_WHITE_BORDER_MASK); + return WindowBringToFrontByClassWithFlags(cls, WF_WHITE_BORDER_MASK); } /** @@ -707,16 +722,16 @@ rct_window* window_bring_to_front_by_class(WindowClass cls) * cls (cl) * number (dx) */ -rct_window* window_bring_to_front_by_number(WindowClass cls, rct_windownumber number) +WindowBase* WindowBringToFrontByNumber(WindowClass cls, rct_windownumber number) { - rct_window* w; + WindowBase* w; - w = window_find_by_number(cls, number); + w = WindowFindByNumber(cls, number); if (w != nullptr) { w->flags |= WF_WHITE_BORDER_MASK; w->Invalidate(); - w = window_bring_to_front(*w); + w = WindowBringToFront(*w); } return w; @@ -726,9 +741,9 @@ rct_window* window_bring_to_front_by_number(WindowClass cls, rct_windownumber nu * * rct2: 0x006EE65A */ -void window_push_others_right(rct_window& window) +void WindowPushOthersRight(WindowBase& window) { - window_visit_each([&window](rct_window* w) { + WindowVisitEach([&window](WindowBase* w) { if (w == &window) return; if (w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)) @@ -757,10 +772,10 @@ void window_push_others_right(rct_window& window) * * rct2: 0x006EE6EA */ -void window_push_others_below(rct_window& w1) +void WindowPushOthersBelow(WindowBase& w1) { // Enumerate through all other windows - window_visit_each([&w1](rct_window* w2) { + WindowVisitEach([&w1](WindowBase* w2) { if (&w1 == w2) return; // ? @@ -795,7 +810,7 @@ void window_push_others_below(rct_window& w1) * * rct2: 0x006EE2E4 */ -rct_window* window_get_main() +WindowBase* WindowGetMain() { for (auto& w : g_window_list) { @@ -815,9 +830,9 @@ rct_window* window_get_main() * @param y (ecx) * @param z (edx) */ -void window_scroll_to_location(rct_window& w, const CoordsXYZ& coords) +void WindowScrollToLocation(WindowBase& w, const CoordsXYZ& coords) { - window_unfollow_sprite(w); + WindowUnfollowSprite(w); if (w.viewport != nullptr) { int16_t height = TileElementHeight(coords); @@ -838,7 +853,7 @@ void window_scroll_to_location(rct_window& w, const CoordsXYZ& coords) } } - auto screenCoords = Translate3DTo2DWithZ(get_current_rotation(), coords); + auto screenCoords = Translate3DTo2DWithZ(GetCurrentRotation(), coords); int32_t i = 0; if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) @@ -849,7 +864,7 @@ void window_scroll_to_location(rct_window& w, const CoordsXYZ& coords) auto x2 = w.viewport->pos.x + static_cast(w.viewport->width * window_scroll_locations[i][0]); auto y2 = w.viewport->pos.y + static_cast(w.viewport->height * window_scroll_locations[i][1]); - auto it = window_get_iterator(&w); + auto it = WindowGetIterator(&w); for (; it != g_window_list.end(); it++) { auto w2 = (*it).get(); @@ -897,7 +912,7 @@ void window_scroll_to_location(rct_window& w, const CoordsXYZ& coords) */ static void call_event_viewport_rotate_on_all_windows() { - window_visit_each([](rct_window* w) { window_event_viewport_rotate_call(w); }); + WindowVisitEach([](WindowBase* w) { WindowEventViewportRotateCall(w); }); } /** @@ -907,17 +922,17 @@ static void call_event_viewport_rotate_on_all_windows() * 1: clockwise * -1: anti-clockwise */ -void window_rotate_camera(rct_window& w, int32_t direction) +void WindowRotateCamera(WindowBase& w, int32_t direction) { - rct_viewport* viewport = w.viewport; + Viewport* viewport = w.viewport; if (viewport == nullptr) return; auto windowPos = ScreenCoordsXY{ (viewport->width >> 1), (viewport->height >> 1) } + viewport->pos; // has something to do with checking if middle of the viewport is obstructed - rct_viewport* other; - auto mapXYCoords = screen_get_map_xy(windowPos, &other); + Viewport* other; + auto mapXYCoords = ScreenGetMapXY(windowPos, &other); CoordsXYZ coords{}; // other != viewport probably triggers on viewports in ride or guest window? @@ -926,7 +941,7 @@ void window_rotate_camera(rct_window& w, int32_t direction) { auto viewPos = ScreenCoordsXY{ (viewport->view_width >> 1), (viewport->view_height >> 1) } + viewport->viewPos; - coords = viewport_adjust_for_map_height(viewPos); + coords = ViewportAdjustForMapHeight(viewPos); } else { @@ -935,7 +950,7 @@ void window_rotate_camera(rct_window& w, int32_t direction) coords.z = TileElementHeight(coords); } - gCurrentRotation = (get_current_rotation() + direction) & 3; + gCurrentRotation = (GetCurrentRotation() + direction) & 3; auto centreLoc = centre_2d_coordinates(coords, viewport); @@ -948,19 +963,19 @@ void window_rotate_camera(rct_window& w, int32_t direction) w.Invalidate(); call_event_viewport_rotate_on_all_windows(); - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); } -void window_viewport_get_map_coords_by_cursor( - const rct_window& w, int32_t* map_x, int32_t* map_y, int32_t* offset_x, int32_t* offset_y) +void WindowViewportGetMapCoordsByCursor( + const WindowBase& w, int32_t* map_x, int32_t* map_y, int32_t* offset_x, int32_t* offset_y) { // Get mouse position to offset against. auto mouseCoords = ContextGetCursorPositionScaled(); // Compute map coordinate by mouse position. auto viewportPos = w.viewport->ScreenToViewportCoord(mouseCoords); - auto coordsXYZ = viewport_adjust_for_map_height(viewportPos); - auto mapCoords = viewport_coord_to_map_coord(viewportPos, coordsXYZ.z); + auto coordsXYZ = ViewportAdjustForMapHeight(viewportPos); + auto mapCoords = ViewportPosToMapPos(viewportPos, coordsXYZ.z); *map_x = mapCoords.x; *map_y = mapCoords.y; @@ -970,7 +985,7 @@ void window_viewport_get_map_coords_by_cursor( auto centreLoc = centre_2d_coordinates({ mapCoords.x, mapCoords.y, z }, w.viewport); if (!centreLoc) { - log_error("Invalid location."); + LOG_ERROR("Invalid location."); return; } @@ -983,7 +998,7 @@ void window_viewport_get_map_coords_by_cursor( *offset_y = w.viewport->zoom.ApplyTo(w.savedViewPos.y - (centreLoc->y + rebased_y)); } -void window_viewport_centre_tile_around_cursor(rct_window& w, int32_t map_x, int32_t map_y, int32_t offset_x, int32_t offset_y) +void WindowViewportCentreTileAroundCursor(WindowBase& w, int32_t map_x, int32_t map_y, int32_t offset_x, int32_t offset_y) { // Get viewport coordinates centring around the tile. int32_t z = TileElementHeight({ map_x, map_y }); @@ -991,7 +1006,7 @@ void window_viewport_centre_tile_around_cursor(rct_window& w, int32_t map_x, int if (!centreLoc.has_value()) { - log_error("Invalid location."); + LOG_ERROR("Invalid location."); return; } @@ -1010,19 +1025,19 @@ void window_viewport_centre_tile_around_cursor(rct_window& w, int32_t map_x, int /** * For all windows with viewports, ensure they do not have a zoom level less than the minimum. */ -void window_check_all_valid_zoom() +void WindowCheckAllValidZoom() { - window_visit_each([](rct_window* w) { + WindowVisitEach([](WindowBase* w) { if (w->viewport != nullptr && w->viewport->zoom < ZoomLevel::min()) { - window_zoom_set(*w, ZoomLevel::min(), false); + WindowZoomSet(*w, ZoomLevel::min(), false); } }); } -void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor) +void WindowZoomSet(WindowBase& w, ZoomLevel zoomLevel, bool atCursor) { - rct_viewport* v = w.viewport; + Viewport* v = w.viewport; if (v == nullptr) return; @@ -1037,7 +1052,7 @@ void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor) int32_t offset_y = 0; if (gConfigGeneral.ZoomToCursor && atCursor) { - window_viewport_get_map_coords_by_cursor(w, &saved_map_x, &saved_map_y, &offset_x, &offset_y); + WindowViewportGetMapCoordsByCursor(w, &saved_map_x, &saved_map_y, &offset_x, &offset_y); } // Zoom in @@ -1063,12 +1078,12 @@ void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor) // Zooming to cursor? Centre around the tile we were hovering over just now. if (gConfigGeneral.ZoomToCursor && atCursor) { - window_viewport_centre_tile_around_cursor(w, saved_map_x, saved_map_y, offset_x, offset_y); + WindowViewportCentreTileAroundCursor(w, saved_map_x, saved_map_y, offset_x, offset_y); } // HACK: Prevents the redraw from failing when there is // a window on top of the viewport. - window_bring_to_front(w); + WindowBringToFront(w); w.Invalidate(); } @@ -1076,23 +1091,23 @@ void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor) * * rct2: 0x006887A6 */ -void window_zoom_in(rct_window& w, bool atCursor) +void WindowZoomIn(WindowBase& w, bool atCursor) { - window_zoom_set(w, w.viewport->zoom - 1, atCursor); + WindowZoomSet(w, w.viewport->zoom - 1, atCursor); } /** * * rct2: 0x006887E0 */ -void window_zoom_out(rct_window& w, bool atCursor) +void WindowZoomOut(WindowBase& w, bool atCursor) { - window_zoom_set(w, w.viewport->zoom + 1, atCursor); + WindowZoomSet(w, w.viewport->zoom + 1, atCursor); } -void main_window_zoom(bool zoomIn, bool atCursor) +void MainWindowZoom(bool zoomIn, bool atCursor) { - auto* mainWindow = window_get_main(); + auto* mainWindow = WindowGetMain(); if (mainWindow == nullptr) return; @@ -1106,22 +1121,22 @@ void main_window_zoom(bool zoomIn, bool atCursor) return; if (zoomIn) - window_zoom_in(*mainWindow, atCursor); + WindowZoomIn(*mainWindow, atCursor); else - window_zoom_out(*mainWindow, atCursor); + WindowZoomOut(*mainWindow, atCursor); } /** * Splits a drawing of a window into regions that can be seen and are not hidden * by other opaque overlapping windows. */ -void window_draw(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t top, int32_t right, int32_t bottom) +void WindowDraw(DrawPixelInfo* dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom) { - if (!window_is_visible(w)) + if (!WindowIsVisible(w)) return; // Divide the draws up for only the visible regions of the window recursively - auto itPos = window_get_iterator(&w); + auto itPos = WindowGetIterator(&w); for (auto it = std::next(itPos); it != g_window_list.end(); it++) { // Check if this window overlaps w @@ -1137,26 +1152,26 @@ void window_draw(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t to if (topwindow->windowPos.x > left) { // Split draw at topwindow.left - window_draw_core(dpi, w, left, top, topwindow->windowPos.x, bottom); - window_draw_core(dpi, w, topwindow->windowPos.x, top, right, bottom); + WindowDrawCore(dpi, w, left, top, topwindow->windowPos.x, bottom); + WindowDrawCore(dpi, w, topwindow->windowPos.x, top, right, bottom); } else if (topwindow->windowPos.x + topwindow->width < right) { // Split draw at topwindow.right - window_draw_core(dpi, w, left, top, topwindow->windowPos.x + topwindow->width, bottom); - window_draw_core(dpi, w, topwindow->windowPos.x + topwindow->width, top, right, bottom); + WindowDrawCore(dpi, w, left, top, topwindow->windowPos.x + topwindow->width, bottom); + WindowDrawCore(dpi, w, topwindow->windowPos.x + topwindow->width, top, right, bottom); } else if (topwindow->windowPos.y > top) { // Split draw at topwindow.top - window_draw_core(dpi, w, left, top, right, topwindow->windowPos.y); - window_draw_core(dpi, w, left, topwindow->windowPos.y, right, bottom); + WindowDrawCore(dpi, w, left, top, right, topwindow->windowPos.y); + WindowDrawCore(dpi, w, left, topwindow->windowPos.y, right, bottom); } else if (topwindow->windowPos.y + topwindow->height < bottom) { // Split draw at topwindow.bottom - window_draw_core(dpi, w, left, top, right, topwindow->windowPos.y + topwindow->height); - window_draw_core(dpi, w, left, topwindow->windowPos.y + topwindow->height, right, bottom); + WindowDrawCore(dpi, w, left, top, right, topwindow->windowPos.y + topwindow->height); + WindowDrawCore(dpi, w, left, topwindow->windowPos.y + topwindow->height, right, bottom); } // Drawing for this region should be done now, exit @@ -1164,13 +1179,13 @@ void window_draw(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t to } // No windows overlap - window_draw_core(dpi, w, left, top, right, bottom); + WindowDrawCore(dpi, w, left, top, right, bottom); } /** * Draws the given window and any other overlapping transparent windows. */ -static void window_draw_core(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t top, int32_t right, int32_t bottom) +static void WindowDrawCore(DrawPixelInfo* dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom) { // Clamp region left = std::max(left, w.windowPos.x); @@ -1183,20 +1198,20 @@ static void window_draw_core(rct_drawpixelinfo* dpi, rct_window& w, int32_t left return; // Draw the window and any other overlapping transparent windows - for (auto it = window_get_iterator(&w); it != g_window_list.end(); it++) + for (auto it = WindowGetIterator(&w); it != g_window_list.end(); it++) { auto* v = (*it).get(); - if ((&w == v || (v->flags & WF_TRANSPARENT)) && window_is_visible(*v)) + if ((&w == v || (v->flags & WF_TRANSPARENT)) && WindowIsVisible(*v)) { - window_draw_single(dpi, *v, left, top, right, bottom); + WindowDrawSingle(dpi, *v, left, top, right, bottom); } } } -static void window_draw_single(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t top, int32_t right, int32_t bottom) +static void WindowDrawSingle(DrawPixelInfo* dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom) { // Copy dpi so we can crop it - rct_drawpixelinfo copy = *dpi; + DrawPixelInfo copy = *dpi; dpi = © // Clamp left to 0 @@ -1243,7 +1258,7 @@ static void window_draw_single(rct_drawpixelinfo* dpi, rct_window& w, int32_t le // Invalidate modifies the window colours so first get the correct // colour before setting the global variables for the string painting - window_event_invalidate_call(&w); + WindowEventInvalidateCall(&w); // Text colouring gCurrentWindowColours[0] = NOT_TRANSLUCENT(w.colours[0]); @@ -1251,7 +1266,7 @@ static void window_draw_single(rct_drawpixelinfo* dpi, rct_window& w, int32_t le gCurrentWindowColours[2] = NOT_TRANSLUCENT(w.colours[2]); gCurrentWindowColours[3] = NOT_TRANSLUCENT(w.colours[3]); - window_event_paint_call(&w, dpi); + WindowEventPaintCall(&w, dpi); } /** @@ -1261,17 +1276,17 @@ static void window_draw_single(rct_drawpixelinfo* dpi, rct_window& w, int32_t le * @param dpi (edi) * @param w (esi) */ -void window_draw_viewport(rct_drawpixelinfo* dpi, rct_window& w) +void WindowDrawViewport(DrawPixelInfo* dpi, WindowBase& w) { - viewport_render(dpi, w.viewport, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }); + ViewportRender(dpi, w.viewport, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }); } -void window_set_position(rct_window& w, const ScreenCoordsXY& screenCoords) +void WindowSetPosition(WindowBase& w, const ScreenCoordsXY& screenCoords) { - window_move_position(w, screenCoords - w.windowPos); + WindowMovePosition(w, screenCoords - w.windowPos); } -void window_move_position(rct_window& w, const ScreenCoordsXY& deltaCoords) +void WindowMovePosition(WindowBase& w, const ScreenCoordsXY& deltaCoords) { if (deltaCoords.x == 0 && deltaCoords.y == 0) return; @@ -1290,7 +1305,7 @@ void window_move_position(rct_window& w, const ScreenCoordsXY& deltaCoords) w.Invalidate(); } -void window_resize(rct_window& w, int32_t dw, int32_t dh) +void WindowResize(WindowBase& w, int32_t dw, int32_t dh) { if (dw == 0 && dh == 0) return; @@ -1302,8 +1317,8 @@ void window_resize(rct_window& w, int32_t dw, int32_t dh) w.width = std::clamp(w.width + dw, w.min_width, w.max_width); w.height = std::clamp(w.height + dh, w.min_height, w.max_height); - window_event_resize_call(&w); - window_event_invalidate_call(&w); + WindowEventResizeCall(&w); + WindowEventInvalidateCall(&w); // Update scroll widgets for (auto& scroll : w.scrolls) @@ -1311,13 +1326,13 @@ void window_resize(rct_window& w, int32_t dw, int32_t dh) scroll.h_right = WINDOW_SCROLL_UNDEFINED; scroll.v_bottom = WINDOW_SCROLL_UNDEFINED; } - window_update_scroll_widgets(w); + WindowUpdateScrollWidgets(w); // Invalidate new region w.Invalidate(); } -void window_set_resize(rct_window& w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight) +void WindowSetResize(WindowBase& w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight) { w.min_width = minWidth; w.min_height = minHeight; @@ -1346,23 +1361,23 @@ void window_set_resize(rct_window& w, int32_t minWidth, int32_t minHeight, int32 * @param widgetIndex (dx) * @param w (esi) */ -bool tool_set(const rct_window& w, WidgetIndex widgetIndex, Tool tool) +bool ToolSet(const WindowBase& w, WidgetIndex widgetIndex, Tool tool) { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { if (w.classification == gCurrentToolWidget.window_classification && w.number == gCurrentToolWidget.window_number && widgetIndex == gCurrentToolWidget.widget_index) { - tool_cancel(); + ToolCancel(); return true; } - tool_cancel(); + ToolCancel(); } - input_set_flag(INPUT_FLAG_TOOL_ACTIVE, true); - input_set_flag(INPUT_FLAG_4, false); - input_set_flag(INPUT_FLAG_6, false); + InputSetFlag(INPUT_FLAG_TOOL_ACTIVE, true); + InputSetFlag(INPUT_FLAG_4, false); + InputSetFlag(INPUT_FLAG_6, false); gCurrentToolId = tool; gCurrentToolWidget.window_classification = w.classification; gCurrentToolWidget.window_number = w.number; @@ -1374,11 +1389,11 @@ bool tool_set(const rct_window& w, WidgetIndex widgetIndex, Tool tool) * * rct2: 0x006EE281 */ -void tool_cancel() +void ToolCancel() { - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) { - input_set_flag(INPUT_FLAG_TOOL_ACTIVE, false); + InputSetFlag(INPUT_FLAG_TOOL_ACTIVE, false); MapInvalidateSelectionRect(); MapInvalidateMapSelectionTiles(); @@ -1389,18 +1404,18 @@ void tool_cancel() if (gCurrentToolWidget.widget_index != -1) { // Invalidate tool widget - widget_invalidate_by_number( + WidgetInvalidateByNumber( gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number, gCurrentToolWidget.widget_index); // Abort tool event - rct_window* w = window_find_by_number(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); + WindowBase* w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (w != nullptr) - window_event_tool_abort_call(w, gCurrentToolWidget.widget_index); + WindowEventToolAbortCall(w, gCurrentToolWidget.widget_index); } } } -void window_event_close_call(rct_window* w) +void WindowEventCloseCall(WindowBase* w) { if (w->event_handlers == nullptr) w->OnClose(); @@ -1408,7 +1423,7 @@ void window_event_close_call(rct_window* w) w->event_handlers->close(w); } -void window_event_mouse_up_call(rct_window* w, WidgetIndex widgetIndex) +void WindowEventMouseUpCall(WindowBase* w, WidgetIndex widgetIndex) { if (w->event_handlers == nullptr) w->OnMouseUp(widgetIndex); @@ -1416,7 +1431,7 @@ void window_event_mouse_up_call(rct_window* w, WidgetIndex widgetIndex) w->event_handlers->mouse_up(w, widgetIndex); } -void window_event_resize_call(rct_window* w) +void WindowEventResizeCall(WindowBase* w) { if (w->event_handlers == nullptr) w->OnResize(); @@ -1424,7 +1439,7 @@ void window_event_resize_call(rct_window* w) w->event_handlers->resize(w); } -void window_event_mouse_down_call(rct_window* w, WidgetIndex widgetIndex) +void WindowEventMouseDownCall(WindowBase* w, WidgetIndex widgetIndex) { if (w->event_handlers == nullptr) w->OnMouseDown(widgetIndex); @@ -1432,7 +1447,7 @@ void window_event_mouse_down_call(rct_window* w, WidgetIndex widgetIndex) w->event_handlers->mouse_down(w, widgetIndex, &w->widgets[widgetIndex]); } -void window_event_dropdown_call(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex) +void WindowEventDropdownCall(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex) { if (w->event_handlers == nullptr) { @@ -1447,7 +1462,7 @@ void window_event_dropdown_call(rct_window* w, WidgetIndex widgetIndex, int32_t } } -void window_event_unknown_05_call(rct_window* w) +void WindowEventUnknown05Call(WindowBase* w) { if (w->event_handlers == nullptr) { @@ -1459,7 +1474,7 @@ void window_event_unknown_05_call(rct_window* w) } } -void window_event_update_call(rct_window* w) +void WindowEventUpdateCall(WindowBase* w) { if (w->event_handlers == nullptr) w->OnUpdate(); @@ -1467,7 +1482,7 @@ void window_event_update_call(rct_window* w) w->event_handlers->update(w); } -void window_event_periodic_update_call(rct_window* w) +void WindowEventPeriodicUpdateCall(WindowBase* w) { if (w->event_handlers == nullptr) w->OnPeriodicUpdate(); @@ -1475,7 +1490,7 @@ void window_event_periodic_update_call(rct_window* w) w->event_handlers->periodic_update(w); } -void window_event_tool_update_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +void WindowEventToolUpdateCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnToolUpdate(widgetIndex, screenCoords); @@ -1483,7 +1498,7 @@ void window_event_tool_update_call(rct_window* w, WidgetIndex widgetIndex, const w->event_handlers->tool_update(w, widgetIndex, screenCoords); } -void window_event_tool_down_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +void WindowEventToolDownCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnToolDown(widgetIndex, screenCoords); @@ -1491,7 +1506,7 @@ void window_event_tool_down_call(rct_window* w, WidgetIndex widgetIndex, const S w->event_handlers->tool_down(w, widgetIndex, screenCoords); } -void window_event_tool_drag_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +void WindowEventToolDragCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnToolDrag(widgetIndex, screenCoords); @@ -1499,7 +1514,7 @@ void window_event_tool_drag_call(rct_window* w, WidgetIndex widgetIndex, const S w->event_handlers->tool_drag(w, widgetIndex, screenCoords); } -void window_event_tool_up_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +void WindowEventToolUpCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnToolUp(widgetIndex, screenCoords); @@ -1507,7 +1522,7 @@ void window_event_tool_up_call(rct_window* w, WidgetIndex widgetIndex, const Scr w->event_handlers->tool_up(w, widgetIndex, screenCoords); } -void window_event_tool_abort_call(rct_window* w, WidgetIndex widgetIndex) +void WindowEventToolAbortCall(WindowBase* w, WidgetIndex widgetIndex) { if (w->event_handlers == nullptr) w->OnToolAbort(widgetIndex); @@ -1515,7 +1530,7 @@ void window_event_tool_abort_call(rct_window* w, WidgetIndex widgetIndex) w->event_handlers->tool_abort(w, widgetIndex); } -void window_get_scroll_size(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height) +void WindowGetScrollSize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height) { if (w->event_handlers == nullptr) { @@ -1531,7 +1546,7 @@ void window_get_scroll_size(rct_window* w, int32_t scrollIndex, int32_t* width, } } -void window_event_scroll_mousedown_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +void WindowEventScrollMousedownCall(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnScrollMouseDown(scrollIndex, screenCoords); @@ -1539,7 +1554,7 @@ void window_event_scroll_mousedown_call(rct_window* w, int32_t scrollIndex, cons w->event_handlers->scroll_mousedown(w, scrollIndex, screenCoords); } -void window_event_scroll_mousedrag_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +void WindowEventScrollMousedragCall(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnScrollMouseDrag(scrollIndex, screenCoords); @@ -1547,7 +1562,7 @@ void window_event_scroll_mousedrag_call(rct_window* w, int32_t scrollIndex, cons w->event_handlers->scroll_mousedrag(w, scrollIndex, screenCoords); } -void window_event_scroll_mouseover_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) +void WindowEventScrollMouseoverCall(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) w->OnScrollMouseOver(scrollIndex, screenCoords); @@ -1555,7 +1570,7 @@ void window_event_scroll_mouseover_call(rct_window* w, int32_t scrollIndex, cons w->event_handlers->scroll_mouseover(w, scrollIndex, screenCoords); } -void window_event_textinput_call(rct_window* w, WidgetIndex widgetIndex, char* text) +void WindowEventTextinputCall(WindowBase* w, WidgetIndex widgetIndex, const char* text) { if (w->event_handlers == nullptr) { @@ -1570,7 +1585,7 @@ void window_event_textinput_call(rct_window* w, WidgetIndex widgetIndex, char* t } } -void window_event_viewport_rotate_call(rct_window* w) +void WindowEventViewportRotateCall(WindowBase* w) { if (w->event_handlers == nullptr) w->OnViewportRotate(); @@ -1579,7 +1594,7 @@ void window_event_viewport_rotate_call(rct_window* w) w->event_handlers->viewport_rotate(w); } -void window_event_scroll_select_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType) +void WindowEventScrollSelectCall(WindowBase* w, int32_t scrollIndex, int32_t scrollAreaType) { if (w->event_handlers == nullptr) w->OnScrollSelect(scrollIndex, scrollAreaType); @@ -1587,7 +1602,7 @@ void window_event_scroll_select_call(rct_window* w, int32_t scrollIndex, int32_t w->event_handlers->scroll_select(w, scrollIndex, scrollAreaType); } -OpenRCT2String window_event_tooltip_call(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback) +OpenRCT2String WindowEventTooltipCall(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback) { if (w->event_handlers == nullptr) { @@ -1602,7 +1617,7 @@ OpenRCT2String window_event_tooltip_call(rct_window* w, const WidgetIndex widget return { fallback, {} }; } -CursorID window_event_cursor_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) +CursorID WindowEventCursorCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { CursorID cursorId = CursorID::Arrow; if (w->event_handlers == nullptr) @@ -1614,7 +1629,7 @@ CursorID window_event_cursor_call(rct_window* w, WidgetIndex widgetIndex, const return cursorId; } -void window_event_moved_call(rct_window* w, const ScreenCoordsXY& screenCoords) +void WindowEventMovedCall(WindowBase* w, const ScreenCoordsXY& screenCoords) { if (w->event_handlers == nullptr) { @@ -1624,7 +1639,7 @@ void window_event_moved_call(rct_window* w, const ScreenCoordsXY& screenCoords) w->event_handlers->moved(w, screenCoords); } -void window_event_invalidate_call(rct_window* w) +void WindowEventInvalidateCall(WindowBase* w) { if (w->event_handlers == nullptr) w->OnPrepareDraw(); @@ -1632,7 +1647,7 @@ void window_event_invalidate_call(rct_window* w) w->event_handlers->invalidate(w); } -void window_event_paint_call(rct_window* w, rct_drawpixelinfo* dpi) +void WindowEventPaintCall(WindowBase* w, DrawPixelInfo* dpi) { if (w->event_handlers == nullptr) w->OnDraw(*dpi); @@ -1640,7 +1655,7 @@ void window_event_paint_call(rct_window* w, rct_drawpixelinfo* dpi) w->event_handlers->paint(w, dpi); } -void window_event_scroll_paint_call(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex) +void WindowEventScrollPaintCall(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex) { if (w->event_handlers == nullptr) w->OnScrollDraw(scrollIndex, *dpi); @@ -1654,10 +1669,10 @@ void window_event_scroll_paint_call(rct_window* w, rct_drawpixelinfo* dpi, int32 * Called after a window resize to move windows if they * are going to be out of sight. */ -void window_relocate_windows(int32_t width, int32_t height) +void WindowRelocateWindows(int32_t width, int32_t height) { int32_t new_location = 8; - window_visit_each([width, height, &new_location](rct_window* w) { + WindowVisitEach([width, height, &new_location](WindowBase* w) { // Work out if the window requires moving if (w->windowPos.x + 10 < width) { @@ -1692,44 +1707,44 @@ void window_relocate_windows(int32_t width, int32_t height) /** * rct2: 0x0066B905 */ -void window_resize_gui(int32_t width, int32_t height) +void WindowResizeGui(int32_t width, int32_t height) { - window_resize_gui_scenario_editor(width, height); + WindowResizeGuiScenarioEditor(width, height); if (gScreenFlags & SCREEN_FLAGS_EDITOR) return; - rct_window* titleWind = window_find_by_class(WindowClass::TitleMenu); + WindowBase* titleWind = WindowFindByClass(WindowClass::TitleMenu); if (titleWind != nullptr) { titleWind->windowPos.x = (width - titleWind->width) / 2; titleWind->windowPos.y = height - 182; } - rct_window* exitWind = window_find_by_class(WindowClass::TitleExit); + WindowBase* exitWind = WindowFindByClass(WindowClass::TitleExit); if (exitWind != nullptr) { exitWind->windowPos.x = width - 40; exitWind->windowPos.y = height - 64; } - rct_window* optionsWind = window_find_by_class(WindowClass::TitleOptions); + WindowBase* optionsWind = WindowFindByClass(WindowClass::TitleOptions); if (optionsWind != nullptr) { optionsWind->windowPos.x = width - 80; } - gfx_invalidate_screen(); + GfxInvalidateScreen(); } /** * rct2: 0x0066F0DD */ -void window_resize_gui_scenario_editor(int32_t width, int32_t height) +void WindowResizeGuiScenarioEditor(int32_t width, int32_t height) { - auto* mainWind = window_get_main(); + auto* mainWind = WindowGetMain(); if (mainWind != nullptr) { - rct_viewport* viewport = mainWind->viewport; + Viewport* viewport = mainWind->viewport; mainWind->width = width; mainWind->height = height; viewport->width = width; @@ -1743,13 +1758,13 @@ void window_resize_gui_scenario_editor(int32_t width, int32_t height) } } - rct_window* topWind = window_find_by_class(WindowClass::TopToolbar); + WindowBase* topWind = WindowFindByClass(WindowClass::TopToolbar); if (topWind != nullptr) { topWind->width = std::max(640, width); } - rct_window* bottomWind = window_find_by_class(WindowClass::BottomToolbar); + WindowBase* bottomWind = WindowFindByClass(WindowClass::BottomToolbar); if (bottomWind != nullptr) { bottomWind->windowPos.y = height - 32; @@ -1761,19 +1776,19 @@ void window_resize_gui_scenario_editor(int32_t width, int32_t height) * * rct2: 0x006CBCC3 */ -void window_close_construction_windows() +void WindowCloseConstructionWindows() { - window_close_by_class(WindowClass::RideConstruction); - window_close_by_class(WindowClass::Footpath); - window_close_by_class(WindowClass::TrackDesignList); - window_close_by_class(WindowClass::TrackDesignPlace); + WindowCloseByClass(WindowClass::RideConstruction); + WindowCloseByClass(WindowClass::Footpath); + WindowCloseByClass(WindowClass::TrackDesignList); + WindowCloseByClass(WindowClass::TrackDesignPlace); } /** * Update zoom based volume attenuation for ride music and clear music list. * rct2: 0x006BC348 */ -void window_update_viewport_ride_music() +void WindowUpdateViewportRideMusic() { OpenRCT2::RideAudio::ClearAllViewportInstances(); g_music_tracking_viewport = nullptr; @@ -1798,15 +1813,15 @@ void window_update_viewport_ride_music() } } -static void window_snap_left(rct_window& w, int32_t proximity) +static void window_snap_left(WindowBase& w, int32_t proximity) { - const auto* mainWindow = window_get_main(); + const auto* mainWindow = WindowGetMain(); auto wBottom = w.windowPos.y + w.height; auto wLeftProximity = w.windowPos.x - (proximity * 2); auto wRightProximity = w.windowPos.x + (proximity * 2); auto rightMost = INT32_MIN; - window_visit_each([&](rct_window* w2) { + WindowVisitEach([&](WindowBase* w2) { if (w2 == &w || w2 == mainWindow) return; @@ -1828,15 +1843,15 @@ static void window_snap_left(rct_window& w, int32_t proximity) w.windowPos.x = rightMost; } -static void window_snap_top(rct_window& w, int32_t proximity) +static void window_snap_top(WindowBase& w, int32_t proximity) { - const auto* mainWindow = window_get_main(); + const auto* mainWindow = WindowGetMain(); auto wRight = w.windowPos.x + w.width; auto wTopProximity = w.windowPos.y - (proximity * 2); auto wBottomProximity = w.windowPos.y + (proximity * 2); auto bottomMost = INT32_MIN; - window_visit_each([&](rct_window* w2) { + WindowVisitEach([&](WindowBase* w2) { if (w2 == &w || w2 == mainWindow) return; @@ -1858,16 +1873,16 @@ static void window_snap_top(rct_window& w, int32_t proximity) w.windowPos.y = bottomMost; } -static void window_snap_right(rct_window& w, int32_t proximity) +static void window_snap_right(WindowBase& w, int32_t proximity) { - const auto* mainWindow = window_get_main(); + const auto* mainWindow = WindowGetMain(); auto wRight = w.windowPos.x + w.width; auto wBottom = w.windowPos.y + w.height; auto wLeftProximity = wRight - (proximity * 2); auto wRightProximity = wRight + (proximity * 2); auto leftMost = INT32_MAX; - window_visit_each([&](rct_window* w2) { + WindowVisitEach([&](WindowBase* w2) { if (w2 == &w || w2 == mainWindow) return; @@ -1888,16 +1903,16 @@ static void window_snap_right(rct_window& w, int32_t proximity) w.windowPos.x = leftMost - w.width; } -static void window_snap_bottom(rct_window& w, int32_t proximity) +static void window_snap_bottom(WindowBase& w, int32_t proximity) { - const auto* mainWindow = window_get_main(); + const auto* mainWindow = WindowGetMain(); auto wRight = w.windowPos.x + w.width; auto wBottom = w.windowPos.y + w.height; auto wTopProximity = wBottom - (proximity * 2); auto wBottomProximity = wBottom + (proximity * 2); auto topMost = INT32_MAX; - window_visit_each([&](rct_window* w2) { + WindowVisitEach([&](WindowBase* w2) { if (w2 == &w || w2 == mainWindow) return; @@ -1918,7 +1933,7 @@ static void window_snap_bottom(rct_window& w, int32_t proximity) w.windowPos.y = topMost - w.height; } -void window_move_and_snap(rct_window& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity) +void WindowMoveAndSnap(WindowBase& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity) { auto originalPos = w.windowPos; int32_t minY = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) ? 1 : TOP_TOOLBAR_HEIGHT + 2; @@ -1941,10 +1956,10 @@ void window_move_and_snap(rct_window& w, ScreenCoordsXY newWindowCoords, int32_t w.windowPos = originalPos; } - window_set_position(w, newWindowCoords); + WindowSetPosition(w, newWindowCoords); } -int32_t window_can_resize(const rct_window& w) +int32_t WindowCanResize(const WindowBase& w) { return (w.flags & WF_RESIZABLE) && (w.min_width != w.max_width || w.min_height != w.max_height); } @@ -1953,16 +1968,16 @@ int32_t window_can_resize(const rct_window& w) * * rct2: 0x006EE3C3 */ -void textinput_cancel() +void TextinputCancel() { - window_close_by_class(WindowClass::Textinput); + WindowCloseByClass(WindowClass::Textinput); } -void window_start_textbox( - rct_window& call_w, WidgetIndex call_widget, StringId existing_text, char* existing_args, int32_t maxLength) +void WindowStartTextbox( + WindowBase& call_w, WidgetIndex call_widget, StringId existing_text, char* existing_args, int32_t maxLength) { if (gUsingWidgetTextBox) - window_cancel_textbox(); + WindowCancelTextbox(); gUsingWidgetTextBox = true; gCurrentTextBox.window.classification = call_w.classification; @@ -1970,31 +1985,31 @@ void window_start_textbox( gCurrentTextBox.widget_index = call_widget; gTextBoxFrameNo = 0; - window_close_by_class(WindowClass::Textinput); + WindowCloseByClass(WindowClass::Textinput); // Clear the text input buffer - std::fill_n(gTextBoxInput, maxLength, 0x00); + gTextBoxInput.clear(); // Enter in the text input buffer any existing // text. if (existing_text != STR_NONE) - format_string(gTextBoxInput, TEXT_INPUT_SIZE, existing_text, &existing_args); - - // In order to prevent strings that exceed the maxLength - // from crashing the game. - gTextBoxInput[maxLength - 1] = '\0'; + { + char tempBuf[TEXT_INPUT_SIZE]{}; + size_t len = OpenRCT2::FormatStringLegacy(tempBuf, TEXT_INPUT_SIZE, existing_text, &existing_args); + gTextBoxInput.assign(tempBuf, len); + } gTextInput = ContextStartTextInput(gTextBoxInput, maxLength); } -void window_cancel_textbox() +void WindowCancelTextbox() { if (gUsingWidgetTextBox) { - rct_window* w = window_find_by_number(gCurrentTextBox.window.classification, gCurrentTextBox.window.number); + WindowBase* w = WindowFindByNumber(gCurrentTextBox.window.classification, gCurrentTextBox.window.number); if (w != nullptr) { - window_event_textinput_call(w, gCurrentTextBox.widget_index, nullptr); + WindowEventTextinputCall(w, gCurrentTextBox.widget_index, nullptr); } gCurrentTextBox.window.classification = WindowClass::Null; gCurrentTextBox.window.number = 0; @@ -2002,31 +2017,31 @@ void window_cancel_textbox() gUsingWidgetTextBox = false; if (w != nullptr) { - widget_invalidate(*w, gCurrentTextBox.widget_index); + WidgetInvalidate(*w, gCurrentTextBox.widget_index); } gCurrentTextBox.widget_index = static_cast(WindowWidgetType::Last); } } -void window_update_textbox_caret() +void WindowUpdateTextboxCaret() { gTextBoxFrameNo++; if (gTextBoxFrameNo > 30) gTextBoxFrameNo = 0; } -void window_update_textbox() +void WindowUpdateTextbox() { if (gUsingWidgetTextBox) { gTextBoxFrameNo = 0; - rct_window* w = window_find_by_number(gCurrentTextBox.window.classification, gCurrentTextBox.window.number); - widget_invalidate(*w, gCurrentTextBox.widget_index); - window_event_textinput_call(w, gCurrentTextBox.widget_index, gTextBoxInput); + WindowBase* w = WindowFindByNumber(gCurrentTextBox.window.classification, gCurrentTextBox.window.number); + WidgetInvalidate(*w, gCurrentTextBox.widget_index); + WindowEventTextinputCall(w, gCurrentTextBox.widget_index, gTextBoxInput.c_str()); } } -bool window_is_visible(rct_window& w) +bool WindowIsVisible(WindowBase& w) { // w->visibility is used to prevent repeat calculations within an iteration by caching the result @@ -2044,7 +2059,7 @@ bool window_is_visible(rct_window& w) } // start from the window above the current - auto itPos = window_get_iterator(&w); + auto itPos = WindowGetIterator(&w); for (auto it = std::next(itPos); it != g_window_list.end(); it++) { auto& w_other = *(*it); @@ -2074,21 +2089,21 @@ bool window_is_visible(rct_window& w) * right (dx) * bottom (bp) */ -void window_draw_all(rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom) +void WindowDrawAll(DrawPixelInfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom) { auto windowDPI = dpi->Crop({ left, top }, { right - left, bottom - top }); - window_visit_each([&windowDPI, left, top, right, bottom](rct_window* w) { + WindowVisitEach([&windowDPI, left, top, right, bottom](WindowBase* w) { if (w->flags & WF_TRANSPARENT) return; if (right <= w->windowPos.x || bottom <= w->windowPos.y) return; if (left >= w->windowPos.x + w->width || top >= w->windowPos.y + w->height) return; - window_draw(&windowDPI, *w, left, top, right, bottom); + WindowDraw(&windowDPI, *w, left, top, right, bottom); }); } -rct_viewport* window_get_previous_viewport(rct_viewport* current) +Viewport* WindowGetPreviousViewport(Viewport* current) { bool foundPrevious = (current == nullptr); for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++) @@ -2109,10 +2124,10 @@ rct_viewport* window_get_previous_viewport(rct_viewport* current) return nullptr; } -void window_reset_visibilities() +void WindowResetVisibilities() { // reset window visibility status to unknown - window_visit_each([](rct_window* w) { + WindowVisitEach([](WindowBase* w) { w->visibility = VisibilityCache::Unknown; if (w->viewport != nullptr) { @@ -2121,12 +2136,12 @@ void window_reset_visibilities() }); } -void window_init_all() +void WindowInitAll() { - window_close_all_except_flags(0); + WindowCloseAllExceptFlags(0); } -void window_follow_sprite(rct_window& w, EntityId spriteIndex) +void WindowFollowSprite(WindowBase& w, EntityId spriteIndex) { if (spriteIndex.ToUnderlying() < MAX_ENTITIES || spriteIndex.IsNull()) { @@ -2134,13 +2149,13 @@ void window_follow_sprite(rct_window& w, EntityId spriteIndex) } } -void window_unfollow_sprite(rct_window& w) +void WindowUnfollowSprite(WindowBase& w) { w.viewport_smart_follow_sprite = EntityId::GetNull(); w.viewport_target_sprite = EntityId::GetNull(); } -rct_viewport* window_get_viewport(rct_window* w) +Viewport* WindowGetViewport(WindowBase* w) { if (w == nullptr) { @@ -2150,7 +2165,7 @@ rct_viewport* window_get_viewport(rct_window* w) return w->viewport; } -rct_window* window_get_listening() +WindowBase* WindowGetListening() { for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++) { @@ -2167,7 +2182,7 @@ rct_window* window_get_listening() return nullptr; } -WindowClass window_get_classification(const rct_window& window) +WindowClass WindowGetClassification(const WindowBase& window) { return window.classification; } @@ -2176,10 +2191,10 @@ WindowClass window_get_classification(const rct_window& window) * * rct2: 0x006EAF26 */ -void WidgetScrollUpdateThumbs(rct_window& w, WidgetIndex widget_index) +void WidgetScrollUpdateThumbs(WindowBase& w, WidgetIndex widget_index) { const auto& widget = w.widgets[widget_index]; - auto& scroll = w.scrolls[window_get_scroll_data_index(w, widget_index)]; + auto& scroll = w.scrolls[WindowGetScrollDataIndex(w, widget_index)]; if (scroll.flags & HSCROLLBAR_VISIBLE) { @@ -2240,7 +2255,7 @@ void WidgetScrollUpdateThumbs(rct_window& w, WidgetIndex widget_index) } } -void rct_window::ResizeFrame() +void WindowBase::ResizeFrame() { // Frame widgets[0].right = width - 1; @@ -2252,7 +2267,7 @@ void rct_window::ResizeFrame() widgets[2].right = width - 3; } -void rct_window::ResizeFrameWithPage() +void WindowBase::ResizeFrameWithPage() { ResizeFrame(); // Page background diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 02909a72e8..552c5c8375 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,7 @@ #include "../Identifiers.h" #include "../common.h" +#include "../drawing/ImageId.hpp" #include "../localisation/Formatter.h" #include "../ride/RideTypes.h" #include "../world/Location.hpp" @@ -22,17 +23,20 @@ #include #include #include +#include #include -struct rct_drawpixelinfo; -struct rct_window; +struct DrawPixelInfo; +struct WindowBase; struct TrackDesignFileRef; struct TextInputSession; -struct scenario_index_entry; +struct ScenarioIndexEntry; +struct WindowCloseModifier; enum class VisibilityCache : uint8_t; enum class CursorID : uint8_t; enum class RideConstructionState : uint8_t; +enum class CloseWindowModifier : uint8_t; #define SCROLLABLE_ROW_HEIGHT 12 #define LIST_ROW_HEIGHT 12 @@ -42,7 +46,7 @@ enum class RideConstructionState : uint8_t; #define TEXT_INPUT_SIZE 1024 #define TOP_TOOLBAR_HEIGHT 27 -extern char gTextBoxInput[TEXT_INPUT_SIZE]; +extern u8string gTextBoxInput; extern int32_t gTextBoxFrameNo; extern bool gUsingWidgetTextBox; extern struct TextInputSession* gTextInput; @@ -50,19 +54,20 @@ extern struct TextInputSession* gTextInput; using rct_windownumber = uint16_t; using WidgetIndex = int16_t; -struct window_identifier +struct WindowIdentifier { WindowClass classification; rct_windownumber number; }; -struct widget_identifier +struct WidgetIdentifier { - window_identifier window; + WindowIdentifier window; WidgetIndex widget_index; }; -extern widget_identifier gCurrentTextBox; +extern WidgetIdentifier gCurrentTextBox; +extern WindowCloseModifier gLastCloseModifier; using WidgetFlags = uint32_t; namespace WIDGET_FLAGS @@ -77,26 +82,22 @@ namespace WIDGET_FLAGS enum class WindowWidgetType : uint8_t; -/** - * Widget structure - * size: 0x10 - */ -struct rct_widget +struct Widget { - WindowWidgetType type; // 0x00 - uint8_t colour; // 0x01 - int16_t left; // 0x02 - int16_t right; // 0x04 - int16_t top; // 0x06 - int16_t bottom; // 0x08 + WindowWidgetType type; + uint8_t colour; + int16_t left; + int16_t right; + int16_t top; + int16_t bottom; union - { // 0x0A - uint32_t image; - StringId text; + { uint32_t content; + ImageId image; + StringId text; utf8* string; }; - StringId tooltip; // 0x0E + StringId tooltip; // New properties WidgetFlags flags{}; @@ -139,7 +140,7 @@ struct rct_widget /** * Viewport structure */ -struct rct_viewport +struct Viewport { int32_t width; int32_t height; @@ -175,20 +176,20 @@ struct rct_viewport * Scroll structure * size: 0x12 */ -struct rct_scroll +struct ScrollBar { - uint16_t flags{}; // 0x00 - uint16_t h_left{}; // 0x02 - uint16_t h_right{}; // 0x04 - uint16_t h_thumb_left{}; // 0x06 - uint16_t h_thumb_right{}; // 0x08 - uint16_t v_top{}; // 0x0A - uint16_t v_bottom{}; // 0x0C - uint16_t v_thumb_top{}; // 0x0E - uint16_t v_thumb_bottom{}; // 0x10 + uint16_t flags{}; + int32_t h_left{}; + int32_t h_right{}; + int32_t h_thumb_left{}; + int32_t h_thumb_right{}; + int32_t v_top{}; + int32_t v_bottom{}; + int32_t v_thumb_top{}; + int32_t v_thumb_bottom{}; }; -constexpr auto WINDOW_SCROLL_UNDEFINED = std::numeric_limits::max(); +constexpr auto WINDOW_SCROLL_UNDEFINED = std::numeric_limits::max(); struct Focus { @@ -222,32 +223,32 @@ struct Focus struct WindowEventList { - void (*close)(struct rct_window*){}; - void (*mouse_up)(struct rct_window*, WidgetIndex){}; - void (*resize)(struct rct_window*){}; - void (*mouse_down)(struct rct_window*, WidgetIndex, rct_widget*){}; - void (*dropdown)(struct rct_window*, WidgetIndex, int32_t){}; - void (*unknown_05)(struct rct_window*){}; - void (*update)(struct rct_window*){}; - void (*periodic_update)(struct rct_window*){}; - void (*tool_update)(struct rct_window*, WidgetIndex, const ScreenCoordsXY&){}; - void (*tool_down)(struct rct_window*, WidgetIndex, const ScreenCoordsXY&){}; - void (*tool_drag)(struct rct_window*, WidgetIndex, const ScreenCoordsXY&){}; - void (*tool_up)(struct rct_window*, WidgetIndex, const ScreenCoordsXY&){}; - void (*tool_abort)(struct rct_window*, WidgetIndex){}; - void (*get_scroll_size)(struct rct_window*, int32_t, int32_t*, int32_t*){}; - void (*scroll_mousedown)(struct rct_window*, int32_t, const ScreenCoordsXY&){}; - void (*scroll_mousedrag)(struct rct_window*, int32_t, const ScreenCoordsXY&){}; - void (*scroll_mouseover)(struct rct_window*, int32_t, const ScreenCoordsXY&){}; - void (*text_input)(struct rct_window*, WidgetIndex, char*){}; - void (*viewport_rotate)(struct rct_window*){}; - void (*scroll_select)(struct rct_window*, int32_t, int32_t){}; - OpenRCT2String (*tooltip)(struct rct_window*, const WidgetIndex, const StringId){}; - void (*cursor)(struct rct_window*, WidgetIndex, const ScreenCoordsXY&, CursorID*){}; - void (*moved)(struct rct_window*, const ScreenCoordsXY&){}; - void (*invalidate)(struct rct_window*){}; - void (*paint)(struct rct_window*, rct_drawpixelinfo*){}; - void (*scroll_paint)(struct rct_window*, rct_drawpixelinfo*, int32_t){}; + void (*close)(struct WindowBase*){}; + void (*mouse_up)(struct WindowBase*, WidgetIndex){}; + void (*resize)(struct WindowBase*){}; + void (*mouse_down)(struct WindowBase*, WidgetIndex, Widget*){}; + void (*dropdown)(struct WindowBase*, WidgetIndex, int32_t){}; + void (*unknown_05)(struct WindowBase*){}; + void (*update)(struct WindowBase*){}; + void (*periodic_update)(struct WindowBase*){}; + void (*tool_update)(struct WindowBase*, WidgetIndex, const ScreenCoordsXY&){}; + void (*tool_down)(struct WindowBase*, WidgetIndex, const ScreenCoordsXY&){}; + void (*tool_drag)(struct WindowBase*, WidgetIndex, const ScreenCoordsXY&){}; + void (*tool_up)(struct WindowBase*, WidgetIndex, const ScreenCoordsXY&){}; + void (*tool_abort)(struct WindowBase*, WidgetIndex){}; + void (*get_scroll_size)(struct WindowBase*, int32_t, int32_t*, int32_t*){}; + void (*scroll_mousedown)(struct WindowBase*, int32_t, const ScreenCoordsXY&){}; + void (*scroll_mousedrag)(struct WindowBase*, int32_t, const ScreenCoordsXY&){}; + void (*scroll_mouseover)(struct WindowBase*, int32_t, const ScreenCoordsXY&){}; + void (*text_input)(struct WindowBase*, WidgetIndex, const char*){}; + void (*viewport_rotate)(struct WindowBase*){}; + void (*scroll_select)(struct WindowBase*, int32_t, int32_t){}; + OpenRCT2String (*tooltip)(struct WindowBase*, const WidgetIndex, const StringId){}; + void (*cursor)(struct WindowBase*, WidgetIndex, const ScreenCoordsXY&, CursorID*){}; + void (*moved)(struct WindowBase*, const ScreenCoordsXY&){}; + void (*invalidate)(struct WindowBase*){}; + void (*paint)(struct WindowBase*, DrawPixelInfo*){}; + void (*scroll_paint)(struct WindowBase*, DrawPixelInfo*, int32_t){}; typedef void (*fnEventInitializer)(WindowEventList&); WindowEventList(fnEventInitializer fn) @@ -256,7 +257,7 @@ struct WindowEventList } }; -struct campaign_variables +struct CampaignVariables { int16_t campaign_type; int16_t no_weeks; // 0x482 @@ -265,37 +266,43 @@ struct campaign_variables ::RideId RideId; ObjectEntryIndex ShopItemId; }; - uint32_t pad_486; + uint32_t Pad486; }; -struct new_ride_variables +struct NewRideVariables { RideSelection SelectedRide; // 0x480 RideSelection HighlightedRide; // 0x482 - uint16_t pad_484; - uint16_t pad_486; + uint16_t Pad484; + uint16_t Pad486; uint16_t selected_ride_countdown; // 488 }; -struct ride_variables +struct RideVariables { int16_t view; int32_t var_482; int32_t var_486; }; -struct track_list_variables +struct TrackListVariables { bool track_list_being_updated; bool reload_track_designs; }; -struct error_variables +struct ErrorVariables { uint16_t var_480; }; -struct rct_window; +struct WindowCloseModifier +{ + WindowIdentifier window; + CloseWindowModifier modifier; +}; + +struct WindowBase; #define RCT_WINDOW_RIGHT(w) ((w)->windowPos.x + (w)->width) #define RCT_WINDOW_BOTTOM(w) ((w)->windowPos.y + (w)->height) @@ -376,6 +383,7 @@ enum WV_CHANGELOG, WV_NEW_VERSION_INFO, WV_FINANCE_MARKETING, + WV_CONTRIBUTORS, }; enum WindowDetail @@ -405,11 +413,14 @@ enum WindowDetail #define WC_TOP_TOOLBAR__WIDX_SCENERY 10 #define WC_TOP_TOOLBAR__WIDX_PATH 11 #define WC_TOP_TOOLBAR__WIDX_CLEAR_SCENERY 17 -#define WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT 23 -#define WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE 29 -#define WC_RIDE_CONSTRUCTION__WIDX_EXIT 30 +#define WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT 25 +#define WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE 30 +#define WC_RIDE_CONSTRUCTION__WIDX_EXIT 31 #define WC_RIDE_CONSTRUCTION__WIDX_ROTATE 32 -#define WC_SCENERY__WIDX_SCENERY_TAB_1 12 +#define WC_MAZE_CONSTRUCTION__WIDX_MAZE_DIRECTION_GROUPBOX WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT +#define WC_MAZE_CONSTRUCTION__WIDX_MAZE_ENTRANCE WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE +#define WC_MAZE_CONSTRUCTION__WIDX_MAZE_EXIT WC_RIDE_CONSTRUCTION__WIDX_EXIT +#define WC_SCENERY__WIDX_SCENERY_TAB_1 14 #define WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON 5 #define WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON 10 #define WC_PEEP__WIDX_PATROL 10 @@ -460,6 +471,7 @@ enum class PromptMode : uint8_t SaveBeforeLoad = 0, SaveBeforeQuit, SaveBeforeQuit2, + SaveBeforeNewGame, Quit }; @@ -499,6 +511,13 @@ enum class VisibilityCache : uint8_t Covered }; +enum class CloseWindowModifier : uint8_t +{ + None, + Shift, + Control +}; + enum class GuestListFilterType : int32_t { GuestsOnRide, @@ -529,7 +548,7 @@ using close_callback = void (*)(); #define WINDOW_LIMIT_MAX 64 #define WINDOW_LIMIT_RESERVED 4 // Used to reserve room for the main viewport, toolbars, etc. -extern rct_window* gWindowAudioExclusive; +extern WindowBase* gWindowAudioExclusive; extern uint16_t gWindowUpdateTicks; namespace MapFlashingFlags @@ -546,46 +565,47 @@ extern colour_t gCurrentWindowColours[4]; extern bool gDisableErrorWindowSound; -std::list>::iterator window_get_iterator(const rct_window* w); -void window_visit_each(std::function func); +std::list>::iterator WindowGetIterator(const WindowBase* w); +void WindowVisitEach(std::function func); -void window_dispatch_update_all(); -void window_update_all_viewports(); -void window_update_all(); +void WindowDispatchUpdateAll(); +void WindowUpdateAllViewports(); +void WindowUpdateAll(); -void window_set_window_limit(int32_t value); +void WindowSetWindowLimit(int32_t value); -rct_window* window_bring_to_front(rct_window& w); -rct_window* window_bring_to_front_by_class(WindowClass cls); -rct_window* window_bring_to_front_by_class_with_flags(WindowClass cls, uint16_t flags); -rct_window* window_bring_to_front_by_number(WindowClass cls, rct_windownumber number); +WindowBase* WindowBringToFront(WindowBase& w); +WindowBase* WindowBringToFrontByClass(WindowClass cls); +WindowBase* WindowBringToFrontByClassWithFlags(WindowClass cls, uint16_t flags); +WindowBase* WindowBringToFrontByNumber(WindowClass cls, rct_windownumber number); -rct_window* WindowCreate( - std::unique_ptr&& w, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags); -template::value>::type* = nullptr> +WindowBase* WindowCreate( + std::unique_ptr&& w, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags); +template::value>::type* = nullptr> T* WindowCreate(WindowClass cls, const ScreenCoordsXY& pos = {}, int32_t width = 0, int32_t height = 0, uint32_t flags = 0) { return static_cast(WindowCreate(std::make_unique(), cls, pos, width, height, flags)); } -template::value>::type* = nullptr> -T* WindowCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags = 0) +template::value>::type* = nullptr> +T* WindowCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags = 0, TArgs&&... args) { - return static_cast(WindowCreate(std::make_unique(), cls, {}, width, height, flags | WF_AUTO_POSITION)); + return static_cast( + WindowCreate(std::make_unique(std::forward(args)...), cls, {}, width, height, flags | WF_AUTO_POSITION)); } -template::value>::type* = nullptr> +template::value>::type* = nullptr> T* WindowFocusOrCreate(WindowClass cls, const ScreenCoordsXY& pos, int32_t width, int32_t height, uint32_t flags = 0) { - auto* w = window_bring_to_front_by_class(cls); + auto* w = WindowBringToFrontByClass(cls); if (w == nullptr) { w = WindowCreate(cls, pos, width, height, flags); } return static_cast(w); } -template::value>::type* = nullptr> +template::value>::type* = nullptr> T* WindowFocusOrCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags = 0) { - auto* w = window_bring_to_front_by_class(cls); + auto* w = WindowBringToFrontByClass(cls); if (w == nullptr) { w = WindowCreate(cls, width, height, flags); @@ -593,158 +613,159 @@ T* WindowFocusOrCreate(WindowClass cls, int32_t width, int32_t height, uint32_t return static_cast(w); } -rct_window* WindowCreate( +WindowBase* WindowCreate( const ScreenCoordsXY& pos, int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags); -rct_window* WindowCreateAutoPos( +WindowBase* WindowCreateAutoPos( int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags); -rct_window* WindowCreateCentred( +WindowBase* WindowCreateCentred( int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags); -void window_close(rct_window& window); -void window_close_by_class(WindowClass cls); -void window_close_by_number(WindowClass cls, rct_windownumber number); -void window_close_by_number(WindowClass cls, EntityId number); -void window_close_top(); -void window_close_all(); -void window_close_all_except_class(WindowClass cls); -void window_close_all_except_flags(uint16_t flags); -rct_window* window_find_by_class(WindowClass cls); -rct_window* window_find_by_number(WindowClass cls, rct_windownumber number); -rct_window* window_find_by_number(WindowClass cls, EntityId id); -rct_window* window_find_from_point(const ScreenCoordsXY& screenCoords); -WidgetIndex window_find_widget_from_point(rct_window& w, const ScreenCoordsXY& screenCoords); -void window_invalidate_by_class(WindowClass cls); -void window_invalidate_by_number(WindowClass cls, rct_windownumber number); -void window_invalidate_by_number(WindowClass cls, EntityId id); -void window_invalidate_all(); -void widget_invalidate(rct_window& w, WidgetIndex widgetIndex); -void widget_invalidate_by_class(WindowClass cls, WidgetIndex widgetIndex); -void widget_invalidate_by_number(WindowClass cls, rct_windownumber number, WidgetIndex widgetIndex); -void WindowInitScrollWidgets(rct_window& w); -void window_update_scroll_widgets(rct_window& w); -int32_t window_get_scroll_data_index(const rct_window& w, WidgetIndex widget_index); +void WindowClose(WindowBase& window); +void WindowCloseByClass(WindowClass cls); +void WindowCloseByNumber(WindowClass cls, rct_windownumber number); +void WindowCloseByNumber(WindowClass cls, EntityId number); +void WindowCloseTop(); +void WindowCloseAll(); +void WindowCloseAllExceptClass(WindowClass cls); +void WindowCloseAllExceptFlags(uint16_t flags); +void WindowCloseAllExceptNumberAndClass(rct_windownumber number, WindowClass cls); +WindowBase* WindowFindByClass(WindowClass cls); +WindowBase* WindowFindByNumber(WindowClass cls, rct_windownumber number); +WindowBase* WindowFindByNumber(WindowClass cls, EntityId id); +WindowBase* WindowFindFromPoint(const ScreenCoordsXY& screenCoords); +WidgetIndex WindowFindWidgetFromPoint(WindowBase& w, const ScreenCoordsXY& screenCoords); +void WindowInvalidateByClass(WindowClass cls); +void WindowInvalidateByNumber(WindowClass cls, rct_windownumber number); +void WindowInvalidateByNumber(WindowClass cls, EntityId id); +void WindowInvalidateAll(); +void WidgetInvalidate(WindowBase& w, WidgetIndex widgetIndex); +void WidgetInvalidateByClass(WindowClass cls, WidgetIndex widgetIndex); +void WidgetInvalidateByNumber(WindowClass cls, rct_windownumber number, WidgetIndex widgetIndex); +void WindowInitScrollWidgets(WindowBase& w); +void WindowUpdateScrollWidgets(WindowBase& w); +int32_t WindowGetScrollDataIndex(const WindowBase& w, WidgetIndex widget_index); -void window_push_others_right(rct_window& w); -void window_push_others_below(rct_window& w1); +void WindowPushOthersRight(WindowBase& w); +void WindowPushOthersBelow(WindowBase& w1); -rct_window* window_get_main(); +WindowBase* WindowGetMain(); -void window_scroll_to_location(rct_window& w, const CoordsXYZ& coords); -void window_rotate_camera(rct_window& w, int32_t direction); -void window_viewport_get_map_coords_by_cursor( - const rct_window& w, int32_t* map_x, int32_t* map_y, int32_t* offset_x, int32_t* offset_y); -void window_viewport_centre_tile_around_cursor(rct_window& w, int32_t map_x, int32_t map_y, int32_t offset_x, int32_t offset_y); -void window_check_all_valid_zoom(); -void window_zoom_set(rct_window& w, ZoomLevel zoomLevel, bool atCursor); -void window_zoom_in(rct_window& w, bool atCursor); -void window_zoom_out(rct_window& w, bool atCursor); -void main_window_zoom(bool zoomIn, bool atCursor); +void WindowScrollToLocation(WindowBase& w, const CoordsXYZ& coords); +void WindowRotateCamera(WindowBase& w, int32_t direction); +void WindowViewportGetMapCoordsByCursor( + const WindowBase& w, int32_t* map_x, int32_t* map_y, int32_t* offset_x, int32_t* offset_y); +void WindowViewportCentreTileAroundCursor(WindowBase& w, int32_t map_x, int32_t map_y, int32_t offset_x, int32_t offset_y); +void WindowCheckAllValidZoom(); +void WindowZoomSet(WindowBase& w, ZoomLevel zoomLevel, bool atCursor); +void WindowZoomIn(WindowBase& w, bool atCursor); +void WindowZoomOut(WindowBase& w, bool atCursor); +void MainWindowZoom(bool zoomIn, bool atCursor); -void window_draw_all(rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom); -void window_draw(rct_drawpixelinfo* dpi, rct_window& w, int32_t left, int32_t top, int32_t right, int32_t bottom); -void WindowDrawWidgets(rct_window& w, rct_drawpixelinfo* dpi); -void window_draw_viewport(rct_drawpixelinfo* dpi, rct_window& w); +void WindowDrawAll(DrawPixelInfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom); +void WindowDraw(DrawPixelInfo* dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom); +void WindowDrawWidgets(WindowBase& w, DrawPixelInfo* dpi); +void WindowDrawViewport(DrawPixelInfo* dpi, WindowBase& w); -void window_set_position(rct_window& w, const ScreenCoordsXY& screenCoords); -void window_move_position(rct_window& w, const ScreenCoordsXY& screenCoords); -void window_resize(rct_window& w, int32_t dw, int32_t dh); -void window_set_resize(rct_window& w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight); +void WindowSetPosition(WindowBase& w, const ScreenCoordsXY& screenCoords); +void WindowMovePosition(WindowBase& w, const ScreenCoordsXY& screenCoords); +void WindowResize(WindowBase& w, int32_t dw, int32_t dh); +void WindowSetResize(WindowBase& w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight); -bool tool_set(const rct_window& w, WidgetIndex widgetIndex, Tool tool); -void tool_cancel(); +bool ToolSet(const WindowBase& w, WidgetIndex widgetIndex, Tool tool); +void ToolCancel(); -void window_close_construction_windows(); +void WindowCloseConstructionWindows(); -void window_update_viewport_ride_music(); +void WindowUpdateViewportRideMusic(); -rct_viewport* window_get_viewport(rct_window* window); +Viewport* WindowGetViewport(WindowBase* window); // Open window functions -void window_relocate_windows(int32_t width, int32_t height); -void window_resize_gui(int32_t width, int32_t height); -void window_resize_gui_scenario_editor(int32_t width, int32_t height); -void ride_construction_toolupdate_entrance_exit(const ScreenCoordsXY& screenCoords); -void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords); -void ride_construction_tooldown_construct(const ScreenCoordsXY& screenCoords); +void WindowRelocateWindows(int32_t width, int32_t height); +void WindowResizeGui(int32_t width, int32_t height); +void WindowResizeGuiScenarioEditor(int32_t width, int32_t height); +void RideConstructionToolupdateEntranceExit(const ScreenCoordsXY& screenCoords); +void RideConstructionToolupdateConstruct(const ScreenCoordsXY& screenCoords); +void RideConstructionTooldownConstruct(const ScreenCoordsXY& screenCoords); -void window_event_close_call(rct_window* w); -void window_event_mouse_up_call(rct_window* w, WidgetIndex widgetIndex); -void window_event_resize_call(rct_window* w); -void window_event_mouse_down_call(rct_window* w, WidgetIndex widgetIndex); -void window_event_dropdown_call(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex); -void window_event_unknown_05_call(rct_window* w); -void window_event_update_call(rct_window* w); -void window_event_periodic_update_call(rct_window* w); -void window_event_tool_update_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -void window_event_tool_down_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -void window_event_tool_drag_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -void window_event_tool_up_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -void window_event_tool_abort_call(rct_window* w, WidgetIndex widgetIndex); -void window_get_scroll_size(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height); -void window_event_scroll_mousedown_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -void window_event_scroll_mousedrag_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -void window_event_scroll_mouseover_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); -void window_event_textinput_call(rct_window* w, WidgetIndex widgetIndex, char* text); -void window_event_viewport_rotate_call(rct_window* w); -void window_event_scroll_select_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType); -OpenRCT2String window_event_tooltip_call(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback); -CursorID window_event_cursor_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); -void window_event_moved_call(rct_window* w, const ScreenCoordsXY& screenCoords); -void window_event_invalidate_call(rct_window* w); -void window_event_paint_call(rct_window* w, rct_drawpixelinfo* dpi); -void window_event_scroll_paint_call(rct_window* w, rct_drawpixelinfo* dpi, int32_t scrollIndex); +void WindowEventCloseCall(WindowBase* w); +void WindowEventMouseUpCall(WindowBase* w, WidgetIndex widgetIndex); +void WindowEventResizeCall(WindowBase* w); +void WindowEventMouseDownCall(WindowBase* w, WidgetIndex widgetIndex); +void WindowEventDropdownCall(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex); +void WindowEventUnknown05Call(WindowBase* w); +void WindowEventUpdateCall(WindowBase* w); +void WindowEventPeriodicUpdateCall(WindowBase* w); +void WindowEventToolUpdateCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void WindowEventToolDownCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void WindowEventToolDragCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void WindowEventToolUpCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void WindowEventToolAbortCall(WindowBase* w, WidgetIndex widgetIndex); +void WindowGetScrollSize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height); +void WindowEventScrollMousedownCall(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +void WindowEventScrollMousedragCall(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +void WindowEventScrollMouseoverCall(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords); +void WindowEventTextinputCall(WindowBase* w, WidgetIndex widgetIndex, const char* text); +void WindowEventViewportRotateCall(WindowBase* w); +void WindowEventScrollSelectCall(WindowBase* w, int32_t scrollIndex, int32_t scrollAreaType); +OpenRCT2String WindowEventTooltipCall(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback); +CursorID WindowEventCursorCall(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords); +void WindowEventMovedCall(WindowBase* w, const ScreenCoordsXY& screenCoords); +void WindowEventInvalidateCall(WindowBase* w); +void WindowEventPaintCall(WindowBase* w, DrawPixelInfo* dpi); +void WindowEventScrollPaintCall(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex); void InvalidateAllWindowsAfterInput(); -void textinput_cancel(); +void TextinputCancel(); -void window_move_and_snap(rct_window& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity); -int32_t window_can_resize(const rct_window& w); +void WindowMoveAndSnap(WindowBase& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity); +int32_t WindowCanResize(const WindowBase& w); -void window_start_textbox( - rct_window& call_w, WidgetIndex call_widget, StringId existing_text, char* existing_args, int32_t maxLength); -void window_cancel_textbox(); -void window_update_textbox_caret(); -void window_update_textbox(); +void WindowStartTextbox( + WindowBase& call_w, WidgetIndex call_widget, StringId existing_text, char* existing_args, int32_t maxLength); +void WindowCancelTextbox(); +void WindowUpdateTextboxCaret(); +void WindowUpdateTextbox(); -bool window_is_visible(rct_window& w); +bool WindowIsVisible(WindowBase& w); -bool scenery_tool_is_active(); +bool SceneryToolIsActive(); -rct_viewport* window_get_previous_viewport(rct_viewport* current); -void window_reset_visibilities(); -void window_init_all(); +Viewport* WindowGetPreviousViewport(Viewport* current); +void WindowResetVisibilities(); +void WindowInitAll(); -void window_ride_construction_keyboard_shortcut_turn_left(); -void window_ride_construction_keyboard_shortcut_turn_right(); -void window_ride_construction_keyboard_shortcut_use_track_default(); -void window_ride_construction_keyboard_shortcut_slope_down(); -void window_ride_construction_keyboard_shortcut_slope_up(); -void window_ride_construction_keyboard_shortcut_chain_lift_toggle(); -void window_ride_construction_keyboard_shortcut_bank_left(); -void window_ride_construction_keyboard_shortcut_bank_right(); -void window_ride_construction_keyboard_shortcut_previous_track(); -void window_ride_construction_keyboard_shortcut_next_track(); -void window_ride_construction_keyboard_shortcut_build_current(); -void window_ride_construction_keyboard_shortcut_demolish_current(); +void WindowRideConstructionKeyboardShortcutTurnLeft(); +void WindowRideConstructionKeyboardShortcutTurnRight(); +void WindowRideConstructionKeyboardShortcutUseTrackDefault(); +void WindowRideConstructionKeyboardShortcutSlopeDown(); +void WindowRideConstructionKeyboardShortcutSlopeUp(); +void WindowRideConstructionKeyboardShortcutChainLiftToggle(); +void WindowRideConstructionKeyboardShortcutBankLeft(); +void WindowRideConstructionKeyboardShortcutBankRight(); +void WindowRideConstructionKeyboardShortcutPreviousTrack(); +void WindowRideConstructionKeyboardShortcutNextTrack(); +void WindowRideConstructionKeyboardShortcutBuildCurrent(); +void WindowRideConstructionKeyboardShortcutDemolishCurrent(); -void window_footpath_keyboard_shortcut_turn_left(); -void window_footpath_keyboard_shortcut_turn_right(); -void window_footpath_keyboard_shortcut_slope_down(); -void window_footpath_keyboard_shortcut_slope_up(); -void window_footpath_keyboard_shortcut_build_current(); -void window_footpath_keyboard_shortcut_demolish_current(); +void WindowFootpathKeyboardShortcutTurnLeft(); +void WindowFootpathKeyboardShortcutTurnRight(); +void WindowFootpathKeyboardShortcutSlopeDown(); +void WindowFootpathKeyboardShortcutSlopeUp(); +void WindowFootpathKeyboardShortcutBuildCurrent(); +void WindowFootpathKeyboardShortcutDemolishCurrent(); -void window_follow_sprite(rct_window& w, EntityId spriteIndex); -void window_unfollow_sprite(rct_window& w); +void WindowFollowSprite(WindowBase& w, EntityId spriteIndex); +void WindowUnfollowSprite(WindowBase& w); -bool window_ride_construction_update_state( +bool WindowRideConstructionUpdateState( int32_t* trackType, int32_t* trackDirection, RideId* rideIndex, int32_t* _liftHillAndAlternativeState, CoordsXYZ* trackPos, int32_t* properties); -money32 place_provisional_track_piece( +money64 PlaceProvisionalTrackPiece( RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndAlternativeState, const CoordsXYZ& trackPos); extern RideConstructionState _rideConstructionState2; -rct_window* window_get_listening(); -WindowClass window_get_classification(const rct_window& window); +WindowBase* WindowGetListening(); +WindowClass WindowGetClassification(const WindowBase& window); diff --git a/src/openrct2/interface/WindowClasses.h b/src/openrct2/interface/WindowClasses.h index 1a707523b2..08be0e4c86 100644 --- a/src/openrct2/interface/WindowClasses.h +++ b/src/openrct2/interface/WindowClasses.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/interface/Window_internal.cpp b/src/openrct2/interface/Window_internal.cpp index c18ebf97c6..d5fb3d3888 100644 --- a/src/openrct2/interface/Window_internal.cpp +++ b/src/openrct2/interface/Window_internal.cpp @@ -5,39 +5,39 @@ #include "Cursors.h" #include "Viewport.h" -void rct_window::SetLocation(const CoordsXYZ& coords) +void WindowBase::SetLocation(const CoordsXYZ& coords) { - window_scroll_to_location(*this, coords); + WindowScrollToLocation(*this, coords); flags &= ~WF_SCROLLING_TO_LOCATION; } -void rct_window::ScrollToViewport() +void WindowBase::ScrollToViewport() { if (viewport == nullptr || !focus.has_value()) return; CoordsXYZ newCoords = focus.value().GetPos(); - auto mainWindow = window_get_main(); + auto mainWindow = WindowGetMain(); if (mainWindow != nullptr) - window_scroll_to_location(*mainWindow, newCoords); + WindowScrollToLocation(*mainWindow, newCoords); } -void rct_window::Invalidate() +void WindowBase::Invalidate() { - gfx_set_dirty_blocks({ windowPos, windowPos + ScreenCoordsXY{ width, height } }); + GfxSetDirtyBlocks({ windowPos, windowPos + ScreenCoordsXY{ width, height } }); } -void rct_window::RemoveViewport() +void WindowBase::RemoveViewport() { if (viewport == nullptr) return; - viewport_remove(viewport); + ViewportRemove(viewport); viewport = nullptr; } -CursorID rct_window::OnCursor(WidgetIndex, const ScreenCoordsXY&, CursorID) +CursorID WindowBase::OnCursor(WidgetIndex, const ScreenCoordsXY&, CursorID) { return CursorID::Arrow; } diff --git a/src/openrct2/interface/Window_internal.h b/src/openrct2/interface/Window_internal.h index fec402e149..92d8827a27 100644 --- a/src/openrct2/interface/Window_internal.h +++ b/src/openrct2/interface/Window_internal.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,7 +17,7 @@ enum class TileInspectorPage : int16_t; struct ResearchItem; -struct rct_object_entry; +struct RCTObjectEntry; #ifdef __WARN_SUGGEST_FINAL_METHODS__ # pragma GCC diagnostic push @@ -29,14 +29,14 @@ struct rct_object_entry; * Window structure * size: 0x4C0 */ -struct rct_window +struct WindowBase { WindowEventList* event_handlers{}; - rct_viewport* viewport{}; + Viewport* viewport{}; uint64_t disabled_widgets{}; uint64_t pressed_widgets{}; uint64_t hold_down_widgets{}; - rct_widget* widgets{}; + Widget* widgets{}; ScreenCoordsXY windowPos; int16_t width{}; int16_t height{}; @@ -50,18 +50,18 @@ struct rct_window RideId rideId; }; uint16_t flags{}; - rct_scroll scrolls[3]; + ScrollBar scrolls[3]; uint32_t list_item_positions[1024]{}; uint16_t no_list_items{}; // 0 for no items int16_t selected_list_item{}; // -1 for none selected std::optional focus; union { - campaign_variables campaign; - new_ride_variables new_ride; - ride_variables ride; - track_list_variables track_list; - error_variables error; + CampaignVariables campaign; + NewRideVariables new_ride; + RideVariables ride; + TrackListVariables track_list; + ErrorVariables error; void* custom_info; }; union @@ -85,7 +85,7 @@ struct rct_window union { uint16_t ride_colour; - const scenario_index_entry* highlighted_scenario; + const ScenarioIndexEntry* highlighted_scenario; }; int16_t selected_tab{}; int16_t var_4AE{}; @@ -101,11 +101,11 @@ struct rct_window void Invalidate(); void RemoveViewport(); - rct_window() = default; - rct_window(rct_window&) = delete; - virtual ~rct_window() = default; + WindowBase() = default; + WindowBase(WindowBase&) = delete; + virtual ~WindowBase() = default; - rct_window& operator=(const rct_window&) = delete; + WindowBase& operator=(const WindowBase&) = delete; virtual bool IsLegacy() { @@ -131,10 +131,10 @@ struct rct_window virtual void OnPrepareDraw() { } - virtual void OnDraw(rct_drawpixelinfo& dpi) + virtual void OnDraw(DrawPixelInfo& dpi) { } - virtual void OnDrawWidget(WidgetIndex widgetIndex, rct_drawpixelinfo& dpi) + virtual void OnDrawWidget(WidgetIndex widgetIndex, DrawPixelInfo& dpi) { } virtual OpenRCT2String OnTooltip(WidgetIndex widgetIndex, StringId fallback) @@ -169,7 +169,7 @@ struct rct_window virtual void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) { } - virtual void OnScrollDraw(int32_t scrollIndex, rct_drawpixelinfo& dpi) + virtual void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) { } virtual void OnToolUpdate(WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) @@ -207,4 +207,4 @@ struct rct_window #endif // rct2: 0x01420078 -extern std::list> g_window_list; +extern std::list> g_window_list; diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 03c17eb19c..afd3147b63 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -15,6 +15,18 @@ Debug arm64 + + ReleaseLTCG + arm64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + Release Win32 @@ -67,12 +79,12 @@ - + + - @@ -90,20 +102,22 @@ + + + - - + @@ -120,8 +134,6 @@ - - @@ -154,8 +166,8 @@ - - + + @@ -197,6 +209,7 @@ + @@ -211,6 +224,8 @@ + + @@ -273,6 +288,7 @@ + @@ -292,37 +308,50 @@ + + + + + + + + + + + + + @@ -458,7 +487,7 @@ - + @@ -525,11 +554,12 @@ + - + @@ -552,7 +582,6 @@ - @@ -567,14 +596,14 @@ - + + - @@ -591,20 +620,22 @@ + + - - + + @@ -620,8 +651,6 @@ - - @@ -651,18 +680,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -793,14 +822,15 @@ + + - @@ -851,6 +881,7 @@ + @@ -1010,4 +1041,4 @@ - + \ No newline at end of file diff --git a/src/openrct2/localisation/ConversionTables.cpp b/src/openrct2/localisation/ConversionTables.cpp index 9c2a925387..5f377032af 100644 --- a/src/openrct2/localisation/ConversionTables.cpp +++ b/src/openrct2/localisation/ConversionTables.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,15 +14,15 @@ #include #include -struct encoding_convert_entry +struct EncodingConvertEntry { uint16_t code; uint32_t unicode; }; -extern const encoding_convert_entry RCT2ToUnicodeTable[]; +extern const EncodingConvertEntry RCT2ToUnicodeTable[]; -const encoding_convert_entry RCT2ToUnicodeTable[] = { +const EncodingConvertEntry RCT2ToUnicodeTable[] = { // { 1, FORMAT_MOVE_X }, // { 2, FORMAT_ADJUST_PALETTE }, // { 5, FORMAT_NEWLINE }, @@ -105,10 +105,10 @@ const encoding_convert_entry RCT2ToUnicodeTable[] = { { CSChar::z_acute, UnicodeChar::z_acute }, }; -static int32_t encoding_search_compare(const void* pKey, const void* pEntry) +static int32_t EncodingSearchCompare(const void* pKey, const void* pEntry) { const uint16_t key = *reinterpret_cast(pKey); - const encoding_convert_entry* entry = static_cast(pEntry); + const EncodingConvertEntry* entry = static_cast(pEntry); if (key < entry->code) return -1; if (key > entry->code) @@ -116,10 +116,10 @@ static int32_t encoding_search_compare(const void* pKey, const void* pEntry) return 0; } -wchar_t encoding_convert_rct2_to_unicode(wchar_t rct2str) +wchar_t EncodingConvertRCT2ToUnicode(wchar_t rct2str) { - encoding_convert_entry* entry = static_cast(std::bsearch( - &rct2str, RCT2ToUnicodeTable, std::size(RCT2ToUnicodeTable), sizeof(encoding_convert_entry), encoding_search_compare)); + EncodingConvertEntry* entry = static_cast(std::bsearch( + &rct2str, RCT2ToUnicodeTable, std::size(RCT2ToUnicodeTable), sizeof(EncodingConvertEntry), EncodingSearchCompare)); if (entry == nullptr) return rct2str; return entry->unicode; diff --git a/src/openrct2/localisation/ConversionTables.h b/src/openrct2/localisation/ConversionTables.h index 04a5ab012e..2fb4528dff 100644 --- a/src/openrct2/localisation/ConversionTables.h +++ b/src/openrct2/localisation/ConversionTables.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,4 +11,4 @@ #include "../common.h" -wchar_t encoding_convert_rct2_to_unicode(wchar_t rct2str); +wchar_t EncodingConvertRCT2ToUnicode(wchar_t rct2str); diff --git a/src/openrct2/localisation/Convert.cpp b/src/openrct2/localisation/Convert.cpp index 14c184e9ef..585becf8a1 100644 --- a/src/openrct2/localisation/Convert.cpp +++ b/src/openrct2/localisation/Convert.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -111,13 +111,13 @@ template static std::string DecodeConvertWithTable(std::s return String::ToUtf8(u16); } -std::string rct2_to_utf8(std::string_view src, RCT2LanguageId languageId) +std::string RCT2StringToUTF8(std::string_view src, RCT2LanguageId languageId) { auto codePage = GetCodePageForRCT2Language(languageId); if (codePage == OpenRCT2::CodePage::CP_1252) { // The code page used by RCT2 was not quite 1252 as some codes were used for Polish characters. - return DecodeConvertWithTable(src, encoding_convert_rct2_to_unicode); + return DecodeConvertWithTable(src, EncodingConvertRCT2ToUnicode); } auto decoded = DecodeToMultiByte(src); diff --git a/src/openrct2/localisation/Currency.cpp b/src/openrct2/localisation/Currency.cpp index 9ab69aee72..a6b63c6ae2 100644 --- a/src/openrct2/localisation/Currency.cpp +++ b/src/openrct2/localisation/Currency.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,7 +14,7 @@ #include "StringIds.h" // clang-format off -currency_descriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)] = { +CurrencyDescriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)] = { { "GBP", 10, CurrencyAffix::Prefix, "\xC2\xA3", CurrencyAffix::Suffix, "GBP", STR_POUNDS }, // British Pound { "USD", 10, CurrencyAffix::Prefix, "$", CurrencyAffix::Prefix, "$", STR_DOLLARS }, // US Dollar { "FRF", 10, CurrencyAffix::Suffix, "F", CurrencyAffix::Suffix, "F", STR_FRANC }, // French Franc @@ -36,14 +36,14 @@ currency_descriptor CurrencyDescriptors[EnumValue(CurrencyType::Count)] = { }; // clang-format on -void currency_load_custom_currency_config() +void CurrencyLoadCustomCurrencyConfig() { CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate = gConfigGeneral.CustomCurrencyRate; CurrencyDescriptors[EnumValue(CurrencyType::Custom)].affix_unicode = gConfigGeneral.CustomCurrencyAffix; - if (gConfigGeneral.CustomCurrencySymbol != nullptr) + if (!gConfigGeneral.CustomCurrencySymbol.empty()) { - safe_strcpy( - CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, gConfigGeneral.CustomCurrencySymbol, + SafeStrCpy( + CurrencyDescriptors[EnumValue(CurrencyType::Custom)].symbol_unicode, gConfigGeneral.CustomCurrencySymbol.c_str(), CURRENCY_SYMBOL_MAX_SIZE); } } diff --git a/src/openrct2/localisation/Currency.h b/src/openrct2/localisation/Currency.h index 9e992c054e..1ad4ed2c77 100644 --- a/src/openrct2/localisation/Currency.h +++ b/src/openrct2/localisation/Currency.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -48,7 +48,7 @@ enum class CurrencyAffix #define CURRENCY_RATE_MAX_NUM_DIGITS 9 // Currency format specification - inspired by OpenTTD -struct currency_descriptor +struct CurrencyDescriptor { char isoCode[4]; // Rate is relative to 0.10 GBP @@ -61,10 +61,10 @@ struct currency_descriptor }; // List of currency formats -extern currency_descriptor CurrencyDescriptors[static_cast(CurrencyType::Count)]; +extern CurrencyDescriptor CurrencyDescriptors[static_cast(CurrencyType::Count)]; /** * Loads custom currency saved parameters into {@link CurrencyDescriptors}' * custom currency entry */ -void currency_load_custom_currency_config(); +void CurrencyLoadCustomCurrencyConfig(); diff --git a/src/openrct2/localisation/Date.h b/src/openrct2/localisation/Date.h index f57e2f8104..406b831571 100644 --- a/src/openrct2/localisation/Date.h +++ b/src/openrct2/localisation/Date.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,7 +36,7 @@ enum DATE_FORMAT_YEAR_DAY_MONTH }; -struct openrct2_timeofday +struct RealWorldTime { uint8_t second; uint8_t minute; @@ -44,22 +44,22 @@ struct openrct2_timeofday }; extern const int16_t days_in_month[MONTH_COUNT]; -extern const StringId DateFormatStringIds[]; +extern const StringId DateFormatStringIDs[]; extern const StringId DateFormatStringFormatIds[]; extern uint16_t gDateMonthTicks; extern int32_t gDateMonthsElapsed; -extern openrct2_timeofday gRealTimeOfDay; +extern RealWorldTime gRealTimeOfDay; -int32_t date_get_month(int32_t months); -int32_t date_get_year(int32_t months); -int32_t date_get_total_months(int32_t month, int32_t year); -void date_reset(); -void date_update(); -void date_set(int32_t year, int32_t month, int32_t day); -void date_update_real_time_of_day(); -bool date_is_day_start(int32_t monthTicks); -bool date_is_week_start(int32_t monthTicks); -bool date_is_fortnight_start(int32_t monthTicks); -bool date_is_month_start(int32_t monthTicks); +int32_t DateGetMonth(int32_t months); +int32_t DateGetYear(int32_t months); +int32_t DateGetTotalMonths(int32_t month, int32_t year); +void DateReset(); +void DateUpdate(); +void DateSet(int32_t year, int32_t month, int32_t day); +void DateUpdateRealTimeOfDay(); +bool DateIsDayStart(int32_t monthTicks); +bool DateIsWeekStart(int32_t monthTicks); +bool DateIsFortnightStart(int32_t monthTicks); +bool DateIsMonthStart(int32_t monthTicks); diff --git a/src/openrct2/localisation/FormatCodes.cpp b/src/openrct2/localisation/FormatCodes.cpp index b57e3f5c29..491a61d6c8 100644 --- a/src/openrct2/localisation/FormatCodes.cpp +++ b/src/openrct2/localisation/FormatCodes.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -201,7 +201,7 @@ FormatToken FormatTokenFromTextColour(size_t textColour) FormatToken::ColourPaleLavender, FormatToken::ColourPaleGold, FormatToken::ColourLightPink, FormatToken::ColourPearlAqua, FormatToken::ColourPaleSilver, }; - if (textColour > std::size(tokens)) + if (textColour >= std::size(tokens)) return FormatToken::ColourBlack; return tokens[textColour]; } diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index 6e8429c41e..3ee79d1aac 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -194,6 +194,10 @@ namespace UnicodeChar constexpr char32_t u_ring = 0x16F; constexpr char32_t u_double_acute_uc = 0x170; constexpr char32_t u_double_acute = 0x171; + constexpr char32_t w_circumflex_uc = 0x174; + constexpr char32_t w_circumflex = 0x175; + constexpr char32_t y_circumflex_uc = 0x176; + constexpr char32_t y_circumflex = 0x177; constexpr char32_t z_acute_uc = 0x179; constexpr char32_t z_acute = 0x17A; constexpr char32_t z_dot_uc = 0x17B; diff --git a/src/openrct2/localisation/Formatter.cpp b/src/openrct2/localisation/Formatter.cpp index 639d516c63..f19d153953 100644 --- a/src/openrct2/localisation/Formatter.cpp +++ b/src/openrct2/localisation/Formatter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/localisation/Formatter.h b/src/openrct2/localisation/Formatter.h index 739ad59e3b..27d06939b5 100644 --- a/src/openrct2/localisation/Formatter.h +++ b/src/openrct2/localisation/Formatter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -89,7 +89,6 @@ public: std::is_same_v, const char*> || std::is_same_v, int16_t> || std::is_same_v, int32_t> || - std::is_same_v, money32> || std::is_same_v, money64> || std::is_same_v, RideId> || std::is_same_v, EntityId> || diff --git a/src/openrct2/localisation/Formatting.cpp b/src/openrct2/localisation/Formatting.cpp index 2e476bd06a..83f41b7b10 100644 --- a/src/openrct2/localisation/Formatting.cpp +++ b/src/openrct2/localisation/Formatting.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -53,24 +53,24 @@ namespace OpenRCT2 return std::nullopt; } - FmtString::token::token(FormatToken k, std::string_view s, uint32_t p) + FmtString::Token::Token(FormatToken k, std::string_view s, uint32_t p) : kind(k) , text(s) , parameter(p) { } - bool FmtString::token::IsLiteral() const + bool FmtString::Token::IsLiteral() const { return kind == FormatToken::Literal; } - bool FmtString::token::IsCodepoint() const + bool FmtString::Token::IsCodepoint() const { return kind == FormatToken::Escaped; } - codepoint_t FmtString::token::GetCodepoint() const + codepoint_t FmtString::Token::GetCodepoint() const { if (kind == FormatToken::Escaped) { @@ -92,7 +92,7 @@ namespace OpenRCT2 auto i = index; if (i >= str.size()) { - current = token(); + current = Token(); return; } @@ -129,7 +129,7 @@ namespace OpenRCT2 { p = *p0; } - current = token(FormatToken::Move, str.substr(startIndex, i - startIndex), p); + current = Token(FormatToken::Move, str.substr(startIndex, i - startIndex), p); return; } @@ -147,7 +147,7 @@ namespace OpenRCT2 p |= (*p2) << 16; p |= (*p3) << 24; } - current = token(FormatToken::InlineSprite, str.substr(startIndex, i - startIndex), p); + current = Token(FormatToken::InlineSprite, str.substr(startIndex, i - startIndex), p); return; } } @@ -172,32 +172,32 @@ namespace OpenRCT2 return index != rhs.index; } - FmtString::token FmtString::iterator::CreateToken(size_t len) + FmtString::Token FmtString::iterator::CreateToken(size_t len) { std::string_view sztoken = str.substr(index, len); if (sztoken.size() >= 2 && ((sztoken[0] == '{' && sztoken[1] == '{') || (sztoken[0] == '}' && sztoken[1] == '}'))) { - return token(FormatToken::Escaped, sztoken); + return Token(FormatToken::Escaped, sztoken); } if (sztoken.size() >= 2 && sztoken[0] == '{' && sztoken[1] != '{') { auto kind = FormatTokenFromString(sztoken.substr(1, len - 2)); - return token(kind, sztoken); + return Token(kind, sztoken); } if (sztoken == "\n" || sztoken == "\r") { - return token(FormatToken::Newline, sztoken); + return Token(FormatToken::Newline, sztoken); } - return token(FormatToken::Literal, sztoken); + return Token(FormatToken::Literal, sztoken); } - const FmtString::token* FmtString::iterator::operator->() const + const FmtString::Token* FmtString::iterator::operator->() const { return ¤t; } - const FmtString::token& FmtString::iterator::operator*() + const FmtString::Token& FmtString::iterator::operator*() { return current; } @@ -270,13 +270,13 @@ namespace OpenRCT2 static std::string_view GetDigitSeparator() { - auto sz = language_get_string(STR_LOCALE_THOUSANDS_SEPARATOR); + auto sz = LanguageGetString(STR_LOCALE_THOUSANDS_SEPARATOR); return sz != nullptr ? sz : std::string_view(); } static std::string_view GetDecimalSeparator() { - auto sz = language_get_string(STR_LOCALE_DECIMAL_POINT); + auto sz = LanguageGetString(STR_LOCALE_DECIMAL_POINT); return sz != nullptr ? sz : std::string_view(); } @@ -402,7 +402,7 @@ namespace OpenRCT2 // Currency symbol auto symbol = currencyDesc->symbol_unicode; auto affix = currencyDesc->affix_unicode; - if (!font_supports_string(symbol, FontStyle::Medium)) + if (!FontSupportsString(symbol, FontStyle::Medium)) { symbol = currencyDesc->symbol_ascii; affix = currencyDesc->affix_ascii; @@ -449,12 +449,12 @@ namespace OpenRCT2 if (minutes == 0) { auto fmt = Formats[0][seconds == 1 ? 0 : 1]; - FormatStringId(ss, fmt, seconds); + FormatStringID(ss, fmt, seconds); } else { auto fmt = Formats[minutes == 1 ? 1 : 2][seconds == 1 ? 0 : 1]; - FormatStringId(ss, fmt, minutes, seconds); + FormatStringID(ss, fmt, minutes, seconds); } } @@ -471,12 +471,12 @@ namespace OpenRCT2 if (hours == 0) { auto fmt = Formats[0][minutes == 1 ? 0 : 1]; - FormatStringId(ss, fmt, minutes); + FormatStringID(ss, fmt, minutes); } else { auto fmt = Formats[hours == 1 ? 1 : 2][minutes == 1 ? 0 : 1]; - FormatStringId(ss, fmt, hours, minutes); + FormatStringID(ss, fmt, hours, minutes); } } @@ -537,13 +537,13 @@ namespace OpenRCT2 { default: case MeasurementFormat::Imperial: - FormatStringId(ss, STR_UNIT_SUFFIX_MILES_PER_HOUR, arg); + FormatStringID(ss, STR_UNIT_SUFFIX_MILES_PER_HOUR, arg); break; case MeasurementFormat::Metric: - FormatStringId(ss, STR_UNIT_SUFFIX_KILOMETRES_PER_HOUR, mph_to_kmph(arg)); + FormatStringID(ss, STR_UNIT_SUFFIX_KILOMETRES_PER_HOUR, MphToKmph(arg)); break; case MeasurementFormat::SI: - FormatStringId(ss, STR_UNIT_SUFFIX_METRES_PER_SECOND, mph_to_dmps(arg)); + FormatStringID(ss, STR_UNIT_SUFFIX_METRES_PER_SECOND, MphToDmps(arg)); break; } } @@ -567,11 +567,11 @@ namespace OpenRCT2 { default: case MeasurementFormat::Imperial: - FormatStringId(ss, STR_UNIT_SUFFIX_FEET, metres_to_feet(arg)); + FormatStringID(ss, STR_UNIT_SUFFIX_FEET, MetresToFeet(arg)); break; case MeasurementFormat::Metric: case MeasurementFormat::SI: - FormatStringId(ss, STR_UNIT_SUFFIX_METRES, arg); + FormatStringID(ss, STR_UNIT_SUFFIX_METRES, arg); break; } } @@ -579,15 +579,15 @@ namespace OpenRCT2 case FormatToken::MonthYear: if constexpr (std::is_integral()) { - auto month = date_get_month(arg); - auto year = date_get_year(arg) + 1; + auto month = DateGetMonth(arg); + auto year = DateGetYear(arg) + 1; FormatMonthYear(ss, month, year); } break; case FormatToken::Month: if constexpr (std::is_integral()) { - auto szMonth = language_get_string(DateGameMonthNames[date_get_month(arg)]); + auto szMonth = LanguageGetString(DateGameMonthNames[DateGetMonth(arg)]); if (szMonth != nullptr) { ss << szMonth; @@ -629,7 +629,7 @@ namespace OpenRCT2 FmtString GetFmtStringById(StringId id) { - auto fmtc = language_get_string(id); + auto fmtc = LanguageGetString(id); return FmtString(fmtc); } @@ -832,8 +832,3 @@ namespace OpenRCT2 } } // namespace OpenRCT2 - -void format_string(utf8* dest, size_t size, StringId format, const void* args) -{ - OpenRCT2::FormatStringLegacy(dest, size, format, args); -} diff --git a/src/openrct2/localisation/Formatting.h b/src/openrct2/localisation/Formatting.h index 4f986fd9ea..544d9e239a 100644 --- a/src/openrct2/localisation/Formatting.h +++ b/src/openrct2/localisation/Formatting.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -154,14 +154,14 @@ namespace OpenRCT2 std::string _strOwned; public: - struct token + struct Token { FormatToken kind{}; std::string_view text; uint32_t parameter{}; - token() = default; - token(FormatToken k, std::string_view s, uint32_t p = 0); + Token() = default; + Token(FormatToken k, std::string_view s, uint32_t p = 0); bool IsLiteral() const; bool IsCodepoint() const; codepoint_t GetCodepoint() const; @@ -172,7 +172,7 @@ namespace OpenRCT2 private: std::string_view str; size_t index; - token current; + Token current; void update(); @@ -180,9 +180,9 @@ namespace OpenRCT2 iterator(std::string_view s, size_t i); bool operator==(iterator& rhs); bool operator!=(iterator& rhs); - token CreateToken(size_t len); - const token* operator->() const; - const token& operator*(); + Token CreateToken(size_t len); + const Token* operator->() const; + const Token& operator*(); iterator& operator++(); iterator operator++(int); bool eol() const; @@ -284,22 +284,22 @@ namespace OpenRCT2 return CopyStringStreamToBuffer(buffer, bufferLen, ss); } - template static void FormatStringId(FormatBuffer& ss, StringId id, TArgs&&... argN) + template static void FormatStringID(FormatBuffer& ss, StringId id, TArgs&&... argN) { auto fmt = GetFmtStringById(id); FormatString(ss, fmt, argN...); } - template std::string FormatStringId(StringId id, TArgs&&... argN) + template std::string FormatStringID(StringId id, TArgs&&... argN) { auto fmt = GetFmtStringById(id); return FormatString(fmt, argN...); } - template size_t FormatStringId(char* buffer, size_t bufferLen, StringId id, TArgs&&... argN) + template size_t FormatStringID(char* buffer, size_t bufferLen, StringId id, TArgs&&... argN) { auto& ss = GetThreadFormatStream(); - FormatStringId(ss, id, argN...); + FormatStringID(ss, id, argN...); return CopyStringStreamToBuffer(buffer, bufferLen, ss); } diff --git a/src/openrct2/localisation/Language.cpp b/src/openrct2/localisation/Language.cpp index f001ea5e00..83fce56b8c 100644 --- a/src/openrct2/localisation/Language.cpp +++ b/src/openrct2/localisation/Language.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,38 +21,39 @@ #include // clang-format off -const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = +const LanguageDescriptor LanguagesDescriptors[LANGUAGE_COUNT] = { - { "", "", "", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_UNDEFINED - { "ar-EG", "Arabic (experimental)", "Arabic (experimental)", FAMILY(&TTFFamilySansSerif), true }, // LANGUAGE_ARABIC - { "ca-ES", "Catalan", u8"Català", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_CATALAN - { "zh-CN", "Chinese (Simplified)", "Chinese (Simplified)", FAMILY(&TTFFamilyChineseSimplified), false }, // LANGUAGE_CHINESE_SIMPLIFIED - { "zh-TW", "Chinese (Traditional)", "Chinese (Traditional)", FAMILY(&TTFFamilyChineseTraditional), false }, // LANGUAGE_CHINESE_TRADITIONAL - { "cs-CZ", "Czech", u8"Čeština", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_CZECH - { "da-DK", "Danish", "Dansk", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_DANISH - { "de-DE", "German", "Deutsch", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_GERMAN - { "en-GB", "English (UK)", "English (UK)", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ENGLISH_UK - { "en-US", "English (US)", "English (US)", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ENGLISH_US - { "eo-ZZ", "Esperanto", "Esperanto", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ESPERANTO - { "es-ES", "Spanish", u8"Español", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_SPANISH - { "fr-FR", "French", u8"Français", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_FRENCH - { "it-IT", "Italian", "Italiano", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ITALIAN - { "ja-JP", "Japanese", "Japanese", FAMILY(&TTFFamilyJapanese), false }, // LANGUAGE_JAPANESE - { "ko-KR", "Korean", "Korean", FAMILY(&TTFFamilyKorean), false }, // LANGUAGE_KOREAN - { "hu-HU", "Hungarian", "Magyar", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_HUNGARIAN - { "nl-NL", "Dutch", "Nederlands", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_DUTCH - { "nb-NO", "Norwegian", "Norsk", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_NORWEGIAN - { "pl-PL", "Polish", "Polski", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_POLISH - { "pt-BR", "Portuguese (BR)", u8"Português (BR)", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_PORTUGUESE_BR - { "ru-RU", "Russian", u8"Русский", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_RUSSIAN - { "fi-FI", "Finnish", "Suomi", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_FINNISH - { "sv-SE", "Swedish", "Svenska", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_SWEDISH - { "tr-TR", "Turkish", "Türkçe", FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_TURKISH - { "vi-VN", "Vietnamese", "Vietnamese", FAMILY(&TTFFamilySansSerif), false }, // LANGUAGE_VIETNAMESE + { "", "", "", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_UNDEFINED + { "ar-EG", "Arabic (experimental)", "Arabic (experimental)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilySansSerif), true }, // LANGUAGE_ARABIC + { "ca-ES", "Catalan", u8"Català", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_CATALAN + { "zh-CN", "Chinese (Simplified)", "Chinese (Simplified)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyChineseSimplified), false }, // LANGUAGE_CHINESE_SIMPLIFIED + { "zh-TW", "Chinese (Traditional)", "Chinese (Traditional)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyChineseTraditional), false }, // LANGUAGE_CHINESE_TRADITIONAL + { "cs-CZ", "Czech", u8"Čeština", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_CZECH + { "da-DK", "Danish", "Dansk", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_DANISH + { "de-DE", "German", "Deutsch", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_GERMAN + { "en-GB", "English (UK)", "English (UK)", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ENGLISH_UK + { "en-US", "English (US)", "English (US)", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ENGLISH_US + { "eo-ZZ", "Esperanto", "Esperanto", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ESPERANTO + { "es-ES", "Spanish", u8"Español", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_SPANISH + { "fr-FR", "French", u8"Français", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_FRENCH + { "fr-CA", "French (CA)", u8"Français (CA)", LANGUAGE_FRENCH, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_FRENCH_CA + { "it-IT", "Italian", "Italiano", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_ITALIAN + { "ja-JP", "Japanese", "Japanese", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyJapanese), false }, // LANGUAGE_JAPANESE + { "ko-KR", "Korean", "Korean", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyKorean), false }, // LANGUAGE_KOREAN + { "hu-HU", "Hungarian", "Magyar", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_HUNGARIAN + { "nl-NL", "Dutch", "Nederlands", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_DUTCH + { "nb-NO", "Norwegian", "Norsk", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_NORWEGIAN + { "pl-PL", "Polish", "Polski", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_POLISH + { "pt-BR", "Portuguese (BR)", u8"Português (BR)", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_PORTUGUESE_BR + { "ru-RU", "Russian", u8"Русский", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_RUSSIAN + { "fi-FI", "Finnish", "Suomi", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_FINNISH + { "sv-SE", "Swedish", "Svenska", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_SWEDISH + { "tr-TR", "Turkish", "Türkçe", LANGUAGE_UNDEFINED, FAMILY_OPENRCT2_SPRITE, false }, // LANGUAGE_TURKISH + { "vi-VN", "Vietnamese", "Vietnamese", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilySansSerif), false }, // LANGUAGE_VIETNAMESE }; // clang-format on -uint8_t language_get_id_from_locale(const char* locale) +uint8_t LanguageGetIDFromLocale(const char* locale) { uint8_t i = 0; for (const auto& langDesc : LanguagesDescriptors) @@ -66,13 +67,13 @@ uint8_t language_get_id_from_locale(const char* locale) return LANGUAGE_UNDEFINED; } -const char* language_get_string(StringId id) +const char* LanguageGetString(StringId id) { const auto& localisationService = OpenRCT2::GetContext()->GetLocalisationService(); return localisationService.GetString(id); } -bool language_open(int32_t id) +bool LanguageOpen(int32_t id) { auto context = OpenRCT2::GetContext(); auto& localisationService = context->GetLocalisationService(); @@ -90,7 +91,7 @@ bool language_open(int32_t id) } } -bool language_get_localised_scenario_strings(const utf8* scenarioFilename, StringId* outStringIds) +bool LanguageGetLocalisedScenarioStrings(const utf8* scenarioFilename, StringId* outStringIds) { const auto& localisationService = OpenRCT2::GetContext()->GetLocalisationService(); auto result = localisationService.GetLocalisedScenarioStrings(scenarioFilename); @@ -100,13 +101,13 @@ bool language_get_localised_scenario_strings(const utf8* scenarioFilename, Strin return outStringIds[0] != STR_NONE || outStringIds[1] != STR_NONE || outStringIds[2] != STR_NONE; } -void language_free_object_string(StringId stringId) +void LanguageFreeObjectString(StringId stringId) { auto& localisationService = OpenRCT2::GetContext()->GetLocalisationService(); localisationService.FreeObjectString(stringId); } -StringId language_allocate_object_string(const std::string& target) +StringId LanguageAllocateObjectString(const std::string& target) { auto& localisationService = OpenRCT2::GetContext()->GetLocalisationService(); return localisationService.AllocateObjectString(target); diff --git a/src/openrct2/localisation/Language.h b/src/openrct2/localisation/Language.h index cc027ea608..8ff0268f38 100644 --- a/src/openrct2/localisation/Language.h +++ b/src/openrct2/localisation/Language.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,6 +30,7 @@ enum LANGUAGE_ESPERANTO, LANGUAGE_SPANISH, LANGUAGE_FRENCH, + LANGUAGE_FRENCH_CA, LANGUAGE_ITALIAN, LANGUAGE_JAPANESE, LANGUAGE_KOREAN, @@ -70,11 +71,12 @@ enum class RCT2LanguageId #include "../interface/FontFamilies.h" -struct language_descriptor +struct LanguageDescriptor { const char* locale; const utf8* english_name; const utf8* native_name; + uint8_t fallback; #if !defined(NO_TTF) TTFontFamily const* font_family; #else @@ -83,7 +85,7 @@ struct language_descriptor bool isRtl; }; -extern const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT]; +extern const LanguageDescriptor LanguagesDescriptors[LANGUAGE_COUNT]; constexpr const char* BlackUpArrowString = u8"{BLACK}▲"; constexpr const char* BlackDownArrowString = u8"{BLACK}▼"; @@ -92,22 +94,21 @@ constexpr const char* BlackRightArrowString = u8"{BLACK}▶"; constexpr const char* CheckBoxMarkString = u8"✓"; constexpr const char* EyeString = u8"👁"; -uint8_t language_get_id_from_locale(const char* locale); -const char* language_get_string(StringId id); -bool language_open(int32_t id); +uint8_t LanguageGetIDFromLocale(const char* locale); +const char* LanguageGetString(StringId id); +bool LanguageOpen(int32_t id); -uint32_t utf8_get_next(const utf8* char_ptr, const utf8** nextchar_ptr); -int32_t utf8_insert_codepoint(utf8* dst, uint32_t codepoint); -bool utf8_is_codepoint_start(const utf8* text); -int32_t utf8_get_codepoint_length(char32_t codepoint); -int32_t utf8_length(const utf8* text); +uint32_t UTF8GetNext(const utf8* char_ptr, const utf8** nextchar_ptr); +bool UTF8IsCodepointStart(const utf8* text); +int32_t UTF8GetCodepointLength(char32_t codepoint); +int32_t UTF8Length(const utf8* text); -std::string rct2_to_utf8(std::string_view src, RCT2LanguageId languageId); -bool language_get_localised_scenario_strings(const utf8* scenarioFilename, StringId* outStringIds); -void language_free_object_string(StringId stringId); -StringId language_allocate_object_string(const std::string& target); +std::string RCT2StringToUTF8(std::string_view src, RCT2LanguageId languageId); +bool LanguageGetLocalisedScenarioStrings(const utf8* scenarioFilename, StringId* outStringIds); +void LanguageFreeObjectString(StringId stringId); +StringId LanguageAllocateObjectString(const std::string& target); -constexpr utf8* utf8_write_codepoint(utf8* dst, uint32_t codepoint) +constexpr utf8* UTF8WriteCodepoint(utf8* dst, uint32_t codepoint) { if (codepoint <= 0x7F) { diff --git a/src/openrct2/localisation/LanguagePack.cpp b/src/openrct2/localisation/LanguagePack.cpp index 72533f095e..51efc6209c 100644 --- a/src/openrct2/localisation/LanguagePack.cpp +++ b/src/openrct2/localisation/LanguagePack.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,6 +9,7 @@ #include "LanguagePack.h" +#include "../Context.h" #include "../common.h" #include "../core/FileStream.h" #include "../core/Memory.hpp" @@ -18,6 +19,7 @@ #include "../core/StringReader.h" #include "Language.h" #include "Localisation.h" +#include "LocalisationService.h" #include #include @@ -68,7 +70,8 @@ public: Guard::ArgumentNotNull(path); // Load file directly into memory - utf8* fileData = nullptr; + u8string fileData; + try { OpenRCT2::FileStream fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); @@ -79,22 +82,16 @@ public: throw IOException("Language file too large."); } - fileData = Memory::Allocate(fileLength + 1); - fs.Read(fileData, fileLength); - fileData[fileLength] = '\0'; + fileData.resize(fileLength); + fs.Read(fileData.data(), fileLength); } catch (const std::exception& ex) { - Memory::Free(fileData); - log_error("Unable to open %s: %s", path, ex.what()); + LOG_ERROR("Unable to open %s: %s", path, ex.what()); return nullptr; } - // Parse the memory as text - auto result = FromText(id, fileData); - - Memory::Free(fileData); - return result; + return FromText(id, fileData.data()); } static std::unique_ptr FromText(uint16_t id, const utf8* text) @@ -395,7 +392,7 @@ private: { if (_objectOverrides.size() == MAX_OBJECT_OVERRIDES) { - log_warning("Maximum number of localised object strings exceeded."); + LOG_WARNING("Maximum number of localised object strings exceeded."); } _objectOverrides.emplace_back(); @@ -439,7 +436,7 @@ private: { if (_scenarioOverrides.size() == MAX_SCENARIO_OVERRIDES) { - log_warning("Maximum number of scenario strings exceeded."); + LOG_WARNING("Maximum number of scenario strings exceeded."); } _scenarioOverrides.emplace_back(); @@ -580,6 +577,12 @@ namespace LanguagePackFactory return languagePack; } + std::unique_ptr FromLanguageId(uint16_t id) + { + auto path = OpenRCT2::GetContext()->GetLocalisationService().GetLanguagePath(id); + return LanguagePack::FromFile(id, path.c_str()); + } + std::unique_ptr FromText(uint16_t id, const utf8* text) { auto languagePack = LanguagePack::FromText(id, text); diff --git a/src/openrct2/localisation/LanguagePack.h b/src/openrct2/localisation/LanguagePack.h index 0b77ebc2c2..f5b8b9e8be 100644 --- a/src/openrct2/localisation/LanguagePack.h +++ b/src/openrct2/localisation/LanguagePack.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,5 +33,6 @@ struct ILanguagePack namespace LanguagePackFactory { std::unique_ptr FromFile(uint16_t id, const utf8* path); + std::unique_ptr FromLanguageId(uint16_t id); std::unique_ptr FromText(uint16_t id, const utf8* text); } // namespace LanguagePackFactory diff --git a/src/openrct2/localisation/Localisation.Date.cpp b/src/openrct2/localisation/Localisation.Date.cpp index e8de951fe1..6b95029501 100644 --- a/src/openrct2/localisation/Localisation.Date.cpp +++ b/src/openrct2/localisation/Localisation.Date.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ const int16_t days_in_month[MONTH_COUNT] = { 31, 30, 31, 30, 31, 31, 30, 31, }; -const StringId DateFormatStringIds[] = { +const StringId DateFormatStringIDs[] = { STR_DATE_FORMAT_DAY_MONTH_YEAR, STR_DATE_FORMAT_MONTH_DAY_YEAR, STR_DATE_FORMAT_YEAR_MONTH_DAY, @@ -38,19 +38,19 @@ const StringId DateFormatStringFormatIds[] = { STR_DATE_FORMAT_YDM, }; -openrct2_timeofday gRealTimeOfDay; +RealWorldTime gRealTimeOfDay; -int32_t date_get_month(int32_t months) +int32_t DateGetMonth(int32_t months) { return months % MONTH_COUNT; } -int32_t date_get_year(int32_t months) +int32_t DateGetYear(int32_t months) { return months / MONTH_COUNT; } -int32_t date_get_total_months(int32_t month, int32_t year) +int32_t DateGetTotalMonths(int32_t month, int32_t year) { return (year - 1) * MONTH_COUNT + month; } @@ -59,14 +59,14 @@ int32_t date_get_total_months(int32_t month, int32_t year) * * rct2: 0x006C4494 */ -void date_reset() +void DateReset() { gDateMonthsElapsed = 0; gDateMonthTicks = 0; gCurrentRealTimeTicks = 0; } -void date_set(int32_t year, int32_t month, int32_t day) +void DateSet(int32_t year, int32_t month, int32_t day) { year = std::clamp(year, 1, MAX_YEAR); month = std::clamp(month, 1, static_cast(MONTH_COUNT)); @@ -75,7 +75,7 @@ void date_set(int32_t year, int32_t month, int32_t day) gDateMonthTicks = TICKS_PER_MONTH / days_in_month[month - 1] * (day - 1) + 4; } -void date_update() +void DateUpdate() { PROFILED_FUNCTION(); @@ -87,11 +87,11 @@ void date_update() } else { - gDateMonthTicks = floor2(static_cast(monthTicks), 4); + gDateMonthTicks = Floor2(static_cast(monthTicks), 4); } } -void date_update_real_time_of_day() +void DateUpdateRealTimeOfDay() { time_t timestamp = time(nullptr); struct tm* now = localtime(×tamp); @@ -101,29 +101,29 @@ void date_update_real_time_of_day() gRealTimeOfDay.hour = now->tm_hour; } -bool date_is_day_start(int32_t monthTicks) +bool DateIsDayStart(int32_t monthTicks) { if (monthTicks < 4) { return false; } int32_t prevMonthTick = monthTicks - 4; - int32_t currentMonth = date_get_month(gDateMonthsElapsed); + int32_t currentMonth = DateGetMonth(gDateMonthsElapsed); int32_t currentDaysInMonth = days_in_month[currentMonth]; return ((currentDaysInMonth * monthTicks) >> 16 != (currentDaysInMonth * prevMonthTick) >> 16); } -bool date_is_week_start(int32_t monthTicks) +bool DateIsWeekStart(int32_t monthTicks) { return (monthTicks & 0x3FFF) == 0; } -bool date_is_fortnight_start(int32_t monthTicks) +bool DateIsFortnightStart(int32_t monthTicks) { return (monthTicks & 0x7FFF) == 0; } -bool date_is_month_start(int32_t monthTicks) +bool DateIsMonthStart(int32_t monthTicks) { return (monthTicks == 0); } diff --git a/src/openrct2/localisation/Localisation.cpp b/src/openrct2/localisation/Localisation.cpp index bade24d985..83aae3d3de 100644 --- a/src/openrct2/localisation/Localisation.cpp +++ b/src/openrct2/localisation/Localisation.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,6 +27,7 @@ #include "../ride/Ride.h" #include "../util/Util.h" #include "Date.h" +#include "Formatting.h" #include "Localisation.h" #include @@ -45,14 +46,6 @@ bool gDebugStringFormatting = false; #endif // clang-format off -const StringId SpeedNames[] = { - STR_SPEED_NORMAL, - STR_SPEED_QUICK, - STR_SPEED_FAST, - STR_SPEED_TURBO, - STR_SPEED_HYPER, -}; - const StringId ObjectiveNames[] = { STR_OBJECTIVE_NONE, STR_OBJECTIVE_GUESTS_BY, @@ -328,13 +321,13 @@ const StringId DateGameShortMonthNames[MONTH_COUNT] = { }; // clang-format on -std::string format_string(StringId format, const void* args) +std::string FormatStringID(StringId format, const void* args) { std::string buffer(256, 0); size_t len{}; for (;;) { - format_string(buffer.data(), buffer.size(), format, args); + OpenRCT2::FormatStringLegacy(buffer.data(), buffer.size(), format, args); len = buffer.find('\0'); if (len == std::string::npos) { @@ -361,12 +354,12 @@ std::string format_string(StringId format, const void* args) * format (ax) * args (ecx) */ -void format_string_to_upper(utf8* dest, size_t size, StringId format, const void* args) +void FormatStringToUpper(utf8* dest, size_t size, StringId format, const void* args) { #ifdef DEBUG if (gDebugStringFormatting) { - printf("format_string_to_upper(%hu)\n", format); + printf("FormatStringToUpper(%hu)\n", format); } #endif @@ -375,7 +368,7 @@ void format_string_to_upper(utf8* dest, size_t size, StringId format, const void return; } - format_string(dest, size, format, args); + OpenRCT2::FormatStringLegacy(dest, size, format, args); std::string upperString = String::ToUpper(dest); @@ -383,14 +376,14 @@ void format_string_to_upper(utf8* dest, size_t size, StringId format, const void { upperString.resize(size - 1); dest[size - 1] = '\0'; - log_warning("Truncating formatted string \"%s\" to %d bytes.", dest, size); + LOG_WARNING("Truncating formatted string \"%s\" to %d bytes.", dest, size); } upperString.copy(dest, upperString.size()); dest[upperString.size()] = '\0'; } -void format_readable_size(char* buf, size_t bufSize, uint64_t sizeBytes) +void FormatReadableSize(char* buf, size_t bufSize, uint64_t sizeBytes) { constexpr uint32_t SizeTable[] = { STR_SIZE_BYTE, STR_SIZE_KILOBYTE, STR_SIZE_MEGABYTE, STR_SIZE_GIGABYTE, STR_SIZE_TERABYTE, @@ -405,26 +398,26 @@ void format_readable_size(char* buf, size_t bufSize, uint64_t sizeBytes) } char sizeType[128] = {}; - format_string(sizeType, sizeof(sizeType), SizeTable[idx], nullptr); + OpenRCT2::FormatStringLegacy(sizeType, sizeof(sizeType), SizeTable[idx], nullptr); snprintf(buf, bufSize, "%.03f %s", size, sizeType); } -void format_readable_speed(char* buf, size_t bufSize, uint64_t sizeBytes) +void FormatReadableSpeed(char* buf, size_t bufSize, uint64_t sizeBytes) { char sizeText[128] = {}; - format_readable_size(sizeText, sizeof(sizeText), sizeBytes); + FormatReadableSize(sizeText, sizeof(sizeText), sizeBytes); const char* args[1] = { sizeText, }; - format_string(buf, bufSize, STR_NETWORK_SPEED_SEC, args); + OpenRCT2::FormatStringLegacy(buf, bufSize, STR_NETWORK_SPEED_SEC, args); } -money32 string_to_money(const char* string_to_monetise) +money64 StringToMoney(const char* string_to_monetise) { - const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT); - const currency_descriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; + const char* decimal_char = LanguageGetString(STR_LOCALE_DECIMAL_POINT); + const CurrencyDescriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; char processedString[128] = {}; Guard::Assert(strlen(string_to_monetise) < sizeof(processedString)); @@ -445,7 +438,7 @@ money32 string_to_money(const char* string_to_monetise) else if (*src_ptr == decimal_char[0]) { if (hasDecSep) - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; hasDecSep = true; // Replace localised decimal separator with an English one. @@ -456,7 +449,7 @@ money32 string_to_money(const char* string_to_monetise) else if (*src_ptr == '-') { if (hasMinus) - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; hasMinus = true; } else @@ -475,16 +468,16 @@ money32 string_to_money(const char* string_to_monetise) *dst_ptr = '\0'; if (numNumbers == 0) - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; - int32_t sign = 1; + int64_t sign = 1; if (hasMinus) { // If there is a minus sign, it has to be at position 0 in order to be valid. if (processedString[0] == '-') sign = -1; else - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; } // Due to the nature of strstr and strtok, decimals at the very beginning will be ignored, causing @@ -499,10 +492,7 @@ money32 string_to_money(const char* string_to_monetise) auto number = std::stod(processedString, nullptr); number /= (currencyDesc->rate / 10.0); - // Check if MONEY resulted in overflow - uint64_t result = std::min(ToMoney32FromGBP(number), (std::numeric_limits::max)()); - result *= sign; - return static_cast(result); + return ToMoney64FromGBP(number) * sign; } /** @@ -513,39 +503,40 @@ money32 string_to_money(const char* string_to_monetise) * @param forceDecimals Show decimals, even if the amount does not have them. Will be ignored if the current exchange * rate is too big to have decimals. */ -void money_to_string(money32 amount, char* buffer_to_put_value_to, size_t buffer_len, bool forceDecimals) +void MoneyToString(money64 amount, char* buffer_to_put_value_to, size_t buffer_len, bool forceDecimals) { - if (amount == MONEY32_UNDEFINED) + if (amount == MONEY64_UNDEFINED) { snprintf(buffer_to_put_value_to, buffer_len, "0"); return; } - const currency_descriptor* currencyDesc = &CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; + const CurrencyDescriptor& currencyDesc = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; - int sign = amount >= 0 ? 1 : -1; - int a = abs(amount) * currencyDesc->rate; + const char* sign = amount >= 0 ? "" : "-"; + const uint64_t a = std::abs(amount) * currencyDesc.rate; + const unsigned long long whole = a / 100; + const unsigned long long decimal = a % 100; - bool amountIsInteger = (a / 100 > 0) && (a % 100 == 0); + bool amountIsInteger = (whole > 0) && decimal == 0; // If whole and decimal exist - if ((a / 100 > 0 && a % 100 > 0) || (amountIsInteger && forceDecimals && currencyDesc->rate < 100)) + if ((whole > 0 && decimal > 0) || (amountIsInteger && forceDecimals && currencyDesc.rate < 100)) { - const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT); - auto decimalPart = a % 100; - auto precedingZero = (decimalPart < 10) ? "0" : ""; - snprintf(buffer_to_put_value_to, buffer_len, "%d%s%s%d", (a / 100) * sign, decimal_char, precedingZero, decimalPart); + const char* decimalChar = LanguageGetString(STR_LOCALE_DECIMAL_POINT); + auto precedingZero = (decimal < 10) ? "0" : ""; + snprintf(buffer_to_put_value_to, buffer_len, "%s%llu%s%s%llu", sign, whole, decimalChar, precedingZero, decimal); } // If whole exists, but not decimal else if (amountIsInteger) { - snprintf(buffer_to_put_value_to, buffer_len, "%d", (a / 100) * sign); + snprintf(buffer_to_put_value_to, buffer_len, "%s%llu", sign, whole); } // If decimal exists, but not whole - else if (a / 100 == 0 && a % 100 > 0) + else if (whole == 0 && decimal > 0) { - const char* decimal_char = language_get_string(STR_LOCALE_DECIMAL_POINT); - snprintf(buffer_to_put_value_to, buffer_len, "%s0%s%d", sign < 0 ? "-" : "", decimal_char, a % 100); + const char* decimalChar = LanguageGetString(STR_LOCALE_DECIMAL_POINT); + snprintf(buffer_to_put_value_to, buffer_len, "%s0%s%llu", sign, decimalChar, decimal); } else { diff --git a/src/openrct2/localisation/Localisation.h b/src/openrct2/localisation/Localisation.h index 83cb859f98..3a250d3649 100644 --- a/src/openrct2/localisation/Localisation.h +++ b/src/openrct2/localisation/Localisation.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,35 +18,33 @@ #include -std::string format_string(StringId format, const void* args); -void format_string(char* dest, size_t size, StringId format, const void* args); -void format_string_to_upper(char* dest, size_t size, StringId format, const void* args); +std::string FormatStringID(StringId format, const void* args); +void FormatStringToUpper(char* dest, size_t size, StringId format, const void* args); void generate_string_file(); /** * Formats sizeBytes into buf as a human readable text, e.x.: "1024 MB" */ -void format_readable_size(char* buf, size_t bufSize, uint64_t sizeBytes); +void FormatReadableSize(char* buf, size_t bufSize, uint64_t sizeBytes); /** * Formats sizeBytesPerSec into buf as a human readable text, e.x.: "1024 MB/sec" */ -void format_readable_speed(char* buf, size_t bufSize, uint64_t sizeBytesPerSec); +void FormatReadableSpeed(char* buf, size_t bufSize, uint64_t sizeBytesPerSec); -utf8* get_string_end(const utf8* text); -size_t get_string_size(const utf8* text); +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 -money32 string_to_money(const char* string_to_monetise); -void money_to_string(money32 amount, char* buffer_to_put_value_to, size_t buffer_len, bool forceDecimals); +money64 StringToMoney(const char* string_to_monetise); +void MoneyToString(money64 amount, char* buffer_to_put_value_to, size_t buffer_len, bool forceDecimals); -bool is_user_string_id(StringId stringId); +bool IsUserStringID(StringId stringId); #define MAX_USER_STRINGS 1024 #define USER_STRING_MAX_LENGTH 32 -#define USER_STRING_START 0x8000 #define USER_STRING_END 0x8FFF #define REAL_NAME_START 0xA000 #define REAL_NAME_END 0xDFFF @@ -60,7 +58,6 @@ extern const char* real_names[1024]; extern thread_local char gCommonStringFormatBuffer[CommonTextBufferSize]; extern bool gDebugStringFormatting; -extern const StringId SpeedNames[5]; extern const StringId ObjectiveNames[12]; extern const StringId ResearchFundingLevelNames[4]; extern const StringId MarketingCampaignNames[ADVERTISING_CAMPAIGN_COUNT][3]; diff --git a/src/openrct2/localisation/LocalisationService.cpp b/src/openrct2/localisation/LocalisationService.cpp index 3cb87cdd20..6716223312 100644 --- a/src/openrct2/localisation/LocalisationService.cpp +++ b/src/openrct2/localisation/LocalisationService.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,7 @@ #include "../Context.h" #include "../PlatformEnvironment.h" +#include "../core/Guard.hpp" #include "../core/Path.hpp" #include "../interface/Fonts.h" #include "../object/ObjectManager.h" @@ -40,10 +41,9 @@ LocalisationService::~LocalisationService() = default; const char* LocalisationService::GetString(StringId id) const { - const char* result = nullptr; if (id == STR_EMPTY) { - result = ""; + return ""; } else if (id >= BASE_OBJECT_STRING_ID && id < BASE_OBJECT_STRING_ID + MAX_OBJECT_CACHED_STRINGS) { @@ -53,24 +53,21 @@ const char* LocalisationService::GetString(StringId id) const return _objectStrings[index].c_str(); } - result = "(unallocated string)"; + return "(unallocated string)"; } else if (id != STR_NONE) { - if (_languageCurrent != nullptr) + for (const auto& language : _loadedLanguages) { - result = _languageCurrent->GetString(id); - } - if (result == nullptr && _languageFallback != nullptr) - { - result = _languageFallback->GetString(id); - } - if (result == nullptr) - { - result = "(undefined string)"; + const auto result = language->GetString(id); + if (result != nullptr) + return result; } + + return "(undefined string)"; } - return result; + + return nullptr; } std::string LocalisationService::GetLanguagePath(uint32_t languageId) const @@ -98,49 +95,71 @@ void LocalisationService::OpenLanguage(int32_t id) throw std::invalid_argument("id was undefined"); } - std::string filename; - if (id != LANGUAGE_ENGLISH_UK) - { - filename = GetLanguagePath(LANGUAGE_ENGLISH_UK); - _languageFallback = LanguagePackFactory::FromFile(LANGUAGE_ENGLISH_UK, filename.c_str()); - } - - filename = GetLanguagePath(id); - _languageCurrent = LanguagePackFactory::FromFile(id, filename.c_str()); - if (_languageCurrent != nullptr) + auto preferredLanguage = LanguagePackFactory::FromLanguageId(id); + if (preferredLanguage != nullptr) { _currentLanguage = id; + _languageOrder.emplace_back(id); + _loadedLanguages.emplace_back(std::move(preferredLanguage)); TryLoadFonts(*this); } else { throw std::runtime_error("Unable to open language " + std::to_string(id)); } + + auto checkLanguage = LanguagesDescriptors[id].fallback; + while (checkLanguage != LANGUAGE_UNDEFINED) + { + _languageOrder.emplace_back(checkLanguage); + auto fallbackLanguagePack = LanguagePackFactory::FromLanguageId(checkLanguage); + if (fallbackLanguagePack != nullptr) + { + _loadedLanguages.emplace_back(std::move(fallbackLanguagePack)); + } + + checkLanguage = LanguagesDescriptors[checkLanguage].fallback; + } + + if (id != LANGUAGE_ENGLISH_UK) + { + _languageOrder.emplace_back(LANGUAGE_ENGLISH_UK); + auto englishLanguagePack = LanguagePackFactory::FromLanguageId(LANGUAGE_ENGLISH_UK); + if (englishLanguagePack != nullptr) + { + _loadedLanguages.emplace_back(std::move(englishLanguagePack)); + } + else + { + throw std::runtime_error("Unable to open the English language file!"); + } + } } void LocalisationService::CloseLanguages() { - _languageFallback = nullptr; - _languageCurrent = nullptr; + _languageOrder.clear(); + _loadedLanguages.clear(); _currentLanguage = LANGUAGE_UNDEFINED; } std::tuple LocalisationService::GetLocalisedScenarioStrings( const std::string& scenarioFilename) const { - auto result0 = _languageCurrent->GetScenarioOverrideStringId(scenarioFilename.c_str(), 0); - auto result1 = _languageCurrent->GetScenarioOverrideStringId(scenarioFilename.c_str(), 1); - auto result2 = _languageCurrent->GetScenarioOverrideStringId(scenarioFilename.c_str(), 2); + Guard::Assert(!_loadedLanguages.empty()); + auto result0 = _loadedLanguages[0]->GetScenarioOverrideStringId(scenarioFilename.c_str(), 0); + auto result1 = _loadedLanguages[0]->GetScenarioOverrideStringId(scenarioFilename.c_str(), 1); + auto result2 = _loadedLanguages[0]->GetScenarioOverrideStringId(scenarioFilename.c_str(), 2); return std::make_tuple(result0, result1, result2); } StringId LocalisationService::GetObjectOverrideStringId(std::string_view legacyIdentifier, uint8_t index) const { - if (_languageCurrent == nullptr) + if (_loadedLanguages.empty()) { return STR_NONE; } - return _languageCurrent->GetObjectOverrideStringId(legacyIdentifier, index); + return _loadedLanguages[0]->GetObjectOverrideStringId(legacyIdentifier, index); } StringId LocalisationService::AllocateObjectString(const std::string& target) @@ -176,6 +195,11 @@ void LocalisationService::FreeObjectString(StringId stringId) } } +const std::vector& LocalisationService::GetLanguageOrder() const +{ + return _languageOrder; +} + int32_t LocalisationService_GetCurrentLanguage() { const auto& localisationService = GetContext()->GetLocalisationService(); diff --git a/src/openrct2/localisation/LocalisationService.h b/src/openrct2/localisation/LocalisationService.h index a38e017927..d7b76b4c52 100644 --- a/src/openrct2/localisation/LocalisationService.h +++ b/src/openrct2/localisation/LocalisationService.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,8 +34,8 @@ namespace OpenRCT2::Localisation const std::shared_ptr _env; int32_t _currentLanguage{}; bool _useTrueTypeFont{}; - std::unique_ptr _languageFallback; - std::unique_ptr _languageCurrent; + std::vector _languageOrder; + std::vector> _loadedLanguages; std::stack _availableObjectStringIds; std::vector _objectStrings; @@ -66,6 +66,7 @@ namespace OpenRCT2::Localisation void CloseLanguages(); StringId AllocateObjectString(const std::string& target); void FreeObjectString(StringId stringId); + const std::vector& GetLanguageOrder() const; }; } // namespace OpenRCT2::Localisation diff --git a/src/openrct2/localisation/RealNames.cpp b/src/openrct2/localisation/RealNames.cpp index 4d4298c242..e4c21c5a63 100644 --- a/src/openrct2/localisation/RealNames.cpp +++ b/src/openrct2/localisation/RealNames.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 235c93d00a..c1437a1eb0 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -3928,6 +3928,25 @@ enum : uint16_t 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, + // 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 8130ab72ed..eb65de7f15 100644 --- a/src/openrct2/localisation/UTF8.cpp +++ b/src/openrct2/localisation/UTF8.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,7 +12,7 @@ #include #include -uint32_t utf8_get_next(const utf8* char_ptr, const utf8** nextchar_ptr) +uint32_t UTF8GetNext(const utf8* char_ptr, const utf8** nextchar_ptr) { int32_t result; int32_t numBytes; @@ -50,20 +50,7 @@ uint32_t utf8_get_next(const utf8* char_ptr, const utf8** nextchar_ptr) return result; } -/** - * Inserts the given codepoint at the given address, shifting all characters after along. - * @returns the size of the inserted codepoint. - */ -int32_t utf8_insert_codepoint(utf8* dst, uint32_t codepoint) -{ - int32_t shift = utf8_get_codepoint_length(codepoint); - utf8* endPoint = get_string_end(dst); - memmove(dst + shift, dst, endPoint - dst + 1); - utf8_write_codepoint(dst, codepoint); - return shift; -} - -bool utf8_is_codepoint_start(const utf8* text) +bool UTF8IsCodepointStart(const utf8* text) { if ((text[0] & 0x80) == 0) return true; @@ -72,7 +59,7 @@ bool utf8_is_codepoint_start(const utf8* text) return false; } -int32_t utf8_get_codepoint_length(char32_t codepoint) +int32_t UTF8GetCodepointLength(char32_t codepoint) { if (codepoint <= 0x7F) { @@ -93,12 +80,12 @@ int32_t utf8_get_codepoint_length(char32_t codepoint) * Gets the number of characters / codepoints in a UTF-8 string (not necessarily 1:1 with bytes and not including null * terminator). */ -int32_t utf8_length(const utf8* text) +int32_t UTF8Length(const utf8* text) { const utf8* ch = text; int32_t count = 0; - while (utf8_get_next(ch, &ch) != 0) + while (UTF8GetNext(ch, &ch) != 0) { count++; } @@ -108,7 +95,7 @@ int32_t utf8_length(const utf8* text) /** * Returns a pointer to the null terminator of the given UTF-8 string. */ -utf8* get_string_end(const utf8* text) +utf8* GetStringEnd(const utf8* text) { return const_cast(std::strchr(text, 0)); } @@ -116,7 +103,7 @@ utf8* get_string_end(const utf8* text) /** * Return the number of bytes (including the null terminator) in the given UTF-8 string. */ -size_t get_string_size(const utf8* text) +size_t GetStringSize(const utf8* text) { - return get_string_end(text) - text + 1; + return GetStringEnd(text) - text + 1; } diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index 55ea7f1dca..020265d48d 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -73,7 +73,7 @@ std::vector& GetAwards() return _currentAwards; } -bool award_is_positive(AwardType type) +bool AwardIsPositive(AwardType type) { return AwardPositiveMap[EnumValue(type)]; } @@ -81,7 +81,7 @@ bool award_is_positive(AwardType type) #pragma region Award checks /** More than 1/16 of the total guests must be thinking untidy thoughts. */ -static bool award_is_deserved_most_untidy(int32_t activeAwardTypes) +static bool AwardIsDeservedMostUntidy(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::MostBeautiful)) return false; @@ -111,7 +111,7 @@ static bool award_is_deserved_most_untidy(int32_t activeAwardTypes) } /** More than 1/64 of the total guests must be thinking tidy thoughts and less than 6 guests thinking untidy thoughts. */ -static bool award_is_deserved_most_tidy(int32_t activeAwardTypes) +static bool AwardIsDeservedMostTidy(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::MostUntidy)) return false; @@ -143,7 +143,7 @@ static bool award_is_deserved_most_tidy(int32_t activeAwardTypes) } /** At least 6 open roller coasters. */ -static bool award_is_deserved_best_rollercoasters([[maybe_unused]] int32_t activeAwardTypes) +static bool AwardIsDeservedBestRollercoasters([[maybe_unused]] int32_t activeAwardTypes) { auto rollerCoasters = 0; for (const auto& ride : GetRideManager()) @@ -159,7 +159,7 @@ static bool award_is_deserved_best_rollercoasters([[maybe_unused]] int32_t activ continue; } - if (!ride_entry_has_category(rideEntry, RIDE_CATEGORY_ROLLERCOASTER)) + if (!RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER)) { continue; } @@ -170,7 +170,7 @@ static bool award_is_deserved_best_rollercoasters([[maybe_unused]] int32_t activ } /** Entrance fee is 0.10 less than half of the total ride value. */ -static bool award_is_deserved_best_value(int32_t activeAwardTypes) +static bool AwardIsDeservedBestValue(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::WorstValue)) return false; @@ -191,7 +191,7 @@ static bool award_is_deserved_best_value(int32_t activeAwardTypes) } /** More than 1/128 of the total guests must be thinking scenic thoughts and fewer than 16 untidy thoughts. */ -static bool award_is_deserved_most_beautiful(int32_t activeAwardTypes) +static bool AwardIsDeservedMostBeautiful(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::MostUntidy)) return false; @@ -224,7 +224,7 @@ static bool award_is_deserved_most_beautiful(int32_t activeAwardTypes) } /** Entrance fee is more than total ride value. */ -static bool award_is_deserved_worst_value(int32_t activeAwardTypes) +static bool AwardIsDeservedWorstValue(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::BestValue)) return false; @@ -240,7 +240,7 @@ static bool award_is_deserved_worst_value(int32_t activeAwardTypes) } /** No more than 2 people who think the vandalism is bad and no crashes. */ -static bool award_is_deserved_safest([[maybe_unused]] int32_t activeAwardTypes) +static bool AwardIsDeservedSafest([[maybe_unused]] int32_t activeAwardTypes) { auto peepsWhoDislikeVandalism = 0; for (auto peep : EntityList()) @@ -269,7 +269,7 @@ static bool award_is_deserved_safest([[maybe_unused]] int32_t activeAwardTypes) } /** All staff types, at least 20 staff, one staff per 32 peeps. */ -static bool award_is_deserved_best_staff(int32_t activeAwardTypes) +static bool AwardIsDeservedBestStaff(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::MostUntidy)) return false; @@ -281,7 +281,7 @@ static bool award_is_deserved_best_staff(int32_t activeAwardTypes) } /** At least 7 shops, 4 unique, one shop per 128 guests and no more than 12 hungry guests. */ -static bool award_is_deserved_best_food(int32_t activeAwardTypes) +static bool AwardIsDeservedBestFood(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::WorstFood)) return false; @@ -297,7 +297,7 @@ static bool award_is_deserved_best_food(int32_t activeAwardTypes) continue; shops++; - auto rideEntry = get_ride_entry(ride.subtype); + auto rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry != nullptr) { if (!(shopTypes & EnumToFlag(rideEntry->shop_item[0]))) @@ -326,7 +326,7 @@ static bool award_is_deserved_best_food(int32_t activeAwardTypes) } /** No more than 2 unique shops, less than one shop per 256 guests and more than 15 hungry guests. */ -static bool award_is_deserved_worst_food(int32_t activeAwardTypes) +static bool AwardIsDeservedWorstFood(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::BestFood)) return false; @@ -371,7 +371,7 @@ static bool award_is_deserved_worst_food(int32_t activeAwardTypes) } /** At least 4 toilets, 1 toilet per 128 guests and no more than 16 guests who think they need the toilet. */ -static bool award_is_deserved_best_toilets([[maybe_unused]] int32_t activeAwardTypes) +static bool AwardIsDeservedBestToilets([[maybe_unused]] int32_t activeAwardTypes) { // Count open toilets const auto& rideManager = GetRideManager(); @@ -403,7 +403,7 @@ static bool award_is_deserved_best_toilets([[maybe_unused]] int32_t activeAwardT } /** More than half of the rides have satisfaction <= 6 and park rating <= 650. */ -static bool award_is_deserved_most_disappointing(int32_t activeAwardTypes) +static bool AwardIsDeservedMostDisappointing(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::BestValue)) return false; @@ -415,7 +415,7 @@ static bool award_is_deserved_most_disappointing(int32_t activeAwardTypes) auto disappointingRides = 0; for (const auto& ride : GetRideManager()) { - if (ride_has_ratings(&ride) && ride.popularity != 0xFF) + if (RideHasRatings(ride) && ride.popularity != 0xFF) { countedRides++; if (ride.popularity <= 6) @@ -430,7 +430,7 @@ static bool award_is_deserved_most_disappointing(int32_t activeAwardTypes) } /** At least 6 open water rides. */ -static bool award_is_deserved_best_water_rides([[maybe_unused]] int32_t activeAwardTypes) +static bool AwardIsDeservedBestWaterRides([[maybe_unused]] int32_t activeAwardTypes) { auto waterRides = 0; for (const auto& ride : GetRideManager()) @@ -446,7 +446,7 @@ static bool award_is_deserved_best_water_rides([[maybe_unused]] int32_t activeAw continue; } - if (!ride_entry_has_category(rideEntry, RIDE_CATEGORY_WATER)) + if (!RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_WATER)) { continue; } @@ -458,7 +458,7 @@ static bool award_is_deserved_best_water_rides([[maybe_unused]] int32_t activeAw } /** At least 6 custom designed rides. */ -static bool award_is_deserved_best_custom_designed_rides(int32_t activeAwardTypes) +static bool AwardIsDeservedBestCustomDesignedRides(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::MostDisappointing)) return false; @@ -481,7 +481,7 @@ static bool award_is_deserved_best_custom_designed_rides(int32_t activeAwardType return (customDesignedRides >= 6); } -static bool award_is_deserved_most_dazzling_ride_colours(int32_t activeAwardTypes) +static bool AwardIsDeservedMostDazzlingRideColours(int32_t activeAwardTypes) { /** At least 5 colourful rides and more than half of the rides are colourful. */ static constexpr const colour_t dazzling_ride_colours[] = { @@ -518,7 +518,7 @@ static bool award_is_deserved_most_dazzling_ride_colours(int32_t activeAwardType } /** At least 10 peeps and more than 1/64 of total guests are lost or can't find something. */ -static bool award_is_deserved_most_confusing_layout([[maybe_unused]] int32_t activeAwardTypes) +static bool AwardIsDeservedMostConfusingLayout([[maybe_unused]] int32_t activeAwardTypes) { uint32_t peepsCounted = 0; uint32_t peepsLost = 0; @@ -537,7 +537,7 @@ static bool award_is_deserved_most_confusing_layout([[maybe_unused]] int32_t act } /** At least 10 open gentle rides. */ -static bool award_is_deserved_best_gentle_rides([[maybe_unused]] int32_t activeAwardTypes) +static bool AwardIsDeservedBestGentleRides([[maybe_unused]] int32_t activeAwardTypes) { auto gentleRides = 0; for (const auto& ride : GetRideManager()) @@ -553,7 +553,7 @@ static bool award_is_deserved_best_gentle_rides([[maybe_unused]] int32_t activeA continue; } - if (!ride_entry_has_category(rideEntry, RIDE_CATEGORY_GENTLE)) + if (!RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_GENTLE)) { continue; } @@ -567,33 +567,33 @@ static bool award_is_deserved_best_gentle_rides([[maybe_unused]] int32_t activeA using award_deserved_check = bool (*)(int32_t); static constexpr const award_deserved_check _awardChecks[] = { - award_is_deserved_most_untidy, - award_is_deserved_most_tidy, - award_is_deserved_best_rollercoasters, - award_is_deserved_best_value, - award_is_deserved_most_beautiful, - award_is_deserved_worst_value, - award_is_deserved_safest, - award_is_deserved_best_staff, - award_is_deserved_best_food, - award_is_deserved_worst_food, - award_is_deserved_best_toilets, - award_is_deserved_most_disappointing, - award_is_deserved_best_water_rides, - award_is_deserved_best_custom_designed_rides, - award_is_deserved_most_dazzling_ride_colours, - award_is_deserved_most_confusing_layout, - award_is_deserved_best_gentle_rides, + AwardIsDeservedMostUntidy, + AwardIsDeservedMostTidy, + AwardIsDeservedBestRollercoasters, + AwardIsDeservedBestValue, + AwardIsDeservedMostBeautiful, + AwardIsDeservedWorstValue, + AwardIsDeservedSafest, + AwardIsDeservedBestStaff, + AwardIsDeservedBestFood, + AwardIsDeservedWorstFood, + AwardIsDeservedBestToilets, + AwardIsDeservedMostDisappointing, + AwardIsDeservedBestWaterRides, + AwardIsDeservedBestCustomDesignedRides, + AwardIsDeservedMostDazzlingRideColours, + AwardIsDeservedMostConfusingLayout, + AwardIsDeservedBestGentleRides, }; -static bool award_is_deserved(AwardType awardType, int32_t activeAwardTypes) +static bool AwardIsDeserved(AwardType awardType, int32_t activeAwardTypes) { return _awardChecks[EnumValue(awardType)](activeAwardTypes); } #pragma endregion -void award_reset() +void AwardReset() { _currentAwards.clear(); } @@ -602,10 +602,24 @@ void award_reset() * * rct2: 0x0066A86C */ -void award_update_all() +void AwardUpdateAll() { PROFILED_FUNCTION(); + // Decrease award times + for (auto& award : _currentAwards) + { + --award.Time; + } + // Remove any 0 time awards + auto res = std::remove_if( + std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; }); + if (res != std::end(_currentAwards)) + { + _currentAwards.erase(res, std::end(_currentAwards)); + WindowInvalidateByClass(WindowClass::ParkInformation); + } + // Only add new awards if park is open if (gParkFlags & PARK_FLAGS_PARK_OPEN) { @@ -623,11 +637,11 @@ void award_update_all() AwardType awardType; do { - awardType = static_cast((((scenario_rand() & 0xFF) * EnumValue(AwardType::Count)) >> 8) & 0xFF); + awardType = static_cast((((ScenarioRand() & 0xFF) * EnumValue(AwardType::Count)) >> 8) & 0xFF); } while (activeAwardTypes & (1 << EnumValue(awardType))); // Check if award is deserved - if (award_is_deserved(awardType, activeAwardTypes)) + if (AwardIsDeserved(awardType, activeAwardTypes)) { // Add award _currentAwards.push_back(Award{ 5u, awardType }); @@ -635,23 +649,8 @@ void award_update_all() { News::AddItemToQueue(News::ItemType::Award, AwardNewsStrings[EnumValue(awardType)], 0, {}); } - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } } } - - // Decrease award times - for (auto& award : _currentAwards) - { - --award.Time; - } - - // Remove any 0 time awards - auto res = std::remove_if( - std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; }); - if (res != std::end(_currentAwards)) - { - _currentAwards.erase(res, std::end(_currentAwards)); - window_invalidate_by_class(WindowClass::ParkInformation); - } } diff --git a/src/openrct2/management/Award.h b/src/openrct2/management/Award.h index 926c5c3186..09784535bf 100644 --- a/src/openrct2/management/Award.h +++ b/src/openrct2/management/Award.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -44,6 +44,6 @@ struct Award std::vector& GetAwards(); -bool award_is_positive(AwardType type); -void award_reset(); -void award_update_all(); +bool AwardIsPositive(AwardType type); +void AwardReset(); +void AwardUpdateAll(); diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 9b2cc77aeb..2d5d872510 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,7 +25,7 @@ #include "../world/Park.h" // Monthly research funding costs -const money32 research_cost_table[RESEARCH_FUNDING_COUNT] = { +const money64 research_cost_table[RESEARCH_FUNDING_COUNT] = { 0.00_GBP, // No funding 100.00_GBP, // Minimum funding 200.00_GBP, // Normal funding @@ -55,7 +55,7 @@ money64 gExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT][static_cast(Ex * Checks the condition if the game is required to use money. * @param flags game command flags. */ -bool finance_check_money_required(uint32_t flags) +bool FinanceCheckMoneyRequired(uint32_t flags) { if (gParkFlags & PARK_FLAGS_NO_MONEY) return false; @@ -73,9 +73,9 @@ bool finance_check_money_required(uint32_t flags) * @param cost. * @param flags game command flags. */ -bool finance_check_affordability(money64 cost, uint32_t flags) +bool FinanceCheckAffordability(money64 cost, uint32_t flags) { - return !finance_check_money_required(flags) || cost <= 0 || cost <= gCash; + return !FinanceCheckMoneyRequired(flags) || cost <= 0 || cost <= gCash; } /** @@ -84,10 +84,10 @@ bool finance_check_affordability(money64 cost, uint32_t flags) * @param amount (eax) * @param type passed via global var 0x0141F56C (RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE), our type is that var/4. */ -void finance_payment(money64 amount, ExpenditureType type) +void FinancePayment(money64 amount, ExpenditureType type) { // overflow check - gCash = add_clamp_money64(gCash, -amount); + gCash = AddClamp_money64(gCash, -amount); gExpenditureTable[0][static_cast(type)] -= amount; if (dword_988E60[static_cast(type)] & 1) @@ -104,7 +104,7 @@ void finance_payment(money64 amount, ExpenditureType type) * Pays the wages of all active staff members in the park. * rct2: 0x006C18A9 */ -void finance_pay_wages() +void FinancePayWages() { PROFILED_FUNCTION(); @@ -115,7 +115,7 @@ void finance_pay_wages() for (auto peep : EntityList()) { - finance_payment(GetStaffWage(peep->AssignedStaffType) / 4, ExpenditureType::Wages); + FinancePayment(GetStaffWage(peep->AssignedStaffType) / 4, ExpenditureType::Wages); } } @@ -123,7 +123,7 @@ void finance_pay_wages() * Pays the current research level's cost. * rct2: 0x00684DA5 **/ -void finance_pay_research() +void FinancePayResearch() { if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -131,14 +131,14 @@ void finance_pay_research() } const uint8_t level = gResearchFundingLevel; - finance_payment(research_cost_table[level] / 4, ExpenditureType::Research); + FinancePayment(research_cost_table[level] / 4, ExpenditureType::Research); } /** * Pay interest on current loans. * rct2: 0x0069E092 */ -void finance_pay_interest() +void FinancePayInterest() { if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -146,19 +146,20 @@ void finance_pay_interest() } // This variable uses the 64-bit type as the computation below can involve multiplying very large numbers - // that will overflow money32 if the loan is greater than (1 << 31) / (5 * current_interest_rate) + // that will overflow money64 if the loan is greater than (1 << 31) / (5 * current_interest_rate) const money64 current_loan = gBankLoan; - const uint8_t current_interest_rate = gBankLoanInterestRate; - const money32 interest_to_pay = (current_loan * 5 * current_interest_rate) >> 14; + const auto current_interest_rate = gBankLoanInterestRate; + const money64 interest_to_pay = (gParkFlags & PARK_FLAGS_RCT1_INTEREST) ? (current_loan / 2400) + : (current_loan * 5 * current_interest_rate) >> 14; - finance_payment(interest_to_pay, ExpenditureType::Interest); + FinancePayment(interest_to_pay, ExpenditureType::Interest); } /** * * rct2: 0x006AC885 */ -void finance_pay_ride_upkeep() +void FinancePayRideUpkeep() { PROFILED_FUNCTION(); @@ -171,12 +172,12 @@ void finance_pay_ride_upkeep() if (ride.status != RideStatus::Closed && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { - int16_t upkeep = ride.upkeep_cost; - if (upkeep != -1) + auto upkeep = ride.upkeep_cost; + if (upkeep != MONEY64_UNDEFINED) { ride.total_profit -= upkeep; ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - finance_payment(upkeep, ExpenditureType::RideRunningCosts); + FinancePayment(upkeep, ExpenditureType::RideRunningCosts); } } @@ -187,7 +188,7 @@ void finance_pay_ride_upkeep() } } -void finance_reset_history() +void FinanceResetHistory() { for (int32_t i = 0; i < FINANCE_GRAPH_SIZE; i++) { @@ -195,13 +196,21 @@ void finance_reset_history() gWeeklyProfitHistory[i] = MONEY64_UNDEFINED; gParkValueHistory[i] = MONEY64_UNDEFINED; } + + for (uint32_t i = 0; i < EXPENDITURE_TABLE_MONTH_COUNT; ++i) + { + for (uint32_t j = 0; j < static_cast(ExpenditureType::Count); ++j) + { + gExpenditureTable[i][j] = 0; + } + } } /** * * rct2: 0x0069DEFB */ -void finance_init() +void FinanceInit() { // It only initialises the first month for (uint32_t i = 0; i < static_cast(ExpenditureType::Count); i++) @@ -236,14 +245,14 @@ void finance_init() * * rct2: 0x0069E79A */ -void finance_update_daily_profit() +void FinanceUpdateDailyProfit() { PROFILED_FUNCTION(); gCurrentProfit = 7 * gCurrentExpenditure; gCurrentExpenditure = 0; // Reset daily expenditure - money32 current_profit = 0; + money64 current_profit = 0; if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { @@ -258,13 +267,13 @@ void finance_update_daily_profit() current_profit -= research_cost_table[level]; // Loan costs - money32 current_loan = gBankLoan; + auto current_loan = gBankLoan; current_profit -= current_loan / 600; // Ride costs for (auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Closed && ride.upkeep_cost != MONEY16_UNDEFINED) + if (ride.status != RideStatus::Closed && ride.upkeep_cost != MONEY64_UNDEFINED) { current_profit -= 2 * ride.upkeep_cost; } @@ -280,25 +289,25 @@ void finance_update_daily_profit() gWeeklyProfitAverageDividend += gCurrentProfit; gWeeklyProfitAverageDivisor += 1; - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); } -money64 finance_get_initial_cash() +money64 FinanceGetInitialCash() { return gInitialCash; } -money64 finance_get_current_loan() +money64 FinanceGetCurrentLoan() { return gBankLoan; } -money64 finance_get_maximum_loan() +money64 FinanceGetMaximumLoan() { return gMaxBankLoan; } -money64 finance_get_current_cash() +money64 FinanceGetCurrentCash() { return gCash; } @@ -308,7 +317,7 @@ money64 finance_get_current_cash() * If the table is full, accumulate the sum of the oldest month first * rct2: 0x0069DEAD */ -void finance_shift_expenditure_table() +void FinanceShiftExpenditureTable() { // If EXPENDITURE_TABLE_MONTH_COUNT months have passed then is full, sum the oldest month if (gDateMonthsElapsed >= EXPENDITURE_TABLE_MONTH_COUNT) @@ -336,14 +345,14 @@ void finance_shift_expenditure_table() gExpenditureTable[0][i] = 0; } - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); } /** * * rct2: 0x0069E89B */ -void finance_reset_cash_to_initial() +void FinanceResetCashToInitial() { gCash = gInitialCash; } @@ -351,7 +360,7 @@ void finance_reset_cash_to_initial() /** * Gets the last month's profit from food, drink and merchandise. */ -money64 finance_get_last_month_shop_profit() +money64 FinanceGetLastMonthShopProfit() { money64 profit = 0; if (gDateMonthsElapsed != 0) diff --git a/src/openrct2/management/Finance.h b/src/openrct2/management/Finance.h index f0f9d8df79..1473c35846 100644 --- a/src/openrct2/management/Finance.h +++ b/src/openrct2/management/Finance.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,7 +36,7 @@ enum class ExpenditureType : int32_t constexpr const uint8_t MaxBankLoanInterestRate = 255; -extern const money32 research_cost_table[RESEARCH_FUNDING_COUNT]; +extern const money64 research_cost_table[RESEARCH_FUNDING_COUNT]; extern money64 gInitialCash; extern money64 gCash; @@ -59,22 +59,22 @@ extern money64 gWeeklyProfitHistory[FINANCE_GRAPH_SIZE]; extern money64 gParkValueHistory[FINANCE_GRAPH_SIZE]; extern money64 gExpenditureTable[EXPENDITURE_TABLE_MONTH_COUNT][static_cast(ExpenditureType::Count)]; -bool finance_check_money_required(uint32_t flags); -bool finance_check_affordability(money64 cost, uint32_t flags); -void finance_payment(money64 amount, ExpenditureType type); -void finance_pay_wages(); -void finance_pay_research(); -void finance_pay_interest(); -void finance_pay_ride_upkeep(); -void finance_reset_history(); -void finance_init(); -void finance_update_daily_profit(); -void finance_shift_expenditure_table(); -void finance_reset_cash_to_initial(); +bool FinanceCheckMoneyRequired(uint32_t flags); +bool FinanceCheckAffordability(money64 cost, uint32_t flags); +void FinancePayment(money64 amount, ExpenditureType type); +void FinancePayWages(); +void FinancePayResearch(); +void FinancePayInterest(); +void FinancePayRideUpkeep(); +void FinanceResetHistory(); +void FinanceInit(); +void FinanceUpdateDailyProfit(); +void FinanceShiftExpenditureTable(); +void FinanceResetCashToInitial(); -money64 finance_get_initial_cash(); -money64 finance_get_current_loan(); -money64 finance_get_maximum_loan(); -money64 finance_get_current_cash(); +money64 FinanceGetInitialCash(); +money64 FinanceGetCurrentLoan(); +money64 FinanceGetMaximumLoan(); +money64 FinanceGetCurrentCash(); -money64 finance_get_last_month_shop_profit(); +money64 FinanceGetLastMonthShopProfit(); diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 215cc5037a..19dbfe4af9 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ #include "Finance.h" #include "NewsItem.h" -const money16 AdvertisingCampaignPricePerWeek[] = { +const money64 AdvertisingCampaignPricePerWeek[] = { 50.00_GBP, // PARK_ENTRY_FREE 50.00_GBP, // RIDE_FREE 50.00_GBP, // PARK_ENTRY_HALF_PRICE @@ -39,9 +39,9 @@ static constexpr const uint16_t AdvertisingCampaignGuestGenerationProbabilities[ std::vector gMarketingCampaigns; -uint16_t marketing_get_campaign_guest_generation_probability(int32_t campaignType) +uint16_t MarketingGetCampaignGuestGenerationProbability(int32_t campaignType) { - auto campaign = marketing_get_campaign(campaignType); + auto campaign = MarketingGetCampaign(campaignType); if (campaign == nullptr) return 0; @@ -59,7 +59,7 @@ uint16_t marketing_get_campaign_guest_generation_probability(int32_t campaignTyp break; case ADVERTISING_CAMPAIGN_RIDE_FREE: { - auto ride = get_ride(campaign->RideId); + auto ride = GetRide(campaign->RideId); if (ride == nullptr || ride->price[0] < 0.30_GBP) probability /= 8; break; @@ -69,7 +69,7 @@ uint16_t marketing_get_campaign_guest_generation_probability(int32_t campaignTyp return probability; } -static void marketing_raise_finished_notification(const MarketingCampaign& campaign) +static void MarketingRaiseFinishedNotification(const MarketingCampaign& campaign) { if (gConfigNotifications.ParkMarketingCampaignFinished) { @@ -77,7 +77,7 @@ static void marketing_raise_finished_notification(const MarketingCampaign& campa // This sets the string parameters for the marketing types that have an argument. if (campaign.Type == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign.Type == ADVERTISING_CAMPAIGN_RIDE) { - auto ride = get_ride(campaign.RideId); + auto ride = GetRide(campaign.RideId); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -96,7 +96,7 @@ static void marketing_raise_finished_notification(const MarketingCampaign& campa * Update status of marketing campaigns and send produce a news item when they have finished. * rct2: 0x0069E0C1 */ -void marketing_update() +void MarketingUpdate() { PROFILED_FUNCTION(); @@ -119,7 +119,7 @@ void marketing_update() if (campaign.WeeksLeft == 0) { - marketing_raise_finished_notification(campaign); + MarketingRaiseFinishedNotification(campaign); it = gMarketingCampaigns.erase(it); } else @@ -128,12 +128,12 @@ void marketing_update() } } - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); } -void marketing_set_guest_campaign(Guest* peep, int32_t campaignType) +void MarketingSetGuestCampaign(Guest* peep, int32_t campaignType) { - auto campaign = marketing_get_campaign(campaignType); + auto campaign = MarketingGetCampaign(campaignType); if (campaign == nullptr) return; @@ -168,7 +168,7 @@ void marketing_set_guest_campaign(Guest* peep, int32_t campaignType) } } -bool marketing_is_campaign_type_applicable(int32_t campaignType) +bool MarketingIsCampaignTypeApplicable(int32_t campaignType) { switch (campaignType) { @@ -217,7 +217,7 @@ bool marketing_is_campaign_type_applicable(int32_t campaignType) } } -MarketingCampaign* marketing_get_campaign(int32_t campaignType) +MarketingCampaign* MarketingGetCampaign(int32_t campaignType) { for (auto& campaign : gMarketingCampaigns) { @@ -229,10 +229,10 @@ MarketingCampaign* marketing_get_campaign(int32_t campaignType) return nullptr; } -void marketing_new_campaign(const MarketingCampaign& campaign) +void MarketingNewCampaign(const MarketingCampaign& campaign) { // Do not allow same campaign twice, just overwrite - auto currentCampaign = marketing_get_campaign(campaign.Type); + auto currentCampaign = MarketingGetCampaign(campaign.Type); if (currentCampaign != nullptr) { *currentCampaign = campaign; diff --git a/src/openrct2/management/Marketing.h b/src/openrct2/management/Marketing.h index 9132788b5c..a18fc2c40f 100644 --- a/src/openrct2/management/Marketing.h +++ b/src/openrct2/management/Marketing.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,13 +60,13 @@ namespace MarketingCampaignFlags constexpr uint8_t FIRST_WEEK = 1 << 0; } -extern const money16 AdvertisingCampaignPricePerWeek[ADVERTISING_CAMPAIGN_COUNT]; +extern const money64 AdvertisingCampaignPricePerWeek[ADVERTISING_CAMPAIGN_COUNT]; extern std::vector gMarketingCampaigns; -uint16_t marketing_get_campaign_guest_generation_probability(int32_t campaign); -void marketing_update(); -void marketing_set_guest_campaign(Guest* peep, int32_t campaign); -bool marketing_is_campaign_type_applicable(int32_t campaignType); -MarketingCampaign* marketing_get_campaign(int32_t campaignType); -void marketing_new_campaign(const MarketingCampaign& campaign); +uint16_t MarketingGetCampaignGuestGenerationProbability(int32_t campaign); +void MarketingUpdate(); +void MarketingSetGuestCampaign(Guest* peep, int32_t campaign); +bool MarketingIsCampaignTypeApplicable(int32_t campaignType); +MarketingCampaign* MarketingGetCampaign(int32_t campaignType); +void MarketingNewCampaign(const MarketingCampaign& campaign); void MarketingCancelCampaignsForRide(const RideId rideId); diff --git a/src/openrct2/management/NewsItem.cpp b/src/openrct2/management/NewsItem.cpp index 52ec2c704e..0e6d3ec3d4 100644 --- a/src/openrct2/management/NewsItem.cpp +++ b/src/openrct2/management/NewsItem.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,6 +19,7 @@ #include "../interface/Window_internal.h" #include "../localisation/Date.h" #include "../localisation/Formatter.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../management/Research.h" #include "../profiling/Profiling.h" @@ -44,7 +45,7 @@ bool News::IsValidIndex(int32_t index) { if (index >= News::MaxItems) { - log_error("Tried to get news item past MAX_NEWS."); + LOG_ERROR("Tried to get news item past MAX_NEWS."); return false; } return true; @@ -189,7 +190,7 @@ void News::ItemQueues::ArchiveCurrent() Archived.push_back(Current()); // Invalidate the news window - window_invalidate_by_class(WindowClass::RecentNews); + WindowInvalidateByClass(WindowClass::RecentNews); // Dequeue the current news item, shift news up Recent.pop_front(); @@ -213,7 +214,7 @@ std::optional News::GetSubjectLocation(News::ItemType type, int32_t s { case News::ItemType::Ride: { - Ride* ride = get_ride(RideId::FromUnderlying(subject)); + Ride* ride = GetRide(RideId::FromUnderlying(subject)); if (ride == nullptr || ride->overall_view.IsNull()) { break; @@ -239,7 +240,7 @@ std::optional News::GetSubjectLocation(News::ItemType type, int32_t s } // Find which ride peep is on - Ride* ride = get_ride(peep->CurrentRide); + Ride* ride = GetRide(peep->CurrentRide); if (ride == nullptr || !(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) { subjectLoc = std::nullopt; @@ -310,7 +311,7 @@ News::Item* News::AddItemToQueue(News::ItemType type, StringId string_id, uint32 utf8 buffer[256]; // overflows possible? - format_string(buffer, 256, string_id, formatter.Data()); + OpenRCT2::FormatStringLegacy(buffer, 256, string_id, formatter.Data()); return News::AddItemToQueue(type, buffer, assoc); } @@ -328,7 +329,7 @@ News::Item* News::AddItemToQueue(News::ItemType type, const utf8* text, uint32_t newsItem->Assoc = assoc; // Make optional for Award, Money, Graph and Null newsItem->Ticks = 0; newsItem->MonthYear = static_cast(gDateMonthsElapsed); - newsItem->Day = ((days_in_month[date_get_month(newsItem->MonthYear)] * gDateMonthTicks) >> 16) + 1; + newsItem->Day = ((days_in_month[DateGetMonth(newsItem->MonthYear)] * gDateMonthTicks) >> 16) + 1; newsItem->Text = text; return newsItem; @@ -366,7 +367,7 @@ void News::OpenSubject(News::ItemType type, int32_t subject) case News::ItemType::Ride: { auto intent = Intent(WindowClass::Ride); - intent.putExtra(INTENT_EXTRA_RIDE_ID, subject); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, subject); ContextOpenIntent(&intent); break; } @@ -377,7 +378,7 @@ void News::OpenSubject(News::ItemType type, int32_t subject) if (peep != nullptr) { auto intent = Intent(WindowClass::Peep); - intent.putExtra(INTENT_EXTRA_PEEP, peep); + intent.PutExtra(INTENT_EXTRA_PEEP, peep); ContextOpenIntent(&intent); } break; @@ -394,22 +395,22 @@ void News::OpenSubject(News::ItemType type, int32_t subject) if (item.type == Research::EntryType::Ride) { auto intent = Intent(INTENT_ACTION_NEW_RIDE_OF_TYPE); - intent.putExtra(INTENT_EXTRA_RIDE_TYPE, item.baseRideType); - intent.putExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, item.entryIndex); + intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, item.baseRideType); + intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, item.entryIndex); ContextOpenIntent(&intent); break; } auto intent = Intent(INTENT_ACTION_NEW_SCENERY); - intent.putExtra(INTENT_EXTRA_SCENERY_GROUP_ENTRY_INDEX, item.entryIndex); + intent.PutExtra(INTENT_EXTRA_SCENERY_GROUP_ENTRY_INDEX, item.entryIndex); ContextOpenIntent(&intent); break; } case News::ItemType::Peeps: { auto intent = Intent(WindowClass::GuestList); - intent.putExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsThinkingX)); - intent.putExtra(INTENT_EXTRA_RIDE_ID, subject); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsThinkingX)); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, subject); ContextOpenIntent(&intent); break; } @@ -449,7 +450,7 @@ void News::DisableNewsItems(News::ItemType type, uint32_t assoc) if (type == newsItem.Type && assoc == newsItem.Assoc) { newsItem.SetFlags(News::ItemFlags::HasButton); - window_invalidate_by_class(WindowClass::RecentNews); + WindowInvalidateByClass(WindowClass::RecentNews); } }); } diff --git a/src/openrct2/management/NewsItem.h b/src/openrct2/management/NewsItem.h index c07e438b4d..105e34f416 100644 --- a/src/openrct2/management/NewsItem.h +++ b/src/openrct2/management/NewsItem.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index a4ec99ea11..229cecb9e2 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,8 +21,10 @@ #include "../localisation/Formatter.h" #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectList.h" #include "../object/RideObject.h" +#include "../object/SceneryGroupEntry.h" #include "../profiling/Profiling.h" #include "../ride/Ride.h" #include "../ride/RideData.h" @@ -72,7 +74,7 @@ bool gSilentResearch = false; * * rct2: 0x006671AD, part of 0x00667132 */ -void research_reset_items() +void ResearchResetItems() { gResearchItemsUninvented.clear(); gResearchItemsInvented.clear(); @@ -98,7 +100,7 @@ void ResearchUpdateUncompletedTypes() * * rct2: 0x00684D2A */ -static void research_calculate_expected_date() +static void ResearchCalculateExpectedDate() { if (gResearchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || gResearchFundingLevel == RESEARCH_FUNDING_NONE) { @@ -114,7 +116,7 @@ static void research_calculate_expected_date() int32_t dayQuotient = expectedDay / 0x10000; int32_t dayRemainder = expectedDay % 0x10000; - int32_t expectedMonth = date_get_month(gDateMonthsElapsed + dayQuotient + (daysRemaining >> 16)); + int32_t expectedMonth = DateGetMonth(gDateMonthsElapsed + dayQuotient + (daysRemaining >> 16)); expectedDay = (dayRemainder * days_in_month[expectedMonth]) >> 16; gResearchExpectedDay = expectedDay; @@ -122,17 +124,17 @@ static void research_calculate_expected_date() } } -static void research_invalidate_related_windows() +static void ResearchInvalidateRelatedWindows() { - window_invalidate_by_class(WindowClass::ConstructRide); - window_invalidate_by_class(WindowClass::Research); + WindowInvalidateByClass(WindowClass::ConstructRide); + WindowInvalidateByClass(WindowClass::Research); } -static void research_mark_as_fully_completed() +static void ResearchMarkAsFullyCompleted() { gResearchProgress = 0; gResearchProgressStage = RESEARCH_STAGE_FINISHED_ALL; - research_invalidate_related_windows(); + ResearchInvalidateRelatedWindows(); // Reset funding to 0 if no more rides. auto gameAction = ParkSetResearchFundingAction(gResearchPriorities, 0); GameActions::Execute(&gameAction); @@ -142,78 +144,61 @@ static void research_mark_as_fully_completed() * * rct2: 0x00684BE5 */ -static void research_next_design() +static void ResearchNextDesign() { if (gResearchItemsUninvented.empty()) { - research_mark_as_fully_completed(); + ResearchMarkAsFullyCompleted(); return; } - ResearchItem researchItem; - - bool ignoreActiveResearchTypes = false; - auto it = gResearchItemsUninvented.begin(); - for (;;) + // Try to find a research item of a matching type, if none found, use any first item + auto it = std::find_if(gResearchItemsUninvented.begin(), gResearchItemsUninvented.end(), [](const auto& e) { + return (gResearchPriorities & EnumToFlag(e.category)) != 0; + }); + if (it == gResearchItemsUninvented.end()) { - researchItem = *it; - if (it == gResearchItemsUninvented.end()) - { - if (!ignoreActiveResearchTypes) - { - ignoreActiveResearchTypes = true; - it = gResearchItemsUninvented.begin(); - continue; - } - - research_mark_as_fully_completed(); - return; - } - - if (ignoreActiveResearchTypes || (gResearchPriorities & EnumToFlag(researchItem.category))) - { - break; - } - it++; + it = gResearchItemsUninvented.begin(); } + const ResearchItem researchItem = *it; gResearchNextItem = researchItem; gResearchProgress = 0; gResearchProgressStage = RESEARCH_STAGE_DESIGNING; gResearchItemsUninvented.erase(it); - gResearchItemsInvented.push_back(std::move(researchItem)); + gResearchItemsInvented.push_back(researchItem); - research_invalidate_related_windows(); + ResearchInvalidateRelatedWindows(); } /** * * rct2: 0x006848D4 */ -void research_finish_item(ResearchItem* researchItem) +void ResearchFinishItem(const ResearchItem& researchItem) { - gResearchLastItem = *researchItem; - research_invalidate_related_windows(); + gResearchLastItem = researchItem; + ResearchInvalidateRelatedWindows(); - if (researchItem->type == Research::EntryType::Ride) + if (researchItem.type == Research::EntryType::Ride) { // Ride - auto base_ride_type = researchItem->baseRideType; - ObjectEntryIndex rideEntryIndex = researchItem->entryIndex; - rct_ride_entry* rideEntry = get_ride_entry(rideEntryIndex); + auto base_ride_type = researchItem.baseRideType; + ObjectEntryIndex rideEntryIndex = researchItem.entryIndex; + const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry != nullptr && base_ride_type != RIDE_TYPE_NULL) { if (!RideTypeIsValid(base_ride_type)) { - log_warning("Invalid ride type: %d", base_ride_type); + LOG_WARNING("Invalid ride type: %d", base_ride_type); base_ride_type = rideEntry->GetFirstNonNullRideType(); } StringId availabilityString; - ride_type_set_invented(base_ride_type); - ride_entry_set_invented(rideEntryIndex); + RideTypeSetInvented(base_ride_type); + RideEntrySetInvented(rideEntryIndex); bool seenRideEntry[MAX_RIDE_OBJECTS]{}; for (auto const& researchItem3 : gResearchItemsUninvented) @@ -233,14 +218,14 @@ void research_finish_item(ResearchItem* researchItem) { if (!seenRideEntry[i]) { - rct_ride_entry* rideEntry2 = get_ride_entry(i); + const auto* rideEntry2 = GetRideEntryByIndex(i); if (rideEntry2 != nullptr) { for (uint8_t j = 0; j < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; j++) { if (rideEntry2->ride_type[j] == base_ride_type) { - ride_entry_set_invented(i); + RideEntrySetInvented(i); break; } } @@ -253,9 +238,9 @@ void research_finish_item(ResearchItem* researchItem) // If a vehicle is the first to be invented for its ride type, show the ride type/group name. // Independently listed vehicles (like all flat rides and shops) should always be announced as such. if (GetRideTypeDescriptor(base_ride_type).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY) - || researchItem->flags & RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE) + || researchItem.flags & RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE) { - RideNaming naming = get_ride_naming(base_ride_type, rideEntry); + RideNaming naming = GetRideNaming(base_ride_type, *rideEntry); availabilityString = STR_NEWS_ITEM_RESEARCH_NEW_RIDE_AVAILABLE; ft.Add(naming.Name); } @@ -264,7 +249,7 @@ void research_finish_item(ResearchItem* researchItem) else { availabilityString = STR_NEWS_ITEM_RESEARCH_NEW_VEHICLE_AVAILABLE; - RideNaming baseRideNaming = get_ride_naming(base_ride_type, rideEntry); + RideNaming baseRideNaming = GetRideNaming(base_ride_type, *rideEntry); ft.Add(baseRideNaming.Name); ft.Add(rideEntry->naming.Name); @@ -274,20 +259,20 @@ void research_finish_item(ResearchItem* researchItem) { if (gConfigNotifications.RideResearched) { - News::AddItemToQueue(News::ItemType::Research, availabilityString, researchItem->rawValue, ft); + News::AddItemToQueue(News::ItemType::Research, availabilityString, researchItem.rawValue, ft); } } - research_invalidate_related_windows(); + ResearchInvalidateRelatedWindows(); } } else { // Scenery - rct_scenery_group_entry* sceneryGroupEntry = GetSceneryGroupEntry(researchItem->entryIndex); + const auto* sceneryGroupEntry = OpenRCT2::ObjectManager::GetObjectEntry(researchItem.entryIndex); if (sceneryGroupEntry != nullptr) { - scenery_group_set_invented(researchItem->entryIndex); + SceneryGroupSetInvented(researchItem.entryIndex); Formatter ft; ft.Add(sceneryGroupEntry->name); @@ -297,11 +282,11 @@ void research_finish_item(ResearchItem* researchItem) if (gConfigNotifications.RideResearched) { News::AddItemToQueue( - News::ItemType::Research, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, researchItem->rawValue, ft); + News::ItemType::Research, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, researchItem.rawValue, ft); } } - research_invalidate_related_windows(); + ResearchInvalidateRelatedWindows(); SceneryInit(); } } @@ -311,7 +296,7 @@ void research_finish_item(ResearchItem* researchItem) * * rct2: 0x00684C7A */ -void research_update() +void ResearchUpdate() { PROFILED_FUNCTION(); @@ -348,22 +333,22 @@ void research_update() switch (gResearchProgressStage) { case RESEARCH_STAGE_INITIAL_RESEARCH: - research_next_design(); - research_calculate_expected_date(); + ResearchNextDesign(); + ResearchCalculateExpectedDate(); break; case RESEARCH_STAGE_DESIGNING: gResearchProgress = 0; gResearchProgressStage = RESEARCH_STAGE_COMPLETING_DESIGN; - research_calculate_expected_date(); - research_invalidate_related_windows(); + ResearchCalculateExpectedDate(); + ResearchInvalidateRelatedWindows(); break; case RESEARCH_STAGE_COMPLETING_DESIGN: - research_finish_item(&*gResearchNextItem); + ResearchFinishItem(*gResearchNextItem); gResearchProgress = 0; gResearchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; - research_calculate_expected_date(); + ResearchCalculateExpectedDate(); ResearchUpdateUncompletedTypes(); - research_invalidate_related_windows(); + ResearchInvalidateRelatedWindows(); break; case RESEARCH_STAGE_FINISHED_ALL: gResearchFundingLevel = RESEARCH_FUNDING_NONE; @@ -376,18 +361,18 @@ void research_update() * * rct2: 0x00684AC3 */ -void research_reset_current_item() +void ResearchResetCurrentItem() { - set_every_ride_type_not_invented(); - set_every_ride_entry_not_invented(); + SetEveryRideTypeNotInvented(); + SetEveryRideEntryNotInvented(); // The following two instructions together make all items not tied to a scenery group available. - set_all_scenery_items_invented(); - set_all_scenery_groups_not_invented(); + SetAllSceneryItemsInvented(); + SetAllSceneryGroupsNotInvented(); - for (auto& researchItem : gResearchItemsInvented) + for (const auto& researchItem : gResearchItemsInvented) { - research_finish_item(&researchItem); + ResearchFinishItem(researchItem); } gResearchLastItem = std::nullopt; @@ -399,7 +384,7 @@ void research_reset_current_item() * * rct2: 0x006857FA */ -static void research_insert_unresearched(ResearchItem&& item) +static void ResearchInsertUnresearched(ResearchItem&& item) { // First check to make sure that entry is not already accounted for if (item.Exists()) @@ -414,7 +399,7 @@ static void research_insert_unresearched(ResearchItem&& item) * * rct2: 0x00685826 */ -static void research_insert_researched(ResearchItem&& item) +static void ResearchInsertResearched(ResearchItem&& item) { // First check to make sure that entry is not already accounted for if (item.Exists()) @@ -431,35 +416,22 @@ static void research_insert_researched(ResearchItem&& item) */ void ResearchRemove(const ResearchItem& researchItem) { - for (auto it = gResearchItemsUninvented.begin(); it != gResearchItemsUninvented.end(); it++) - { - auto& researchItem2 = *it; - if (researchItem2 == researchItem) - { - gResearchItemsUninvented.erase(it); - return; - } - } - for (auto it = gResearchItemsInvented.begin(); it != gResearchItemsInvented.end(); it++) - { - auto& researchItem2 = *it; - if (researchItem2 == researchItem) - { - gResearchItemsInvented.erase(it); - return; - } - } + gResearchItemsUninvented.erase( + std::remove(gResearchItemsUninvented.begin(), gResearchItemsUninvented.end(), researchItem), + gResearchItemsUninvented.end()); + gResearchItemsInvented.erase( + std::remove(gResearchItemsInvented.begin(), gResearchItemsInvented.end(), researchItem), gResearchItemsInvented.end()); } -void research_insert(ResearchItem&& item, bool researched) +void ResearchInsert(ResearchItem&& item, bool researched) { if (researched) { - research_insert_researched(std::move(item)); + ResearchInsertResearched(std::move(item)); } else { - research_insert_unresearched(std::move(item)); + ResearchInsertUnresearched(std::move(item)); } } @@ -467,26 +439,26 @@ void research_insert(ResearchItem&& item, bool researched) * * rct2: 0x00685675 */ -void research_populate_list_random() +void ResearchPopulateListRandom() { - research_reset_items(); + ResearchResetItems(); // Rides for (int32_t i = 0; i < MAX_RIDE_OBJECTS; i++) { - rct_ride_entry* rideEntry = get_ride_entry(i); + const auto* rideEntry = GetRideEntryByIndex(i); if (rideEntry == nullptr) { continue; } - int32_t researched = (scenario_rand() & 0xFF) > 128; + int32_t researched = (ScenarioRand() & 0xFF) > 128; for (auto rideType : rideEntry->ride_type) { if (rideType != RIDE_TYPE_NULL) { ResearchCategory category = GetRideTypeDescriptor(rideType).GetResearchCategory(); - research_insert_ride_entry(rideType, i, category, researched); + ResearchInsertRideEntry(rideType, i, category, researched); } } } @@ -494,32 +466,32 @@ void research_populate_list_random() // Scenery for (uint32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { - rct_scenery_group_entry* sceneryGroupEntry = GetSceneryGroupEntry(i); + const auto* sceneryGroupEntry = OpenRCT2::ObjectManager::GetObjectEntry(i); if (sceneryGroupEntry == nullptr) { continue; } - int32_t researched = (scenario_rand() & 0xFF) > 85; - research_insert_scenery_group_entry(i, researched); + int32_t researched = (ScenarioRand() & 0xFF) > 85; + ResearchInsertSceneryGroupEntry(i, researched); } } -bool research_insert_ride_entry(ride_type_t rideType, ObjectEntryIndex entryIndex, ResearchCategory category, bool researched) +bool ResearchInsertRideEntry(ride_type_t rideType, ObjectEntryIndex entryIndex, ResearchCategory category, bool researched) { if (rideType != RIDE_TYPE_NULL && entryIndex != OBJECT_ENTRY_INDEX_NULL) { auto tmpItem = ResearchItem(Research::EntryType::Ride, entryIndex, rideType, category, 0); - research_insert(std::move(tmpItem), researched); + ResearchInsert(std::move(tmpItem), researched); return true; } return false; } -void research_insert_ride_entry(ObjectEntryIndex entryIndex, bool researched) +void ResearchInsertRideEntry(ObjectEntryIndex entryIndex, bool researched) { - rct_ride_entry* rideEntry = get_ride_entry(entryIndex); + const auto* rideEntry = GetRideEntryByIndex(entryIndex); if (rideEntry == nullptr) return; @@ -528,28 +500,28 @@ void research_insert_ride_entry(ObjectEntryIndex entryIndex, bool researched) if (rideType != RIDE_TYPE_NULL) { ResearchCategory category = GetRideTypeDescriptor(rideType).GetResearchCategory(); - research_insert_ride_entry(rideType, entryIndex, category, researched); + ResearchInsertRideEntry(rideType, entryIndex, category, researched); } } } -bool research_insert_scenery_group_entry(ObjectEntryIndex entryIndex, bool researched) +bool ResearchInsertSceneryGroupEntry(ObjectEntryIndex entryIndex, bool researched) { if (entryIndex != OBJECT_ENTRY_INDEX_NULL) { auto tmpItem = ResearchItem(Research::EntryType::Scenery, entryIndex, 0, ResearchCategory::SceneryGroup, 0); - research_insert(std::move(tmpItem), researched); + ResearchInsert(std::move(tmpItem), researched); return true; } return false; } -bool ride_type_is_invented(uint32_t rideType) +bool RideTypeIsInvented(uint32_t rideType) { return RideTypeIsValid(rideType) ? _researchedRideTypes[rideType] : false; } -bool ride_entry_is_invented(ObjectEntryIndex rideEntryIndex) +bool RideEntryIsInvented(ObjectEntryIndex rideEntryIndex) { if (rideEntryIndex >= std::size(_researchedRideEntries)) return false; @@ -557,7 +529,7 @@ bool ride_entry_is_invented(ObjectEntryIndex rideEntryIndex) return _researchedRideEntries[rideEntryIndex]; } -void ride_type_set_invented(uint32_t rideType) +void RideTypeSetInvented(uint32_t rideType) { if (RideTypeIsValid(rideType)) { @@ -565,26 +537,26 @@ void ride_type_set_invented(uint32_t rideType) } } -void ride_entry_set_invented(ObjectEntryIndex rideEntryIndex) +void RideEntrySetInvented(ObjectEntryIndex rideEntryIndex) { if (rideEntryIndex >= std::size(_researchedRideEntries)) - log_error("Tried setting ride entry %u as invented", rideEntryIndex); + LOG_ERROR("Tried setting ride entry %u as invented", rideEntryIndex); else _researchedRideEntries[rideEntryIndex] = true; } -bool scenery_is_invented(const ScenerySelection& sceneryItem) +bool SceneryIsInvented(const ScenerySelection& sceneryItem) { if (sceneryItem.SceneryType < SCENERY_TYPE_COUNT) { return _researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex]; } - log_warning("Invalid Scenery Type"); + LOG_WARNING("Invalid Scenery Type"); return false; } -void scenery_set_invented(const ScenerySelection& sceneryItem) +void ScenerySetInvented(const ScenerySelection& sceneryItem) { if (sceneryItem.SceneryType < SCENERY_TYPE_COUNT) { @@ -592,11 +564,11 @@ void scenery_set_invented(const ScenerySelection& sceneryItem) } else { - log_warning("Invalid Scenery Type"); + LOG_WARNING("Invalid Scenery Type"); } } -void scenery_set_not_invented(const ScenerySelection& sceneryItem) +void ScenerySetNotInvented(const ScenerySelection& sceneryItem) { if (sceneryItem.SceneryType < SCENERY_TYPE_COUNT) { @@ -604,13 +576,13 @@ void scenery_set_not_invented(const ScenerySelection& sceneryItem) } else { - log_warning("Invalid Scenery Type"); + LOG_WARNING("Invalid Scenery Type"); } } -bool scenery_group_is_invented(int32_t sgIndex) +bool SceneryGroupIsInvented(int32_t sgIndex) { - const auto sgEntry = GetSceneryGroupEntry(sgIndex); + const auto sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(sgIndex); if (sgEntry == nullptr || sgEntry->SceneryEntries.empty()) { return false; @@ -633,23 +605,23 @@ bool scenery_group_is_invented(int32_t sgIndex) }); } -void scenery_group_set_invented(int32_t sgIndex) +void SceneryGroupSetInvented(int32_t sgIndex) { - const auto sgEntry = GetSceneryGroupEntry(sgIndex); + const auto sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(sgIndex); if (sgEntry != nullptr) { for (const auto& entry : sgEntry->SceneryEntries) { - scenery_set_invented(entry); + ScenerySetInvented(entry); } } } -void set_all_scenery_groups_not_invented() +void SetAllSceneryGroupsNotInvented() { for (int32_t i = 0; i < MAX_SCENERY_GROUP_OBJECTS; ++i) { - rct_scenery_group_entry* scenery_set = GetSceneryGroupEntry(i); + const auto* scenery_set = OpenRCT2::ObjectManager::GetObjectEntry(i); if (scenery_set == nullptr) { continue; @@ -657,12 +629,12 @@ void set_all_scenery_groups_not_invented() for (const auto& sceneryEntry : scenery_set->SceneryEntries) { - scenery_set_not_invented(sceneryEntry); + ScenerySetNotInvented(sceneryEntry); } } } -void set_all_scenery_items_invented() +void SetAllSceneryItemsInvented() { for (auto sceneryType = 0; sceneryType < SCENERY_TYPE_COUNT; sceneryType++) { @@ -670,7 +642,7 @@ void set_all_scenery_items_invented() } } -void set_all_scenery_items_not_invented() +void SetAllSceneryItemsNotInvented() { for (auto sceneryType = 0; sceneryType < SCENERY_TYPE_COUNT; sceneryType++) { @@ -678,22 +650,22 @@ void set_all_scenery_items_not_invented() } } -void set_every_ride_type_invented() +void SetEveryRideTypeInvented() { std::fill(std::begin(_researchedRideTypes), std::end(_researchedRideTypes), true); } -void set_every_ride_type_not_invented() +void SetEveryRideTypeNotInvented() { std::fill(std::begin(_researchedRideTypes), std::end(_researchedRideTypes), false); } -void set_every_ride_entry_invented() +void SetEveryRideEntryInvented() { std::fill(std::begin(_researchedRideEntries), std::end(_researchedRideEntries), true); } -void set_every_ride_entry_not_invented() +void SetEveryRideEntryNotInvented() { std::fill(std::begin(_researchedRideEntries), std::end(_researchedRideEntries), false); } @@ -706,7 +678,7 @@ StringId ResearchItem::GetName() const { if (type == Research::EntryType::Ride) { - rct_ride_entry* rideEntry = get_ride_entry(entryIndex); + const auto* rideEntry = GetRideEntryByIndex(entryIndex); if (rideEntry == nullptr) { return STR_EMPTY; @@ -715,7 +687,7 @@ StringId ResearchItem::GetName() const return rideEntry->naming.Name; } - rct_scenery_group_entry* sceneryEntry = GetSceneryGroupEntry(entryIndex); + const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); if (sceneryEntry == nullptr) { return STR_EMPTY; @@ -730,7 +702,7 @@ StringId ResearchItem::GetName() const * Do not use the research list outside of the inventions list window with the flags * Clears flags like "always researched". */ -void research_remove_flags() +void ResearchRemoveFlags() { for (auto& researchItem : gResearchItemsUninvented) { @@ -747,41 +719,41 @@ static void ResearchRemoveNullItems(std::vector& items) const auto it = std::remove_if(std::begin(items), std::end(items), [](const ResearchItem& researchItem) { if (researchItem.type == Research::EntryType::Ride) { - return get_ride_entry(researchItem.entryIndex) == nullptr; + return GetRideEntryByIndex(researchItem.entryIndex) == nullptr; } else { - return GetSceneryGroupEntry(researchItem.entryIndex) == nullptr; + return OpenRCT2::ObjectManager::GetObjectEntry(researchItem.entryIndex) == nullptr; } }); items.erase(it, std::end(items)); } -static void research_mark_item_as_researched(const ResearchItem& item) +static void ResearchMarkItemAsResearched(const ResearchItem& item) { if (item.type == Research::EntryType::Ride) { - const auto* rideEntry = get_ride_entry(item.entryIndex); + const auto* rideEntry = GetRideEntryByIndex(item.entryIndex); if (rideEntry != nullptr) { - ride_entry_set_invented(item.entryIndex); + RideEntrySetInvented(item.entryIndex); for (auto rideType : rideEntry->ride_type) { if (rideType != RIDE_TYPE_NULL) { - ride_type_set_invented(rideType); + RideTypeSetInvented(rideType); } } } } else if (item.type == Research::EntryType::Scenery) { - const auto sgEntry = GetSceneryGroupEntry(item.entryIndex); + const auto sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(item.entryIndex); if (sgEntry != nullptr) { for (const auto& sceneryEntry : sgEntry->SceneryEntries) { - scenery_set_invented(sceneryEntry); + ScenerySetInvented(sceneryEntry); } } } @@ -789,10 +761,10 @@ static void research_mark_item_as_researched(const ResearchItem& item) static void ResearchRebuildInventedTables() { - set_every_ride_type_not_invented(); - set_every_ride_entry_invented(); - set_every_ride_entry_not_invented(); - set_all_scenery_items_not_invented(); + SetEveryRideTypeNotInvented(); + SetEveryRideEntryInvented(); + SetEveryRideEntryNotInvented(); + SetAllSceneryItemsNotInvented(); for (const auto& item : gResearchItemsInvented) { // Ignore item, if the research of it is in progress @@ -804,7 +776,7 @@ static void ResearchRebuildInventedTables() } } - research_mark_item_as_researched(item); + ResearchMarkItemAsResearched(item); } MarkAllUnrestrictedSceneryAsInvented(); } @@ -813,19 +785,19 @@ static void ResearchAddAllMissingItems(bool isResearched) { for (ObjectEntryIndex i = 0; i < MAX_RIDE_OBJECTS; i++) { - const auto* rideEntry = get_ride_entry(i); + const auto* rideEntry = GetRideEntryByIndex(i); if (rideEntry != nullptr) { - research_insert_ride_entry(i, isResearched); + ResearchInsertRideEntry(i, isResearched); } } for (ObjectEntryIndex i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { - const auto* groupEntry = GetSceneryGroupEntry(i); + const auto* groupEntry = OpenRCT2::ObjectManager::GetObjectEntry(i); if (groupEntry != nullptr) { - research_insert_scenery_group_entry(i, isResearched); + ResearchInsertSceneryGroupEntry(i, isResearched); } } } @@ -845,7 +817,7 @@ void ResearchFix() ResearchUpdateUncompletedTypes(); } -void research_items_make_all_unresearched() +void ResearchItemsMakeAllUnresearched() { gResearchItemsUninvented.insert( gResearchItemsUninvented.end(), std::make_move_iterator(gResearchItemsInvented.begin()), @@ -853,7 +825,7 @@ void research_items_make_all_unresearched() gResearchItemsInvented.clear(); } -void research_items_make_all_researched() +void ResearchItemsMakeAllResearched() { gResearchItemsInvented.insert( gResearchItemsInvented.end(), std::make_move_iterator(gResearchItemsUninvented.begin()), @@ -865,7 +837,7 @@ void research_items_make_all_researched() * * rct2: 0x00685A93 */ -void research_items_shuffle() +void ResearchItemsShuffle() { std::shuffle(std::begin(gResearchItemsUninvented), std::end(gResearchItemsUninvented), std::default_random_engine{}); } @@ -949,7 +921,7 @@ bool ResearchItem::operator==(const ResearchItem& rhs) const static BitSet _seenRideType = {}; -static void research_update_first_of_type(ResearchItem* researchItem) +static void ResearchUpdateFirstOfType(ResearchItem* researchItem) { if (researchItem->IsNull()) return; @@ -960,7 +932,7 @@ static void research_update_first_of_type(ResearchItem* researchItem) auto rideType = researchItem->baseRideType; if (rideType >= RIDE_TYPE_COUNT) { - log_error("Research item has non-existent ride type index %d", rideType); + LOG_ERROR("Research item has non-existent ride type index %d", rideType); return; } @@ -976,7 +948,7 @@ static void research_update_first_of_type(ResearchItem* researchItem) researchItem->flags |= RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE; } -static void research_mark_ride_type_as_seen(const ResearchItem& researchItem) +static void ResearchMarkRideTypeAsSeen(const ResearchItem& researchItem) { auto rideType = researchItem.baseRideType; if (rideType >= RIDE_TYPE_COUNT) @@ -985,7 +957,7 @@ static void research_mark_ride_type_as_seen(const ResearchItem& researchItem) _seenRideType[rideType] = true; } -void research_determine_first_of_type() +void ResearchDetermineFirstOfType() { _seenRideType.reset(); @@ -1011,18 +983,18 @@ void research_determine_first_of_type() if (gResearchNextItem.has_value() && !gResearchNextItem->IsNull() && researchItem == gResearchNextItem.value()) continue; - research_mark_ride_type_as_seen(researchItem); + ResearchMarkRideTypeAsSeen(researchItem); } if (gResearchLastItem.has_value()) { - research_update_first_of_type(&gResearchLastItem.value()); - research_mark_ride_type_as_seen(gResearchLastItem.value()); + ResearchUpdateFirstOfType(&gResearchLastItem.value()); + ResearchMarkRideTypeAsSeen(gResearchLastItem.value()); } if (gResearchNextItem.has_value()) { - research_update_first_of_type(&gResearchNextItem.value()); - research_mark_ride_type_as_seen(gResearchNextItem.value()); + ResearchUpdateFirstOfType(&gResearchNextItem.value()); + ResearchMarkRideTypeAsSeen(gResearchNextItem.value()); } for (auto& researchItem : gResearchItemsUninvented) @@ -1036,7 +1008,7 @@ void research_determine_first_of_type() continue; } - research_update_first_of_type(&researchItem); - research_mark_ride_type_as_seen(researchItem); + ResearchUpdateFirstOfType(&researchItem); + ResearchMarkRideTypeAsSeen(researchItem); } } diff --git a/src/openrct2/management/Research.h b/src/openrct2/management/Research.h index 61a5d2b6c9..798c4543dd 100644 --- a/src/openrct2/management/Research.h +++ b/src/openrct2/management/Research.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,13 +10,14 @@ #pragma once #include "../common.h" -#include "../object/Object.h" #include "../object/ObjectLimits.h" +#include "../object/ObjectTypes.h" +#include "../ride/RideTypes.h" #include "../util/Util.h" #include -struct rct_ride_entry; +struct RideObjectEntry; struct ScenerySelection; namespace Research @@ -123,44 +124,44 @@ extern std::vector gResearchItemsInvented; extern uint8_t gResearchUncompletedCategories; extern bool gSilentResearch; -void research_reset_items(); +void ResearchResetItems(); void ResearchUpdateUncompletedTypes(); -void research_update(); -void research_reset_current_item(); -void research_populate_list_random(); +void ResearchUpdate(); +void ResearchResetCurrentItem(); +void ResearchPopulateListRandom(); -void research_finish_item(ResearchItem* researchItem); -void research_insert(ResearchItem&& item, bool researched); +void ResearchFinishItem(const ResearchItem& researchItem); +void ResearchInsert(ResearchItem&& item, bool researched); void ResearchRemove(const ResearchItem& researchItem); -bool research_insert_ride_entry(ride_type_t rideType, ObjectEntryIndex entryIndex, ResearchCategory category, bool researched); -void research_insert_ride_entry(ObjectEntryIndex entryIndex, bool researched); -bool research_insert_scenery_group_entry(ObjectEntryIndex entryIndex, bool researched); +bool ResearchInsertRideEntry(ride_type_t rideType, ObjectEntryIndex entryIndex, ResearchCategory category, bool researched); +void ResearchInsertRideEntry(ObjectEntryIndex entryIndex, bool researched); +bool ResearchInsertSceneryGroupEntry(ObjectEntryIndex entryIndex, bool researched); -void ride_type_set_invented(uint32_t rideType); -void ride_entry_set_invented(ObjectEntryIndex rideEntryIndex); -void scenery_set_invented(const ScenerySelection& sceneryItem); -void scenery_set_not_invented(const ScenerySelection& sceneryItem); -bool ride_type_is_invented(uint32_t rideType); -bool ride_entry_is_invented(ObjectEntryIndex rideEntryIndex); -bool scenery_group_is_invented(int32_t sgIndex); -void scenery_group_set_invented(int32_t sgIndex); -bool scenery_is_invented(const ScenerySelection& sceneryItem); -void set_all_scenery_items_invented(); -void set_all_scenery_items_not_invented(); -void set_all_scenery_groups_not_invented(); -void set_every_ride_type_invented(); -void set_every_ride_type_not_invented(); -void set_every_ride_entry_invented(); -void set_every_ride_entry_not_invented(); -void research_remove_flags(); +void RideTypeSetInvented(uint32_t rideType); +void RideEntrySetInvented(ObjectEntryIndex rideEntryIndex); +void ScenerySetInvented(const ScenerySelection& sceneryItem); +void ScenerySetNotInvented(const ScenerySelection& sceneryItem); +bool RideTypeIsInvented(uint32_t rideType); +bool RideEntryIsInvented(ObjectEntryIndex rideEntryIndex); +bool SceneryGroupIsInvented(int32_t sgIndex); +void SceneryGroupSetInvented(int32_t sgIndex); +bool SceneryIsInvented(const ScenerySelection& sceneryItem); +void SetAllSceneryItemsInvented(); +void SetAllSceneryItemsNotInvented(); +void SetAllSceneryGroupsNotInvented(); +void SetEveryRideTypeInvented(); +void SetEveryRideTypeNotInvented(); +void SetEveryRideEntryInvented(); +void SetEveryRideEntryNotInvented(); +void ResearchRemoveFlags(); void ResearchFix(); -void research_items_make_all_unresearched(); -void research_items_make_all_researched(); -void research_items_shuffle(); +void ResearchItemsMakeAllUnresearched(); +void ResearchItemsMakeAllResearched(); +void ResearchItemsShuffle(); /** * Determines if a newly invented ride entry should be listed as a new ride * or as a new vehicle for a pre-existing ride. */ -void research_determine_first_of_type(); +void ResearchDetermineFirstOfType(); diff --git a/src/openrct2/math/Trigonometry.hpp b/src/openrct2/math/Trigonometry.hpp new file mode 100644 index 0000000000..98e73f5c8c --- /dev/null +++ b/src/openrct2/math/Trigonometry.hpp @@ -0,0 +1,121 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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 "../entity/Yaw.hpp" +#include "../ride/Vehicle.h" +#include "../world/Location.hpp" + +namespace OpenRCT2::Math::Trigonometry +{ + /** + * The cos and sin of sprite direction + * ROUND(COS((32/64+(L1/64))*(2*PI()))*256,0), ROUND(SIN(((L1/64))*(2*PI())) * 256,0) + * Where L1 represents an incrementing column 0 - 63 + * Note: Must be at least 32bit to ensure all users do not overflow + */ + static constexpr CoordsXY YawToDirectionVector[64] = { + { -256, 0 }, { -255, 25 }, { -251, 50 }, { -245, 74 }, { -237, 98 }, { -226, 121 }, { -213, 142 }, + { -198, 162 }, { -181, 181 }, { -162, 198 }, { -142, 213 }, { -121, 226 }, { -98, 237 }, { -74, 245 }, + { -50, 251 }, { -25, 255 }, { 0, 256 }, { 25, 255 }, { 50, 251 }, { 74, 245 }, { 98, 237 }, + { 121, 226 }, { 142, 213 }, { 162, 198 }, { 181, 181 }, { 198, 162 }, { 213, 142 }, { 226, 121 }, + { 237, 98 }, { 245, 74 }, { 251, 50 }, { 255, 25 }, { 256, 0 }, { 255, -25 }, { 251, -50 }, + { 245, -74 }, { 237, -98 }, { 226, -121 }, { 213, -142 }, { 198, -162 }, { 181, -181 }, { 162, -198 }, + { 142, -213 }, { 121, -226 }, { 98, -237 }, { 74, -245 }, { 50, -251 }, { 25, -255 }, { 0, -256 }, + { -25, -255 }, { -50, -251 }, { -74, -245 }, { -98, -237 }, { -121, -226 }, { -142, -213 }, { -162, -198 }, + { -181, -181 }, { -198, -162 }, { -213, -142 }, { -226, -121 }, { -237, -98 }, { -245, -74 }, { -251, -50 }, + { -255, -25 }, + }; + // Currently OpenRCT2::Entity::Yaw::BaseSpritePrecision is 32, but one day it will be 64. + static_assert(std::size(YawToDirectionVector) == 64); + + /** + * The cos and sin of vehicle pitch based on vehicle sprite angles + * COS((Y1/360)*2*PI())*256,-SIN((Y1/360)*2*PI())*256 + * Where Y1 represents the angle of pitch in degrees + */ + constexpr CoordsXY PitchToDirectionVectorFromGeometry[] = { + { 256, 0 }, // flat + { 251, 49 }, // slopes up + { 236, 97 }, // slopes up + { 195, 165 }, // slopes up + { 134, 217 }, // slopes up + { 251, -49 }, // slopes down + { 236, -97 }, // slopes down + { 195, -165 }, // slopes down + { 135, -217 }, // slopes down + { 70, 246 }, // slopes vertical up + { 0, 256 }, // slopes vertical up + { -66, 247 }, // slopes looping up + { -128, 221 }, // slopes looping up + { -181, 181 }, // slopes looping up + { -221, 128 }, // slopes looping up + { -247, 66 }, // slopes looping up + { -256, 0 }, // inverted + { 70, -246 }, // slopes vertical down + { 0, -256 }, // slopes vertical down + { -66, -247 }, // slopes looping down + { -128, -221 }, // slopes looping down + { -181, -181 }, // slopes looping down + { -221, -128 }, // slopes looping down + { -247, -66 }, // slopes looping down + { 221, 128 }, // corkscrew up left + { 128, 221 }, // corkscrew up left + { 0, 256 }, // corkscrew up left + { -128, 221 }, // corkscrew up left + { -221, 128 }, // corkscrew up left + { -221, -128 }, // corkscrew down left + { -128, -221 }, // corkscrew down left + { 0, -256 }, // corkscrew down left + { 128, -221 }, // corkscrew down left + { 221, -128 }, // corkscrew down left + { 221, 128 }, // corkscrew up right + { 128, 221 }, // corkscrew up right + { 0, 256 }, // corkscrew up right + { -128, 221 }, // corkscrew up right + { -221, 128 }, // corkscrew up right + { -221, -128 }, // corkscrew down right + { -128, -221 }, // corkscrew down right + { 0, -256 }, // corkscrew down right + { 128, -221 }, // corkscrew down right + { 221, 128 }, // corkscrew down right + { 256, 0 }, // half helixes + { 256, 0 }, // half helixes + { 256, 0 }, // half helixes + { 256, 0 }, // half helixes + { 256, 0 }, // quarter helixes + { 256, 0 }, // quarter helixes + { 252, 42 }, // diagonal slopes up + { 241, 83 }, // diagonal slopes up + { 168, 193 }, // diagonal slopes up + { 252, -42 }, // diagonal slopes down + { 241, -83 }, // diagonal slopes down + { 168, -193 }, // diagonal slopes down + { 236, -97 }, // inverting transition slopes down + { 195, -165 }, // inverting transition slopes down + { 134, -217 }, // inverting transition slopes down + { 252, 44 }, // spiral lift hill up + }; + static_assert(std::size(PitchToDirectionVectorFromGeometry) == NumVehiclePitches); + + constexpr int32_t ComputeHorizontalMagnitude(int32_t length, uint8_t pitch) + { + return (-PitchToDirectionVectorFromGeometry[static_cast(pitch)].y * length) / 256; + } + + constexpr CoordsXY ComputeXYVector(int32_t magnitude, uint8_t yaw) + { + return (static_cast(YawToDirectionVector[yaw]) * magnitude) / 256; + } + + constexpr CoordsXY ComputeXYVector(int32_t length, uint8_t pitch, uint8_t yaw) + { + return ComputeXYVector(ComputeHorizontalMagnitude(length, pitch), yaw); + } +} // namespace OpenRCT2::Math::Trigonometry diff --git a/src/openrct2/network/DiscordService.cpp b/src/openrct2/network/DiscordService.cpp index 5614b04b8a..dcb19f4d5b 100644 --- a/src/openrct2/network/DiscordService.cpp +++ b/src/openrct2/network/DiscordService.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ namespace static void OnReady([[maybe_unused]] const DiscordUser* request) { - log_verbose("DiscordService::OnReady()"); + LOG_VERBOSE("DiscordService::OnReady()"); } static void OnDisconnected(int errorCode, const char* message) @@ -93,13 +93,13 @@ void DiscordService::RefreshPresence() const { default: details = GetParkName(); - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) { state = "Playing Solo"; } else { - OpenRCT2::FmtString fmtServerName(network_get_server_name()); + OpenRCT2::FmtString fmtServerName(NetworkGetServerName()); std::string serverName; for (const auto& token : fmtServerName) { @@ -111,15 +111,15 @@ void DiscordService::RefreshPresence() const { auto codepoint = token.GetCodepoint(); char buffer[8]{}; - utf8_write_codepoint(buffer, codepoint); + UTF8WriteCodepoint(buffer, codepoint); serverName += buffer; } } state = serverName; // NOTE: the party size is displayed next to state - discordPresence.partyId = network_get_server_name(); - discordPresence.partySize = network_get_num_players(); + discordPresence.partyId = NetworkGetServerName().c_str(); + discordPresence.partySize = NetworkGetNumPlayers(); discordPresence.partyMax = 256; // TODO generate secrets for the server diff --git a/src/openrct2/network/DiscordService.h b/src/openrct2/network/DiscordService.h index c85754d57b..7bfbf0a09b 100644 --- a/src/openrct2/network/DiscordService.h +++ b/src/openrct2/network/DiscordService.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/NetworkAction.cpp b/src/openrct2/network/NetworkAction.cpp index 1f7601d881..8291e06013 100644 --- a/src/openrct2/network/NetworkAction.cpp +++ b/src/openrct2/network/NetworkAction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -149,7 +149,7 @@ const std::array(NetworkPermission::Count)> N "PERMISSION_PATH", { GameCommand::PlacePath, - GameCommand::PlacePathFromTrack, + GameCommand::PlacePathLayout, GameCommand::RemovePath, GameCommand::PlaceFootpathAddition, GameCommand::RemoveFootpathAddition, diff --git a/src/openrct2/network/NetworkAction.h b/src/openrct2/network/NetworkAction.h index 285f6d2a2b..1f49801ef3 100644 --- a/src/openrct2/network/NetworkAction.h +++ b/src/openrct2/network/NetworkAction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 2df8056d09..e78be80903 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -43,7 +43,7 @@ // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "0" +#define NETWORK_STREAM_VERSION "15" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION @@ -104,11 +104,11 @@ static constexpr uint32_t MaxPacketsPerUpdate = 100; using namespace OpenRCT2; -static void network_chat_show_connected_message(); -static void network_chat_show_server_greeting(); -static u8string network_get_keys_directory(); -static u8string network_get_private_key_path(u8string_view playerName); -static u8string network_get_public_key_path(u8string_view playerName, u8string_view hash); +static void NetworkChatShowConnectedMessage(); +static void NetworkChatShowServerGreeting(); +static u8string NetworkGetKeysDirectory(); +static u8string NetworkGetPrivateKeyPath(u8string_view playerName); +static u8string NetworkGetPublicKeyPath(u8string_view playerName, u8string_view hash); NetworkBase::NetworkBase(OpenRCT2::IContext& context) : OpenRCT2::System(context) @@ -134,18 +134,19 @@ NetworkBase::NetworkBase(OpenRCT2::IContext& context) client_command_handlers[NetworkCommand::GameInfo] = &NetworkBase::Client_Handle_GAMEINFO; client_command_handlers[NetworkCommand::Token] = &NetworkBase::Client_Handle_TOKEN; client_command_handlers[NetworkCommand::ObjectsList] = &NetworkBase::Client_Handle_OBJECTS_LIST; - client_command_handlers[NetworkCommand::Scripts] = &NetworkBase::Client_Handle_SCRIPTS; + client_command_handlers[NetworkCommand::ScriptsHeader] = &NetworkBase::Client_Handle_SCRIPTS_HEADER; + client_command_handlers[NetworkCommand::ScriptsData] = &NetworkBase::Client_Handle_SCRIPTS_DATA; client_command_handlers[NetworkCommand::GameState] = &NetworkBase::Client_Handle_GAMESTATE; - server_command_handlers[NetworkCommand::Auth] = &NetworkBase::Server_Handle_AUTH; - server_command_handlers[NetworkCommand::Chat] = &NetworkBase::Server_Handle_CHAT; - server_command_handlers[NetworkCommand::GameAction] = &NetworkBase::Server_Handle_GAME_ACTION; - server_command_handlers[NetworkCommand::Ping] = &NetworkBase::Server_Handle_PING; - server_command_handlers[NetworkCommand::GameInfo] = &NetworkBase::Server_Handle_GAMEINFO; - server_command_handlers[NetworkCommand::Token] = &NetworkBase::Server_Handle_TOKEN; - server_command_handlers[NetworkCommand::MapRequest] = &NetworkBase::Server_Handle_MAPREQUEST; - server_command_handlers[NetworkCommand::RequestGameState] = &NetworkBase::Server_Handle_REQUEST_GAMESTATE; - server_command_handlers[NetworkCommand::Heartbeat] = &NetworkBase::Server_Handle_HEARTBEAT; + server_command_handlers[NetworkCommand::Auth] = &NetworkBase::ServerHandleAuth; + server_command_handlers[NetworkCommand::Chat] = &NetworkBase::ServerHandleChat; + server_command_handlers[NetworkCommand::GameAction] = &NetworkBase::ServerHandleGameAction; + server_command_handlers[NetworkCommand::Ping] = &NetworkBase::ServerHandlePing; + server_command_handlers[NetworkCommand::GameInfo] = &NetworkBase::ServerHandleGameInfo; + server_command_handlers[NetworkCommand::Token] = &NetworkBase::ServerHandleToken; + server_command_handlers[NetworkCommand::MapRequest] = &NetworkBase::ServerHandleMapRequest; + server_command_handlers[NetworkCommand::RequestGameState] = &NetworkBase::ServerHandleRequestGamestate; + server_command_handlers[NetworkCommand::Heartbeat] = &NetworkBase::ServerHandleHeartbeat; _chat_log_fs << std::unitbuf; _server_log_fs << std::unitbuf; @@ -209,7 +210,7 @@ void NetworkBase::Close() scriptEngine.RemoveNetworkPlugins(); # endif - gfx_invalidate_screen(); + GfxInvalidateScreen(); _requireClose = false; } @@ -260,7 +261,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) mode = NETWORK_MODE_CLIENT; - log_info("Connecting to %s:%u", host.c_str(), port); + LOG_INFO("Connecting to %s:%u", host.c_str(), port); _host = host; _port = port; @@ -282,7 +283,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 = network_get_private_key_path(gConfigNetwork.PlayerName); + auto keyPath = NetworkGetPrivateKeyPath(gConfigNetwork.PlayerName); if (!File::Exists(keyPath)) { Console::WriteLine("Generating key... This may take a while"); @@ -290,10 +291,10 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) _key.Generate(); Console::WriteLine("Key generated, saving private bits as %s", keyPath.c_str()); - const auto keysDirectory = network_get_keys_directory(); + const auto keysDirectory = NetworkGetKeysDirectory(); if (!Platform::EnsureDirectoryExists(keysDirectory.c_str())) { - log_error("Unable to create directory %s.", keysDirectory.c_str()); + LOG_ERROR("Unable to create directory %s.", keysDirectory.c_str()); return false; } @@ -304,13 +305,13 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) } catch (const std::exception&) { - log_error("Unable to save private key at %s.", keyPath.c_str()); + LOG_ERROR("Unable to save private key at %s.", keyPath.c_str()); return false; } const std::string hash = _key.PublicKeyHash(); const utf8* publicKeyHash = hash.c_str(); - keyPath = network_get_public_key_path(gConfigNetwork.PlayerName, publicKeyHash); + keyPath = NetworkGetPublicKeyPath(gConfigNetwork.PlayerName, publicKeyHash); Console::WriteLine("Key generated, saving public bits as %s", keyPath.c_str()); try @@ -320,7 +321,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) } catch (const std::exception&) { - log_error("Unable to save public key at %s.", keyPath.c_str()); + LOG_ERROR("Unable to save public key at %s.", keyPath.c_str()); return false; } } @@ -330,13 +331,13 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) bool ok = false; try { - log_verbose("Loading key from %s", keyPath.c_str()); + LOG_VERBOSE("Loading key from %s", keyPath.c_str()); auto fs = FileStream(keyPath, FILE_MODE_OPEN); ok = _key.LoadPrivate(&fs); } catch (const std::exception&) { - log_error("Unable to read private key from %s.", keyPath.c_str()); + LOG_ERROR("Unable to read private key from %s.", keyPath.c_str()); return false; } @@ -358,7 +359,7 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address) _userManager.Load(); - log_verbose("Begin listening for clients"); + LOG_VERBOSE("Begin listening for clients"); _listenSocket = CreateTcpSocket(); try @@ -391,7 +392,7 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address) player->Group = 0; player_id = player->Id; - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) { // Add SERVER to users.json and save. NetworkUser* networkUser = _userManager.GetOrAddUser(player->KeyHash); @@ -402,16 +403,16 @@ bool NetworkBase::BeginServer(uint16_t port, const std::string& address) auto* szAddress = address.empty() ? "*" : address.c_str(); Console::WriteLine("Listening for clients on %s:%hu", szAddress, port); - network_chat_show_connected_message(); - network_chat_show_server_greeting(); + NetworkChatShowConnectedMessage(); + NetworkChatShowServerGreeting(); status = NETWORK_STATUS_CONNECTED; listening_port = port; _serverState.gamestateSnapshotsEnabled = gConfigNetwork.DesyncDebugging; _advertiser = CreateServerAdvertiser(listening_port); - game_load_scripts(); - game_notify_map_changed(); + GameLoadScripts(); + GameNotifyMapChanged(); return true; } @@ -529,8 +530,8 @@ void NetworkBase::UpdateServer() uint32_t ticks = Platform::GetTicks(); if (ticks > last_ping_sent_time + 3000) { - Server_Send_PING(); - Server_Send_PINGLIST(); + ServerSendPing(); + ServerSendPingList(); } if (_advertiser != nullptr) @@ -561,11 +562,11 @@ void NetworkBase::UpdateClient() { _lastConnectStatus = SocketStatus::Resolving; char str_resolving[256]; - format_string(str_resolving, 256, STR_MULTIPLAYER_RESOLVING, nullptr); + FormatStringLegacy(str_resolving, 256, STR_MULTIPLAYER_RESOLVING, nullptr); auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_resolving }); - intent.putExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_resolving }); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); ContextOpenIntent(&intent); } break; @@ -576,11 +577,11 @@ void NetworkBase::UpdateClient() { _lastConnectStatus = SocketStatus::Connecting; char str_connecting[256]; - format_string(str_connecting, 256, STR_MULTIPLAYER_CONNECTING, nullptr); + FormatStringLegacy(str_connecting, 256, STR_MULTIPLAYER_CONNECTING, nullptr); auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_connecting }); - intent.putExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_connecting }); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); ContextOpenIntent(&intent); server_connect_time = Platform::GetTicks(); @@ -593,11 +594,11 @@ void NetworkBase::UpdateClient() _serverConnection->ResetLastPacketTime(); Client_Send_TOKEN(); char str_authenticating[256]; - format_string(str_authenticating, 256, STR_MULTIPLAYER_AUTHENTICATING, nullptr); + FormatStringLegacy(str_authenticating, 256, STR_MULTIPLAYER_AUTHENTICATING, nullptr); auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_authenticating }); - intent.putExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_authenticating }); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); ContextOpenIntent(&intent); break; } @@ -633,18 +634,18 @@ void NetworkBase::UpdateClient() if (_serverConnection->GetLastDisconnectReason()) { const char* disconnect_reason = _serverConnection->GetLastDisconnectReason(); - format_string(str_disconnected, 256, STR_MULTIPLAYER_DISCONNECTED_WITH_REASON, &disconnect_reason); + FormatStringLegacy(str_disconnected, 256, STR_MULTIPLAYER_DISCONNECTED_WITH_REASON, &disconnect_reason); } else { - format_string(str_disconnected, 256, STR_MULTIPLAYER_DISCONNECTED_NO_REASON, nullptr); + FormatStringLegacy(str_disconnected, 256, STR_MULTIPLAYER_DISCONNECTED_NO_REASON, nullptr); } auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_disconnected }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_disconnected }); ContextOpenIntent(&intent); } - window_close_by_class(WindowClass::Multiplayer); + WindowCloseByClass(WindowClass::Multiplayer); Close(); } else @@ -752,12 +753,12 @@ bool NetworkBase::CheckSRAND(uint32_t tick, uint32_t srand0) if (itTickData == std::end(_serverTickData)) return true; - const ServerTickData_t storedTick = itTickData->second; + const ServerTickData storedTick = itTickData->second; _serverTickData.erase(itTickData); if (storedTick.srand0 != srand0) { - log_info("Srand0 mismatch, client = %08X, server = %08X", srand0, storedTick.srand0); + LOG_INFO("Srand0 mismatch, client = %08X, server = %08X", srand0, storedTick.srand0); return false; } @@ -767,7 +768,7 @@ bool NetworkBase::CheckSRAND(uint32_t tick, uint32_t srand0) std::string clientSpriteHash = checksum.ToString(); if (clientSpriteHash != storedTick.spriteHash) { - log_info("Sprite hash mismatch, client = %s, server = %s", clientSpriteHash.c_str(), storedTick.spriteHash.c_str()); + LOG_INFO("Sprite hash mismatch, client = %s, server = %s", clientSpriteHash.c_str(), storedTick.spriteHash.c_str()); return false; } } @@ -777,23 +778,23 @@ bool NetworkBase::CheckSRAND(uint32_t tick, uint32_t srand0) bool NetworkBase::IsDesynchronised() const noexcept { - return _serverState.state == NetworkServerState::Desynced; + return _serverState.state == NetworkServerStatus::Desynced; } bool NetworkBase::CheckDesynchronizaton() { // Check synchronisation - if (GetMode() == NETWORK_MODE_CLIENT && _serverState.state != NetworkServerState::Desynced - && !CheckSRAND(gCurrentTicks, scenario_rand_state().s0)) + if (GetMode() == NETWORK_MODE_CLIENT && _serverState.state != NetworkServerStatus::Desynced + && !CheckSRAND(gCurrentTicks, ScenarioRandState().s0)) { - _serverState.state = NetworkServerState::Desynced; + _serverState.state = NetworkServerStatus::Desynced; _serverState.desyncTick = gCurrentTicks; char str_desync[256]; - format_string(str_desync, 256, STR_MULTIPLAYER_DESYNC, nullptr); + FormatStringLegacy(str_desync, 256, STR_MULTIPLAYER_DESYNC, nullptr); auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); ContextOpenIntent(&intent); if (!gConfigNetwork.StayConnected) @@ -809,12 +810,12 @@ bool NetworkBase::CheckDesynchronizaton() void NetworkBase::RequestStateSnapshot() { - log_info("Requesting game state for tick %u", _serverState.desyncTick); + LOG_INFO("Requesting game state for tick %u", _serverState.desyncTick); Client_Send_RequestGameState(_serverState.desyncTick); } -NetworkServerState_t NetworkBase::GetServerState() const noexcept +NetworkServerState NetworkBase::GetServerState() const noexcept { return _serverState; } @@ -828,8 +829,8 @@ void NetworkBase::KickPlayer(int32_t playerId) // Disconnect the client gracefully client_connection->SetLastDisconnectReason(STR_MULTIPLAYER_KICKED); char str_disconnect_msg[256]; - format_string(str_disconnect_msg, 256, STR_MULTIPLAYER_KICKED_REASON, nullptr); - Server_Send_SETDISCONNECTMSG(*client_connection, str_disconnect_msg); + FormatStringLegacy(str_disconnect_msg, 256, STR_MULTIPLAYER_KICKED_REASON, nullptr); + ServerSendSetDisconnectMsg(*client_connection, str_disconnect_msg); client_connection->Disconnect(); break; } @@ -858,7 +859,7 @@ std::string NetworkBase::GenerateAdvertiseKey() char key[17]; for (int32_t i = 0; i < 16; i++) { - int32_t hexCharIndex = util_rand() % std::size(hexChars); + int32_t hexCharIndex = UtilRand() % std::size(hexChars); key[i] = hexChars[hexCharIndex]; } key[std::size(key) - 1] = 0; @@ -932,7 +933,7 @@ uint8_t NetworkBase::GetGroupIDByHash(const std::string& keyhash) } else { - log_warning( + LOG_WARNING( "User %s is assigned to non-existent group %u. Assigning to default group (%u)", keyhash.c_str(), assignedGroup, groupId); } @@ -975,7 +976,7 @@ void NetworkBase::SaveGroups() } catch (const std::exception& ex) { - log_error("Unable to save %s: %s", path.c_str(), ex.what()); + LOG_ERROR("Unable to save %s: %s", path.c_str(), ex.what()); } } } @@ -1029,7 +1030,7 @@ void NetworkBase::LoadGroups() } catch (const std::exception& e) { - log_error("Failed to read %s as JSON. Setting default groups. %s", path.c_str(), e.what()); + LOG_ERROR("Failed to read %s as JSON. Setting default groups. %s", path.c_str(), e.what()); } } @@ -1078,7 +1079,7 @@ void NetworkBase::AppendLog(std::ostream& fs, std::string_view s) { if (fs.fail()) { - log_error("bad ostream failed to append log"); + LOG_ERROR("bad ostream failed to append log"); return; } try @@ -1097,7 +1098,7 @@ void NetworkBase::AppendLog(std::ostream& fs, std::string_view s) } catch (const std::exception& ex) { - log_error("%s", ex.what()); + LOG_ERROR("%s", ex.what()); } } @@ -1133,11 +1134,11 @@ void NetworkBase::BeginServerLog() utf8 logMessage[256]; if (GetMode() == NETWORK_MODE_CLIENT) { - format_string(logMessage, sizeof(logMessage), STR_LOG_CLIENT_STARTED, nullptr); + FormatStringLegacy(logMessage, sizeof(logMessage), STR_LOG_CLIENT_STARTED, nullptr); } else if (GetMode() == NETWORK_MODE_SERVER) { - format_string(logMessage, sizeof(logMessage), STR_LOG_SERVER_STARTED, nullptr); + FormatStringLegacy(logMessage, sizeof(logMessage), STR_LOG_SERVER_STARTED, nullptr); } else { @@ -1161,11 +1162,11 @@ void NetworkBase::CloseServerLog() char logMessage[256]; if (GetMode() == NETWORK_MODE_CLIENT) { - format_string(logMessage, sizeof(logMessage), STR_LOG_CLIENT_STOPPED, nullptr); + FormatStringLegacy(logMessage, sizeof(logMessage), STR_LOG_CLIENT_STOPPED, nullptr); } else if (GetMode() == NETWORK_MODE_SERVER) { - format_string(logMessage, sizeof(logMessage), STR_LOG_SERVER_STOPPED, nullptr); + FormatStringLegacy(logMessage, sizeof(logMessage), STR_LOG_SERVER_STOPPED, nullptr); } else { @@ -1180,11 +1181,11 @@ void NetworkBase::Client_Send_RequestGameState(uint32_t tick) { if (_serverState.gamestateSnapshotsEnabled == false) { - log_verbose("Server does not store a gamestate history"); + LOG_VERBOSE("Server does not store a gamestate history"); return; } - log_verbose("Requesting gamestate from server for tick %u", tick); + LOG_VERBOSE("Requesting gamestate from server for tick %u", tick); NetworkPacket packet(NetworkCommand::RequestGameState); packet << tick; @@ -1193,7 +1194,7 @@ void NetworkBase::Client_Send_RequestGameState(uint32_t tick) void NetworkBase::Client_Send_TOKEN() { - log_verbose("requesting token"); + LOG_VERBOSE("requesting token"); NetworkPacket packet(NetworkCommand::Token); _serverConnection->AuthStatus = NetworkAuth::Requested; _serverConnection->QueuePacket(std::move(packet)); @@ -1203,7 +1204,7 @@ void NetworkBase::Client_Send_AUTH( const std::string& name, const std::string& password, const std::string& pubkey, const std::vector& signature) { NetworkPacket packet(NetworkCommand::Auth); - packet.WriteString(network_get_version()); + packet.WriteString(NetworkGetVersion()); packet.WriteString(name); packet.WriteString(password); packet.WriteString(pubkey); @@ -1216,17 +1217,17 @@ void NetworkBase::Client_Send_AUTH( void NetworkBase::Client_Send_MAPREQUEST(const std::vector& objects) { - log_verbose("client requests %u objects", uint32_t(objects.size())); + LOG_VERBOSE("client requests %u objects", uint32_t(objects.size())); NetworkPacket packet(NetworkCommand::MapRequest); packet << static_cast(objects.size()); for (const auto& object : objects) { std::string name(object.GetName()); - log_verbose("client requests object %s", name.c_str()); + LOG_VERBOSE("client requests object %s", name.c_str()); if (object.Generation == ObjectGeneration::DAT) { packet << static_cast(0); - packet.Write(&object.Entry, sizeof(rct_object_entry)); + packet.Write(&object.Entry, sizeof(RCTObjectEntry)); } else { @@ -1237,7 +1238,7 @@ void NetworkBase::Client_Send_MAPREQUEST(const std::vectorQueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_TOKEN(NetworkConnection& connection) +void NetworkBase::ServerSendToken(NetworkConnection& connection) { NetworkPacket packet(NetworkCommand::Token); packet << static_cast(connection.Challenge.size()); @@ -1245,10 +1246,10 @@ void NetworkBase::Server_Send_TOKEN(NetworkConnection& connection) connection.QueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_OBJECTS_LIST( +void NetworkBase::ServerSendObjectsList( NetworkConnection& connection, const std::vector& objects) const { - log_verbose("Server sends objects list with %u items", objects.size()); + LOG_VERBOSE("Server sends objects list with %u items", objects.size()); if (objects.empty()) { @@ -1269,14 +1270,14 @@ void NetworkBase::Server_Send_OBJECTS_LIST( if (object->Identifier.empty()) { // DAT - log_verbose("Object %.8s (checksum %x)", object->ObjectEntry.name, object->ObjectEntry.checksum); + LOG_VERBOSE("Object %.8s (checksum %x)", object->ObjectEntry.name, object->ObjectEntry.checksum); packet << static_cast(0); - packet.Write(&object->ObjectEntry, sizeof(rct_object_entry)); + packet.Write(&object->ObjectEntry, sizeof(RCTObjectEntry)); } else { // JSON - log_verbose("Object %s", object->Identifier.c_str()); + LOG_VERBOSE("Object %s", object->Identifier.c_str()); packet << static_cast(1); packet.WriteString(object->Identifier); } @@ -1286,53 +1287,69 @@ void NetworkBase::Server_Send_OBJECTS_LIST( } } -void NetworkBase::Server_Send_SCRIPTS(NetworkConnection& connection) +void NetworkBase::ServerSendScripts(NetworkConnection& connection) { - NetworkPacket packet(NetworkCommand::Scripts); - # ifdef ENABLE_SCRIPTING using namespace OpenRCT2::Scripting; auto& scriptEngine = GetContext().GetScriptEngine(); - const auto& plugins = scriptEngine.GetPlugins(); - std::vector> pluginsToSend; - for (const auto& plugin : plugins) - { - const auto& metadata = plugin->GetMetadata(); - if (metadata.Type == OpenRCT2::Scripting::PluginType::Remote) - { - pluginsToSend.push_back(plugin); - } - } - log_verbose("Server sends %u scripts", pluginsToSend.size()); - packet << static_cast(pluginsToSend.size()); - for (const auto& plugin : pluginsToSend) - { - const auto& metadata = plugin->GetMetadata(); - log_verbose("Script %s", metadata.Name.c_str()); + // Get remote plugin list. + const auto remotePlugins = scriptEngine.GetRemotePlugins(); + LOG_VERBOSE("Server sends %zu scripts", remotePlugins.size()); + // Build the data contents for each plugin. + MemoryStream pluginData; + for (auto& plugin : remotePlugins) + { const auto& code = plugin->GetCode(); - packet << static_cast(code.size()); - packet.Write(reinterpret_cast(code.c_str()), code.size()); + + const auto codeSize = static_cast(code.size()); + pluginData.WriteValue(codeSize); + pluginData.WriteArray(code.c_str(), code.size()); } + + // Send the header packet. + NetworkPacket packetScriptHeader(NetworkCommand::ScriptsHeader); + packetScriptHeader << static_cast(remotePlugins.size()); + packetScriptHeader << static_cast(pluginData.GetLength()); + connection.QueuePacket(std::move(packetScriptHeader)); + + // Segment the plugin data into chunks and send them. + const uint8_t* pluginDataBuffer = static_cast(pluginData.GetData()); + uint32_t dataOffset = 0; + while (dataOffset < pluginData.GetLength()) + { + const uint32_t chunkSize = std::min(pluginData.GetLength() - dataOffset, CHUNK_SIZE); + + NetworkPacket packet(NetworkCommand::ScriptsData); + packet << chunkSize; + packet.Write(pluginDataBuffer + dataOffset, chunkSize); + + connection.QueuePacket(std::move(packet)); + + dataOffset += chunkSize; + } + Guard::Assert(dataOffset == pluginData.GetLength()); + # else - packet << static_cast(0); + NetworkPacket packetScriptHeader(NetworkCommand::ScriptsHeader); + packetScriptHeader << static_cast(0U); + packetScriptHeader << static_cast(0U); # endif - connection.QueuePacket(std::move(packet)); } void NetworkBase::Client_Send_HEARTBEAT(NetworkConnection& connection) const { - log_verbose("Sending heartbeat"); + LOG_VERBOSE("Sending heartbeat"); NetworkPacket packet(NetworkCommand::Heartbeat); connection.QueuePacket(std::move(packet)); } -NetworkStats_t NetworkBase::GetStats() const +NetworkStats NetworkBase::GetStats() const { - NetworkStats_t stats = {}; + NetworkStats stats = {}; if (mode == NETWORK_MODE_CLIENT) { stats = _serverConnection->Stats; @@ -1351,7 +1368,7 @@ NetworkStats_t NetworkBase::GetStats() const return stats; } -void NetworkBase::Server_Send_AUTH(NetworkConnection& connection) +void NetworkBase::ServerSendAuth(NetworkConnection& connection) { uint8_t new_playerid = 0; if (connection.Player != nullptr) @@ -1362,7 +1379,7 @@ void NetworkBase::Server_Send_AUTH(NetworkConnection& connection) packet << static_cast(connection.AuthStatus) << new_playerid; if (connection.AuthStatus == NetworkAuth::BadVersion) { - packet.WriteString(network_get_version()); + packet.WriteString(NetworkGetVersion()); } connection.QueuePacket(std::move(packet)); if (connection.AuthStatus != NetworkAuth::Ok && connection.AuthStatus != NetworkAuth::RequirePassword) @@ -1371,7 +1388,7 @@ void NetworkBase::Server_Send_AUTH(NetworkConnection& connection) } } -void NetworkBase::Server_Send_MAP(NetworkConnection* connection) +void NetworkBase::ServerSendMap(NetworkConnection* connection) { std::vector objects; if (connection != nullptr) @@ -1387,7 +1404,7 @@ void NetworkBase::Server_Send_MAP(NetworkConnection* connection) objects = objManager.GetPackableObjects(); } - auto header = save_for_network(objects); + auto header = SaveForNetwork(objects); if (header.empty()) { if (connection != nullptr) @@ -1415,7 +1432,7 @@ void NetworkBase::Server_Send_MAP(NetworkConnection* connection) } } -std::vector NetworkBase::save_for_network(const std::vector& objects) const +std::vector NetworkBase::SaveForNetwork(const std::vector& objects) const { std::vector result; auto ms = OpenRCT2::MemoryStream(); @@ -1426,7 +1443,7 @@ std::vector NetworkBase::save_for_network(const std::vectorQueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_CHAT(const char* text, const std::vector& playerIds) +void NetworkBase::ServerSendChat(const char* text, const std::vector& playerIds) { NetworkPacket packet(NetworkCommand::Chat); packet.WriteString(text); @@ -1482,7 +1499,7 @@ void NetworkBase::Client_Send_GAME_ACTION(const GameAction* action) _serverConnection->QueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_GAME_ACTION(const GameAction* action) +void NetworkBase::ServerSendGameAction(const GameAction* action) { NetworkPacket packet(NetworkCommand::GameAction); @@ -1494,10 +1511,10 @@ void NetworkBase::Server_Send_GAME_ACTION(const GameAction* action) SendPacketToClients(packet); } -void NetworkBase::Server_Send_TICK() +void NetworkBase::ServerSendTick() { NetworkPacket packet(NetworkCommand::Tick); - packet << gCurrentTicks << scenario_rand_state().s0; + packet << gCurrentTicks << ScenarioRandState().s0; uint32_t flags = 0; // Simple counter which limits how often a sprite checksum gets sent. // This can get somewhat expensive, so we don't want to push it every tick in release, @@ -1521,7 +1538,7 @@ void NetworkBase::Server_Send_TICK() SendPacketToClients(packet); } -void NetworkBase::Server_Send_PLAYERINFO(int32_t playerId) +void NetworkBase::ServerSendPlayerInfo(int32_t playerId) { NetworkPacket packet(NetworkCommand::PlayerInfo); packet << gCurrentTicks; @@ -1534,7 +1551,7 @@ void NetworkBase::Server_Send_PLAYERINFO(int32_t playerId) SendPacketToClients(packet); } -void NetworkBase::Server_Send_PLAYERLIST() +void NetworkBase::ServerSendPlayerList() { NetworkPacket packet(NetworkCommand::PlayerList); packet << gCurrentTicks << static_cast(player_list.size()); @@ -1551,7 +1568,7 @@ void NetworkBase::Client_Send_PING() _serverConnection->QueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_PING() +void NetworkBase::ServerSendPing() { last_ping_sent_time = Platform::GetTicks(); NetworkPacket packet(NetworkCommand::Ping); @@ -1562,7 +1579,7 @@ void NetworkBase::Server_Send_PING() SendPacketToClients(packet, true); } -void NetworkBase::Server_Send_PINGLIST() +void NetworkBase::ServerSendPingList() { NetworkPacket packet(NetworkCommand::PingList); packet << static_cast(player_list.size()); @@ -1573,7 +1590,7 @@ void NetworkBase::Server_Send_PINGLIST() SendPacketToClients(packet); } -void NetworkBase::Server_Send_SETDISCONNECTMSG(NetworkConnection& connection, const char* msg) +void NetworkBase::ServerSendSetDisconnectMsg(NetworkConnection& connection, const char* msg) { NetworkPacket packet(NetworkCommand::DisconnectMessage); packet.WriteString(msg); @@ -1583,15 +1600,19 @@ void NetworkBase::Server_Send_SETDISCONNECTMSG(NetworkConnection& connection, co json_t NetworkBase::GetServerInfoAsJson() const { json_t jsonObj = { - { "name", gConfigNetwork.ServerName }, { "requiresPassword", _password.size() > 0 }, - { "version", network_get_version() }, { "players", GetNumVisiblePlayers() }, - { "maxPlayers", gConfigNetwork.Maxplayers }, { "description", gConfigNetwork.ServerDescription }, - { "greeting", gConfigNetwork.ServerGreeting }, { "dedicated", gOpenRCT2Headless }, + { "name", gConfigNetwork.ServerName }, + { "requiresPassword", _password.size() > 0 }, + { "version", NetworkGetVersion() }, + { "players", GetNumVisiblePlayers() }, + { "maxPlayers", gConfigNetwork.Maxplayers }, + { "description", gConfigNetwork.ServerDescription }, + { "greeting", gConfigNetwork.ServerGreeting }, + { "dedicated", gOpenRCT2Headless }, }; return jsonObj; } -void NetworkBase::Server_Send_GAMEINFO(NetworkConnection& connection) +void NetworkBase::ServerSendGameInfo(NetworkConnection& connection) { NetworkPacket packet(NetworkCommand::GameInfo); # ifndef DISABLE_HTTP @@ -1614,14 +1635,14 @@ void NetworkBase::Server_Send_GAMEINFO(NetworkConnection& connection) connection.QueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_SHOWERROR(NetworkConnection& connection, StringId title, StringId message) +void NetworkBase::ServerSendShowError(NetworkConnection& connection, StringId title, StringId message) { NetworkPacket packet(NetworkCommand::ShowError); packet << title << message; connection.QueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_GROUPLIST(NetworkConnection& connection) +void NetworkBase::ServerSendGroupList(NetworkConnection& connection) { NetworkPacket packet(NetworkCommand::GroupList); packet << static_cast(group_list.size()) << default_group; @@ -1632,7 +1653,7 @@ void NetworkBase::Server_Send_GROUPLIST(NetworkConnection& connection) connection.QueuePacket(std::move(packet)); } -void NetworkBase::Server_Send_EVENT_PLAYER_JOINED(const char* playerName) +void NetworkBase::ServerSendEventPlayerJoined(const char* playerName) { NetworkPacket packet(NetworkCommand::Event); packet << static_cast(SERVER_EVENT_PLAYER_JOINED); @@ -1640,7 +1661,7 @@ void NetworkBase::Server_Send_EVENT_PLAYER_JOINED(const char* playerName) SendPacketToClients(packet); } -void NetworkBase::Server_Send_EVENT_PLAYER_DISCONNECTED(const char* playerName, const char* reason) +void NetworkBase::ServerSendEventPlayerDisconnected(const char* playerName, const char* reason) { NetworkPacket packet(NetworkCommand::Event); packet << static_cast(SERVER_EVENT_PLAYER_DISCONNECTED); @@ -1712,7 +1733,7 @@ void NetworkBase::ProcessPacket(NetworkConnection& connection, NetworkPacket& pa } catch (const std::exception& ex) { - log_verbose("Exception during packet processing: %s", ex.what()); + LOG_VERBOSE("Exception during packet processing: %s", ex.what()); } } } @@ -1817,7 +1838,7 @@ void NetworkBase::ProcessPlayerList() if (_playerListInvalidated) { _playerListInvalidated = false; - Server_Send_PLAYERLIST(); + ServerSendPlayerList(); } } else @@ -1967,24 +1988,24 @@ void NetworkBase::ServerClientDisconnected(std::unique_ptr& c }; if (has_disconnected_args[1] != nullptr) { - format_string(text, 256, STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_WITH_REASON, has_disconnected_args); + FormatStringLegacy(text, 256, STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_WITH_REASON, has_disconnected_args); } else { - format_string(text, 256, STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_NO_REASON, &(has_disconnected_args[0])); + FormatStringLegacy(text, 256, STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_NO_REASON, &(has_disconnected_args[0])); } - chat_history_add(text); - Peep* pickup_peep = network_get_pickup_peep(connection_player->Id); + ChatAddHistory(text); + Peep* pickup_peep = NetworkGetPickupPeep(connection_player->Id); if (pickup_peep != nullptr) { PeepPickupAction pickupAction{ PeepPickupType::Cancel, - pickup_peep->sprite_index, - { network_get_pickup_peep_old_x(connection_player->Id), 0, 0 }, - network_get_current_player_id() }; + pickup_peep->Id, + { NetworkGetPickupPeepOldX(connection_player->Id), 0, 0 }, + NetworkGetCurrentPlayerId() }; auto res = GameActions::Execute(&pickupAction); } - Server_Send_EVENT_PLAYER_DISCONNECTED( + ServerSendEventPlayerDisconnected( const_cast(connection_player->Name.c_str()), connection->GetLastDisconnectReason()); // Log player disconnected event @@ -2119,10 +2140,10 @@ std::string NetworkBase::MakePlayerNameUnique(const std::string& name) void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& packet) { - auto keyPath = network_get_private_key_path(gConfigNetwork.PlayerName); + auto keyPath = NetworkGetPrivateKeyPath(gConfigNetwork.PlayerName); if (!File::Exists(keyPath)) { - log_error("Key file (%s) was not found. Restart client to re-generate it.", keyPath.c_str()); + LOG_ERROR("Key file (%s) was not found. Restart client to re-generate it.", keyPath.c_str()); return; } @@ -2136,7 +2157,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack } catch (const std::exception&) { - log_error("Failed to load key %s", keyPath.c_str()); + LOG_ERROR("Failed to load key %s", keyPath.c_str()); connection.SetLastDisconnectReason(STR_MULTIPLAYER_VERIFICATION_FAILURE); connection.Disconnect(); return; @@ -2153,7 +2174,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack bool ok = _key.Sign(_challenge.data(), _challenge.size(), signature); if (!ok) { - log_error("Failed to sign server's challenge."); + LOG_ERROR("Failed to sign server's challenge."); connection.SetLastDisconnectReason(STR_MULTIPLAYER_VERIFICATION_FAILURE); connection.Disconnect(); return; @@ -2165,7 +2186,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack Client_Send_AUTH(gConfigNetwork.PlayerName, gCustomPassword, pubkey, signature); } -void NetworkBase::Server_Handle_REQUEST_GAMESTATE(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::ServerHandleRequestGamestate(NetworkConnection& connection, NetworkPacket& packet) { uint32_t tick; packet >> tick; @@ -2207,9 +2228,9 @@ void NetworkBase::Server_Handle_REQUEST_GAMESTATE(NetworkConnection& connection, } } -void NetworkBase::Server_Handle_HEARTBEAT(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::ServerHandleHeartbeat(NetworkConnection& connection, NetworkPacket& packet) { - log_verbose("Client %s heartbeat", connection.Socket->GetHostName()); + LOG_VERBOSE("Client %s heartbeat", connection.Socket->GetHostName()); connection.ResetLastPacketTime(); } @@ -2261,7 +2282,7 @@ void NetworkBase::Client_Handle_AUTH(NetworkConnection& connection, NetworkPacke } } -void NetworkBase::Server_Client_Joined(std::string_view name, const std::string& keyhash, NetworkConnection& connection) +void NetworkBase::ServerClientJoined(std::string_view name, const std::string& keyhash, NetworkConnection& connection) { auto player = AddPlayer(std::string(name), keyhash); connection.Player = player; @@ -2269,26 +2290,26 @@ void NetworkBase::Server_Client_Joined(std::string_view name, const std::string& { char text[256]; const char* player_name = static_cast(player->Name.c_str()); - format_string(text, 256, STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, &player_name); - chat_history_add(text); + FormatStringLegacy(text, 256, STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, &player_name); + ChatAddHistory(text); auto& context = GetContext(); auto& objManager = context.GetObjectManager(); auto objects = objManager.GetPackableObjects(); - Server_Send_OBJECTS_LIST(connection, objects); - Server_Send_SCRIPTS(connection); + ServerSendObjectsList(connection, objects); + ServerSendScripts(connection); // Log player joining event std::string playerNameHash = player->Name + " (" + keyhash + ")"; player_name = static_cast(playerNameHash.c_str()); - format_string(text, 256, STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, &player_name); + FormatStringLegacy(text, 256, STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, &player_name); AppendServerLog(text); ProcessPlayerJoinedPluginHooks(player->Id); } } -void NetworkBase::Server_Handle_TOKEN(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) +void NetworkBase::ServerHandleToken(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) { uint8_t token_size = 10 + (rand() & 0x7f); connection.Challenge.resize(token_size); @@ -2296,7 +2317,7 @@ void NetworkBase::Server_Handle_TOKEN(NetworkConnection& connection, [[maybe_unu { connection.Challenge[i] = static_cast(rand() & 0xff); } - Server_Send_TOKEN(connection); + ServerSendToken(connection); } void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, NetworkPacket& packet) @@ -2320,11 +2341,11 @@ void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, Netw index + 1, totalObjects, }; - format_string(objectListMsg, 256, STR_MULTIPLAYER_RECEIVING_OBJECTS_LIST, &args); + 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(); }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ objectListMsg }); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); ContextOpenIntent(&intent); uint8_t objectType{}; @@ -2333,20 +2354,20 @@ void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, Netw if (objectType == 0) { // DAT - auto entry = reinterpret_cast(packet.Read(sizeof(rct_object_entry))); + auto entry = reinterpret_cast(packet.Read(sizeof(RCTObjectEntry))); if (entry != nullptr) { const auto* object = repo.FindObject(entry); if (object == nullptr) { auto objectName = std::string(entry->GetName()); - log_verbose("Requesting object %s with checksum %x from server", objectName.c_str(), entry->checksum); + LOG_VERBOSE("Requesting object %s with checksum %x from server", objectName.c_str(), entry->checksum); _missingObjects.push_back(ObjectEntryDescriptor(*entry)); } else if (object->ObjectEntry.checksum != entry->checksum || object->ObjectEntry.flags != entry->flags) { auto objectName = std::string(entry->GetName()); - log_warning( + LOG_WARNING( "Object %s has different checksum/flags (%x/%x) than server (%x/%x).", objectName.c_str(), object->ObjectEntry.checksum, object->ObjectEntry.flags, entry->checksum, entry->flags); } @@ -2362,7 +2383,7 @@ void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, Netw if (object == nullptr) { auto objectName = std::string(identifier); - log_verbose("Requesting object %s from server", objectName.c_str()); + LOG_VERBOSE("Requesting object %s from server", objectName.c_str()); _missingObjects.push_back(ObjectEntryDescriptor(objectName)); } } @@ -2371,35 +2392,68 @@ void NetworkBase::Client_Handle_OBJECTS_LIST(NetworkConnection& connection, Netw if (index + 1 >= totalObjects) { - log_verbose("client received object list, it has %u entries", totalObjects); + LOG_VERBOSE("client received object list, it has %u entries", totalObjects); Client_Send_MAPREQUEST(_missingObjects); _missingObjects.clear(); } } -void NetworkBase::Client_Handle_SCRIPTS(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::Client_Handle_SCRIPTS_HEADER(NetworkConnection& connection, NetworkPacket& packet) { uint32_t numScripts{}; - packet >> numScripts; + uint32_t dataSize{}; + packet >> numScripts >> dataSize; # ifdef ENABLE_SCRIPTING - auto& scriptEngine = GetContext().GetScriptEngine(); - for (uint32_t i = 0; i < numScripts; i++) - { - uint32_t codeLength{}; - packet >> codeLength; - auto code = std::string_view(reinterpret_cast(packet.Read(codeLength)), codeLength); - scriptEngine.AddNetworkPlugin(code); - } + _serverScriptsData.data.Clear(); + _serverScriptsData.pluginCount = numScripts; + _serverScriptsData.dataSize = dataSize; # else if (numScripts > 0) { - connection.SetLastDisconnectReason("The server requires plugin support."); + connection.SetLastDisconnectReason("The client requires plugin support."); Close(); } # endif } +void NetworkBase::Client_Handle_SCRIPTS_DATA(NetworkConnection& connection, NetworkPacket& packet) +{ +# ifdef ENABLE_SCRIPTING + uint32_t dataSize{}; + packet >> dataSize; + Guard::Assert(dataSize > 0); + + const auto* data = packet.Read(dataSize); + Guard::Assert(data != nullptr); + + auto& scriptsData = _serverScriptsData.data; + scriptsData.Write(data, dataSize); + + if (scriptsData.GetLength() == _serverScriptsData.dataSize) + { + auto& scriptEngine = GetContext().GetScriptEngine(); + + scriptsData.SetPosition(0); + for (uint32_t i = 0; i < _serverScriptsData.pluginCount; ++i) + { + const auto codeSize = scriptsData.ReadValue(); + const auto scriptData = scriptsData.ReadArray(codeSize); + + auto code = std::string_view(reinterpret_cast(scriptData.get()), codeSize); + scriptEngine.AddNetworkPlugin(code); + } + Guard::Assert(scriptsData.GetPosition() == scriptsData.GetLength()); + + // Empty the current buffer. + _serverScriptsData = {}; + } +# else + connection.SetLastDisconnectReason("The client requires plugin support."); + Close(); +# endif +} + void NetworkBase::Client_Handle_GAMESTATE(NetworkConnection& connection, NetworkPacket& packet) { uint32_t tick; @@ -2420,7 +2474,7 @@ void NetworkBase::Client_Handle_GAMESTATE(NetworkConnection& connection, Network const uint8_t* data = packet.Read(dataSize); _serverGameState.Write(data, dataSize); - log_verbose( + LOG_VERBOSE( "Received Game State %.02f%%", (static_cast(_serverGameState.GetLength()) / static_cast(totalSize)) * 100.0f); @@ -2437,7 +2491,7 @@ void NetworkBase::Client_Handle_GAMESTATE(NetworkConnection& connection, Network const GameStateSnapshot_t* desyncSnapshot = snapshots->GetLinkedSnapshot(tick); if (desyncSnapshot != nullptr) { - GameStateCompareData_t cmpData = snapshots->Compare(serverSnapshot, *desyncSnapshot); + GameStateCompareData cmpData = snapshots->Compare(serverSnapshot, *desyncSnapshot); std::string outputPath = GetContext().GetPlatformEnvironment()->GetDirectoryPath(DIRBASE::USER, DIRID::LOG_DESYNCS); @@ -2452,27 +2506,27 @@ void NetworkBase::Client_Handle_GAMESTATE(NetworkConnection& connection, Network if (snapshots->LogCompareDataToFile(outputFile, cmpData)) { - log_info("Wrote desync report to '%s'", outputFile.c_str()); + LOG_INFO("Wrote desync report to '%s'", outputFile.c_str()); auto ft = Formatter(); ft.Add(uniqueFileName); char str_desync[1024]; - format_string(str_desync, sizeof(str_desync), STR_DESYNC_REPORT, ft.Data()); + FormatStringLegacy(str_desync, sizeof(str_desync), STR_DESYNC_REPORT, ft.Data()); auto intent = Intent(WindowClass::NetworkStatus); - intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); ContextOpenIntent(&intent); } } } } -void NetworkBase::Server_Handle_MAPREQUEST(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::ServerHandleMapRequest(NetworkConnection& connection, NetworkPacket& packet) { uint32_t size; packet >> size; - log_verbose("Client requested %u objects", size); + LOG_VERBOSE("Client requested %u objects", size); auto& repo = GetContext().GetObjectRepository(); for (uint32_t i = 0; i < size; i++) { @@ -2483,21 +2537,21 @@ void NetworkBase::Server_Handle_MAPREQUEST(NetworkConnection& connection, Networ const ObjectRepositoryItem* item{}; if (generation == static_cast(ObjectGeneration::DAT)) { - const auto* entry = reinterpret_cast(packet.Read(sizeof(rct_object_entry))); + const auto* entry = reinterpret_cast(packet.Read(sizeof(RCTObjectEntry))); objectName = std::string(entry->GetName()); - log_verbose("Client requested object %s", objectName.c_str()); + LOG_VERBOSE("Client requested object %s", objectName.c_str()); item = repo.FindObject(entry); } else { objectName = std::string(packet.ReadString()); - log_verbose("Client requested object %s", objectName.c_str()); + LOG_VERBOSE("Client requested object %s", objectName.c_str()); item = repo.FindObject(objectName); } if (item == nullptr) { - log_warning("Client tried getting non-existent object %s from us.", objectName.c_str()); + LOG_WARNING("Client tried getting non-existent object %s from us.", objectName.c_str()); } else { @@ -2506,12 +2560,12 @@ void NetworkBase::Server_Handle_MAPREQUEST(NetworkConnection& connection, Networ } auto player_name = connection.Player->Name.c_str(); - Server_Send_MAP(&connection); - Server_Send_EVENT_PLAYER_JOINED(player_name); - Server_Send_GROUPLIST(connection); + ServerSendMap(&connection); + ServerSendEventPlayerJoined(player_name); + ServerSendGroupList(connection); } -void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::ServerHandleAuth(NetworkConnection& connection, NetworkPacket& packet) { if (connection.AuthStatus != NetworkAuth::Ok) { @@ -2560,10 +2614,10 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke const std::string hash = connection.Key.PublicKeyHash(); if (verified) { - log_verbose("Connection %s: Signature verification ok. Hash %s", hostName, hash.c_str()); + LOG_VERBOSE("Connection %s: Signature verification ok. Hash %s", hostName, hash.c_str()); if (gConfigNetwork.KnownKeysOnly && _userManager.GetUserByHash(hash) == nullptr) { - log_verbose("Connection %s: Hash %s, not known", hostName, hash.c_str()); + LOG_VERBOSE("Connection %s: Hash %s, not known", hostName, hash.c_str()); connection.AuthStatus = NetworkAuth::UnknownKeyDisallowed; } else @@ -2574,13 +2628,13 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke else { connection.AuthStatus = NetworkAuth::VerificationFailure; - log_verbose("Connection %s: Signature verification failed!", hostName); + LOG_VERBOSE("Connection %s: Signature verification failed!", hostName); } } catch (const std::exception&) { connection.AuthStatus = NetworkAuth::VerificationFailure; - log_verbose("Connection %s: Signature verification failed, invalid data!", hostName); + LOG_VERBOSE("Connection %s: Signature verification failed, invalid data!", hostName); } } @@ -2590,34 +2644,34 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke const NetworkGroup* group = GetGroupByID(GetGroupIDByHash(connection.Key.PublicKeyHash())); passwordless = group->CanPerformAction(NetworkPermission::PasswordlessLogin); } - if (gameversion != network_get_version()) + if (gameversion != NetworkGetVersion()) { connection.AuthStatus = NetworkAuth::BadVersion; - log_info("Connection %s: Bad version.", hostName); + LOG_INFO("Connection %s: Bad version.", hostName); } else if (name.empty()) { connection.AuthStatus = NetworkAuth::BadName; - log_info("Connection %s: Bad name.", connection.Socket->GetHostName()); + LOG_INFO("Connection %s: Bad name.", connection.Socket->GetHostName()); } else if (!passwordless) { if (password.empty() && !_password.empty()) { connection.AuthStatus = NetworkAuth::RequirePassword; - log_info("Connection %s: Requires password.", hostName); + LOG_INFO("Connection %s: Requires password.", hostName); } else if (!password.empty() && _password != password) { connection.AuthStatus = NetworkAuth::BadPassword; - log_info("Connection %s: Bad password.", hostName); + LOG_INFO("Connection %s: Bad password.", hostName); } } if (GetNumVisiblePlayers() >= gConfigNetwork.Maxplayers) { connection.AuthStatus = NetworkAuth::Full; - log_info("Connection %s: Server is full.", hostName); + LOG_INFO("Connection %s: Server is full.", hostName); } else if (connection.AuthStatus == NetworkAuth::Verified) { @@ -2625,16 +2679,16 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke if (ProcessPlayerAuthenticatePluginHooks(connection, name, hash)) { connection.AuthStatus = NetworkAuth::Ok; - Server_Client_Joined(name, hash, connection); + ServerClientJoined(name, hash, connection); } else { connection.AuthStatus = NetworkAuth::VerificationFailure; - log_info("Connection %s: Denied by plugin.", hostName); + LOG_INFO("Connection %s: Denied by plugin.", hostName); } } - Server_Send_AUTH(connection); + ServerSendAuth(connection); } } @@ -2666,11 +2720,11 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti (offset + chunksize) / 1024, size / 1024, }; - format_string(str_downloading_map, 256, STR_MULTIPLAYER_DOWNLOADING_MAP, downloading_map_args); + 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(); }); + intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_downloading_map }); + intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { ::GetContext()->GetNetwork().Close(); }); ContextOpenIntent(&intent); std::memcpy(&chunk_buffer[offset], const_cast(static_cast(packet.Read(chunksize))), chunksize); @@ -2680,8 +2734,8 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti GameActions::ResumeQueue(); ContextForceCloseWindowByClass(WindowClass::NetworkStatus); - game_unload_scripts(); - game_notify_map_change(); + GameUnloadScripts(); + GameNotifyMapChange(); bool has_to_free = false; uint8_t* data = &chunk_buffer[0]; @@ -2689,20 +2743,20 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti auto ms = MemoryStream(data, data_size); if (LoadMap(&ms)) { - game_load_init(); - game_load_scripts(); - game_notify_map_changed(); + GameLoadInit(); + GameLoadScripts(); + GameNotifyMapChanged(); _serverState.tick = gCurrentTicks; - // window_network_status_open("Loaded new map from network"); - _serverState.state = NetworkServerState::Ok; + // WindowNetworkStatusOpen("Loaded new map from network"); + _serverState.state = NetworkServerStatus::Ok; _clientMapLoaded = true; gFirstTimeSaving = true; // Notify user he is now online and which shortcut key enables chat - network_chat_show_connected_message(); + NetworkChatShowConnectedMessage(); // Fix invalid vehicle sprite sizes, thus preventing visual corruption of sprites - fix_invalid_vehicle_sprite_sizes(); + FixInvalidVehicleSpriteSizes(); // NOTE: Game actions are normally processed before processing the player list. // Given that during map load game actions are buffered we have to process the @@ -2770,7 +2824,7 @@ void NetworkBase::Client_Handle_CHAT([[maybe_unused]] NetworkConnection& connect auto text = packet.ReadString(); if (!text.empty()) { - chat_history_add(std::string(text)); + ChatAddHistory(std::string(text)); } } @@ -2810,7 +2864,7 @@ static bool ProcessChatMessagePluginHooks(uint8_t playerId, std::string& text) return true; } -void NetworkBase::Server_Handle_CHAT(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::ServerHandleChat(NetworkConnection& connection, NetworkPacket& packet) { auto szText = packet.ReadString(); if (szText.empty()) @@ -2836,8 +2890,8 @@ void NetworkBase::Server_Handle_CHAT(NetworkConnection& connection, NetworkPacke } const char* formatted = FormatChat(connection.Player, text.c_str()); - chat_history_add(formatted); - Server_Send_CHAT(formatted); + ChatAddHistory(formatted); + ServerSendChat(formatted); } void NetworkBase::Client_Handle_GAME_ACTION([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) @@ -2856,7 +2910,7 @@ void NetworkBase::Client_Handle_GAME_ACTION([[maybe_unused]] NetworkConnection& GameAction::Ptr action = GameActions::Create(actionType); if (action == nullptr) { - log_error("Received unregistered game action type: 0x%08X", actionType); + LOG_ERROR("Received unregistered game action type: 0x%08X", actionType); return; } action->Serialise(ds); @@ -2876,7 +2930,7 @@ void NetworkBase::Client_Handle_GAME_ACTION([[maybe_unused]] NetworkConnection& GameActions::Enqueue(std::move(action), tick); } -void NetworkBase::Server_Handle_GAME_ACTION(NetworkConnection& connection, NetworkPacket& packet) +void NetworkBase::ServerHandleGameAction(NetworkConnection& connection, NetworkPacket& packet) { uint32_t tick; GameCommand actionType; @@ -2901,7 +2955,7 @@ void NetworkBase::Server_Handle_GAME_ACTION(NetworkConnection& connection, Netwo NetworkGroup* group = GetGroupByID(connection.Player->Group); if (group == nullptr || group->CanPerformCommand(actionType) == false) { - Server_Send_SHOWERROR(connection, STR_CANT_DO_THIS, STR_PERMISSION_DENIED); + ServerSendShowError(connection, STR_CANT_DO_THIS, STR_PERMISSION_DENIED); return; } } @@ -2910,7 +2964,7 @@ void NetworkBase::Server_Handle_GAME_ACTION(NetworkConnection& connection, Netwo GameAction::Ptr ga = GameActions::Create(actionType); if (ga == nullptr) { - log_error( + LOG_ERROR( "Received unregistered game action type: 0x%08X from player: (%d) %s", actionType, connection.Player->Id, connection.Player->Name.c_str()); return; @@ -2924,7 +2978,7 @@ void NetworkBase::Server_Handle_GAME_ACTION(NetworkConnection& connection, Netwo { if (cooldownIt->second > 0) { - Server_Send_SHOWERROR(connection, STR_CANT_DO_THIS, STR_NETWORK_ACTION_RATE_LIMIT_MESSAGE); + ServerSendShowError(connection, STR_CANT_DO_THIS, STR_NETWORK_ACTION_RATE_LIMIT_MESSAGE); return; } } @@ -2956,7 +3010,7 @@ void NetworkBase::Client_Handle_TICK([[maybe_unused]] NetworkConnection& connect packet >> serverTick >> srand0 >> flags; - ServerTickData_t tickData; + ServerTickData tickData; tickData.srand0 = srand0; tickData.tick = serverTick; @@ -3013,7 +3067,7 @@ void NetworkBase::Client_Handle_PING([[maybe_unused]] NetworkConnection& connect Client_Send_PING(); } -void NetworkBase::Server_Handle_PING(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) +void NetworkBase::ServerHandlePing(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) { int32_t ping = Platform::GetTicks() - connection.PingTime; if (ping < 0) @@ -3023,7 +3077,7 @@ void NetworkBase::Server_Handle_PING(NetworkConnection& connection, [[maybe_unus if (connection.Player != nullptr) { connection.Player->Ping = ping; - window_invalidate_by_number(WindowClass::Player, connection.Player->Id); + WindowInvalidateByNumber(WindowClass::Player, connection.Player->Id); } } @@ -3042,7 +3096,7 @@ void NetworkBase::Client_Handle_PINGLIST([[maybe_unused]] NetworkConnection& con player->Ping = ping; } } - window_invalidate_by_class(WindowClass::Player); + WindowInvalidateByClass(WindowClass::Player); } void NetworkBase::Client_Handle_SETDISCONNECTMSG(NetworkConnection& connection, NetworkPacket& packet) @@ -3054,9 +3108,9 @@ void NetworkBase::Client_Handle_SETDISCONNECTMSG(NetworkConnection& connection, } } -void NetworkBase::Server_Handle_GAMEINFO(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) +void NetworkBase::ServerHandleGameInfo(NetworkConnection& connection, [[maybe_unused]] NetworkPacket& packet) { - Server_Send_GAMEINFO(connection); + ServerSendGameInfo(connection); } void NetworkBase::Client_Handle_SHOWERROR([[maybe_unused]] NetworkConnection& connection, NetworkPacket& packet) @@ -3089,8 +3143,8 @@ void NetworkBase::Client_Handle_EVENT([[maybe_unused]] NetworkConnection& connec case SERVER_EVENT_PLAYER_JOINED: { auto playerName = packet.ReadString(); - auto message = FormatStringId(STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, playerName); - chat_history_add(message); + auto message = FormatStringID(STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, playerName); + ChatAddHistory(message); break; } case SERVER_EVENT_PLAYER_DISCONNECTED: @@ -3100,13 +3154,13 @@ void NetworkBase::Client_Handle_EVENT([[maybe_unused]] NetworkConnection& connec std::string message; if (reason.empty()) { - message = FormatStringId(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_NO_REASON, playerName); + message = FormatStringID(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_NO_REASON, playerName); } else { - message = FormatStringId(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_WITH_REASON, playerName, reason); + message = FormatStringID(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_WITH_REASON, playerName, reason); } - chat_history_add(message); + ChatAddHistory(message); break; } } @@ -3114,7 +3168,7 @@ void NetworkBase::Client_Handle_EVENT([[maybe_unused]] NetworkConnection& connec void NetworkBase::Client_Send_GAMEINFO() { - log_verbose("requesting gameinfo"); + LOG_VERBOSE("requesting gameinfo"); NetworkPacket packet(NetworkCommand::GameInfo); _serverConnection->QueuePacket(std::move(packet)); } @@ -3142,100 +3196,100 @@ void NetworkBase::Client_Handle_GAMEINFO([[maybe_unused]] NetworkConnection& con } } - network_chat_show_server_greeting(); + NetworkChatShowServerGreeting(); } -void network_reconnect() +void NetworkReconnect() { OpenRCT2::GetContext()->GetNetwork().Reconnect(); } -void network_shutdown_client() +void NetworkShutdownClient() { OpenRCT2::GetContext()->GetNetwork().ServerClientDisconnected(); } -int32_t network_begin_client(const std::string& host, int32_t port) +int32_t NetworkBeginClient(const std::string& host, int32_t port) { return OpenRCT2::GetContext()->GetNetwork().BeginClient(host, port); } -int32_t network_begin_server(int32_t port, const std::string& address) +int32_t NetworkBeginServer(int32_t port, const std::string& address) { return OpenRCT2::GetContext()->GetNetwork().BeginServer(port, address); } -void network_update() +void NetworkUpdate() { OpenRCT2::GetContext()->GetNetwork().Update(); } -void network_process_pending() +void NetworkProcessPending() { OpenRCT2::GetContext()->GetNetwork().ProcessPending(); } -void network_flush() +void NetworkFlush() { OpenRCT2::GetContext()->GetNetwork().Flush(); } -int32_t network_get_mode() +int32_t NetworkGetMode() { return OpenRCT2::GetContext()->GetNetwork().GetMode(); } -int32_t network_get_status() +int32_t NetworkGetStatus() { return OpenRCT2::GetContext()->GetNetwork().GetStatus(); } -bool network_is_desynchronised() +bool NetworkIsDesynchronised() { return OpenRCT2::GetContext()->GetNetwork().IsDesynchronised(); } -bool network_check_desynchronisation() +bool NetworkCheckDesynchronisation() { return OpenRCT2::GetContext()->GetNetwork().CheckDesynchronizaton(); } -void network_request_gamestate_snapshot() +void NetworkRequestGamestateSnapshot() { return OpenRCT2::GetContext()->GetNetwork().RequestStateSnapshot(); } -void network_send_tick() +void NetworkSendTick() { - OpenRCT2::GetContext()->GetNetwork().Server_Send_TICK(); + OpenRCT2::GetContext()->GetNetwork().ServerSendTick(); } -NetworkAuth network_get_authstatus() +NetworkAuth NetworkGetAuthstatus() { return OpenRCT2::GetContext()->GetNetwork().GetAuthStatus(); } -uint32_t network_get_server_tick() +uint32_t NetworkGetServerTick() { return OpenRCT2::GetContext()->GetNetwork().GetServerTick(); } -uint8_t network_get_current_player_id() +uint8_t NetworkGetCurrentPlayerId() { return OpenRCT2::GetContext()->GetNetwork().GetPlayerID(); } -int32_t network_get_num_players() +int32_t NetworkGetNumPlayers() { return OpenRCT2::GetContext()->GetNetwork().GetTotalNumPlayers(); } -int32_t network_get_num_visible_players() +int32_t NetworkGetNumVisiblePlayers() { return OpenRCT2::GetContext()->GetNetwork().GetNumVisiblePlayers(); } -const char* network_get_player_name(uint32_t index) +const char* NetworkGetPlayerName(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3243,7 +3297,7 @@ const char* network_get_player_name(uint32_t index) return static_cast(network.player_list[index]->Name.c_str()); } -uint32_t network_get_player_flags(uint32_t index) +uint32_t NetworkGetPlayerFlags(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3251,7 +3305,7 @@ uint32_t network_get_player_flags(uint32_t index) return network.player_list[index]->Flags; } -int32_t network_get_player_ping(uint32_t index) +int32_t NetworkGetPlayerPing(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3259,7 +3313,7 @@ int32_t network_get_player_ping(uint32_t index) return network.player_list[index]->Ping; } -int32_t network_get_player_id(uint32_t index) +int32_t NetworkGetPlayerID(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3267,7 +3321,7 @@ int32_t network_get_player_id(uint32_t index) return network.player_list[index]->Id; } -money32 network_get_player_money_spent(uint32_t index) +money64 NetworkGetPlayerMoneySpent(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3275,7 +3329,7 @@ money32 network_get_player_money_spent(uint32_t index) return network.player_list[index]->MoneySpent; } -std::string network_get_player_ip_address(uint32_t id) +std::string NetworkGetPlayerIPAddress(uint32_t id) { auto& network = OpenRCT2::GetContext()->GetNetwork(); auto conn = network.GetPlayerConnection(id); @@ -3286,7 +3340,7 @@ std::string network_get_player_ip_address(uint32_t id) return {}; } -std::string network_get_player_public_key_hash(uint32_t id) +std::string NetworkGetPlayerPublicKeyHash(uint32_t id) { auto& network = OpenRCT2::GetContext()->GetNetwork(); auto player = network.GetPlayerByID(id); @@ -3297,7 +3351,7 @@ std::string network_get_player_public_key_hash(uint32_t id) return {}; } -void network_add_player_money_spent(uint32_t index, money32 cost) +void NetworkAddPlayerMoneySpent(uint32_t index, money64 cost) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3305,7 +3359,7 @@ void network_add_player_money_spent(uint32_t index, money32 cost) network.player_list[index]->AddMoneySpent(cost); } -int32_t network_get_player_last_action(uint32_t index, int32_t time) +int32_t NetworkGetPlayerLastAction(uint32_t index, int32_t time) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3317,7 +3371,7 @@ int32_t network_get_player_last_action(uint32_t index, int32_t time) return network.player_list[index]->LastAction; } -void network_set_player_last_action(uint32_t index, GameCommand command) +void NetworkSetPlayerLastAction(uint32_t index, GameCommand command) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3326,7 +3380,7 @@ void network_set_player_last_action(uint32_t index, GameCommand command) network.player_list[index]->LastActionTime = Platform::GetTicks(); } -CoordsXYZ network_get_player_last_action_coord(uint32_t index) +CoordsXYZ NetworkGetPlayerLastActionCoord(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, OpenRCT2::GetContext()->GetNetwork().player_list); @@ -3334,7 +3388,7 @@ CoordsXYZ network_get_player_last_action_coord(uint32_t index) return network.player_list[index]->LastActionCoord; } -void network_set_player_last_action_coord(uint32_t index, const CoordsXYZ& coord) +void NetworkSetPlayerLastActionCoord(uint32_t index, const CoordsXYZ& coord) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3345,7 +3399,7 @@ void network_set_player_last_action_coord(uint32_t index, const CoordsXYZ& coord } } -uint32_t network_get_player_commands_ran(uint32_t index) +uint32_t NetworkGetPlayerCommandsRan(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, OpenRCT2::GetContext()->GetNetwork().player_list); @@ -3353,7 +3407,7 @@ uint32_t network_get_player_commands_ran(uint32_t index) return network.player_list[index]->CommandsRan; } -int32_t network_get_player_index(uint32_t id) +int32_t NetworkGetPlayerIndex(uint32_t id) { auto& network = OpenRCT2::GetContext()->GetNetwork(); auto it = network.GetPlayerIteratorByID(id); @@ -3364,7 +3418,7 @@ int32_t network_get_player_index(uint32_t id) return static_cast(network.GetPlayerIteratorByID(id) - network.player_list.begin()); } -uint8_t network_get_player_group(uint32_t index) +uint8_t NetworkGetPlayerGroup(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3372,7 +3426,7 @@ uint8_t network_get_player_group(uint32_t index) return network.player_list[index]->Group; } -void network_set_player_group(uint32_t index, uint32_t groupindex) +void NetworkSetPlayerGroup(uint32_t index, uint32_t groupindex) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.player_list); @@ -3381,7 +3435,7 @@ void network_set_player_group(uint32_t index, uint32_t groupindex) network.player_list[index]->Group = network.group_list[groupindex]->Id; } -int32_t network_get_group_index(uint8_t id) +int32_t NetworkGetGroupIndex(uint8_t id) { auto& network = OpenRCT2::GetContext()->GetNetwork(); auto it = network.GetGroupIteratorByID(id); @@ -3392,7 +3446,7 @@ int32_t network_get_group_index(uint8_t id) return static_cast(network.GetGroupIteratorByID(id) - network.group_list.begin()); } -uint8_t network_get_group_id(uint32_t index) +uint8_t NetworkGetGroupID(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(index, network.group_list); @@ -3400,47 +3454,47 @@ uint8_t network_get_group_id(uint32_t index) return network.group_list[index]->Id; } -int32_t network_get_num_groups() +int32_t NetworkGetNumGroups() { auto& network = OpenRCT2::GetContext()->GetNetwork(); return static_cast(network.group_list.size()); } -const char* network_get_group_name(uint32_t index) +const char* NetworkGetGroupName(uint32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); return network.group_list[index]->GetName().c_str(); } -void network_chat_show_connected_message() +void NetworkChatShowConnectedMessage() { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); std::string s = windowManager->GetKeyboardShortcutString("interface.misc.multiplayer_chat"); const char* sptr = s.c_str(); utf8 buffer[256]; - format_string(buffer, sizeof(buffer), STR_MULTIPLAYER_CONNECTED_CHAT_HINT, &sptr); + FormatStringLegacy(buffer, sizeof(buffer), STR_MULTIPLAYER_CONNECTED_CHAT_HINT, &sptr); NetworkPlayer server; server.Name = "Server"; const char* formatted = NetworkBase::FormatChat(&server, buffer); - chat_history_add(formatted); + ChatAddHistory(formatted); } // Display server greeting if one exists -void network_chat_show_server_greeting() +void NetworkChatShowServerGreeting() { - auto greeting = network_get_server_greeting(); - if (!str_is_null_or_empty(greeting)) + const auto& greeting = NetworkGetServerGreeting(); + if (!greeting.empty()) { thread_local std::string greeting_formatted; greeting_formatted.assign("{OUTLINE}{GREEN}"); greeting_formatted += greeting; - chat_history_add(greeting_formatted); + ChatAddHistory(greeting_formatted); } } -GameActions::Result network_set_player_group( +GameActions::Result NetworkSetPlayerGroup( NetworkPlayerId_t actionPlayerId, NetworkPlayerId_t playerId, uint8_t groupId, bool isExecuting) { auto& network = OpenRCT2::GetContext()->GetNetwork(); @@ -3472,7 +3526,7 @@ GameActions::Result network_set_player_group( { player->Group = groupId; - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) { // Add or update saved user NetworkUserManager& userManager = network._userManager; @@ -3482,7 +3536,7 @@ GameActions::Result network_set_player_group( userManager.Save(); } - window_invalidate_by_number(WindowClass::Player, playerId); + WindowInvalidateByNumber(WindowClass::Player, playerId); // Log set player group event NetworkPlayer* game_command_player = network.GetPlayerByID(actionPlayerId); @@ -3493,13 +3547,13 @@ GameActions::Result network_set_player_group( new_player_group->GetName().c_str(), game_command_player->Name.c_str(), }; - format_string(log_msg, 256, STR_LOG_SET_PLAYER_GROUP, args); - network_append_server_log(log_msg); + FormatStringLegacy(log_msg, 256, STR_LOG_SET_PLAYER_GROUP, args); + NetworkAppendServerLog(log_msg); } return GameActions::Result(); } -GameActions::Result network_modify_groups( +GameActions::Result NetworkModifyGroups( NetworkPlayerId_t actionPlayerId, ModifyGroupType type, uint8_t groupId, const std::string& name, uint32_t permissionIndex, PermissionState permissionState, bool isExecuting) { @@ -3621,7 +3675,7 @@ GameActions::Result network_modify_groups( } break; default: - log_error("Invalid Modify Group Type: %u", static_cast(type)); + LOG_ERROR("Invalid Modify Group Type: %u", static_cast(type)); return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE); } @@ -3630,7 +3684,7 @@ GameActions::Result network_modify_groups( return GameActions::Result(); } -GameActions::Result network_kick_player(NetworkPlayerId_t playerId, bool isExecuting) +GameActions::Result NetworkKickPlayer(NetworkPlayerId_t playerId, bool isExecuting) { auto& network = OpenRCT2::GetContext()->GetNetwork(); NetworkPlayer* player = network.GetPlayerByID(playerId); @@ -3661,18 +3715,18 @@ GameActions::Result network_kick_player(NetworkPlayerId_t playerId, bool isExecu return GameActions::Result(); } -uint8_t network_get_default_group() +uint8_t NetworkGetDefaultGroup() { auto& network = OpenRCT2::GetContext()->GetNetwork(); return network.GetDefaultGroup(); } -int32_t network_get_num_actions() +int32_t NetworkGetNumActions() { return static_cast(NetworkActions::Actions.size()); } -StringId network_get_action_name_string_id(uint32_t index) +StringId NetworkGetActionNameStringID(uint32_t index) { if (index < NetworkActions::Actions.size()) { @@ -3682,7 +3736,7 @@ StringId network_get_action_name_string_id(uint32_t index) return STR_NONE; } -int32_t network_can_perform_action(uint32_t groupindex, NetworkPermission index) +int32_t NetworkCanPerformAction(uint32_t groupindex, NetworkPermission index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(groupindex, network.group_list); @@ -3690,7 +3744,7 @@ int32_t network_can_perform_action(uint32_t groupindex, NetworkPermission index) return network.group_list[groupindex]->CanPerformAction(index); } -int32_t network_can_perform_command(uint32_t groupindex, int32_t index) +int32_t NetworkCanPerformCommand(uint32_t groupindex, int32_t index) { auto& network = OpenRCT2::GetContext()->GetNetwork(); Guard::IndexInRange(groupindex, network.group_list); @@ -3698,7 +3752,7 @@ int32_t network_can_perform_command(uint32_t groupindex, int32_t index) return network.group_list[groupindex]->CanPerformCommand(static_cast(index)); // TODO } -void network_set_pickup_peep(uint8_t playerid, Peep* peep) +void NetworkSetPickupPeep(uint8_t playerid, Peep* peep) { auto& network = OpenRCT2::GetContext()->GetNetwork(); if (network.GetMode() == NETWORK_MODE_NONE) @@ -3715,7 +3769,7 @@ void network_set_pickup_peep(uint8_t playerid, Peep* peep) } } -Peep* network_get_pickup_peep(uint8_t playerid) +Peep* NetworkGetPickupPeep(uint8_t playerid) { auto& network = OpenRCT2::GetContext()->GetNetwork(); if (network.GetMode() == NETWORK_MODE_NONE) @@ -3731,7 +3785,7 @@ Peep* network_get_pickup_peep(uint8_t playerid) return nullptr; } -void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x) +void NetworkSetPickupPeepOldX(uint8_t playerid, int32_t x) { auto& network = OpenRCT2::GetContext()->GetNetwork(); if (network.GetMode() == NETWORK_MODE_NONE) @@ -3748,7 +3802,7 @@ void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x) } } -int32_t network_get_pickup_peep_old_x(uint8_t playerid) +int32_t NetworkGetPickupPeepOldX(uint8_t playerid) { auto& network = OpenRCT2::GetContext()->GetNetwork(); if (network.GetMode() == NETWORK_MODE_NONE) @@ -3764,23 +3818,23 @@ int32_t network_get_pickup_peep_old_x(uint8_t playerid) return -1; } -bool network_is_server_player_invisible() +bool NetworkIsServerPlayerInvisible() { return OpenRCT2::GetContext()->GetNetwork().IsServerPlayerInvisible; } -int32_t network_get_current_player_group_index() +int32_t NetworkGetCurrentPlayerGroupIndex() { auto& network = OpenRCT2::GetContext()->GetNetwork(); NetworkPlayer* player = network.GetPlayerByID(network.GetPlayerID()); if (player != nullptr) { - return network_get_group_index(player->Group); + return NetworkGetGroupIndex(player->Group); } return -1; } -void network_send_chat(const char* text, const std::vector& playerIds) +void NetworkSendChat(const char* text, const std::vector& playerIds) { auto& network = OpenRCT2::GetContext()->GetNetwork(); if (network.GetMode() == NETWORK_MODE_CLIENT) @@ -3800,21 +3854,21 @@ void network_send_chat(const char* text, const std::vector& playerIds) || std::find(playerIds.begin(), playerIds.end(), network.GetPlayerID()) != playerIds.end()) { // Server is one of the recipients - chat_history_add(formatted); + ChatAddHistory(formatted); } - network.Server_Send_CHAT(formatted, playerIds); + network.ServerSendChat(formatted, playerIds); } } } } -void network_send_game_action(const GameAction* action) +void NetworkSendGameAction(const GameAction* action) { auto& network = OpenRCT2::GetContext()->GetNetwork(); switch (network.GetMode()) { case NETWORK_MODE_SERVER: - network.Server_Send_GAME_ACTION(action); + network.ServerSendGameAction(action); break; case NETWORK_MODE_CLIENT: network.Client_Send_GAME_ACTION(action); @@ -3822,13 +3876,13 @@ void network_send_game_action(const GameAction* action) } } -void network_send_password(const std::string& password) +void NetworkSendPassword(const std::string& password) { auto& network = OpenRCT2::GetContext()->GetNetwork(); - const auto keyPath = network_get_private_key_path(gConfigNetwork.PlayerName); + const auto keyPath = NetworkGetPrivateKeyPath(gConfigNetwork.PlayerName); if (!File::Exists(keyPath)) { - log_error("Private key %s missing! Restart the game to generate it.", keyPath.c_str()); + LOG_ERROR("Private key %s missing! Restart the game to generate it.", keyPath.c_str()); return; } try @@ -3838,7 +3892,7 @@ void network_send_password(const std::string& password) } catch (const std::exception&) { - log_error("Error reading private key from %s.", keyPath.c_str()); + LOG_ERROR("Error reading private key from %s.", keyPath.c_str()); return; } const std::string pubkey = network._key.PublicKeyString(); @@ -3851,360 +3905,360 @@ void network_send_password(const std::string& password) network.Client_Send_AUTH(gConfigNetwork.PlayerName, password, pubkey, signature); } -void network_set_password(const char* password) +void NetworkSetPassword(const char* password) { auto& network = OpenRCT2::GetContext()->GetNetwork(); network.SetPassword(password); } -void network_append_chat_log(std::string_view text) +void NetworkAppendChatLog(std::string_view text) { auto& network = OpenRCT2::GetContext()->GetNetwork(); network.AppendChatLog(text); } -void network_append_server_log(const utf8* text) +void NetworkAppendServerLog(const utf8* text) { auto& network = OpenRCT2::GetContext()->GetNetwork(); network.AppendServerLog(text); } -static u8string network_get_keys_directory() +static u8string NetworkGetKeysDirectory() { auto env = GetContext()->GetPlatformEnvironment(); return Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"keys"); } -static u8string network_get_private_key_path(u8string_view playerName) +static u8string NetworkGetPrivateKeyPath(u8string_view playerName) { - return Path::Combine(network_get_keys_directory(), u8string(playerName) + u8".privkey"); + return Path::Combine(NetworkGetKeysDirectory(), u8string(playerName) + u8".privkey"); } -static u8string network_get_public_key_path(u8string_view playerName, u8string_view hash) +static u8string NetworkGetPublicKeyPath(u8string_view playerName, u8string_view hash) { const auto filename = u8string(playerName) + u8"-" + u8string(hash) + u8".pubkey"; - return Path::Combine(network_get_keys_directory(), filename); + return Path::Combine(NetworkGetKeysDirectory(), filename); } -const utf8* network_get_server_name() +u8string NetworkGetServerName() { auto& network = OpenRCT2::GetContext()->GetNetwork(); - return network.ServerName.c_str(); + return network.ServerName; } -const utf8* network_get_server_description() +u8string NetworkGetServerDescription() { auto& network = OpenRCT2::GetContext()->GetNetwork(); - return network.ServerDescription.c_str(); + return network.ServerDescription; } -const utf8* network_get_server_greeting() +u8string NetworkGetServerGreeting() { auto& network = OpenRCT2::GetContext()->GetNetwork(); - return network.ServerGreeting.c_str(); + return network.ServerGreeting; } -const utf8* network_get_server_provider_name() +u8string NetworkGetServerProviderName() { auto& network = OpenRCT2::GetContext()->GetNetwork(); - return network.ServerProviderName.c_str(); + return network.ServerProviderName; } -const utf8* network_get_server_provider_email() +u8string NetworkGetServerProviderEmail() { auto& network = OpenRCT2::GetContext()->GetNetwork(); - return network.ServerProviderEmail.c_str(); + return network.ServerProviderEmail; } -const utf8* network_get_server_provider_website() +u8string NetworkGetServerProviderWebsite() { auto& network = OpenRCT2::GetContext()->GetNetwork(); - return network.ServerProviderWebsite.c_str(); + return network.ServerProviderWebsite; } -std::string network_get_version() +std::string NetworkGetVersion() { return NETWORK_STREAM_ID; } -NetworkStats_t network_get_stats() +NetworkStats NetworkGetStats() { auto& network = OpenRCT2::GetContext()->GetNetwork(); return network.GetStats(); } -NetworkServerState_t network_get_server_state() +NetworkServerState NetworkGetServerState() { auto& network = OpenRCT2::GetContext()->GetNetwork(); return network.GetServerState(); } -bool network_gamestate_snapshots_enabled() +bool NetworkGamestateSnapshotsEnabled() { - return network_get_server_state().gamestateSnapshotsEnabled; + return NetworkGetServerState().gamestateSnapshotsEnabled; } -json_t network_get_server_info_as_json() +json_t NetworkGetServerInfoAsJson() { auto& network = OpenRCT2::GetContext()->GetNetwork(); return network.GetServerInfoAsJson(); } #else -int32_t network_get_mode() +int32_t NetworkGetMode() { return NETWORK_MODE_NONE; } -int32_t network_get_status() +int32_t NetworkGetStatus() { return NETWORK_STATUS_NONE; } -NetworkAuth network_get_authstatus() +NetworkAuth NetworkGetAuthstatus() { return NetworkAuth::None; } -uint32_t network_get_server_tick() +uint32_t NetworkGetServerTick() { return gCurrentTicks; } -void network_flush() +void NetworkFlush() { } -void network_send_tick() +void NetworkSendTick() { } -bool network_is_desynchronised() +bool NetworkIsDesynchronised() { return false; } -bool network_gamestate_snapshots_enabled() +bool NetworkGamestateSnapshotsEnabled() { return false; } -bool network_check_desynchronisation() +bool NetworkCheckDesynchronisation() { return false; } -void network_request_gamestate_snapshot() +void NetworkRequestGamestateSnapshot() { } -void network_send_game_action(const GameAction* action) +void NetworkSendGameAction(const GameAction* action) { } -void network_update() +void NetworkUpdate() { } -void network_process_pending() +void NetworkProcessPending() { } -int32_t network_begin_client(const std::string& host, int32_t port) +int32_t NetworkBeginClient(const std::string& host, int32_t port) { return 1; } -int32_t network_begin_server(int32_t port, const std::string& address) +int32_t NetworkBeginServer(int32_t port, const std::string& address) { return 1; } -int32_t network_get_num_players() +int32_t NetworkGetNumPlayers() { return 1; } -int32_t network_get_num_visible_players() +int32_t NetworkGetNumVisiblePlayers() { return 1; } -const char* network_get_player_name(uint32_t index) +const char* NetworkGetPlayerName(uint32_t index) { return "local (OpenRCT2 compiled without MP)"; } -uint32_t network_get_player_flags(uint32_t index) +uint32_t NetworkGetPlayerFlags(uint32_t index) { return 0; } -int32_t network_get_player_ping(uint32_t index) +int32_t NetworkGetPlayerPing(uint32_t index) { return 0; } -int32_t network_get_player_id(uint32_t index) +int32_t NetworkGetPlayerID(uint32_t index) { return 0; } -money32 network_get_player_money_spent(uint32_t index) +money64 NetworkGetPlayerMoneySpent(uint32_t index) { return 0.00_GBP; } -std::string network_get_player_ip_address(uint32_t id) +std::string NetworkGetPlayerIPAddress(uint32_t id) { return {}; } -std::string network_get_player_public_key_hash(uint32_t id) +std::string NetworkGetPlayerPublicKeyHash(uint32_t id) { return {}; } -void network_add_player_money_spent(uint32_t index, money32 cost) +void NetworkAddPlayerMoneySpent(uint32_t index, money64 cost) { } -int32_t network_get_player_last_action(uint32_t index, int32_t time) +int32_t NetworkGetPlayerLastAction(uint32_t index, int32_t time) { return -999; } -void network_set_player_last_action(uint32_t index, GameCommand command) +void NetworkSetPlayerLastAction(uint32_t index, GameCommand command) { } -CoordsXYZ network_get_player_last_action_coord(uint32_t index) +CoordsXYZ NetworkGetPlayerLastActionCoord(uint32_t index) { return { 0, 0, 0 }; } -void network_set_player_last_action_coord(uint32_t index, const CoordsXYZ& coord) +void NetworkSetPlayerLastActionCoord(uint32_t index, const CoordsXYZ& coord) { } -uint32_t network_get_player_commands_ran(uint32_t index) +uint32_t NetworkGetPlayerCommandsRan(uint32_t index) { return 0; } -int32_t network_get_player_index(uint32_t id) +int32_t NetworkGetPlayerIndex(uint32_t id) { return -1; } -uint8_t network_get_player_group(uint32_t index) +uint8_t NetworkGetPlayerGroup(uint32_t index) { return 0; } -void network_set_player_group(uint32_t index, uint32_t groupindex) +void NetworkSetPlayerGroup(uint32_t index, uint32_t groupindex) { } -int32_t network_get_group_index(uint8_t id) +int32_t NetworkGetGroupIndex(uint8_t id) { return -1; } -uint8_t network_get_group_id(uint32_t index) +uint8_t NetworkGetGroupID(uint32_t index) { return 0; } -int32_t network_get_num_groups() +int32_t NetworkGetNumGroups() { return 0; } -const char* network_get_group_name(uint32_t index) +const char* NetworkGetGroupName(uint32_t index) { return ""; }; -GameActions::Result network_set_player_group( +GameActions::Result NetworkSetPlayerGroup( NetworkPlayerId_t actionPlayerId, NetworkPlayerId_t playerId, uint8_t groupId, bool isExecuting) { return GameActions::Result(); } -GameActions::Result network_modify_groups( +GameActions::Result NetworkModifyGroups( NetworkPlayerId_t actionPlayerId, ModifyGroupType type, uint8_t groupId, const std::string& name, uint32_t permissionIndex, PermissionState permissionState, bool isExecuting) { return GameActions::Result(); } -GameActions::Result network_kick_player(NetworkPlayerId_t playerId, bool isExecuting) +GameActions::Result NetworkKickPlayer(NetworkPlayerId_t playerId, bool isExecuting) { return GameActions::Result(); } -uint8_t network_get_default_group() +uint8_t NetworkGetDefaultGroup() { return 0; } -int32_t network_get_num_actions() +int32_t NetworkGetNumActions() { return 0; } -StringId network_get_action_name_string_id(uint32_t index) +StringId NetworkGetActionNameStringID(uint32_t index) { return -1; } -int32_t network_can_perform_action(uint32_t groupindex, NetworkPermission index) +int32_t NetworkCanPerformAction(uint32_t groupindex, NetworkPermission index) { return 0; } -int32_t network_can_perform_command(uint32_t groupindex, int32_t index) +int32_t NetworkCanPerformCommand(uint32_t groupindex, int32_t index) { return 0; } -void network_set_pickup_peep(uint8_t playerid, Peep* peep) +void NetworkSetPickupPeep(uint8_t playerid, Peep* peep) { _pickup_peep = peep; } -Peep* network_get_pickup_peep(uint8_t playerid) +Peep* NetworkGetPickupPeep(uint8_t playerid) { return _pickup_peep; } -void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x) +void NetworkSetPickupPeepOldX(uint8_t playerid, int32_t x) { _pickup_peep_old_x = x; } -int32_t network_get_pickup_peep_old_x(uint8_t playerid) +int32_t NetworkGetPickupPeepOldX(uint8_t playerid) { return _pickup_peep_old_x; } -void network_send_chat(const char* text, const std::vector& playerIds) +void NetworkSendChat(const char* text, const std::vector& playerIds) { } -void network_send_password(const std::string& password) +void NetworkSendPassword(const std::string& password) { } -void network_reconnect() +void NetworkReconnect() { } -void network_shutdown_client() +void NetworkShutdownClient() { } -void network_set_password(const char* password) +void NetworkSetPassword(const char* password) { } -uint8_t network_get_current_player_id() +uint8_t NetworkGetCurrentPlayerId() { return 0; } -int32_t network_get_current_player_group_index() +int32_t NetworkGetCurrentPlayerGroupIndex() { return 0; } -bool network_is_server_player_invisible() +bool NetworkIsServerPlayerInvisible() { return false; } -void network_append_chat_log(std::string_view) +void NetworkAppendChatLog(std::string_view) { } -void network_append_server_log(const utf8* text) +void NetworkAppendServerLog(const utf8* text) { } -const utf8* network_get_server_name() +u8string NetworkGetServerName() { - return nullptr; + return u8string(); } -const utf8* network_get_server_description() +u8string NetworkGetServerDescription() { - return nullptr; + return u8string(); } -const utf8* network_get_server_greeting() +u8string NetworkGetServerGreeting() { - return nullptr; + return u8string(); } -const utf8* network_get_server_provider_name() +u8string NetworkGetServerProviderName() { - return nullptr; + return u8string(); } -const utf8* network_get_server_provider_email() +u8string NetworkGetServerProviderEmail() { - return nullptr; + return u8string(); } -const utf8* network_get_server_provider_website() +u8string NetworkGetServerProviderWebsite() { - return nullptr; + return u8string(); } -std::string network_get_version() +std::string NetworkGetVersion() { return "Multiplayer disabled"; } -NetworkStats_t network_get_stats() +NetworkStats NetworkGetStats() { - return NetworkStats_t{}; + return NetworkStats{}; } -NetworkServerState_t network_get_server_state() +NetworkServerState NetworkGetServerState() { - return NetworkServerState_t{}; + return NetworkServerState{}; } -json_t network_get_server_info_as_json() +json_t NetworkGetServerInfoAsJson() { return {}; } diff --git a/src/openrct2/network/NetworkBase.h b/src/openrct2/network/NetworkBase.h index e498158def..87c5b2e31d 100644 --- a/src/openrct2/network/NetworkBase.h +++ b/src/openrct2/network/NetworkBase.h @@ -51,7 +51,7 @@ public: // Common void BeginChatLog(); void AppendChatLog(std::string_view s); void CloseChatLog(); - NetworkStats_t GetStats() const; + NetworkStats GetStats() const; json_t GetServerInfoAsJson() const; bool ProcessConnection(NetworkConnection& connection); void CloseConnection(); @@ -79,40 +79,40 @@ public: // Server void UpdateServer(); void ServerClientDisconnected(std::unique_ptr& connection); bool SaveMap(OpenRCT2::IStream* stream, const std::vector& objects) const; - std::vector save_for_network(const std::vector& objects) const; + std::vector SaveForNetwork(const std::vector& objects) const; std::string MakePlayerNameUnique(const std::string& name); // Packet dispatchers. - void Server_Send_AUTH(NetworkConnection& connection); - void Server_Send_TOKEN(NetworkConnection& connection); - void Server_Send_MAP(NetworkConnection* connection = nullptr); - void Server_Send_CHAT(const char* text, const std::vector& playerIds = {}); - void Server_Send_GAME_ACTION(const GameAction* action); - void Server_Send_TICK(); - void Server_Send_PLAYERINFO(int32_t playerId); - void Server_Send_PLAYERLIST(); - void Server_Send_PING(); - void Server_Send_PINGLIST(); - void Server_Send_SETDISCONNECTMSG(NetworkConnection& connection, const char* msg); - void Server_Send_GAMEINFO(NetworkConnection& connection); - void Server_Send_SHOWERROR(NetworkConnection& connection, StringId title, StringId message); - void Server_Send_GROUPLIST(NetworkConnection& connection); - void Server_Send_EVENT_PLAYER_JOINED(const char* playerName); - void Server_Send_EVENT_PLAYER_DISCONNECTED(const char* playerName, const char* reason); - void Server_Send_OBJECTS_LIST(NetworkConnection& connection, const std::vector& objects) const; - void Server_Send_SCRIPTS(NetworkConnection& connection); + void ServerSendAuth(NetworkConnection& connection); + void ServerSendToken(NetworkConnection& connection); + void ServerSendMap(NetworkConnection* connection = nullptr); + void ServerSendChat(const char* text, const std::vector& playerIds = {}); + void ServerSendGameAction(const GameAction* action); + void ServerSendTick(); + void ServerSendPlayerInfo(int32_t playerId); + void ServerSendPlayerList(); + void ServerSendPing(); + void ServerSendPingList(); + void ServerSendSetDisconnectMsg(NetworkConnection& connection, const char* msg); + void ServerSendGameInfo(NetworkConnection& connection); + void ServerSendShowError(NetworkConnection& connection, StringId title, StringId message); + void ServerSendGroupList(NetworkConnection& connection); + void ServerSendEventPlayerJoined(const char* playerName); + void ServerSendEventPlayerDisconnected(const char* playerName, const char* reason); + void ServerSendObjectsList(NetworkConnection& connection, const std::vector& objects) const; + void ServerSendScripts(NetworkConnection& connection); // Handlers - void Server_Handle_REQUEST_GAMESTATE(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_HEARTBEAT(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_AUTH(NetworkConnection& connection, NetworkPacket& packet); - void Server_Client_Joined(std::string_view name, const std::string& keyhash, NetworkConnection& connection); - void Server_Handle_CHAT(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_GAME_ACTION(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_PING(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_GAMEINFO(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& packet); - void Server_Handle_MAPREQUEST(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleRequestGamestate(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleHeartbeat(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleAuth(NetworkConnection& connection, NetworkPacket& packet); + void ServerClientJoined(std::string_view name, const std::string& keyhash, NetworkConnection& connection); + void ServerHandleChat(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleGameAction(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandlePing(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleGameInfo(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleToken(NetworkConnection& connection, NetworkPacket& packet); + void ServerHandleMapRequest(NetworkConnection& connection, NetworkPacket& packet); public: // Client void Reconnect(); @@ -128,7 +128,7 @@ public: // Client bool CheckDesynchronizaton(); void RequestStateSnapshot(); bool IsDesynchronised() const noexcept; - NetworkServerState_t GetServerState() const noexcept; + NetworkServerState GetServerState() const noexcept; void ServerClientDisconnected(); bool LoadMap(OpenRCT2::IStream* stream); void UpdateClient(); @@ -162,7 +162,8 @@ public: // Client void Client_Handle_EVENT(NetworkConnection& connection, NetworkPacket& packet); void Client_Handle_TOKEN(NetworkConnection& connection, NetworkPacket& packet); void Client_Handle_OBJECTS_LIST(NetworkConnection& connection, NetworkPacket& packet); - void Client_Handle_SCRIPTS(NetworkConnection& connection, NetworkPacket& packet); + void Client_Handle_SCRIPTS_HEADER(NetworkConnection& connection, NetworkPacket& packet); + void Client_Handle_SCRIPTS_DATA(NetworkConnection& connection, NetworkPacket& packet); void Client_Handle_GAMESTATE(NetworkConnection& connection, NetworkPacket& packet); std::vector _challenge; @@ -210,25 +211,32 @@ private: // Client Data std::vector players; }; - struct ServerTickData_t + struct ServerTickData { uint32_t srand0; uint32_t tick; std::string spriteHash; }; + struct ServerScriptsData + { + uint32_t pluginCount{}; + uint32_t dataSize{}; + OpenRCT2::MemoryStream data; + }; + std::unordered_map client_command_handlers; std::unique_ptr _serverConnection; std::map _pendingPlayerLists; std::multimap _pendingPlayerInfo; - std::map _serverTickData; + std::map _serverTickData; std::vector _missingObjects; std::string _host; std::string _chatLogPath; std::string _chatLogFilenameFormat = "%Y%m%d-%H%M%S.txt"; std::string _password; OpenRCT2::MemoryStream _serverGameState; - NetworkServerState_t _serverState; + NetworkServerState _serverState; uint32_t _lastSentHeartbeat = 0; uint32_t last_ping_sent_time = 0; uint32_t server_connect_time = 0; @@ -239,6 +247,7 @@ private: // Client Data SocketStatus _lastConnectStatus = SocketStatus::Closed; bool _requireReconnect = false; bool _clientMapLoaded = false; + ServerScriptsData _serverScriptsData{}; }; #endif // DISABLE_NETWORK diff --git a/src/openrct2/network/NetworkConnection.cpp b/src/openrct2/network/NetworkConnection.cpp index 3e60293ecb..7cc547f9bb 100644 --- a/src/openrct2/network/NetworkConnection.cpp +++ b/src/openrct2/network/NetworkConnection.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,6 +12,7 @@ # include "NetworkConnection.h" # include "../core/String.hpp" +# include "../localisation/Formatting.h" # include "../localisation/Localisation.h" # include "../platform/Platform.h" # include "Socket.h" @@ -198,7 +199,7 @@ void NetworkConnection::SetLastDisconnectReason(std::string_view src) void NetworkConnection::SetLastDisconnectReason(const StringId string_id, void* args) { char buffer[NETWORK_DISCONNECT_REASON_BUFFER_SIZE]; - format_string(buffer, NETWORK_DISCONNECT_REASON_BUFFER_SIZE, string_id, args); + OpenRCT2::FormatStringLegacy(buffer, NETWORK_DISCONNECT_REASON_BUFFER_SIZE, string_id, args); SetLastDisconnectReason(buffer); } diff --git a/src/openrct2/network/NetworkConnection.h b/src/openrct2/network/NetworkConnection.h index aae6b63a5d..b0957e1bd8 100644 --- a/src/openrct2/network/NetworkConnection.h +++ b/src/openrct2/network/NetworkConnection.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,7 +30,7 @@ public: std::unique_ptr Socket = nullptr; NetworkPacket InboundPacket; NetworkAuth AuthStatus = NetworkAuth::None; - NetworkStats_t Stats = {}; + NetworkStats Stats = {}; NetworkPlayer* Player = nullptr; uint32_t PingTime = 0; NetworkKey Key; diff --git a/src/openrct2/network/NetworkGroup.cpp b/src/openrct2/network/NetworkGroup.cpp index 9cd96df3b3..6282909e2b 100644 --- a/src/openrct2/network/NetworkGroup.cpp +++ b/src/openrct2/network/NetworkGroup.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/NetworkGroup.h b/src/openrct2/network/NetworkGroup.h index 56455a24c2..75eafaefbd 100644 --- a/src/openrct2/network/NetworkGroup.h +++ b/src/openrct2/network/NetworkGroup.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/NetworkKey.cpp b/src/openrct2/network/NetworkKey.cpp index 748d493e64..5714eb21da 100644 --- a/src/openrct2/network/NetworkKey.cpp +++ b/src/openrct2/network/NetworkKey.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ bool NetworkKey::Generate() } catch (const std::exception& e) { - log_error("NetworkKey::Generate failed: %s", e.what()); + LOG_ERROR("NetworkKey::Generate failed: %s", e.what()); return false; } } @@ -47,12 +47,12 @@ bool NetworkKey::LoadPrivate(OpenRCT2::IStream* stream) size_t size = static_cast(stream->GetLength()); if (size == static_cast(-1)) { - log_error("unknown size, refusing to load key"); + LOG_ERROR("unknown size, refusing to load key"); return false; } if (size > 4 * 1024 * 1024) { - log_error("Key file suspiciously large, refusing to load it"); + LOG_ERROR("Key file suspiciously large, refusing to load it"); return false; } @@ -67,7 +67,7 @@ bool NetworkKey::LoadPrivate(OpenRCT2::IStream* stream) } catch (const std::exception& e) { - log_error("NetworkKey::LoadPrivate failed: %s", e.what()); + LOG_ERROR("NetworkKey::LoadPrivate failed: %s", e.what()); return false; } } @@ -79,12 +79,12 @@ bool NetworkKey::LoadPublic(OpenRCT2::IStream* stream) size_t size = static_cast(stream->GetLength()); if (size == static_cast(-1)) { - log_error("unknown size, refusing to load key"); + LOG_ERROR("unknown size, refusing to load key"); return false; } if (size > 4 * 1024 * 1024) { - log_error("Key file suspiciously large, refusing to load it"); + LOG_ERROR("Key file suspiciously large, refusing to load it"); return false; } @@ -99,7 +99,7 @@ bool NetworkKey::LoadPublic(OpenRCT2::IStream* stream) } catch (const std::exception& e) { - log_error("NetworkKey::LoadPublic failed: %s", e.what()); + LOG_ERROR("NetworkKey::LoadPublic failed: %s", e.what()); return false; } } @@ -118,7 +118,7 @@ bool NetworkKey::SavePrivate(OpenRCT2::IStream* stream) } catch (const std::exception& e) { - log_error("NetworkKey::SavePrivate failed: %s", e.what()); + LOG_ERROR("NetworkKey::SavePrivate failed: %s", e.what()); return false; } } @@ -137,7 +137,7 @@ bool NetworkKey::SavePublic(OpenRCT2::IStream* stream) } catch (const std::exception& e) { - log_error("NetworkKey::SavePublic failed: %s", e.what()); + LOG_ERROR("NetworkKey::SavePublic failed: %s", e.what()); return false; } } @@ -185,7 +185,7 @@ std::string NetworkKey::PublicKeyHash() } catch (const std::exception& e) { - log_error("Failed to create hash of public key: %s", e.what()); + LOG_ERROR("Failed to create hash of public key: %s", e.what()); } return nullptr; } @@ -200,7 +200,7 @@ bool NetworkKey::Sign(const uint8_t* md, const size_t len, std::vector& } catch (const std::exception& e) { - log_error("NetworkKey::Sign failed: %s", e.what()); + LOG_ERROR("NetworkKey::Sign failed: %s", e.what()); return false; } } @@ -214,7 +214,7 @@ bool NetworkKey::Verify(const uint8_t* md, const size_t len, const std::vectorGetHostname(); - log_verbose("Received %zu bytes from %s on LAN broadcast port", recievedBytes, sender.c_str()); + LOG_VERBOSE("Received %zu bytes from %s on LAN broadcast port", recievedBytes, sender.c_str()); if (String::Equals(buffer, NETWORK_LAN_BROADCAST_MSG)) { auto body = GetBroadcastJson(); auto bodyDump = body.dump(); size_t sendLen = bodyDump.size() + 1; - log_verbose("Sending %zu bytes back to %s", sendLen, sender.c_str()); + LOG_VERBOSE("Sending %zu bytes back to %s", sendLen, sender.c_str()); _lanListener->SendData(*endpoint, bodyDump.c_str(), sendLen); } } @@ -132,7 +132,7 @@ private: json_t GetBroadcastJson() { - json_t root = network_get_server_info_as_json(); + json_t root = NetworkGetServerInfoAsJson(); root["port"] = _port; return root; } @@ -263,7 +263,7 @@ private: { _forceIPv4 = true; _lastAdvertiseTime = 0; - log_info("Forcing HTTP(S) over IPv4"); + LOG_INFO("Forcing HTTP(S) over IPv4"); } } } @@ -290,7 +290,7 @@ private: json_t GetHeartbeatJson() { - uint32_t numPlayers = network_get_num_visible_players(); + uint32_t numPlayers = NetworkGetNumVisiblePlayers(); json_t root = { { "token", _token }, diff --git a/src/openrct2/network/NetworkServerAdvertiser.h b/src/openrct2/network/NetworkServerAdvertiser.h index 4237f4f328..8f1e224e33 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.h +++ b/src/openrct2/network/NetworkServerAdvertiser.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/NetworkTypes.h b/src/openrct2/network/NetworkTypes.h index 87db1403a2..f3265ea569 100644 --- a/src/openrct2/network/NetworkTypes.h +++ b/src/openrct2/network/NetworkTypes.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -81,7 +81,8 @@ enum class NetworkCommand : uint32_t PlayerInfo, RequestGameState, GameState, - Scripts, + ScriptsHeader, + ScriptsData, Heartbeat, Max, Invalid = static_cast(-1), @@ -89,15 +90,15 @@ enum class NetworkCommand : uint32_t static_assert(NetworkCommand::GameInfo == static_cast(9), "Master server expects this to be 9"); -enum class NetworkServerState +enum class NetworkServerStatus { Ok, Desynced }; -struct NetworkServerState_t +struct NetworkServerState { - NetworkServerState state = NetworkServerState::Ok; + NetworkServerStatus state = NetworkServerStatus::Ok; uint32_t desyncTick = 0; uint32_t tick = 0; uint32_t srand0 = 0; @@ -108,13 +109,13 @@ struct NetworkServerState_t // this structure can be used in combination with DataSerialiser // to provide extra details with template specialization. #pragma pack(push, 1) -template struct NetworkObjectId_t +template struct NetworkObjectId { - NetworkObjectId_t(T v) + NetworkObjectId(T v) : id(v) { } - NetworkObjectId_t() + NetworkObjectId() : id(T(-1)) { } @@ -128,8 +129,8 @@ template struct NetworkObjectId_t // NOTE: When adding new types make sure to have no duplicate _TypeID's otherwise // there is no way to specialize templates if they have the exact symbol. -using NetworkPlayerId_t = NetworkObjectId_t; -using NetworkCheatType_t = NetworkObjectId_t; +using NetworkPlayerId_t = NetworkObjectId; +using NetworkCheatType_t = NetworkObjectId; enum class NetworkStatisticsGroup : uint32_t { @@ -140,7 +141,7 @@ enum class NetworkStatisticsGroup : uint32_t Max, }; -struct NetworkStats_t +struct NetworkStats { uint64_t bytesReceived[EnumValue(NetworkStatisticsGroup::Max)]; uint64_t bytesSent[EnumValue(NetworkStatisticsGroup::Max)]; diff --git a/src/openrct2/network/NetworkUser.cpp b/src/openrct2/network/NetworkUser.cpp index 121da4b197..2ce300f5f3 100644 --- a/src/openrct2/network/NetworkUser.cpp +++ b/src/openrct2/network/NetworkUser.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/NetworkUser.h b/src/openrct2/network/NetworkUser.h index 3eaa019f5f..b32ddd1a02 100644 --- a/src/openrct2/network/NetworkUser.h +++ b/src/openrct2/network/NetworkUser.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index c997807c4d..c50d418d93 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,8 +47,8 @@ int32_t ServerListEntry::CompareTo(const ServerListEntry& other) const return a.Local ? -1 : 1; } - bool serverACompatible = a.Version == network_get_version(); - bool serverBCompatible = b.Version == network_get_version(); + bool serverACompatible = a.Version == NetworkGetVersion(); + bool serverBCompatible = b.Version == NetworkGetVersion(); if (serverACompatible != serverBCompatible) { return serverACompatible ? -1 : 1; @@ -69,7 +69,7 @@ int32_t ServerListEntry::CompareTo(const ServerListEntry& other) const bool ServerListEntry::IsVersionValid() const noexcept { - return Version.empty() || Version == network_get_version(); + return Version.empty() || Version == NetworkGetVersion(); } std::optional ServerListEntry::FromJson(json_t& server) @@ -92,7 +92,7 @@ std::optional ServerListEntry::FromJson(json_t& server) if (name.empty() || version.empty()) { - log_verbose("Cowardly refusing to add server without name or version specified."); + LOG_VERBOSE("Cowardly refusing to add server without name or version specified."); return std::nullopt; } @@ -184,7 +184,7 @@ void ServerList::Clear() noexcept std::vector ServerList::ReadFavourites() const { - log_verbose("server_list_read(...)"); + LOG_VERBOSE("server_list_read(...)"); std::vector entries; try { @@ -211,7 +211,7 @@ std::vector ServerList::ReadFavourites() const } catch (const std::exception& e) { - log_error("Unable to read server list: %s", e.what()); + LOG_ERROR("Unable to read server list: %s", e.what()); entries = std::vector(); } return entries; @@ -239,7 +239,7 @@ void ServerList::WriteFavourites() const bool ServerList::WriteFavourites(const std::vector& entries) const { - log_verbose("server_list_write(%d, 0x%p)", entries.size(), entries.data()); + LOG_VERBOSE("server_list_write(%d, 0x%p)", entries.size(), entries.data()); auto env = GetContext()->GetPlatformEnvironment(); auto path = Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"servers.cfg"); @@ -258,7 +258,7 @@ bool ServerList::WriteFavourites(const std::vector& entries) co } catch (const std::exception& e) { - log_error("Unable to write server list: %s", e.what()); + LOG_ERROR("Unable to write server list: %s", e.what()); return false; } } @@ -273,7 +273,7 @@ std::future> ServerList::FetchLocalServerListAsync( std::string_view msg = NETWORK_LAN_BROADCAST_MSG; auto udpSocket = CreateUdpSocket(); - log_verbose("Broadcasting %zu bytes to the LAN (%s)", msg.size(), broadcastAddress.c_str()); + LOG_VERBOSE("Broadcasting %zu bytes to the LAN (%s)", msg.size(), broadcastAddress.c_str()); auto len = udpSocket->SendData(broadcastAddress, NETWORK_LAN_BROADCAST_PORT, msg.data(), msg.size()); if (len != msg.size()) { @@ -293,7 +293,7 @@ std::future> ServerList::FetchLocalServerListAsync( if (p == NetworkReadPacket::Success) { auto sender = endpoint->GetHostname(); - log_verbose("Received %zu bytes back from %s", recievedLen, sender.c_str()); + LOG_VERBOSE("Received %zu bytes back from %s", recievedLen, sender.c_str()); auto jinfo = Json::FromString(std::string_view(buffer)); if (jinfo.is_object()) @@ -311,7 +311,7 @@ std::future> ServerList::FetchLocalServerListAsync( } catch (const std::exception& e) { - log_warning("Error receiving data: %s", e.what()); + LOG_WARNING("Error receiving data: %s", e.what()); } Platform::Sleep(RECV_DELAY_MS); } diff --git a/src/openrct2/network/ServerList.h b/src/openrct2/network/ServerList.h index f6947beb06..b589ed377d 100644 --- a/src/openrct2/network/ServerList.h +++ b/src/openrct2/network/ServerList.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/Socket.cpp b/src/openrct2/network/Socket.cpp index 89803e2856..0446594d25 100644 --- a/src/openrct2/network/Socket.cpp +++ b/src/openrct2/network/Socket.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -87,11 +87,11 @@ public: { if (!_isInitialised) { - log_verbose("WSAStartup()"); + LOG_VERBOSE("WSAStartup()"); WSADATA wsa_data; if (WSAStartup(MAKEWORD(2, 2), &wsa_data) != 0) { - log_error("Unable to initialise winsock."); + LOG_ERROR("Unable to initialise winsock."); return false; } _isInitialised = true; @@ -103,7 +103,7 @@ public: { if (_isInitialised) { - log_verbose("WSACleanup()"); + LOG_VERBOSE("WSACleanup()"); WSACleanup(); _isInitialised = false; } @@ -225,8 +225,8 @@ private: int errorcode = getaddrinfo(address.empty() ? nullptr : address.c_str(), serviceName.c_str(), &hints, &result); if (errorcode != 0) { - log_error("Resolving address failed: Code %d.", errorcode); - log_error("Resolution error message: %s.", gai_strerror(errorcode)); + LOG_ERROR("Resolving address failed: Code %d.", errorcode); + LOG_ERROR("Resolution error message: %s.", gai_strerror(errorcode)); return false; } @@ -321,12 +321,12 @@ public: // Turn off IPV6_V6ONLY so we can accept both v4 and v6 connections if (!SetOption(_socket, IPPROTO_IPV6, IPV6_V6ONLY, false)) { - log_verbose("setsockopt(socket, IPV6_V6ONLY) failed: %d", LAST_SOCKET_ERROR()); + LOG_VERBOSE("setsockopt(socket, IPV6_V6ONLY) failed: %d", LAST_SOCKET_ERROR()); } if (!SetOption(_socket, SOL_SOCKET, SO_REUSEADDR, true)) { - log_verbose("setsockopt(socket, SO_REUSEADDR) failed: %d", LAST_SOCKET_ERROR()); + LOG_VERBOSE("setsockopt(socket, SO_REUSEADDR) failed: %d", LAST_SOCKET_ERROR()); } try @@ -374,7 +374,7 @@ public: { if (LAST_SOCKET_ERROR() != EWOULDBLOCK) { - log_error("Failed to accept client."); + LOG_ERROR("Failed to accept client."); } } else @@ -382,7 +382,7 @@ public: if (!SetNonBlocking(socket, true)) { closesocket(socket); - log_error("Failed to set non-blocking mode."); + LOG_ERROR("Failed to set non-blocking mode."); } else { @@ -826,18 +826,18 @@ private: // Enable send and receiving of broadcast messages if (!SetOption(sock, SOL_SOCKET, SO_BROADCAST, true)) { - log_verbose("setsockopt(socket, SO_BROADCAST) failed: %d", LAST_SOCKET_ERROR()); + LOG_VERBOSE("setsockopt(socket, SO_BROADCAST) failed: %d", LAST_SOCKET_ERROR()); } // Turn off IPV6_V6ONLY so we can accept both v4 and v6 connections if (!SetOption(sock, IPPROTO_IPV6, IPV6_V6ONLY, false)) { - log_verbose("setsockopt(socket, IPV6_V6ONLY) failed: %d", LAST_SOCKET_ERROR()); + LOG_VERBOSE("setsockopt(socket, IPV6_V6ONLY) failed: %d", LAST_SOCKET_ERROR()); } if (!SetOption(sock, SOL_SOCKET, SO_REUSEADDR, true)) { - log_verbose("setsockopt(socket, SO_REUSEADDR) failed: %d", LAST_SOCKET_ERROR()); + LOG_VERBOSE("setsockopt(socket, SO_REUSEADDR) failed: %d", LAST_SOCKET_ERROR()); } if (!SetNonBlocking(sock, true)) diff --git a/src/openrct2/network/Socket.h b/src/openrct2/network/Socket.h index cc112969c4..3c0a23904d 100644 --- a/src/openrct2/network/Socket.h +++ b/src/openrct2/network/Socket.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/network/network.h b/src/openrct2/network/network.h index 53a9c7e9bc..988374fc3b 100644 --- a/src/openrct2/network/network.h +++ b/src/openrct2/network/network.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,82 +36,82 @@ enum class ModifyGroupType : uint8_t; enum class PermissionState : uint8_t; enum class NetworkPermission : uint32_t; -void network_reconnect(); -void network_shutdown_client(); -int32_t network_begin_client(const std::string& host, int32_t port); -int32_t network_begin_server(int32_t port, const std::string& address); +void NetworkReconnect(); +void NetworkShutdownClient(); +int32_t NetworkBeginClient(const std::string& host, int32_t port); +int32_t NetworkBeginServer(int32_t port, const std::string& address); -[[nodiscard]] int32_t network_get_mode(); -[[nodiscard]] int32_t network_get_status(); -bool network_is_desynchronised(); -bool network_check_desynchronisation(); -void network_request_gamestate_snapshot(); -void network_send_tick(); -bool network_gamestate_snapshots_enabled(); -void network_update(); -void network_process_pending(); -void network_flush(); +[[nodiscard]] int32_t NetworkGetMode(); +[[nodiscard]] int32_t NetworkGetStatus(); +bool NetworkIsDesynchronised(); +bool NetworkCheckDesynchronisation(); +void NetworkRequestGamestateSnapshot(); +void NetworkSendTick(); +bool NetworkGamestateSnapshotsEnabled(); +void NetworkUpdate(); +void NetworkProcessPending(); +void NetworkFlush(); -[[nodiscard]] NetworkAuth network_get_authstatus(); -[[nodiscard]] uint32_t network_get_server_tick(); -[[nodiscard]] uint8_t network_get_current_player_id(); -[[nodiscard]] int32_t network_get_num_players(); -[[nodiscard]] int32_t network_get_num_visible_players(); -[[nodiscard]] const char* network_get_player_name(uint32_t index); -[[nodiscard]] uint32_t network_get_player_flags(uint32_t index); -[[nodiscard]] int32_t network_get_player_ping(uint32_t index); -[[nodiscard]] int32_t network_get_player_id(uint32_t index); -[[nodiscard]] money32 network_get_player_money_spent(uint32_t index); -[[nodiscard]] std::string network_get_player_ip_address(uint32_t id); -[[nodiscard]] std::string network_get_player_public_key_hash(uint32_t id); -void network_add_player_money_spent(uint32_t index, money32 cost); -[[nodiscard]] int32_t network_get_player_last_action(uint32_t index, int32_t time); -void network_set_player_last_action(uint32_t index, GameCommand command); -[[nodiscard]] CoordsXYZ network_get_player_last_action_coord(uint32_t index); -void network_set_player_last_action_coord(uint32_t index, const CoordsXYZ& coord); -[[nodiscard]] uint32_t network_get_player_commands_ran(uint32_t index); -[[nodiscard]] int32_t network_get_player_index(uint32_t id); -[[nodiscard]] uint8_t network_get_player_group(uint32_t index); -void network_set_player_group(uint32_t index, uint32_t groupindex); -[[nodiscard]] int32_t network_get_group_index(uint8_t id); -[[nodiscard]] int32_t network_get_current_player_group_index(); -[[nodiscard]] uint8_t network_get_group_id(uint32_t index); -[[nodiscard]] int32_t network_get_num_groups(); -[[nodiscard]] const char* network_get_group_name(uint32_t index); -[[nodiscard]] GameActions::Result network_set_player_group( +[[nodiscard]] NetworkAuth NetworkGetAuthstatus(); +[[nodiscard]] uint32_t NetworkGetServerTick(); +[[nodiscard]] uint8_t NetworkGetCurrentPlayerId(); +[[nodiscard]] int32_t NetworkGetNumPlayers(); +[[nodiscard]] int32_t NetworkGetNumVisiblePlayers(); +[[nodiscard]] const char* NetworkGetPlayerName(uint32_t index); +[[nodiscard]] uint32_t NetworkGetPlayerFlags(uint32_t index); +[[nodiscard]] int32_t NetworkGetPlayerPing(uint32_t index); +[[nodiscard]] int32_t NetworkGetPlayerID(uint32_t index); +[[nodiscard]] money64 NetworkGetPlayerMoneySpent(uint32_t index); +[[nodiscard]] std::string NetworkGetPlayerIPAddress(uint32_t id); +[[nodiscard]] std::string NetworkGetPlayerPublicKeyHash(uint32_t id); +void NetworkAddPlayerMoneySpent(uint32_t index, money64 cost); +[[nodiscard]] int32_t NetworkGetPlayerLastAction(uint32_t index, int32_t time); +void NetworkSetPlayerLastAction(uint32_t index, GameCommand command); +[[nodiscard]] CoordsXYZ NetworkGetPlayerLastActionCoord(uint32_t index); +void NetworkSetPlayerLastActionCoord(uint32_t index, const CoordsXYZ& coord); +[[nodiscard]] uint32_t NetworkGetPlayerCommandsRan(uint32_t index); +[[nodiscard]] int32_t NetworkGetPlayerIndex(uint32_t id); +[[nodiscard]] uint8_t NetworkGetPlayerGroup(uint32_t index); +void NetworkSetPlayerGroup(uint32_t index, uint32_t groupindex); +[[nodiscard]] int32_t NetworkGetGroupIndex(uint8_t id); +[[nodiscard]] int32_t NetworkGetCurrentPlayerGroupIndex(); +[[nodiscard]] uint8_t NetworkGetGroupID(uint32_t index); +[[nodiscard]] int32_t NetworkGetNumGroups(); +[[nodiscard]] const char* NetworkGetGroupName(uint32_t index); +[[nodiscard]] GameActions::Result NetworkSetPlayerGroup( NetworkPlayerId_t actionPlayerId, NetworkPlayerId_t playerId, uint8_t groupId, bool isExecuting); -[[nodiscard]] GameActions::Result network_modify_groups( +[[nodiscard]] GameActions::Result NetworkModifyGroups( NetworkPlayerId_t actionPlayerId, ModifyGroupType type, uint8_t groupId, const std::string& name, uint32_t permissionIndex, PermissionState permissionState, bool isExecuting); -[[nodiscard]] GameActions::Result network_kick_player(NetworkPlayerId_t playerId, bool isExecuting); -[[nodiscard]] uint8_t network_get_default_group(); -[[nodiscard]] int32_t network_get_num_actions(); -[[nodiscard]] StringId network_get_action_name_string_id(uint32_t index); -[[nodiscard]] int32_t network_can_perform_action(uint32_t groupindex, NetworkPermission index); -[[nodiscard]] int32_t network_can_perform_command(uint32_t groupindex, int32_t index); -void network_set_pickup_peep(uint8_t playerid, Peep* peep); -[[nodiscard]] Peep* network_get_pickup_peep(uint8_t playerid); -void network_set_pickup_peep_old_x(uint8_t playerid, int32_t x); -[[nodiscard]] int32_t network_get_pickup_peep_old_x(uint8_t playerid); -[[nodiscard]] bool network_is_server_player_invisible(); +[[nodiscard]] GameActions::Result NetworkKickPlayer(NetworkPlayerId_t playerId, bool isExecuting); +[[nodiscard]] uint8_t NetworkGetDefaultGroup(); +[[nodiscard]] int32_t NetworkGetNumActions(); +[[nodiscard]] StringId NetworkGetActionNameStringID(uint32_t index); +[[nodiscard]] int32_t NetworkCanPerformAction(uint32_t groupindex, NetworkPermission index); +[[nodiscard]] int32_t NetworkCanPerformCommand(uint32_t groupindex, int32_t index); +void NetworkSetPickupPeep(uint8_t playerid, Peep* peep); +[[nodiscard]] Peep* NetworkGetPickupPeep(uint8_t playerid); +void NetworkSetPickupPeepOldX(uint8_t playerid, int32_t x); +[[nodiscard]] int32_t NetworkGetPickupPeepOldX(uint8_t playerid); +[[nodiscard]] bool NetworkIsServerPlayerInvisible(); -void network_send_chat(const char* text, const std::vector& playerIds = {}); -void network_send_game_action(const GameAction* action); -void network_send_password(const std::string& password); +void NetworkSendChat(const char* text, const std::vector& playerIds = {}); +void NetworkSendGameAction(const GameAction* action); +void NetworkSendPassword(const std::string& password); -void network_set_password(const char* password); +void NetworkSetPassword(const char* password); -void network_append_chat_log(std::string_view text); -void network_append_server_log(const utf8* text); -[[nodiscard]] const utf8* network_get_server_name(); -[[nodiscard]] const utf8* network_get_server_description(); -[[nodiscard]] const utf8* network_get_server_greeting(); -[[nodiscard]] const utf8* network_get_server_provider_name(); -[[nodiscard]] const utf8* network_get_server_provider_email(); -[[nodiscard]] const utf8* network_get_server_provider_website(); +void NetworkAppendChatLog(std::string_view text); +void NetworkAppendServerLog(const utf8* text); +[[nodiscard]] u8string NetworkGetServerName(); +[[nodiscard]] u8string NetworkGetServerDescription(); +[[nodiscard]] u8string NetworkGetServerGreeting(); +[[nodiscard]] u8string NetworkGetServerProviderName(); +[[nodiscard]] u8string NetworkGetServerProviderEmail(); +[[nodiscard]] u8string NetworkGetServerProviderWebsite(); -[[nodiscard]] std::string network_get_version(); +[[nodiscard]] std::string NetworkGetVersion(); -[[nodiscard]] NetworkStats_t network_get_stats(); -[[nodiscard]] NetworkServerState_t network_get_server_state(); -[[nodiscard]] json_t network_get_server_info_as_json(); +[[nodiscard]] NetworkStats NetworkGetStats(); +[[nodiscard]] NetworkServerState NetworkGetServerState(); +[[nodiscard]] json_t NetworkGetServerInfoAsJson(); diff --git a/src/openrct2/object/AudioObject.cpp b/src/openrct2/object/AudioObject.cpp index a0c328bfce..8ff2f76237 100644 --- a/src/openrct2/object/AudioObject.cpp +++ b/src/openrct2/object/AudioObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/AudioObject.h b/src/openrct2/object/AudioObject.h index 422a6ed78c..3a84fd7528 100644 --- a/src/openrct2/object/AudioObject.h +++ b/src/openrct2/object/AudioObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/AudioSampleTable.cpp b/src/openrct2/object/AudioSampleTable.cpp index 235bb7266a..e062971626 100644 --- a/src/openrct2/object/AudioSampleTable.cpp +++ b/src/openrct2/object/AudioSampleTable.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/AudioSampleTable.h b/src/openrct2/object/AudioSampleTable.h index 611eb838b6..0d4f7be989 100644 --- a/src/openrct2/object/AudioSampleTable.h +++ b/src/openrct2/object/AudioSampleTable.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/BannerObject.cpp b/src/openrct2/object/BannerObject.cpp index cc42724482..edf5331c33 100644 --- a/src/openrct2/object/BannerObject.cpp +++ b/src/openrct2/object/BannerObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,19 +23,19 @@ void BannerObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* st stream->Seek(6, OpenRCT2::STREAM_SEEK_CURRENT); _legacyType.scrolling_mode = stream->ReadValue(); _legacyType.flags = stream->ReadValue(); - _legacyType.price = stream->ReadValue(); + _legacyType.price = stream->ReadValue(); _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; stream->Seek(2, OpenRCT2::STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, ObjectStringID::NAME); - rct_object_entry sgEntry = stream->ReadValue(); + RCTObjectEntry sgEntry = stream->ReadValue(); SetPrimarySceneryGroup(ObjectEntryDescriptor(sgEntry)); GetImageTable().Read(context, stream); // Validate properties - if (_legacyType.price <= 0) + if (_legacyType.price <= 0.00_GBP) { context->LogError(ObjectError::InvalidProperty, "Price can not be free or negative."); } @@ -61,28 +61,28 @@ void BannerObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* st void BannerObject::Load() { GetStringTable().Sort(); - _legacyType.name = language_allocate_object_string(GetName()); - _legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.name = LanguageAllocateObjectString(GetName()); + _legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); } void BannerObject::Unload() { - language_free_object_string(_legacyType.name); - gfx_object_free_images(_legacyType.image, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.name); + GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount()); _legacyType.name = 0; _legacyType.image = 0; } -void BannerObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void BannerObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; auto image0 = ImageId(_legacyType.image, COLOUR_BORDEAUX_RED); auto image1 = ImageId(_legacyType.image + 1, COLOUR_BORDEAUX_RED); - gfx_draw_sprite(dpi, image0, screenCoords + ScreenCoordsXY{ -12, 8 }); - gfx_draw_sprite(dpi, image1, screenCoords + ScreenCoordsXY{ -12, 8 }); + GfxDrawSprite(&dpi, image0, screenCoords + ScreenCoordsXY{ -12, 8 }); + GfxDrawSprite(&dpi, image1, screenCoords + ScreenCoordsXY{ -12, 8 }); } void BannerObject::ReadJson(IReadObjectContext* context, json_t& root) @@ -93,7 +93,7 @@ void BannerObject::ReadJson(IReadObjectContext* context, json_t& root) if (properties.is_object()) { _legacyType.scrolling_mode = Json::GetNumber(properties["scrollingMode"]); - _legacyType.price = Json::GetNumber(properties["price"]); + _legacyType.price = Json::GetNumber(properties["price"]); _legacyType.flags = Json::GetFlags( properties, { diff --git a/src/openrct2/object/BannerObject.h b/src/openrct2/object/BannerObject.h index 4c27b476b3..cec53e7d20 100644 --- a/src/openrct2/object/BannerObject.h +++ b/src/openrct2/object/BannerObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,7 +10,7 @@ #pragma once #include "../core/IStream.hpp" -#include "../world/Scenery.h" +#include "BannerSceneryEntry.h" #include "SceneryObject.h" class BannerObject final : public SceneryObject @@ -29,5 +29,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/BannerSceneryEntry.h b/src/openrct2/object/BannerSceneryEntry.h new file mode 100644 index 0000000000..63ddca8c43 --- /dev/null +++ b/src/openrct2/object/BannerSceneryEntry.h @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "ObjectTypes.h" + +enum +{ + BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR = (1 << 0), +}; + +struct BannerSceneryEntry +{ + static constexpr auto kObjectType = ObjectType::Banners; + + StringId name; + uint32_t image; + uint8_t scrolling_mode; + uint8_t flags; + money64 price; + ObjectEntryIndex scenery_tab_id; +}; diff --git a/src/openrct2/object/DefaultObjects.cpp b/src/openrct2/object/DefaultObjects.cpp index f4d9319107..90c8567f9d 100644 --- a/src/openrct2/object/DefaultObjects.cpp +++ b/src/openrct2/object/DefaultObjects.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/DefaultObjects.h b/src/openrct2/object/DefaultObjects.h index b2fc27b747..ca8f8af7ec 100644 --- a/src/openrct2/object/DefaultObjects.h +++ b/src/openrct2/object/DefaultObjects.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/SceneryObject.cpp b/src/openrct2/object/EntranceEntry.h similarity index 57% rename from src/openrct2/object/SceneryObject.cpp rename to src/openrct2/object/EntranceEntry.h index 587e54bb1e..5136d6ce48 100644 --- a/src/openrct2/object/SceneryObject.cpp +++ b/src/openrct2/object/EntranceEntry.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -7,4 +7,15 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "SceneryObject.h" +#pragma once + +#include "../common.h" +#include "ObjectTypes.h" + +struct EntranceEntry +{ + StringId string_idx; // 0x00 + uint32_t image_id; // 0x02 + uint8_t scrolling_mode; // 0x06 + uint8_t text_height; // 0x07 +}; diff --git a/src/openrct2/object/EntranceObject.cpp b/src/openrct2/object/EntranceObject.cpp index fd2a92b8a5..200d0615e6 100644 --- a/src/openrct2/object/EntranceObject.cpp +++ b/src/openrct2/object/EntranceObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,26 +29,26 @@ void EntranceObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* void EntranceObject::Load() { GetStringTable().Sort(); - _legacyType.string_idx = language_allocate_object_string(GetName()); - _legacyType.image_id = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.string_idx = LanguageAllocateObjectString(GetName()); + _legacyType.image_id = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); } void EntranceObject::Unload() { - language_free_object_string(_legacyType.string_idx); - gfx_object_free_images(_legacyType.image_id, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.string_idx); + GfxObjectFreeImages(_legacyType.image_id, GetImageTable().GetCount()); _legacyType.string_idx = 0; _legacyType.image_id = 0; } -void EntranceObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void EntranceObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; - gfx_draw_sprite(dpi, ImageId(_legacyType.image_id + 1), screenCoords + ScreenCoordsXY{ -32, 14 }); - gfx_draw_sprite(dpi, ImageId(_legacyType.image_id + 0), screenCoords + ScreenCoordsXY{ 0, 28 }); - gfx_draw_sprite(dpi, ImageId(_legacyType.image_id + 2), screenCoords + ScreenCoordsXY{ 32, 44 }); + GfxDrawSprite(&dpi, ImageId(_legacyType.image_id + 1), screenCoords + ScreenCoordsXY{ -32, 14 }); + GfxDrawSprite(&dpi, ImageId(_legacyType.image_id + 0), screenCoords + ScreenCoordsXY{ 0, 28 }); + GfxDrawSprite(&dpi, ImageId(_legacyType.image_id + 2), screenCoords + ScreenCoordsXY{ 32, 44 }); } void EntranceObject::ReadJson(IReadObjectContext* context, json_t& root) diff --git a/src/openrct2/object/EntranceObject.h b/src/openrct2/object/EntranceObject.h index bf3130dc61..05000096b7 100644 --- a/src/openrct2/object/EntranceObject.h +++ b/src/openrct2/object/EntranceObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,12 +11,13 @@ #include "../world/Entrance.h" #include "../world/Location.hpp" +#include "EntranceEntry.h" #include "Object.h" class EntranceObject final : public Object { private: - rct_entrance_type _legacyType = {}; + EntranceEntry _legacyType = {}; public: void* GetLegacyData() override @@ -29,7 +30,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; ImageIndex GetImage(uint8_t sequence, Direction direction) const; uint8_t GetScrollingMode() const; diff --git a/src/openrct2/object/FootpathEntry.h b/src/openrct2/object/FootpathEntry.h new file mode 100644 index 0000000000..ff630a9f15 --- /dev/null +++ b/src/openrct2/object/FootpathEntry.h @@ -0,0 +1,55 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "ObjectTypes.h" + +enum class RailingEntrySupportType : uint8_t; + +enum +{ + FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2), + FOOTPATH_ENTRY_FLAG_IS_QUEUE = (1 << 3), + FOOTPATH_ENTRY_FLAG_NO_SLOPE_RAILINGS = (1 << 4), +}; + +struct FootpathEntry +{ + StringId string_idx; // 0x00 + uint32_t image; // 0x02 + uint32_t bridge_image; // 0x06 + RailingEntrySupportType support_type; // 0x0A + uint8_t flags; // 0x0B + uint8_t scrolling_mode; // 0x0C + + constexpr uint32_t GetQueueImage() const + { + return image + 51; + } + constexpr uint32_t GetPreviewImage() const + { + return image + 71; + } + constexpr uint32_t GetQueuePreviewImage() const + { + // Editor-only paths usually lack queue images. In this case, use the main path image. + if (flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) + { + return GetPreviewImage(); + } + + return image + 72; + } + constexpr uint32_t GetRailingsImage() const + { + return image + 73; + } +}; diff --git a/src/openrct2/object/FootpathItemEntry.h b/src/openrct2/object/FootpathItemEntry.h new file mode 100644 index 0000000000..0dd00f3645 --- /dev/null +++ b/src/openrct2/object/FootpathItemEntry.h @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "../interface/Cursors.h" +#include "ObjectTypes.h" + +enum class PathBitDrawType : uint8_t +{ + Light, + Bin, + Bench, + JumpingFountain, +}; + +enum +{ + PATH_BIT_FLAG_IS_BIN = 1 << 0, + PATH_BIT_FLAG_IS_BENCH = 1 << 1, + PATH_BIT_FLAG_BREAKABLE = 1 << 2, + PATH_BIT_FLAG_LAMP = 1 << 3, + PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER = 1 << 4, + PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW = 1 << 5, + PATH_BIT_FLAG_DONT_ALLOW_ON_QUEUE = 1 << 6, + PATH_BIT_FLAG_DONT_ALLOW_ON_SLOPE = 1 << 7, + PATH_BIT_FLAG_IS_QUEUE_SCREEN = 1 << 8 +}; + +struct PathBitEntry +{ + static constexpr auto kObjectType = ObjectType::PathBits; + + StringId name; + uint32_t image; + uint16_t flags; + PathBitDrawType draw_type; + CursorID tool_id; + money64 price; + ObjectEntryIndex scenery_tab_id; +}; diff --git a/src/openrct2/object/FootpathItemObject.cpp b/src/openrct2/object/FootpathItemObject.cpp index bdf87bb19a..6cacf8f11d 100644 --- a/src/openrct2/object/FootpathItemObject.cpp +++ b/src/openrct2/object/FootpathItemObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,19 +27,19 @@ void FootpathItemObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre _legacyType.flags = stream->ReadValue(); _legacyType.draw_type = static_cast(stream->ReadValue()); _legacyType.tool_id = static_cast(stream->ReadValue()); - _legacyType.price = stream->ReadValue(); + _legacyType.price = stream->ReadValue(); _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; stream->Seek(2, OpenRCT2::STREAM_SEEK_CURRENT); GetStringTable().Read(context, stream, ObjectStringID::NAME); - rct_object_entry sgEntry = stream->ReadValue(); + RCTObjectEntry sgEntry = stream->ReadValue(); SetPrimarySceneryGroup(ObjectEntryDescriptor(sgEntry)); GetImageTable().Read(context, stream); // Validate properties - if (_legacyType.price <= 0) + if (_legacyType.price <= 0.00_GBP) { context->LogError(ObjectError::InvalidProperty, "Price can not be free or negative."); } @@ -65,25 +65,25 @@ void FootpathItemObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre void FootpathItemObject::Load() { GetStringTable().Sort(); - _legacyType.name = language_allocate_object_string(GetName()); - _legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.name = LanguageAllocateObjectString(GetName()); + _legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; } void FootpathItemObject::Unload() { - language_free_object_string(_legacyType.name); - gfx_object_free_images(_legacyType.image, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.name); + GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount()); _legacyType.name = 0; _legacyType.image = 0; } -void FootpathItemObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void FootpathItemObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; - gfx_draw_sprite(dpi, ImageId(_legacyType.image), screenCoords - ScreenCoordsXY{ 22, 24 }); + GfxDrawSprite(&dpi, ImageId(_legacyType.image), screenCoords - ScreenCoordsXY{ 22, 24 }); } static PathBitDrawType ParseDrawType(const std::string& s) @@ -109,7 +109,7 @@ void FootpathItemObject::ReadJson(IReadObjectContext* context, json_t& root) { _legacyType.draw_type = ParseDrawType(Json::GetString(properties["renderAs"])); _legacyType.tool_id = Cursor::FromString(Json::GetString(properties["cursor"]), CursorID::LamppostDown); - _legacyType.price = Json::GetNumber(properties["price"]); + _legacyType.price = Json::GetNumber(properties["price"]); SetPrimarySceneryGroup(ObjectEntryDescriptor(Json::GetString(properties["sceneryGroup"]))); diff --git a/src/openrct2/object/FootpathItemObject.h b/src/openrct2/object/FootpathItemObject.h index e497269330..2287b9e8aa 100644 --- a/src/openrct2/object/FootpathItemObject.h +++ b/src/openrct2/object/FootpathItemObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,7 +9,7 @@ #pragma once -#include "../world/Scenery.h" +#include "FootpathItemEntry.h" #include "SceneryObject.h" class FootpathItemObject final : public SceneryObject @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/FootpathObject.cpp b/src/openrct2/object/FootpathObject.cpp index f3cc451794..e56217f441 100644 --- a/src/openrct2/object/FootpathObject.cpp +++ b/src/openrct2/object/FootpathObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,8 +37,8 @@ void FootpathObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* void FootpathObject::Load() { GetStringTable().Sort(); - _legacyType.string_idx = language_allocate_object_string(GetName()); - _legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.string_idx = LanguageAllocateObjectString(GetName()); + _legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.bridge_image = _legacyType.image + 109; _pathSurfaceDescriptor.Name = _legacyType.string_idx; @@ -62,18 +62,18 @@ void FootpathObject::Load() void FootpathObject::Unload() { - language_free_object_string(_legacyType.string_idx); - gfx_object_free_images(_legacyType.image, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.string_idx); + GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount()); _legacyType.string_idx = 0; _legacyType.image = 0; } -void FootpathObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void FootpathObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; - gfx_draw_sprite(dpi, ImageId(_pathSurfaceDescriptor.PreviewImage), screenCoords - ScreenCoordsXY{ 49, 17 }); - gfx_draw_sprite(dpi, ImageId(_queueSurfaceDescriptor.PreviewImage), screenCoords + ScreenCoordsXY{ 4, -17 }); + GfxDrawSprite(&dpi, ImageId(_pathSurfaceDescriptor.PreviewImage), screenCoords - ScreenCoordsXY{ 49, 17 }); + GfxDrawSprite(&dpi, ImageId(_queueSurfaceDescriptor.PreviewImage), screenCoords + ScreenCoordsXY{ 4, -17 }); } void FootpathObject::ReadJson(IReadObjectContext* context, json_t& root) diff --git a/src/openrct2/object/FootpathObject.h b/src/openrct2/object/FootpathObject.h index c8951c8934..137f090649 100644 --- a/src/openrct2/object/FootpathObject.h +++ b/src/openrct2/object/FootpathObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,12 +10,13 @@ #pragma once #include "../world/Footpath.h" +#include "FootpathEntry.h" #include "Object.h" class FootpathObject final : public Object { private: - rct_footpath_entry _legacyType = {}; + FootpathEntry _legacyType = {}; PathSurfaceDescriptor _pathSurfaceDescriptor = {}; PathSurfaceDescriptor _queueSurfaceDescriptor = {}; PathRailingsDescriptor _pathRailingsDescriptor = {}; @@ -51,5 +52,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/FootpathRailingsObject.cpp b/src/openrct2/object/FootpathRailingsObject.cpp index 8137afc8ba..d31f6790b9 100644 --- a/src/openrct2/object/FootpathRailingsObject.cpp +++ b/src/openrct2/object/FootpathRailingsObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,12 +16,12 @@ void FootpathRailingsObject::Load() { GetStringTable().Sort(); - NameStringId = language_allocate_object_string(GetName()); + NameStringId = LanguageAllocateObjectString(GetName()); auto numImages = GetImageTable().GetCount(); if (numImages != 0) { - PreviewImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + PreviewImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); BridgeImageId = PreviewImageId + 37; RailingsImageId = PreviewImageId + 1; } @@ -38,8 +38,8 @@ void FootpathRailingsObject::Load() void FootpathRailingsObject::Unload() { - language_free_object_string(NameStringId); - gfx_object_free_images(PreviewImageId, GetImageTable().GetCount()); + LanguageFreeObjectString(NameStringId); + GfxObjectFreeImages(PreviewImageId, GetImageTable().GetCount()); NameStringId = 0; PreviewImageId = 0; @@ -47,7 +47,7 @@ void FootpathRailingsObject::Unload() RailingsImageId = 0; } -void FootpathRailingsObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void FootpathRailingsObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto x = width / 2; auto y = height / 2; @@ -61,20 +61,20 @@ void FootpathRailingsObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, for (int i = 0; i < 2; i++) { auto h = i * 16; - gfx_draw_sprite(dpi, img, { x - 8, y + 8 + h }); - gfx_draw_sprite(dpi, img, { x + 8, y + 16 + h }); + GfxDrawSprite(&dpi, img, { x - 8, y + 8 + h }); + GfxDrawSprite(&dpi, img, { x + 8, y + 16 + h }); } - gfx_draw_sprite(dpi, helper.WithIndex(BridgeImageId + 5), { x, y - 17 }); - gfx_draw_sprite(dpi, ImageId(RailingsImageId + 1), { x + 4, y - 14 }); - gfx_draw_sprite(dpi, ImageId(RailingsImageId + 1), { x + 27, y - 2 }); + GfxDrawSprite(&dpi, helper.WithIndex(BridgeImageId + 5), { x, y - 17 }); + GfxDrawSprite(&dpi, ImageId(RailingsImageId + 1), { x + 4, y - 14 }); + GfxDrawSprite(&dpi, ImageId(RailingsImageId + 1), { x + 27, y - 2 }); } else { - gfx_draw_sprite(dpi, helper.WithIndex(BridgeImageId + 22), { x + 0, y + 16 }); - gfx_draw_sprite(dpi, helper.WithIndex(BridgeImageId + 49), { x, y - 17 }); - gfx_draw_sprite(dpi, ImageId(RailingsImageId + 1), { x + 4, y - 14 }); - gfx_draw_sprite(dpi, ImageId(RailingsImageId + 1), { x + 27, y - 3 }); + GfxDrawSprite(&dpi, helper.WithIndex(BridgeImageId + 22), { x + 0, y + 16 }); + GfxDrawSprite(&dpi, helper.WithIndex(BridgeImageId + 49), { x, y - 17 }); + GfxDrawSprite(&dpi, ImageId(RailingsImageId + 1), { x + 4, y - 14 }); + GfxDrawSprite(&dpi, ImageId(RailingsImageId + 1), { x + 27, y - 3 }); } } diff --git a/src/openrct2/object/FootpathRailingsObject.h b/src/openrct2/object/FootpathRailingsObject.h index f2365e704f..c9e79327a7 100644 --- a/src/openrct2/object/FootpathRailingsObject.h +++ b/src/openrct2/object/FootpathRailingsObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,7 +30,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; const PathRailingsDescriptor& GetDescriptor() const { diff --git a/src/openrct2/object/FootpathSurfaceObject.cpp b/src/openrct2/object/FootpathSurfaceObject.cpp index 717761ca57..9222fccb0b 100644 --- a/src/openrct2/object/FootpathSurfaceObject.cpp +++ b/src/openrct2/object/FootpathSurfaceObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,17 +12,18 @@ #include "../core/IStream.hpp" #include "../core/Json.hpp" #include "../drawing/Image.h" -#include "../object/ObjectRepository.h" +#include "FootpathEntry.h" +#include "ObjectRepository.h" void FootpathSurfaceObject::Load() { GetStringTable().Sort(); - NameStringId = language_allocate_object_string(GetName()); + NameStringId = LanguageAllocateObjectString(GetName()); auto numImages = GetImageTable().GetCount(); if (numImages != 0) { - PreviewImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + PreviewImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); BaseImageId = PreviewImageId + 1; } @@ -34,20 +35,20 @@ void FootpathSurfaceObject::Load() void FootpathSurfaceObject::Unload() { - language_free_object_string(NameStringId); - gfx_object_free_images(PreviewImageId, GetImageTable().GetCount()); + LanguageFreeObjectString(NameStringId); + GfxObjectFreeImages(PreviewImageId, GetImageTable().GetCount()); NameStringId = 0; PreviewImageId = 0; BaseImageId = 0; } -void FootpathSurfaceObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void FootpathSurfaceObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2 - 16, height / 2 }; - gfx_draw_sprite(dpi, ImageId(BaseImageId + 3), screenCoords); - gfx_draw_sprite(dpi, ImageId(BaseImageId + 16), { screenCoords.x + 32, screenCoords.y - 16 }); - gfx_draw_sprite(dpi, ImageId(BaseImageId + 8), { screenCoords.x + 32, screenCoords.y + 16 }); + GfxDrawSprite(&dpi, ImageId(BaseImageId + 3), screenCoords); + GfxDrawSprite(&dpi, ImageId(BaseImageId + 16), { screenCoords.x + 32, screenCoords.y - 16 }); + GfxDrawSprite(&dpi, ImageId(BaseImageId + 8), { screenCoords.x + 32, screenCoords.y + 16 }); } void FootpathSurfaceObject::ReadJson(IReadObjectContext* context, json_t& root) diff --git a/src/openrct2/object/FootpathSurfaceObject.h b/src/openrct2/object/FootpathSurfaceObject.h index 209d8bf51b..44e4322ff0 100644 --- a/src/openrct2/object/FootpathSurfaceObject.h +++ b/src/openrct2/object/FootpathSurfaceObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; void SetRepositoryItem(ObjectRepositoryItem* item) const override; diff --git a/src/openrct2/object/ImageTable.cpp b/src/openrct2/object/ImageTable.cpp index 006199101f..794ca748be 100644 --- a/src/openrct2/object/ImageTable.cpp +++ b/src/openrct2/object/ImageTable.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ static thread_local std::map> _objDataCache = struct ImageTable::RequiredImage { - rct_g1_element g1{}; + G1Element g1{}; std::unique_ptr next_zoom; bool HasData() const @@ -45,21 +45,21 @@ struct ImageTable::RequiredImage RequiredImage() = default; RequiredImage(const RequiredImage&) = delete; - RequiredImage(const rct_g1_element& orig) + RequiredImage(const G1Element& orig) { - auto length = g1_calculate_data_size(&orig); + auto length = G1CalculateDataSize(&orig); g1 = orig; g1.offset = new uint8_t[length]; std::memcpy(g1.offset, orig.offset, length); g1.flags &= ~G1_FLAG_HAS_ZOOM_SPRITE; } - RequiredImage(uint32_t idx, std::function getter) + RequiredImage(uint32_t idx, std::function getter) { auto orig = getter(idx); if (orig != nullptr) { - auto length = g1_calculate_data_size(orig); + auto length = G1CalculateDataSize(orig); g1 = *orig; g1.offset = new uint8_t[length]; std::memcpy(g1.offset, orig->offset, length); @@ -94,19 +94,19 @@ std::vector> ImageTable::ParseImages( auto range = ParseRange(s.substr(4)); if (!range.empty()) { - if (is_csg_loaded()) + if (IsCsgLoaded()) { for (auto i : range) { result.push_back(std::make_unique( static_cast(SPR_CSG_BEGIN + i), - [](uint32_t idx) -> const rct_g1_element* { return gfx_get_g1_element(idx); })); + [](uint32_t idx) -> const G1Element* { return GfxGetG1Element(idx); })); } } else { std::string id(context->GetObjectIdentifier()); - log_warning("CSG not loaded inserting placeholder images for %s", id.c_str()); + LOG_WARNING("CSG not loaded inserting placeholder images for %s", id.c_str()); result.resize(range.size()); for (auto& res : result) { @@ -123,7 +123,7 @@ std::vector> ImageTable::ParseImages( for (auto i : range) { result.push_back(std::make_unique( - static_cast(i), [](uint32_t idx) -> const rct_g1_element* { return gfx_get_g1_element(idx); })); + static_cast(i), [](uint32_t idx) -> const G1Element* { return GfxGetG1Element(idx); })); } } } @@ -242,7 +242,7 @@ std::vector> ImageTable::LoadImageArc { std::vector> result; auto gxRaw = context->GetData(path); - std::optional gxData = GfxLoadGx(gxRaw); + std::optional gxData = GfxLoadGx(gxRaw); if (gxData.has_value()) { // Fix entry data offsets @@ -282,7 +282,7 @@ std::vector> ImageTable::LoadImageArc } else { - auto msg = String::StdFormat("Unable to load rct_gx '%s'", path.c_str()); + auto msg = String::StdFormat("Unable to load Gx '%s'", path.c_str()); context->LogWarning(ObjectError::BadImageTable, msg.c_str()); for (size_t i = 0; i < range.size(); i++) { @@ -323,7 +323,7 @@ std::vector> ImageTable::LoadObjectIm if (i >= 0 && i < numImages) { result.push_back(std::make_unique( - static_cast(i), [images](uint32_t idx) -> const rct_g1_element* { return &images[idx]; })); + static_cast(i), [images](uint32_t idx) -> const G1Element* { return &images[idx]; })); } else { @@ -467,10 +467,10 @@ void ImageTable::Read(IReadObjectContext* context, OpenRCT2::IStream* stream) // Read g1 element headers uintptr_t imageDataBase = reinterpret_cast(data.get()); - std::vector newEntries; + std::vector newEntries; for (uint32_t i = 0; i < numImages; i++) { - rct_g1_element g1Element{}; + G1Element g1Element{}; uintptr_t imageDataOffset = static_cast(stream->ReadValue()); g1Element.offset = reinterpret_cast(imageDataBase + imageDataOffset); @@ -542,7 +542,7 @@ bool ImageTable::ReadJson(IReadObjectContext* context, json_t& root) // First gather all the required images from inspecting the JSON std::vector> allImages; auto jsonImages = root["images"]; - if (!is_csg_loaded() && root.contains("noCsgImages")) + if (!IsCsgLoaded() && root.contains("noCsgImages")) { jsonImages = root["noCsgImages"]; usesFallbackSprites = true; @@ -586,7 +586,7 @@ bool ImageTable::ReadJson(IReadObjectContext* context, json_t& root) img = img->next_zoom.get(); // Set old image zoom offset to zoom image which we are about to add - auto g1a = const_cast(&GetImages()[tableIndex]); + auto g1a = const_cast(&GetImages()[tableIndex]); g1a->zoomed_offset = static_cast(tableIndex) - static_cast(GetCount()); while (img != nullptr) @@ -608,10 +608,10 @@ bool ImageTable::ReadJson(IReadObjectContext* context, json_t& root) return usesFallbackSprites; } -void ImageTable::AddImage(const rct_g1_element* g1) +void ImageTable::AddImage(const G1Element* g1) { - rct_g1_element newg1 = *g1; - auto length = g1_calculate_data_size(g1); + G1Element newg1 = *g1; + auto length = G1CalculateDataSize(g1); if (length == 0) { newg1.offset = nullptr; diff --git a/src/openrct2/object/ImageTable.h b/src/openrct2/object/ImageTable.h index 226c1a6f68..01839d6678 100644 --- a/src/openrct2/object/ImageTable.h +++ b/src/openrct2/object/ImageTable.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,7 +27,7 @@ class ImageTable { private: std::unique_ptr _data; - std::vector _entries; + std::vector _entries; /** * Container for a G1 image, additional information and RAII. Used by ReadJson @@ -59,7 +59,7 @@ public: * @note root is deliberately left non-const: json_t behaviour changes when const */ bool ReadJson(IReadObjectContext* context, json_t& root); - const rct_g1_element* GetImages() const + const G1Element* GetImages() const { return _entries.data(); } @@ -67,5 +67,5 @@ public: { return static_cast(_entries.size()); } - void AddImage(const rct_g1_element* g1); + void AddImage(const G1Element* g1); }; diff --git a/src/openrct2/object/LargeSceneryEntry.h b/src/openrct2/object/LargeSceneryEntry.h new file mode 100644 index 0000000000..708ccc46a7 --- /dev/null +++ b/src/openrct2/object/LargeSceneryEntry.h @@ -0,0 +1,106 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "../interface/Cursors.h" +#include "../world/Location.hpp" +#include "ObjectTypes.h" + +struct LargeSceneryText; + +struct LargeSceneryTile +{ + int16_t x_offset; + int16_t y_offset; + int16_t z_offset; + uint8_t z_clearance; + // CCCC WWWW 0SS0 0000 + uint16_t flags; +}; + +enum +{ + LARGE_SCENERY_TILE_FLAG_NO_SUPPORTS = 0x20, + LARGE_SCENERY_TILE_FLAG_ALLOW_SUPPORTS_ABOVE = 0x40, +}; + +struct LargeSceneryTextGlyph +{ + uint8_t image_offset; + uint8_t width; + uint8_t height; + uint8_t Pad3; +}; + +// // TODO: Remove not required +struct RCTLargeSceneryText +{ + struct + { + int16_t x, y; + } offset[2]; // 0x0 + uint16_t max_width; // 0x8 + uint16_t PadA; // 0xA + uint8_t flags; // 0xC + uint8_t num_images; // 0xD + LargeSceneryTextGlyph glyphs[256]; // 0xE +}; + +enum LARGE_SCENERY_TEXT_FLAGS +{ + LARGE_SCENERY_TEXT_FLAG_VERTICAL = (1 << 0), // 0x1 + LARGE_SCENERY_TEXT_FLAG_TWO_LINE = (1 << 1), // 0x2 +}; + +struct LargeSceneryEntry +{ + static constexpr auto kObjectType = ObjectType::LargeScenery; + + StringId name; + uint32_t image; + CursorID tool_id; + uint16_t flags; + money64 price; + money64 removal_price; + LargeSceneryTile* tiles; + ObjectEntryIndex scenery_tab_id; + uint8_t scrolling_mode; + LargeSceneryText* text; + uint32_t text_image; +}; + +enum LARGE_SCENERY_FLAGS +{ + LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1 + LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR = (1 << 1), // 0x2 + LARGE_SCENERY_FLAG_3D_TEXT = (1 << 2), // 0x4 + LARGE_SCENERY_FLAG_ANIMATED = (1 << 3), // 0x8 + LARGE_SCENERY_FLAG_PHOTOGENIC = (1 << 4), // 0x10 + LARGE_SCENERY_FLAG_IS_TREE = (1 << 5), // 0x20 + LARGE_SCENERY_FLAG_HAS_TERTIARY_COLOUR = (1 << 6), // 0x40 + LARGE_SCENERY_FLAG_HIDE_PRIMARY_REMAP_BUTTON = (1 << 7), // 0x80 + LARGE_SCENERY_FLAG_HIDE_SECONDARY_REMAP_BUTTON = (1 << 8), // 0x100 +}; + +struct LargeSceneryText +{ + CoordsXY offset[2]; + uint16_t max_width; + uint8_t flags; + uint16_t num_images; + LargeSceneryTextGlyph glyphs[256]; + + LargeSceneryText() = default; + explicit LargeSceneryText(const RCTLargeSceneryText& original); + const LargeSceneryTextGlyph* GetGlyph(char32_t codepoint) const; + const LargeSceneryTextGlyph& GetGlyph(char32_t codepoint, char32_t defaultCodepoint) const; + int32_t MeasureWidth(std::string_view text) const; + int32_t MeasureHeight(std::string_view text) const; +}; diff --git a/src/openrct2/object/LargeSceneryObject.cpp b/src/openrct2/object/LargeSceneryObject.cpp index ac7f5eee15..71ae4bd9b9 100644 --- a/src/openrct2/object/LargeSceneryObject.cpp +++ b/src/openrct2/object/LargeSceneryObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,6 +24,34 @@ #include #include +static RCTLargeSceneryText ReadLegacy3DFont(OpenRCT2::IStream& stream) +{ + RCTLargeSceneryText _3dFontLegacy = {}; + _3dFontLegacy.offset[0].x = stream.ReadValue(); + _3dFontLegacy.offset[0].y = stream.ReadValue(); + _3dFontLegacy.offset[1].x = stream.ReadValue(); + _3dFontLegacy.offset[1].y = stream.ReadValue(); + _3dFontLegacy.max_width = stream.ReadValue(); + stream.ReadValue(); + _3dFontLegacy.flags = stream.ReadValue(); + _3dFontLegacy.num_images = stream.ReadValue(); + + auto ReadLegacyTextGlyph = [&stream]() { + LargeSceneryTextGlyph glyph{}; + glyph.image_offset = stream.ReadValue(); + glyph.width = stream.ReadValue(); + glyph.height = stream.ReadValue(); + stream.ReadValue(); + return glyph; + }; + + for (size_t i = 0; i < std::size(_3dFontLegacy.glyphs); ++i) + { + _3dFontLegacy.glyphs[i] = ReadLegacyTextGlyph(); + } + return _3dFontLegacy; +} + void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stream) { stream->Seek(6, OpenRCT2::STREAM_SEEK_CURRENT); @@ -38,13 +66,12 @@ void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre GetStringTable().Read(context, stream, ObjectStringID::NAME); - rct_object_entry sgEntry = stream->ReadValue(); + RCTObjectEntry sgEntry = stream->ReadValue(); SetPrimarySceneryGroup(ObjectEntryDescriptor(sgEntry)); if (_legacyType.flags & LARGE_SCENERY_FLAG_3D_TEXT) { - rct_large_scenery_text _3dFontLegacy = {}; - stream->Read(&_3dFontLegacy); + RCTLargeSceneryText _3dFontLegacy = ReadLegacy3DFont(*stream); _3dFont = std::make_unique(_3dFontLegacy); _legacyType.text = _3dFont.get(); } @@ -54,11 +81,11 @@ void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre GetImageTable().Read(context, stream); // Validate properties - if (_legacyType.price <= 0) + if (_legacyType.price <= 0.00_GBP) { context->LogError(ObjectError::InvalidProperty, "Price can not be free or negative."); } - if (_legacyType.removal_price <= 0) + if (_legacyType.removal_price <= 0.00_GBP) { // Make sure you don't make a profit when placing then removing. const auto reimbursement = _legacyType.removal_price; @@ -72,17 +99,22 @@ void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre // This meant some custom large scenery objects did not get exported with the required flags, because they still // functioned, but without the ability to change the colours when the object was selected in the scenery window. // OpenRCT2 changes the rendering so that the flags are required, we therefore have to assume all custom objects - // can be recoloured. The minor drawback to this, is that some custom large scenery will have the option to change - // the primary and secondary colour, however no effect will be seen. - _legacyType.flags |= LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR; - _legacyType.flags |= LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR; + // can be recoloured. + if (!(_legacyType.flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) + { + _legacyType.flags |= LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR | LARGE_SCENERY_FLAG_HIDE_PRIMARY_REMAP_BUTTON; + } + if (!(_legacyType.flags & LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR)) + { + _legacyType.flags |= LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR | LARGE_SCENERY_FLAG_HIDE_SECONDARY_REMAP_BUTTON; + } } void LargeSceneryObject::Load() { GetStringTable().Sort(); - _legacyType.name = language_allocate_object_string(GetName()); - _baseImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.name = LanguageAllocateObjectString(GetName()); + _baseImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.image = _baseImageId; _legacyType.tiles = _tiles.data(); @@ -104,14 +136,14 @@ void LargeSceneryObject::Load() void LargeSceneryObject::Unload() { - language_free_object_string(_legacyType.name); - gfx_object_free_images(_baseImageId, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.name); + GfxObjectFreeImages(_baseImageId, GetImageTable().GetCount()); _legacyType.name = 0; _baseImageId = _legacyType.image = 0; } -void LargeSceneryObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void LargeSceneryObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, (height / 2) - 39 }; @@ -123,17 +155,27 @@ void LargeSceneryObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int3 if (_legacyType.flags & LARGE_SCENERY_FLAG_HAS_TERTIARY_COLOUR) image = image.WithTertiary(COLOUR_DARK_BROWN); - gfx_draw_sprite(dpi, image, screenCoords); + GfxDrawSprite(&dpi, image, screenCoords); } -std::vector LargeSceneryObject::ReadTiles(OpenRCT2::IStream* stream) +std::vector LargeSceneryObject::ReadTiles(OpenRCT2::IStream* stream) { - auto tiles = std::vector(); + auto tiles = std::vector(); + + auto ReadLegacyTile = [&stream]() { + LargeSceneryTile tile{}; + tile.x_offset = stream->ReadValue(); + tile.y_offset = stream->ReadValue(); + tile.z_offset = stream->ReadValue(); + tile.z_clearance = stream->ReadValue(); + tile.flags = stream->ReadValue(); + return tile; + }; + while (stream->ReadValue() != 0xFFFF) { stream->Seek(-2, OpenRCT2::STREAM_SEEK_CURRENT); - auto tile = stream->ReadValue(); - tiles.push_back(std::move(tile)); + tiles.push_back(ReadLegacyTile()); } tiles.push_back({ -1, -1, -1, 255, 0xFFFF }); return tiles; @@ -186,15 +228,15 @@ void LargeSceneryObject::ReadJson(IReadObjectContext* context, json_t& root) PopulateTablesFromJson(context, root); } -std::vector LargeSceneryObject::ReadJsonTiles(json_t& jTiles) +std::vector LargeSceneryObject::ReadJsonTiles(json_t& jTiles) { - std::vector tiles; + std::vector tiles; for (auto& jTile : jTiles) { if (jTile.is_object()) { - rct_large_scenery_tile tile = {}; + LargeSceneryTile tile = {}; tile.x_offset = Json::GetNumber(jTile["x"]); tile.y_offset = Json::GetNumber(jTile["y"]); tile.z_offset = Json::GetNumber(jTile["z"]); @@ -278,14 +320,14 @@ std::vector LargeSceneryObject::ReadJsonOffsets(json_t& jOffsets) return offsets; } -std::vector LargeSceneryObject::ReadJsonGlyphs(json_t& jGlyphs) +std::vector LargeSceneryObject::ReadJsonGlyphs(json_t& jGlyphs) { - std::vector glyphs; + std::vector glyphs; for (auto& jGlyph : jGlyphs) { if (jGlyph.is_object()) { - rct_large_scenery_text_glyph glyph = {}; + LargeSceneryTextGlyph glyph = {}; glyph.image_offset = Json::GetNumber(jGlyph["image"]); glyph.width = Json::GetNumber(jGlyph["width"]); glyph.height = Json::GetNumber(jGlyph["height"]); @@ -295,7 +337,7 @@ std::vector LargeSceneryObject::ReadJsonGlyphs(jso return glyphs; } -const rct_large_scenery_tile* LargeSceneryObject::GetTileForSequence(uint8_t SequenceIndex) const +const LargeSceneryTile* LargeSceneryObject::GetTileForSequence(uint8_t SequenceIndex) const { if (SequenceIndex >= _tiles.size()) return nullptr; diff --git a/src/openrct2/object/LargeSceneryObject.h b/src/openrct2/object/LargeSceneryObject.h index 0e0f207c85..83aa29fa2c 100644 --- a/src/openrct2/object/LargeSceneryObject.h +++ b/src/openrct2/object/LargeSceneryObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,7 +9,7 @@ #pragma once -#include "../world/Scenery.h" +#include "LargeSceneryEntry.h" #include "SceneryObject.h" #include @@ -20,7 +20,7 @@ class LargeSceneryObject final : public SceneryObject private: LargeSceneryEntry _legacyType = {}; uint32_t _baseImageId = 0; - std::vector _tiles; + std::vector _tiles; std::unique_ptr _3dFont; public: @@ -34,13 +34,13 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; - const rct_large_scenery_tile* GetTileForSequence(uint8_t SequenceIndex) const; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; + const LargeSceneryTile* GetTileForSequence(uint8_t SequenceIndex) const; private: - [[nodiscard]] static std::vector ReadTiles(OpenRCT2::IStream* stream); - [[nodiscard]] static std::vector ReadJsonTiles(json_t& jTiles); + [[nodiscard]] static std::vector ReadTiles(OpenRCT2::IStream* stream); + [[nodiscard]] static std::vector ReadJsonTiles(json_t& jTiles); [[nodiscard]] static std::unique_ptr ReadJson3dFont(json_t& j3dFont); [[nodiscard]] static std::vector ReadJsonOffsets(json_t& jOffsets); - [[nodiscard]] static std::vector ReadJsonGlyphs(json_t& jGlyphs); + [[nodiscard]] static std::vector ReadJsonGlyphs(json_t& jGlyphs); }; diff --git a/src/openrct2/object/MusicObject.cpp b/src/openrct2/object/MusicObject.cpp index bdf1659fa9..31ca1ff093 100644 --- a/src/openrct2/object/MusicObject.cpp +++ b/src/openrct2/object/MusicObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ constexpr size_t DEFAULT_BYTES_PER_TICK = 1378; void MusicObject::Load() { GetStringTable().Sort(); - NameStringId = language_allocate_object_string(GetName()); + NameStringId = LanguageAllocateObjectString(GetName()); // Start with base images _loadedSampleTable.LoadFrom(_sampleTable, 0, _sampleTable.GetCount()); @@ -74,22 +74,26 @@ void MusicObject::Load() } _hasPreview = !!GetImageTable().GetCount(); - _previewImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _previewImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); } void MusicObject::Unload() { - language_free_object_string(NameStringId); + LanguageFreeObjectString(NameStringId); + GfxObjectFreeImages(_previewImageId, GetImageTable().GetCount()); + + _hasPreview = false; + _previewImageId = 0; NameStringId = 0; } -void MusicObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void MusicObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { // Write (no image) int32_t x = width / 2; int32_t y = height / 2; if (_hasPreview) - gfx_draw_sprite(dpi, ImageId(_previewImageId), { 0, 0 }); + GfxDrawSprite(&dpi, ImageId(_previewImageId), { 0, 0 }); else DrawTextBasic(dpi, { x, y }, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::CENTRE }); } diff --git a/src/openrct2/object/MusicObject.h b/src/openrct2/object/MusicObject.h index 7145c6b9a7..73a82eba92 100644 --- a/src/openrct2/object/MusicObject.h +++ b/src/openrct2/object/MusicObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -59,7 +59,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; std::optional GetOriginalStyleId() const; bool SupportsRideType(ride_type_t rideType); diff --git a/src/openrct2/object/Object.cpp b/src/openrct2/object/Object.cpp index 3a24563070..279cb59817 100644 --- a/src/openrct2/object/Object.cpp +++ b/src/openrct2/object/Object.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -28,7 +28,7 @@ using namespace OpenRCT2; -ObjectEntryDescriptor::ObjectEntryDescriptor(const rct_object_entry& newEntry) +ObjectEntryDescriptor::ObjectEntryDescriptor(const RCTObjectEntry& newEntry) { if (!newEntry.IsEmpty()) { @@ -123,7 +123,7 @@ std::string Object::GetOverrideString(uint8_t index) const const utf8* result = nullptr; if (stringId != STR_NONE) { - result = language_get_string(stringId); + result = LanguageGetString(stringId); } return String::ToStd(result); } @@ -143,19 +143,14 @@ std::string Object::GetString(int32_t language, ObjectStringID index) const return GetStringTable().GetString(language, index); } -ObjectEntryDescriptor Object::GetScgWallsHeader() const -{ - return ObjectEntryDescriptor("rct2.scenery_group.scgwalls"); -} - ObjectEntryDescriptor Object::GetScgPathXHeader() const { return ObjectEntryDescriptor("rct2.scenery_group.scgpathx"); } -rct_object_entry Object::CreateHeader(const char name[DAT_NAME_LENGTH + 1], uint32_t flags, uint32_t checksum) +RCTObjectEntry Object::CreateHeader(const char name[DAT_NAME_LENGTH + 1], uint32_t flags, uint32_t checksum) { - rct_object_entry header = {}; + RCTObjectEntry header = {}; header.flags = flags; std::copy_n(name, DAT_NAME_LENGTH, header.name); header.checksum = checksum; @@ -187,7 +182,7 @@ std::string Object::GetName(int32_t language) const return GetString(language, ObjectStringID::NAME); } -void rct_object_entry::SetName(std::string_view value) +void RCTObjectEntry::SetName(std::string_view value) { std::memset(name, ' ', sizeof(name)); std::memcpy(name, value.data(), std::min(sizeof(name), value.size())); @@ -203,7 +198,7 @@ void Object::SetAuthors(std::vector&& authors) _authors = std::move(authors); } -bool rct_object_entry::IsEmpty() const +bool RCTObjectEntry::IsEmpty() const { uint64_t a, b; std::memcpy(&a, reinterpret_cast(this), 8); @@ -216,7 +211,7 @@ bool rct_object_entry::IsEmpty() const return false; } -bool rct_object_entry::operator==(const rct_object_entry& rhs) const +bool RCTObjectEntry::operator==(const RCTObjectEntry& rhs) const { const auto a = this; const auto b = &rhs; @@ -253,7 +248,7 @@ bool rct_object_entry::operator==(const rct_object_entry& rhs) const return true; } -bool rct_object_entry::operator!=(const rct_object_entry& rhs) const +bool RCTObjectEntry::operator!=(const RCTObjectEntry& rhs) const { return !(*this == rhs); } @@ -329,6 +324,54 @@ std::unique_ptr ObjectAsset::GetStream() const return {}; } +u8string VersionString(const ObjectVersion& version) +{ + return std::to_string(std::get<0>(version)) + "." + std::to_string(std::get<1>(version)) + "." + + std::to_string(std::get<2>(version)); +} + +ObjectVersion VersionTuple(std::string_view version) +{ + if (version.empty()) + { + return std::make_tuple(0, 0, 0); + } + + auto nums = String::Split(version, "."); + uint16_t versions[VersionNumFields] = {}; + if (nums.size() > VersionNumFields) + { + LOG_WARNING("%i fields found in version string '%s', expected X.Y.Z", nums.size(), version); + } + if (nums.size() == 0) + { + LOG_WARNING("No fields found in version string '%s', expected X.Y.Z", version); + return std::make_tuple(0, 0, 0); + } + try + { + size_t highestIndex = std::min(nums.size(), VersionNumFields); + for (size_t i = 0; i < highestIndex; i++) + { + auto value = stoi(nums.at(i)); + constexpr auto maxValue = std::numeric_limits().max(); + if (value > maxValue) + { + LOG_WARNING( + "Version value too high in version string '%s', version value will be capped to %i.", version, maxValue); + value = maxValue; + } + versions[i] = value; + } + } + catch (const std::exception&) + { + LOG_WARNING("Malformed version string '%s', expected X.Y.Z", version); + } + + return std::make_tuple(versions[0], versions[1], versions[2]); +} + #ifdef __WARN_SUGGEST_FINAL_METHODS__ # pragma GCC diagnostic pop #endif diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 6a2b37b7bb..bdc23c8787 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,75 +15,20 @@ #include "../util/Util.h" #include "ImageTable.h" #include "ObjectAsset.h" +#include "ObjectTypes.h" #include "StringTable.h" -#include -#include #include #include #include #include -using ObjectEntryIndex = uint16_t; -constexpr const ObjectEntryIndex OBJECT_ENTRY_INDEX_NULL = std::numeric_limits::max(); struct ObjectRepositoryItem; using ride_type_t = uint16_t; -// First 0xF of rct_object_entry->flags -enum class ObjectType : uint8_t -{ - Ride, - SmallScenery, - LargeScenery, - Walls, - Banners, - Paths, - PathBits, - SceneryGroup, - ParkEntrance, - Water, - ScenarioText, - TerrainSurface, - TerrainEdge, - Station, - Music, - FootpathSurface, - FootpathRailings, - Audio, - - Count, - None = 255 -}; - -constexpr std::array ObjectTypes = { - ObjectType::Ride, - ObjectType::SmallScenery, - ObjectType::LargeScenery, - ObjectType::Walls, - ObjectType::Banners, - ObjectType::Paths, - ObjectType::PathBits, - ObjectType::SceneryGroup, - ObjectType::ParkEntrance, - ObjectType::Water, - ObjectType::ScenarioText, - ObjectType::TerrainSurface, - ObjectType::TerrainEdge, - ObjectType::Station, - ObjectType::Music, - ObjectType::FootpathSurface, - ObjectType::FootpathRailings, - ObjectType::Audio, -}; -static_assert(ObjectTypes.size() == EnumValue(ObjectType::Count)); - -// Object types that can be saved in a park file. -constexpr std::array TransientObjectTypes = { - ObjectType::Ride, ObjectType::SmallScenery, ObjectType::LargeScenery, ObjectType::Walls, - ObjectType::Banners, ObjectType::Paths, ObjectType::PathBits, ObjectType::SceneryGroup, - ObjectType::ParkEntrance, ObjectType::Water, ObjectType::TerrainSurface, ObjectType::TerrainEdge, - ObjectType::Station, ObjectType::Music, ObjectType::FootpathSurface, ObjectType::FootpathRailings, -}; +constexpr const size_t VersionNumFields = 3; +using ObjectVersion = std::tuple; +static_assert(std::tuple_size{} == VersionNumFields); namespace ObjectSelectionFlags { @@ -114,7 +59,7 @@ enum class ObjectSourceGame : uint8_t * Object entry structure. * size: 0x10 */ -struct rct_object_entry +struct RCTObjectEntry { union { @@ -155,27 +100,19 @@ struct rct_object_entry } bool IsEmpty() const; - bool operator==(const rct_object_entry& rhs) const; - bool operator!=(const rct_object_entry& rhs) const; + bool operator==(const RCTObjectEntry& rhs) const; + bool operator!=(const RCTObjectEntry& rhs) const; }; -assert_struct_size(rct_object_entry, 0x10); +assert_struct_size(RCTObjectEntry, 0x10); #pragma pack(pop) -struct rct_ride_filters +struct RideFilters { uint8_t category[2]; ride_type_t ride_type; }; -struct rct_object_filters -{ - union - { - rct_ride_filters ride; - }; -}; - enum class ObjectGeneration : uint8_t { DAT, @@ -187,15 +124,15 @@ struct ObjectEntryDescriptor ObjectGeneration Generation = ObjectGeneration::JSON; // DAT - rct_object_entry Entry{}; + RCTObjectEntry Entry{}; // JSON ObjectType Type{}; std::string Identifier; - std::string Version; + ObjectVersion Version; ObjectEntryDescriptor() = default; - explicit ObjectEntryDescriptor(const rct_object_entry& newEntry); + explicit ObjectEntryDescriptor(const RCTObjectEntry& newEntry); explicit ObjectEntryDescriptor(std::string_view newIdentifier); explicit ObjectEntryDescriptor(ObjectType type, std::string_view newIdentifier); explicit ObjectEntryDescriptor(const ObjectRepositoryItem& ori); @@ -213,7 +150,7 @@ namespace OpenRCT2 struct IStream; } struct ObjectRepositoryItem; -struct rct_drawpixelinfo; +struct DrawPixelInfo; enum class ObjectError : uint32_t { @@ -250,7 +187,7 @@ class Object { private: std::string _identifier; - std::string _version; + ObjectVersion _version; ObjectEntryDescriptor _descriptor{}; StringTable _stringTable; ImageTable _imageTable; @@ -333,7 +270,7 @@ public: } // TODO remove this, we should no longer assume objects have a legacy object entry - const rct_object_entry& GetObjectEntry() const + const RCTObjectEntry& GetObjectEntry() const { return _descriptor.Entry; } @@ -349,7 +286,7 @@ public: virtual void Load() abstract; virtual void Unload() abstract; - virtual void DrawPreview(rct_drawpixelinfo* /*dpi*/, int32_t /*width*/, int32_t /*height*/) const + virtual void DrawPreview(DrawPixelInfo& /*dpi*/, int32_t /*width*/, int32_t /*height*/) const { } @@ -364,11 +301,11 @@ public: const std::vector& GetAuthors() const; void SetAuthors(std::vector&& authors); - const std::string& GetVersion() const + const ObjectVersion& GetVersion() const { return _version; } - void SetVersion(const std::string& version) + void SetVersion(const ObjectVersion& version) { _version = version; } @@ -378,9 +315,8 @@ public: return _imageTable; } - ObjectEntryDescriptor GetScgWallsHeader() const; ObjectEntryDescriptor GetScgPathXHeader() const; - rct_object_entry CreateHeader(const char name[9], uint32_t flags, uint32_t checksum); + RCTObjectEntry CreateHeader(const char name[9], uint32_t flags, uint32_t checksum); uint32_t GetNumImages() const { @@ -394,15 +330,18 @@ public: extern int32_t object_entry_group_counts[]; extern int32_t object_entry_group_encoding[]; -int32_t object_calculate_checksum(const rct_object_entry* entry, const void* data, size_t dataLength); -void object_create_identifier_name(char* string_buffer, size_t size, const rct_object_entry* object); +int32_t ObjectCalculateChecksum(const RCTObjectEntry* entry, const void* data, size_t dataLength); +void ObjectCreateIdentifierName(char* string_buffer, size_t size, const RCTObjectEntry* object); -void object_entry_get_name_fixed(utf8* buffer, size_t bufferSize, const rct_object_entry* entry); +void ObjectEntryGetNameFixed(utf8* buffer, size_t bufferSize, const RCTObjectEntry* entry); -void* object_entry_get_chunk(ObjectType objectType, ObjectEntryIndex index); -const Object* object_entry_get_object(ObjectType objectType, ObjectEntryIndex index); +void* ObjectEntryGetChunk(ObjectType objectType, ObjectEntryIndex index); +const Object* ObjectEntryGetObject(ObjectType objectType, ObjectEntryIndex index); constexpr bool IsIntransientObjectType(ObjectType type) { return type == ObjectType::Audio; } + +u8string VersionString(const ObjectVersion& version); +ObjectVersion VersionTuple(std::string_view version); diff --git a/src/openrct2/object/ObjectAsset.h b/src/openrct2/object/ObjectAsset.h index 560a73d0fe..1ee16d9cf2 100644 --- a/src/openrct2/object/ObjectAsset.h +++ b/src/openrct2/object/ObjectAsset.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/ObjectEntryManager.cpp b/src/openrct2/object/ObjectEntryManager.cpp new file mode 100644 index 0000000000..dc3f853190 --- /dev/null +++ b/src/openrct2/object/ObjectEntryManager.cpp @@ -0,0 +1,17 @@ +#include "ObjectEntryManager.h" + +#include "../Context.h" +#include "ObjectManager.h" + +namespace OpenRCT2::ObjectManager +{ + const void* GetObjectEntry(ObjectType type, ObjectEntryIndex idx) + { + auto* object = GetContext()->GetObjectManager().GetLoadedObject(type, idx); + if (object == nullptr) + { + return nullptr; + } + return object->GetLegacyData(); + } +} // namespace OpenRCT2::ObjectManager diff --git a/src/openrct2/object/ObjectEntryManager.h b/src/openrct2/object/ObjectEntryManager.h new file mode 100644 index 0000000000..84b170e00d --- /dev/null +++ b/src/openrct2/object/ObjectEntryManager.h @@ -0,0 +1,11 @@ +#include "ObjectTypes.h" + +namespace OpenRCT2::ObjectManager +{ + const void* GetObjectEntry(ObjectType type, ObjectEntryIndex idx); + + template const T* GetObjectEntry(ObjectEntryIndex idx) + { + return reinterpret_cast(GetObjectEntry(T::kObjectType, idx)); + } +} // namespace OpenRCT2::ObjectManager diff --git a/src/openrct2/object/ObjectFactory.cpp b/src/openrct2/object/ObjectFactory.cpp index 7ebf361fe8..368ac849a2 100644 --- a/src/openrct2/object/ObjectFactory.cpp +++ b/src/openrct2/object/ObjectFactory.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -184,7 +184,7 @@ public: if (!String::IsNullOrEmpty(text)) { - log_verbose("[%s] Info (%d): %s", _identifier.c_str(), code, text); + LOG_VERBOSE("[%s] Info (%d): %s", _identifier.c_str(), code, text); } } @@ -253,7 +253,7 @@ namespace ObjectFactory std::unique_ptr CreateObjectFromLegacyFile(IObjectRepository& objectRepository, const utf8* path, bool loadImages) { - log_verbose("CreateObjectFromLegacyFile(..., \"%s\")", path); + LOG_VERBOSE("CreateObjectFromLegacyFile(..., \"%s\")", path); std::unique_ptr result; try @@ -261,7 +261,7 @@ namespace ObjectFactory auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); auto chunkReader = SawyerChunkReader(&fs); - rct_object_entry entry = fs.ReadValue(); + RCTObjectEntry entry = fs.ReadValue(); if (entry.GetType() != ObjectType::ScenarioText) { @@ -269,11 +269,11 @@ namespace ObjectFactory result->SetDescriptor(ObjectEntryDescriptor(entry)); utf8 objectName[DAT_NAME_LENGTH + 1] = { 0 }; - object_entry_get_name_fixed(objectName, sizeof(objectName), &entry); - log_verbose(" entry: { 0x%08X, \"%s\", 0x%08X }", entry.flags, objectName, entry.checksum); + ObjectEntryGetNameFixed(objectName, sizeof(objectName), &entry); + LOG_VERBOSE(" entry: { 0x%08X, \"%s\", 0x%08X }", entry.flags, objectName, entry.checksum); auto chunk = chunkReader.ReadChunk(); - log_verbose(" size: %zu", chunk->GetLength()); + LOG_VERBOSE(" size: %zu", chunk->GetLength()); auto chunkStream = OpenRCT2::MemoryStream(chunk->GetData(), chunk->GetLength()); auto readContext = ReadObjectContext(objectRepository, objectName, loadImages, nullptr); @@ -287,13 +287,13 @@ namespace ObjectFactory } catch (const std::exception& e) { - log_error("Error: %s when processing object %s", e.what(), path); + LOG_ERROR("Error: %s when processing object %s", e.what(), path); } return result; } std::unique_ptr CreateObjectFromLegacyData( - IObjectRepository& objectRepository, const rct_object_entry* entry, const void* data, size_t dataSize) + IObjectRepository& objectRepository, const RCTObjectEntry* entry, const void* data, size_t dataSize) { Guard::ArgumentNotNull(entry, GUARD_LINE); Guard::ArgumentNotNull(data, GUARD_LINE); @@ -304,7 +304,7 @@ namespace ObjectFactory result->SetDescriptor(ObjectEntryDescriptor(*entry)); utf8 objectName[DAT_NAME_LENGTH + 1]; - object_entry_get_name_fixed(objectName, sizeof(objectName), entry); + ObjectEntryGetNameFixed(objectName, sizeof(objectName), entry); auto readContext = ReadObjectContext(objectRepository, objectName, !gOpenRCT2NoGraphics, nullptr); auto chunkStream = OpenRCT2::MemoryStream(data, dataSize); @@ -312,7 +312,7 @@ namespace ObjectFactory if (readContext.WasError()) { - log_error("Error when processing object."); + LOG_ERROR("Error when processing object."); } else { @@ -452,7 +452,7 @@ namespace ObjectFactory std::unique_ptr CreateObjectFromJsonFile( IObjectRepository& objectRepository, const std::string& path, bool loadImages) { - log_verbose("CreateObjectFromJsonFile(\"%s\")", path.c_str()); + LOG_VERBOSE("CreateObjectFromJsonFile(\"%s\")", path.c_str()); try { @@ -484,7 +484,7 @@ namespace ObjectFactory } else { - log_error("Object %s has an incorrect sourceGame parameter.", id.c_str()); + LOG_ERROR("Object %s has an incorrect sourceGame parameter.", id.c_str()); result.SetSourceGames({ ObjectSourceGame::Custom }); } } @@ -495,7 +495,7 @@ namespace ObjectFactory } else { - log_error("Object %s has an incorrect sourceGame parameter.", id.c_str()); + LOG_ERROR("Object %s has an incorrect sourceGame parameter.", id.c_str()); result.SetSourceGames({ ObjectSourceGame::Custom }); } } @@ -508,7 +508,7 @@ namespace ObjectFactory throw std::runtime_error("Object JSON root was not an object"); } - log_verbose("CreateObjectFromJson(...)"); + LOG_VERBOSE("CreateObjectFromJson(...)"); std::unique_ptr result; @@ -518,17 +518,17 @@ namespace ObjectFactory auto id = Json::GetString(jRoot["id"]); // HACK Disguise RCT Classic audio as RCT2 audio so asset packs override correctly - if (id == OpenRCT2::Audio::AudioObjectIdentifiers::Rct2cBase) - id = OpenRCT2::Audio::AudioObjectIdentifiers::Rct2Base; + if (id == OpenRCT2::Audio::AudioObjectIdentifiers::RCTCBase) + id = OpenRCT2::Audio::AudioObjectIdentifiers::RCT2Base; - auto version = Json::GetString(jRoot["version"]); + auto version = VersionTuple(Json::GetString(jRoot["version"])); ObjectEntryDescriptor descriptor; auto originalId = Json::GetString(jRoot["originalId"]); if (originalId.length() == 8 + 1 + 8 + 1 + 8) { auto originalName = originalId.substr(9, 8); - rct_object_entry entry = {}; + RCTObjectEntry entry = {}; entry.flags = std::stoul(originalId.substr(0, 8), nullptr, 16); entry.checksum = std::stoul(originalId.substr(18, 8), nullptr, 16); entry.SetType(objectType); diff --git a/src/openrct2/object/ObjectFactory.h b/src/openrct2/object/ObjectFactory.h index 397f072f16..f7d3859fce 100644 --- a/src/openrct2/object/ObjectFactory.h +++ b/src/openrct2/object/ObjectFactory.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,7 +17,7 @@ struct IObjectRepository; class Object; -struct rct_object_entry; +struct RCTObjectEntry; enum class ObjectType : uint8_t; namespace ObjectFactory @@ -25,7 +25,7 @@ namespace ObjectFactory [[nodiscard]] std::unique_ptr CreateObjectFromLegacyFile( IObjectRepository& objectRepository, const utf8* path, bool loadImages); [[nodiscard]] std::unique_ptr CreateObjectFromLegacyData( - IObjectRepository& objectRepository, const rct_object_entry* entry, const void* data, size_t dataSize); + IObjectRepository& objectRepository, const RCTObjectEntry* entry, const void* data, size_t dataSize); [[nodiscard]] std::unique_ptr CreateObjectFromZipFile( IObjectRepository& objectRepository, std::string_view path, bool loadImages); [[nodiscard]] std::unique_ptr CreateObject(ObjectType type); diff --git a/src/openrct2/object/ObjectLimits.h b/src/openrct2/object/ObjectLimits.h index b2da5473a6..e36c29e145 100644 --- a/src/openrct2/object/ObjectLimits.h +++ b/src/openrct2/object/ObjectLimits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/ObjectList.cpp b/src/openrct2/object/ObjectList.cpp index 00e36b8ca6..11559f9c7b 100644 --- a/src/openrct2/object/ObjectList.cpp +++ b/src/openrct2/object/ObjectList.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -195,12 +195,12 @@ ObjectEntryIndex ObjectList::Find(ObjectType type, std::string_view identifier) * * rct2: 0x006AB344 */ -void object_create_identifier_name(char* string_buffer, size_t size, const rct_object_entry* object) +void ObjectCreateIdentifierName(char* string_buffer, size_t size, const RCTObjectEntry* object) { snprintf(string_buffer, size, "%.8s/%4X%4X", object->name, object->flags, object->checksum); } -void get_type_entry_index(size_t index, ObjectType* outObjectType, ObjectEntryIndex* outEntryIndex) +void ObjectGetTypeEntryIndex(size_t index, ObjectType* outObjectType, ObjectEntryIndex* outEntryIndex) { uint8_t objectType = EnumValue(ObjectType::Ride); for (size_t groupCount : object_entry_group_counts) @@ -222,14 +222,14 @@ void get_type_entry_index(size_t index, ObjectType* outObjectType, ObjectEntryIn *outEntryIndex = static_cast(index); } -void object_entry_get_name_fixed(utf8* buffer, size_t bufferSize, const rct_object_entry* entry) +void ObjectEntryGetNameFixed(utf8* buffer, size_t bufferSize, const RCTObjectEntry* entry) { bufferSize = std::min(static_cast(DAT_NAME_LENGTH) + 1, bufferSize); std::memcpy(buffer, entry->name, bufferSize - 1); buffer[bufferSize - 1] = 0; } -void* object_entry_get_chunk(ObjectType objectType, ObjectEntryIndex index) +void* ObjectEntryGetChunk(ObjectType objectType, ObjectEntryIndex index) { auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); auto* object = objectMgr.GetLoadedObject(objectType, index); @@ -240,7 +240,7 @@ void* object_entry_get_chunk(ObjectType objectType, ObjectEntryIndex index) return nullptr; } -const Object* object_entry_get_object(ObjectType objectType, ObjectEntryIndex index) +const Object* ObjectEntryGetObject(ObjectType objectType, ObjectEntryIndex index) { auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); return objectMgr.GetLoadedObject(objectType, index); diff --git a/src/openrct2/object/ObjectList.h b/src/openrct2/object/ObjectList.h index 978d36b0ec..f0b5e0bcea 100644 --- a/src/openrct2/object/ObjectList.h +++ b/src/openrct2/object/ObjectList.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -50,4 +50,4 @@ public: const_iterator end() const; }; -void get_type_entry_index(size_t index, ObjectType* outObjectType, ObjectEntryIndex* outEntryIndex); +void ObjectGetTypeEntryIndex(size_t index, ObjectType* outObjectType, ObjectEntryIndex* outEntryIndex); diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index 959810e081..ba17ceb124 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,6 +18,7 @@ #include "../ride/Ride.h" #include "../ride/RideAudio.h" #include "../util/Util.h" +#include "BannerSceneryEntry.h" #include "FootpathItemObject.h" #include "LargeSceneryObject.h" #include "Object.h" @@ -83,7 +84,7 @@ public: #ifdef DEBUG if (index != OBJECT_ENTRY_INDEX_NULL) { - log_warning("Object index %u exceeds maximum for type %d.", index, objectType); + LOG_WARNING("Object index %u exceeds maximum for type %d.", index, objectType); } #endif return nullptr; @@ -133,7 +134,7 @@ public: size_t index = GetLoadedObjectIndex(object); if (index != SIZE_MAX) { - get_type_entry_index(index, nullptr, &result); + ObjectGetTypeEntryIndex(index, nullptr, &result); } return result; } @@ -162,7 +163,7 @@ public: return RepositoryItemToObject(ori); } - Object* LoadObject(const rct_object_entry* entry) override + Object* LoadObject(const RCTObjectEntry* entry) override { const ObjectRepositoryItem* ori = _objectRepository.FindObject(entry); return RepositoryItemToObject(ori); @@ -456,7 +457,7 @@ private: } } - log_verbose("%u / %u objects unloaded", numObjectsUnloaded, totalObjectsLoaded); + LOG_VERBOSE("%u / %u objects unloaded", numObjectsUnloaded, totalObjectsLoaded); } template void UpdateSceneryGroupIndexes(ObjectType type) @@ -492,7 +493,7 @@ private: // HACK Scenery window will lose its tabs after changing the scenery group indexing // for now just close it, but it will be better to later tell it to invalidate the tabs - window_close_by_class(WindowClass::Scenery); + WindowCloseByClass(WindowClass::Scenery); } ObjectEntryIndex GetPrimarySceneryGroupEntryIndex(Object* loadedObject) @@ -661,7 +662,7 @@ private: list[otl.Index] = otl.LoadedObject; } - log_verbose("%u / %u new objects loaded", newLoadedObjects.size(), requiredObjects.size()); + LOG_VERBOSE("%u / %u new objects loaded", newLoadedObjects.size(), requiredObjects.size()); } Object* GetOrLoadObject(const ObjectRepositoryItem* ori) @@ -701,7 +702,7 @@ private: if (rideObject == nullptr) continue; - const auto* entry = static_cast(rideObject->GetLegacyData()); + const auto* entry = static_cast(rideObject->GetLegacyData()); if (entry == nullptr) continue; @@ -722,7 +723,7 @@ private: Console::Error::WriteLine("[%s] Object not found.", name.c_str()); } - void ReportObjectLoadProblem(const rct_object_entry* entry) + void ReportObjectLoadProblem(const RCTObjectEntry* entry) { utf8 objName[DAT_NAME_LENGTH + 1] = { 0 }; std::copy_n(entry->name, DAT_NAME_LENGTH, objName); @@ -735,45 +736,45 @@ std::unique_ptr CreateObjectManager(IObjectRepository& objectRep return std::make_unique(objectRepository); } -Object* object_manager_get_loaded_object(const ObjectEntryDescriptor& entry) +Object* ObjectManagerGetLoadedObject(const ObjectEntryDescriptor& entry) { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); Object* loadedObject = objectManager.GetLoadedObject(entry); return loadedObject; } -ObjectEntryIndex object_manager_get_loaded_object_entry_index(const Object* loadedObject) +ObjectEntryIndex ObjectManagerGetLoadedObjectEntryIndex(const Object* loadedObject) { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); auto entryIndex = objectManager.GetLoadedObjectEntryIndex(loadedObject); return entryIndex; } -ObjectEntryIndex object_manager_get_loaded_object_entry_index(const ObjectEntryDescriptor& entry) +ObjectEntryIndex ObjectManagerGetLoadedObjectEntryIndex(const ObjectEntryDescriptor& entry) { - return object_manager_get_loaded_object_entry_index(object_manager_get_loaded_object(entry)); + return ObjectManagerGetLoadedObjectEntryIndex(ObjectManagerGetLoadedObject(entry)); } -Object* object_manager_load_object(const rct_object_entry* entry) +Object* ObjectManagerLoadObject(const RCTObjectEntry* entry) { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); Object* loadedObject = objectManager.LoadObject(entry); return loadedObject; } -void object_manager_unload_objects(const std::vector& entries) +void ObjectManagerUnloadObjects(const std::vector& entries) { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); objectManager.UnloadObjects(entries); } -void object_manager_unload_all_objects() +void ObjectManagerUnloadAllObjects() { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); objectManager.UnloadAllTransient(); } -StringId object_manager_get_source_game_string(const ObjectSourceGame sourceGame) +StringId ObjectManagerGetSourceGameString(const ObjectSourceGame sourceGame) { return ObjectManager::GetObjectSourceGameString(sourceGame); } diff --git a/src/openrct2/object/ObjectManager.h b/src/openrct2/object/ObjectManager.h index e202a5fb26..51b6b96757 100644 --- a/src/openrct2/object/ObjectManager.h +++ b/src/openrct2/object/ObjectManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ struct IObjectManager virtual ObjectList GetLoadedObjects() abstract; virtual Object* LoadObject(std::string_view identifier) abstract; - virtual Object* LoadObject(const rct_object_entry* entry) abstract; + virtual Object* LoadObject(const RCTObjectEntry* entry) abstract; virtual Object* LoadObject(const ObjectEntryDescriptor& descriptor) abstract; virtual void LoadObjects(const ObjectList& entries) abstract; virtual void UnloadObjects(const std::vector& entries) abstract; @@ -49,10 +49,10 @@ struct IObjectManager [[nodiscard]] std::unique_ptr CreateObjectManager(IObjectRepository& objectRepository); -[[nodiscard]] Object* object_manager_get_loaded_object(const ObjectEntryDescriptor& entry); -[[nodiscard]] ObjectEntryIndex object_manager_get_loaded_object_entry_index(const Object* loadedObject); -[[nodiscard]] ObjectEntryIndex object_manager_get_loaded_object_entry_index(const ObjectEntryDescriptor& entry); -Object* object_manager_load_object(const rct_object_entry* entry); -void object_manager_unload_objects(const std::vector& entries); -void object_manager_unload_all_objects(); -[[nodiscard]] StringId object_manager_get_source_game_string(const ObjectSourceGame sourceGame); +[[nodiscard]] Object* ObjectManagerGetLoadedObject(const ObjectEntryDescriptor& entry); +[[nodiscard]] ObjectEntryIndex ObjectManagerGetLoadedObjectEntryIndex(const Object* loadedObject); +[[nodiscard]] ObjectEntryIndex ObjectManagerGetLoadedObjectEntryIndex(const ObjectEntryDescriptor& entry); +Object* ObjectManagerLoadObject(const RCTObjectEntry* entry); +void ObjectManagerUnloadObjects(const std::vector& entries); +void ObjectManagerUnloadAllObjects(); +[[nodiscard]] StringId ObjectManagerGetSourceGameString(const ObjectSourceGame sourceGame); diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index aeeeb12f3b..840242ea2d 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -53,7 +53,7 @@ using namespace OpenRCT2; struct ObjectEntryHash { - size_t operator()(const rct_object_entry& entry) const + size_t operator()(const RCTObjectEntry& entry) const { uint32_t hash = 5381; for (auto i : entry.name) @@ -66,14 +66,14 @@ struct ObjectEntryHash struct ObjectEntryEqual { - bool operator()(const rct_object_entry& lhs, const rct_object_entry& rhs) const + bool operator()(const RCTObjectEntry& lhs, const RCTObjectEntry& rhs) const { return memcmp(&lhs.name, &rhs.name, 8) == 0; } }; using ObjectIdentifierMap = std::unordered_map; -using ObjectEntryMap = std::unordered_map; +using ObjectEntryMap = std::unordered_map; class ObjectFileIndex final : public FileIndex { @@ -220,7 +220,7 @@ public: const ObjectRepositoryItem* FindObjectLegacy(std::string_view legacyIdentifier) const override { - rct_object_entry entry = {}; + RCTObjectEntry entry = {}; entry.SetName(legacyIdentifier); auto kvp = _itemMap.find(entry); @@ -241,7 +241,7 @@ public: return nullptr; } - const ObjectRepositoryItem* FindObject(const rct_object_entry* objectEntry) const override final + const ObjectRepositoryItem* FindObject(const RCTObjectEntry* objectEntry) const override final { auto kvp = _itemMap.find(*objectEntry); if (kvp != _itemMap.end()) @@ -293,10 +293,10 @@ public: } } - void AddObject(const rct_object_entry* objectEntry, const void* data, size_t dataSize) override + void AddObject(const RCTObjectEntry* objectEntry, const void* data, size_t dataSize) override { utf8 objectName[9]; - object_entry_get_name_fixed(objectName, sizeof(objectName), objectEntry); + ObjectEntryGetNameFixed(objectName, sizeof(objectName), objectEntry); // Check that the object is loadable before writing it auto object = ObjectFactory::CreateObjectFromLegacyData(*this, objectEntry, data, dataSize); @@ -306,7 +306,7 @@ public: } else { - log_verbose("Adding object: [%s]", objectName); + LOG_VERBOSE("Adding object: [%s]", objectName); auto path = GetPathForNewObject(ObjectGeneration::DAT, objectName); try { @@ -322,7 +322,7 @@ public: void AddObjectFromFile(ObjectGeneration generation, std::string_view objectName, const void* data, size_t dataSize) override { - log_verbose("Adding object: [%s]", std::string(objectName).c_str()); + LOG_VERBOSE("Adding object: [%s]", std::string(objectName).c_str()); auto path = GetPathForNewObject(generation, objectName); try { @@ -340,7 +340,7 @@ public: auto chunkReader = SawyerChunkReader(stream); // Check if we already have this object - rct_object_entry entry = stream->ReadValue(); + RCTObjectEntry entry = stream->ReadValue(); if (FindObject(&entry) != nullptr) { chunkReader.SkipChunk(); @@ -378,7 +378,7 @@ private: _newItemMap.clear(); for (size_t i = 0; i < _items.size(); i++) { - rct_object_entry entry = _items[i].ObjectEntry; + RCTObjectEntry entry = _items[i].ObjectEntry; _itemMap[entry] = i; if (!_items[i].Identifier.empty()) { @@ -468,16 +468,16 @@ private: } static void SaveObject( - std::string_view path, const rct_object_entry* entry, const void* data, size_t dataSize, bool fixChecksum = true) + std::string_view path, const RCTObjectEntry* entry, const void* data, size_t dataSize, bool fixChecksum = true) { if (fixChecksum) { - uint32_t realChecksum = object_calculate_checksum(entry, data, dataSize); + uint32_t realChecksum = ObjectCalculateChecksum(entry, data, dataSize); if (realChecksum != entry->checksum) { char objectName[9]; - object_entry_get_name_fixed(objectName, sizeof(objectName), entry); - log_verbose("[%s] Incorrect checksum, adding salt bytes...", objectName); + ObjectEntryGetNameFixed(objectName, sizeof(objectName), entry); + LOG_VERBOSE("[%s] Incorrect checksum, adding salt bytes...", objectName); // Calculate the value of extra bytes that can be appended to the data so that the // data is then valid for the object's checksum @@ -493,7 +493,7 @@ private: try { - uint32_t newRealChecksum = object_calculate_checksum(entry, newData, newDataSize); + uint32_t newRealChecksum = ObjectCalculateChecksum(entry, newData, newDataSize); if (newRealChecksum != entry->checksum) { Console::Error::WriteLine("CalculateExtraBytesToFixChecksum failed to fix checksum."); @@ -521,18 +521,18 @@ private: // Encode data ObjectType objectType = entry->GetType(); - sawyercoding_chunk_header chunkHeader; + SawyerCodingChunkHeader chunkHeader; chunkHeader.encoding = object_entry_group_encoding[EnumValue(objectType)]; chunkHeader.length = static_cast(dataSize); uint8_t* encodedDataBuffer = Memory::Allocate(0x600000); - size_t encodedDataSize = sawyercoding_write_chunk_buffer( + size_t encodedDataSize = SawyerCodingWriteChunkBuffer( encodedDataBuffer, reinterpret_cast(data), chunkHeader); // Save to file try { auto fs = FileStream(std::string(path), FILE_MODE_WRITE); - fs.Write(entry, sizeof(rct_object_entry)); + fs.Write(entry, sizeof(RCTObjectEntry)); fs.Write(encodedDataBuffer, encodedDataSize); Memory::Free(encodedDataBuffer); @@ -623,7 +623,7 @@ private: } } - void WritePackedObject(OpenRCT2::IStream* stream, const rct_object_entry* entry) + void WritePackedObject(OpenRCT2::IStream* stream, const RCTObjectEntry* entry) { const ObjectRepositoryItem* item = FindObject(entry); if (item == nullptr) @@ -633,7 +633,7 @@ private: // Read object data from file auto fs = OpenRCT2::FileStream(item->Path, OpenRCT2::FILE_MODE_OPEN); - auto fileEntry = fs.ReadValue(); + auto fileEntry = fs.ReadValue(); if (*entry != fileEntry) { throw std::runtime_error("Header found in object file does not match object to pack."); @@ -671,7 +671,7 @@ bool IsObjectCustom(const ObjectRepositoryItem* object) } } -std::unique_ptr object_repository_load_object(const rct_object_entry* objectEntry) +std::unique_ptr ObjectRepositoryLoadObject(const RCTObjectEntry* objectEntry) { std::unique_ptr object; auto& objRepository = GetContext()->GetObjectRepository(); @@ -687,47 +687,47 @@ std::unique_ptr object_repository_load_object(const rct_object_entry* ob return object; } -void scenario_translate(scenario_index_entry* scenarioEntry) +void ScenarioTranslate(ScenarioIndexEntry* scenarioEntry) { StringId localisedStringIds[3]; - if (language_get_localised_scenario_strings(scenarioEntry->name, localisedStringIds)) + if (LanguageGetLocalisedScenarioStrings(scenarioEntry->Name, localisedStringIds)) { if (localisedStringIds[0] != STR_NONE) { - String::Set(scenarioEntry->name, sizeof(scenarioEntry->name), language_get_string(localisedStringIds[0])); + String::Set(scenarioEntry->Name, sizeof(scenarioEntry->Name), LanguageGetString(localisedStringIds[0])); } if (localisedStringIds[2] != STR_NONE) { - String::Set(scenarioEntry->details, sizeof(scenarioEntry->details), language_get_string(localisedStringIds[2])); + String::Set(scenarioEntry->Details, sizeof(scenarioEntry->Details), LanguageGetString(localisedStringIds[2])); } } } -size_t object_repository_get_items_count() +size_t ObjectRepositoryGetItemsCount() { auto& objectRepository = GetContext()->GetObjectRepository(); return objectRepository.GetNumObjects(); } -const ObjectRepositoryItem* object_repository_get_items() +const ObjectRepositoryItem* ObjectRepositoryGetItems() { auto& objectRepository = GetContext()->GetObjectRepository(); return objectRepository.GetObjects(); } -const ObjectRepositoryItem* object_repository_find_object_by_entry(const rct_object_entry* entry) +const ObjectRepositoryItem* ObjectRepositoryFindObjectByEntry(const RCTObjectEntry* entry) { auto& objectRepository = GetContext()->GetObjectRepository(); return objectRepository.FindObject(entry); } -const ObjectRepositoryItem* object_repository_find_object_by_name(const char* name) +const ObjectRepositoryItem* ObjectRepositoryFindObjectByName(const char* name) { auto& objectRepository = GetContext()->GetObjectRepository(); return objectRepository.FindObjectLegacy(name); } -int32_t object_calculate_checksum(const rct_object_entry* entry, const void* data, size_t dataLength) +int32_t ObjectCalculateChecksum(const RCTObjectEntry* entry, const void* data, size_t dataLength) { const uint8_t* entryBytePtr = reinterpret_cast(entry); diff --git a/src/openrct2/object/ObjectRepository.h b/src/openrct2/object/ObjectRepository.h index 1456b84ca7..659516d523 100644 --- a/src/openrct2/object/ObjectRepository.h +++ b/src/openrct2/object/ObjectRepository.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,7 +32,7 @@ namespace OpenRCT2::Localisation class LocalisationService; } -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct ObjectRepositoryItem { @@ -40,10 +40,10 @@ struct ObjectRepositoryItem ObjectType Type; ObjectGeneration Generation; std::string Identifier; // e.g. rct2.c3d - rct_object_entry ObjectEntry; + RCTObjectEntry ObjectEntry; std::string Path; std::string Name; - std::string Version; + ObjectVersion Version; std::vector Authors; std::vector Sources; std::shared_ptr LoadedObject{}; @@ -81,14 +81,14 @@ struct IObjectRepository [[nodiscard]] virtual const ObjectRepositoryItem* GetObjects() const abstract; [[nodiscard]] virtual const ObjectRepositoryItem* FindObjectLegacy(std::string_view legacyIdentifier) const abstract; [[nodiscard]] virtual const ObjectRepositoryItem* FindObject(std::string_view identifier) const abstract; - [[nodiscard]] virtual const ObjectRepositoryItem* FindObject(const rct_object_entry* objectEntry) const abstract; + [[nodiscard]] virtual const ObjectRepositoryItem* FindObject(const RCTObjectEntry* objectEntry) const abstract; [[nodiscard]] virtual const ObjectRepositoryItem* FindObject(const ObjectEntryDescriptor& oed) const abstract; [[nodiscard]] virtual std::unique_ptr LoadObject(const ObjectRepositoryItem* ori) abstract; virtual void RegisterLoadedObject(const ObjectRepositoryItem* ori, std::unique_ptr&& object) abstract; virtual void UnregisterLoadedObject(const ObjectRepositoryItem* ori, Object* object) abstract; - virtual void AddObject(const rct_object_entry* objectEntry, const void* data, size_t dataSize) abstract; + virtual void AddObject(const RCTObjectEntry* objectEntry, const void* data, size_t dataSize) abstract; virtual void AddObjectFromFile( ObjectGeneration generation, std::string_view objectName, const void* data, size_t dataSize) abstract; @@ -100,8 +100,8 @@ struct IObjectRepository [[nodiscard]] bool IsObjectCustom(const ObjectRepositoryItem* object); -[[nodiscard]] size_t object_repository_get_items_count(); -[[nodiscard]] const ObjectRepositoryItem* object_repository_get_items(); -[[nodiscard]] const ObjectRepositoryItem* object_repository_find_object_by_entry(const rct_object_entry* entry); -[[nodiscard]] const ObjectRepositoryItem* object_repository_find_object_by_name(const char* name); -[[nodiscard]] std::unique_ptr object_repository_load_object(const rct_object_entry* objectEntry); +[[nodiscard]] size_t ObjectRepositoryGetItemsCount(); +[[nodiscard]] const ObjectRepositoryItem* ObjectRepositoryGetItems(); +[[nodiscard]] const ObjectRepositoryItem* ObjectRepositoryFindObjectByEntry(const RCTObjectEntry* entry); +[[nodiscard]] const ObjectRepositoryItem* ObjectRepositoryFindObjectByName(const char* name); +[[nodiscard]] std::unique_ptr ObjectRepositoryLoadObject(const RCTObjectEntry* objectEntry); diff --git a/src/openrct2/object/ObjectTypes.cpp b/src/openrct2/object/ObjectTypes.cpp new file mode 100644 index 0000000000..e9988e7053 --- /dev/null +++ b/src/openrct2/object/ObjectTypes.cpp @@ -0,0 +1,22 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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 "ObjectTypes.h" + +#include + +bool ObjectTypeIsTransient(ObjectType type) +{ + return std::find(TransientObjectTypes.begin(), TransientObjectTypes.end(), type) != std::end(TransientObjectTypes); +} + +bool ObjectTypeIsIntransient(ObjectType type) +{ + return std::find(IntransientObjectTypes.begin(), IntransientObjectTypes.end(), type) != std::end(IntransientObjectTypes); +} diff --git a/src/openrct2/object/ObjectTypes.h b/src/openrct2/object/ObjectTypes.h new file mode 100644 index 0000000000..05444663a9 --- /dev/null +++ b/src/openrct2/object/ObjectTypes.h @@ -0,0 +1,80 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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 +#include +#include + +using ObjectEntryIndex = uint16_t; +constexpr const ObjectEntryIndex OBJECT_ENTRY_INDEX_NULL = std::numeric_limits::max(); + +// First 0xF of RCTObjectEntry->flags +enum class ObjectType : uint8_t +{ + Ride, + SmallScenery, + LargeScenery, + Walls, + Banners, + Paths, + PathBits, + SceneryGroup, + ParkEntrance, + Water, + ScenarioText, + TerrainSurface, + TerrainEdge, + Station, + Music, + FootpathSurface, + FootpathRailings, + Audio, + + Count, + None = 255 +}; + +constexpr std::array ObjectTypes = { + ObjectType::Ride, + ObjectType::SmallScenery, + ObjectType::LargeScenery, + ObjectType::Walls, + ObjectType::Banners, + ObjectType::Paths, + ObjectType::PathBits, + ObjectType::SceneryGroup, + ObjectType::ParkEntrance, + ObjectType::Water, + ObjectType::ScenarioText, + ObjectType::TerrainSurface, + ObjectType::TerrainEdge, + ObjectType::Station, + ObjectType::Music, + ObjectType::FootpathSurface, + ObjectType::FootpathRailings, + ObjectType::Audio, +}; +// Not using EnumValue to reduce header includes +static_assert(ObjectTypes.size() == static_cast(ObjectType::Count)); + +// Object types that can be saved in a park file. +constexpr std::array TransientObjectTypes = { + ObjectType::Ride, ObjectType::SmallScenery, ObjectType::LargeScenery, ObjectType::Walls, + ObjectType::Banners, ObjectType::Paths, ObjectType::PathBits, ObjectType::SceneryGroup, + ObjectType::ParkEntrance, ObjectType::Water, ObjectType::TerrainSurface, ObjectType::TerrainEdge, + ObjectType::Station, ObjectType::Music, ObjectType::FootpathSurface, ObjectType::FootpathRailings, +}; + +// Object types that cannot be saved in a park file. +constexpr std::array IntransientObjectTypes = { ObjectType::ScenarioText, ObjectType::Audio }; + +bool ObjectTypeIsTransient(ObjectType type); +bool ObjectTypeIsIntransient(ObjectType type); diff --git a/src/openrct2/object/ResourceTable.cpp b/src/openrct2/object/ResourceTable.cpp index 92f6307836..f23eb12b54 100644 --- a/src/openrct2/object/ResourceTable.cpp +++ b/src/openrct2/object/ResourceTable.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/ResourceTable.h b/src/openrct2/object/ResourceTable.h index f22a85cd4e..016d220d2a 100644 --- a/src/openrct2/object/ResourceTable.h +++ b/src/openrct2/object/ResourceTable.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 5987bef18b..d5460a66d2 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,6 +24,7 @@ #include "../localisation/Language.h" #include "../rct2/DATLimits.h" #include "../rct2/RCT2.h" +#include "../ride/CarEntry.h" #include "../ride/Ride.h" #include "../ride/RideData.h" #include "../ride/ShopItem.h" @@ -42,27 +43,72 @@ static const uint8_t SpriteGroupMultiplier[EnumValue(SpriteGroupType::Count)] = 1, 2, 2, 2, 2, 2, 2, 10, 1, 2, 2, 2, 2, 2, 2, 2, 6, 4, 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 20, 3, 1, }; +constexpr const uint8_t DefaultSteamSpawnPosition[] = { 11, 22 }; + +static const EnumMap AnimationNameLookup{ + { "none", CarEntryAnimation::None }, + { "simpleVehicle", CarEntryAnimation::SimpleVehicle }, + { "steamLocomotive", CarEntryAnimation::SteamLocomotive }, + { "swanBoat", CarEntryAnimation::SwanBoat }, + { "monorailCycle", CarEntryAnimation::MonorailCycle }, + { "MultiDimension", CarEntryAnimation::MultiDimension }, + { "observationTower", CarEntryAnimation::ObservationTower }, + { "animalFlying", CarEntryAnimation::AnimalFlying }, +}; + +constexpr const auto NumLegacyAnimationTypes = 11; + +struct LegacyAnimationParameters +{ + uint16_t Speed; + uint8_t NumFrames; + CarEntryAnimation Alias; +}; + +constexpr const LegacyAnimationParameters VehicleEntryDefaultAnimation[] = { + { 0, 1, CarEntryAnimation::None }, // None + { 1 << 12, 4, CarEntryAnimation::SteamLocomotive }, // Miniature Railway Locomotive + { 1 << 10, 2, CarEntryAnimation::SwanBoat }, // Swan Boat + { 1 << 11, 6, CarEntryAnimation::SimpleVehicle }, // Canoe + { 1 << 11, 7, CarEntryAnimation::SimpleVehicle }, // Rowboat + { 1 << 10, 2, CarEntryAnimation::SimpleVehicle }, // Water Tricycle + { 0x3333, 8, CarEntryAnimation::ObservationTower }, // Observation Tower + { 1 << 10, 4, CarEntryAnimation::SimpleVehicle }, // Mini Helicopter + { 1 << 11, 4, CarEntryAnimation::MonorailCycle }, // Monorail Cycle + { 0x3333, 8, CarEntryAnimation::MultiDimension }, // Multi Dimension Coaster + { 24, 4, CarEntryAnimation::AnimalFlying }, // Animal Flying +}; +static_assert(std::size(VehicleEntryDefaultAnimation) == NumLegacyAnimationTypes); + +static CarEntryAnimation GetAnimationTypeFromString(const std::string& s) +{ + auto result = AnimationNameLookup.find(s); + return (result != AnimationNameLookup.end()) ? result->second : CarEntryAnimation::None; +} + +static LegacyAnimationParameters GetDefaultAnimationParameters(uint8_t legacyAnimationType) +{ + if (legacyAnimationType >= NumLegacyAnimationTypes) + return VehicleEntryDefaultAnimation[0]; + return VehicleEntryDefaultAnimation[legacyAnimationType]; +} + static constexpr SpritePrecision PrecisionFromNumFrames(uint8_t numRotationFrames) { if (numRotationFrames == 0) return SpritePrecision::None; else - return static_cast(bitscanforward(numRotationFrames) + 1); + return static_cast(UtilBitScanForward(numRotationFrames) + 1); } -static void RideObjectUpdateRideType(rct_ride_entry* rideEntry) +static void RideObjectUpdateRideType(RideObjectEntry& rideEntry) { - if (rideEntry == nullptr) - { - return; - } - for (auto i = 0; i < RCT2::ObjectLimits::MaxRideTypesPerRideEntry; i++) { - auto oldRideType = rideEntry->ride_type[i]; + auto oldRideType = rideEntry.ride_type[i]; if (oldRideType != RIDE_TYPE_NULL) { - rideEntry->ride_type[i] = RCT2::RCT2RideTypeToOpenRCT2RideType(oldRideType, rideEntry); + rideEntry.ride_type[i] = RCT2::RCT2RideTypeToOpenRCT2RideType(oldRideType, rideEntry); } } } @@ -89,7 +135,7 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream) _legacyType.ThirdCar = stream->ReadValue(); _legacyType.BuildMenuPriority = 0; - // Skip pad_019 + // Skip Pad019 stream->Seek(1, STREAM_SEEK_CURRENT); for (auto& carEntry : _legacyType.Cars) @@ -199,7 +245,8 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream) { context->LogError(ObjectError::InvalidProperty, "Nausea multiplier too high."); } - RideObjectUpdateRideType(&_legacyType); + RideObjectUpdateRideType(_legacyType); + _legacyType.Clearance = GetDefaultClearance(); } void RideObject::Load() @@ -207,68 +254,68 @@ void RideObject::Load() _legacyType.obj = this; GetStringTable().Sort(); - _legacyType.naming.Name = language_allocate_object_string(GetName()); - _legacyType.naming.Description = language_allocate_object_string(GetDescription()); - _legacyType.capacity = language_allocate_object_string(GetCapacity()); - _legacyType.images_offset = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.naming.Name = LanguageAllocateObjectString(GetName()); + _legacyType.naming.Description = LanguageAllocateObjectString(GetDescription()); + _legacyType.capacity = LanguageAllocateObjectString(GetCapacity()); + _legacyType.images_offset = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.vehicle_preset_list = &_presetColours; int32_t currentCarImagesOffset = _legacyType.images_offset + RCT2::ObjectLimits::MaxRideTypesPerRideEntry; for (int32_t i = 0; i < RCT2::ObjectLimits::MaxCarTypesPerRideEntry; i++) { - CarEntry* carEntry = &_legacyType.Cars[i]; - if (carEntry->GroupEnabled(SpriteGroupType::SlopeFlat)) + CarEntry& carEntry = _legacyType.Cars[i]; + if (carEntry.GroupEnabled(SpriteGroupType::SlopeFlat)) { // RCT2 calculates num_vertical_frames and num_horizontal_frames and overwrites these properties on the car // entry. Immediately afterwards, the two were multiplied in order to calculate base_num_frames and were never used // again. This has been changed to use the calculation results directly - num_vertical_frames and // num_horizontal_frames are no longer set on the car entry. // 0x6DE946 - carEntry->base_num_frames = CalculateNumVerticalFrames(carEntry) * CalculateNumHorizontalFrames(carEntry); + carEntry.base_num_frames = CalculateNumVerticalFrames(carEntry) * CalculateNumHorizontalFrames(carEntry); uint32_t baseImageId = currentCarImagesOffset; uint32_t imageIndex = baseImageId; - carEntry->base_image_id = baseImageId; + carEntry.base_image_id = baseImageId; for (uint8_t spriteGroup = 0; spriteGroup < EnumValue(SpriteGroupType::Count); spriteGroup++) { - if (carEntry->SpriteGroups[spriteGroup].Enabled()) + if (carEntry.SpriteGroups[spriteGroup].Enabled()) { - carEntry->SpriteGroups[spriteGroup].imageId = imageIndex; - const auto spriteCount = carEntry->base_num_frames - * carEntry->NumRotationSprites(static_cast(spriteGroup)) + carEntry.SpriteGroups[spriteGroup].imageId = imageIndex; + const auto spriteCount = carEntry.base_num_frames + * carEntry.NumRotationSprites(static_cast(spriteGroup)) * SpriteGroupMultiplier[spriteGroup]; imageIndex += spriteCount; } } - carEntry->NumCarImages = imageIndex - currentCarImagesOffset; + carEntry.NumCarImages = imageIndex - currentCarImagesOffset; - // Move the offset over this car’s images. Including peeps - currentCarImagesOffset = imageIndex + carEntry->no_seating_rows * carEntry->NumCarImages; + // Move the offset over this car's images. Including peeps + currentCarImagesOffset = imageIndex + carEntry.no_seating_rows * carEntry.NumCarImages; // 0x6DEB0D - if (!(carEntry->flags & CAR_ENTRY_FLAG_RECALCULATE_SPRITE_BOUNDS)) + if (!(carEntry.flags & CAR_ENTRY_FLAG_RECALCULATE_SPRITE_BOUNDS)) { int32_t num_images = currentCarImagesOffset - baseImageId; - if (carEntry->flags & CAR_ENTRY_FLAG_SPRITE_BOUNDS_INCLUDE_INVERTED_SET) + if (carEntry.flags & CAR_ENTRY_FLAG_SPRITE_BOUNDS_INCLUDE_INVERTED_SET) { num_images *= 2; } if (!gOpenRCT2NoGraphics) { - set_vehicle_type_image_max_sizes(carEntry, num_images); + CarEntrySetImageMaxSizes(carEntry, num_images); } } if (!_peepLoadingPositions[i].empty()) { - carEntry->peep_loading_positions = std::move(_peepLoadingPositions[i]); + carEntry.peep_loading_positions = std::move(_peepLoadingPositions[i]); } if (!_peepLoadingWaypoints[i].empty()) { - carEntry->peep_loading_waypoints = std::move(_peepLoadingWaypoints[i]); + carEntry.peep_loading_waypoints = std::move(_peepLoadingWaypoints[i]); } } } @@ -276,10 +323,10 @@ void RideObject::Load() void RideObject::Unload() { - language_free_object_string(_legacyType.naming.Name); - language_free_object_string(_legacyType.naming.Description); - language_free_object_string(_legacyType.capacity); - gfx_object_free_images(_legacyType.images_offset, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.naming.Name); + LanguageFreeObjectString(_legacyType.naming.Description); + LanguageFreeObjectString(_legacyType.capacity); + GfxObjectFreeImages(_legacyType.images_offset, GetImageTable().GetCount()); _legacyType.naming.Name = 0; _legacyType.naming.Description = 0; @@ -287,7 +334,7 @@ void RideObject::Unload() _legacyType.images_offset = 0; } -void RideObject::DrawPreview(rct_drawpixelinfo* dpi, [[maybe_unused]] int32_t width, [[maybe_unused]] int32_t height) const +void RideObject::DrawPreview(DrawPixelInfo& dpi, [[maybe_unused]] int32_t width, [[maybe_unused]] int32_t height) const { uint32_t imageId = _legacyType.images_offset; @@ -299,7 +346,7 @@ void RideObject::DrawPreview(rct_drawpixelinfo* dpi, [[maybe_unused]] int32_t wi imageId++; } - gfx_draw_sprite(dpi, ImageId(imageId), { 0, 0 }); + GfxDrawSprite(&dpi, ImageId(imageId), { 0, 0 }); } std::string RideObject::GetDescription() const @@ -353,7 +400,7 @@ void RideObject::ReadLegacyCar([[maybe_unused]] IReadObjectContext* context, ISt car->sprite_width = stream->ReadValue(); car->sprite_height_negative = stream->ReadValue(); car->sprite_height_positive = stream->ReadValue(); - car->animation = stream->ReadValue(); + auto legacyAnimation = stream->ReadValue(); car->flags = stream->ReadValue(); car->base_num_frames = stream->ReadValue(); stream->Seek(15 * 4, STREAM_SEEK_CURRENT); @@ -371,25 +418,33 @@ void RideObject::ReadLegacyCar([[maybe_unused]] IReadObjectContext* context, ISt car->draw_order = stream->ReadValue(); car->num_vertical_frames_override = stream->ReadValue(); stream->Seek(4, STREAM_SEEK_CURRENT); + + // OpenRCT2-specific features below + auto animationProperties = GetDefaultAnimationParameters(legacyAnimation); + car->animation = animationProperties.Alias; + car->AnimationSpeed = animationProperties.Speed; + car->AnimationFrames = animationProperties.NumFrames; + car->SteamEffect.Longitudinal = DefaultSteamSpawnPosition[0]; + car->SteamEffect.Vertical = DefaultSteamSpawnPosition[1]; ReadLegacySpriteGroups(car, spriteGroups); } -uint8_t RideObject::CalculateNumVerticalFrames(const CarEntry* carEntry) +uint8_t RideObject::CalculateNumVerticalFrames(const CarEntry& carEntry) { // 0x6DE90B uint8_t numVerticalFrames; - if (carEntry->flags & CAR_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES) + if (carEntry.flags & CAR_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES) { - numVerticalFrames = carEntry->num_vertical_frames_override; + numVerticalFrames = carEntry.num_vertical_frames_override; } else { - if (!(carEntry->flags & CAR_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES)) + if (!(carEntry.flags & CAR_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES)) { - if (carEntry->flags & CAR_ENTRY_FLAG_VEHICLE_ANIMATION - && carEntry->animation != CAR_ENTRY_ANIMATION_OBSERVATION_TOWER) + if ((carEntry.flags & CAR_ENTRY_FLAG_VEHICLE_ANIMATION) + && carEntry.animation != CarEntryAnimation::ObservationTower) { - if (!(carEntry->flags & CAR_ENTRY_FLAG_DODGEM_INUSE_LIGHTS)) + if (!(carEntry.flags & CAR_ENTRY_FLAG_DODGEM_INUSE_LIGHTS)) { numVerticalFrames = 4; } @@ -412,14 +467,14 @@ uint8_t RideObject::CalculateNumVerticalFrames(const CarEntry* carEntry) return numVerticalFrames; } -uint8_t RideObject::CalculateNumHorizontalFrames(const CarEntry* carEntry) +uint8_t RideObject::CalculateNumHorizontalFrames(const CarEntry& carEntry) { uint8_t numHorizontalFrames; - if (carEntry->flags & CAR_ENTRY_FLAG_SWINGING) + if (carEntry.flags & CAR_ENTRY_FLAG_SWINGING) { - if (!(carEntry->flags & CAR_ENTRY_FLAG_SUSPENDED_SWING) && !(carEntry->flags & CAR_ENTRY_FLAG_SLIDE_SWING)) + if (!(carEntry.flags & CAR_ENTRY_FLAG_SUSPENDED_SWING) && !(carEntry.flags & CAR_ENTRY_FLAG_SLIDE_SWING)) { - if (carEntry->flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) + if (carEntry.flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) { numHorizontalFrames = 3; } @@ -428,7 +483,7 @@ uint8_t RideObject::CalculateNumHorizontalFrames(const CarEntry* carEntry) numHorizontalFrames = 5; } } - else if (!(carEntry->flags & CAR_ENTRY_FLAG_SUSPENDED_SWING) || !(carEntry->flags & CAR_ENTRY_FLAG_SLIDE_SWING)) + else if (!(carEntry.flags & CAR_ENTRY_FLAG_SUSPENDED_SWING) || !(carEntry.flags & CAR_ENTRY_FLAG_SLIDE_SWING)) { numHorizontalFrames = 7; } @@ -475,6 +530,7 @@ void RideObject::ReadJson(IReadObjectContext* context, json_t& root) } _legacyType.max_height = Json::GetNumber(properties["maxHeight"]); + _legacyType.Clearance = Json::GetNumber(properties["clearance"], GetDefaultClearance()); // This needs to be set for both shops/facilities _and_ regular rides. for (auto& item : _legacyType.shop_item) @@ -565,10 +621,11 @@ void RideObject::ReadJson(IReadObjectContext* context, json_t& root) { "noCollisionCrashes", RIDE_ENTRY_FLAG_DISABLE_COLLISION_CRASHES }, { "disablePainting", RIDE_ENTRY_FLAG_DISABLE_COLOUR_TAB }, { "riderControlsSpeed", RIDE_ENTRY_FLAG_RIDER_CONTROLS_SPEED }, + { "hideEmptyTrains", RIDE_ENTRY_FLAG_HIDE_EMPTY_TRAINS }, }); } - RideObjectUpdateRideType(&_legacyType); + RideObjectUpdateRideType(_legacyType); PopulateTablesFromJson(context, root); } @@ -648,7 +705,6 @@ CarEntry RideObject::ReadJsonCar([[maybe_unused]] IReadObjectContext* context, j car.sprite_width = Json::GetNumber(jCar["spriteWidth"]); car.sprite_height_negative = Json::GetNumber(jCar["spriteHeightNegative"]); car.sprite_height_positive = Json::GetNumber(jCar["spriteHeightPositive"]); - car.animation = Json::GetNumber(jCar["animation"]); car.base_num_frames = Json::GetNumber(jCar["baseNumFrames"]); car.NumCarImages = Json::GetNumber(jCar["numImages"]); car.no_seating_rows = Json::GetNumber(jCar["numSeatRows"]); @@ -665,6 +721,38 @@ CarEntry RideObject::ReadJsonCar([[maybe_unused]] IReadObjectContext* context, j car.draw_order = Json::GetNumber(jCar["drawOrder"]); car.num_vertical_frames_override = Json::GetNumber(jCar["numVerticalFramesOverride"]); + auto jAnimation = jCar["animation"]; + if (jAnimation.is_object()) + { + car.animation = GetAnimationTypeFromString(Json::GetString(jAnimation["animationType"])); + car.AnimationSpeed = Json::GetNumber(jAnimation["animationSpeed"]); + car.AnimationFrames = Json::GetNumber(jAnimation["animationFrames"]); + } + else + { + auto animationProperties = GetDefaultAnimationParameters(Json::GetNumber(jAnimation)); + car.animation = animationProperties.Alias; + car.AnimationSpeed = animationProperties.Speed; + car.AnimationFrames = animationProperties.NumFrames; + + if (!jCar["animationSpeed"].is_null()) + car.AnimationSpeed = Json::GetNumber(jCar["animationSpeed"]); + if (!jCar["animationFrames"].is_null()) + car.AnimationFrames = Json::GetNumber(jCar["animationFrames"]); + } + + auto jSteamTranslation = jCar["steamPosition"]; + if (jSteamTranslation.is_object()) + { + car.SteamEffect.Longitudinal = Json::GetNumber(jSteamTranslation["longitudinal"], DefaultSteamSpawnPosition[0]); + car.SteamEffect.Vertical = Json::GetNumber(jSteamTranslation["vertical"], DefaultSteamSpawnPosition[1]); + } + else + { + car.SteamEffect.Longitudinal = DefaultSteamSpawnPosition[0]; + car.SteamEffect.Vertical = DefaultSteamSpawnPosition[1]; + } + auto jLoadingPositions = jCar["loadingPositions"]; if (jLoadingPositions.is_array()) { @@ -778,7 +866,7 @@ CarEntry RideObject::ReadJsonCar([[maybe_unused]] IReadObjectContext* context, j auto numRotationFrames = Json::GetNumber(jRotationCount[SpriteGroupNames[i]], 0); if (numRotationFrames != 0) { - if (!is_power_of_2(numRotationFrames)) + if (!IsPowerOf2(numRotationFrames)) { context->LogError(ObjectError::InvalidProperty, "spriteGroups values must be powers of 2"); continue; @@ -791,7 +879,7 @@ CarEntry RideObject::ReadJsonCar([[maybe_unused]] IReadObjectContext* context, j return car; } -vehicle_colour_preset_list RideObject::ReadJsonCarColours(json_t& jCarColours) +VehicleColourPresetList RideObject::ReadJsonCarColours(json_t& jCarColours) { Guard::Assert(jCarColours.is_array(), "RideObject::ReadJsonCarColours expects parameter jCarColours to be array"); @@ -806,7 +894,7 @@ vehicle_colour_preset_list RideObject::ReadJsonCarColours(json_t& jCarColours) { // Read all colours from first config auto config = ReadJsonColourConfiguration(firstElement); - vehicle_colour_preset_list list = {}; + VehicleColourPresetList list = {}; list.count = 255; std::copy_n(config.data(), std::min(numColours, 32), list.list); return list; @@ -814,7 +902,7 @@ vehicle_colour_preset_list RideObject::ReadJsonCarColours(json_t& jCarColours) } // Read first colour for each config - vehicle_colour_preset_list list = {}; + VehicleColourPresetList list = {}; for (size_t index = 0; index < jCarColours.size(); index++) { auto config = ReadJsonColourConfiguration(jCarColours[index]); @@ -1019,3 +1107,10 @@ void RideObject::ReadLegacySpriteGroups(CarEntry* vehicle, uint16_t spriteGroups vehicle->SpriteGroups[EnumValue(SpriteGroupType::CurvedLiftHill)].spritePrecision = baseSpritePrecision; } } + +uint8_t RideObject::GetDefaultClearance() const +{ + auto rideType = _legacyType.GetFirstNonNullRideType(); + const auto& rtd = GetRideTypeDescriptor(rideType); + return rtd.Heights.ClearanceHeight; +} diff --git a/src/openrct2/object/RideObject.h b/src/openrct2/object/RideObject.h index bac6746816..0acdccce00 100644 --- a/src/openrct2/object/RideObject.h +++ b/src/openrct2/object/RideObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,8 +20,8 @@ class RideObject final : public Object { private: - rct_ride_entry _legacyType = {}; - vehicle_colour_preset_list _presetColours = {}; + RideObjectEntry _legacyType = {}; + VehicleColourPresetList _presetColours = {}; std::vector _peepLoadingPositions[RCT2::ObjectLimits::MaxCarTypesPerRideEntry]; std::vector> _peepLoadingWaypoints[RCT2::ObjectLimits::MaxCarTypesPerRideEntry]; @@ -36,7 +36,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; std::string GetDescription() const; std::string GetCapacity() const; @@ -52,11 +52,11 @@ private: void ReadJsonVehicleInfo(IReadObjectContext* context, json_t& properties); std::vector ReadJsonCars([[maybe_unused]] IReadObjectContext* context, json_t& jCars); CarEntry ReadJsonCar([[maybe_unused]] IReadObjectContext* context, json_t& jCar); - vehicle_colour_preset_list ReadJsonCarColours(json_t& jCarColours); + VehicleColourPresetList ReadJsonCarColours(json_t& jCarColours); std::vector ReadJsonColourConfiguration(json_t& jColourConfig); - static uint8_t CalculateNumVerticalFrames(const CarEntry* carEntry); - static uint8_t CalculateNumHorizontalFrames(const CarEntry* carEntry); + static uint8_t CalculateNumVerticalFrames(const CarEntry& carEntry); + static uint8_t CalculateNumHorizontalFrames(const CarEntry& carEntry); static bool IsRideTypeShopOrFacility(ride_type_t rideType); static uint8_t ParseRideCategory(const std::string& s); @@ -64,4 +64,5 @@ private: static colour_t ParseColour(const std::string& s); void ReadLegacySpriteGroups(CarEntry* vehicle, uint16_t spriteGroups); + uint8_t GetDefaultClearance() const; }; diff --git a/src/openrct2/object/SceneryGroupEntry.h b/src/openrct2/object/SceneryGroupEntry.h new file mode 100644 index 0000000000..571f52adcf --- /dev/null +++ b/src/openrct2/object/SceneryGroupEntry.h @@ -0,0 +1,27 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "../world/ScenerySelection.h" +#include "ObjectTypes.h" + +#include + +struct SceneryGroupEntry +{ + static constexpr auto kObjectType = ObjectType::SceneryGroup; + + StringId name; + uint32_t image; + std::vector SceneryEntries; + uint8_t priority; + uint32_t entertainer_costumes; +}; diff --git a/src/openrct2/object/SceneryGroupObject.cpp b/src/openrct2/object/SceneryGroupObject.cpp index a4fa621c20..3c0b11ba21 100644 --- a/src/openrct2/object/SceneryGroupObject.cpp +++ b/src/openrct2/object/SceneryGroupObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,7 @@ #include "../drawing/Image.h" #include "../entity/Staff.h" #include "../localisation/Language.h" +#include "../world/Scenery.h" #include "ObjectLimits.h" #include "ObjectManager.h" #include "ObjectRepository.h" @@ -43,9 +44,9 @@ void SceneryGroupObject::ReadLegacy(IReadObjectContext* context, IStream* stream stream->Seek(6, STREAM_SEEK_CURRENT); stream->Seek(0x80 * 2, STREAM_SEEK_CURRENT); stream->Seek(1, STREAM_SEEK_CURRENT); // entry_count - stream->Seek(1, STREAM_SEEK_CURRENT); // pad_107; + stream->Seek(1, STREAM_SEEK_CURRENT); // Pad107; _legacyType.priority = stream->ReadValue(); - stream->Seek(1, STREAM_SEEK_CURRENT); // pad_109; + stream->Seek(1, STREAM_SEEK_CURRENT); // Pad109; _legacyType.entertainer_costumes = stream->ReadValue(); GetStringTable().Read(context, stream, ObjectStringID::NAME); @@ -56,26 +57,26 @@ void SceneryGroupObject::ReadLegacy(IReadObjectContext* context, IStream* stream void SceneryGroupObject::Load() { GetStringTable().Sort(); - _legacyType.name = language_allocate_object_string(GetName()); - _legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.name = LanguageAllocateObjectString(GetName()); + _legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.SceneryEntries.clear(); } void SceneryGroupObject::Unload() { - language_free_object_string(_legacyType.name); - gfx_object_free_images(_legacyType.image, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.name); + GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount()); _legacyType.name = 0; _legacyType.image = 0; } -void SceneryGroupObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void SceneryGroupObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; const auto imageId = ImageId(_legacyType.image + 1, COLOUR_DARK_GREEN); - gfx_draw_sprite(dpi, imageId, screenCoords - ScreenCoordsXY{ 15, 14 }); + GfxDrawSprite(&dpi, imageId, screenCoords - ScreenCoordsXY{ 15, 14 }); } static std::optional GetSceneryType(const ObjectType type) @@ -139,7 +140,7 @@ std::vector SceneryGroupObject::ReadItems(IStream* stream while (stream->ReadValue() != 0xFF) { stream->Seek(-1, STREAM_SEEK_CURRENT); - auto entry = stream->ReadValue(); + auto entry = stream->ReadValue(); items.emplace_back(entry); } return items; @@ -219,7 +220,7 @@ std::vector SceneryGroupObject::ReadJsonEntries(IReadObje try { - rct_object_entry entry = {}; + RCTObjectEntry entry = {}; entry.flags = std::stoul(entryName.substr(DatEntryFlagsStart, DatEntryFlagsLength), nullptr, 16); std::memcpy(entry.name, entryName.c_str() + DatEntryNameStart, DAT_NAME_LENGTH); entry.checksum = 0; diff --git a/src/openrct2/object/SceneryGroupObject.h b/src/openrct2/object/SceneryGroupObject.h index 092b74fc04..9f1307889c 100644 --- a/src/openrct2/object/SceneryGroupObject.h +++ b/src/openrct2/object/SceneryGroupObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,8 +9,8 @@ #pragma once -#include "../world/Scenery.h" #include "Object.h" +#include "SceneryGroupEntry.h" #include @@ -21,7 +21,7 @@ enum class EntertainerCostume : uint8_t; class SceneryGroupObject final : public Object { private: - rct_scenery_group_entry _legacyType = {}; + SceneryGroupEntry _legacyType = {}; std::vector _items; public: @@ -36,7 +36,7 @@ public: void Unload() override; void UpdateEntryIndexes(); - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; void SetRepositoryItem(ObjectRepositoryItem* item) const override; diff --git a/src/openrct2/object/SceneryObject.h b/src/openrct2/object/SceneryObject.h index aa9e4a88ef..eb59c4f825 100644 --- a/src/openrct2/object/SceneryObject.h +++ b/src/openrct2/object/SceneryObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/SmallSceneryEntry.h b/src/openrct2/object/SmallSceneryEntry.h new file mode 100644 index 0000000000..e139bc1904 --- /dev/null +++ b/src/openrct2/object/SmallSceneryEntry.h @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "../interface/Cursors.h" +#include "ObjectTypes.h" + +enum SMALL_SCENERY_FLAGS : uint32_t +{ + SMALL_SCENERY_FLAG_FULL_TILE = (1 << 0), // 0x1 + SMALL_SCENERY_FLAG_VOFFSET_CENTRE = (1 << 1), // 0x2 + SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE = (1 << 2), // 0x4 + SMALL_SCENERY_FLAG_ROTATABLE = (1 << 3), // 0x8; when set, user can set rotation, otherwise rotation is automatic + SMALL_SCENERY_FLAG_ANIMATED = (1 << 4), // 0x10 + SMALL_SCENERY_FLAG_CAN_WITHER = (1 << 5), // 0x20 + SMALL_SCENERY_FLAG_CAN_BE_WATERED = (1 << 6), // 0x40 + SMALL_SCENERY_FLAG_ANIMATED_FG = (1 << 7), // 0x80 + SMALL_SCENERY_FLAG_DIAGONAL = (1 << 8), // 0x100 + SMALL_SCENERY_FLAG_HAS_GLASS = (1 << 9), // 0x200 + SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR = (1 << 10), // 0x400 + SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1 = (1 << 11), // 0x800 + SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_4 = (1 << 12), // 0x1000 + SMALL_SCENERY_FLAG_IS_CLOCK = (1 << 13), // 0x2000 + SMALL_SCENERY_FLAG_SWAMP_GOO = (1 << 14), // 0x4000 + SMALL_SCENERY_FLAG_HAS_FRAME_OFFSETS = (1 << 15), // 0x8000 + SMALL_SCENERY_FLAG17 = (1 << 16), // 0x10000 + SMALL_SCENERY_FLAG_STACKABLE = (1 << 17), // 0x20000; means scenery item can be placed in the air and over water + SMALL_SCENERY_FLAG_NO_WALLS = (1 << 18), // 0x40000 + SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR = (1 << 19), // 0x80000 + SMALL_SCENERY_FLAG_NO_SUPPORTS = (1 << 20), // 0x100000 + SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED = (1 << 21), // 0x200000 + SMALL_SCENERY_FLAG_COG = (1 << 22), // 0x400000 + SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP = (1 << 23), // 0x800000; means supports can be built on this object. Used for base + // blocks. + SMALL_SCENERY_FLAG_HALF_SPACE = (1 << 24), // 0x1000000 + SMALL_SCENERY_FLAG_THREE_QUARTERS = (1 << 25), // 0x2000000 + SMALL_SCENERY_FLAG_PAINT_SUPPORTS = (1 << 26), // 0x4000000; used for scenery items which are support structures + SMALL_SCENERY_FLAG27 = (1 << 27), // 0x8000000 + + // Added by OpenRCT2: + SMALL_SCENERY_FLAG_IS_TREE = (1 << 28), + SMALL_SCENERY_FLAG_HAS_TERTIARY_COLOUR = (1 << 29), +}; + +struct SmallSceneryEntry +{ + static constexpr auto kObjectType = ObjectType::SmallScenery; + + StringId name; + uint32_t image; + uint32_t flags; + uint8_t height; + CursorID tool_id; + money64 price; + money64 removal_price; + uint8_t* frame_offsets; + uint16_t animation_delay; + uint16_t animation_mask; + uint16_t num_frames; + ObjectEntryIndex scenery_tab_id; + + constexpr bool HasFlag(const uint32_t _flags) const + { + return (flags & _flags) != 0; + } +}; diff --git a/src/openrct2/object/SmallSceneryObject.cpp b/src/openrct2/object/SmallSceneryObject.cpp index 586e40329b..6f7751a02f 100644 --- a/src/openrct2/object/SmallSceneryObject.cpp +++ b/src/openrct2/object/SmallSceneryObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,7 +20,6 @@ #include "../interface/Cursors.h" #include "../localisation/Language.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include @@ -40,7 +39,7 @@ void SmallSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre GetStringTable().Read(context, stream, ObjectStringID::NAME); - rct_object_entry sgEntry = stream->ReadValue(); + RCTObjectEntry sgEntry = stream->ReadValue(); SetPrimarySceneryGroup(ObjectEntryDescriptor(sgEntry)); if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_HAS_FRAME_OFFSETS)) @@ -56,11 +55,11 @@ void SmallSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre GetImageTable().Read(context, stream); // Validate properties - if (_legacyType.price <= 0) + if (_legacyType.price <= 0.00_GBP) { context->LogError(ObjectError::InvalidProperty, "Price can not be free or negative."); } - if (_legacyType.removal_price <= 0) + if (_legacyType.removal_price <= 0.00_GBP) { // Make sure you don't make a profit when placing then removing. const auto reimbursement = _legacyType.removal_price; @@ -74,8 +73,8 @@ void SmallSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre void SmallSceneryObject::Load() { GetStringTable().Sort(); - _legacyType.name = language_allocate_object_string(GetName()); - _legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.name = LanguageAllocateObjectString(GetName()); + _legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; @@ -89,14 +88,14 @@ void SmallSceneryObject::Load() void SmallSceneryObject::Unload() { - language_free_object_string(_legacyType.name); - gfx_object_free_images(_legacyType.image, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.name); + GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount()); _legacyType.name = 0; _legacyType.image = 0; } -void SmallSceneryObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void SmallSceneryObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto imageId = ImageId(_legacyType.image); if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR)) @@ -120,12 +119,12 @@ void SmallSceneryObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int3 screenCoords.y -= 12; } - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(&dpi, imageId, screenCoords); if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_HAS_GLASS)) { imageId = ImageId(_legacyType.image + 4).WithTransparency(COLOUR_BORDEAUX_RED); - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(&dpi, imageId, screenCoords); } if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_ANIMATED_FG)) @@ -135,7 +134,7 @@ void SmallSceneryObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int3 { imageId = imageId.WithSecondary(COLOUR_YELLOW); } - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(&dpi, imageId, screenCoords); } } @@ -156,14 +155,13 @@ std::vector SmallSceneryObject::ReadFrameOffsets(OpenRCT2::IStream* str void SmallSceneryObject::PerformFixes() { auto identifier = GetLegacyIdentifier(); - static const auto& scgWalls = Object::GetScgWallsHeader(); // ToonTowner's base blocks. Put them in the Walls and Roofs group. if (identifier == "XXBBCL01" || identifier == "XXBBMD01" || identifier == "ARBASE2 ") { - SetPrimarySceneryGroup(scgWalls); + SetPrimarySceneryGroup(ObjectEntryDescriptor("rct2.scenery_group.scgwalls")); } // ToonTowner's Pirate roofs. Make them show up in the Pirate Theming. @@ -172,17 +170,11 @@ void SmallSceneryObject::PerformFixes() identifier == "TTPRF10 " || identifier == "TTPRF11 ") { - static const auto& scgPirat = GetScgPiratHeader(); - SetPrimarySceneryGroup(scgPirat); + SetPrimarySceneryGroup(ObjectEntryDescriptor("rct2.scenery_group.scgpirat")); } } // clang-format on -ObjectEntryDescriptor SmallSceneryObject::GetScgPiratHeader() const -{ - return ObjectEntryDescriptor("rct2.scenery_group.scgpirat"); -} - void SmallSceneryObject::ReadJson(IReadObjectContext* context, json_t& root) { Guard::Assert(root.is_object(), "SmallSceneryObject::ReadJson expects parameter root to be object"); diff --git a/src/openrct2/object/SmallSceneryObject.h b/src/openrct2/object/SmallSceneryObject.h index 884c3d0d2f..635c388a8c 100644 --- a/src/openrct2/object/SmallSceneryObject.h +++ b/src/openrct2/object/SmallSceneryObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,7 @@ #include "../world/Scenery.h" #include "SceneryObject.h" +#include "SmallSceneryEntry.h" #include @@ -31,11 +32,10 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; private: static std::vector ReadFrameOffsets(OpenRCT2::IStream* stream); static std::vector ReadJsonFrameOffsets(json_t& jFrameOffsets); void PerformFixes(); - ObjectEntryDescriptor GetScgPiratHeader() const; }; diff --git a/src/openrct2/object/StationObject.cpp b/src/openrct2/object/StationObject.cpp index 2e8d81934f..92d444f094 100644 --- a/src/openrct2/object/StationObject.cpp +++ b/src/openrct2/object/StationObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,12 +20,12 @@ void StationObject::Load() { GetStringTable().Sort(); - NameStringId = language_allocate_object_string(GetName()); + NameStringId = LanguageAllocateObjectString(GetName()); auto numImages = GetImageTable().GetCount(); if (numImages != 0) { - BaseImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + BaseImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); uint32_t shelterOffset = (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) ? 32 : 16; if (numImages > shelterOffset) @@ -37,15 +37,15 @@ void StationObject::Load() void StationObject::Unload() { - language_free_object_string(NameStringId); - gfx_object_free_images(BaseImageId, GetImageTable().GetCount()); + LanguageFreeObjectString(NameStringId); + GfxObjectFreeImages(BaseImageId, GetImageTable().GetCount()); NameStringId = 0; BaseImageId = ImageIndexUndefined; ShelterImageId = ImageIndexUndefined; } -void StationObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void StationObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, (height / 2) + 16 }; @@ -64,16 +64,16 @@ void StationObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t h imageId = imageId.WithSecondary(colour1); } - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(&dpi, imageId, screenCoords); if (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) { - gfx_draw_sprite(dpi, tImageId, screenCoords); + GfxDrawSprite(&dpi, tImageId, screenCoords); } - gfx_draw_sprite(dpi, imageId.WithIndexOffset(4), screenCoords); + GfxDrawSprite(&dpi, imageId.WithIndexOffset(4), screenCoords); if (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) { - gfx_draw_sprite(dpi, tImageId.WithIndexOffset(4), screenCoords); + GfxDrawSprite(&dpi, tImageId.WithIndexOffset(4), screenCoords); } } diff --git a/src/openrct2/object/StationObject.h b/src/openrct2/object/StationObject.h index 20163ffb08..ff6e2fefeb 100644 --- a/src/openrct2/object/StationObject.h +++ b/src/openrct2/object/StationObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,5 +35,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/StringTable.cpp b/src/openrct2/object/StringTable.cpp index d6ea866802..b8b7d28789 100644 --- a/src/openrct2/object/StringTable.cpp +++ b/src/openrct2/object/StringTable.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,6 +9,7 @@ #include "StringTable.h" +#include "../Context.h" #include "../core/IStream.hpp" #include "../core/Json.hpp" #include "../core/String.hpp" @@ -59,7 +60,7 @@ void StringTable::Read(IReadObjectContext* context, OpenRCT2::IStream* stream, O ? RCT2ToOpenRCT2LanguageId[EnumValue(rct2LanguageId)] : static_cast(LANGUAGE_UNDEFINED); std::string stringAsWin1252 = stream->ReadStdString(); - auto stringAsUtf8 = rct2_to_utf8(stringAsWin1252, rct2LanguageId); + auto stringAsUtf8 = RCT2StringToUTF8(stringAsWin1252, rct2LanguageId); if (!StringIsBlank(stringAsUtf8.data())) { @@ -107,7 +108,7 @@ void StringTable::ReadJson(json_t& root) { for (auto& [locale, jsonString] : jsonLanguages.items()) { - auto langId = language_get_id_from_locale(locale.c_str()); + auto langId = LanguageGetIDFromLocale(locale.c_str()); if (langId != LANGUAGE_UNDEFINED) { auto string = Json::GetString(jsonString); @@ -154,8 +155,8 @@ void StringTable::SetString(ObjectStringID id, uint8_t language, const std::stri void StringTable::Sort() { - auto targetLanguage = LocalisationService_GetCurrentLanguage(); - std::sort(_strings.begin(), _strings.end(), [targetLanguage](const StringTableEntry& a, const StringTableEntry& b) -> bool { + const auto& languageOrder = OpenRCT2::GetContext()->GetLocalisationService().GetLanguageOrder(); + std::sort(_strings.begin(), _strings.end(), [languageOrder](const StringTableEntry& a, const StringTableEntry& b) -> bool { if (a.Id == b.Id) { if (a.LanguageId == b.LanguageId) @@ -163,22 +164,16 @@ void StringTable::Sort() return String::Compare(a.Text, b.Text, true) < 0; } - if (a.LanguageId == targetLanguage) + for (const auto& language : languageOrder) { - return true; - } - if (b.LanguageId == targetLanguage) - { - return false; - } - - if (a.LanguageId == LANGUAGE_ENGLISH_UK) - { - return true; - } - if (b.LanguageId == LANGUAGE_ENGLISH_UK) - { - return false; + if (a.LanguageId == language) + { + return true; + } + if (b.LanguageId == language) + { + return false; + } } return a.LanguageId < b.LanguageId; diff --git a/src/openrct2/object/StringTable.h b/src/openrct2/object/StringTable.h index fd8636718c..514107e25c 100644 --- a/src/openrct2/object/StringTable.h +++ b/src/openrct2/object/StringTable.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/object/TerrainEdgeObject.cpp b/src/openrct2/object/TerrainEdgeObject.cpp index ac1c89d65f..501951d7c5 100644 --- a/src/openrct2/object/TerrainEdgeObject.cpp +++ b/src/openrct2/object/TerrainEdgeObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,8 +21,8 @@ void TerrainEdgeObject::Load() { GetStringTable().Sort(); - NameStringId = language_allocate_object_string(GetName()); - IconImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + NameStringId = LanguageAllocateObjectString(GetName()); + IconImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); // First image is icon followed by edge images BaseImageId = IconImageId + 1; @@ -30,21 +30,21 @@ void TerrainEdgeObject::Load() void TerrainEdgeObject::Unload() { - language_free_object_string(NameStringId); - gfx_object_free_images(IconImageId, GetImageTable().GetCount()); + LanguageFreeObjectString(NameStringId); + GfxObjectFreeImages(IconImageId, GetImageTable().GetCount()); NameStringId = 0; IconImageId = 0; BaseImageId = 0; } -void TerrainEdgeObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void TerrainEdgeObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; auto imageId = ImageId(BaseImageId + 5); - gfx_draw_sprite(dpi, imageId, screenCoords + ScreenCoordsXY{ 8, -8 }); - gfx_draw_sprite(dpi, imageId, screenCoords + ScreenCoordsXY{ 8, 8 }); + GfxDrawSprite(&dpi, imageId, screenCoords + ScreenCoordsXY{ 8, -8 }); + GfxDrawSprite(&dpi, imageId, screenCoords + ScreenCoordsXY{ 8, 8 }); } void TerrainEdgeObject::ReadJson(IReadObjectContext* context, json_t& root) diff --git a/src/openrct2/object/TerrainEdgeObject.h b/src/openrct2/object/TerrainEdgeObject.h index 199efe5489..6e9cf5fd62 100644 --- a/src/openrct2/object/TerrainEdgeObject.h +++ b/src/openrct2/object/TerrainEdgeObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; static TerrainEdgeObject* GetById(ObjectEntryIndex entryIndex); }; diff --git a/src/openrct2/object/TerrainSurfaceObject.cpp b/src/openrct2/object/TerrainSurfaceObject.cpp index d5f3e96e14..c5d05cca06 100644 --- a/src/openrct2/object/TerrainSurfaceObject.cpp +++ b/src/openrct2/object/TerrainSurfaceObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,8 +24,8 @@ void TerrainSurfaceObject::Load() { GetStringTable().Sort(); - NameStringId = language_allocate_object_string(GetName()); - IconImageId = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + NameStringId = LanguageAllocateObjectString(GetName()); + IconImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); if ((Flags & SMOOTH_WITH_SELF) || (Flags & SMOOTH_WITH_OTHER)) { PatternBaseImageId = IconImageId + 1; @@ -40,8 +40,8 @@ void TerrainSurfaceObject::Load() void TerrainSurfaceObject::Unload() { - language_free_object_string(NameStringId); - gfx_object_free_images(IconImageId, GetImageTable().GetCount()); + LanguageFreeObjectString(NameStringId); + GfxObjectFreeImages(IconImageId, GetImageTable().GetCount()); NameStringId = 0; IconImageId = 0; @@ -50,7 +50,7 @@ void TerrainSurfaceObject::Unload() NumEntries = 0; } -void TerrainSurfaceObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void TerrainSurfaceObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto imageId = ImageId(GetImageId({}, 1, 0, 0, false, false)); if (Colour != 255) @@ -70,7 +70,7 @@ void TerrainSurfaceObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, in } for (int32_t j = 0; j < 4; j++) { - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(&dpi, imageId, screenCoords); screenCoords.x += 64; } screenCoords.y += 16; @@ -87,7 +87,7 @@ void TerrainSurfaceObject::ReadJson(IReadObjectContext* context, json_t& root) { Colour = Colour::FromString(Json::GetString(properties["colour"]), 255); Rotations = Json::GetNumber(properties["rotations"], 1); - Price = Json::GetNumber(properties["price"]); + Price = Json::GetNumber(properties["price"]); Flags = Json::GetFlags( properties, { { "smoothWithSelf", TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_SELF }, diff --git a/src/openrct2/object/TerrainSurfaceObject.h b/src/openrct2/object/TerrainSurfaceObject.h index b5796eeaad..e8d5459f22 100644 --- a/src/openrct2/object/TerrainSurfaceObject.h +++ b/src/openrct2/object/TerrainSurfaceObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -51,7 +51,7 @@ public: colour_t Colour{}; uint8_t Rotations{}; - money32 Price{}; + money64 Price{}; TERRAIN_SURFACE_FLAGS Flags{}; PaletteIndex MapColours[2]{}; @@ -59,7 +59,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; uint32_t GetImageId( const CoordsXY& position, int32_t length, int32_t rotation, int32_t offset, bool grid, bool underground) const; diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index 7e5310aaec..7be62c1abe 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,20 +25,20 @@ void WallObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stre _legacyType.flags = stream->ReadValue(); _legacyType.height = stream->ReadValue(); _legacyType.flags2 = stream->ReadValue(); - _legacyType.price = stream->ReadValue(); + _legacyType.price = stream->ReadValue(); _legacyType.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL; stream->Seek(1, OpenRCT2::STREAM_SEEK_CURRENT); _legacyType.scrolling_mode = stream->ReadValue(); GetStringTable().Read(context, stream, ObjectStringID::NAME); - rct_object_entry sgEntry = stream->ReadValue(); + RCTObjectEntry sgEntry = stream->ReadValue(); SetPrimarySceneryGroup(ObjectEntryDescriptor(sgEntry)); GetImageTable().Read(context, stream); // Validate properties - if (_legacyType.price <= 0) + if (_legacyType.price <= 0.00_GBP) { context->LogError(ObjectError::InvalidProperty, "Price can not be free or negative."); } @@ -55,20 +55,20 @@ void WallObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stre void WallObject::Load() { GetStringTable().Sort(); - _legacyType.name = language_allocate_object_string(GetName()); - _legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.name = LanguageAllocateObjectString(GetName()); + _legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); } void WallObject::Unload() { - language_free_object_string(_legacyType.name); - gfx_object_free_images(_legacyType.image, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.name); + GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount()); _legacyType.name = 0; _legacyType.image = 0; } -void WallObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void WallObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; @@ -81,16 +81,16 @@ void WallObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t heig imageId = imageId.WithSecondary(COLOUR_YELLOW); } - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(&dpi, imageId, screenCoords); if (_legacyType.flags & WALL_SCENERY_HAS_GLASS) { auto glassImageId = imageId.WithTransparency(COLOUR_BORDEAUX_RED).WithIndexOffset(6); - gfx_draw_sprite(dpi, glassImageId, screenCoords); + GfxDrawSprite(&dpi, glassImageId, screenCoords); } else if (_legacyType.flags & WALL_SCENERY_IS_DOOR) { - gfx_draw_sprite(dpi, imageId.WithIndexOffset(1), screenCoords); + GfxDrawSprite(&dpi, imageId.WithIndexOffset(1), screenCoords); } } @@ -104,7 +104,7 @@ void WallObject::ReadJson(IReadObjectContext* context, json_t& root) { _legacyType.tool_id = Cursor::FromString(Json::GetString(properties["cursor"]), CursorID::FenceDown); _legacyType.height = Json::GetNumber(properties["height"]); - _legacyType.price = Json::GetNumber(properties["price"]); + _legacyType.price = Json::GetNumber(properties["price"]); _legacyType.scrolling_mode = Json::GetNumber(properties["scrollingMode"], SCROLLING_MODE_NONE); diff --git a/src/openrct2/object/WallObject.h b/src/openrct2/object/WallObject.h index 1bd9cf5ba5..dace16c8ca 100644 --- a/src/openrct2/object/WallObject.h +++ b/src/openrct2/object/WallObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,8 +9,8 @@ #pragma once -#include "../world/Scenery.h" #include "SceneryObject.h" +#include "WallSceneryEntry.h" class WallObject final : public SceneryObject { @@ -28,5 +28,5 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; }; diff --git a/src/openrct2/object/WallSceneryEntry.h b/src/openrct2/object/WallSceneryEntry.h new file mode 100644 index 0000000000..bc9d70dc43 --- /dev/null +++ b/src/openrct2/object/WallSceneryEntry.h @@ -0,0 +1,50 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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" +#include "../interface/Cursors.h" +#include "ObjectTypes.h" + +enum WALL_SCENERY_FLAGS +{ + WALL_SCENERY_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1 + WALL_SCENERY_HAS_GLASS = (1 << 1), // 0x2 + WALL_SCENERY_CANT_BUILD_ON_SLOPE = (1 << 2), // 0x4 + WALL_SCENERY_IS_DOUBLE_SIDED = (1 << 3), // 0x8 + WALL_SCENERY_IS_DOOR = (1 << 4), // 0x10 + WALL_SCENERY_LONG_DOOR_ANIMATION = (1 << 5), // 0x20 + WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40 + WALL_SCENERY_HAS_TERTIARY_COLOUR = (1 << 7), // 0x80 +}; + +enum WALL_SCENERY_2_FLAGS +{ + WALL_SCENERY_2_NO_SELECT_PRIMARY_COLOUR = (1 << 0), // 0x1 + WALL_SCENERY_2_DOOR_SOUND_MASK = 0x6, + WALL_SCENERY_2_DOOR_SOUND_SHIFT = 1, + WALL_SCENERY_2_IS_OPAQUE = (1 << 3), // 0x8 + WALL_SCENERY_2_ANIMATED = (1 << 4), // 0x10 +}; + +struct WallSceneryEntry +{ + static constexpr auto kObjectType = ObjectType::Walls; + + StringId name; + uint32_t image; + CursorID tool_id; + uint8_t flags; + uint8_t height; + uint8_t flags2; + money64 price; + ObjectEntryIndex scenery_tab_id; + uint8_t scrolling_mode; +}; diff --git a/src/openrct2/world/Water.h b/src/openrct2/object/WaterEntry.h similarity index 81% rename from src/openrct2/world/Water.h rename to src/openrct2/object/WaterEntry.h index 5efb04e7be..1ee4afe823 100644 --- a/src/openrct2/world/Water.h +++ b/src/openrct2/object/WaterEntry.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,20 +10,20 @@ #pragma once #include "../common.h" +#include "ObjectTypes.h" enum { WATER_FLAGS_ALLOW_DUCKS = (1 << 0) }; -#pragma pack(push, 1) -struct rct_water_type +struct WaterObjectEntry { + static constexpr auto kObjectType = ObjectType::Water; + StringId string_idx; // 0x00 uint32_t image_id; // 0x02 uint32_t palette_index_1; // 0x06 uint32_t palette_index_2; // 0x0A uint16_t flags; // 0x0E }; -assert_struct_size(rct_water_type, 16); -#pragma pack(pop) diff --git a/src/openrct2/object/WaterObject.cpp b/src/openrct2/object/WaterObject.cpp index a24d359458..ded14e80c5 100644 --- a/src/openrct2/object/WaterObject.cpp +++ b/src/openrct2/object/WaterObject.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,24 +37,24 @@ void WaterObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* str void WaterObject::Load() { GetStringTable().Sort(); - _legacyType.string_idx = language_allocate_object_string(GetName()); - _legacyType.image_id = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount()); + _legacyType.string_idx = LanguageAllocateObjectString(GetName()); + _legacyType.image_id = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount()); _legacyType.palette_index_1 = _legacyType.image_id + 1; _legacyType.palette_index_2 = _legacyType.image_id + 4; - load_palette(); + LoadPalette(); } void WaterObject::Unload() { - gfx_object_free_images(_legacyType.image_id, GetImageTable().GetCount()); - language_free_object_string(_legacyType.string_idx); + GfxObjectFreeImages(_legacyType.image_id, GetImageTable().GetCount()); + LanguageFreeObjectString(_legacyType.string_idx); _legacyType.string_idx = 0; _legacyType.image_id = 0; } -void WaterObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const +void WaterObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const { // Write (no image) auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; @@ -119,7 +119,7 @@ void WaterObject::ReadJsonPalette(json_t& jPalette) dataIndex += 3; } - rct_g1_element g1 = {}; + G1Element g1 = {}; g1.offset = data.get(); g1.width = static_cast(numColours); g1.x_offset = Json::GetNumber(jPalette["index"]); diff --git a/src/openrct2/object/WaterObject.h b/src/openrct2/object/WaterObject.h index 6daa4157df..6d6bf7f026 100644 --- a/src/openrct2/object/WaterObject.h +++ b/src/openrct2/object/WaterObject.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,15 +9,15 @@ #pragma once -#include "../world/Water.h" #include "Object.h" +#include "WaterEntry.h" #include class WaterObject final : public Object { private: - rct_water_type _legacyType = {}; + WaterObjectEntry _legacyType = {}; public: void* GetLegacyData() override @@ -30,7 +30,7 @@ public: void Load() override; void Unload() override; - void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override; + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; private: void ReadJsonPalette(json_t& jPalette); diff --git a/src/openrct2/paint/Boundbox.h b/src/openrct2/paint/Boundbox.h index 505bd4ce5c..4be99d03d8 100644 --- a/src/openrct2/paint/Boundbox.h +++ b/src/openrct2/paint/Boundbox.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/Paint.Entity.cpp b/src/openrct2/paint/Paint.Entity.cpp index 46fa2a3f25..570baa3c9c 100644 --- a/src/openrct2/paint/Paint.Entity.cpp +++ b/src/openrct2/paint/Paint.Entity.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,7 +47,7 @@ void EntityPaintSetup(PaintSession& session, const CoordsXY& pos) return; } - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if (dpi->zoom_level > ZoomLevel{ 2 }) { return; @@ -117,9 +117,9 @@ void EntityPaintSetup(PaintSession& session, const CoordsXY& pos) { case EntityType::Vehicle: spr->As()->Paint(session, image_direction); - if (lightfx_for_vehicles_is_available()) + if (LightFXForVehiclesIsAvailable()) { - LightfxAddLightsMagicVehicle(spr->As()); + LightFXAddLightsMagicVehicle(spr->As()); } break; case EntityType::Guest: diff --git a/src/openrct2/paint/Paint.Entity.h b/src/openrct2/paint/Paint.Entity.h index c4de900620..f9f8a849b8 100644 --- a/src/openrct2/paint/Paint.Entity.h +++ b/src/openrct2/paint/Paint.Entity.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/Paint.SessionFlags.h b/src/openrct2/paint/Paint.SessionFlags.h index 7b002d848d..9e67aae5b5 100644 --- a/src/openrct2/paint/Paint.SessionFlags.h +++ b/src/openrct2/paint/Paint.SessionFlags.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index e80a1303e8..2d46c98d36 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,12 +14,12 @@ #include "../core/Guard.hpp" #include "../drawing/Drawing.h" #include "../interface/Viewport.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../localisation/LocalisationService.h" #include "../paint/Painter.h" #include "../profiling/Profiling.h" #include "../util/Math.hpp" -#include "../world/SmallScenery.h" #include "Boundbox.h" #include "Paint.Entity.h" #include "tile_element/Paint.TileElement.h" @@ -55,8 +55,8 @@ bool gShowDirtyVisuals; bool gPaintBoundingBoxes; bool gPaintBlockedTiles; -static void PaintAttachedPS(rct_drawpixelinfo* dpi, PaintStruct* ps, uint32_t viewFlags); -static void PaintPSImageWithBoundingBoxes(rct_drawpixelinfo* dpi, PaintStruct* ps, ImageId imageId, int32_t x, int32_t y); +static void PaintAttachedPS(DrawPixelInfo* dpi, PaintStruct* ps, uint32_t viewFlags); +static void PaintPSImageWithBoundingBoxes(DrawPixelInfo* dpi, PaintStruct* ps, ImageId imageId, int32_t x, int32_t y); static ImageId PaintPSColourifyImage(const PaintStruct* ps, ImageId imageId, uint32_t viewFlags); static int32_t RemapPositionToQuadrant(const PaintStruct& ps, uint8_t rotation) @@ -100,7 +100,7 @@ static void PaintSessionAddPSToQuadrant(PaintSession& session, PaintStruct* ps) session.QuadrantFrontIndex = std::max(session.QuadrantFrontIndex, paintQuadrantIndex); } -static constexpr bool ImageWithinDPI(const ScreenCoordsXY& imagePos, const rct_g1_element& g1, const rct_drawpixelinfo& dpi) +static constexpr bool ImageWithinDPI(const ScreenCoordsXY& imagePos, const G1Element& g1, const DrawPixelInfo& dpi) { int32_t left = imagePos.x + g1.x_offset; int32_t bottom = imagePos.y + g1.y_offset; @@ -151,7 +151,7 @@ static constexpr CoordsXYZ RotateBoundBoxSize(const CoordsXYZ& bbSize, const uin static PaintStruct* CreateNormalPaintStruct( PaintSession& session, ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox) { - auto* const g1 = gfx_get_g1_element(image_id); + auto* const g1 = GfxGetG1Element(image_id); if (g1 == nullptr) { return nullptr; @@ -199,8 +199,8 @@ static PaintStruct* CreateNormalPaintStruct( template void PaintSessionGenerateRotate(PaintSession& session) { - // Optimised modified version of viewport_coord_to_map_coord - ScreenCoordsXY screenCoord = { floor2(session.DPI.x, 32), floor2((session.DPI.y - 16), 32) }; + // Optimised modified version of ViewportPosToMapPos + ScreenCoordsXY screenCoord = { Floor2(session.DPI.x, 32), Floor2((session.DPI.y - 16), 32) }; CoordsXY mapTile = { screenCoord.y - screenCoord.x / 2, screenCoord.y + screenCoord.x / 2 }; mapTile = mapTile.Rotate(direction); @@ -245,7 +245,7 @@ template void PaintSessionGenerateRotate(PaintSession& sessio */ void PaintSessionGenerate(PaintSession& session) { - session.CurrentRotation = get_current_rotation(); + session.CurrentRotation = GetCurrentRotation(); switch (DirectionFlipXAxis(session.CurrentRotation)) { case 0: @@ -483,7 +483,7 @@ void PaintSessionArrange(PaintSessionCore& session) static void PaintDrawStruct(PaintSession& session, PaintStruct* ps) { - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; auto x = ps->x; auto y = ps->y; @@ -492,12 +492,12 @@ static void PaintDrawStruct(PaintSession& session, PaintStruct* ps) { if (dpi->zoom_level >= ZoomLevel{ 1 }) { - x = floor2(x, 2); - y = floor2(y, 2); + x = Floor2(x, 2); + y = Floor2(y, 2); if (dpi->zoom_level >= ZoomLevel{ 2 }) { - x = floor2(x, 4); - y = floor2(y, 4); + x = Floor2(x, 4); + y = Floor2(y, 4); } } } @@ -509,7 +509,7 @@ static void PaintDrawStruct(PaintSession& session, PaintStruct* ps) } else { - gfx_draw_sprite(dpi, imageId, { x, y }); + GfxDrawSprite(dpi, imageId, { x, y }); } if (ps->children != nullptr) @@ -545,7 +545,7 @@ void PaintDrawStructs(PaintSession& session) * rct2: 0x00688596 * Part of 0x688485 */ -static void PaintAttachedPS(rct_drawpixelinfo* dpi, PaintStruct* ps, uint32_t viewFlags) +static void PaintAttachedPS(DrawPixelInfo* dpi, PaintStruct* ps, uint32_t viewFlags) { AttachedPaintStruct* attached_ps = ps->attached_ps; for (; attached_ps != nullptr; attached_ps = attached_ps->next) @@ -555,19 +555,19 @@ static void PaintAttachedPS(rct_drawpixelinfo* dpi, PaintStruct* ps, uint32_t vi auto imageId = PaintPSColourifyImage(ps, attached_ps->image_id, viewFlags); if (attached_ps->IsMasked) { - gfx_draw_sprite_raw_masked(dpi, screenCoords, imageId, attached_ps->ColourImageId); + GfxDrawSpriteRawMasked(dpi, screenCoords, imageId, attached_ps->ColourImageId); } else { - gfx_draw_sprite(dpi, imageId, screenCoords); + GfxDrawSprite(dpi, imageId, screenCoords); } } } -static void PaintPSImageWithBoundingBoxes(rct_drawpixelinfo* dpi, PaintStruct* ps, ImageId imageId, int32_t x, int32_t y) +static void PaintPSImageWithBoundingBoxes(DrawPixelInfo* dpi, PaintStruct* ps, ImageId imageId, int32_t x, int32_t y) { const uint8_t colour = BoundBoxDebugColours[EnumValue(ps->sprite_type)]; - const uint8_t rotation = get_current_rotation(); + const uint8_t rotation = GetCurrentRotation(); const CoordsXYZ frontTop = { ps->bounds.x_end, @@ -626,28 +626,28 @@ static void PaintPSImageWithBoundingBoxes(rct_drawpixelinfo* dpi, PaintStruct* p const auto screenCoordBackBottom = Translate3DTo2DWithZ(rotation, backBottom); // bottom square - gfx_draw_line(dpi, { screenCoordFrontBottom, screenCoordLeftBottom }, colour); - gfx_draw_line(dpi, { screenCoordBackBottom, screenCoordLeftBottom }, colour); - gfx_draw_line(dpi, { screenCoordBackBottom, screenCoordRightBottom }, colour); - gfx_draw_line(dpi, { screenCoordFrontBottom, screenCoordRightBottom }, colour); + GfxDrawLine(dpi, { screenCoordFrontBottom, screenCoordLeftBottom }, colour); + GfxDrawLine(dpi, { screenCoordBackBottom, screenCoordLeftBottom }, colour); + GfxDrawLine(dpi, { screenCoordBackBottom, screenCoordRightBottom }, colour); + GfxDrawLine(dpi, { screenCoordFrontBottom, screenCoordRightBottom }, colour); // vertical back + sides - gfx_draw_line(dpi, { screenCoordBackTop, screenCoordBackBottom }, colour); - gfx_draw_line(dpi, { screenCoordLeftTop, screenCoordLeftBottom }, colour); - gfx_draw_line(dpi, { screenCoordRightTop, screenCoordRightBottom }, colour); + GfxDrawLine(dpi, { screenCoordBackTop, screenCoordBackBottom }, colour); + GfxDrawLine(dpi, { screenCoordLeftTop, screenCoordLeftBottom }, colour); + GfxDrawLine(dpi, { screenCoordRightTop, screenCoordRightBottom }, colour); // top square back - gfx_draw_line(dpi, { screenCoordBackTop, screenCoordLeftTop }, colour); - gfx_draw_line(dpi, { screenCoordBackTop, screenCoordRightTop }, colour); + GfxDrawLine(dpi, { screenCoordBackTop, screenCoordLeftTop }, colour); + GfxDrawLine(dpi, { screenCoordBackTop, screenCoordRightTop }, colour); - gfx_draw_sprite(dpi, imageId, { x, y }); + GfxDrawSprite(dpi, imageId, { x, y }); // vertical front - gfx_draw_line(dpi, { screenCoordFrontTop, screenCoordFrontBottom }, colour); + GfxDrawLine(dpi, { screenCoordFrontTop, screenCoordFrontBottom }, colour); // top square - gfx_draw_line(dpi, { screenCoordFrontTop, screenCoordLeftTop }, colour); - gfx_draw_line(dpi, { screenCoordFrontTop, screenCoordRightTop }, colour); + GfxDrawLine(dpi, { screenCoordFrontTop, screenCoordLeftTop }, colour); + GfxDrawLine(dpi, { screenCoordFrontTop, screenCoordRightTop }, colour); } static ImageId PaintPSColourifyImage(const PaintStruct* ps, ImageId imageId, uint32_t viewFlags) @@ -664,7 +664,7 @@ static ImageId PaintPSColourifyImage(const PaintStruct* ps, ImageId imageId, uin } } -PaintSession* PaintSessionAlloc(rct_drawpixelinfo* dpi, uint32_t viewFlags) +PaintSession* PaintSessionAlloc(DrawPixelInfo* dpi, uint32_t viewFlags) { return GetContext()->GetPainter()->CreateSession(dpi, viewFlags); } @@ -674,31 +674,6 @@ void PaintSessionFree([[maybe_unused]] PaintSession* session) GetContext()->GetPainter()->ReleaseSession(session); } -/** - * rct2: 0x006861AC, 0x00686337, 0x006864D0, 0x0068666B, 0x0098196C - * - * @param image_id (ebx) - * @param x_offset (al) - * @param y_offset (cl) - * @param bound_box_length_x (di) - * @param bound_box_length_y (si) - * @param bound_box_length_z (ah) - * @param z_offset (dx) - * @return (ebp) PaintStruct on success (CF == 0), nullptr on failure (CF == 1) - */ -PaintStruct* PaintAddImageAsParent( - PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize) -{ - return PaintAddImageAsParent(session, image_id, offset, { offset, boundBoxSize }); -} - -PaintStruct* PaintAddImageAsParent( - PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize, - const CoordsXYZ& boundBoxOffset) -{ - return PaintAddImageAsParent(session, image_id, offset, { boundBoxOffset, boundBoxSize }); -} - /** * rct2: 0x00686806, 0x006869B2, 0x00686B6F, 0x00686D31, 0x0098197C * @@ -902,23 +877,23 @@ void PaintFloatingMoneyEffect( * * rct2: 0x006860C3 */ -void PaintDrawMoneyStructs(rct_drawpixelinfo* dpi, PaintStringStruct* ps) +void PaintDrawMoneyStructs(DrawPixelInfo* dpi, PaintStringStruct* ps) { do { char buffer[256]{}; - format_string(buffer, sizeof(buffer), ps->string_id, &ps->args); + FormatStringLegacy(buffer, sizeof(buffer), ps->string_id, &ps->args); // Use sprite font unless the currency contains characters unsupported by the sprite font auto forceSpriteFont = false; const auto& currencyDesc = CurrencyDescriptors[EnumValue(gConfigGeneral.CurrencyFormat)]; - if (LocalisationService_UseTrueTypeFont() && font_supports_string_sprite(currencyDesc.symbol_unicode)) + if (LocalisationService_UseTrueTypeFont() && FontSupportsStringSprite(currencyDesc.symbol_unicode)) { forceSpriteFont = true; } - gfx_draw_string_with_y_offsets( - dpi, buffer, COLOUR_BLACK, { ps->x, ps->y }, reinterpret_cast(ps->y_offsets), forceSpriteFont, + GfxDrawStringWithYOffsets( + *dpi, buffer, COLOUR_BLACK, { ps->x, ps->y }, reinterpret_cast(ps->y_offsets), forceSpriteFont, FontStyle::Medium); } while ((ps = ps->next) != nullptr); } diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index c77b4d968c..f7242a07b1 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -214,7 +214,7 @@ struct PaintSessionCore struct PaintSession : public PaintSessionCore { - rct_drawpixelinfo DPI; + DrawPixelInfo DPI; PaintEntryPool::Chain PaintEntryChain; PaintStruct* AllocateNormalPaintEntry() noexcept @@ -288,19 +288,33 @@ extern CoordsXY gClipSelectionB; /** rct2: 0x00993CC4. The white ghost that indicates not-yet-built elements. */ constexpr const ImageId ConstructionMarker = ImageId(0).WithRemap(FilterPaletteID::Palette44); constexpr const ImageId HighlightMarker = ImageId(0).WithRemap(FilterPaletteID::Palette44); +constexpr const ImageId TrackGhost = ImageId(0, FilterPaletteID::PaletteNull); extern bool gShowDirtyVisuals; extern bool gPaintBoundingBoxes; extern bool gPaintBlockedTiles; extern bool gPaintWidePathsAsGhost; -PaintStruct* PaintAddImageAsParent( - PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize); -PaintStruct* PaintAddImageAsParent( - PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize, - const CoordsXYZ& boundBoxOffset); PaintStruct* PaintAddImageAsParent( PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox); +/** + * rct2: 0x006861AC, 0x00686337, 0x006864D0, 0x0068666B, 0x0098196C + * + * @param image_id (ebx) + * @param x_offset (al) + * @param y_offset (cl) + * @param bound_box_length_x (di) + * @param bound_box_length_y (si) + * @param bound_box_length_z (ah) + * @param z_offset (dx) + * @return (ebp) PaintStruct on success (CF == 0), nullptr on failure (CF == 1) + */ +inline PaintStruct* PaintAddImageAsParent( + PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize) +{ + return PaintAddImageAsParent(session, image_id, offset, { offset, boundBoxSize }); +} + [[nodiscard]] PaintStruct* PaintAddImageAsOrphan( PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox); PaintStruct* PaintAddImageAsChild( @@ -308,13 +322,18 @@ PaintStruct* PaintAddImageAsChild( PaintStruct* PaintAddImageAsChildRotated( PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset, - const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset); -PaintStruct* PaintAddImageAsParentRotated( - PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset, - const CoordsXYZ& boundBoxSize); + const BoundBoxXYZ& boundBox); + PaintStruct* PaintAddImageAsParentRotated( PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset, - const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset); + const BoundBoxXYZ& boundBox); + +inline PaintStruct* PaintAddImageAsParentRotated( + PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset, + const CoordsXYZ& boundBoxSize) +{ + return PaintAddImageAsParentRotated(session, direction, imageId, offset, { offset, boundBoxSize }); +} void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type); @@ -324,9 +343,9 @@ void PaintFloatingMoneyEffect( PaintSession& session, money64 amount, StringId string_id, int32_t y, int32_t z, int8_t y_offsets[], int32_t offset_x, uint32_t rotation); -PaintSession* PaintSessionAlloc(rct_drawpixelinfo* dpi, uint32_t viewFlags); +PaintSession* PaintSessionAlloc(DrawPixelInfo* dpi, uint32_t viewFlags); void PaintSessionFree(PaintSession* session); void PaintSessionGenerate(PaintSession& session); void PaintSessionArrange(PaintSessionCore& session); void PaintDrawStructs(PaintSession& session); -void PaintDrawMoneyStructs(rct_drawpixelinfo* dpi, PaintStringStruct* ps); +void PaintDrawMoneyStructs(DrawPixelInfo* dpi, PaintStringStruct* ps); diff --git a/src/openrct2/paint/PaintHelpers.cpp b/src/openrct2/paint/PaintHelpers.cpp index 9fe75da7d8..e77fcbf5cb 100644 --- a/src/openrct2/paint/PaintHelpers.cpp +++ b/src/openrct2/paint/PaintHelpers.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,44 +12,32 @@ #include "Paint.h" PaintStruct* PaintAddImageAsParentRotated( - PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset, - const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset) + PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox) { if (direction & 1) { return PaintAddImageAsParent( - session, imageId, { offset.y, offset.x, offset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z }, - { boundBoxOffset.y, boundBoxOffset.x, boundBoxOffset.z }); + session, imageId, { offset.y, offset.x, offset.z }, + { { boundBox.offset.y, boundBox.offset.x, boundBox.offset.z }, + { boundBox.length.y, boundBox.length.x, boundBox.length.z } }); } - return PaintAddImageAsParent(session, imageId, offset, boundBoxSize, boundBoxOffset); -} - -PaintStruct* PaintAddImageAsParentRotated( - PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset, - const CoordsXYZ& boundBoxSize) -{ - if (direction & 1) - { - return PaintAddImageAsParent( - session, image_id, { offset.y, offset.x, offset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z }); - } - - return PaintAddImageAsParent(session, image_id, offset, boundBoxSize); + return PaintAddImageAsParent(session, imageId, offset, boundBox); } PaintStruct* PaintAddImageAsChildRotated( PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset, - const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset) + const BoundBoxXYZ& boundBox) { if (direction & 1) { return PaintAddImageAsChild( session, image_id, { offset.y, offset.x, offset.z }, - { { boundBoxOffset.y, boundBoxOffset.x, boundBoxOffset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z } }); + { { boundBox.offset.y, boundBox.offset.x, boundBox.offset.z }, + { boundBox.length.y, boundBox.length.x, boundBox.length.z } }); } - return PaintAddImageAsChild(session, image_id, offset, { boundBoxOffset, boundBoxSize }); + return PaintAddImageAsChild(session, image_id, offset, boundBox); } void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type) diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 763f456113..10ba29580e 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -43,22 +43,22 @@ void Painter::Paint(IDrawingEngine& de) auto dpi = de.GetDrawingPixelInfo(); if (gIntroState != IntroState::None) { - intro_draw(dpi); + IntroDraw(dpi); } else { de.PaintWindows(); - update_palette_effects(); + UpdatePaletteEffects(); _uiContext->Draw(dpi); - if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !title_should_hide_version_info()) + if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !TitleShouldHideVersionInfo()) { DrawOpenRCT2(dpi, { 0, _uiContext->GetHeight() - 20 }); } - gfx_draw_pickedup_peep(dpi); - gfx_invalidate_pickedup_peep(); + GfxDrawPickedUpPeep(dpi); + GfxInvalidatePickedUpPeep(); de.PaintWeather(); } @@ -83,24 +83,24 @@ void Painter::Paint(IDrawingEngine& de) gCurrentDrawCount++; } -void Painter::PaintReplayNotice(rct_drawpixelinfo* dpi, const char* text) +void Painter::PaintReplayNotice(DrawPixelInfo* dpi, const char* text) { ScreenCoordsXY screenCoords(_uiContext->GetWidth() / 2, _uiContext->GetHeight() - 44); char buffer[64]{}; FormatStringToBuffer(buffer, sizeof(buffer), "{OUTLINE}{RED}{STRING}", text); - auto stringWidth = gfx_get_string_width(buffer, FontStyle::Medium); + auto stringWidth = GfxGetStringWidth(buffer, FontStyle::Medium); screenCoords.x = screenCoords.x - stringWidth; if (((gCurrentTicks >> 1) & 0xF) > 4) - gfx_draw_string(dpi, screenCoords, buffer, { COLOUR_SATURATED_RED }); + GfxDrawString(*dpi, screenCoords, buffer, { COLOUR_SATURATED_RED }); // Make area dirty so the text doesn't get drawn over the last - gfx_set_dirty_blocks({ screenCoords, screenCoords + ScreenCoordsXY{ stringWidth, 16 } }); + GfxSetDirtyBlocks({ screenCoords, screenCoords + ScreenCoordsXY{ stringWidth, 16 } }); } -void Painter::PaintFPS(rct_drawpixelinfo* dpi) +void Painter::PaintFPS(DrawPixelInfo* dpi) { ScreenCoordsXY screenCoords(_uiContext->GetWidth() / 2, 2); @@ -110,12 +110,12 @@ void Painter::PaintFPS(rct_drawpixelinfo* dpi) FormatStringToBuffer(buffer, sizeof(buffer), "{OUTLINE}{WHITE}{INT32}", _currentFPS); // Draw Text - int32_t stringWidth = gfx_get_string_width(buffer, FontStyle::Medium); + int32_t stringWidth = GfxGetStringWidth(buffer, FontStyle::Medium); screenCoords.x = screenCoords.x - (stringWidth / 2); - gfx_draw_string(dpi, screenCoords, buffer); + GfxDrawString(*dpi, screenCoords, buffer); // Make area dirty so the text doesn't get drawn over the last - gfx_set_dirty_blocks({ { screenCoords - ScreenCoordsXY{ 16, 4 } }, { dpi->lastStringPos.x + 16, 16 } }); + GfxSetDirtyBlocks({ { screenCoords - ScreenCoordsXY{ 16, 4 } }, { dpi->lastStringPos.x + 16, 16 } }); } void Painter::MeasureFPS() @@ -131,7 +131,7 @@ void Painter::MeasureFPS() _lastSecond = currentTime; } -PaintSession* Painter::CreateSession(rct_drawpixelinfo* dpi, uint32_t viewFlags) +PaintSession* Painter::CreateSession(DrawPixelInfo* dpi, uint32_t viewFlags) { PROFILED_FUNCTION(); diff --git a/src/openrct2/paint/Painter.h b/src/openrct2/paint/Painter.h index b677e596f0..5fd6b1292f 100644 --- a/src/openrct2/paint/Painter.h +++ b/src/openrct2/paint/Painter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,7 +16,7 @@ #include #include -struct rct_drawpixelinfo; +struct DrawPixelInfo; namespace OpenRCT2 { @@ -47,13 +47,13 @@ namespace OpenRCT2 explicit Painter(const std::shared_ptr& uiContext); void Paint(Drawing::IDrawingEngine& de); - PaintSession* CreateSession(rct_drawpixelinfo* dpi, uint32_t viewFlags); + PaintSession* CreateSession(DrawPixelInfo* dpi, uint32_t viewFlags); void ReleaseSession(PaintSession* session); ~Painter(); private: - void PaintReplayNotice(rct_drawpixelinfo* dpi, const char* text); - void PaintFPS(rct_drawpixelinfo* dpi); + void PaintReplayNotice(DrawPixelInfo* dpi, const char* text); + void PaintFPS(DrawPixelInfo* dpi); void MeasureFPS(); }; } // namespace Paint diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index d6f7f2c575..4dd1aa01e1 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -77,7 +77,7 @@ static constexpr const uint8_t _97AF32[] = { }; /** rct2: 0x0097B052, 0x0097B053 */ -static constexpr const CoordsXY loc_97B052[] = { +static constexpr const CoordsXY Loc97B052[] = { { -15, -1 }, { 0, -2 }, { -2, -1 }, @@ -134,13 +134,13 @@ static constexpr const uint8_t supportTypeToHeight[] = { 6, // METAL_SUPPORTS_BOXED_COATED }; -struct metal_supports_images { +struct MetalSupportsImages { uint16_t base_id; uint16_t beam_id; }; /** rct2: 0x0097B15C */ -static constexpr const metal_supports_images _97B15C[] = { +static constexpr const MetalSupportsImages _97B15C[] = { { 3243, 3209 }, // METAL_SUPPORTS_TUBES { 3279, 3262 }, // METAL_SUPPORTS_FORK { 3298, 3262 }, // METAL_SUPPORTS_FORK_ALT @@ -157,7 +157,7 @@ static constexpr const metal_supports_images _97B15C[] = { }; /** rct2: 0x0097B190 */ -static constexpr const metal_supports_images _97B190[] = { +static constexpr const MetalSupportsImages _97B190[] = { { 3243, 3226 }, // 3209 { 3279, 3262 }, { 3298, 3262 }, @@ -179,7 +179,7 @@ static constexpr const uint8_t metal_supports_slope_image_map[] = { 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 16, 0, 17, 18, 0, }; -struct supports_id_desc { +struct SupportsIdDescriptor { uint16_t full; uint16_t half; uint16_t flat; @@ -187,7 +187,7 @@ struct supports_id_desc { }; /* 0x0097B1C4 */ -static constexpr const supports_id_desc WoodenSupportImageIds[] = { +static constexpr const SupportsIdDescriptor WoodenSupportImageIds[] = { { 3392, 3393, 3394, 3536 }, { 3390, 3391, 3394, 3514 }, { 3558, 3559, 3560, 3570 }, @@ -309,14 +309,14 @@ static constexpr const uint16_t* WoodenCurveSupportImageIds[12] = { }; -struct unk_supports_desc { +struct UnkSupportsDescriptor { BoundBoxXYZ bounding_box; uint8_t var_6; uint8_t var_7; }; /* 0x0097B23C */ -static constexpr const unk_supports_desc byte_97B23C[] = { +static constexpr const UnkSupportsDescriptor Byte97B23C[] = { {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to gentle {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, {{{0, 0, 0}, {1, 1, 8}}, 0, 1}, @@ -401,7 +401,7 @@ static constexpr const unk_supports_desc byte_97B23C[] = { }; /* 0x0098D8D4 */ -static constexpr const unk_supports_desc byte_98D8D4[] = { +static constexpr const UnkSupportsDescriptor Byte98D8D4[] = { {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, {{{0, 0, 0}, {1, 1, 4}}, 0, 1}, @@ -473,7 +473,7 @@ bool WoodenASupportsPaintSetup( imageTemplate = ImageId().WithTransparency(FilterPaletteID::PaletteDarken1); } - int32_t z = floor2(session.Support.height + 15, 16); + int32_t z = Floor2(session.Support.height + 15, 16); height -= z; if (height < 0) { @@ -578,14 +578,14 @@ bool WoodenASupportsPaintSetup( special = (special - 1) & 0xFFFF; if (WoodenCurveSupportImageIds[supportType] != nullptr && WoodenCurveSupportImageIds[supportType][special] != 0 - && byte_97B23C[special].var_7 != 0) + && Byte97B23C[special].var_7 != 0) { auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][special]); - auto bBox = byte_97B23C[special].bounding_box; + auto bBox = Byte97B23C[special].bounding_box; bBox.offset.z += z; - if (byte_97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr) + if (Byte97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr) { PaintAddImageAsParent(session, imageId, { 0, 0, z }, bBox); hasSupports = true; @@ -634,7 +634,7 @@ bool WoodenBSupportsPaintSetup( imageTemplate = ImageId().WithTransparency(FilterPaletteID::PaletteDarken1); } - uint16_t baseHeight = ceil2(session.Support.height, 16); + uint16_t baseHeight = Ceil2(session.Support.height, 16); int16_t supportLength = height - baseHeight; if (supportLength < 0) @@ -747,11 +747,11 @@ bool WoodenBSupportsPaintSetup( { uint16_t specialIndex = (special - 1) & 0xFFFF; - const unk_supports_desc& supportsDesc = byte_97B23C[specialIndex]; + const UnkSupportsDescriptor& supportsDesc = Byte97B23C[specialIndex]; if (WoodenCurveSupportImageIds[supportType] != nullptr && WoodenCurveSupportImageIds[supportType][specialIndex] != 0 && supportsDesc.var_7 != 0) - { // byte_97B23C[special].var_7 is never 0 + { // Byte97B23C[special].var_7 is never 0 auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][specialIndex]); auto boundBox = supportsDesc.bounding_box; @@ -843,16 +843,11 @@ bool MetalASupportsPaintSetup( uint8_t ebp = esi[segment * 8 + 1]; - int8_t xOffset = SupportBoundBoxes[segment].x; - int8_t yOffset = SupportBoundBoxes[segment].y; - xOffset += loc_97B052[ebp].x; - yOffset += loc_97B052[ebp].y; - - int16_t boundBoxLengthX = _97B062[ebp].x; - int16_t boundBoxLengthY = _97B062[ebp].y; + auto offset = CoordsXYZ{ SupportBoundBoxes[segment] + Loc97B052[ebp], height }; + auto boundBoxLength = CoordsXYZ(_97B062[ebp], 1); auto image_id = imageTemplate.WithIndex(_metalSupportTypeToCrossbeamImages[supportType][ebp]); - PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { boundBoxLengthX, boundBoxLengthY, 1 }); + PaintAddImageAsParent(session, image_id, offset, boundBoxLength); segment = newSegment; } @@ -878,7 +873,7 @@ bool MetalASupportsPaintSetup( // Work out if a small support segment required to bring support to normal // size (aka floor2(x, 16)) - int16_t heightDiff = floor2(height + 16, 16); + int16_t heightDiff = Floor2(height + 16, 16); if (heightDiff > si) { heightDiff = si; @@ -967,7 +962,7 @@ bool MetalASupportsPaintSetup( imageIndex += z - 1; auto image_id = imageTemplate.WithIndex(imageIndex); - PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { 0, 0, 0 }, boundBoxOffset); + PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { boundBoxOffset, { 0, 0, 0 } }); height += z; } @@ -1051,7 +1046,7 @@ bool MetalBSupportsPaintSetup( PaintAddImageAsParent( session, imageTemplate.WithIndex(_metalSupportTypeToCrossbeamImages[supportType][ebp]), - { SupportBoundBoxes[originalSegment] + loc_97B052[ebp], baseHeight }, { _97B062[ebp], 1 }); + { SupportBoundBoxes[originalSegment] + Loc97B052[ebp], baseHeight }, { _97B062[ebp], 1 }); } int32_t si = baseHeight; @@ -1073,7 +1068,7 @@ bool MetalBSupportsPaintSetup( baseHeight = supportSegments[segment].height + 6; } - int16_t heightDiff = floor2(baseHeight + 16, 16); + int16_t heightDiff = Floor2(baseHeight + 16, 16); if (heightDiff > si) { heightDiff = si; @@ -1148,8 +1143,8 @@ bool MetalBSupportsPaintSetup( uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageId), { SupportBoundBoxes[originalSegment], baseHeight }, { 0, 0, 0 }, - { SupportBoundBoxes[originalSegment], height }); + session, imageTemplate.WithIndex(imageId), { SupportBoundBoxes[originalSegment], baseHeight }, + { { SupportBoundBoxes[originalSegment], height }, { 0, 0, 0 } }); baseHeight += beamLength; } } @@ -1192,7 +1187,7 @@ bool PathASupportsPaintSetup( imageTemplate = ImageId().WithTransparency(FilterPaletteID::PaletteDarken1); } - uint16_t baseHeight = ceil2(session.Support.height, 16); + uint16_t baseHeight = Ceil2(session.Support.height, 16); int32_t supportLength = height - baseHeight; if (supportLength < 0) { @@ -1285,7 +1280,7 @@ bool PathASupportsPaintSetup( ImageIndex imageIndex = pathPaintInfo.BridgeImageId + 55 + specialIndex; - const unk_supports_desc& supportsDesc = byte_98D8D4[specialIndex]; + const UnkSupportsDescriptor& supportsDesc = Byte98D8D4[specialIndex]; auto boundBox = supportsDesc.bounding_box; boundBox.offset.z += baseHeight; @@ -1370,7 +1365,7 @@ bool PathBSupportsPaintSetup( // si = height // dx = baseHeight - int16_t heightDiff = floor2(baseHeight + 16, 16); + int16_t heightDiff = Floor2(baseHeight + 16, 16); if (heightDiff > height) { heightDiff = height; @@ -1437,7 +1432,7 @@ bool PathBSupportsPaintSetup( baseHeight += z; } - // loc_6A34D8 + // Loc6A34D8 supportSegments[segment].height = 0xFFFF; supportSegments[segment].slope = 0x20; diff --git a/src/openrct2/paint/Supports.h b/src/openrct2/paint/Supports.h index 45da3121be..8979ca3de7 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 759fa9b678..afa9ce1a4e 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -137,7 +137,7 @@ void VirtualFloorInvalidate() if (_virtualFloorLastMinPos != min_position || _virtualFloorLastMaxPos != max_position || (_virtualFloorFlags & VIRTUAL_FLOOR_FORCE_INVALIDATION) != 0) { - log_verbose( + LOG_VERBOSE( "Invalidating previous region, Min: %d %d, Max: %d %d", _virtualFloorLastMinPos.x, _virtualFloorLastMinPos.y, _virtualFloorLastMaxPos.x, _virtualFloorLastMaxPos.y); MapInvalidateRegion(_virtualFloorLastMinPos, _virtualFloorLastMaxPos); @@ -155,7 +155,7 @@ void VirtualFloorInvalidate() return; } - log_verbose("Min: %d %d, Max: %d %d", min_position.x, min_position.y, max_position.x, max_position.y); + LOG_VERBOSE("Min: %d %d, Max: %d %d", min_position.x, min_position.y, max_position.x, max_position.y); // Invalidate new region if coordinates are set. if (min_position.x != std::numeric_limits::max() && min_position.y != std::numeric_limits::max() @@ -377,29 +377,29 @@ void VirtualFloorPaint(PaintSession& session) { const auto baseImg = !(occupiedEdges & EDGE_NE) ? ((litEdges & EDGE_NE) ? remap_lit : remap_base) : remap_edge; PaintAddImageAsParent( - session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_NE), virtualFloorOffset, { 0, 0, 1 }, - { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NE) ? -2 : 0) }); + session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_NE), virtualFloorOffset, + { { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NE) ? -2 : 0) }, { 0, 0, 1 } }); } if (paintEdges & EDGE_SE) { const auto baseImg = !(occupiedEdges & EDGE_SE) ? ((litEdges & EDGE_SE) ? remap_lit : remap_base) : remap_edge; PaintAddImageAsParent( - session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_SE), virtualFloorOffset, { 1, 1, 1 }, - { 16, 27, _virtualFloorHeight + ((dullEdges & EDGE_SE) ? -2 : 0) }); + session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_SE), virtualFloorOffset, + { { 16, 27, _virtualFloorHeight + ((dullEdges & EDGE_SE) ? -2 : 0) }, { 1, 1, 1 } }); } if (paintEdges & EDGE_SW) { const auto baseImg = !(occupiedEdges & EDGE_SW) ? ((litEdges & EDGE_SW) ? remap_lit : remap_base) : remap_edge; PaintAddImageAsParent( - session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_SW), virtualFloorOffset, { 1, 1, 1 }, - { 27, 16, _virtualFloorHeight + ((dullEdges & EDGE_SW) ? -2 : 0) }); + session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_SW), virtualFloorOffset, + { { 27, 16, _virtualFloorHeight + ((dullEdges & EDGE_SW) ? -2 : 0) }, { 1, 1, 1 } }); } if (paintEdges & EDGE_NW) { const auto baseImg = !(occupiedEdges & EDGE_NW) ? ((litEdges & EDGE_NW) ? remap_lit : remap_base) : remap_edge; PaintAddImageAsParent( - session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_NW), virtualFloorOffset, { 0, 0, 1 }, - { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0) }); + session, baseImg.WithIndex(SPR_G2_SELECTION_EDGE_NW), virtualFloorOffset, + { { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0) }, { 0, 0, 1 } }); } if (gConfigGeneral.VirtualFloorStyle != VirtualFloorStyles::Glassy) @@ -408,7 +408,8 @@ void VirtualFloorPaint(PaintSession& session) if (!weAreOccupied && !weAreLit && weAreAboveGround && weAreOwned) { auto imageColourFlats = ImageId(SPR_G2_SURFACE_GLASSY_RECOLOURABLE, FilterPaletteID::PaletteWater).WithBlended(true); - PaintAddImageAsParent(session, imageColourFlats, virtualFloorOffset, { 30, 30, 0 }, { 2, 2, _virtualFloorHeight - 3 }); + PaintAddImageAsParent( + session, imageColourFlats, virtualFloorOffset, { { 2, 2, _virtualFloorHeight - 3 }, { 30, 30, 0 } }); } } diff --git a/src/openrct2/paint/VirtualFloor.h b/src/openrct2/paint/VirtualFloor.h index cb608bd716..48b24f8077 100644 --- a/src/openrct2/paint/VirtualFloor.h +++ b/src/openrct2/paint/VirtualFloor.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 23457850cc..386028deda 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,7 +13,10 @@ #include "../../config/Config.h" #include "../../interface/Viewport.h" #include "../../localisation/Formatter.h" +#include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../object/BannerObject.h" +#include "../../object/ObjectEntryManager.h" #include "../../profiling/Profiling.h" #include "../../ride/TrackDesign.h" #include "../../sprites.h" @@ -54,16 +57,16 @@ static void PaintBannerScrollingText( char text[256]; if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); + FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } else { - format_string(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); + OpenRCT2::FormatStringLegacy(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } - auto stringWidth = gfx_get_string_width(text, FontStyle::Tiny); + auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); auto scroll = (gCurrentTicks / 2) % stringWidth; - auto imageId = scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK); + auto imageId = ScrollingTextSetup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK); PaintAddImageAsChild(session, imageId, { 0, 0, height + 22 }, { bbOffset, { 1, 1, 21 } }); } @@ -81,7 +84,7 @@ void PaintBanner(PaintSession& session, uint8_t direction, int32_t height, const return; } - auto* bannerEntry = GetBannerEntry(banner->type); + auto* bannerEntry = OpenRCT2::ObjectManager::GetObjectEntry(banner->type); if (bannerEntry == nullptr) { return; @@ -112,10 +115,10 @@ void PaintBanner(PaintSession& session, uint8_t direction, int32_t height, const auto imageIndex = (direction << 1) + bannerEntry->image; auto imageId = imageTemplate.WithIndex(imageIndex); auto bbOffset = CoordsXYZ(BannerBoundBoxes[direction][0], height + 2); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 21 }, bbOffset); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bbOffset, { 1, 1, 21 } }); bbOffset = CoordsXYZ(BannerBoundBoxes[direction][1], height + 2); - PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { 1, 1, 21 }, bbOffset); + PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { bbOffset, { 1, 1, 21 } }); PaintBannerScrollingText(session, *bannerEntry, *banner, bannerElement, direction, height, bbOffset); } diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index b1e6483cd3..c6dfc5d83e 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,7 @@ #include "../../drawing/LightFX.h" #include "../../interface/Viewport.h" #include "../../localisation/Formatter.h" +#include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" #include "../../object/EntranceObject.h" #include "../../object/ObjectManager.h" @@ -45,7 +46,7 @@ static void PaintRideEntranceExitScrollingText( if (entranceEl.GetEntranceType() == ENTRANCE_TYPE_RIDE_EXIT) return; - auto ride = get_ride(entranceEl.GetRideIndex()); + auto ride = GetRide(entranceEl.GetRideIndex()); if (ride == nullptr) return; @@ -63,17 +64,17 @@ static void PaintRideEntranceExitScrollingText( char text[256]; if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); + FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } else { - format_string(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); + FormatStringLegacy(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } - auto stringWidth = gfx_get_string_width(text, FontStyle::Tiny); + auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); auto scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; PaintAddImageAsChild( - session, scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, stationObj.ScrollingMode, COLOUR_BLACK), + session, ScrollingTextSetup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, stationObj.ScrollingMode, COLOUR_BLACK), { 0, 0, height + stationObj.Height }, { { 2, 2, height + stationObj.Height }, { 28, 28, 51 } }); } @@ -81,26 +82,26 @@ static void PaintRideEntranceExitLightEffects(PaintSession& session, int32_t hei { PROFILED_FUNCTION(); - if (lightfx_is_available()) + if (LightFXIsAvailable()) { if (entranceEl.GetEntranceType() == ENTRANCE_TYPE_RIDE_ENTRANCE) { - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 0, height + 45, LightType::Lantern3); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 0, 0, height + 45, LightType::Lantern3); } switch (entranceEl.GetDirection()) { case 0: - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 16, 0, height + 16, LightType::Lantern2); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 16, 0, height + 16, LightType::Lantern2); break; case 1: - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, -16, height + 16, LightType::Lantern2); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 0, -16, height + 16, LightType::Lantern2); break; case 2: - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, -16, 0, height + 16, LightType::Lantern2); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, -16, 0, height + 16, LightType::Lantern2); break; case 3: - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 16, height + 16, LightType::Lantern2); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 0, 16, height + 16, LightType::Lantern2); break; } } @@ -117,7 +118,7 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3 return; } - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { return; @@ -234,16 +235,16 @@ static void PaintParkEntranceScrollingText( char text[256]; if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); + FormatStringToUpper(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } else { - format_string(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); + FormatStringLegacy(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } - auto stringWidth = gfx_get_string_width(text, FontStyle::Tiny); + auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); auto scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; - auto imageIndex = scrolling_text_setup( + auto imageIndex = ScrollingTextSetup( session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode + direction / 2, COLOUR_BLACK); auto textHeight = height + entrance.GetTextHeight(); PaintAddImageAsChild(session, imageIndex, { 0, 0, textHeight }, { { 2, 2, textHeight }, { 28, 28, 47 } }); @@ -253,9 +254,9 @@ static void PaintParkEntranceLightEffects(PaintSession& session) { PROFILED_FUNCTION(); - if (lightfx_is_available()) + if (LightFXIsAvailable()) { - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 0, 155, LightType::Lantern3); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 0, 0, 155, LightType::Lantern3); } } @@ -343,7 +344,7 @@ static void PaintHeightMarkers(PaintSession& session, const EntranceElement& ent auto heightMarkerBaseZ = entranceEl.GetBaseZ() + 3; ImageIndex baseImageIndex = SPR_HEIGHT_MARKER_BASE; baseImageIndex += heightMarkerBaseZ / 16; - baseImageIndex += get_height_marker_offset(); + baseImageIndex += GetHeightMarkerOffset(); baseImageIndex -= gMapBaseZ; auto imageId = ImageId(baseImageIndex, COLOUR_GREY); PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 31, 31, heightMarkerBaseZ + 64 }, { 1, 1, 0 } }); diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index ac9f6c149b..c6d2c90217 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,6 +15,7 @@ #include "../../core/String.hpp" #include "../../interface/Viewport.h" #include "../../localisation/Formatter.h" +#include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" #include "../../object/LargeSceneryObject.h" #include "../../profiling/Profiling.h" @@ -22,7 +23,6 @@ #include "../../ride/TrackDesign.h" #include "../../util/Util.h" #include "../../world/Banner.h" -#include "../../world/LargeScenery.h" #include "../../world/Map.h" #include "../../world/Scenery.h" #include "../../world/TileInspector.h" @@ -54,7 +54,7 @@ static constexpr const BoundBoxXY LargeSceneryBoundBoxes[] = { static void PaintLargeScenerySupports( PaintSession& session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement, ImageId imageTemplate, - const rct_large_scenery_tile& tile) + const LargeSceneryTile& tile) { PROFILED_FUNCTION(); @@ -71,7 +71,7 @@ static void PaintLargeScenerySupports( WoodenBSupportsPaintSetup(session, (direction & 1), special, supportHeight, imageTemplate); - int32_t clearanceHeight = ceil2(tileElement.GetClearanceZ() + 15, 16); + int32_t clearanceHeight = Ceil2(tileElement.GetClearanceZ() + 15, 16); if (tile.flags & LARGE_SCENERY_TILE_FLAG_ALLOW_SUPPORTS_ABOVE) { PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, clearanceHeight, 0x20); @@ -181,7 +181,7 @@ static bool Is3DTextSingleLine(const LargeSceneryText& text, std::string_view s) } static void PaintLargeScenery3DText( - PaintSession& session, const LargeSceneryEntry& sceneryEntry, const rct_large_scenery_tile& tile, + PaintSession& session, const LargeSceneryEntry& sceneryEntry, const LargeSceneryTile& tile, const LargeSceneryElement& tileElement, uint8_t direction, uint16_t height, bool isGhost) { PROFILED_FUNCTION(); @@ -212,7 +212,7 @@ static void PaintLargeScenery3DText( char signString[256]; auto ft = Formatter(); banner->FormatTextTo(ft); - format_string(signString, sizeof(signString), STR_STRINGID, ft.Data()); + OpenRCT2::FormatStringLegacy(signString, sizeof(signString), STR_STRINGID, ft.Data()); auto offsetY = text->offset[(direction & 1)].y * 2; if (text->flags & LARGE_SCENERY_TEXT_FLAG_VERTICAL) @@ -224,7 +224,7 @@ static void PaintLargeScenery3DText( for (auto codepoint : CodepointView(displayText)) { char line[8]{}; - utf8_write_codepoint(line, codepoint); + UTF8WriteCodepoint(line, codepoint); PaintLargeScenery3DTextLine( session, sceneryEntry, *text, line, imageTemplate, direction, offsetY - displayTextHeight); @@ -313,17 +313,17 @@ static void PaintLargeSceneryScrollingText( char text[256]; if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data()); + FormatStringToUpper(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data()); } else { - format_string(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data()); + OpenRCT2::FormatStringLegacy(text, sizeof(text), STR_SCROLLING_SIGN_TEXT, ft.Data()); } auto scrollMode = sceneryEntry.scrolling_mode + ((direction + 1) & 3); - auto stringWidth = gfx_get_string_width(text, FontStyle::Tiny); + auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); auto scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; - auto imageId = scrolling_text_setup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollMode, textPaletteIndex); + auto imageId = ScrollingTextSetup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollMode, textPaletteIndex); PaintAddImageAsChild(session, imageId, { 0, 0, height + 25 }, { bbOffset, { 1, 1, 21 } }); } @@ -351,7 +351,7 @@ void PaintLargeScenery(PaintSession& session, uint8_t direction, uint16_t height auto isGhost = false; ImageId imageTemplate; - if (gTrackDesignSaveMode && !track_design_save_contains_tile_element(reinterpret_cast(&tileElement))) + if (gTrackDesignSaveMode && !TrackDesignSaveContainsTileElement(reinterpret_cast(&tileElement))) { imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette46); isGhost = true; @@ -396,7 +396,7 @@ void PaintLargeScenery(PaintSession& session, uint8_t direction, uint16_t height const CoordsXYZ& bbLength = { LargeSceneryBoundBoxes[bbIndex].length, boxlengthZ }; auto imageIndex = sceneryEntry->image + 4 + (sequenceNum << 2) + direction; - PaintAddImageAsParent(session, imageTemplate.WithIndex(imageIndex), { 0, 0, height }, bbLength, bbOffset); + PaintAddImageAsParent(session, imageTemplate.WithIndex(imageIndex), { 0, 0, height }, { bbOffset, bbLength }); if (sceneryEntry->scrolling_mode != SCROLLING_MODE_NONE && direction != 1 && direction != 2) { diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 8813542955..96f31dd9dc 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,7 +20,9 @@ #include "../../entity/Staff.h" #include "../../interface/Viewport.h" #include "../../localisation/Formatter.h" +#include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../object/FootpathItemEntry.h" #include "../../object/FootpathObject.h" #include "../../object/FootpathRailingsObject.h" #include "../../object/FootpathSurfaceObject.h" @@ -53,7 +55,7 @@ const uint8_t PathSlopeToLandSlope[] = { TILE_ELEMENT_SLOPE_SE_SIDE_UP, }; -static constexpr const uint8_t byte_98D6E0[] = { +static constexpr const uint8_t Byte98D6E0[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 20, 4, 5, 6, 22, 8, 9, 10, 26, 12, 13, 14, 36, 0, 1, 2, 3, 4, 5, 21, 23, 8, 9, 10, 11, 12, 13, 33, 37, 0, 1, 2, 3, 4, 5, 6, 24, 8, 9, 10, 11, 12, 13, 14, 38, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 29, 30, 34, 39, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 40, @@ -84,7 +86,7 @@ static constexpr const BoundBoxXY stru_98D804[] = { { { 0, 0 }, { 32, 32 } }, }; -static constexpr const uint8_t byte_98D8A4[] = { +static constexpr const uint8_t Byte98D8A4[] = { 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0 }; // clang-format on @@ -152,25 +154,25 @@ static void PathBitLightsPaint( { auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_NE, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 2, 16, height }, { 0, 16, 23 }, { 6, 8, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 2, 16, height }, { { 6, 8, height + 2 }, { 0, 16, 23 } }); } if (!(edges & EDGE_SE)) { auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_SE, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 30, height }, { 16, 0, 23 }, { 8, 23, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 16, 30, height }, { { 8, 23, height + 2 }, { 16, 0, 23 } }); } if (!(edges & EDGE_SW)) { auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_SW, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 30, 16, height }, { 0, 16, 23 }, { 23, 8, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 30, 16, height }, { { 23, 8, height + 2 }, { 0, 16, 23 } }); } if (!(edges & EDGE_NW)) { auto imageIndex = GetFootpathLampImage(pathBitEntry, EDGE_NW, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 2, height }, { 16, 0, 23 }, { 8, 6, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 16, 2, height }, { { 8, 6, height + 2 }, { 16, 0, 23 } }); } } @@ -208,7 +210,7 @@ static void PathBitBinsPaint( auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_NE, binsAreVandalised, binIsFull); if (!highlightPathIssues || binIsFull || binsAreVandalised) PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 7, 16, height }, { 0, 16, 7 }, { 6, 8, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 7, 16, height }, { { 6, 8, height + 2 }, { 0, 16, 7 } }); } if (!(edges & EDGE_SE)) { @@ -216,7 +218,7 @@ static void PathBitBinsPaint( auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_SE, binsAreVandalised, binIsFull); if (!highlightPathIssues || binIsFull || binsAreVandalised) PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 25, height }, { 16, 0, 7 }, { 8, 23, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 16, 25, height }, { { 8, 23, height + 2 }, { 16, 0, 7 } }); } if (!(edges & EDGE_SW)) { @@ -224,7 +226,7 @@ static void PathBitBinsPaint( auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_SW, binsAreVandalised, binIsFull); if (!highlightPathIssues || binIsFull || binsAreVandalised) PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 25, 16, height }, { 0, 16, 7 }, { 23, 8, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 25, 16, height }, { { 23, 8, height + 2 }, { 0, 16, 7 } }); } if (!(edges & EDGE_NW)) { @@ -232,7 +234,7 @@ static void PathBitBinsPaint( auto imageIndex = GetFootpathBinImage(pathBitEntry, EDGE_NW, binsAreVandalised, binIsFull); if (!highlightPathIssues || binIsFull || binsAreVandalised) PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 7, height }, { 16, 0, 7 }, { 8, 6, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 16, 7, height }, { { 8, 6, height + 2 }, { 16, 0, 7 } }); } } @@ -246,42 +248,42 @@ static void PathBitBenchesPaint( { auto imageIndex = GetFootpathBenchImage(pathBitEntry, EDGE_NE, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 7, 16, height }, { 0, 16, 7 }, { 6, 8, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 7, 16, height }, { { 6, 8, height + 2 }, { 0, 16, 7 } }); } if (!(edges & EDGE_SE)) { auto imageIndex = GetFootpathBenchImage(pathBitEntry, EDGE_SE, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 25, height }, { 16, 0, 7 }, { 8, 23, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 16, 25, height }, { { 8, 23, height + 2 }, { 16, 0, 7 } }); } if (!(edges & EDGE_SW)) { auto imageIndex = GetFootpathBenchImage(pathBitEntry, EDGE_SW, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 25, 16, height }, { 0, 16, 7 }, { 23, 8, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 25, 16, height }, { { 23, 8, height + 2 }, { 0, 16, 7 } }); } if (!(edges & EDGE_NW)) { auto imageIndex = GetFootpathBenchImage(pathBitEntry, EDGE_NW, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 7, height }, { 16, 0, 7 }, { 8, 6, height + 2 }); + session, imageTemplate.WithIndex(imageIndex), { 16, 7, height }, { { 8, 6, height + 2 }, { 16, 0, 7 } }); } } /* rct2: 0x006A6008 */ static void PathBitJumpingFountainsPaint( - PaintSession& session, const PathBitEntry& pathBitEntry, int32_t height, ImageId imageTemplate, rct_drawpixelinfo* dpi) + PaintSession& session, const PathBitEntry& pathBitEntry, int32_t height, ImageId imageTemplate, DrawPixelInfo* dpi) { if (dpi->zoom_level > ZoomLevel{ 0 }) return; auto imageId = imageTemplate.WithIndex(pathBitEntry.image); - PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { 1, 1, 2 }, { 6, 8, height + 2 }); - PaintAddImageAsParent(session, imageId.WithIndexOffset(2), { 0, 0, height }, { 1, 1, 2 }, { 8, 23, height + 2 }); - PaintAddImageAsParent(session, imageId.WithIndexOffset(3), { 0, 0, height }, { 1, 1, 2 }, { 23, 8, height + 2 }); - PaintAddImageAsParent(session, imageId.WithIndexOffset(4), { 0, 0, height }, { 1, 1, 2 }, { 8, 6, height + 2 }); + PaintAddImageAsParent(session, imageId.WithIndexOffset(1), { 0, 0, height }, { { 6, 8, height + 2 }, { 1, 1, 2 } }); + PaintAddImageAsParent(session, imageId.WithIndexOffset(2), { 0, 0, height }, { { 8, 23, height + 2 }, { 1, 1, 2 } }); + PaintAddImageAsParent(session, imageId.WithIndexOffset(3), { 0, 0, height }, { { 23, 8, height + 2 }, { 1, 1, 2 } }); + PaintAddImageAsParent(session, imageId.WithIndexOffset(4), { 0, 0, height }, { { 8, 6, height + 2 }, { 1, 1, 2 } }); } /** @@ -303,27 +305,27 @@ static void PathPaintFencesAndQueueBanners( { case 0: PaintAddImageAsParent( - session, imageId.WithIndexOffset(22), { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(22), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(22), { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(22), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 23 } }); break; case 1: PaintAddImageAsParent( - session, imageId.WithIndexOffset(21), { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(21), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(21), { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(21), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 23 } }); break; case 2: PaintAddImageAsParent( - session, imageId.WithIndexOffset(23), { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(23), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(23), { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(23), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 23 } }); break; case 3: PaintAddImageAsParent( - session, imageId.WithIndexOffset(20), { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(20), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(20), { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(20), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 23 } }); break; } } @@ -334,77 +336,130 @@ static void PathPaintFencesAndQueueBanners( { case 0b0001: PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(17), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(17), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); break; case 0b0010: PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(18), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(18), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); break; case 0b0011: PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(17), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 28, 0, height }, { 1, 28, 7 }, - { 28, 4, height + 2 }); // bound_box_offset_y seems to be a bug + session, imageId.WithIndexOffset(18), { 28, 0, height }, + { { 28, 4, height + 2 }, { 1, 28, 7 } }); // bound_box_offset_y seems to be a bug PaintAddImageAsParent( - session, imageId.WithIndexOffset(25), { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); break; case 0b0100: PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(19), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(19), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); break; case 0b0101: PaintAddImageAsParent( - session, imageId.WithIndexOffset(15), { 0, 4, height }, { 32, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(15), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(15), { 0, 28, height }, { 32, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(15), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); break; case 0b0110: PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(18), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(19), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(26), { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 }); + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + break; + case 0b0111: + if (pathElement.HasJunctionRailings()) + { + PaintAddImageAsParent( + session, imageId.WithIndexOffset(15), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + } break; case 0b1000: PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(16), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(16), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); break; case 0b1001: PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(16), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(17), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(24), { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 }); + session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); break; case 0b1010: PaintAddImageAsParent( - session, imageId.WithIndexOffset(14), { 4, 0, height }, { 1, 32, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(14), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(14), { 28, 0, height }, { 1, 32, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(14), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); + break; + case 0b1011: + if (pathElement.HasJunctionRailings()) + { + PaintAddImageAsParent( + session, imageId.WithIndexOffset(14), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + } break; case 0b1100: PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(16), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 28, height }, { 28, 1, 7 }, - { 4, 28, height + 2 }); // bound_box_offset_x seems to be a bug + session, imageId.WithIndexOffset(19), { 0, 28, height }, + { { 4, 28, height + 2 }, { 28, 1, 7 } }); // bound_box_offset_x seems to be a bug PaintAddImageAsParent( - session, imageId.WithIndexOffset(27), { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); break; - default: - // Purposely left empty, queues cannot have 3 or 4 connected edges + case 0b1101: + if (pathElement.HasJunctionRailings()) + { + PaintAddImageAsParent( + session, imageId.WithIndexOffset(15), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + } break; + case 0b1110: + if (pathElement.HasJunctionRailings()) + { + PaintAddImageAsParent( + session, imageId.WithIndexOffset(14), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + } + break; + case 0b1111: + if (pathElement.HasJunctionRailings()) + { + PaintAddImageAsParent( + session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + PaintAddImageAsParent( + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + } } } @@ -429,17 +484,17 @@ static void PathPaintFencesAndQueueBanners( imageId = imageId.WithIndexOffset(28 + (direction << 1)); // Draw pole in the back - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 21 }, boundBoxOffsets); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { boundBoxOffsets, { 1, 1, 21 } }); // Draw pole in the front and banner boundBoxOffsets.x = BannerBoundBoxes[direction][1].x; boundBoxOffsets.y = BannerBoundBoxes[direction][1].y; imageId = imageId.WithIndexOffset(1); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 21 }, boundBoxOffsets); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { boundBoxOffsets, { 1, 1, 21 } }); direction--; // If text shown - auto ride = get_ride(pathElement.GetRideIndex()); + auto ride = GetRide(pathElement.GetRideIndex()); if (direction < 2 && ride != nullptr && !imageTemplate.IsRemap()) { uint16_t scrollingMode = pathPaintInfo.ScrollingMode; @@ -458,19 +513,20 @@ static void PathPaintFencesAndQueueBanners( } if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper( + FormatStringToUpper( gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data()); } else { - format_string(gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data()); + FormatStringLegacy( + gCommonStringFormatBuffer, sizeof(gCommonStringFormatBuffer), STR_BANNER_TEXT_FORMAT, ft.Data()); } - uint16_t stringWidth = gfx_get_string_width(gCommonStringFormatBuffer, FontStyle::Tiny); + uint16_t stringWidth = GfxGetStringWidth(gCommonStringFormatBuffer, FontStyle::Tiny); uint16_t scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; PaintAddImageAsChild( - session, scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK), + session, ScrollingTextSetup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK), { 0, 0, height + 7 }, { boundBoxOffsets, { 1, 1, 21 } }); } @@ -497,27 +553,27 @@ static void PathPaintFencesAndQueueBanners( { case 0: PaintAddImageAsParent( - session, imageId.WithIndexOffset(8), { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(8), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(8), { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(8), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 23 } }); break; case 1: PaintAddImageAsParent( - session, imageId.WithIndexOffset(7), { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(7), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(7), { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(7), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 23 } }); break; case 2: PaintAddImageAsParent( - session, imageId.WithIndexOffset(9), { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(9), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(9), { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(9), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 23 } }); break; case 3: PaintAddImageAsParent( - session, imageId.WithIndexOffset(6), { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(6), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(6), { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(6), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 23 } }); break; } } @@ -535,142 +591,142 @@ static void PathPaintFencesAndQueueBanners( break; case 1: PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(3), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(3), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); break; case 2: PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(4), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(4), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); break; case 4: PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(5), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(5), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); break; case 5: PaintAddImageAsParent( - session, imageId.WithIndexOffset(1), { 0, 4, height }, { 32, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(1), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(1), { 0, 28, height }, { 32, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(1), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); break; case 8: PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(2), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(2), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); break; case 10: PaintAddImageAsParent( - session, imageId.WithIndexOffset(0), { 4, 0, height }, { 1, 32, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(0), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(0), { 28, 0, height }, { 1, 32, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(0), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); break; case 3: PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(3), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 28, 0, height }, { 1, 28, 7 }, - { 28, 4, height + 2 }); // bound_box_offset_y seems to be a bug + session, imageId.WithIndexOffset(4), { 28, 0, height }, + { { 28, 4, height + 2 }, { 1, 28, 7 } }); // bound_box_offset_y seems to be a bug if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); } break; case 6: PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(4), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(5), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); } break; case 9: PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(2), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(3), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_3)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(10), { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 }); + session, imageId.WithIndexOffset(10), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); } break; case 12: PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(2), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 28, height }, { 28, 1, 7 }, - { 4, 28, height + 2 }); // bound_box_offset_x seems to be a bug + session, imageId.WithIndexOffset(5), { 0, 28, height }, + { { 4, 28, height + 2 }, { 28, 1, 7 } }); // bound_box_offset_x seems to be a bug if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); } break; case 7: PaintAddImageAsParent( - session, imageId.WithIndexOffset(1), { 0, 4, height }, { 32, 1, 7 }, { 0, 4, height + 2 }); + session, imageId.WithIndexOffset(1), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); } break; case 13: PaintAddImageAsParent( - session, imageId.WithIndexOffset(1), { 0, 28, height }, { 32, 1, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(1), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_3)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(10), { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 }); + session, imageId.WithIndexOffset(10), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); } break; case 14: PaintAddImageAsParent( - session, imageId.WithIndexOffset(0), { 4, 0, height }, { 1, 32, 7 }, { 4, 0, height + 2 }); + session, imageId.WithIndexOffset(0), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); } break; case 11: PaintAddImageAsParent( - session, imageId.WithIndexOffset(0), { 28, 0, height }, { 1, 32, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(0), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_3)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(10), { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 }); + session, imageId.WithIndexOffset(10), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); } break; @@ -678,22 +734,22 @@ static void PathPaintFencesAndQueueBanners( if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_3)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(10), { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 }); + session, imageId.WithIndexOffset(10), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); } break; } @@ -709,7 +765,7 @@ static void PathPaintFencesAndQueueBanners( * @param imageFlags (0x00F3EF70) * @param sceneryImageFlags (0x00F3EF74) */ -static void sub_6A3F61( +static void Sub6A3F61( PaintSession& session, const PathElement& pathElement, uint16_t connectedEdges, uint16_t height, const FootpathPaintInfo& pathPaintInfo, ImageId imageTemplate, ImageId sceneryImageTemplate, bool hasSupports) { @@ -725,7 +781,7 @@ static void sub_6A3F61( // Probably drawing benches etc. PROFILED_FUNCTION(); - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if (dpi->zoom_level <= ZoomLevel{ 1 }) { @@ -923,7 +979,7 @@ static void PaintHeightMarkers(PaintSession& session, const PathElement& pathEl) uint32_t baseImageIndex = SPR_HEIGHT_MARKER_BASE; baseImageIndex += heightMarkerBaseZ / 16; - baseImageIndex += get_height_marker_offset(); + baseImageIndex += GetHeightMarkerOffset(); baseImageIndex -= gMapBaseZ; auto imageId = ImageId(baseImageIndex, COLOUR_GREY); PaintAddImageAsParent(session, imageId, { 16, 16, heightMarkerBaseZ }, { 1, 1, 0 }); @@ -934,7 +990,7 @@ static void PaintLampLightEffects(PaintSession& session, const PathElement& path { PROFILED_FUNCTION(); - if (lightfx_is_available()) + if (LightFXIsAvailable()) { if (pathEl.HasAddition() && !(pathEl.IsBroken())) { @@ -943,19 +999,19 @@ static void PaintLampLightEffects(PaintSession& session, const PathElement& path { if (!(pathEl.GetEdges() & EDGE_NE)) { - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, -16, 0, height + 23, LightType::Lantern3); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, -16, 0, height + 23, LightType::Lantern3); } if (!(pathEl.GetEdges() & EDGE_SE)) { - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, 16, height + 23, LightType::Lantern3); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 0, 16, height + 23, LightType::Lantern3); } if (!(pathEl.GetEdges() & EDGE_SW)) { - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 16, 0, height + 23, LightType::Lantern3); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 16, 0, height + 23, LightType::Lantern3); } if (!(pathEl.GetEdges() & EDGE_NW)) { - lightfx_add_3d_light_magic_from_drawing_tile(session.MapPosition, 0, -16, height + 23, LightType::Lantern3); + LightFXAdd3DLightMagicFromDrawingTile(session.MapPosition, 0, -16, height + 23, LightType::Lantern3); } } } @@ -980,7 +1036,7 @@ void PaintPath(PaintSession& session, uint16_t height, const PathElement& tileEl return; } - if (!track_design_save_contains_tile_element(reinterpret_cast(&tileElement))) + if (!TrackDesignSaveContainsTileElement(reinterpret_cast(&tileElement))) { imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette46); } @@ -1063,7 +1119,7 @@ void PathPaintBoxSupport( } else { - surfaceBaseImageIndex += byte_98D6E0[edi]; + surfaceBaseImageIndex += Byte98D6E0[edi]; } const bool hasPassedSurface = (session.Flags & PaintSessionFlags::PassedSurface) != 0; @@ -1091,8 +1147,8 @@ void PathPaintBoxSupport( if (!hasSupports || !hasPassedSurface) { PaintAddImageAsParent( - session, imageTemplate.WithIndex(surfaceBaseImageIndex), { 0, 0, height }, { boundBoxSize, 0 }, - { boundBoxOffset, height + boundingBoxZOffset }); + session, imageTemplate.WithIndex(surfaceBaseImageIndex), { 0, 0, height }, + { { boundBoxOffset, height + boundingBoxZOffset }, { boundBoxSize, 0 } }); } else { @@ -1105,12 +1161,12 @@ void PathPaintBoxSupport( } else { - bridgeBaseImageIndex = byte_98D8A4[edges] + pathPaintInfo.BridgeImageId + 49; + bridgeBaseImageIndex = Byte98D8A4[edges] + pathPaintInfo.BridgeImageId + 49; } PaintAddImageAsParent( - session, imageTemplate.WithIndex(bridgeBaseImageIndex), { 0, 0, height }, { boundBoxSize, 0 }, - { boundBoxOffset, height + boundingBoxZOffset }); + session, imageTemplate.WithIndex(bridgeBaseImageIndex), { 0, 0, height }, + { { boundBoxOffset, height + boundingBoxZOffset }, { boundBoxSize, 0 } }); if (pathElement.IsQueue() || (pathPaintInfo.RailingFlags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS)) { @@ -1120,7 +1176,7 @@ void PathPaintBoxSupport( } } - sub_6A3F61(session, pathElement, edi, height, pathPaintInfo, imageTemplate, sceneryImageTemplate, hasSupports); + Sub6A3F61(session, pathElement, edi, height, pathPaintInfo, imageTemplate, sceneryImageTemplate, hasSupports); uint16_t ax = 0; if (pathElement.IsSloped()) @@ -1128,7 +1184,7 @@ void PathPaintBoxSupport( ax = ((pathElement.GetSlopeDirection() + session.CurrentRotation) & 0x3) + 1; } - auto supportType = byte_98D8A4[edges] == 0 ? 0 : 1; + auto supportType = Byte98D8A4[edges] == 0 ? 0 : 1; PathASupportsPaintSetup(session, supportType, ax, height, imageTemplate, pathPaintInfo, nullptr); height += 32; @@ -1201,7 +1257,7 @@ void PathPaintPoleSupport( } else { - surfaceBaseImageIndex += byte_98D6E0[edi]; + surfaceBaseImageIndex += Byte98D6E0[edi]; } // Below Surface @@ -1230,8 +1286,8 @@ void PathPaintPoleSupport( if (!hasSupports || !hasPassedSurface) { PaintAddImageAsParent( - session, imageTemplate.WithIndex(surfaceBaseImageIndex), { 0, 0, height }, { boundBoxSize.x, boundBoxSize.y, 0 }, - { boundBoxOffset.x, boundBoxOffset.y, height + boundingBoxZOffset }); + session, imageTemplate.WithIndex(surfaceBaseImageIndex), { 0, 0, height }, + { { boundBoxOffset.x, boundBoxOffset.y, height + boundingBoxZOffset }, { boundBoxSize.x, boundBoxSize.y, 0 } }); } else { @@ -1248,8 +1304,8 @@ void PathPaintPoleSupport( } PaintAddImageAsParent( - session, imageTemplate.WithIndex(bridgeBaseImageIndex), { 0, 0, height }, { boundBoxSize, 0 }, - { boundBoxOffset, height + boundingBoxZOffset }); + session, imageTemplate.WithIndex(bridgeBaseImageIndex), { 0, 0, height }, + { { boundBoxOffset, height + boundingBoxZOffset }, { boundBoxSize, 0 } }); if (pathElement.IsQueue() || (pathPaintInfo.RailingFlags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS)) { @@ -1259,7 +1315,7 @@ void PathPaintPoleSupport( } } - sub_6A3F61( + Sub6A3F61( session, pathElement, edi, height, pathPaintInfo, imageTemplate, sceneryImageTemplate, hasSupports); // TODO: arguments diff --git a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp index 2ae54b1ea1..2e4cce3329 100644 --- a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,12 +13,12 @@ #include "../../config/Config.h" #include "../../interface/Viewport.h" #include "../../localisation/Date.h" +#include "../../object/SmallSceneryEntry.h" #include "../../profiling/Profiling.h" #include "../../ride/TrackDesign.h" #include "../../util/Util.h" #include "../../world/Map.h" #include "../../world/Scenery.h" -#include "../../world/SmallScenery.h" #include "../../world/TileInspector.h" #include "../Supports.h" #include "Paint.TileElement.h" @@ -69,7 +69,7 @@ static void SetSupportHeights( { height += sceneryEntry.height; - PaintUtilSetGeneralSupportHeight(session, ceil2(height, 8), 0x20); + PaintUtilSetGeneralSupportHeight(session, Ceil2(height, 8), 0x20); if (sceneryEntry.HasFlag(SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP)) { if (sceneryEntry.HasFlag(SMALL_SCENERY_FLAG_FULL_TILE)) @@ -336,7 +336,7 @@ void PaintSmallScenery(PaintSession& session, uint8_t direction, int32_t height, ImageId imageTemplate; if (gTrackDesignSaveMode) { - if (!track_design_save_contains_tile_element(reinterpret_cast(&sceneryElement))) + if (!TrackDesignSaveContainsTileElement(reinterpret_cast(&sceneryElement))) { imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette46); } diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 450558c7a2..ba44122d8a 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ #include #include -static constexpr const uint8_t byte_97B444[] = { +static constexpr const uint8_t Byte97B444[] = { 0, 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 16, 0, 18, 15, 0, }; @@ -79,7 +79,7 @@ enum CORNER_LEFT }; -struct corner_height +struct CornerHeight { uint8_t top; uint8_t right; @@ -91,7 +91,7 @@ struct corner_height /** * rct2: 0x0097B4A4 (R), 0x0097B4C4 (T), 0x0097B4E4 (L), 0x0097B504 (B) */ -static constexpr const corner_height corner_heights[] = { +static constexpr const CornerHeight corner_heights[] = { // T R B L { 0, 0, 0, 0 }, { 0, 0, 1, 0 }, @@ -128,25 +128,25 @@ static constexpr const corner_height corner_heights[] = { }; // bottom left tint -static constexpr const uint8_t byte_97B524[] = { +static constexpr const uint8_t Byte97B524[] = { 2, 5, 1, 4, 2, 5, 1, 2, 2, 4, 1, 2, 1, 3, 0, 3, 1, 5, 0, }; // top left tint -static constexpr const uint32_t byte_97B537[] = { +static constexpr const uint32_t Byte97B537[] = { 2, 5, 2, 4, 2, 5, 1, 1, 3, 4, 3, 2, 1, 2, 0, 3, 1, 5, 0, }; // top right tint -static constexpr const uint8_t byte_97B54A[] = { +static constexpr const uint8_t Byte97B54A[] = { 2, 2, 2, 4, 0, 0, 1, 1, 3, 4, 3, 5, 1, 2, 2, 3, 1, 5, 0, }; // bottom right tint -static constexpr const uint8_t byte_97B55D[] = { +static constexpr const uint8_t Byte97B55D[] = { 2, 2, 1, 4, 0, 0, 1, 2, 2, 4, 1, 5, 1, 3, 2, 3, 1, 5, 0, }; @@ -205,24 +205,24 @@ static constexpr const int16_t _boundBoxZOffsets[TUNNEL_TYPE_COUNT] = { // clang-format on // tunnel offset -static constexpr const uint8_t byte_97B5B0[TUNNEL_TYPE_COUNT] = { +static constexpr const 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 const uint8_t byte_97B740[] = { +static constexpr const uint8_t Byte97B740[] = { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 1, 4, 0, }; -struct tile_descriptor +struct TileDescriptor { TileCoordsXY tile_coords; const TileElement* tile_element; uint8_t terrain; uint8_t slope; - corner_height corner_heights; + CornerHeight corner_heights; }; -struct tile_surface_boundary_data +struct TileSurfaceBoundaryData { int32_t bit_1; int32_t bit_8; @@ -233,7 +233,7 @@ struct tile_surface_boundary_data BoundBoxXY Boundbox; }; -static constexpr const tile_surface_boundary_data _tileSurfaceBoundaries[4] = { +static constexpr const TileSurfaceBoundaryData _tileSurfaceBoundaries[4] = { { // Bottom right 1, @@ -445,13 +445,17 @@ static uint8_t ViewportSurfacePaintSetupGetRelativeSlope(const SurfaceElement& s * rct2: 0x0065E890, 0x0065E946, 0x0065E9FC, 0x0065EAB2 */ static void ViewportSurfaceSmoothenEdge( - PaintSession& session, enum edge_t edge, struct tile_descriptor self, struct tile_descriptor neighbour) + PaintSession& session, enum edge_t edge, struct TileDescriptor self, struct TileDescriptor neighbour) { PROFILED_FUNCTION(); if (neighbour.tile_element == nullptr) return; + // The edge row consists of invisible grass tiles. Do not attempt to smooth with them. + if (MapIsEdge(self.tile_coords.ToCoordsXY()) || MapIsEdge(neighbour.tile_coords.ToCoordsXY())) + return; + uint32_t maskImageBase = 0; uint8_t neighbourCorners[2] = { 0 }; uint8_t ownCorners[2] = { 0 }; @@ -498,23 +502,23 @@ static void ViewportSurfaceSmoothenEdge( switch (edge) { case EDGE_BOTTOMLEFT: - dh = byte_97B524[byte_97B444[self.slope]]; - cl = byte_97B54A[byte_97B444[neighbour.slope]]; + dh = Byte97B524[Byte97B444[self.slope]]; + cl = Byte97B54A[Byte97B444[neighbour.slope]]; break; case EDGE_TOPLEFT: - dh = byte_97B537[byte_97B444[self.slope]]; - cl = byte_97B55D[byte_97B444[neighbour.slope]]; + dh = Byte97B537[Byte97B444[self.slope]]; + cl = Byte97B55D[Byte97B444[neighbour.slope]]; break; case EDGE_BOTTOMRIGHT: - dh = byte_97B55D[byte_97B444[self.slope]]; - cl = byte_97B537[byte_97B444[neighbour.slope]]; + dh = Byte97B55D[Byte97B444[self.slope]]; + cl = Byte97B537[Byte97B444[neighbour.slope]]; break; case EDGE_TOPRIGHT: - dh = byte_97B54A[byte_97B444[self.slope]]; - cl = byte_97B524[byte_97B444[neighbour.slope]]; + dh = Byte97B54A[Byte97B444[self.slope]]; + cl = Byte97B524[Byte97B444[neighbour.slope]]; break; } @@ -536,7 +540,7 @@ static void ViewportSurfaceSmoothenEdge( return; } - const auto image_id = ImageId(maskImageBase + byte_97B444[self.slope]); + const auto image_id = ImageId(maskImageBase + Byte97B444[self.slope]); if (PaintAttachToPreviousPS(session, image_id, 0, 0)) { @@ -547,7 +551,7 @@ static void ViewportSurfaceSmoothenEdge( } } -static bool TileIsInsideClipView(const tile_descriptor& tile) +static bool TileIsInsideClipView(const TileDescriptor& tile) { if (tile.tile_element == nullptr) return false; @@ -565,8 +569,8 @@ static bool TileIsInsideClipView(const tile_descriptor& tile) } static void ViewportSurfaceDrawTileSideBottom( - PaintSession& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self, - struct tile_descriptor neighbour, bool isWater) + PaintSession& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct TileDescriptor self, + struct TileDescriptor neighbour, bool isWater) { PROFILED_FUNCTION(); @@ -722,7 +726,7 @@ static void ViewportSurfaceDrawTileSideBottom( if ((zOffset + tunnelHeight) > neighbourCornerHeight1 || (zOffset + tunnelHeight) > cornerHeight1) { - tunnelType = byte_97B5B0[tunnelType]; + tunnelType = Byte97B5B0[tunnelType]; } zOffset *= 16; @@ -737,8 +741,8 @@ static void ViewportSurfaceDrawTileSideBottom( auto imageId = GetTunnelImage(edgeStyle, tunnelType, edge); PaintAddImageAsParent( - session, imageId, { offset, zOffset }, { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 }, - { 0, 0, boundBoxOffsetZ }); + session, imageId, { offset, zOffset }, + { { 0, 0, boundBoxOffsetZ }, { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 } }); boundBoxOffsetZ = curHeight * COORDS_Z_PER_TINY_Z; boundBoxLength = _tunnelHeights[tunnelType][1] * 16; @@ -752,8 +756,8 @@ static void ViewportSurfaceDrawTileSideBottom( imageId = GetTunnelImage(edgeStyle, tunnelType, edge).WithIndexOffset(1); PaintAddImageAsParent( session, imageId, { offset, curHeight * COORDS_Z_PER_TINY_Z }, - { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 }, - { tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ }); + { { tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ }, + { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 } }); curHeight += _tunnelHeights[tunnelType][0]; tunnelIndex++; @@ -764,8 +768,8 @@ static void ViewportSurfaceDrawTileSideBottom( * rct2: 0x0065EB7D, 0x0065F0D8 */ static void ViewportSurfaceDrawLandSideBottom( - PaintSession& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self, - struct tile_descriptor neighbour) + PaintSession& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct TileDescriptor self, + struct TileDescriptor neighbour) { ViewportSurfaceDrawTileSideBottom(session, edge, height, edgeStyle, self, neighbour, false); } @@ -774,15 +778,15 @@ static void ViewportSurfaceDrawLandSideBottom( * rct2: 0x0065F8B9, 0x0065FE26 */ static void ViewportSurfaceDrawWaterSideBottom( - PaintSession& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct tile_descriptor self, - struct tile_descriptor neighbour) + PaintSession& session, enum edge_t edge, uint16_t height, uint8_t edgeStyle, struct TileDescriptor self, + struct TileDescriptor neighbour) { ViewportSurfaceDrawTileSideBottom(session, edge, height, edgeStyle, self, neighbour, true); } static void ViewportSurfaceDrawTileSideTop( - PaintSession& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self, - struct tile_descriptor neighbour, bool isWater) + PaintSession& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct TileDescriptor self, + struct TileDescriptor neighbour, bool isWater) { PROFILED_FUNCTION(); @@ -923,8 +927,8 @@ static void ViewportSurfaceDrawTileSideTop( * rct2: 0x0065F63B, 0x0065F77D */ static void ViewportSurfaceDrawLandSideTop( - PaintSession& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self, - struct tile_descriptor neighbour) + PaintSession& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct TileDescriptor self, + struct TileDescriptor neighbour) { ViewportSurfaceDrawTileSideTop(session, edge, height, terrain, self, neighbour, false); } @@ -933,8 +937,8 @@ static void ViewportSurfaceDrawLandSideTop( * rct2: 0x0066039B, 0x006604F1 */ static void ViewportSurfaceDrawWaterSideTop( - PaintSession& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct tile_descriptor self, - struct tile_descriptor neighbour) + PaintSession& session, enum edge_t edge, uint16_t height, uint8_t terrain, struct TileDescriptor self, + struct TileDescriptor neighbour) { ViewportSurfaceDrawTileSideTop(session, edge, height, terrain, self, neighbour, true); } @@ -1001,10 +1005,10 @@ static void PaintPatrolArea(PaintSession& session, const SurfaceElement& element auto colour = GetPatrolAreaTileColour(session.MapPosition); if (colour) { - assert(surfaceShape < std::size(byte_97B444)); + assert(surfaceShape < std::size(Byte97B444)); auto [localZ, localSurfaceShape] = SurfaceGetHeightAboveWater(element, height, surfaceShape); - auto imageId = ImageId(SPR_TERRAIN_SELECTION_PATROL_AREA + byte_97B444[localSurfaceShape], *colour); + auto imageId = ImageId(SPR_TERRAIN_SELECTION_PATROL_AREA + Byte97B444[localSurfaceShape], *colour); auto* backup = session.LastPS; PaintAddImageAsParent(session, imageId, { 0, 0, localZ }, { 32, 32, 1 }); @@ -1019,7 +1023,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con { PROFILED_FUNCTION(); - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; session.InteractionType = ViewportInteractionItem::Terrain; session.Flags |= PaintSessionFlags::PassedSurface; session.SurfaceElement = reinterpret_cast(&tileElement); @@ -1029,10 +1033,10 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const auto terrain_type = tileElement.GetSurfaceStyle(); const uint8_t surfaceShape = ViewportSurfacePaintSetupGetRelativeSlope(tileElement, rotation); const CoordsXY& base = session.SpritePosition; - const corner_height& cornerHeights = corner_heights[surfaceShape]; + const CornerHeight& cornerHeights = corner_heights[surfaceShape]; const TileElement* elementPtr = &reinterpret_cast(tileElement); - tile_descriptor selfDescriptor = { + TileDescriptor selfDescriptor = { TileCoordsXY(base), elementPtr, static_cast(terrain_type), @@ -1045,7 +1049,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con }, }; - tile_descriptor tileDescriptors[5]; + TileDescriptor tileDescriptors[5]; tileDescriptors[0] = selfDescriptor; for (std::size_t i = 0; i < std::size(viewport_surface_paint_data); i++) @@ -1053,7 +1057,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const CoordsXY& offset = viewport_surface_paint_data[i][rotation]; const CoordsXY position = base + offset; - tile_descriptor& descriptor = tileDescriptors[i + 1]; + TileDescriptor& descriptor = tileDescriptors[i + 1]; descriptor.tile_element = nullptr; if (!MapIsLocationValid(position)) @@ -1069,7 +1073,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const uint32_t surfaceSlope = ViewportSurfacePaintSetupGetRelativeSlope(*surfaceElement, rotation); const uint8_t baseHeight = surfaceElement->GetBaseZ() / 16; - const corner_height& ch = corner_heights[surfaceSlope]; + const CornerHeight& ch = corner_heights[surfaceSlope]; descriptor.tile_coords = TileCoordsXY{ position }; descriptor.tile_element = reinterpret_cast(surfaceElement); @@ -1090,7 +1094,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con int32_t dx = surfaceHeight + 3; int32_t image_id = (SPR_HEIGHT_MARKER_BASE + dx / 16); - image_id += get_height_marker_offset(); + image_id += GetHeightMarkerOffset(); image_id -= gMapBaseZ; PaintAddImageAsParent(session, ImageId(image_id, COLOUR_OLIVE_GREEN), { 16, 16, surfaceHeight }, { 1, 1, 0 }); @@ -1100,10 +1104,10 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con if (session.VerticalTunnelHeight * COORDS_Z_PER_TINY_Z == height) { // Vertical tunnels - PaintAddImageAsParent(session, ImageId(1575), { 0, 0, height }, { 1, 30, 39 }, { -2, 1, height - 40 }); - PaintAddImageAsParent(session, ImageId(1576), { 0, 0, height }, { 30, 1, 0 }, { 1, 31, height }); - PaintAddImageAsParent(session, ImageId(1577), { 0, 0, height }, { 1, 30, 0 }, { 31, 1, height }); - PaintAddImageAsParent(session, ImageId(1578), { 0, 0, height }, { 30, 1, 39 }, { 1, -2, height - 40 }); + PaintAddImageAsParent(session, ImageId(1575), { 0, 0, height }, { { -2, 1, height - 40 }, { 1, 30, 39 } }); + PaintAddImageAsParent(session, ImageId(1576), { 0, 0, height }, { { 1, 31, height }, { 30, 1, 0 } }); + PaintAddImageAsParent(session, ImageId(1577), { 0, 0, height }, { { 31, 1, height }, { 1, 30, 0 } }); + PaintAddImageAsParent(session, ImageId(1578), { 0, 0, height }, { { 1, -2, height - 40 }, { 30, 1, 39 } }); } else { @@ -1118,8 +1122,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } } - assert(surfaceShape < std::size(byte_97B444)); - const uint8_t image_offset = byte_97B444[surfaceShape]; + assert(surfaceShape < std::size(Byte97B444)); + const uint8_t image_offset = Byte97B444[surfaceShape]; ImageId imageId; if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) @@ -1166,11 +1170,11 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con if (session.ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP) { - // loc_660E9A: + // Loc660E9A: if (tileElement.GetOwnership() & OWNERSHIP_OWNED) { - assert(surfaceShape < std::size(byte_97B444)); - PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_SQUARE + byte_97B444[surfaceShape]), 0, 0); + assert(surfaceShape < std::size(Byte97B444)); + PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_SQUARE + Byte97B444[surfaceShape]), 0, 0); } else if (tileElement.GetOwnership() & OWNERSHIP_AVAILABLE) { @@ -1186,8 +1190,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con { if (tileElement.GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) { - assert(surfaceShape < std::size(byte_97B444)); - PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_DOTTED + byte_97B444[surfaceShape]), 0, 0); + assert(surfaceShape < std::size(Byte97B444)); + PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_DOTTED + Byte97B444[surfaceShape]), 0, 0); } else if (tileElement.GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) { @@ -1206,7 +1210,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) { - // loc_660FB8: + // Loc660FB8: const CoordsXY& pos = session.MapPosition; if (pos.x >= gMapSelectPositionA.x && pos.x <= gMapSelectPositionB.x && pos.y >= gMapSelectPositionA.y && pos.y <= gMapSelectPositionB.y) @@ -1215,18 +1219,18 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con if (mapSelectionType >= MAP_SELECT_TYPE_EDGE_0) { // Walls - // loc_661089: + // Loc661089: const auto fpId = static_cast((((mapSelectionType - 9) + rotation) & 3) + 0x21); - const auto image_id = ImageId(SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape], fpId); + const auto image_id = ImageId(SPR_TERRAIN_SELECTION_EDGE + Byte97B444[surfaceShape], fpId); PaintAttachToPreviousPS(session, image_id, 0, 0); } else if (mapSelectionType >= MAP_SELECT_TYPE_QUARTER_0) { - // loc_661051:(no jump) + // Loc661051:(no jump) // Selection split into four quarter segments const auto fpId = static_cast( (((mapSelectionType - MAP_SELECT_TYPE_QUARTER_0) + rotation) & 3) + 0x27); - const auto image_id = ImageId(SPR_TERRAIN_SELECTION_QUARTER + byte_97B444[surfaceShape], fpId); + const auto image_id = ImageId(SPR_TERRAIN_SELECTION_QUARTER + Byte97B444[surfaceShape], fpId); PaintAttachToPreviousPS(session, image_id, 0, 0); } else if (mapSelectionType <= MAP_SELECT_TYPE_FULL) @@ -1239,7 +1243,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } const auto fpId = static_cast(eax + 0x21); - const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape], fpId); + const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[surfaceShape], fpId); PaintAttachToPreviousPS(session, image_id, 0, 0); } else @@ -1248,7 +1252,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con auto [local_height, local_surfaceShape] = SurfaceGetHeightAboveWater(tileElement, height, surfaceShape); const auto fpId = static_cast(38); - const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape], fpId); + const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[local_surfaceShape], fpId); PaintStruct* backup = session.LastPS; PaintAddImageAsParent(session, image_id, { 0, 0, local_height }, { 32, 32, 1 }); @@ -1274,7 +1278,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con fpId = static_cast(43); } - const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape], fpId); + const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[surfaceShape], fpId); PaintAttachToPreviousPS(session, image_id, 0, 0); break; } @@ -1292,7 +1296,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con if ((session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) && !(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) { - const uint8_t image_offset = byte_97B444[surfaceShape]; + const uint8_t image_offset = Byte97B444[surfaceShape]; auto imageId = GetSurfaceImage(session, terrain_type, image_offset, rotation, 1, false, true); PaintAttachToPreviousPS(session, imageId, 0, 0); } @@ -1302,7 +1306,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const auto edgeStyle = tileElement.GetEdgeStyle(); if (static_cast(edgeStyle) >= object_entry_group_counts[EnumValue(ObjectType::TerrainEdge)]) { - log_verbose("edgeStyle: %d", edgeStyle); + LOG_VERBOSE("edgeStyle: %d", edgeStyle); } ViewportSurfaceDrawLandSideTop(session, EDGE_TOPLEFT, height, edgeStyle, tileDescriptors[0], tileDescriptors[3]); @@ -1316,7 +1320,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con if (waterHeight > 0 && !gTrackDesignSaveMode && !waterGetsClipped) { - // loc_6615A9: (water height) + // Loc6615A9: (water height) session.InteractionType = ViewportInteractionItem::Water; const uint16_t localHeight = height + 16; @@ -1326,7 +1330,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con int32_t image_offset = 0; if (waterHeight <= localHeight) { - image_offset = byte_97B740[surfaceShape & 0xF]; + image_offset = Byte97B740[surfaceShape & 0xF]; } const auto image_id = ImageId(SPR_WATER_MASK + image_offset, FilterPaletteID::PaletteWater).WithBlended(true); @@ -1383,7 +1387,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } } else if (!(surfaceShape & fenceData.bit_8)) - { // loc_6619A2: + { // Loc6619A2: image_id = fenceData.image[1]; } else @@ -1391,15 +1395,15 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con local_height += 16; if (!(surfaceShape & 0x10)) - { // loc_6619B5 (first) + { // Loc6619B5 (first) image_id = fenceData.image[0]; } else if (surfaceShape & fenceData.bit_4) - { // loc_6619B5 (second) + { // Loc6619B5 (second) image_id = fenceData.image[3]; } else if (surfaceShape & fenceData.bit_2) - { // loc_6619B5 (third) + { // Loc6619B5 (third) image_id = fenceData.image[4]; } else @@ -1409,8 +1413,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } PaintAddImageAsParent( - session, ImageId(image_id), { fenceData.offset, local_height }, { fenceData.Boundbox.length, 9 }, - { fenceData.Boundbox.offset, local_height + 1 }); + session, ImageId(image_id), { fenceData.offset, local_height }, + { { fenceData.Boundbox.offset, local_height + 1 }, { fenceData.Boundbox.length, 9 } }); } } @@ -1419,7 +1423,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con switch (surfaceShape) { default: - // loc_661C2C + // Loc661C2C // 00 // 00 00 // 00 00 00 @@ -1434,7 +1438,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 1: - // loc_661CB9 + // Loc661CB9 // 00 // 00 00 // 01 01 01 @@ -1448,7 +1452,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 2: - // loc_661D4E + // Loc661D4E // 02 // 17 00 // 17 02 00 @@ -1462,7 +1466,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 3: - // loc_661DE3 + // Loc661DE3 // 03 // 03 03 // 03 03 03 @@ -1475,7 +1479,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 4: - // loc_661E7C + // Loc661E7C // 1E // 1E 1E // 04 04 04 @@ -1489,7 +1493,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 5: - // loc_661F11 + // Loc661F11 // 1E ▓▓ // 1E 1E ▒▒ ▒▒ // 05 05 05 ░░ ░░ ░░ @@ -1504,7 +1508,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 6: - // loc_661FA6 + // Loc661FA6 // 06 ▓▓ // 06 06 ▓▓ ▒▒ // 06 06 06 ▓▓ ▒▒ ░░ @@ -1517,7 +1521,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 7: - // loc_66203F + // Loc66203F // 07 ▓▓ // 00 17 ▓▓ ▒▒ // 00 07 17 ▓▓ ▓▓ ░░ @@ -1531,7 +1535,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 8: - // loc_6620D8 + // Loc6620D8 PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8 | SEGMENT_C8 | SEGMENT_D0, height, 0); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C0, height, 8); PaintUtilSetSegmentSupportHeight(session, SEGMENT_CC | SEGMENT_D4, height + 6, 0x1D); @@ -1540,7 +1544,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 9: - // loc_66216D + // Loc66216D PaintUtilForceSetGeneralSupportHeight(session, height, 9); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4 | SEGMENT_C8 | SEGMENT_B8, height + 2, 9); PaintUtilSetSegmentSupportHeight(session, SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, height + 2 + 6, 9); @@ -1548,7 +1552,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 10: - // loc_662206 + // Loc662206 PaintUtilForceSetGeneralSupportHeight(session, height, 0xA); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8, height + 6 + 6, 0x17); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_D0, height + 6, 0x17); @@ -1558,7 +1562,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 11: - // loc_66229B + // Loc66229B PaintUtilForceSetGeneralSupportHeight(session, height, 0xB); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4, height + 4, 0x1B); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_CC, height + 4 + 6, 0x1B); @@ -1567,7 +1571,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 12: - // loc_662334 + // Loc662334 PaintUtilForceSetGeneralSupportHeight(session, height, 0xC); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0, height + 2, 0xC); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, height + 2 + 6, 0xC); @@ -1575,7 +1579,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 13: - // loc_6623CD + // Loc6623CD PaintUtilForceSetGeneralSupportHeight(session, height, 0xD); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8, height + 4, 0x1D); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_D0, height + 4 + 6, 0x1D); @@ -1584,7 +1588,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 14: - // loc_662466 + // Loc662466 PaintUtilForceSetGeneralSupportHeight(session, height, 0xE); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C0, height + 4, 0x1E); PaintUtilSetSegmentSupportHeight(session, SEGMENT_D0 | SEGMENT_D4, height + 4 + 6, 0x1E); @@ -1593,7 +1597,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 23: - // loc_6624FF + // Loc6624FF PaintUtilForceSetGeneralSupportHeight(session, height, 0x17); PaintUtilSetSegmentSupportHeight(session, SEGMENT_BC, height + 4, 0x17); PaintUtilSetSegmentSupportHeight(session, SEGMENT_CC | SEGMENT_D4, height + 4 + 6, 0x17); @@ -1603,7 +1607,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 27: - // loc_6625A0 + // Loc6625A0 PaintUtilForceSetGeneralSupportHeight(session, height, 0x1B); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4, height + 4, 0x1B); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_CC, height + 4 + 6, 0x1B); @@ -1613,7 +1617,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 29: - // loc_662641 + // Loc662641 PaintUtilForceSetGeneralSupportHeight(session, height, 0x1D); PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8, height + 4, 0x1D); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_D0, height + 4 + 6, 0x1D); @@ -1623,7 +1627,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con break; case 30: - // loc_6626E2 + // Loc6626E2 PaintUtilForceSetGeneralSupportHeight(session, height, 0x1E); PaintUtilSetSegmentSupportHeight(session, SEGMENT_C0, height + 4, 0x1E); PaintUtilSetSegmentSupportHeight(session, SEGMENT_D0 | SEGMENT_D4, height + 4 + 6, 0x1E); diff --git a/src/openrct2/paint/tile_element/Paint.Surface.h b/src/openrct2/paint/tile_element/Paint.Surface.h index 73da372374..6e43b6f624 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.h +++ b/src/openrct2/paint/tile_element/Paint.Surface.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index 62c507cd8a..ab9acf3a63 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -94,7 +94,7 @@ static void BlankTilesPaint(PaintSession& session, int32_t x, int32_t y) dx -= 16; int32_t bx = dx + 32; - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if (bx <= dpi->y) return; dx -= 20; @@ -119,7 +119,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor PROFILED_FUNCTION(); CoordsXY coords = origCoords; - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if ((session.ViewFlags & VIEWPORT_FLAG_CLIP_VIEW)) { @@ -181,7 +181,7 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor session.SpritePosition.y = coords.y; session.InteractionType = ViewportInteractionItem::None; - PaintAddImageAsParent(session, imageId, { 0, 0, arrowZ }, { 32, 32, -1 }, { 0, 0, arrowZ + 18 }); + PaintAddImageAsParent(session, imageId, { 0, 0, arrowZ }, { { 0, 0, arrowZ + 18 }, { 32, 32, -1 } }); } if (screenMinY + 52 <= dpi->y) @@ -332,8 +332,8 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor int32_t xOffset = static_cast(sy) * 10; int32_t yOffset = -22 + static_cast(sx) * 10; PaintStruct* ps = PaintAddImageAsParent( - session, imageColourFlats, { xOffset, yOffset, segmentHeight }, { 10, 10, 1 }, - { xOffset + 1, yOffset + 16, segmentHeight }); + session, imageColourFlats, { xOffset, yOffset, segmentHeight }, + { { xOffset + 1, yOffset + 16, segmentHeight }, { 10, 10, 1 } }); if (ps != nullptr) { ps->image_id = ps->image_id.WithTertiary(COLOUR_BORDEAUX_RED); diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.h b/src/openrct2/paint/tile_element/Paint.TileElement.h index fafe89b0f5..4b14d40b86 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.h +++ b/src/openrct2/paint/tile_element/Paint.TileElement.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index 4e445867ab..0d8d44f46f 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,9 @@ #include "../../drawing/Drawing.h" #include "../../interface/Colour.h" #include "../../interface/Viewport.h" +#include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../object/WallSceneryEntry.h" #include "../../profiling/Profiling.h" #include "../../ride/Track.h" #include "../../ride/TrackDesign.h" @@ -174,16 +176,16 @@ static void PaintWallScrollingText( char signString[256]; if (gConfigGeneral.UpperCaseBanners) { - format_string_to_upper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data()); + FormatStringToUpper(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data()); } else { - format_string(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data()); + OpenRCT2::FormatStringLegacy(signString, sizeof(signString), STR_SCROLLING_SIGN_TEXT, ft.Data()); } - auto stringWidth = gfx_get_string_width(signString, FontStyle::Tiny); + auto stringWidth = GfxGetStringWidth(signString, FontStyle::Tiny); auto scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; - auto imageId = scrolling_text_setup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollingMode, textPaletteIndex); + auto imageId = ScrollingTextSetup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollingMode, textPaletteIndex); PaintAddImageAsChild(session, imageId, { 0, 0, height + 8 }, { boundsOffset, { 1, 1, 13 } }); } @@ -322,12 +324,12 @@ void PaintWall(PaintSession& session, uint8_t direction, int32_t height, const W imageTemplate = imageTemplate.WithTertiary(wallElement.GetTertiaryColour()); } - PaintUtilSetGeneralSupportHeight(session, 8 * wallElement.clearance_height, 0x20); + PaintUtilSetGeneralSupportHeight(session, 8 * wallElement.ClearanceHeight, 0x20); auto isGhost = false; if (gTrackDesignSaveMode || (session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { - if (!track_design_save_contains_tile_element(reinterpret_cast(&wallElement))) + if (!TrackDesignSaveContainsTileElement(reinterpret_cast(&wallElement))) { imageTemplate = ImageId().WithRemap(FilterPaletteID::Palette46); isGhost = true; diff --git a/src/openrct2/park/Legacy.cpp b/src/openrct2/park/Legacy.cpp index 6d7bf51e81..0d2a366305 100644 --- a/src/openrct2/park/Legacy.cpp +++ b/src/openrct2/park/Legacy.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -2219,7 +2219,7 @@ const RCT2::FootpathMapping* GetFootpathMapping(const ObjectEntryDescriptor& des auto datPathName = GetDATPathName(desc.Identifier); if (datPathName.has_value()) { - rct_object_entry objectEntry = {}; + RCTObjectEntry objectEntry = {}; objectEntry.SetName(datPathName.value()); return RCT2::GetFootpathSurfaceId(ObjectEntryDescriptor(objectEntry)); } diff --git a/src/openrct2/park/Legacy.h b/src/openrct2/park/Legacy.h index 4c0bbc84c2..a0705a4ddd 100644 --- a/src/openrct2/park/Legacy.h +++ b/src/openrct2/park/Legacy.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 5be5e18ff8..e0a5a3b9b8 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -201,31 +201,31 @@ namespace OpenRCT2 Save(fs); } - scenario_index_entry ReadScenarioChunk() + ScenarioIndexEntry ReadScenarioChunk() { - scenario_index_entry entry{}; + ScenarioIndexEntry entry{}; auto& os = *_os; os.ReadWriteChunk(ParkFileChunkType::SCENARIO, [&entry](OrcaStream::ChunkStream& cs) { - entry.category = cs.Read(); + entry.Category = cs.Read(); std::string name; ReadWriteStringTable(cs, name, "en-GB"); - String::Set(entry.name, sizeof(entry.name), name.c_str()); - String::Set(entry.internal_name, sizeof(entry.internal_name), name.c_str()); + String::Set(entry.Name, sizeof(entry.Name), name.c_str()); + String::Set(entry.InternalName, sizeof(entry.InternalName), name.c_str()); std::string parkName; ReadWriteStringTable(cs, parkName, "en-GB"); std::string scenarioDetails; ReadWriteStringTable(cs, scenarioDetails, "en-GB"); - String::Set(entry.details, sizeof(entry.details), scenarioDetails.c_str()); + String::Set(entry.Details, sizeof(entry.Details), scenarioDetails.c_str()); - entry.objective_type = cs.Read(); - entry.objective_arg_1 = cs.Read(); - entry.objective_arg_3 = cs.Read(); - entry.objective_arg_2 = cs.Read(); + entry.ObjectiveType = cs.Read(); + entry.ObjectiveArg1 = cs.Read(); + entry.ObjectiveArg3 = cs.Read(); + entry.ObjectiveArg2 = cs.Read(); - entry.source_game = ScenarioSource::Other; + entry.SourceGame = ScenarioSource::Other; }); return entry; } @@ -295,7 +295,7 @@ namespace OpenRCT2 break; case DESCRIPTOR_DAT: { - rct_object_entry datEntry; + RCTObjectEntry datEntry; cs.Read(&datEntry, sizeof(datEntry)); ObjectEntryDescriptor desc(datEntry); if (version <= 2 && datEntry.GetType() == ObjectType::Paths) @@ -346,7 +346,7 @@ namespace OpenRCT2 } } desc.Identifier = identifier; - desc.Version = cs.Read(); + desc.Version = VersionTuple(cs.Read()); if (version <= 2) { @@ -395,12 +395,12 @@ namespace OpenRCT2 { cs.Write(DESCRIPTOR_JSON); cs.Write(entry.Identifier); - cs.Write(entry.Version); + cs.Write(VersionString(entry.Version)); } else { cs.Write(DESCRIPTOR_DAT); - cs.Write(&entry.Entry, sizeof(rct_object_entry)); + cs.Write(&entry.Entry, sizeof(RCTObjectEntry)); } } else @@ -445,7 +445,7 @@ namespace OpenRCT2 if (cs.GetMode() == OrcaStream::Mode::READING) { auto earlyCompletion = cs.Read(); - if (network_get_mode() == NETWORK_MODE_CLIENT) + if (NetworkGetMode() == NETWORK_MODE_CLIENT) { gAllowEarlyCompletionInNetworkPlay = earlyCompletion; } @@ -464,7 +464,8 @@ namespace OpenRCT2 void ReadWriteGeneralChunk(OrcaStream& os) { - auto found = os.ReadWriteChunk(ParkFileChunkType::GENERAL, [this, &os](OrcaStream::ChunkStream& cs) { + const auto version = os.GetHeader().TargetVersion; + auto found = os.ReadWriteChunk(ParkFileChunkType::GENERAL, [this, &os, &version](OrcaStream::ChunkStream& cs) { // Only GAME_PAUSED_NORMAL from gGamePaused is relevant. if (cs.GetMode() == OrcaStream::Mode::READING) { @@ -486,7 +487,7 @@ namespace OpenRCT2 uint32_t s0{}, s1{}; cs.ReadWrite(s0); cs.ReadWrite(s1); - Random::Rct2::Seed s{ s0, s1 }; + Random::RCT2::Seed s{ s0, s1 }; gScenarioRand.seed(s); } else @@ -497,7 +498,16 @@ namespace OpenRCT2 } cs.ReadWrite(gGuestInitialHappiness); - cs.ReadWrite(gGuestInitialCash); + if (version <= 18) + { + money16 tempGuestInitialCash{}; + cs.ReadWrite(tempGuestInitialCash); + gGuestInitialCash = ToMoney64(tempGuestInitialCash); + } + else + { + cs.ReadWrite(gGuestInitialCash); + } cs.ReadWrite(gGuestInitialHunger); cs.ReadWrite(gGuestInitialThirst); @@ -509,12 +519,42 @@ namespace OpenRCT2 cs.ReadWrite(spawn.direction); }); - cs.ReadWrite(gLandPrice); - cs.ReadWrite(gConstructionRightsPrice); + if (version <= 18) + { + money16 tempLandPrice{}; + money16 tempConstructionRightPrice{}; + cs.ReadWrite(tempLandPrice); + cs.ReadWrite(tempConstructionRightPrice); + gLandPrice = ToMoney64(tempLandPrice); + gConstructionRightsPrice = ToMoney64(tempConstructionRightPrice); + } + else + { + cs.ReadWrite(gLandPrice); + cs.ReadWrite(gConstructionRightsPrice); + } cs.ReadWrite(gGrassSceneryTileLoopPosition); cs.ReadWrite(gWidePathTileLoopPosition); - ReadWriteRideRatingCalculationData(cs, gRideRatingUpdateState); + auto& rideRatings = RideRatingGetUpdateStates(); + if (os.GetHeader().TargetVersion >= 21) + { + cs.ReadWriteArray(rideRatings, [this, &cs](RideRatingUpdateState& calcData) { + ReadWriteRideRatingCalculationData(cs, calcData); + return true; + }); + } + else + { + // Only single state was stored prior to version 20. + if (os.GetMode() == OrcaStream::Mode::READING) + { + // Since we read only one state ensure the rest is reset. + RideRatingResetUpdateStates(); + } + auto& rideRatingUpdateState = rideRatings[0]; + ReadWriteRideRatingCalculationData(cs, rideRatingUpdateState); + } if (os.GetHeader().TargetVersion >= 14) { @@ -646,7 +686,7 @@ namespace OpenRCT2 auto type = cs.Read(); if (type == DESCRIPTOR_DAT) { - rct_object_entry entry; + RCTObjectEntry entry; cs.Read(&entry, sizeof(entry)); auto size = cs.Read(); std::vector data; @@ -694,7 +734,7 @@ namespace OpenRCT2 if (String::Equals(extension, ".dat", true)) { cs.Write(DESCRIPTOR_DAT); - cs.Write(&ori->ObjectEntry, sizeof(rct_object_entry)); + cs.Write(&ori->ObjectEntry, sizeof(RCTObjectEntry)); } else if (String::Equals(extension, ".parkobj", true)) { @@ -748,7 +788,17 @@ namespace OpenRCT2 cs.ReadWrite(gMaxBankLoan); cs.ReadWrite(gBankLoanInterestRate); cs.ReadWrite(gParkFlags); - cs.ReadWrite(gParkEntranceFee); + if (version <= 18) + { + money16 tempParkEntranceFee{}; + cs.ReadWrite(tempParkEntranceFee); + gParkEntranceFee = ToMoney64(tempParkEntranceFee); + } + else + { + cs.ReadWrite(gParkEntranceFee); + } + cs.ReadWrite(gStaffHandymanColour); cs.ReadWrite(gStaffMechanicColour); cs.ReadWrite(gStaffSecurityColour); @@ -795,7 +845,7 @@ namespace OpenRCT2 // Awards if (version <= 6) { - Award awards[RCT2::Limits::MaxAwards]; + Award awards[RCT2::Limits::MaxAwards]{}; cs.ReadWriteArray(awards, [&cs](Award& award) { if (award.Time != 0) { @@ -828,7 +878,16 @@ namespace OpenRCT2 cs.ReadWrite(gWeeklyProfitAverageDivisor); cs.ReadWrite(gTotalAdmissions); cs.ReadWrite(gTotalIncomeFromAdmissions); - cs.ReadWrite(gTotalRideValueForMoney); + if (version <= 16) + { + money16 legacyTotalRideValueForMoney = 0; + cs.ReadWrite(legacyTotalRideValueForMoney); + gTotalRideValueForMoney = legacyTotalRideValueForMoney; + } + else + { + cs.ReadWrite(gTotalRideValueForMoney); + } cs.ReadWrite(gNumGuestsInParkLastWeek); cs.ReadWrite(gGuestChangeModifier); cs.ReadWrite(_guestGenerationProbability); @@ -997,7 +1056,7 @@ namespace OpenRCT2 cs.Read(tileElements.data(), tileElements.size() * sizeof(TileElement)); SetTileElements(std::move(tileElements)); { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it)) { @@ -1060,7 +1119,7 @@ namespace OpenRCT2 continue; auto* trackElement = tileElement->AsTrack(); - const auto* ride = get_ride(trackElement->GetRideIndex()); + const auto* ride = GetRide(trackElement->GetRideIndex()); if (ride != nullptr) { trackElement->SetRideType(ride->type); @@ -1156,7 +1215,7 @@ namespace OpenRCT2 std::vector rideIds; if (cs.GetMode() == OrcaStream::Mode::READING) { - ride_init_all(); + RideInitAll(); } else { @@ -1184,7 +1243,12 @@ namespace OpenRCT2 // Ride ID cs.ReadWrite(rideId); - auto& ride = *GetOrAllocateRide(rideId); + auto& ride = [&]() -> Ride& { + if (cs.GetMode() == OrcaStream::Mode::WRITING) + return *GetRide(rideId); + else + return *RideAllocateAtIndex(rideId); + }(); // Status cs.ReadWrite(ride.type); @@ -1198,10 +1262,23 @@ namespace OpenRCT2 cs.ReadWrite(ride.custom_name); cs.ReadWrite(ride.default_name_number); - cs.ReadWriteArray(ride.price, [&cs](money16& price) { - cs.ReadWrite(price); - return true; - }); + if (version <= 18) + { + money16 prices[2] = {}; + cs.ReadWriteArray(prices, [&cs](money16& price) { + cs.ReadWrite(price); + return true; + }); + ride.price[0] = prices[0]; + ride.price[1] = prices[1]; + } + else + { + cs.ReadWriteArray(ride.price, [&cs](money64& price) { + cs.ReadWrite(price); + return true; + }); + } // Colours cs.ReadWrite(ride.entrance_style); @@ -1348,11 +1425,50 @@ namespace OpenRCT2 cs.ReadWrite(ride.intensity); cs.ReadWrite(ride.nausea); - cs.ReadWrite(ride.value); + if (version <= 18) + { + uint16_t tempRideValue{}; + cs.ReadWrite(tempRideValue); + if (tempRideValue == 0xFFFFU) + { + ride.value = RIDE_VALUE_UNDEFINED; + } + else + { + ride.value = ToMoney64(tempRideValue); + } + } + else if (version == 19) + { + money64 tempRideValue{}; + cs.ReadWrite(tempRideValue); + if (tempRideValue == 0xFFFFU) + { + ride.value = RIDE_VALUE_UNDEFINED; + } + else + { + ride.value = tempRideValue; + } + } + else + { + cs.ReadWrite(ride.value); + } cs.ReadWrite(ride.num_riders); cs.ReadWrite(ride.build_date); - cs.ReadWrite(ride.upkeep_cost); + + if (version <= 18) + { + money16 tempUpkeepCost{}; + cs.ReadWrite(tempUpkeepCost); + ride.upkeep_cost = ToMoney64(tempUpkeepCost); + } + else + { + cs.ReadWrite(ride.upkeep_cost); + } cs.ReadWrite(ride.cur_num_customers); cs.ReadWrite(ride.num_customers_timeout); @@ -1436,7 +1552,7 @@ namespace OpenRCT2 static void ReadWriteEntityCommon(OrcaStream::ChunkStream& cs, EntityBase& entity) { - cs.ReadWrite(entity.sprite_index); + cs.ReadWrite(entity.Id); cs.ReadWrite(entity.sprite_height_negative); cs.ReadWrite(entity.x); cs.ReadWrite(entity.y); @@ -1596,13 +1712,15 @@ namespace OpenRCT2 { if (guest != nullptr) { - cs.ReadWrite(guest->PaidOnDrink); + money16 tempPaidOnDrink{}; + cs.ReadWrite(tempPaidOnDrink); + guest->PaidOnDrink = ToMoney64(tempPaidOnDrink); std::array rideTypeBeenOn; cs.ReadWriteArray(rideTypeBeenOn, [&cs](uint8_t& rideType) { cs.ReadWrite(rideType); return true; }); - OpenRCT2::RideUse::GetTypeHistory().Set(guest->sprite_index, LegacyGetRideTypesBeenOn(rideTypeBeenOn)); + OpenRCT2::RideUse::GetTypeHistory().Set(guest->Id, LegacyGetRideTypesBeenOn(rideTypeBeenOn)); cs.ReadWrite(guest->ItemFlags); cs.ReadWrite(guest->Photo2RideRef); cs.ReadWrite(guest->Photo3RideRef); @@ -1661,7 +1779,7 @@ namespace OpenRCT2 cs.ReadWrite(rideType); return true; }); - OpenRCT2::RideUse::GetHistory().Set(guest->sprite_index, LegacyGetRidesBeenOn(ridesBeenOn)); + OpenRCT2::RideUse::GetHistory().Set(guest->Id, LegacyGetRidesBeenOn(ridesBeenOn)); } else { @@ -1675,14 +1793,19 @@ namespace OpenRCT2 } } - cs.ReadWrite(entity.Id); + cs.ReadWrite(entity.PeepId); if (version <= 1) { if (guest != nullptr) { - cs.ReadWrite(guest->CashInPocket); - cs.ReadWrite(guest->CashSpent); + money32 tempCashInPocket{}; + money32 tempCashSpent{}; + cs.ReadWrite(tempCashInPocket); + cs.ReadWrite(tempCashSpent); + guest->CashInPocket = ToMoney64(tempCashInPocket); + guest->CashSpent = ToMoney64(tempCashSpent); + cs.ReadWrite(guest->ParkEntryTime); cs.ReadWrite(guest->RejoinQueueTimeout); cs.ReadWrite(guest->PreviousRide); @@ -1765,10 +1888,17 @@ namespace OpenRCT2 cs.ReadWrite(guest->LitterCount); cs.ReadWrite(guest->GuestTimeOnRide); cs.ReadWrite(guest->DisgustingCount); - cs.ReadWrite(guest->PaidToEnter); - cs.ReadWrite(guest->PaidOnRides); - cs.ReadWrite(guest->PaidOnFood); - cs.ReadWrite(guest->PaidOnSouvenirs); + + money16 expenditures[4]{}; + cs.ReadWrite(expenditures[0]); + cs.ReadWrite(expenditures[1]); + cs.ReadWrite(expenditures[2]); + cs.ReadWrite(expenditures[3]); + guest->PaidToEnter = ToMoney64(expenditures[0]); + guest->PaidOnRides = ToMoney64(expenditures[1]); + guest->PaidOnFood = ToMoney64(expenditures[2]); + guest->PaidOnSouvenirs = ToMoney64(expenditures[3]); + cs.ReadWrite(guest->AmountOfFood); cs.ReadWrite(guest->AmountOfDrinks); cs.ReadWrite(guest->AmountOfSouvenirs); @@ -1878,7 +2008,16 @@ namespace OpenRCT2 cs.ReadWrite(entity.next_vehicle_on_ride); cs.ReadWrite(entity.var_44); cs.ReadWrite(entity.mass); - cs.ReadWrite(entity.update_flags); + if (cs.GetMode() == OrcaStream::Mode::READING && os.GetHeader().TargetVersion < 18) + { + uint16_t updateFlags = 0; + cs.ReadWrite(updateFlags); + entity.Flags = updateFlags; + } + else + { + cs.ReadWrite(entity.Flags); + } cs.ReadWrite(entity.SwingSprite); cs.ReadWrite(entity.current_station); cs.ReadWrite(entity.current_time); @@ -1931,14 +2070,23 @@ namespace OpenRCT2 cs.ReadWrite(entity.colours.Tertiary); cs.ReadWrite(entity.seat_rotation); cs.ReadWrite(entity.target_seat_rotation); - cs.ReadWrite(entity.IsCrashedVehicle); + if (cs.GetMode() == OrcaStream::Mode::READING && os.GetHeader().TargetVersion < 18) + { + bool isCrashedVehicle = false; + cs.ReadWrite(isCrashedVehicle); + if (isCrashedVehicle) + { + entity.SetFlag(VehicleFlags::Crashed); + } + } } template<> void ParkFile::ReadWriteEntity(OrcaStream& os, OrcaStream::ChunkStream& cs, Guest& guest) { ReadWritePeep(os, cs, guest); + auto version = os.GetHeader().TargetVersion; - if (os.GetHeader().TargetVersion <= 1) + if (version <= 1) { return; } @@ -1949,11 +2097,30 @@ namespace OpenRCT2 cs.ReadWrite(guest.GuestHeadingToRideId); cs.ReadWrite(guest.GuestIsLostCountdown); cs.ReadWrite(guest.GuestTimeOnRide); - cs.ReadWrite(guest.PaidToEnter); - cs.ReadWrite(guest.PaidOnRides); - cs.ReadWrite(guest.PaidOnFood); - cs.ReadWrite(guest.PaidOnDrink); - cs.ReadWrite(guest.PaidOnSouvenirs); + + if (version <= 18) + { + money16 expenditures[5]{}; + cs.ReadWrite(expenditures[0]); + cs.ReadWrite(expenditures[1]); + cs.ReadWrite(expenditures[2]); + cs.ReadWrite(expenditures[3]); + cs.ReadWrite(expenditures[4]); + guest.PaidToEnter = ToMoney64(expenditures[0]); + guest.PaidOnRides = ToMoney64(expenditures[1]); + guest.PaidOnFood = ToMoney64(expenditures[2]); + guest.PaidOnDrink = ToMoney64(expenditures[3]); + guest.PaidOnSouvenirs = ToMoney64(expenditures[4]); + } + else + { + cs.ReadWrite(guest.PaidToEnter); + cs.ReadWrite(guest.PaidOnRides); + cs.ReadWrite(guest.PaidOnFood); + cs.ReadWrite(guest.PaidOnDrink); + cs.ReadWrite(guest.PaidOnSouvenirs); + } + cs.ReadWrite(guest.OutsideOfPark); cs.ReadWrite(guest.Happiness); cs.ReadWrite(guest.HappinessTarget); @@ -1980,7 +2147,7 @@ namespace OpenRCT2 cs.ReadWrite(rideType); return true; }); - OpenRCT2::RideUse::GetTypeHistory().Set(guest.sprite_index, LegacyGetRideTypesBeenOn(rideTypeBeenOn)); + OpenRCT2::RideUse::GetTypeHistory().Set(guest.Id, LegacyGetRideTypesBeenOn(rideTypeBeenOn)); } cs.ReadWrite(guest.TimeInQueue); @@ -1991,7 +2158,7 @@ namespace OpenRCT2 cs.ReadWrite(rideType); return true; }); - OpenRCT2::RideUse::GetHistory().Set(guest.sprite_index, LegacyGetRidesBeenOn(ridesBeenOn)); + OpenRCT2::RideUse::GetHistory().Set(guest.Id, LegacyGetRidesBeenOn(ridesBeenOn)); } else { @@ -1999,14 +2166,14 @@ namespace OpenRCT2 { std::vector rideUse; cs.ReadWriteVector(rideUse, [&cs](RideId& rideId) { cs.ReadWrite(rideId); }); - OpenRCT2::RideUse::GetHistory().Set(guest.sprite_index, std::move(rideUse)); + OpenRCT2::RideUse::GetHistory().Set(guest.Id, std::move(rideUse)); std::vector rideTypeUse; cs.ReadWriteVector(rideTypeUse, [&cs](ObjectEntryIndex& rideType) { cs.ReadWrite(rideType); }); - OpenRCT2::RideUse::GetTypeHistory().Set(guest.sprite_index, std::move(rideTypeUse)); + OpenRCT2::RideUse::GetTypeHistory().Set(guest.Id, std::move(rideTypeUse)); } else { - auto* rideUse = OpenRCT2::RideUse::GetHistory().GetAll(guest.sprite_index); + auto* rideUse = OpenRCT2::RideUse::GetHistory().GetAll(guest.Id); if (rideUse == nullptr) { std::vector empty; @@ -2016,7 +2183,7 @@ namespace OpenRCT2 { cs.ReadWriteVector(*rideUse, [&cs](RideId& rideId) { cs.ReadWrite(rideId); }); } - auto* rideTypeUse = OpenRCT2::RideUse::GetTypeHistory().GetAll(guest.sprite_index); + auto* rideTypeUse = OpenRCT2::RideUse::GetTypeHistory().GetAll(guest.Id); if (rideTypeUse == nullptr) { std::vector empty; @@ -2028,8 +2195,21 @@ namespace OpenRCT2 } } } - cs.ReadWrite(guest.CashInPocket); - cs.ReadWrite(guest.CashSpent); + if (version <= 18) + { + money32 tempCashInPocket{}; + money32 tempCashSpent{}; + cs.ReadWrite(tempCashInPocket); + cs.ReadWrite(tempCashSpent); + guest.CashInPocket = ToMoney64(tempCashInPocket); + guest.CashSpent = ToMoney64(tempCashSpent); + } + else + { + cs.ReadWrite(guest.CashInPocket); + cs.ReadWrite(guest.CashSpent); + } + cs.ReadWrite(guest.Photo1RideRef); cs.ReadWrite(guest.Photo2RideRef); cs.ReadWrite(guest.Photo3RideRef); @@ -2131,7 +2311,7 @@ namespace OpenRCT2 ReadWriteEntityCommon(cs, moneyEffect); cs.ReadWrite(moneyEffect.MoveDelay); cs.ReadWrite(moneyEffect.NumMovements); - cs.ReadWrite(moneyEffect.Vertical); + cs.ReadWrite(moneyEffect.GuestPurchase); cs.ReadWrite(moneyEffect.Value); cs.ReadWrite(moneyEffect.OffsetX); cs.ReadWrite(moneyEffect.Wiggle); @@ -2217,7 +2397,7 @@ namespace OpenRCT2 cs.Write(count); for (auto* ent : EntityList()) { - cs.Write(ent->sprite_index); + cs.Write(ent->Id); ReadWriteEntity(os, cs, *ent); } } @@ -2297,21 +2477,21 @@ enum : uint32_t S6_SAVE_FLAG_AUTOMATIC = 1u << 31, }; -int32_t scenario_save(u8string_view path, int32_t flags) +int32_t ScenarioSave(u8string_view path, int32_t flags) { if (flags & S6_SAVE_FLAG_SCENARIO) { - log_verbose("saving scenario"); + LOG_VERBOSE("saving scenario"); } else { - log_verbose("saving game"); + LOG_VERBOSE("saving game"); } gIsAutosave = flags & S6_SAVE_FLAG_AUTOMATIC; if (!gIsAutosave) { - window_close_construction_windows(); + WindowCloseConstructionWindows(); } PrepareMapForSave(); @@ -2339,12 +2519,12 @@ int32_t scenario_save(u8string_view path, int32_t flags) } catch (const std::exception& e) { - log_error(e.what()); + LOG_ERROR(e.what()); Formatter ft; ft.Add(e.what()); ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_STRING, ft); - gfx_invalidate_screen(); + GfxInvalidateScreen(); auto ctx = OpenRCT2::GetContext(); auto uictx = ctx->GetUiContext(); @@ -2367,7 +2547,7 @@ int32_t scenario_save(u8string_view path, int32_t flags) } } - gfx_invalidate_screen(); + GfxInvalidateScreen(); if (result && !(flags & S6_SAVE_FLAG_AUTOMATIC)) { @@ -2391,7 +2571,7 @@ public: { } - ParkLoadResult Load(const utf8* path) override + ParkLoadResult Load(const u8string& path) override { _parkFile = std::make_unique(); _parkFile->Load(path); @@ -2401,18 +2581,18 @@ public: return result; } - ParkLoadResult LoadSavedGame(const utf8* path, bool skipObjectCheck = false) override + ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) override { return Load(path); } - ParkLoadResult LoadScenario(const utf8* path, bool skipObjectCheck = false) override + ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) override { return Load(path); } ParkLoadResult LoadFromStream( - OpenRCT2::IStream* stream, bool isScenario, bool skipObjectCheck = false, const utf8* path = String::Empty) override + OpenRCT2::IStream* stream, bool isScenario, bool skipObjectCheck = false, const u8string& path = {}) override { _parkFile = std::make_unique(); _parkFile->Load(*stream); @@ -2425,11 +2605,11 @@ public: void Import() override { _parkFile->Import(); - research_determine_first_of_type(); - game_fix_save_vars(); + ResearchDetermineFirstOfType(); + GameFixSaveVars(); } - bool GetDetails(scenario_index_entry* dst) override + bool GetDetails(ScenarioIndexEntry* dst) override { *dst = _parkFile->ReadScenarioChunk(); return true; diff --git a/src/openrct2/park/ParkFile.h b/src/openrct2/park/ParkFile.h index 7df5ab0959..69fe23f2b5 100644 --- a/src/openrct2/park/ParkFile.h +++ b/src/openrct2/park/ParkFile.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -8,10 +9,10 @@ struct ObjectRepositoryItem; namespace OpenRCT2 { // Current version that is saved. - constexpr uint32_t PARK_FILE_CURRENT_VERSION = 16; + constexpr uint32_t PARK_FILE_CURRENT_VERSION = 21; // The minimum version that is forwards compatible with the current version. - constexpr uint32_t PARK_FILE_MIN_VERSION = 14; + constexpr uint32_t PARK_FILE_MIN_VERSION = 21; // The minimum version that is backwards compatible with the current version. // If this is increased beyond 0, uncomment the checks in ParkFile.cpp and Context.cpp! diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index ac13f024ca..965588f83a 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -30,7 +30,6 @@ static bool _peepPathFindIsStaff; static int8_t _peepPathFindNumJunctions; static int8_t _peepPathFindMaxJunctions; static int32_t _peepPathFindTilesChecked; -static uint8_t _peepPathFindFewestNumSteps; TileCoordsXYZ gPeepPathFindGoalPosition; bool gPeepPathFindIgnoreForeignQueues; @@ -43,11 +42,11 @@ static bool _pathFindDebug = false; static utf8 _pathFindDebugPeepName[256]; #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 -static int32_t guest_surface_path_finding(Peep& peep); +static int32_t GuestSurfacePathFinding(Peep& peep); /* A junction history for the peep pathfinding heuristic search * The magic number 16 is the largest value returned by - * peep_pathfind_get_max_number_junctions() which should eventually + * PeepPathfindGetMaxNumberJunctions() which should eventually * be declared properly. */ static struct { @@ -72,7 +71,7 @@ enum PATH_SEARCH_FAILED }; -static TileElement* get_banner_on_path(TileElement* path_element) +static TileElement* GetBannerOnPath(TileElement* path_element) { // This is an improved version of original. // That only checked for one fence in the way. @@ -97,17 +96,17 @@ static TileElement* get_banner_on_path(TileElement* path_element) return nullptr; } -static int32_t banner_clear_path_edges(PathElement* pathElement, int32_t edges) +static int32_t BannerClearPathEdges(PathElement* pathElement, int32_t edges) { if (_peepPathFindIsStaff) return edges; - TileElement* bannerElement = get_banner_on_path(reinterpret_cast(pathElement)); + TileElement* bannerElement = GetBannerOnPath(reinterpret_cast(pathElement)); if (bannerElement != nullptr) { do { edges &= bannerElement->AsBanner()->GetAllowedEdges(); - } while ((bannerElement = get_banner_on_path(bannerElement)) != nullptr); + } while ((bannerElement = GetBannerOnPath(bannerElement)) != nullptr); } return edges; } @@ -115,16 +114,16 @@ static int32_t banner_clear_path_edges(PathElement* pathElement, int32_t edges) /** * Gets the connected edges of a path that are permitted (i.e. no 'no entry' signs) */ -static int32_t path_get_permitted_edges(PathElement* pathElement) +static int32_t PathGetPermittedEdges(PathElement* pathElement) { - return banner_clear_path_edges(pathElement, pathElement->GetEdgesAndCorners()) & 0x0F; + return BannerClearPathEdges(pathElement, pathElement->GetEdgesAndCorners()) & 0x0F; } /** * * rct2: 0x0069524E */ -static int32_t peep_move_one_tile(Direction direction, Peep& peep) +static int32_t PeepMoveOneTile(Direction direction, Peep& peep) { assert(DirectionValid(direction)); auto newTile = CoordsXY{ CoordsXY{ peep.NextLoc } + CoordsDirectionDelta[direction] }.ToTileCentre(); @@ -132,7 +131,7 @@ static int32_t peep_move_one_tile(Direction direction, Peep& peep) if (newTile.x >= MAXIMUM_MAP_SIZE_BIG || newTile.y >= MAXIMUM_MAP_SIZE_BIG) { // This could loop! - return guest_surface_path_finding(peep); + return GuestSurfacePathFinding(peep); } peep.PeepDirection = direction; @@ -155,7 +154,7 @@ static int32_t peep_move_one_tile(Direction direction, Peep& peep) // coordinate constant, but instead clamp it to an acceptable range. This brings in 'outlier' guests from // the edges of the path, while allowing guests who are already in an acceptable position to stay there. - const int8_t offset = (scenario_rand() & 7) - 3; + const int8_t offset = (ScenarioRand() & 7) - 3; if (direction == 0 || direction == 2) { // Peep is moving along X, so apply the offset to the X position of the destination and clamp their current Y @@ -180,10 +179,10 @@ static int32_t peep_move_one_tile(Direction direction, Peep& peep) * * rct2: 0x00694C41 */ -static int32_t guest_surface_path_finding(Peep& peep) +static int32_t GuestSurfacePathFinding(Peep& peep) { auto pathPos = CoordsXYRangedZ{ peep.NextLoc, peep.NextLoc.z, peep.NextLoc.z + PATH_CLEARANCE }; - Direction randDirection = scenario_rand() & 3; + Direction randDirection = ScenarioRand() & 3; if (!WallInTheWay(pathPos, randDirection)) { @@ -195,13 +194,13 @@ static int32_t guest_surface_path_finding(Peep& peep) { if (!MapSurfaceIsBlocked(pathPos)) { - return peep_move_one_tile(randDirection, peep); + return PeepMoveOneTile(randDirection, peep); } } } randDirection++; - uint8_t rand_backwards = scenario_rand() & 1; + uint8_t rand_backwards = ScenarioRand() & 1; if (rand_backwards) { randDirection -= 2; @@ -220,7 +219,7 @@ static int32_t guest_surface_path_finding(Peep& peep) { if (!MapSurfaceIsBlocked(pathPos)) { - return peep_move_one_tile(randDirection, peep); + return PeepMoveOneTile(randDirection, peep); } } } @@ -240,7 +239,7 @@ static int32_t guest_surface_path_finding(Peep& peep) { if (!MapSurfaceIsBlocked(pathPos)) { - return peep_move_one_tile(randDirection, peep); + return PeepMoveOneTile(randDirection, peep); } } } @@ -251,7 +250,7 @@ static int32_t guest_surface_path_finding(Peep& peep) randDirection += 2; } randDirection &= 3; - return peep_move_one_tile(randDirection, peep); + return PeepMoveOneTile(randDirection, peep); } /** @@ -267,7 +266,7 @@ static int32_t guest_surface_path_finding(Peep& peep) * Returns the type of the next footpath tile a peep can get to from x,y,z / * inputTileElement in the given direction. */ -static uint8_t footpath_element_next_in_direction(TileCoordsXYZ loc, PathElement* pathElement, Direction chosenDirection) +static uint8_t FootpathElementNextInDirection(TileCoordsXYZ loc, PathElement* pathElement, Direction chosenDirection) { TileElement* nextTileElement; @@ -319,9 +318,9 @@ static uint8_t footpath_element_next_in_direction(TileCoordsXYZ loc, PathElement * * rct2: 0x006949B9 * - * This is the recursive portion of footpath_element_destination_in_direction(). + * This is the recursive portion of FootpathElementDestinationInDirection(). */ -static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, Direction chosenDirection, RideId* outRideIndex, int32_t level) +static uint8_t FootpathElementDestInDir(TileCoordsXYZ loc, Direction chosenDirection, RideId* outRideIndex, int32_t level) { TileElement* tileElement; Direction direction; @@ -344,10 +343,10 @@ static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, Direction chosenD { case TileElementType::Track: { - if (loc.z != tileElement->base_height) + if (loc.z != tileElement->BaseHeight) continue; RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) { *outRideIndex = rideIndex; @@ -356,7 +355,7 @@ static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, Direction chosenD } break; case TileElementType::Entrance: - if (loc.z != tileElement->base_height) + if (loc.z != tileElement->BaseHeight) continue; switch (tileElement->AsEntrance()->GetEntranceType()) { @@ -387,9 +386,9 @@ static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, Direction chosenD if (tileElement->AsPath()->IsWide()) return PATH_SEARCH_WIDE; - uint8_t edges = path_get_permitted_edges(tileElement->AsPath()); + uint8_t edges = PathGetPermittedEdges(tileElement->AsPath()); edges &= ~(1 << DirectionReverse(chosenDirection)); - loc.z = tileElement->base_height; + loc.z = tileElement->BaseHeight; for (Direction dir : ALL_DIRECTIONS) { @@ -407,7 +406,7 @@ static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, Direction chosenD loc.z += 2; } } - return footpath_element_dest_in_dir(loc, dir, outRideIndex, level + 1); + return FootpathElementDestInDir(loc, dir, outRideIndex, level + 1); } return PATH_SEARCH_DEAD_END; } @@ -442,7 +441,7 @@ static uint8_t footpath_element_dest_in_dir(TileCoordsXYZ loc, Direction chosenD * This is useful for finding out what is at the end of a short single * width path, for example that leads from a ride exit back to the main path. */ -static uint8_t footpath_element_destination_in_direction( +static uint8_t FootpathElementDestinationInDirection( TileCoordsXYZ loc, PathElement* pathElement, Direction chosenDirection, RideId* outRideIndex) { if (pathElement->IsSloped()) @@ -453,31 +452,31 @@ static uint8_t footpath_element_destination_in_direction( } } - return footpath_element_dest_in_dir(loc, chosenDirection, outRideIndex, 0); + return FootpathElementDestInDir(loc, chosenDirection, outRideIndex, 0); } /** * * rct2: 0x00695225 */ -static int32_t guest_path_find_aimless(Peep& peep, uint8_t edges) +static int32_t GuestPathfindAimless(Peep& peep, uint8_t edges) { - if (scenario_rand() & 1) + if (ScenarioRand() & 1) { // If possible go straight if (edges & (1 << peep.PeepDirection)) { - return peep_move_one_tile(peep.PeepDirection, peep); + return PeepMoveOneTile(peep.PeepDirection, peep); } } while (true) { - Direction direction = scenario_rand() & 3; + Direction direction = ScenarioRand() & 3; // Otherwise go in a random direction allowed from the tile. if (edges & (1 << direction)) { - return peep_move_one_tile(direction, peep); + return PeepMoveOneTile(direction, peep); } } } @@ -486,7 +485,7 @@ static int32_t guest_path_find_aimless(Peep& peep, uint8_t edges) * * rct2: 0x0069A60A */ -static uint8_t peep_pathfind_get_max_number_junctions(Peep& peep) +static uint8_t PeepPathfindGetMaxNumberJunctions(Peep& peep) { if (peep.Is()) return 8; @@ -494,7 +493,7 @@ static uint8_t peep_pathfind_get_max_number_junctions(Peep& peep) // PEEP_FLAGS_2? It's cleared here but not set anywhere! if ((peep.PeepFlags & PEEP_FLAGS_2)) { - if ((scenario_rand() & 0xFFFF) <= 7281) + if ((ScenarioRand() & 0xFFFF) <= 7281) peep.PeepFlags &= ~PEEP_FLAGS_2; return 8; @@ -526,13 +525,13 @@ static uint8_t peep_pathfind_get_max_number_junctions(Peep& peep) * since entrances and ride queues coming off a path should not result in * the path being considered a junction. */ -static bool path_is_thin_junction(PathElement* path, const TileCoordsXYZ& loc) +static bool PathIsThinJunction(PathElement* path, const TileCoordsXYZ& loc) { PROFILED_FUNCTION(); uint8_t edges = path->GetEdges(); - int32_t test_edge = bitscanforward(edges); + int32_t test_edge = UtilBitScanForward(edges); if (test_edge == -1) return false; @@ -540,7 +539,7 @@ static bool path_is_thin_junction(PathElement* path, const TileCoordsXYZ& loc) int32_t thin_count = 0; do { - int32_t fp_result = footpath_element_next_in_direction(loc, path, test_edge); + int32_t fp_result = FootpathElementNextInDirection(loc, path, test_edge); /* Ignore non-paths (e.g. ride entrances, shops), wide paths * and ride queues (per ignoreQueues) when counting @@ -556,7 +555,7 @@ static bool path_is_thin_junction(PathElement* path, const TileCoordsXYZ& loc) break; } edges &= ~(1 << test_edge); - } while ((test_edge = bitscanforward(edges)) != -1); + } while ((test_edge = UtilBitScanForward(edges)) != -1); return thin_junction; } @@ -575,7 +574,7 @@ static int32_t CalculateHeuristicPathingScore(const TileCoordsXYZ& loc1, const T } #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 -static constexpr const char* pathSearchToString(uint8_t pathFindSearchResult) +static constexpr const char* PathSearchToString(uint8_t pathFindSearchResult) { switch (pathFindSearchResult) { @@ -686,7 +685,7 @@ static constexpr const char* pathSearchToString(uint8_t pathFindSearchResult) * * rct2: 0x0069A997 */ -static void peep_pathfind_heuristic_search( +static void PeepPathfindHeuristicSearch( TileCoordsXYZ loc, Peep& peep, TileElement* currentTileElement, bool inPatrolArea, uint8_t counter, uint16_t* endScore, Direction test_edge, uint8_t* endJunctions, TileCoordsXYZ junctionList[16], uint8_t directionList[16], TileCoordsXYZ* endXYZ, uint8_t* endSteps) @@ -714,7 +713,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Return from %d,%d,%d; At start", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Return from %d,%d,%d; At start", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 return; @@ -733,7 +732,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Return from %d,%d,%d; Left patrol area", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Return from %d,%d,%d; Left patrol area", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 return; @@ -760,12 +759,12 @@ static void peep_pathfind_heuristic_search( { case TileElementType::Track: { - if (loc.z != tileElement->base_height) + if (loc.z != tileElement->BaseHeight) continue; /* For peeps heading for a shop, the goal is the shop * tile. */ rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) continue; @@ -774,7 +773,7 @@ static void peep_pathfind_heuristic_search( break; } case TileElementType::Entrance: - if (loc.z != tileElement->base_height) + if (loc.z != tileElement->BaseHeight) continue; Direction direction; searchResult = PATH_SEARCH_OTHER; @@ -828,7 +827,7 @@ static void peep_pathfind_heuristic_search( continue; // Path may be sloped, so set z to path base height. - loc.z = tileElement->base_height; + loc.z = tileElement->BaseHeight; if (tileElement->AsPath()->IsWide()) { @@ -843,7 +842,7 @@ static void peep_pathfind_heuristic_search( searchResult = PATH_SEARCH_THIN; - uint8_t numEdges = bitcount(tileElement->AsPath()->GetEdges()); + uint8_t numEdges = BitCount(tileElement->AsPath()->GetEdges()); if (numEdges < 2) { @@ -879,9 +878,9 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Checking map element at %d,%d,%d; Type: %s", counter, loc.x >> 5, loc.y >> 5, loc.z, - pathSearchToString(searchResult)); + PathSearchToString(searchResult)); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 @@ -921,7 +920,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Search path ends at %d,%d,%d; At goal; Score: %d", counter, loc.x >> 5, loc.y >> 5, loc.z, new_score); } @@ -939,7 +938,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Search path ends at %d,%d,%d; Not a path", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Search path ends at %d,%d,%d; Not a path", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 continue; @@ -981,7 +980,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Search path ends at %d,%d,%d; Wide path; Score: %d", counter, loc.x >> 5, loc.y >> 5, loc.z, new_score); } @@ -993,12 +992,12 @@ static void peep_pathfind_heuristic_search( /* Get all the permitted_edges of the map element. */ Guard::Assert(tileElement->AsPath() != nullptr); - uint8_t edges = path_get_permitted_edges(tileElement->AsPath()); + uint8_t edges = PathGetPermittedEdges(tileElement->AsPath()); #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Path element at %d,%d,%d; Edges (0123):%d%d%d%d; Reverse: %d", counter, loc.x >> 5, loc.y >> 5, loc.z, edges & 1, (edges & 2) >> 1, (edges & 4) >> 2, (edges & 8) >> 3, test_edge ^ 2); } @@ -1007,7 +1006,7 @@ static void peep_pathfind_heuristic_search( /* Remove the reverse edge (i.e. the edge back to the previous map element.) */ edges &= ~(1 << DirectionReverse(test_edge)); - int32_t next_test_edge = bitscanforward(edges); + int32_t next_test_edge = UtilBitScanForward(edges); /* If there are no other edges the current search ends here. * Continue to the next map element without updating the parameters (best result so far). */ @@ -1016,7 +1015,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Search path ends at %d,%d,%d; No more edges/dead end", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Search path ends at %d,%d,%d; No more edges/dead end", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 continue; @@ -1051,7 +1050,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Search path ends at %d,%d,%d; Search limit reached; Score: %d", counter, loc.x >> 5, loc.y >> 5, loc.z, new_score); } @@ -1064,7 +1063,7 @@ static void peep_pathfind_heuristic_search( { /* Check if this is a thin junction. And perform additional * necessary checks. */ - thin_junction = path_is_thin_junction(tileElement->AsPath(), loc); + thin_junction = PathIsThinJunction(tileElement->AsPath(), loc); if (thin_junction) { @@ -1125,7 +1124,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Search path ends at %d,%d,%d; Loop", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Search path ends at %d,%d,%d; Loop", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 continue; @@ -1157,7 +1156,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Search path ends at %d,%d,%d; NumJunctions < 0; Score: %d", counter, loc.x >> 5, loc.y >> 5, loc.z, new_score); } @@ -1192,17 +1191,17 @@ static void peep_pathfind_heuristic_search( if (searchResult == PATH_SEARCH_JUNCTION) { if (thin_junction) - log_info( + LOG_INFO( "[%03d] Recurse from %d,%d,%d edge: %d; Thin-Junction", counter, loc.x >> 5, loc.y >> 5, loc.z, next_test_edge); else - log_info( + LOG_INFO( "[%03d] Recurse from %d,%d,%d edge: %d; Wide-Junction", counter, loc.x >> 5, loc.y >> 5, loc.z, next_test_edge); } else { - log_info( + LOG_INFO( "[%03d] Recurse from %d,%d,%d edge: %d; Segment", counter, loc.x >> 5, loc.y >> 5, loc.z, next_test_edge); } @@ -1215,7 +1214,7 @@ static void peep_pathfind_heuristic_search( _peepPathFindHistory[_peepPathFindNumJunctions + 1].direction = next_test_edge; } - peep_pathfind_heuristic_search( + PeepPathfindHeuristicSearch( { loc.x, loc.y, height }, peep, tileElement, nextInPatrolArea, counter, endScore, next_test_edge, endJunctions, junctionList, directionList, endXYZ, endSteps); _peepPathFindNumJunctions = savedNumJunctions; @@ -1223,12 +1222,12 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info( + LOG_INFO( "[%03d] Returned to %d,%d,%d edge: %d; Score: %d", counter, loc.x >> 5, loc.y >> 5, loc.z, next_test_edge, *endScore); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 - } while ((next_test_edge = bitscanforward(edges)) != -1); + } while ((next_test_edge = UtilBitScanForward(edges)) != -1); } while (!(tileElement++)->IsLastForTile()); @@ -1239,7 +1238,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Returning from %d,%d,%d; No relevant map element found", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Returning from %d,%d,%d; No relevant map element found", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 } @@ -1248,7 +1247,7 @@ static void peep_pathfind_heuristic_search( #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_info("[%03d] Returning from %d,%d,%d; All map elements checked", counter, loc.x >> 5, loc.y >> 5, loc.z); + LOG_INFO("[%03d] Returning from %d,%d,%d; All map elements checked", counter, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 } @@ -1266,7 +1265,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p PROFILED_FUNCTION(); // The max number of thin junctions searched - a per-search-path limit. - _peepPathFindMaxJunctions = peep_pathfind_get_max_number_junctions(peep); + _peepPathFindMaxJunctions = PeepPathfindGetMaxNumberJunctions(peep); /* The max number of tiles to check - a whole-search limit. * Mainly to limit the performance impact of the path finding. */ @@ -1279,7 +1278,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose( + LOG_VERBOSE( "Choose direction for %s for goal %d,%d,%d from %d,%d,%d", _pathFindDebugPeepName, goal.x, goal.y, goal.z, loc.x, loc.y, loc.z); } @@ -1311,7 +1310,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p { if (dest_tile_element == nullptr) break; - if (dest_tile_element->base_height != loc.z) + if (dest_tile_element->BaseHeight != loc.z) continue; if (dest_tile_element->GetType() != TileElementType::Path) continue; @@ -1327,10 +1326,10 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p * check if the combination is 'thin'! * The junction is considered 'thin' simply if any of the * overlaid path elements there is a 'thin junction'. */ - isThin = isThin || path_is_thin_junction(dest_tile_element->AsPath(), loc); + isThin = isThin || PathIsThinJunction(dest_tile_element->AsPath(), loc); // Collect the permitted edges of ALL matching path elements at this location. - permitted_edges |= path_get_permitted_edges(dest_tile_element->AsPath()); + permitted_edges |= PathGetPermittedEdges(dest_tile_element->AsPath()); } while (!(dest_tile_element++)->IsLastForTile()); // Peep is not on a path. if (!found) @@ -1372,7 +1371,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose( + LOG_VERBOSE( "Getting untried edges from pf_history for %d,%d,%d: %s,%s,%s,%s", loc.x, loc.y, loc.z, (edges & 1) ? "0" : "-", (edges & 2) ? "1" : "-", (edges & 4) ? "2" : "-", (edges & 8) ? "3" : "-"); } @@ -1394,7 +1393,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose("All edges tried for %d,%d,%d - resetting to all untried", loc.x, loc.y, loc.z); + LOG_VERBOSE("All edges tried for %d,%d,%d - resetting to all untried", loc.x, loc.y, loc.z); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 } @@ -1417,7 +1416,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose("New goal; clearing pf_history."); + LOG_VERBOSE("New goal; clearing pf_history."); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 } @@ -1426,7 +1425,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p if (edges == 0) return INVALID_DIRECTION; - int32_t chosen_edge = bitscanforward(edges); + int32_t chosen_edge = UtilBitScanForward(edges); // Peep has multiple edges still to try. if (edges & ~(1 << chosen_edge)) @@ -1442,7 +1441,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p if (_pathFindDebug) { - log_verbose("Pathfind start for goal %d,%d,%d from %d,%d,%d", goal.x, goal.y, goal.z, loc.x, loc.y, loc.z); + LOG_VERBOSE("Pathfind start for goal %d,%d,%d from %d,%d,%d", goal.x, goal.y, goal.z, loc.x, loc.y, loc.z); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 @@ -1450,8 +1449,8 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p * edge that gives the best (i.e. smallest) value (best_score) * or for different edges with equal value, the edge with the * least steps (best_sub). */ - int32_t numEdges = bitcount(edges); - for (int32_t test_edge = chosen_edge; test_edge != -1; test_edge = bitscanforward(edges)) + int32_t numEdges = BitCount(edges); + for (int32_t test_edge = chosen_edge; test_edge != -1; test_edge = UtilBitScanForward(edges)) { edges &= ~(1 << test_edge); uint8_t height = loc.z; @@ -1461,7 +1460,6 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p height += 0x2; } - _peepPathFindFewestNumSteps = 255; /* Divide the maxTilesChecked global search limit * between the remaining edges to ensure the search * covers all of the remaining edges. */ @@ -1516,23 +1514,23 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 if (gPathFindDebug) { - log_verbose("Pathfind searching in direction: %d from %d,%d,%d", test_edge, loc.x >> 5, loc.y >> 5, loc.z); + LOG_VERBOSE("Pathfind searching in direction: %d from %d,%d,%d", test_edge, loc.x >> 5, loc.y >> 5, loc.z); } #endif // defined(DEBUG_LEVEL_2) && DEBUG_LEVEL_2 - peep_pathfind_heuristic_search( + PeepPathfindHeuristicSearch( { loc.x, loc.y, height }, peep, first_tile_element, inPatrolArea, 0, &score, test_edge, &endJunctions, endJunctionList, endDirectionList, &endXYZ, &endSteps); #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose( + LOG_VERBOSE( "Pathfind test edge: %d score: %d steps: %d end: %d,%d,%d junctions: %d", test_edge, score, endSteps, endXYZ.x, endXYZ.y, endXYZ.z, endJunctions); for (uint8_t listIdx = 0; listIdx < endJunctions; listIdx++) { - log_info( + LOG_INFO( "Junction#%d %d,%d,%d Direction %d", listIdx + 1, endJunctionList[listIdx].x, endJunctionList[listIdx].y, endJunctionList[listIdx].z, endDirectionList[listIdx]); } @@ -1568,7 +1566,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose("Pathfind heuristic search failed."); + LOG_VERBOSE("Pathfind heuristic search failed."); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 return INVALID_DIRECTION; @@ -1576,14 +1574,14 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose("Pathfind best edge %d with score %d steps %d", chosen_edge, best_score, best_sub); + LOG_VERBOSE("Pathfind best edge %d with score %d steps %d", chosen_edge, best_score, best_sub); for (uint8_t listIdx = 0; listIdx < bestJunctions; listIdx++) { - log_verbose( + LOG_VERBOSE( "Junction#%d %d,%d,%d Direction %d", listIdx + 1, bestJunctionList[listIdx].x, bestJunctionList[listIdx].y, bestJunctionList[listIdx].z, bestDirectionList[listIdx]); } - log_verbose("End at %d,%d,%d", bestXYZ.x, bestXYZ.y, bestXYZ.z); + LOG_VERBOSE("End at %d,%d,%d", bestXYZ.x, bestXYZ.y, bestXYZ.z); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 } @@ -1603,7 +1601,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose( + LOG_VERBOSE( "Updating existing pf_history (in index: %u) for %d,%d,%d without entry edge %d & exit edge %d.", i, loc.x, loc.y, loc.z, DirectionReverse(peep.PeepDirection), chosen_edge); } @@ -1625,7 +1623,7 @@ Direction OriginalPathfinding::ChooseDirection(const TileCoordsXYZ& loc, Peep& p #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_verbose( + LOG_VERBOSE( "Storing new pf_history (in index: %d) for %d,%d,%d without entry edge %d & exit edge %d.", i, loc.x, loc.y, loc.z, DirectionReverse(peep.PeepDirection), chosen_edge); } @@ -1668,7 +1666,7 @@ int32_t OriginalPathfinding::GuestPathFindParkEntranceEntering(Peep& peep, uint8 // If no defined park entrances are found, walk aimlessly. if (!chosenEntrance.has_value()) - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); gPeepPathFindGoalPosition = TileCoordsXYZ(chosenEntrance.value()); gPeepPathFindIgnoreForeignQueues = true; @@ -1677,9 +1675,9 @@ int32_t OriginalPathfinding::GuestPathFindParkEntranceEntering(Peep& peep, uint8 Direction chosenDirection = ChooseDirection(TileCoordsXYZ{ peep.NextLoc }, peep); if (chosenDirection == INVALID_DIRECTION) - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); - return peep_move_one_tile(chosenDirection, peep); + return PeepMoveOneTile(chosenDirection, peep); } /** @@ -1688,7 +1686,7 @@ int32_t OriginalPathfinding::GuestPathFindParkEntranceEntering(Peep& peep, uint8 * @param y y coordinate of location * @return Index of gPeepSpawns (or 0xFF if no peep spawns exist). */ -static uint8_t get_nearest_peep_spawn_index(uint16_t x, uint16_t y) +static uint8_t GetNearestPeepSpawnIndex(uint16_t x, uint16_t y) { uint8_t chosenSpawn = 0xFF; uint16_t nearestDist = 0xFFFF; @@ -1713,11 +1711,11 @@ static uint8_t get_nearest_peep_spawn_index(uint16_t x, uint16_t y) int32_t OriginalPathfinding::GuestPathFindPeepSpawn(Peep& peep, uint8_t edges) { // Send peeps to the nearest spawn point. - uint8_t chosenSpawn = get_nearest_peep_spawn_index(peep.NextLoc.x, peep.NextLoc.y); + uint8_t chosenSpawn = GetNearestPeepSpawnIndex(peep.NextLoc.x, peep.NextLoc.y); // If no defined spawns were found, walk aimlessly. if (chosenSpawn == 0xFF) - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); const auto peepSpawnLoc = gPeepSpawns[chosenSpawn].ToTileStart(); Direction direction = peepSpawnLoc.direction; @@ -1725,16 +1723,16 @@ int32_t OriginalPathfinding::GuestPathFindPeepSpawn(Peep& peep, uint8_t edges) gPeepPathFindGoalPosition = TileCoordsXYZ(peepSpawnLoc); if (peepSpawnLoc.x == peep.NextLoc.x && peepSpawnLoc.y == peep.NextLoc.y) { - return peep_move_one_tile(direction, peep); + return PeepMoveOneTile(direction, peep); } gPeepPathFindIgnoreForeignQueues = true; gPeepPathFindQueueRideIndex = RideId::GetNull(); direction = ChooseDirection(TileCoordsXYZ{ peep.NextLoc }, peep); if (direction == INVALID_DIRECTION) - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); - return peep_move_one_tile(direction, peep); + return PeepMoveOneTile(direction, peep); } /** @@ -1760,7 +1758,7 @@ int32_t OriginalPathfinding::GuestPathFindParkEntranceLeaving(Peep& peep, uint8_ auto chosenEntrance = GetNearestParkEntrance(peep.NextLoc); if (!chosenEntrance.has_value()) - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); peep.PeepFlags |= PEEP_FLAGS_PARK_ENTRANCE_CHOSEN; entranceGoal = TileCoordsXYZ(*chosenEntrance); @@ -1781,9 +1779,9 @@ int32_t OriginalPathfinding::GuestPathFindParkEntranceLeaving(Peep& peep, uint8_ #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (chosenDirection == INVALID_DIRECTION) - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); - return peep_move_one_tile(chosenDirection, peep); + return PeepMoveOneTile(chosenDirection, peep); } /** @@ -1794,7 +1792,7 @@ int32_t OriginalPathfinding::GuestPathFindParkEntranceLeaving(Peep& peep, uint8_ * In case where the map element at (x, y) is invalid or there is no entrance * or queue leading to it the function will not update its arguments. */ -static void get_ride_queue_end(TileCoordsXYZ& loc) +static void GetRideQueueEnd(TileCoordsXYZ& loc) { TileCoordsXY queueEnd = { 0, 0 }; TileElement* tileElement = MapGetFirstElementAt(loc); @@ -1810,7 +1808,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc) if (tileElement->GetType() != TileElementType::Entrance) continue; - if (loc.z != tileElement->base_height) + if (loc.z != tileElement->BaseHeight) continue; found = true; @@ -1824,7 +1822,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc) TileElement* lastPathElement = nullptr; TileElement* firstPathElement = nullptr; - int16_t baseZ = tileElement->base_height; + int16_t baseZ = tileElement->BaseHeight; TileCoordsXY nextTile = { loc.x, loc.y }; while (true) @@ -1857,7 +1855,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc) if (tileElement->GetType() != TileElementType::Path) continue; - if (baseZ == tileElement->base_height) + if (baseZ == tileElement->BaseHeight) { if (tileElement->AsPath()->IsSloped()) { @@ -1870,7 +1868,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc) break; } - if (baseZ - 2 == tileElement->base_height) + if (baseZ - 2 == tileElement->BaseHeight) { if (!tileElement->AsPath()->IsSloped()) break; @@ -1926,7 +1924,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc) loc.x = queueEnd.x; loc.y = queueEnd.y; - loc.z = tileElement->base_height; + loc.z = tileElement->BaseHeight; } /* @@ -1941,7 +1939,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc) * to the station. Consequently a truly random station selection here is not * appropriate. */ -static StationIndex guest_pathfinding_select_random_station( +static StationIndex GuestPathfindingSelectRandomStation( const Guest& guest, int32_t numEntranceStations, BitSet& entranceStations) { int32_t select = guest.GuestNumRides % numEntranceStations; @@ -1977,13 +1975,13 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) PathfindLoggingEnable(peep); if (_pathFindDebug) { - log_info("Starting CalculateNextDestination for %s", _pathFindDebugPeepName); + LOG_INFO("Starting CalculateNextDestination for %s", _pathFindDebugPeepName); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (peep.GetNextIsSurface()) { - return guest_surface_path_finding(peep); + return GuestSurfacePathFinding(peep); } TileCoordsXYZ loc{ peep.NextLoc }; @@ -1995,11 +1993,11 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) } _peepPathFindIsStaff = false; - uint8_t edges = path_get_permitted_edges(pathElement); + uint8_t edges = PathGetPermittedEdges(pathElement); if (edges == 0) { - return guest_surface_path_finding(peep); + return GuestSurfacePathFinding(peep); } if (!peep.OutsideOfPark && peep.HeadingForRideOrParkExit()) @@ -2015,7 +2013,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) /* If there is a wide path in that direction, remove that edge and try another */ - if (footpath_element_next_in_direction(loc, pathElement, chosenDirection) == PATH_SEARCH_WIDE) + if (FootpathElementNextInDirection(loc, pathElement, chosenDirection) == PATH_SEARCH_WIDE) { adjustedEdges &= ~(1 << chosenDirection); } @@ -2040,32 +2038,32 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) edges &= ~(1 << direction); } - direction = bitscanforward(edges); + direction = UtilBitScanForward(edges); // IF only one edge to choose from if ((edges & ~(1 << direction)) == 0) { #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info( + LOG_INFO( "Completed CalculateNextDestination for %s - taking only direction available: %d.", _pathFindDebugPeepName, direction); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - return peep_move_one_tile(direction, peep); + return PeepMoveOneTile(direction, peep); } // Peep still has multiple edges to choose from. // Peep is outside the park. - // loc_694F19: + // Loc694F19: if (peep.OutsideOfPark) { #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info("Completed CalculateNextDestination for %s - peep is outside the park.", _pathFindDebugPeepName); + LOG_INFO("Completed CalculateNextDestination for %s - peep is outside the park.", _pathFindDebugPeepName); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 @@ -2076,7 +2074,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) case PeepState::LeavingPark: return GuestPathFindPeepSpawn(peep, edges); default: - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); } } @@ -2086,7 +2084,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) * In principle, peeps with food are not paying as much attention to * where they are going and are consequently more like to walk up * dead end paths, paths to ride exits, etc. */ - if (!peep.HasFoodOrDrink() && (scenario_rand() & 0xFFFF) >= 2184) + if (!peep.HasFoodOrDrink() && (ScenarioRand() & 0xFFFF) >= 2184) { uint8_t adjustedEdges = edges; for (Direction chosenDirection : ALL_DIRECTIONS) @@ -2096,7 +2094,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) continue; RideId rideIndex = RideId::GetNull(); - auto pathSearchResult = footpath_element_destination_in_direction(loc, pathElement, chosenDirection, &rideIndex); + auto pathSearchResult = FootpathElementDestinationInDirection(loc, pathElement, chosenDirection, &rideIndex); switch (pathSearchResult) { case PATH_SEARCH_DEAD_END: @@ -2116,14 +2114,14 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) if (peep.HasItem(ShopItem::Map)) { // If at least 2 directions consult map - if (bitcount(edges) >= 2) + if (BitCount(edges) >= 2) { uint16_t probability = 1638; if (peep.HeadingForRideOrParkExit()) { probability = 9362; } - if ((scenario_rand() & 0xFFFF) < probability) + if ((ScenarioRand() & 0xFFFF) < probability) { peep.ReadMap(); } @@ -2135,7 +2133,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info("Completed CalculateNextDestination for %s - peep is leaving the park.", _pathFindDebugPeepName); + LOG_INFO("Completed CalculateNextDestination for %s - peep is leaving the park.", _pathFindDebugPeepName); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 @@ -2147,28 +2145,28 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info("Completed CalculateNextDestination for %s - peep is aimless.", _pathFindDebugPeepName); + LOG_INFO("Completed CalculateNextDestination for %s - peep is aimless.", _pathFindDebugPeepName); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); } // Peep is heading for a ride. RideId rideIndex = peep.GuestHeadingToRideId; - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || ride->status != RideStatus::Open) { #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info( + LOG_INFO( "Completed CalculateNextDestination for %s - peep is heading to closed ride == aimless.", _pathFindDebugPeepName); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); } // The ride is open. @@ -2210,7 +2208,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) if (numEntranceStations > 1 && (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { - closestStationNum = guest_pathfinding_select_random_station(peep, numEntranceStations, entranceStations); + closestStationNum = GuestPathfindingSelectRandomStation(peep, numEntranceStations, entranceStations); } if (numEntranceStations == 0) @@ -2230,7 +2228,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) loc.z = entranceXYZD.z; } - get_ride_queue_end(loc); + GetRideQueueEnd(loc); gPeepPathFindGoalPosition = loc; gPeepPathFindIgnoreForeignQueues = true; @@ -2250,22 +2248,22 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep) #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info( + LOG_INFO( "Completed CalculateNextDestination for %s - failed to choose a direction == aimless.", _pathFindDebugPeepName); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - return guest_path_find_aimless(peep, edges); + return GuestPathfindAimless(peep, edges); } #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info("Completed CalculateNextDestination for %s - direction chosen: %d.", _pathFindDebugPeepName, direction); + LOG_INFO("Completed CalculateNextDestination for %s - direction chosen: %d.", _pathFindDebugPeepName, direction); } PathfindLoggingDisable(); #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 - return peep_move_one_tile(direction, peep); + return PeepMoveOneTile(direction, peep); } bool GuestPathfinding::IsValidPathZAndDirection(TileElement* tileElement, int32_t currentZ, int32_t currentDirection) @@ -2275,7 +2273,7 @@ bool GuestPathfinding::IsValidPathZAndDirection(TileElement* tileElement, int32_ int32_t slopeDirection = tileElement->AsPath()->GetSlopeDirection(); if (slopeDirection == currentDirection) { - if (currentZ != tileElement->base_height) + if (currentZ != tileElement->BaseHeight) return false; } else @@ -2283,13 +2281,13 @@ bool GuestPathfinding::IsValidPathZAndDirection(TileElement* tileElement, int32_ slopeDirection = DirectionReverse(slopeDirection); if (slopeDirection != currentDirection) return false; - if (currentZ != tileElement->base_height + 2) + if (currentZ != tileElement->BaseHeight + 2) return false; } } else { - if (currentZ != tileElement->base_height) + if (currentZ != tileElement->BaseHeight) return false; } return true; @@ -2304,7 +2302,7 @@ void Peep::ResetPathfindGoal() #if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 if (_pathFindDebug) { - log_info("Resetting PathfindGoal for %s", _pathFindDebugPeepName); + LOG_INFO("Resetting PathfindGoal for %s", _pathFindDebugPeepName); } #endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1 @@ -2317,7 +2315,7 @@ void PathfindLoggingEnable([[maybe_unused]] Peep& peep) { # if defined(PATHFIND_DEBUG) && PATHFIND_DEBUG /* Determine if the pathfinding debugging is wanted for this peep. */ - format_string(gPathFindDebugPeepName, sizeof(gPathFindDebugPeepName), peep.name_string_idx, &(peep.Id)); + FormatStringLegacy(gPathFindDebugPeepName, sizeof(gPathFindDebugPeepName), peep.name_string_idx, &(peep.PeepId)); /* For guests, use the existing PEEP_FLAGS_TRACKING flag to * determine for which guest(s) the pathfinding debugging will diff --git a/src/openrct2/peep/GuestPathfinding.h b/src/openrct2/peep/GuestPathfinding.h index 8b0ca934d4..aec39a4d94 100644 --- a/src/openrct2/peep/GuestPathfinding.h +++ b/src/openrct2/peep/GuestPathfinding.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/peep/PeepData.cpp b/src/openrct2/peep/PeepData.cpp index 1d404e0e9e..8f5ba039cd 100644 --- a/src/openrct2/peep/PeepData.cpp +++ b/src/openrct2/peep/PeepData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -1837,7 +1837,7 @@ static constexpr const uint8_t PeepSpriteImage_Sandwich_35_sequence[] = { 0, 1, static constexpr const uint8_t PeepSpriteImage_Sandwich_36_sequence[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11, 12, 11, 12, 11, 12, 11, 12, 11, 11, 11, 11, 11, 13, 14, 15 }; -static constexpr const rct_peep_animation PeepSpriteImage_Normal[] = { +static constexpr const PeepAnimation PeepSpriteImage_Normal[] = { { 6409, std::size(PeepSpriteImage_Normal_00_sequence), PeepSpriteImage_Normal_00_sequence }, { 6585, std::size(PeepSpriteImage_Normal_01_sequence), PeepSpriteImage_Normal_01_sequence }, { 6621, std::size(PeepSpriteImage_Normal_02_sequence), PeepSpriteImage_Normal_02_sequence }, @@ -1877,7 +1877,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Normal[] = { { 7181, std::size(PeepSpriteImage_Normal_36_sequence), PeepSpriteImage_Normal_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Handyman[] = { +static constexpr const PeepAnimation PeepSpriteImage_Handyman[] = { { 11261, std::size(PeepSpriteImage_Handyman_00_sequence), PeepSpriteImage_Handyman_00_sequence }, { 6585, std::size(PeepSpriteImage_Handyman_01_sequence), PeepSpriteImage_Handyman_01_sequence }, { 11285, std::size(PeepSpriteImage_Handyman_02_sequence), PeepSpriteImage_Handyman_02_sequence }, @@ -1917,7 +1917,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Handyman[] = { { 7181, std::size(PeepSpriteImage_Handyman_36_sequence), PeepSpriteImage_Handyman_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Mechanic[] = { +static constexpr const PeepAnimation PeepSpriteImage_Mechanic[] = { { 11441, std::size(PeepSpriteImage_Mechanic_00_sequence), PeepSpriteImage_Mechanic_00_sequence }, { 6585, std::size(PeepSpriteImage_Mechanic_01_sequence), PeepSpriteImage_Mechanic_01_sequence }, { 11465, std::size(PeepSpriteImage_Mechanic_02_sequence), PeepSpriteImage_Mechanic_02_sequence }, @@ -1957,7 +1957,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Mechanic[] = { { 7181, std::size(PeepSpriteImage_Mechanic_36_sequence), PeepSpriteImage_Mechanic_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Security[] = { +static constexpr const PeepAnimation PeepSpriteImage_Security[] = { { 11881, std::size(PeepSpriteImage_Security_00_sequence), PeepSpriteImage_Security_00_sequence }, { 6585, std::size(PeepSpriteImage_Security_01_sequence), PeepSpriteImage_Security_01_sequence }, { 11905, std::size(PeepSpriteImage_Security_02_sequence), PeepSpriteImage_Security_02_sequence }, @@ -1997,7 +1997,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Security[] = { { 7181, std::size(PeepSpriteImage_Security_36_sequence), PeepSpriteImage_Security_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerPanda[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerPanda[] = { { 11973, std::size(PeepSpriteImage_EntertainerPanda_00_sequence), PeepSpriteImage_EntertainerPanda_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerPanda_01_sequence), PeepSpriteImage_EntertainerPanda_01_sequence }, { 11997, std::size(PeepSpriteImage_EntertainerPanda_02_sequence), PeepSpriteImage_EntertainerPanda_02_sequence }, @@ -2037,7 +2037,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerPanda[] = { { 7181, std::size(PeepSpriteImage_EntertainerPanda_36_sequence), PeepSpriteImage_EntertainerPanda_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerTiger[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerTiger[] = { { 12129, std::size(PeepSpriteImage_EntertainerTiger_00_sequence), PeepSpriteImage_EntertainerTiger_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerTiger_01_sequence), PeepSpriteImage_EntertainerTiger_01_sequence }, { 12153, std::size(PeepSpriteImage_EntertainerTiger_02_sequence), PeepSpriteImage_EntertainerTiger_02_sequence }, @@ -2077,7 +2077,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerTiger[] = { { 7181, std::size(PeepSpriteImage_EntertainerTiger_36_sequence), PeepSpriteImage_EntertainerTiger_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerElephant[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerElephant[] = { { 12325, std::size(PeepSpriteImage_EntertainerElephant_00_sequence), PeepSpriteImage_EntertainerElephant_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerElephant_01_sequence), PeepSpriteImage_EntertainerElephant_01_sequence }, { 12349, std::size(PeepSpriteImage_EntertainerElephant_02_sequence), PeepSpriteImage_EntertainerElephant_02_sequence }, @@ -2117,7 +2117,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerElephant[] { 7181, std::size(PeepSpriteImage_EntertainerElephant_36_sequence), PeepSpriteImage_EntertainerElephant_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerRoman[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerRoman[] = { { 13897, std::size(PeepSpriteImage_EntertainerRoman_00_sequence), PeepSpriteImage_EntertainerRoman_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerRoman_01_sequence), PeepSpriteImage_EntertainerRoman_01_sequence }, { 13921, std::size(PeepSpriteImage_EntertainerRoman_02_sequence), PeepSpriteImage_EntertainerRoman_02_sequence }, @@ -2157,7 +2157,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerRoman[] = { { 7181, std::size(PeepSpriteImage_EntertainerRoman_36_sequence), PeepSpriteImage_EntertainerRoman_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerGorilla[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerGorilla[] = { { 12549, std::size(PeepSpriteImage_EntertainerGorilla_00_sequence), PeepSpriteImage_EntertainerGorilla_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerGorilla_01_sequence), PeepSpriteImage_EntertainerGorilla_01_sequence }, { 12545, std::size(PeepSpriteImage_EntertainerGorilla_02_sequence), PeepSpriteImage_EntertainerGorilla_02_sequence }, @@ -2197,7 +2197,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerGorilla[] = { 7181, std::size(PeepSpriteImage_EntertainerGorilla_36_sequence), PeepSpriteImage_EntertainerGorilla_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerSnowman[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerSnowman[] = { { 12681, std::size(PeepSpriteImage_EntertainerSnowman_00_sequence), PeepSpriteImage_EntertainerSnowman_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerSnowman_01_sequence), PeepSpriteImage_EntertainerSnowman_01_sequence }, { 12677, std::size(PeepSpriteImage_EntertainerSnowman_02_sequence), PeepSpriteImage_EntertainerSnowman_02_sequence }, @@ -2237,7 +2237,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerSnowman[] = { 7181, std::size(PeepSpriteImage_EntertainerSnowman_36_sequence), PeepSpriteImage_EntertainerSnowman_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerKnight[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerKnight[] = { { 12897, std::size(PeepSpriteImage_EntertainerKnight_00_sequence), PeepSpriteImage_EntertainerKnight_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerKnight_01_sequence), PeepSpriteImage_EntertainerKnight_01_sequence }, { 12893, std::size(PeepSpriteImage_EntertainerKnight_02_sequence), PeepSpriteImage_EntertainerKnight_02_sequence }, @@ -2277,7 +2277,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerKnight[] = { 7181, std::size(PeepSpriteImage_EntertainerKnight_36_sequence), PeepSpriteImage_EntertainerKnight_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerAstronaut[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerAstronaut[] = { { 13769, std::size(PeepSpriteImage_EntertainerAstronaut_00_sequence), PeepSpriteImage_EntertainerAstronaut_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerAstronaut_01_sequence), PeepSpriteImage_EntertainerAstronaut_01_sequence }, { 13765, std::size(PeepSpriteImage_EntertainerAstronaut_02_sequence), PeepSpriteImage_EntertainerAstronaut_02_sequence }, @@ -2317,7 +2317,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerAstronaut[] { 7181, std::size(PeepSpriteImage_EntertainerAstronaut_36_sequence), PeepSpriteImage_EntertainerAstronaut_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerBandit[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerBandit[] = { { 13109, std::size(PeepSpriteImage_EntertainerBandit_00_sequence), PeepSpriteImage_EntertainerBandit_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerBandit_01_sequence), PeepSpriteImage_EntertainerBandit_01_sequence }, { 13105, std::size(PeepSpriteImage_EntertainerBandit_02_sequence), PeepSpriteImage_EntertainerBandit_02_sequence }, @@ -2357,7 +2357,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerBandit[] = { 7181, std::size(PeepSpriteImage_EntertainerBandit_36_sequence), PeepSpriteImage_EntertainerBandit_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerSheriff[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerSheriff[] = { { 13613, std::size(PeepSpriteImage_EntertainerSheriff_00_sequence), PeepSpriteImage_EntertainerSheriff_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerSheriff_01_sequence), PeepSpriteImage_EntertainerSheriff_01_sequence }, { 13609, std::size(PeepSpriteImage_EntertainerSheriff_02_sequence), PeepSpriteImage_EntertainerSheriff_02_sequence }, @@ -2397,7 +2397,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerSheriff[] = { 7181, std::size(PeepSpriteImage_EntertainerSheriff_36_sequence), PeepSpriteImage_EntertainerSheriff_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_EntertainerPirate[] = { +static constexpr const PeepAnimation PeepSpriteImage_EntertainerPirate[] = { { 13381, std::size(PeepSpriteImage_EntertainerPirate_00_sequence), PeepSpriteImage_EntertainerPirate_00_sequence }, { 6585, std::size(PeepSpriteImage_EntertainerPirate_01_sequence), PeepSpriteImage_EntertainerPirate_01_sequence }, { 13377, std::size(PeepSpriteImage_EntertainerPirate_02_sequence), PeepSpriteImage_EntertainerPirate_02_sequence }, @@ -2437,7 +2437,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_EntertainerPirate[] = { 7181, std::size(PeepSpriteImage_EntertainerPirate_36_sequence), PeepSpriteImage_EntertainerPirate_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_IceCream[] = { +static constexpr const PeepAnimation PeepSpriteImage_IceCream[] = { { 7505, std::size(PeepSpriteImage_IceCream_00_sequence), PeepSpriteImage_IceCream_00_sequence }, { 6585, std::size(PeepSpriteImage_IceCream_01_sequence), PeepSpriteImage_IceCream_01_sequence }, { 7501, std::size(PeepSpriteImage_IceCream_02_sequence), PeepSpriteImage_IceCream_02_sequence }, @@ -2477,7 +2477,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_IceCream[] = { { 7181, std::size(PeepSpriteImage_IceCream_36_sequence), PeepSpriteImage_IceCream_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Chips[] = { +static constexpr const PeepAnimation PeepSpriteImage_Chips[] = { { 7609, std::size(PeepSpriteImage_Chips_00_sequence), PeepSpriteImage_Chips_00_sequence }, { 6585, std::size(PeepSpriteImage_Chips_01_sequence), PeepSpriteImage_Chips_01_sequence }, { 7605, std::size(PeepSpriteImage_Chips_02_sequence), PeepSpriteImage_Chips_02_sequence }, @@ -2517,7 +2517,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Chips[] = { { 7181, std::size(PeepSpriteImage_Chips_36_sequence), PeepSpriteImage_Chips_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Burger[] = { +static constexpr const PeepAnimation PeepSpriteImage_Burger[] = { { 8385, std::size(PeepSpriteImage_Burger_00_sequence), PeepSpriteImage_Burger_00_sequence }, { 6585, std::size(PeepSpriteImage_Burger_01_sequence), PeepSpriteImage_Burger_01_sequence }, { 8381, std::size(PeepSpriteImage_Burger_02_sequence), PeepSpriteImage_Burger_02_sequence }, @@ -2557,7 +2557,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Burger[] = { { 7181, std::size(PeepSpriteImage_Burger_36_sequence), PeepSpriteImage_Burger_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Drink[] = { +static constexpr const PeepAnimation PeepSpriteImage_Drink[] = { { 8713, std::size(PeepSpriteImage_Drink_00_sequence), PeepSpriteImage_Drink_00_sequence }, { 6585, std::size(PeepSpriteImage_Drink_01_sequence), PeepSpriteImage_Drink_01_sequence }, { 8709, std::size(PeepSpriteImage_Drink_02_sequence), PeepSpriteImage_Drink_02_sequence }, @@ -2597,7 +2597,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Drink[] = { { 7181, std::size(PeepSpriteImage_Drink_36_sequence), PeepSpriteImage_Drink_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Balloon[] = { +static constexpr const PeepAnimation PeepSpriteImage_Balloon[] = { { 10785, std::size(PeepSpriteImage_Balloon_00_sequence), PeepSpriteImage_Balloon_00_sequence }, { 6585, std::size(PeepSpriteImage_Balloon_01_sequence), PeepSpriteImage_Balloon_01_sequence }, { 10781, std::size(PeepSpriteImage_Balloon_02_sequence), PeepSpriteImage_Balloon_02_sequence }, @@ -2637,7 +2637,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Balloon[] = { { 7181, std::size(PeepSpriteImage_Balloon_36_sequence), PeepSpriteImage_Balloon_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Candyfloss[] = { +static constexpr const PeepAnimation PeepSpriteImage_Candyfloss[] = { { 10849, std::size(PeepSpriteImage_Candyfloss_00_sequence), PeepSpriteImage_Candyfloss_00_sequence }, { 6585, std::size(PeepSpriteImage_Candyfloss_01_sequence), PeepSpriteImage_Candyfloss_01_sequence }, { 10845, std::size(PeepSpriteImage_Candyfloss_02_sequence), PeepSpriteImage_Candyfloss_02_sequence }, @@ -2677,7 +2677,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Candyfloss[] = { { 7181, std::size(PeepSpriteImage_Candyfloss_36_sequence), PeepSpriteImage_Candyfloss_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Umbrella[] = { +static constexpr const PeepAnimation PeepSpriteImage_Umbrella[] = { { 11197, std::size(PeepSpriteImage_Umbrella_00_sequence), PeepSpriteImage_Umbrella_00_sequence }, { 6585, std::size(PeepSpriteImage_Umbrella_01_sequence), PeepSpriteImage_Umbrella_01_sequence }, { 11221, std::size(PeepSpriteImage_Umbrella_02_sequence), PeepSpriteImage_Umbrella_02_sequence }, @@ -2717,7 +2717,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Umbrella[] = { { 7181, std::size(PeepSpriteImage_Umbrella_36_sequence), PeepSpriteImage_Umbrella_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Pizza[] = { +static constexpr const PeepAnimation PeepSpriteImage_Pizza[] = { { 7785, std::size(PeepSpriteImage_Pizza_00_sequence), PeepSpriteImage_Pizza_00_sequence }, { 6585, std::size(PeepSpriteImage_Pizza_01_sequence), PeepSpriteImage_Pizza_01_sequence }, { 7781, std::size(PeepSpriteImage_Pizza_02_sequence), PeepSpriteImage_Pizza_02_sequence }, @@ -2757,7 +2757,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Pizza[] = { { 7181, std::size(PeepSpriteImage_Pizza_36_sequence), PeepSpriteImage_Pizza_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_SecurityAlt[] = { +static constexpr const PeepAnimation PeepSpriteImage_SecurityAlt[] = { { 11949, std::size(PeepSpriteImage_SecurityAlt_00_sequence),PeepSpriteImage_SecurityAlt_00_sequence }, { 6585, std::size(PeepSpriteImage_SecurityAlt_01_sequence),PeepSpriteImage_SecurityAlt_01_sequence }, { 11905, std::size(PeepSpriteImage_SecurityAlt_02_sequence),PeepSpriteImage_SecurityAlt_02_sequence }, @@ -2797,7 +2797,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_SecurityAlt[] = { { 7181, std::size(PeepSpriteImage_SecurityAlt_36_sequence),PeepSpriteImage_SecurityAlt_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Popcorn[] = { +static constexpr const PeepAnimation PeepSpriteImage_Popcorn[] = { { 11025, std::size(PeepSpriteImage_Popcorn_00_sequence), PeepSpriteImage_Popcorn_00_sequence }, { 6585, std::size(PeepSpriteImage_Popcorn_01_sequence), PeepSpriteImage_Popcorn_01_sequence }, { 11021, std::size(PeepSpriteImage_Popcorn_02_sequence), PeepSpriteImage_Popcorn_02_sequence }, @@ -2837,7 +2837,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Popcorn[] = { { 7181, std::size(PeepSpriteImage_Popcorn_36_sequence), PeepSpriteImage_Popcorn_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_ArmsCrossed[] = { +static constexpr const PeepAnimation PeepSpriteImage_ArmsCrossed[] = { { 6433, std::size(PeepSpriteImage_ArmsCrossed_00_sequence), PeepSpriteImage_ArmsCrossed_00_sequence }, { 6585, std::size(PeepSpriteImage_ArmsCrossed_01_sequence), PeepSpriteImage_ArmsCrossed_01_sequence }, { 6621, std::size(PeepSpriteImage_ArmsCrossed_02_sequence), PeepSpriteImage_ArmsCrossed_02_sequence }, @@ -2877,7 +2877,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_ArmsCrossed[] = { { 7181, std::size(PeepSpriteImage_ArmsCrossed_36_sequence), PeepSpriteImage_ArmsCrossed_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_HeadDown[] = { +static constexpr const PeepAnimation PeepSpriteImage_HeadDown[] = { { 6457, std::size(PeepSpriteImage_HeadDown_00_sequence), PeepSpriteImage_HeadDown_00_sequence }, { 6585, std::size(PeepSpriteImage_HeadDown_01_sequence), PeepSpriteImage_HeadDown_01_sequence }, { 6621, std::size(PeepSpriteImage_HeadDown_02_sequence), PeepSpriteImage_HeadDown_02_sequence }, @@ -2917,7 +2917,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_HeadDown[] = { { 7181, std::size(PeepSpriteImage_HeadDown_36_sequence), PeepSpriteImage_HeadDown_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Nauseous[] = { +static constexpr const PeepAnimation PeepSpriteImage_Nauseous[] = { { 6481, std::size(PeepSpriteImage_Nauseous_00_sequence), PeepSpriteImage_Nauseous_00_sequence }, { 6585, std::size(PeepSpriteImage_Nauseous_01_sequence), PeepSpriteImage_Nauseous_01_sequence }, { 6621, std::size(PeepSpriteImage_Nauseous_02_sequence), PeepSpriteImage_Nauseous_02_sequence }, @@ -2957,7 +2957,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Nauseous[] = { { 7181, std::size(PeepSpriteImage_Nauseous_36_sequence), PeepSpriteImage_Nauseous_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_VeryNauseous[] = { +static constexpr const PeepAnimation PeepSpriteImage_VeryNauseous[] = { { 6505, std::size(PeepSpriteImage_VeryNauseous_00_sequence), PeepSpriteImage_VeryNauseous_00_sequence }, { 6585, std::size(PeepSpriteImage_VeryNauseous_01_sequence), PeepSpriteImage_VeryNauseous_01_sequence }, { 6529, std::size(PeepSpriteImage_VeryNauseous_02_sequence), PeepSpriteImage_VeryNauseous_02_sequence }, @@ -2997,7 +2997,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_VeryNauseous[] = { { 7181, std::size(PeepSpriteImage_VeryNauseous_36_sequence), PeepSpriteImage_VeryNauseous_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_RequireToilet[] = { +static constexpr const PeepAnimation PeepSpriteImage_RequireToilet[] = { { 6537, std::size(PeepSpriteImage_RequireToilet_00_sequence), PeepSpriteImage_RequireToilet_00_sequence }, { 6585, std::size(PeepSpriteImage_RequireToilet_01_sequence), PeepSpriteImage_RequireToilet_01_sequence }, { 6621, std::size(PeepSpriteImage_RequireToilet_02_sequence), PeepSpriteImage_RequireToilet_02_sequence }, @@ -3037,7 +3037,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_RequireToilet[] = { { 7181, std::size(PeepSpriteImage_RequireToilet_36_sequence), PeepSpriteImage_RequireToilet_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Hat[] = { +static constexpr const PeepAnimation PeepSpriteImage_Hat[] = { { 10721, std::size(PeepSpriteImage_Hat_00_sequence), PeepSpriteImage_Hat_00_sequence }, { 6585, std::size(PeepSpriteImage_Hat_01_sequence), PeepSpriteImage_Hat_01_sequence }, { 10717, std::size(PeepSpriteImage_Hat_02_sequence), PeepSpriteImage_Hat_02_sequence }, @@ -3077,7 +3077,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Hat[] = { { 7181, std::size(PeepSpriteImage_Hat_36_sequence), PeepSpriteImage_Hat_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_HotDog[] = { +static constexpr const PeepAnimation PeepSpriteImage_HotDog[] = { { 7889, std::size(PeepSpriteImage_HotDog_00_sequence), PeepSpriteImage_HotDog_00_sequence }, { 6585, std::size(PeepSpriteImage_HotDog_01_sequence), PeepSpriteImage_HotDog_01_sequence }, { 7885, std::size(PeepSpriteImage_HotDog_02_sequence), PeepSpriteImage_HotDog_02_sequence }, @@ -3117,7 +3117,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_HotDog[] = { { 7181, std::size(PeepSpriteImage_HotDog_36_sequence), PeepSpriteImage_HotDog_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Tentacle[] = { +static constexpr const PeepAnimation PeepSpriteImage_Tentacle[] = { { 8065, std::size(PeepSpriteImage_Tentacle_00_sequence), PeepSpriteImage_Tentacle_00_sequence }, { 6585, std::size(PeepSpriteImage_Tentacle_01_sequence), PeepSpriteImage_Tentacle_01_sequence }, { 8061, std::size(PeepSpriteImage_Tentacle_02_sequence), PeepSpriteImage_Tentacle_02_sequence }, @@ -3157,7 +3157,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Tentacle[] = { { 7181, std::size(PeepSpriteImage_Tentacle_36_sequence), PeepSpriteImage_Tentacle_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_ToffeeApple[] = { +static constexpr const PeepAnimation PeepSpriteImage_ToffeeApple[] = { { 7401, std::size(PeepSpriteImage_ToffeeApple_00_sequence), PeepSpriteImage_ToffeeApple_00_sequence }, { 6585, std::size(PeepSpriteImage_ToffeeApple_01_sequence), PeepSpriteImage_ToffeeApple_01_sequence }, { 7397, std::size(PeepSpriteImage_ToffeeApple_02_sequence), PeepSpriteImage_ToffeeApple_02_sequence }, @@ -3197,7 +3197,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_ToffeeApple[] = { { 7181, std::size(PeepSpriteImage_ToffeeApple_36_sequence), PeepSpriteImage_ToffeeApple_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Donut[] = { +static constexpr const PeepAnimation PeepSpriteImage_Donut[] = { { 8561, std::size(PeepSpriteImage_Donut_00_sequence), PeepSpriteImage_Donut_00_sequence }, { 6585, std::size(PeepSpriteImage_Donut_01_sequence), PeepSpriteImage_Donut_01_sequence }, { 8557, std::size(PeepSpriteImage_Donut_02_sequence), PeepSpriteImage_Donut_02_sequence }, @@ -3237,7 +3237,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Donut[] = { { 7181, std::size(PeepSpriteImage_Donut_36_sequence), PeepSpriteImage_Donut_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Coffee[] = { +static constexpr const PeepAnimation PeepSpriteImage_Coffee[] = { { 8885, std::size(PeepSpriteImage_Coffee_00_sequence), PeepSpriteImage_Coffee_00_sequence }, { 6585, std::size(PeepSpriteImage_Coffee_01_sequence), PeepSpriteImage_Coffee_01_sequence }, { 8981, std::size(PeepSpriteImage_Coffee_02_sequence), PeepSpriteImage_Coffee_02_sequence }, @@ -3277,7 +3277,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Coffee[] = { { 7181, std::size(PeepSpriteImage_Coffee_36_sequence), PeepSpriteImage_Coffee_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Chicken[] = { +static constexpr const PeepAnimation PeepSpriteImage_Chicken[] = { { 9005, std::size(PeepSpriteImage_Chicken_00_sequence), PeepSpriteImage_Chicken_00_sequence }, { 6585, std::size(PeepSpriteImage_Chicken_01_sequence), PeepSpriteImage_Chicken_01_sequence }, { 9125, std::size(PeepSpriteImage_Chicken_02_sequence), PeepSpriteImage_Chicken_02_sequence }, @@ -3317,7 +3317,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Chicken[] = { { 7181, std::size(PeepSpriteImage_Chicken_36_sequence), PeepSpriteImage_Chicken_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Lemonade[] = { +static constexpr const PeepAnimation PeepSpriteImage_Lemonade[] = { { 9173, std::size(PeepSpriteImage_Lemonade_00_sequence), PeepSpriteImage_Lemonade_00_sequence }, { 6585, std::size(PeepSpriteImage_Lemonade_01_sequence), PeepSpriteImage_Lemonade_01_sequence }, { 9293, std::size(PeepSpriteImage_Lemonade_02_sequence), PeepSpriteImage_Lemonade_02_sequence }, @@ -3357,7 +3357,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Lemonade[] = { { 7181, std::size(PeepSpriteImage_Lemonade_36_sequence), PeepSpriteImage_Lemonade_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Watching[] = { +static constexpr const PeepAnimation PeepSpriteImage_Watching[] = { { 6409, std::size(PeepSpriteImage_Watching_00_sequence), PeepSpriteImage_Watching_00_sequence }, { 6585, std::size(PeepSpriteImage_Watching_01_sequence), PeepSpriteImage_Watching_01_sequence }, { 7245, std::size(PeepSpriteImage_Watching_02_sequence), PeepSpriteImage_Watching_02_sequence }, @@ -3397,7 +3397,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Watching[] = { { 7181, std::size(PeepSpriteImage_Watching_36_sequence), PeepSpriteImage_Watching_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Pretzel[] = { +static constexpr const PeepAnimation PeepSpriteImage_Pretzel[] = { { 9341, std::size(PeepSpriteImage_Pretzel_00_sequence), PeepSpriteImage_Pretzel_00_sequence }, { 6585, std::size(PeepSpriteImage_Pretzel_01_sequence), PeepSpriteImage_Pretzel_01_sequence }, { 9461, std::size(PeepSpriteImage_Pretzel_02_sequence), PeepSpriteImage_Pretzel_02_sequence }, @@ -3437,7 +3437,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Pretzel[] = { { 7181, std::size(PeepSpriteImage_Pretzel_36_sequence), PeepSpriteImage_Pretzel_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Sunglasses[] = { +static constexpr const PeepAnimation PeepSpriteImage_Sunglasses[] = { { 10685, std::size(PeepSpriteImage_Sunglasses_00_sequence), PeepSpriteImage_Sunglasses_00_sequence }, { 6585, std::size(PeepSpriteImage_Sunglasses_01_sequence), PeepSpriteImage_Sunglasses_01_sequence }, { 10713, std::size(PeepSpriteImage_Sunglasses_02_sequence), PeepSpriteImage_Sunglasses_02_sequence }, @@ -3477,7 +3477,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Sunglasses[] = { { 7181, std::size(PeepSpriteImage_Sunglasses_36_sequence), PeepSpriteImage_Sunglasses_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_SuJongkwa[] = { +static constexpr const PeepAnimation PeepSpriteImage_SuJongkwa[] = { { 9509, std::size(PeepSpriteImage_SuJongkwa_00_sequence), PeepSpriteImage_SuJongkwa_00_sequence }, { 6585, std::size(PeepSpriteImage_SuJongkwa_01_sequence), PeepSpriteImage_SuJongkwa_01_sequence }, { 9629, std::size(PeepSpriteImage_SuJongkwa_02_sequence), PeepSpriteImage_SuJongkwa_02_sequence }, @@ -3517,7 +3517,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_SuJongkwa[] = { { 7181, std::size(PeepSpriteImage_SuJongkwa_36_sequence), PeepSpriteImage_SuJongkwa_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Juice[] = { +static constexpr const PeepAnimation PeepSpriteImage_Juice[] = { { 9677, std::size(PeepSpriteImage_Juice_00_sequence), PeepSpriteImage_Juice_00_sequence }, { 6585, std::size(PeepSpriteImage_Juice_01_sequence), PeepSpriteImage_Juice_01_sequence }, { 9797, std::size(PeepSpriteImage_Juice_02_sequence), PeepSpriteImage_Juice_02_sequence }, @@ -3557,7 +3557,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Juice[] = { { 7181, std::size(PeepSpriteImage_Juice_36_sequence), PeepSpriteImage_Juice_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_FunnelCake[] = { +static constexpr const PeepAnimation PeepSpriteImage_FunnelCake[] = { { 9845, std::size(PeepSpriteImage_FunnelCake_00_sequence), PeepSpriteImage_FunnelCake_00_sequence }, { 6585, std::size(PeepSpriteImage_FunnelCake_01_sequence), PeepSpriteImage_FunnelCake_01_sequence }, { 9965, std::size(PeepSpriteImage_FunnelCake_02_sequence), PeepSpriteImage_FunnelCake_02_sequence }, @@ -3597,7 +3597,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_FunnelCake[] = { { 7181, std::size(PeepSpriteImage_FunnelCake_36_sequence), PeepSpriteImage_FunnelCake_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Noodles[] = { +static constexpr const PeepAnimation PeepSpriteImage_Noodles[] = { { 10013, std::size(PeepSpriteImage_Noodles_00_sequence), PeepSpriteImage_Noodles_00_sequence }, { 6585, std::size(PeepSpriteImage_Noodles_01_sequence), PeepSpriteImage_Noodles_01_sequence }, { 10133, std::size(PeepSpriteImage_Noodles_02_sequence), PeepSpriteImage_Noodles_02_sequence }, @@ -3637,7 +3637,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Noodles[] = { { 7181, std::size(PeepSpriteImage_Noodles_36_sequence), PeepSpriteImage_Noodles_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Sausage[] = { +static constexpr const PeepAnimation PeepSpriteImage_Sausage[] = { { 10181, std::size(PeepSpriteImage_Sausage_00_sequence), PeepSpriteImage_Sausage_00_sequence }, { 6585, std::size(PeepSpriteImage_Sausage_01_sequence), PeepSpriteImage_Sausage_01_sequence }, { 10301, std::size(PeepSpriteImage_Sausage_02_sequence), PeepSpriteImage_Sausage_02_sequence }, @@ -3677,7 +3677,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Sausage[] = { { 7181, std::size(PeepSpriteImage_Sausage_36_sequence), PeepSpriteImage_Sausage_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Soup[] = { +static constexpr const PeepAnimation PeepSpriteImage_Soup[] = { { 10349, std::size(PeepSpriteImage_Soup_00_sequence), PeepSpriteImage_Soup_00_sequence }, { 6585, std::size(PeepSpriteImage_Soup_01_sequence), PeepSpriteImage_Soup_01_sequence }, { 10469, std::size(PeepSpriteImage_Soup_02_sequence), PeepSpriteImage_Soup_02_sequence }, @@ -3717,7 +3717,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Soup[] = { { 7181, std::size(PeepSpriteImage_Soup_36_sequence), PeepSpriteImage_Soup_36_sequence }, }; -static constexpr const rct_peep_animation PeepSpriteImage_Sandwich[] = { +static constexpr const PeepAnimation PeepSpriteImage_Sandwich[] = { { 10517, std::size(PeepSpriteImage_Sandwich_00_sequence), PeepSpriteImage_Sandwich_00_sequence }, { 6585, std::size(PeepSpriteImage_Sandwich_01_sequence), PeepSpriteImage_Sandwich_01_sequence }, { 10637, std::size(PeepSpriteImage_Sandwich_02_sequence), PeepSpriteImage_Sandwich_02_sequence }, @@ -3758,7 +3758,7 @@ static constexpr const rct_peep_animation PeepSpriteImage_Sandwich[] = { }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Normal[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Normal[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -3798,7 +3798,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Normal[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Handyman[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Handyman[] = { { 12, 16, 6 }, { 8, 16, 5 }, { 9, 16, 6 }, @@ -3838,7 +3838,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Handyman[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Mechanic[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Mechanic[] = { { 10, 16, 5 }, { 8, 16, 5 }, { 10, 16, 5 }, @@ -3878,7 +3878,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Mechanic[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Security[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Security[] = { { 8, 18, 5 }, { 8, 16, 5 }, { 8, 17, 5 }, @@ -3918,7 +3918,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Security[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerPanda[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerPanda[] = { { 13, 24, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -3958,7 +3958,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerPanda[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerTiger[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerTiger[] = { { 13, 24, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -3998,7 +3998,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerTiger[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerElephant[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerElephant[] = { { 13, 24, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4038,7 +4038,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerElephant[] { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerRoman[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerRoman[] = { { 13, 24, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4078,7 +4078,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerRoman[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerGorilla[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerGorilla[] = { { 13, 24, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4118,7 +4118,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerGorilla[] = { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerSnowman[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerSnowman[] = { { 13, 24, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4158,7 +4158,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerSnowman[] = { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerKnight[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerKnight[] = { { 16, 32, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4198,7 +4198,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerKnight[] = { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerAstronaut[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerAstronaut[] = { { 16, 32, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4238,7 +4238,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerAstronaut[] { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerBandit[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerBandit[] = { { 16, 32, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4278,7 +4278,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerBandit[] = { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerSheriff[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerSheriff[] = { { 16, 32, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4318,7 +4318,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerSheriff[] = { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerPirate[] = { +static constexpr const SpriteBounds PeepSpriteBounds_EntertainerPirate[] = { { 16, 32, 8 }, { 8, 16, 5 }, { 10, 23, 7 }, @@ -4358,7 +4358,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_EntertainerPirate[] = { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_IceCream[] = { +static constexpr const SpriteBounds PeepSpriteBounds_IceCream[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4398,7 +4398,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_IceCream[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Chips[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Chips[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4438,7 +4438,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Chips[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Burger[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Burger[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4478,7 +4478,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Burger[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Drink[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Drink[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4518,7 +4518,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Drink[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Balloon[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Balloon[] = { { 11, 28, 5 }, { 8, 16, 5 }, { 11, 28, 5 }, @@ -4558,7 +4558,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Balloon[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Candyfloss[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Candyfloss[] = { { 11, 19, 5 }, { 8, 16, 5 }, { 11, 19, 5 }, @@ -4598,7 +4598,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Candyfloss[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Umbrella[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Umbrella[] = { { 14, 21, 5 }, { 8, 16, 5 }, { 14, 21, 5 }, @@ -4638,7 +4638,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Umbrella[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Pizza[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Pizza[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4678,7 +4678,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Pizza[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_SecurityAlt[] = { +static constexpr const SpriteBounds PeepSpriteBounds_SecurityAlt[] = { { 8, 18, 5 }, { 8, 16, 5 }, { 8, 17, 5 }, @@ -4718,7 +4718,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_SecurityAlt[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Popcorn[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Popcorn[] = { { 11, 19, 5 }, { 8, 16, 5 }, { 11, 19, 5 }, @@ -4758,7 +4758,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Popcorn[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Hat[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Hat[] = { { 12, 32, 5 }, { 8, 16, 5 }, { 12, 32, 5 }, @@ -4798,7 +4798,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Hat[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_HotDog[] = { +static constexpr const SpriteBounds PeepSpriteBounds_HotDog[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4838,7 +4838,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_HotDog[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Tentacle[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Tentacle[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4878,7 +4878,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Tentacle[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_ToffeeApple[] = { +static constexpr const SpriteBounds PeepSpriteBounds_ToffeeApple[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4918,7 +4918,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_ToffeeApple[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Donut[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Donut[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4958,7 +4958,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Donut[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Coffee[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Coffee[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -4998,7 +4998,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Coffee[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Chicken[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Chicken[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5038,7 +5038,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Chicken[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Lemonade[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Lemonade[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5078,7 +5078,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Lemonade[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Pretzel[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Pretzel[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5118,7 +5118,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Pretzel[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_SuJongkwa[] = { +static constexpr const SpriteBounds PeepSpriteBounds_SuJongkwa[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5158,7 +5158,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_SuJongkwa[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Juice[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Juice[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5198,7 +5198,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Juice[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_FunnelCake[] = { +static constexpr const SpriteBounds PeepSpriteBounds_FunnelCake[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5238,7 +5238,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_FunnelCake[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Noodles[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Noodles[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5278,7 +5278,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Noodles[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Sausage[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Sausage[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5318,7 +5318,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Sausage[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Soup[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Soup[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5358,7 +5358,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Soup[] = { { 9, 22, 7 }, }; -static constexpr const rct_sprite_bounds PeepSpriteBounds_Sandwich[] = { +static constexpr const SpriteBounds PeepSpriteBounds_Sandwich[] = { { 8, 16, 5 }, { 8, 16, 5 }, { 8, 16, 5 }, @@ -5399,7 +5399,7 @@ static constexpr const rct_sprite_bounds PeepSpriteBounds_Sandwich[] = { }; -constexpr rct_peep_animation_entry g_peep_animation_entries[] = +constexpr PeepAnimationEntry g_peep_animation_entries[] = { { PeepSpriteImage_Normal, PeepSpriteBounds_Normal }, { PeepSpriteImage_Handyman, PeepSpriteBounds_Handyman }, diff --git a/src/openrct2/peep/RideUseSystem.cpp b/src/openrct2/peep/RideUseSystem.cpp index 6259f557cb..4fb6506a65 100644 --- a/src/openrct2/peep/RideUseSystem.cpp +++ b/src/openrct2/peep/RideUseSystem.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/peep/RideUseSystem.h b/src/openrct2/peep/RideUseSystem.h index b28ceff2a2..de13700f27 100644 --- a/src/openrct2/peep/RideUseSystem.h +++ b/src/openrct2/peep/RideUseSystem.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/platform/Crash.cpp b/src/openrct2/platform/Crash.cpp index 70baaae795..4e861251a8 100644 --- a/src/openrct2/platform/Crash.cpp +++ b/src/openrct2/platform/Crash.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -56,7 +56,7 @@ static const wchar_t* _wszCommitSha1Short = WSZ(""); static const wchar_t* _wszArchitecture = WSZ(OPENRCT2_ARCHITECTURE); static std::map _uploadFiles; -# define BACKTRACE_TOKEN L"9d89dffbeb1c81deb554c848513c0fc57a3b91a35271ce44639b6748cf7b76f3" +# define BACKTRACE_TOKEN L"d3de8c689ea81ff21e030f1afeea5e293c0be6bfaae6975cd353c23fe6948322" using namespace OpenRCT2; @@ -138,7 +138,7 @@ static bool OnCrash( FILE* input = _wfopen(dumpFilePath, L"rb"); FILE* dest = _wfopen(dumpFilePathGZIP, L"wb"); - if (util_gzip_compress(input, dest)) + if (UtilGzipCompress(input, dest)) { // TODO: enable upload of gzip-compressed dumps once supported on // backtrace.io (uncomment the line below). For now leave compression @@ -153,7 +153,7 @@ static bool OnCrash( fclose(dest); } - bool with_record = stop_silent_record(); + bool with_record = StopSilentRecord(); // Try to rename the files if (_wrename(dumpFilePath, dumpFilePathNew) == 0) @@ -214,7 +214,7 @@ static bool OnCrash( // Discovering which of the approaches got implemented is left as an excercise for the reader. if (OpenRCT2::GetContext()->GetDrawingEngineType() != DrawingEngine::OpenGL) { - std::string screenshotPath = screenshot_dump(); + std::string screenshotPath = ScreenshotDump(); if (!screenshotPath.empty()) { auto screenshotPathW = String::ToWideChar(screenshotPath.c_str()); @@ -328,7 +328,7 @@ constexpr const wchar_t* PipeName = L"openrct2-bpad"; #endif // USE_BREAKPAD -CExceptionHandler crash_init() +CExceptionHandler CrashInit() { #ifdef USE_BREAKPAD // Path must exist and be RW! @@ -340,14 +340,14 @@ CExceptionHandler crash_init() #endif // USE_BREAKPAD } -void crash_register_additional_file(const std::string& key, const std::string& path) +void CrashRegisterAdditionalFile(const std::string& key, const std::string& path) { #ifdef USE_BREAKPAD _uploadFiles[String::ToWideChar(key.c_str())] = String::ToWideChar(path.c_str()); #endif // USE_BREAKPAD } -void crash_unregister_additional_file(const std::string& key) +void CrashUnregisterAdditionalFile(const std::string& key) { #ifdef USE_BREAKPAD auto it = _uploadFiles.find(String::ToWideChar(key.c_str())); diff --git a/src/openrct2/platform/Crash.h b/src/openrct2/platform/Crash.h index 4993ac3d8e..93b82c8115 100644 --- a/src/openrct2/platform/Crash.h +++ b/src/openrct2/platform/Crash.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,6 +14,6 @@ using CExceptionHandler = void*; extern bool gOpenRCT2SilentBreakpad; -CExceptionHandler crash_init(); -void crash_register_additional_file(const std::string& key, const std::string& path); -void crash_unregister_additional_file(const std::string& key); +CExceptionHandler CrashInit(); +void CrashRegisterAdditionalFile(const std::string& key, const std::string& path); +void CrashUnregisterAdditionalFile(const std::string& key); diff --git a/src/openrct2/platform/Platform.Android.cpp b/src/openrct2/platform/Platform.Android.cpp index 82c2b9797f..8dea40aca5 100644 --- a/src/openrct2/platform/Platform.Android.cpp +++ b/src/openrct2/platform/Platform.Android.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -131,7 +131,7 @@ namespace Platform AndroidClassLoader::AndroidClassLoader() { - log_info("Obtaining JNI class loader"); + LOG_INFO("Obtaining JNI class loader"); // This is a workaround to be able to call JNI's ClassLoader from non-main // thread, based on https://stackoverflow.com/a/16302771 diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp index fb1f1e58d9..c3366fe11c 100644 --- a/src/openrct2/platform/Platform.Linux.cpp +++ b/src/openrct2/platform/Platform.Linux.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -67,7 +67,7 @@ namespace Platform }; for (auto searchLocation : searchLocations) { - log_verbose("Looking for OpenRCT2 doc path at %s", searchLocation); + LOG_VERBOSE("Looking for OpenRCT2 doc path at %s", searchLocation); if (Path::DirectoryExists(searchLocation)) { return searchLocation; @@ -116,7 +116,7 @@ namespace Platform for (auto searchLocation : SearchLocations) { auto prefixedPath = Path::Combine(prefix, searchLocation); - log_verbose("Looking for OpenRCT2 data in %s", prefixedPath.c_str()); + LOG_VERBOSE("Looking for OpenRCT2 data in %s", prefixedPath.c_str()); if (Path::DirectoryExists(prefixedPath)) { return prefixedPath; @@ -133,7 +133,7 @@ namespace Platform auto bytesRead = readlink("/proc/self/exe", exePath, sizeof(exePath)); if (bytesRead == -1) { - log_fatal("failed to read /proc/self/exe"); + LOG_FATAL("failed to read /proc/self/exe"); } # elif defined(__FreeBSD__) || defined(__NetBSD__) # if defined(__FreeBSD__) @@ -154,7 +154,7 @@ namespace Platform auto exeLen = sizeof(exePath); if (sysctl(mib, 4, exePath, &exeLen, nullptr, 0) == -1) { - log_fatal("failed to get process path"); + LOG_FATAL("failed to get process path"); } # elif defined(__OpenBSD__) // There is no way to get the path name of a running executable. @@ -317,11 +317,11 @@ namespace Platform # ifndef NO_TTF std::string GetFontPath(const TTFFontDescriptor& font) { - log_verbose("Looking for font %s with FontConfig.", font.font_name); + LOG_VERBOSE("Looking for font %s with FontConfig.", font.font_name); FcConfig* config = FcInitLoadConfigAndFonts(); if (!config) { - log_error("Failed to initialize FontConfig library"); + LOG_ERROR("Failed to initialize FontConfig library"); FcFini(); return {}; } @@ -348,7 +348,7 @@ namespace Platform if (FcPatternGetString(match, FC_FULLNAME, 0, &matched_font_face) == FcResultMatch && strcmp(font.font_name, reinterpret_cast(matched_font_face)) != 0) { - log_verbose("FontConfig provided substitute font %s -- disregarding.", matched_font_face); + LOG_VERBOSE("FontConfig provided substitute font %s -- disregarding.", matched_font_face); is_substitute = true; } @@ -356,14 +356,14 @@ namespace Platform if (!is_substitute && FcPatternGetString(match, FC_FILE, 0, &filename) == FcResultMatch) { path = reinterpret_cast(filename); - log_verbose("FontConfig provided font %s", filename); + LOG_VERBOSE("FontConfig provided font %s", filename); } FcPatternDestroy(match); } else { - log_warning("Failed to find required font."); + LOG_WARNING("Failed to find required font."); } FcPatternDestroy(pat); diff --git a/src/openrct2/platform/Platform.Posix.cpp b/src/openrct2/platform/Platform.Posix.cpp index de937c14ce..f0420831e6 100644 --- a/src/openrct2/platform/Platform.Posix.cpp +++ b/src/openrct2/platform/Platform.Posix.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -120,7 +120,7 @@ namespace Platform int32_t Execute(std::string_view command, std::string* output) { # ifndef __EMSCRIPTEN__ - log_verbose("executing \"%s\"...", std::string(command).c_str()); + LOG_VERBOSE("executing \"%s\"...", std::string(command).c_str()); FILE* fpipe = popen(std::string(command).c_str(), "r"); if (fpipe == nullptr) { @@ -162,7 +162,7 @@ namespace Platform // Return exit code return pclose(fpipe); # else - log_warning("Emscripten cannot execute processes. The commandline was '%s'.", command.c_str()); + LOG_WARNING("Emscripten cannot execute processes. The commandline was '%s'.", command.c_str()); return -1; # endif // __EMSCRIPTEN__ } @@ -320,9 +320,9 @@ namespace Platform { mode_t mask = openrct2_getumask(); char buffer[MAX_PATH]; - safe_strcpy(buffer, u8string(path).c_str(), sizeof(buffer)); + SafeStrCpy(buffer, u8string(path).c_str(), sizeof(buffer)); - log_verbose("Create directory: %s", buffer); + LOG_VERBOSE("Create directory: %s", buffer); for (char* p = buffer + 1; *p != '\0'; p++) { if (*p == '/') @@ -330,7 +330,7 @@ namespace Platform // Temporarily truncate *p = '\0'; - log_verbose("mkdir(%s)", buffer); + LOG_VERBOSE("mkdir(%s)", buffer); if (mkdir(buffer, mask) != 0) { if (errno != EEXIST) @@ -344,7 +344,7 @@ namespace Platform } } - log_verbose("mkdir(%s)", buffer); + LOG_VERBOSE("mkdir(%s)", buffer); if (mkdir(buffer, mask) != 0) { if (errno != EEXIST) @@ -368,7 +368,7 @@ namespace Platform if (pidFile == -1) { - log_warning("Cannot open lock file for writing."); + LOG_WARNING("Cannot open lock file for writing."); return false; } @@ -383,10 +383,10 @@ namespace Platform { if (errno == EWOULDBLOCK) { - log_warning("Another OpenRCT2 session has been found running."); + LOG_WARNING("Another OpenRCT2 session has been found running."); return false; } - log_error("flock returned an uncatched errno: %d", errno); + LOG_ERROR("flock returned an uncatched errno: %d", errno); return false; } return true; @@ -446,7 +446,7 @@ namespace Platform struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { - log_fatal("clock_gettime failed"); + LOG_FATAL("clock_gettime failed"); exit(-1); } return static_cast(ts.tv_sec * 1000 + ts.tv_nsec / 1000000); diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 0cdfc37089..2000727629 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -367,7 +367,7 @@ namespace Platform return _dllModule; } - static std::wstring get_progIdName(std::string_view extension) + static std::wstring GetProdIDName(std::string_view extension) { auto progIdName = std::string(OPENRCT2_NAME) + std::string(extension); auto progIdNameW = String::ToWideChar(progIdName); @@ -390,7 +390,7 @@ namespace Platform auto fileTypeTextW = String::ToWideChar(fileTypeText); auto commandTextW = String::ToWideChar(commandText); auto commandArgsW = String::ToWideChar(commandArgs); - auto progIdNameW = get_progIdName(extension); + auto progIdNameW = GetProdIDName(extension); HKEY hKey = nullptr; HKEY hRootKey = nullptr; @@ -473,7 +473,7 @@ namespace Platform RegDeleteTreeW(hRootKey, String::ToWideChar(extension).c_str()); // [hRootKey\OpenRCT2.ext] - auto progIdName = get_progIdName(extension); + auto progIdName = GetProdIDName(extension); RegDeleteTreeW(hRootKey, progIdName.c_str()); RegCloseKey(hRootKey); @@ -504,13 +504,13 @@ namespace Platform bool FindApp(std::string_view app, std::string* output) { - log_warning("FindApp() not implemented for Windows!"); + LOG_WARNING("FindApp() not implemented for Windows!"); return false; } int32_t Execute(std::string_view command, std::string* output) { - log_warning("Execute() not implemented for Windows!"); + LOG_WARNING("Execute() not implemented for Windows!"); return -1; } @@ -609,6 +609,7 @@ namespace Platform { L"eo", LANGUAGE_ESPERANTO }, { L"es", LANGUAGE_SPANISH }, { L"fr", LANGUAGE_FRENCH }, + { L"fr-CA", LANGUAGE_FRENCH_CA }, { L"it", LANGUAGE_ITALIAN }, { L"ja", LANGUAGE_JAPANESE }, { L"ko", LANGUAGE_KOREAN }, @@ -797,7 +798,7 @@ namespace Platform HANDLE mutex = CreateMutexW(nullptr, FALSE, SINGLE_INSTANCE_MUTEX_NAME); if (mutex == nullptr) { - log_error("unable to create mutex"); + LOG_ERROR("unable to create mutex"); return true; } else if (GetLastError() == ERROR_ALREADY_EXISTS) @@ -860,7 +861,7 @@ namespace Platform bool SetupUriProtocol() { - log_verbose("Setting up URI protocol..."); + LOG_VERBOSE("Setting up URI protocol..."); // [HKEY_CURRENT_USER\Software\Classes] HKEY hRootKey; @@ -894,7 +895,7 @@ namespace Platform RegSetKeyValueW(hMuiCacheKey, nullptr, buffer, REG_SZ, L"OpenRCT2", sizeof(L"OpenRCT2")); } - log_verbose("URI protocol setup successful"); + LOG_VERBOSE("URI protocol setup successful"); return true; } } @@ -902,7 +903,7 @@ namespace Platform } } - log_verbose("URI protocol setup failed"); + LOG_VERBOSE("URI protocol setup failed"); return false; } diff --git a/src/openrct2/platform/Platform.h b/src/openrct2/platform/Platform.h index bac674165b..1a6e8da5cf 100644 --- a/src/openrct2/platform/Platform.h +++ b/src/openrct2/platform/Platform.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,20 +40,14 @@ enum class SPECIAL_FOLDER RCT2_DISCORD, }; -struct rct2_date +struct RealWorldDate { uint8_t day; uint8_t month; int16_t year; uint8_t day_of_week; }; - -struct rct2_time -{ - uint8_t hour; - uint8_t minute; - uint8_t second; -}; +struct RealWorldTime; namespace Platform { @@ -79,8 +73,8 @@ namespace Platform MeasurementFormat GetLocaleMeasurementFormat(); uint8_t GetLocaleDateFormat(); TemperatureUnit GetLocaleTemperatureFormat(); - rct2_time GetTimeLocal(); - rct2_date GetDateLocal(); + RealWorldTime GetTimeLocal(); + RealWorldDate GetDateLocal(); bool FindApp(std::string_view app, std::string* output); int32_t Execute(std::string_view command, std::string* output = nullptr); @@ -167,5 +161,6 @@ public: // 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 lpCmdLine, int32_t nCmdShow); +__declspec(dllexport) int32_t + StartOpenRCT2(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCommandLine, int32_t nCmdShow); #endif // _WIN32 diff --git a/src/openrct2/platform/Platform.macOS.mm b/src/openrct2/platform/Platform.macOS.mm index 5d10f3ab89..cee15ba715 100644 --- a/src/openrct2/platform/Platform.macOS.mm +++ b/src/openrct2/platform/Platform.macOS.mm @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/platform/Shared.cpp b/src/openrct2/platform/Shared.cpp index 6795b67e0b..7e96da47a9 100644 --- a/src/openrct2/platform/Shared.cpp +++ b/src/openrct2/platform/Shared.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -46,8 +46,8 @@ namespace Platform #endif // __ANDROID__ InitTicks(); - bitcount_init(); - mask_init(); + BitCountInit(); + MaskInit(); } } @@ -69,12 +69,12 @@ namespace Platform return CurrencyType::Pounds; } - rct2_date GetDateLocal() + RealWorldDate GetDateLocal() { auto time = std::time(nullptr); auto localTime = std::localtime(&time); - rct2_date outDate; + RealWorldDate outDate; outDate.day = localTime->tm_mday; outDate.day_of_week = localTime->tm_wday; outDate.month = localTime->tm_mon + 1; @@ -82,12 +82,12 @@ namespace Platform return outDate; } - rct2_time GetTimeLocal() + RealWorldTime GetTimeLocal() { auto time = std::time(nullptr); auto localTime = std::localtime(&time); - rct2_time outTime; + RealWorldTime outTime; outTime.hour = localTime->tm_hour; outTime.minute = localTime->tm_min; outTime.second = localTime->tm_sec; diff --git a/src/openrct2/profiling/Profiling.cpp b/src/openrct2/profiling/Profiling.cpp index b8a015951e..79b4975106 100644 --- a/src/openrct2/profiling/Profiling.cpp +++ b/src/openrct2/profiling/Profiling.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/profiling/Profiling.h b/src/openrct2/profiling/Profiling.h index 7f3bc8ba74..a0ce1e76c1 100644 --- a/src/openrct2/profiling/Profiling.h +++ b/src/openrct2/profiling/Profiling.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/profiling/ProfilingMacros.hpp b/src/openrct2/profiling/ProfilingMacros.hpp index 14bf242031..f04f46d048 100644 --- a/src/openrct2/profiling/ProfilingMacros.hpp +++ b/src/openrct2/profiling/ProfilingMacros.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct1/Limits.h b/src/openrct2/rct1/Limits.h index b64090e784..79b9dffa87 100644 --- a/src/openrct2/rct1/Limits.h +++ b/src/openrct2/rct1/Limits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 461c464ed7..69c420e280 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ namespace RCT1 { - constexpr const uint8_t RCT1_RESEARCH_FLAGS_SEPARATOR = 0xFF; + constexpr const uint8_t RCT1ResearchFlagsSeparator = 0xFF; enum class RideType : uint8_t { @@ -125,272 +125,272 @@ namespace RCT1 */ struct Ride { - RideType type; // 0x000 - uint8_t vehicle_type; // 0x001 - uint16_t lifecycle_flags; // 0x002 - uint8_t operating_mode; // 0x004 - uint8_t colour_scheme; // 0x005 + RideType Type; // 0x000 + uint8_t VehicleType; // 0x001 + uint16_t LifecycleFlags; // 0x002 + uint8_t OperatingMode; // 0x004 + uint8_t ColourScheme; // 0x005 struct { - colour_t body; - colour_t trim; - } vehicle_colours[Limits::MaxTrainsPerRide]; // 0x006 - colour_t track_primary_colour; // 0x01E - colour_t track_secondary_colour; // 0x01F - colour_t track_support_colour; // 0x020 - uint8_t status; // 0x021 - uint16_t name; // 0x022 - uint16_t name_argument_ride; // 0x024 - uint16_t name_argument_number; // 0x026 - RCT12xy8 overall_view; // 0x028 - RCT12xy8 station_starts[Limits::MaxStationsPerRide]; // 0x02A - uint8_t station_height[Limits::MaxStationsPerRide]; // 0x032 - uint8_t station_length[Limits::MaxStationsPerRide]; // 0x036 - uint8_t station_light[Limits::MaxStationsPerRide]; // 0x03A - uint8_t station_depart[Limits::MaxStationsPerRide]; // 0x03E - RCT12xy8 entrance[Limits::MaxStationsPerRide]; // 0x042 - RCT12xy8 exit[Limits::MaxStationsPerRide]; // 0x04A - uint16_t last_peep_in_queue[Limits::MaxStationsPerRide]; // 0x052 - uint8_t num_peeps_in_queue[Limits::MaxStationsPerRide]; // 0x05A - uint16_t vehicles[Limits::MaxTrainsPerRide]; // 0x05E - uint8_t depart_flags; // 0x076 - uint8_t num_stations; // 0x077 - uint8_t NumTrains; // 0x078 - uint8_t num_cars_per_train; // 0x079 - uint8_t ProposedNumTrains; // 0x07A - uint8_t proposed_num_cars_per_train; // 0x07B - uint8_t max_trains; // 0x07C - uint8_t min_max_cars_per_train; // 0x07D - uint8_t min_waiting_time; // 0x07E - uint8_t max_waiting_time; // 0x07F - uint8_t operation_option; // 0x080 - uint8_t boat_hire_return_direction; // 0x081 - RCT12xy8 boat_hire_return_position; // 0x082 - uint8_t data_logging_index; // 0x084 - uint8_t special_track_elements; // 0x085 - uint16_t unk_86; // 0x086 - int32_t max_speed; // 0x088 - int32_t average_speed; // 0x08C - uint8_t current_test_segment; // 0x090 - uint8_t average_speed_test_timeout; // 0x091 - uint8_t pad_0E2[0x2]; // 0x092 - int32_t length[Limits::MaxStationsPerRide]; // 0x094 - uint16_t time[Limits::MaxStationsPerRide]; // 0x0A4 - fixed16_2dp max_positive_vertical_g; // 0x0AC - fixed16_2dp max_negative_vertical_g; // 0x0AE - fixed16_2dp max_lateral_g; // 0x0B0 - fixed16_2dp previous_vertical_g; // 0x0B2 - fixed16_2dp previous_lateral_g; // 0x0B4 - uint8_t pad_B6[0x2]; // 0x0B6 - uint32_t testing_flags; // 0x0B8 + 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 // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times - RCT12xy8 cur_test_track_location; // 0x0BC + RCT12xy8 CurTestTrackLocation; // 0x0BC // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16_t turn_count_default; // 0x0BE X = current turn count - uint16_t turn_count_banked; // 0x0C0 - uint16_t turn_count_sloped; // 0x0C2 X = number turns > 3 elements + uint16_t TurnCountDefault; // 0x0BE X = current turn count + uint16_t TurnCountBanked; // 0x0C0 + uint16_t TurnCountSloped; // 0x0C2 X = number turns > 3 elements union { - uint8_t num_inversions; // 0x0C4 - uint8_t num_holes; + uint8_t NumInversions; // 0x0C4 + uint8_t NumHoles; }; - uint8_t num_drops; // 0x0C5 - uint8_t start_drop_height; // 0x0C6 - uint8_t highest_drop_height; // 0x0C7 - int32_t sheltered_length; // 0x0C8 - uint8_t unk_CC[2]; // 0x0CC - uint8_t num_sheltered_sections; // 0x0CE - // see cur_test_track_location - uint8_t cur_test_track_z; // 0x0CF - int16_t unk_D0; // 0x0D0 - int16_t unk_D2; // 0x0D2 + uint8_t NumDrops; // 0x0C5 + uint8_t StartDropHeight; // 0x0C6 + uint8_t HighestDropHeight; // 0x0C7 + int32_t ShelteredLength; // 0x0C8 + uint8_t UnkCC[2]; // 0x0CC + uint8_t NumShelteredSections; // 0x0CE + // see CurTestTrackLocation + uint8_t CurTestTrackZ; // 0x0CF + int16_t UnkD0; // 0x0D0 + int16_t UnkD2; // 0x0D2 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t num_customers[Limits::CustomerHistorySize]; // 0xD4 - money16 price; // 0x0E8 - RCT12xy8 chairlift_bullwheel_location[2]; // 0x0EA - uint8_t chairlift_bullwheel_z[2]; // 0x0EE + uint16_t NumCustomers[Limits::CustomerHistorySize]; // 0xD4 + money16 Price; // 0x0E8 + RCT12xy8 ChairliftBullwheelLocation[2]; // 0x0EA + uint8_t ChairliftBullwheelZ[2]; // 0x0EE union { - RatingTuple ratings; + RatingTuple Ratings; struct { - ride_rating excitement; // 0x0F0 - ride_rating intensity; // 0x0F2 - ride_rating nausea; // 0x0F4 + ride_rating Excitement; // 0x0F0 + ride_rating Intensity; // 0x0F2 + ride_rating Nausea; // 0x0F4 }; }; - uint16_t value; // 0x0F6 - uint16_t chairlift_bullwheel_rotation; // 0x0F8 - uint8_t satisfaction; // 0x0FA - uint8_t satisfaction_time_out; // 0x0FB - uint8_t satisfaction_next; // 0x0FC - uint8_t window_invalidate_flags; // 0x0FD - uint8_t unk_FE[2]; // 0x0FE - uint32_t total_customers; // 0x100 - money32 total_profit; // 0x104 - uint8_t popularity; // 0x108 - uint8_t popularity_time_out; // 0x109 - uint8_t popularity_next; // 0x10A - uint8_t num_riders; // 0x10B - uint8_t music_tune_id; // 0x10C - uint8_t slide_in_use; // 0x10D + money16 Value; // 0x0F6 + uint16_t ChairliftBullwheelRotation; // 0x0F8 + uint8_t Satisfaction; // 0x0FA + uint8_t SatisfactionTimeOut; // 0x0FB + uint8_t SatisfactionNext; // 0x0FC + uint8_t WindowInvalidateFlags; // 0x0FD + uint8_t UnkFE[2]; // 0x0FE + uint32_t TotalCustomers; // 0x100 + money32 TotalProfit; // 0x104 + uint8_t Popularity; // 0x108 + uint8_t PopularityTimeOut; // 0x109 + uint8_t PopularityNext; // 0x10A + uint8_t NumRiders; // 0x10B + uint8_t MusicTuneID; // 0x10C + uint8_t SlideInUse; // 0x10D union { - uint16_t slide_peep; // 0x10E - uint16_t maze_tiles; // 0x10E + uint16_t SlidePeep; // 0x10E + uint16_t MazeTiles; // 0x10E }; - uint8_t pad_110[0xE]; // 0x110 - uint8_t slide_peep_t_shirt_colour; // 0x11E - uint8_t pad_11F[0x7]; // 0x11F - uint8_t spiral_slide_progress; // 0x126 - uint8_t pad_127[0x9]; // 0x127 - int16_t build_date; // 0x130 - money16 upkeep_cost; // 0x131 - uint16_t race_winner; // 0x132 - uint8_t unk_134[2]; // 0x134 - uint32_t music_position; // 0x138 - uint8_t breakdown_reason_pending; // 0x13C - uint8_t mechanic_status; // 0x13D - uint16_t mechanic; // 0x13E - uint8_t inspection_station; // 0x140 - uint8_t broken_vehicle; // 0x141 - uint8_t broken_car; // 0x142 - uint8_t breakdown_reason; // 0x143 - money16 price_secondary; // 0x144 + uint8_t Pad110[0xE]; // 0x110 + uint8_t SlidePeepTshirtColour; // 0x11E + uint8_t Pad11F[0x7]; // 0x11F + uint8_t SpiralSlideProgress; // 0x126 + uint8_t Pad127[0x9]; // 0x127 + int16_t BuildDate; // 0x130 + money16 UpkeepCost; // 0x131 + uint16_t RaceWinner; // 0x132 + uint8_t Unk134[2]; // 0x134 + uint32_t MusicPosition; // 0x138 + uint8_t BreakdownReasonPending; // 0x13C + uint8_t MechanicStatus; // 0x13D + uint16_t Mechanic; // 0x13E + uint8_t InspectionStation; // 0x140 + uint8_t BrokenVehicle; // 0x141 + uint8_t BrokenCar; // 0x142 + uint8_t BreakdownReason; // 0x143 + money16 PriceSecondary; // 0x144 union { struct { - uint8_t reliability_subvalue; // 0x146, 0 - 255, acts like the decimals for reliability_percentage - uint8_t reliability_percentage; // 0x147, Starts at 100 and decreases from there. + uint8_t ReliabilitySubvalue; // 0x146, 0 - 255, acts like the decimals for ReliabilityPercentage + uint8_t ReliabilityPercentage; // 0x147, Starts at 100 and decreases from there. }; - uint16_t reliability; // 0x146 + uint16_t Reliability; // 0x146 }; - uint8_t unreliability_factor; // 0x148 - uint8_t downtime; // 0x149 - uint8_t inspection_interval; // 0x14A - uint8_t last_inspection; // 0x14B - uint8_t unk_14C[20]; // 0x14C - money32 income_per_hour; // 0x160 - money32 profit; // 0x164 - uint8_t queue_time[Limits::MaxStationsPerRide]; // 0x168 - colour_t track_colour_main[4]; // 0x16C - colour_t track_colour_additional[4]; // 0x170 - colour_t track_colour_supports[4]; // 0x174 - uint8_t music; // 0x178 - uint8_t entrance_style; // 0x179 - uint8_t unk_17A[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::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 }; assert_struct_size(Ride, 0x260); - struct UnkEntity : RCT12SpriteBase + struct UnkEntity : RCT12EntityBase { - uint8_t pad_1F[3]; // 0x1f - StringId name_string_idx; // 0x22 - uint16_t var_24; - uint16_t frame; // 0x26 - uint8_t var_28[3]; - uint8_t var_2B; - uint8_t pad_2C[0x45]; - uint8_t var_71; + uint8_t Pad1F[3]; // 0x1f + StringId NameStringID; // 0x22 + uint16_t Var24; + uint16_t Frame; // 0x26 + uint8_t Var28[3]; + uint8_t Var2B; + uint8_t Pad2C[0x45]; + uint8_t Var71; }; - struct Vehicle : RCT12SpriteBase + struct Vehicle : RCT12EntityBase { - uint8_t Pitch; // 0x1F - uint8_t bank_rotation; // 0x20 - uint8_t pad_21[3]; - int32_t remaining_distance; // 0x24 - int32_t velocity; // 0x28 - int32_t acceleration; // 0x2C - uint8_t ride; // 0x30 + uint8_t Pitch; // 0x1F + uint8_t BankRotation; // 0x20 + uint8_t Pad21[3]; + int32_t RemainingDistance; // 0x24 + int32_t Velocity; // 0x28 + int32_t Acceleration; // 0x2C + uint8_t Ride; // 0x30 uint8_t CarType; // 0x31 - RCT12VehicleColour colours; // 0x32 + RCT12VehicleColour Colours; // 0x32 union { - uint16_t track_progress; // 0x34 + uint16_t TrackProgress; // 0x34 struct { - int8_t var_34; - uint8_t var_35; + int8_t Var34; + uint8_t Var35; }; }; union { int16_t TrackTypeAndDirection; // 0x36 - RCT12xy8 boat_location; // 0x36 + RCT12xy8 BoatLocation; // 0x36 }; - uint16_t track_x; // 0x38 - uint16_t track_y; // 0x3A - uint16_t track_z; // 0x3C - uint16_t next_vehicle_on_train; // 0x3E + uint16_t TrackX; // 0x38 + uint16_t TrackY; // 0x3A + uint16_t TrackZ; // 0x3C + uint16_t NextVehicleOnTrain; // 0x3E // The previous vehicle on the same train or the last vehicle on the previous or only train. - uint16_t prev_vehicle_on_ride; // 0x40 + uint16_t PrevVehicleOnRide; // 0x40 // The next vehicle on the same train or the first vehicle on the next or only train - uint16_t next_vehicle_on_ride; // 0x42 + uint16_t NextVehicleOnRide; // 0x42 - uint16_t var_44; - uint16_t mass; // 0x46 - uint16_t update_flags; // 0x48 + uint16_t Var44; + uint16_t Mass; // 0x46 + uint16_t UpdateFlags; // 0x48 uint8_t SwingSprite; - uint8_t current_station; // 0x4B + uint8_t CurrentStation; // 0x4B union { int16_t SwingPosition; // 0x4C - int16_t current_time; // 0x4C + int16_t CurrentTime; // 0x4C struct { - int8_t ferris_wheel_var_0; // 0x4C - int8_t ferris_wheel_var_1; // 0x4D + int8_t FerrisWheelVar0; // 0x4C + int8_t FerrisWheelVar1; // 0x4D }; }; int16_t SwingSpeed; - uint8_t status; // 0x50 - uint8_t sub_state; // 0x51 - uint16_t peep[32]; // 0x52 - uint8_t peep_tshirt_colours[32]; // 0x92 - uint8_t num_seats; // 0xB2 - uint8_t num_peeps; // 0xB3 - uint8_t next_free_seat; // 0xB4 - uint8_t restraints_position; // 0xB5 0 == Close, 255 == Open - int16_t spin_speed; - uint16_t sound2_flags; - uint8_t spin_sprite; - uint8_t sound1_id; // 0xBB - uint8_t sound1_volume; // 0xBC - uint8_t sound2_id; // 0xBD - uint8_t sound2_volume; // 0xBE - int8_t sound_vector_factor; + uint8_t Status; // 0x50 + uint8_t SubState; // 0x51 + uint16_t Peep[32]; // 0x52 + uint8_t PeepTshirtColours[32]; // 0x92 + uint8_t NumSeats; // 0xB2 + uint8_t NumPeeps; // 0xB3 + uint8_t NextFreeSeat; // 0xB4 + uint8_t RestraintsPosition; // 0xB5 0 == Close, 255 == Open + int16_t SpinSpeed; + uint16_t Sound2Flags; + uint8_t SpinSprite; + uint8_t Sound1ID; // 0xBB + uint8_t Sound1Volume; // 0xBC + uint8_t Sound2ID; // 0xBD + uint8_t Sound2Volume; // 0xBE + int8_t SoundVectorFactor; union { - uint16_t var_C0; - uint16_t time_waiting; // 0xC0 - uint16_t cable_lift_target; // 0xC0 + uint16_t VarC0; + uint16_t TimeWaiting; // 0xC0 + uint16_t CableLiftTarget; // 0xC0 }; - uint8_t speed; // 0xC2 - uint8_t powered_acceleration; // 0xC3 + uint8_t Speed; // 0xC2 + uint8_t PoweredAcceleration; // 0xC3 union { uint8_t DodgemsCollisionDetection; // 0xC4 uint8_t CollisionDetectionTimer; // 0xC4 }; - uint8_t animation_frame; - uint8_t pad_C6[0x2]; - uint32_t animationState; - uint8_t scream_sound_id; // 0xCC + uint8_t AnimationFrame; + uint8_t PadC6[0x2]; + uint32_t AnimationState; + uint8_t ScreamSoundID; // 0xCC uint8_t TrackSubposition; - uint8_t NumLaps; // 0xCE - uint8_t brake_speed; // 0xCF - uint16_t lost_time_out; // 0xD0 - int8_t vertical_drop_countdown; // 0xD1 - uint8_t var_D3; - uint8_t mini_golf_current_animation; - uint8_t mini_golf_flags; // 0xD5 - uint8_t ride_subtype; // 0xD6 - uint8_t colours_extended; // 0xD7 + uint8_t NumLaps; // 0xCE + uint8_t BrakeSpeed; // 0xCF + uint16_t LostTimeOut; // 0xD0 + int8_t VerticalDropCountdown; // 0xD1 + uint8_t VarD3; + uint8_t MiniGolfCurrentAnimation; + uint8_t MiniGolfFlags; // 0xD5 + uint8_t RideSubtype; // 0xD6 + uint8_t ColoursExtended; // 0xD7 uint16_t GetTrackType() const { @@ -435,176 +435,176 @@ namespace RCT1 ToffeeApple = 30 }; - struct Peep : RCT12SpriteBase + struct Peep : RCT12EntityBase { - uint8_t pad_1F[3]; - StringId name_string_idx; // 0x22 - uint16_t next_x; // 0x24 - uint16_t next_y; // 0x26 - uint8_t next_z; // 0x28 - uint8_t next_flags; // 0x29 - uint8_t outside_of_park; // 0x2A - uint8_t state; // 0x2B - uint8_t sub_state; // 0x2C - PeepSpriteType sprite_type; // 0x2D - uint8_t type; // 0x2E + uint8_t Pad1F[3]; + StringId NameStringID; // 0x22 + uint16_t NextX; // 0x24 + uint16_t NextY; // 0x26 + uint8_t NextZ; // 0x28 + uint8_t NextFlags; // 0x29 + uint8_t OutsideOfPark; // 0x2A + uint8_t State; // 0x2B + uint8_t SubState; // 0x2C + PeepSpriteType SpriteType; // 0x2D + RCT12PeepType PeepType; // 0x2E union { - uint8_t staff_type; // 0x2F - uint8_t no_of_rides; // 0x2F + uint8_t StaffType; // 0x2F + uint8_t NumRides; // 0x2F }; - uint8_t tshirt_colour; // 0x30 - uint8_t trousers_colour; // 0x31 - uint16_t destination_x; // 0x32 Location that the peep is trying to get to - uint16_t destination_y; // 0x34 - uint8_t destination_tolerance; // 0x36 How close to destination before next action/state 0 = exact - uint8_t var_37; - uint8_t energy; // 0x38 - uint8_t energy_target; // 0x39 - uint8_t happiness; // 0x3A - uint8_t happiness_target; // 0x3B - uint8_t nausea; // 0x3C - uint8_t nausea_target; // 0x3D - uint8_t hunger; // 0x3E - uint8_t thirst; // 0x3F - uint8_t toilet; // 0x40 - uint8_t mass; // 0x41 - uint8_t time_to_consume; - uint8_t intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits - uint8_t nausea_tolerance; // 0x44 - uint8_t window_invalidate_flags; // 0x45 - money16 paid_on_drink; // 0x46 - uint8_t ride_types_been_on[16]; // 0x48 - uint8_t pad_5F[0x10]; // 0x58 - RCT12RideId current_ride; // 0x68 - uint8_t current_ride_station; // 0x69 - uint8_t current_train; // 0x6A + uint8_t TshirtColour; // 0x30 + uint8_t TrousersColour; // 0x31 + uint16_t DestinationX; // 0x32 Location that the peep is trying to get to + uint16_t DestinationY; // 0x34 + uint8_t DestinationTolerance; // 0x36 How close to destination before next action/state 0 = exact + uint8_t Var37; + uint8_t Energy; // 0x38 + uint8_t EnergyTarget; // 0x39 + uint8_t Happiness; // 0x3A + uint8_t HappinessTarget; // 0x3B + uint8_t Nausea; // 0x3C + uint8_t NauseaTarget; // 0x3D + uint8_t Hunger; // 0x3E + uint8_t Thirst; // 0x3F + uint8_t Toilet; // 0x40 + uint8_t Mass; // 0x41 + uint8_t TimeToConsume; + uint8_t Intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits + uint8_t NauseaTolerance; // 0x44 + uint8_t WindowInvalidateFlags; // 0x45 + money16 PaidOnDrink; // 0x46 + uint8_t RideTypesBeenOn[16]; // 0x48 + uint8_t Pad5F[0x10]; // 0x58 + RCT12RideId CurrentRide; // 0x68 + uint8_t CurrentRideStation; // 0x69 + uint8_t CurrentTrain; // 0x6A union { struct { - uint8_t current_car; // 0x6B - uint8_t current_seat; // 0x6C + uint8_t CurrentCar; // 0x6B + uint8_t CurrentSeat; // 0x6C }; - uint16_t time_to_sitdown; // 0x6B + uint16_t TimeToSitDown; // 0x6B struct { - uint8_t time_to_stand; // 0x6B - uint8_t standing_flags; // 0x6C + uint8_t TimeToStand; // 0x6B + uint8_t StandingFlags; // 0x6C }; }; // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower - uint8_t special_sprite; // 0x6D - uint8_t action_sprite_type; // 0x6E + uint8_t SpecialSprite; // 0x6D + uint8_t ActionSpriteType; // 0x6E // Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which reads // this again - uint8_t next_action_sprite_type; // 0x6F - uint8_t action_sprite_image_offset; // 0x70 - uint8_t action; // 0x71 - uint8_t action_frame; // 0x72 - uint8_t step_progress; + uint8_t NextActionSpriteType; // 0x6F + uint8_t ActionSpriteImageOffset; // 0x70 + uint8_t Action; // 0x71 + uint8_t ActionFrame; // 0x72 + uint8_t StepProgress; union { - uint16_t mechanic_time_since_call; // time getting to ride to fix - uint16_t next_in_queue; // 0x74 + uint16_t MechanicTimeSinceCall; // time getting to ride to fix + uint16_t NextInQueue; // 0x74 }; - uint8_t pad_76; - uint8_t pad_77; + uint8_t Pad76; + uint8_t Pad77; union { - uint8_t maze_last_edge; // 0x78 - uint8_t direction; // Direction ? + uint8_t MazeLastEdge; // 0x78 + uint8_t Direction; // Direction ? }; - RCT12RideId interaction_ride_index; - uint16_t time_in_queue; // 0x7A - uint8_t rides_been_on[32]; // 0x7C + RCT12RideId InteractionRideIndex; + uint16_t TimeInQueue; // 0x7A + uint8_t RidesBeenOn[32]; // 0x7C // 255 bit bitmap of every ride the peep has been on see - // window_peep_rides_update for how to use. - uint32_t id; // 0x9C - money32 cash_in_pocket; // 0xA0 - money32 cash_spent; // 0xA4 - int32_t park_entry_time; // 0xA8 - int8_t rejoin_queue_timeout; // 0xAC - RCT12RideId previous_ride; // 0xAD - uint16_t previous_ride_time_out; // 0xAE - RCT12PeepThought thoughts[Limits::MaxPeepThoughts]; // 0xB0 - uint8_t pad_C4; + // WindowPeepRidesUpdate for how to use. + uint32_t ID; // 0x9C + money32 CashInPocket; // 0xA0 + money32 CashSpent; // 0xA4 + int32_t ParkEntryTime; // 0xA8 + int8_t RejoinQueueTimeout; // 0xAC + RCT12RideId PreviousRide; // 0xAD + uint16_t PreviousRideTimeOut; // 0xAE + RCT12PeepThought Thoughts[Limits::MaxPeepThoughts]; // 0xB0 + uint8_t PadC4; union { - uint8_t staff_id; // 0xC5 - RCT12RideId guest_heading_to_ride_id; // 0xC5 + uint8_t StaffID; // 0xC5 + RCT12RideId GuestHeadingToRideID; // 0xC5 }; union { - uint8_t staff_orders; // 0xC6 - uint8_t peep_is_lost_countdown; // 0xC6 + uint8_t StaffOrders; // 0xC6 + uint8_t PeepIsLostCountdown; // 0xC6 }; - RCT12RideId photo1_ride_ref; // 0xC7 - uint32_t peep_flags; // 0xC8 - rct12_xyzd8 pathfind_goal; // 0xCC - rct12_xyzd8 pathfind_history[4]; // 0xD0 - uint8_t no_action_frame_num; // 0xE0 + RCT12RideId Photo1RideRef; // 0xC7 + uint32_t PeepFlags; // 0xC8 + RCT12xyzd8 PathfindGoal; // 0xCC + RCT12xyzd8 PathfindHistory[4]; // 0xD0 + uint8_t NoActionFrameNum; // 0xE0 // 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8_t litter_count; // 0xE1 + uint8_t LitterCount; // 0xE1 union { - uint8_t time_on_ride; // 0xE2 - uint8_t staff_mowing_timeout; // 0xE2 + uint8_t TimeOnRide; // 0xE2 + uint8_t StaffMowingTimeout; // 0xE2 }; // 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc - uint8_t disgusting_count; // 0xE3 - money16 paid_to_enter; // 0xE4 - money16 paid_on_rides; // 0xE6 - money16 paid_on_food; // 0xE8 - money16 paid_on_souvenirs; // 0xEA - uint8_t no_of_food; // 0xEC - uint8_t no_of_drinks; // 0xED - uint8_t no_of_souvenirs; // 0xEE - uint8_t vandalism_seen; // 0xEF - uint8_t voucher_type; // 0xF0 - RCT12RideId voucher_arguments; // 0xF1 ride_id or string_offset_id - uint8_t surroundings_thought_timeout; // 0xF2 - uint8_t angriness; // 0xF3 - uint8_t time_lost; - uint8_t days_in_queue; // 0xF5 - uint8_t balloon_colour; // 0xF6 - uint8_t umbrella_colour; // 0xF7 - uint8_t hat_colour; // 0xF8 - RCT12RideId favourite_ride; // 0xF9 - uint8_t favourite_ride_rating; // 0xFA - uint8_t pad_FB; - uint32_t item_standard_flags; // 0xFC + uint8_t DisgustingCount; // 0xE3 + money16 PaidToEnter; // 0xE4 + money16 PaidOnRides; // 0xE6 + money16 PaidOnFood; // 0xE8 + money16 PaidOnSouvenirs; // 0xEA + uint8_t NumFood; // 0xEC + uint8_t NumDrinks; // 0xED + uint8_t NumSouvenirs; // 0xEE + uint8_t VandalismSeen; // 0xEF + uint8_t VoucherType; // 0xF0 + RCT12RideId VoucherArguments; // 0xF1 RideID or StringOffsetID + uint8_t SurroundingsThoughtTimeout; // 0xF2 + uint8_t Angriness; // 0xF3 + uint8_t TimeLost; + uint8_t DaysInQueue; // 0xF5 + uint8_t BalloonColour; // 0xF6 + uint8_t UmbrellaColour; // 0xF7 + uint8_t HatColour; // 0xF8 + RCT12RideId FavouriteRide; // 0xF9 + uint8_t FavouriteRideRating; // 0xFA + uint8_t PadFB; + uint32_t ItemStandardFlags; // 0xFC uint64_t GetItemFlags() const { - return item_standard_flags; + return ItemStandardFlags; } }; assert_struct_size(Peep, 0x100); union Entity { - uint8_t pad_00[0x100]; - UnkEntity unknown; - Vehicle vehicle; - Peep peep; - RCT12SpriteLitter litter; - RCT12SpriteBalloon balloon; - RCT12SpriteDuck duck; - RCT12SpriteJumpingFountain jumping_fountain; - RCT12SpriteMoneyEffect money_effect; - RCT12SpriteCrashedVehicleParticle crashed_vehicle_particle; - RCT12SpriteCrashSplash crash_splash; - RCT12SpriteSteamParticle steam_particle; + uint8_t Pad00[0x100]; + UnkEntity Unknown; + RCT1::Vehicle Vehicle; + RCT1::Peep Peep; + RCT12EntityLitter Litter; + RCT12EntityBalloon Balloon; + RCT12EntityDuck Duck; + RCT12EntityJumpingFountain JumpingFountain; + RCT12EntityMoneyEffect MoneyEffect; + RCT12EntityCrashedVehicleParticle CrashedVehicleParticle; + RCT12EntityCrashSplash CrashSplash; + RCT12EntitySteamParticle SteamParticle; }; assert_struct_size(Entity, 0x100); struct ResearchItem { - uint8_t item; - uint8_t related_ride; - uint8_t type; - uint8_t flags; - uint8_t category; + uint8_t Item; + uint8_t RelatedRide; + uint8_t Type; + uint8_t Flags; + uint8_t Category; }; assert_struct_size(ResearchItem, 5); @@ -614,174 +614,174 @@ namespace RCT1 */ struct S4 { - uint16_t month; - uint16_t day; - uint32_t ticks; - uint32_t random_a; - uint32_t random_b; - RCT12TileElement tile_elements[Limits::MaxTileElements]; - uint32_t unk_counter; - Entity sprites[Limits::MaxEntities]; - uint16_t next_sprite_index; - uint16_t first_vehicle_sprite_index; - uint16_t first_peep_sprite_index; - uint16_t first_duck_sprite_index; - uint16_t first_litter_sprite_index; - uint16_t first_oversized_ride_car_sprite_index; - uint16_t sprites_available; - uint16_t num_vehicle_sprites; - uint16_t num_peep_sprites; - uint16_t num_duck_sprites; - uint16_t num_litter_sprites; - uint16_t num_oversized_ride_car_sprites; - uint32_t park_name_string_index; - uint32_t unk_198830; - money32 cash; - money32 loan; - uint32_t park_flags; - money16 park_entrance_fee; - Entrance park_entrance; - uint8_t unk_198849; - rct12_peep_spawn peep_spawn[Limits::MaxPeepSpawns]; - uint8_t unk_198856; - uint8_t research_level; - uint32_t unk_198858; - uint32_t available_rides[8]; - uint32_t available_vehicles[8]; - uint32_t ride_feature_1[128]; - uint32_t ride_feature_2[128]; - uint16_t guests_in_park; - uint16_t unk_198C9E; - money32 expenditure[Limits::ExpenditureTableMonthCount][Limits::ExpenditureTypeCount]; - uint32_t guests_in_park_2; - uint8_t unk_199024; - colour_t handman_colour; - colour_t mechanic_colour; - colour_t security_guard_colour; - uint8_t available_scenery[128]; - uint16_t available_banners; - uint8_t unk_1990AA[94]; - uint16_t park_rating; - uint8_t park_rating_history[32]; - uint8_t guests_in_park_history[32]; - uint8_t research_priority; - uint8_t research_progress_stage; - uint8_t last_research_item; - uint8_t last_research_ride; - uint8_t last_research_type; - uint8_t last_research_flags; - ResearchItem research_items[200]; - uint8_t next_research_item; - uint8_t next_research_ride; - uint8_t next_research_type; - uint8_t next_research_flags; - uint16_t research_progress; - uint8_t next_research_category; - uint8_t next_research_expected_day; - uint8_t next_research_expected_month; - uint8_t guest_initial_happiness; - uint16_t park_size; - uint16_t guest_generation_probability; - money16 total_ride_value_for_money; - money32 max_loan; - money16 guest_initial_cash; - uint8_t guest_initial_hunger; - uint8_t guest_initial_thirst; - uint8_t scenario_objective_type; - uint8_t scenario_objective_years; - uint16_t unk_199552; - money32 scenario_objective_currency; - uint16_t scenario_objective_num_guests; - uint8_t marketing_status[20]; - uint8_t marketing_assoc[20]; - uint8_t unk_199582[2]; - money32 cash_history[Limits::FinanceGraphSize]; - money32 total_expenditure; - money32 profit; - uint8_t unk_199788[8]; - money32 weekly_profit_history[Limits::FinanceGraphSize]; - money32 park_value; - money32 park_value_history[Limits::FinanceGraphSize]; - money32 completed_company_value; - uint32_t num_admissions; - money32 admission_total_income; - money32 company_value; - uint8_t thought_timer[16]; - rct12_award awards[Limits::MaxAwards]; - money16 land_price; - money16 construction_rights_price; - uint16_t unk_199BCC; - uint16_t unk_199BCE; - uint32_t unk_199BD0; + uint16_t Month; + uint16_t Day; + uint32_t Ticks; + uint32_t RandomA; + uint32_t RandomB; + RCT12TileElement TileElements[Limits::MaxTileElements]; + uint32_t UnkCounter; + Entity Entities[Limits::MaxEntities]; + uint16_t NextEntityIndex; + uint16_t FirstVehicleEntityIndex; + uint16_t FirstPeepEntityIndex; + uint16_t FirstDuckEntityIndex; + uint16_t FirstLitterEntityIndex; + uint16_t FirstOversizedRideCarEntityIndex; + uint16_t EntitiesAvailable; + uint16_t NumVehicleEntities; + uint16_t NumPeepEntities; + uint16_t NumDuckEntities; + uint16_t NumLitterEntities; + uint16_t NumOversizedRideCarEntities; + uint32_t ParkNameStringIndex; + uint32_t Unk198830; + money32 Cash; + money32 Loan; + uint32_t ParkFlags; + money16 ParkEntranceFee; + Entrance ParkEntrance; + uint8_t Unk198849; + RCT12PeepSpawn PeepSpawn[Limits::MaxPeepSpawns]; + uint8_t Unk198856; + uint8_t ResearchLevel; + uint32_t Unk198858; + uint32_t AvailableRides[8]; + uint32_t AvailableVehicles[8]; + uint32_t RideFeature1[128]; + uint32_t RideFeature2[128]; + uint16_t GuestsInPark; + uint16_t Unk198C9E; + money32 Expenditure[Limits::ExpenditureTableMonthCount][Limits::ExpenditureTypeCount]; + uint32_t GuestsInPark2; + uint8_t Unk199024; + colour_t HandymanColour; + colour_t MechanicColour; + colour_t SecurityGuardColour; + uint8_t AvailableScenery[128]; + uint16_t AvailableBanners; + uint8_t Unk1990AA[94]; + uint16_t ParkRating; + uint8_t ParkRatingHistory[32]; + uint8_t GuestsInParkHistory[32]; + uint8_t ResearchPriority; + uint8_t ResearchProgressStage; + uint8_t LastResearchItem; + uint8_t LastResearchRide; + uint8_t LastResearchType; + uint8_t LastResearchFlags; + ResearchItem ResearchItems[200]; + uint8_t NextResearchItem; + uint8_t NextResearchRide; + uint8_t NextResearchType; + uint8_t NextResearchFlags; + uint16_t ResearchProgress; + uint8_t NextResearchCategory; + uint8_t NextResearchExpectedDay; + uint8_t NextResearchExpectedMonth; + uint8_t GuestInitialHappiness; + uint16_t ParkSize; + uint16_t GuestGenerationProbability; + money16 TotalRideValueForMoney; + money32 MaxLoan; + money16 GuestInitialCash; + uint8_t GuestInitialHunger; + uint8_t GuestInitialThirst; + uint8_t ScenarioObjectiveType; + uint8_t ScenarioObjectiveYears; + uint16_t Unk199552; + money32 ScenarioObjectiveCurrency; + uint16_t ScenarioObjectiveNumGuests; + uint8_t MarketingStatus[20]; + uint8_t MarketingAssoc[20]; + uint8_t Unk199582[2]; + money32 CashHistory[Limits::FinanceGraphSize]; + money32 TotalExpenditure; + money32 Profit; + uint8_t Unk199788[8]; + money32 WeeklyProfitHistory[Limits::FinanceGraphSize]; + money32 ParkValue; + money32 ParkValueHistory[Limits::FinanceGraphSize]; + money32 CompletedCompanyValue; + uint32_t NumAdmissions; + money32 AdmissionTotalIncome; + money32 CompanyValue; + uint8_t ThoughtTimer[16]; + RCT12Award Awards[Limits::MaxAwards]; + money16 LandPrice; + money16 ConstructionRightsPrice; + uint16_t Unk199BCC; + uint16_t Unk199BCE; + uint32_t Unk199BD0; char username[64]; - uint32_t game_version; - money32 objective_completion_company_value; - uint32_t finance_checksum; - uint16_t num_rides; - uint16_t cheat_detection_neg_num_rides; - uint16_t cheat_detection_max_owned_tiles; - uint16_t cheat_detection_neg_max_owned_tiles; - uint32_t finance_checksum_3; - uint32_t scenario_slot_index_checksum; - char scenario_winner[32]; - uint32_t finance_checksum_2; - char copyright_notice[40]; - uint16_t cheat_detection_sv6_sc4[4]; - uint16_t unk_199C84; - uint16_t unk_199C86; - uint16_t map_size_units; - uint16_t map_size_unk_b; - uint16_t map_size; - uint16_t map_size_max_xy; - uint32_t same_price_throughout; - uint16_t unk_199C94; - uint8_t unk_199C96[3]; - uint8_t water_colour; - uint16_t unk_199C9A; - ResearchItem research_items_LL[180]; - uint8_t unk_19A020[5468]; - RCT12Banner banners[Limits::MaxBanners]; - char string_table[Limits::MaxUserStrings][Limits::MaxUserStringLength]; - uint32_t game_time_counter; - Ride rides[Limits::MaxRidesInPark]; - uint16_t unk_game_time_counter; - int16_t view_x; - int16_t view_y; - uint8_t view_zoom; - uint8_t view_rotation; - RCT12MapAnimation map_animations[Limits::MaxAnimatedObjects]; - uint32_t num_map_animations; - uint8_t unk_1CADBC[12]; - uint16_t scrolling_text_step; - uint32_t unk_1CADCA; - uint16_t unk_1CADCE; - uint8_t unk_1CADD0[116]; - RCT12RideMeasurement ride_measurements[8]; - uint32_t next_guest_index; - uint16_t game_counter_5; - uint8_t patrol_areas[(Limits::MaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; - uint8_t staff_modes[Limits::MaxStaff]; - uint8_t unk_1F431E[4]; - uint8_t unk_1F4322[8]; - uint8_t climate; - uint8_t unk_1F432B; - uint16_t climate_timer; - uint8_t weather; - uint8_t target_weather; - uint8_t temperature; - uint8_t target_temperature; - uint8_t thunder_frequency; - uint8_t target_thunder_frequency; - uint8_t weather_gloom; - uint8_t target_weather_gloom; - uint8_t rain; - uint8_t target_rain; - rct12_news_item messages[Limits::MaxNewsItems]; - char scenario_name[62]; - uint16_t scenario_slot_index; - uint32_t scenario_flags; - uint8_t unk_1F8358[432]; - uint32_t expansion_pack_checksum; + uint32_t GameVersion; + money32 ObjectiveCompletionCompanyValue; + uint32_t FinanceChecksum; + uint16_t NumRides; + uint16_t CheatDetectionNegNumRides; + uint16_t CheatDetectionMaxOwnedTiles; + uint16_t CheatDetectionNegMaxOwnedTiles; + uint32_t FinanceChecksum3; + uint32_t ScenarioSlotIndexChecksum; + char ScenarioWinner[32]; + uint32_t FinanceChecksum2; + char CopyrightNotice[40]; + uint16_t CheatDetectionSV6SC4[4]; + uint16_t Unk199C84; + uint16_t Unk199C86; + uint16_t MapSizeUnits; + uint16_t MapSizeUnkB; + uint16_t MapSize; + uint16_t MapSizeMaxXY; + uint32_t SamePriceThroughout; + uint16_t Unk199C94; + uint8_t Unk199C96[3]; + uint8_t WaterColour; + uint16_t Unk199C9A; + ResearchItem ResearchItemsLL[180]; + uint8_t Unk19A020[5468]; + RCT12Banner Banners[Limits::MaxBanners]; + char StringTable[Limits::MaxUserStrings][Limits::MaxUserStringLength]; + uint32_t GameTimeCounter; + Ride Rides[Limits::MaxRidesInPark]; + uint16_t UnkGameTimeCounter; + int16_t ViewX; + int16_t ViewY; + uint8_t ViewZoom; + uint8_t ViewRotation; + RCT12MapAnimation MapAnimations[Limits::MaxAnimatedObjects]; + uint32_t NumMapAnimations; + uint8_t Unk1CADBC[12]; + uint16_t ScrollingTextStep; + uint32_t Unk1CADCA; + uint16_t Unk1CADCE; + uint8_t Unk1CADD0[116]; + 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 Unk1F431E[4]; + uint8_t Unk1F4322[8]; + uint8_t Climate; + uint8_t Unk1F432B; + uint16_t ClimateTimer; + uint8_t Weather; + uint8_t TargetWeather; + uint8_t Temperature; + uint8_t TargetTemperature; + uint8_t ThunderFrequency; + uint8_t TargetThunderFrequency; + uint8_t WeatherGloom; + uint8_t TargetWeatherGloom; + uint8_t Rain; + uint8_t TargetRain; + RCT12NewsItem Messages[Limits::MaxNewsItems]; + char ScenarioName[62]; + uint16_t ScenarioSlotIndex; + uint32_t ScenarioFlags; + uint8_t Unk1F8358[432]; + uint32_t ExpansionPackChecksum; }; assert_struct_size(S4, 0x1F850C); @@ -791,44 +791,44 @@ namespace RCT1 */ struct TD4 { - RideType type; // 0x00 - uint8_t vehicle_type; - uint32_t flags; // 0x02 - uint8_t mode; // 0x06 - uint8_t version_and_colour_scheme; // 0x07 0b0000_VVCC - RCT12VehicleColour vehicle_colours[Limits::MaxTrainsPerRide]; // 0x08 - uint8_t track_spine_colour_v0; // 0x20 - uint8_t track_rail_colour_v0; // 0x21 - uint8_t track_support_colour_v0; // 0x22 - uint8_t depart_flags; // 0x23 - uint8_t number_of_trains; // 0x24 - uint8_t number_of_cars_per_train; // 0x25 - uint8_t min_waiting_time; // 0x26 - uint8_t max_waiting_time; // 0x27 + RideType Type; // 0x00 + uint8_t 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 union { - uint8_t operation_setting; - uint8_t launch_speed; + uint8_t OperationSetting; + uint8_t LaunchSpeed; uint8_t NumLaps; - uint8_t max_people; + uint8_t MaxPeople; }; - int8_t max_speed; // 0x29 - int8_t average_speed; // 0x2A - uint16_t ride_length; // 0x2B - uint8_t max_positive_vertical_g; // 0x2D - int8_t max_negative_vertical_g; // 0x2C - uint8_t max_lateral_g; // 0x2F + int8_t MaxSpeed; // 0x29 + int8_t AverageSpeed; // 0x2A + uint16_t RideLength; // 0x2B + uint8_t MaxPositiveVerticalG; // 0x2D + int8_t MaxNegativeVerticalG; // 0x2C + uint8_t MaxLateralG; // 0x2F union { - uint8_t num_inversions; // 0x30 - uint8_t num_holes; // 0x30 + uint8_t NumInversions; // 0x30 + uint8_t NumHoles; // 0x30 }; - uint8_t num_drops; // 0x31 - uint8_t highest_drop_height; // 0x32 - uint8_t excitement; // 0x33 - uint8_t intensity; // 0x34 - uint8_t nausea; // 0x35 - money16 upkeep_cost; // 0x36 + uint8_t NumDrops; // 0x31 + uint8_t HighestDropHeight; // 0x32 + uint8_t Excitement; // 0x33 + uint8_t Intensity; // 0x34 + uint8_t Nausea; // 0x35 + money16 UpkeepCost; // 0x36 }; assert_struct_size(TD4, 0x38); @@ -839,12 +839,12 @@ namespace RCT1 */ struct TD4AA : public TD4 { - uint8_t track_spine_colour[Limits::NumColourSchemes]; // 0x38 - uint8_t track_rail_colour[Limits::NumColourSchemes]; // 0x3C - uint8_t track_support_colour[Limits::NumColourSchemes]; // 0x40 - uint8_t flags2; // 0x44 + uint8_t TrackSpineColour[Limits::NumColourSchemes]; // 0x38 + uint8_t TrackRailColour[Limits::NumColourSchemes]; // 0x3C + uint8_t TrackSupportColour[Limits::NumColourSchemes]; // 0x40 + uint8_t Flags2; // 0x44 - uint8_t pad_45[0x7F]; // 0x45 + uint8_t Pad45[0x7F]; // 0x45 }; assert_struct_size(TD4AA, 0xC4); @@ -1189,6 +1189,8 @@ namespace RCT1 STEEL_RC_FRONT = 0, STEEL_RC_CARRIAGE = 1, WOODEN_RC_TRAIN = 2, + INVERTED_RC_TRAIN = 3, + LADYBIRD_TRAIN = 5, MONORAIL_CARRIAGE = 10, MONORAIL_FRONT = 11, MONORAIL_BACK = 12, @@ -1196,6 +1198,7 @@ namespace RCT1 MINIATURE_RAILWAY_LOCOMOTIVE = 16, MINIATURE_RAILWAY_CARRIAGE = 17, WOODEN_RC_TRAIN_BACKWARDS = 20, + ROCKET_CAR = 21, STEEL_RC_REVERSED_FRONT = 23, STEEL_RC_REVERSED_CARRIAGE = 24, MINE_TRAIN_FRONT = 35, @@ -1204,6 +1207,7 @@ namespace RCT1 CORKSCREW_RC_CARRIAGE = 39, LOG_FLUME_BOAT = 45, + LOG_TRAIN = 60, LOG_FLUME_BOAT_REVERSED = 61, GHOST_TRAIN_CAR = 63, TWISTER_RC_SPOILER = 64, diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 2e608ada20..f8951077cc 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -61,11 +61,9 @@ #include "../world/Climate.h" #include "../world/Entrance.h" #include "../world/Footpath.h" -#include "../world/LargeScenery.h" #include "../world/MapAnimation.h" #include "../world/Park.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/TilePointerIndex.hpp" #include "../world/Wall.h" @@ -77,7 +75,7 @@ #include #include -static constexpr const ObjectEntryIndex OBJECT_ENTRY_INDEX_IGNORE = 254; +static constexpr const ObjectEntryIndex ObjectEntryIndexIgnore = 254; using namespace OpenRCT2; @@ -128,7 +126,7 @@ namespace RCT1 IScenarioRepository* _scenarioRepository = GetScenarioRepository(); public: - ParkLoadResult Load(const utf8* path) override + ParkLoadResult Load(const u8string& path) override { const auto extension = Path::GetExtension(path); if (String::Equals(extension, ".sc4", true)) @@ -143,14 +141,14 @@ namespace RCT1 throw std::runtime_error("Invalid RCT1 park extension."); } - ParkLoadResult LoadSavedGame(const utf8* path, bool skipObjectCheck = false) override + ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) override { auto fs = FileStream(path, FILE_MODE_OPEN); auto result = LoadFromStream(&fs, false, skipObjectCheck, path); return result; } - ParkLoadResult LoadScenario(const utf8* path, bool skipObjectCheck = false) override + ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) override { auto fs = FileStream(path, FILE_MODE_OPEN); auto result = LoadFromStream(&fs, true, skipObjectCheck, path); @@ -158,12 +156,12 @@ namespace RCT1 } ParkLoadResult LoadFromStream( - IStream* stream, bool isScenario, [[maybe_unused]] bool skipObjectCheck, const utf8* path) override + IStream* stream, bool isScenario, [[maybe_unused]] bool skipObjectCheck, const u8string& path) override { _s4 = *ReadAndDecodeS4(stream, isScenario); _s4Path = path; _isScenario = isScenario; - _gameVersion = sawyercoding_detect_rct1_version(_s4.game_version) & FILE_VERSION_MASK; + _gameVersion = SawyerCodingDetectRCT1Version(_s4.GameVersion) & FILE_VERSION_MASK; // Only determine what objects we required to import this saved game InitialiseEntryMaps(); @@ -194,43 +192,43 @@ namespace RCT1 FixUrbanPark(); CountBlockSections(); SetDefaultNames(); - determine_ride_entrance_and_exit_locations(); + DetermineRideEntranceAndExitLocations(); - research_determine_first_of_type(); + ResearchDetermineFirstOfType(); CheatsReset(); ClearRestrictedScenery(); RestrictAllMiscScenery(); } - bool GetDetails(scenario_index_entry* dst) override + bool GetDetails(ScenarioIndexEntry* dst) override { *dst = {}; - source_desc desc; + SourceDescriptor desc; // If no entry is found, this is a custom scenario. - bool isOfficial = ScenarioSources::TryGetById(_s4.scenario_slot_index, &desc); + bool isOfficial = ScenarioSources::TryGetById(_s4.ScenarioSlotIndex, &desc); - dst->category = desc.category; - dst->source_game = ScenarioSource{ desc.source }; - dst->source_index = desc.index; - dst->sc_id = desc.id; + dst->Category = desc.category; + dst->SourceGame = ScenarioSource{ desc.source }; + dst->SourceIndex = desc.index; + dst->ScenarioId = desc.id; - dst->objective_type = _s4.scenario_objective_type; - dst->objective_arg_1 = _s4.scenario_objective_years; + dst->ObjectiveType = _s4.ScenarioObjectiveType; + dst->ObjectiveArg1 = _s4.ScenarioObjectiveYears; // RCT1 used another way of calculating park value. - if (_s4.scenario_objective_type == OBJECTIVE_PARK_VALUE_BY) - dst->objective_arg_2 = CorrectRCT1ParkValue(_s4.scenario_objective_currency); + if (_s4.ScenarioObjectiveType == OBJECTIVE_PARK_VALUE_BY) + dst->ObjectiveArg2 = CorrectRCT1ParkValue(_s4.ScenarioObjectiveCurrency); else - dst->objective_arg_2 = _s4.scenario_objective_currency; - dst->objective_arg_3 = _s4.scenario_objective_num_guests; + dst->ObjectiveArg2 = _s4.ScenarioObjectiveCurrency; + dst->ObjectiveArg3 = _s4.ScenarioObjectiveNumGuests; // This does not seem to be saved in the objective arguments, so look up the ID from the available rides instead. - if (_s4.scenario_objective_type == OBJECTIVE_BUILD_THE_BEST) + if (_s4.ScenarioObjectiveType == OBJECTIVE_BUILD_THE_BEST) { - dst->objective_arg_3 = GetBuildTheBestRideId(); + dst->ObjectiveArg3 = GetBuildTheBestRideId(); } - auto name = rct2_to_utf8(_s4.scenario_name, RCT2LanguageId::EnglishUK); + auto name = RCT2StringToUTF8(_s4.ScenarioName, RCT2LanguageId::EnglishUK); std::string details; // TryGetById won't set this property if the scenario is not recognised, @@ -240,42 +238,42 @@ namespace RCT1 desc.title = name.c_str(); } - String::Set(dst->internal_name, sizeof(dst->internal_name), desc.title); + String::Set(dst->InternalName, sizeof(dst->InternalName), desc.title); StringId localisedStringIds[3]; - if (language_get_localised_scenario_strings(desc.title, localisedStringIds)) + if (LanguageGetLocalisedScenarioStrings(desc.title, localisedStringIds)) { if (localisedStringIds[0] != STR_NONE) { - name = String::ToStd(language_get_string(localisedStringIds[0])); + name = String::ToStd(LanguageGetString(localisedStringIds[0])); } if (localisedStringIds[2] != STR_NONE) { - details = String::ToStd(language_get_string(localisedStringIds[2])); + details = String::ToStd(LanguageGetString(localisedStringIds[2])); } } - String::Set(dst->name, sizeof(dst->name), name.c_str()); - String::Set(dst->details, sizeof(dst->details), details.c_str()); + String::Set(dst->Name, sizeof(dst->Name), name.c_str()); + String::Set(dst->Details, sizeof(dst->Details), details.c_str()); return true; } - money32 CorrectRCT1ParkValue(money32 oldParkValue) + money64 CorrectRCT1ParkValue(money32 oldParkValue) { if (oldParkValue == MONEY32_UNDEFINED) { - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; } if (_parkValueConversionFactor == 0) { - if (_s4.park_value != 0) + if (_s4.ParkValue != 0) { // Use the ratio between the old and new park value to calcute the ratio to // use for the park value history and the goal. auto& park = GetContext()->GetGameState()->GetPark(); - _parkValueConversionFactor = (park.CalculateParkValue() * 10) / _s4.park_value; + _parkValueConversionFactor = (park.CalculateParkValue() * 10) / _s4.ParkValue; } else { @@ -296,14 +294,14 @@ namespace RCT1 auto decodedData = std::make_unique(sizeof(S4)); size_t decodedSize; - int32_t fileType = sawyercoding_detect_file_type(data.get(), dataSize); + int32_t fileType = SawyerCodingDetectFileType(data.get(), dataSize); if (isScenario && (fileType & FILE_VERSION_MASK) != FILE_VERSION_RCT1) { - decodedSize = sawyercoding_decode_sc4(data.get(), decodedData.get(), dataSize, sizeof(S4)); + decodedSize = SawyerCodingDecodeSC4(data.get(), decodedData.get(), dataSize, sizeof(S4)); } else { - decodedSize = sawyercoding_decode_sv4(data.get(), decodedData.get(), dataSize, sizeof(S4)); + decodedSize = SawyerCodingDecodeSV4(data.get(), decodedData.get(), dataSize, sizeof(S4)); } if (decodedSize == sizeof(S4)) @@ -320,7 +318,7 @@ namespace RCT1 // Avoid reusing the value used for last import _parkValueConversionFactor = 0; - uint16_t mapSize = _s4.map_size == 0 ? Limits::MaxMapSize : _s4.map_size; + uint16_t mapSize = _s4.MapSize == 0 ? Limits::MaxMapSize : _s4.MapSize; gScenarioFileName = GetRCT1ScenarioName(); @@ -334,13 +332,13 @@ namespace RCT1 std::string GetRCT1ScenarioName() { - const scenario_index_entry* scenarioEntry = _scenarioRepository->GetByInternalName(_s4.scenario_name); + const ScenarioIndexEntry* scenarioEntry = _scenarioRepository->GetByInternalName(_s4.ScenarioName); if (scenarioEntry == nullptr) { return ""; } - return Path::GetFileName(scenarioEntry->path); + return Path::GetFileName(scenarioEntry->Path); } void InitialiseEntryMaps() @@ -429,33 +427,33 @@ namespace RCT1 { const ResearchItem* researchItem = &researchList[i]; - if (researchItem->flags == RCT1_RESEARCH_FLAGS_SEPARATOR) + if (researchItem->Flags == RCT1ResearchFlagsSeparator) { - if (researchItem->item == RCT1_RESEARCH_END) + if (researchItem->Item == RCT1_RESEARCH_END) { break; } - if (researchItem->item == RCT1_RESEARCH_END_AVAILABLE - || researchItem->item == RCT1_RESEARCH_END_RESEARCHABLE) + if (researchItem->Item == RCT1_RESEARCH_END_AVAILABLE + || researchItem->Item == RCT1_RESEARCH_END_RESEARCHABLE) { continue; } } - switch (researchItem->type) + switch (researchItem->Type) { case RCT1_RESEARCH_TYPE_THEME: - AddEntriesForSceneryTheme(researchItem->item); + AddEntriesForSceneryTheme(researchItem->Item); break; case RCT1_RESEARCH_TYPE_RIDE: - AddEntryForRideType(static_cast(researchItem->item)); + AddEntryForRideType(static_cast(researchItem->Item)); break; case RCT1_RESEARCH_TYPE_VEHICLE: // For some bizarre reason, RCT1 research lists contain vehicles that aren't actually researched. // Extra bizarrely, this does not seem to apply to Loopy Landscapes saves/scenarios. - if (rideTypeInResearch[researchItem->related_ride] || _gameVersion == FILE_VERSION_RCT1_LL) + if (rideTypeInResearch[researchItem->RelatedRide] || _gameVersion == FILE_VERSION_RCT1_LL) { - AddEntryForVehicleType(static_cast(researchItem->related_ride), researchItem->item); + AddEntryForVehicleType(static_cast(researchItem->RelatedRide), researchItem->Item); } break; } @@ -466,7 +464,7 @@ namespace RCT1 { size_t maxTiles = Limits::MaxMapSize * Limits::MaxMapSize; size_t tileIndex = 0; - RCT12TileElement* tileElement = _s4.tile_elements; + RCT12TileElement* tileElement = _s4.TileElements; while (tileIndex < maxTiles) { @@ -528,15 +526,15 @@ namespace RCT1 void AddAvailableEntriesFromRides() { - for (size_t i = 0; i < std::size(_s4.rides); i++) + for (size_t i = 0; i < std::size(_s4.Rides); i++) { - auto ride = &_s4.rides[i]; - if (ride->type != RideType::Null) + auto ride = &_s4.Rides[i]; + if (ride->Type != RideType::Null) { - if (RCT1::RideTypeUsesVehicles(ride->type)) - AddEntryForVehicleType(ride->type, ride->vehicle_type); + if (RCT1::RideTypeUsesVehicles(ride->Type)) + AddEntryForVehicleType(ride->Type, ride->VehicleType); else - AddEntryForRideType(ride->type); + AddEntryForRideType(ride->Type); } } } @@ -581,7 +579,7 @@ namespace RCT1 } else { - log_error("Cannot find object %s", objectName); + LOG_ERROR("Cannot find object %s", objectName); } } } @@ -596,7 +594,7 @@ namespace RCT1 } else { - entryName = RCT1::GetWaterObject(_s4.water_colour); + entryName = RCT1::GetWaterObject(_s4.WaterColour); } _waterEntry.GetOrAddEntry(entryName); } @@ -709,7 +707,7 @@ namespace RCT1 if (sceneryThemeType == RCT1_SCENERY_THEME_GENERAL || sceneryThemeType == RCT1_SCENERY_THEME_JUMPING_FOUNTAINS || sceneryThemeType == RCT1_SCENERY_THEME_GARDEN_CLOCK) { - _sceneryThemeTypeToEntryMap[sceneryThemeType] = OBJECT_ENTRY_INDEX_IGNORE; + _sceneryThemeTypeToEntryMap[sceneryThemeType] = ObjectEntryIndexIgnore; } else { @@ -774,10 +772,10 @@ namespace RCT1 { for (int32_t i = 0; i < Limits::MaxRidesInPark; i++) { - if (_s4.rides[i].type != RideType::Null) + if (_s4.Rides[i].Type != RideType::Null) { const auto rideId = RideId::FromUnderlying(i); - ImportRide(GetOrAllocateRide(rideId), &_s4.rides[i], rideId); + ImportRide(RideAllocateAtIndex(rideId), &_s4.Rides[i], rideId); } } } @@ -788,43 +786,43 @@ namespace RCT1 dst->id = rideIndex; // This is a peculiarity of this exact version number, which only Heide-Park seems to use. - if (_s4.game_version == 110018 && src->type == RideType::InvertedRollerCoaster) + if (_s4.GameVersion == 110018 && src->Type == RideType::InvertedRollerCoaster) { dst->type = RIDE_TYPE_COMPACT_INVERTED_COASTER; } else { - dst->type = RCT1::GetRideType(src->type, src->vehicle_type); + dst->type = RCT1::GetRideType(src->Type, src->VehicleType); } - if (RCT1::RideTypeUsesVehicles(src->type)) + if (RCT1::RideTypeUsesVehicles(src->Type)) { - dst->subtype = _vehicleTypeToRideEntryMap[src->vehicle_type]; + dst->subtype = _vehicleTypeToRideEntryMap[src->VehicleType]; } else { - dst->subtype = _rideTypeToRideEntryMap[EnumValue(src->type)]; + dst->subtype = _rideTypeToRideEntryMap[EnumValue(src->Type)]; } - rct_ride_entry* rideEntry = get_ride_entry(dst->subtype); + const auto* rideEntry = GetRideEntryByIndex(dst->subtype); // This can happen with hacked parks if (rideEntry == nullptr) { - log_warning("Discarding ride with invalid ride entry"); + LOG_WARNING("Discarding ride with invalid ride entry"); dst->type = RIDE_TYPE_NULL; return; } // Ride name - if (is_user_string_id(src->name)) + if (IsUserStringID(src->Name)) { - dst->custom_name = GetUserString(src->name); + dst->custom_name = GetUserString(src->Name); } - dst->status = static_cast(src->status); + dst->status = static_cast(src->Status); // Flags - dst->lifecycle_flags = src->lifecycle_flags; + dst->lifecycle_flags = src->LifecycleFlags; // These flags were not in the base game if (_gameVersion == FILE_VERSION_RCT1) { @@ -834,50 +832,50 @@ namespace RCT1 } // Station - if (src->overall_view.IsNull()) + if (src->OverallView.IsNull()) { dst->overall_view.SetNull(); } else { - dst->overall_view = TileCoordsXY{ src->overall_view.x, src->overall_view.y }.ToCoordsXY(); + dst->overall_view = TileCoordsXY{ src->OverallView.x, src->OverallView.y }.ToCoordsXY(); } for (StationIndex::UnderlyingType i = 0; i < Limits::MaxStationsPerRide; i++) { auto& dstStation = dst->GetStation(StationIndex::FromUnderlying(i)); - if (src->station_starts[i].IsNull()) + if (src->StationStarts[i].IsNull()) { dstStation.Start.SetNull(); } else { - auto tileStartLoc = TileCoordsXY{ src->station_starts[i].x, src->station_starts[i].y }; + auto tileStartLoc = TileCoordsXY{ src->StationStarts[i].x, src->StationStarts[i].y }; dstStation.Start = tileStartLoc.ToCoordsXY(); } - dstStation.SetBaseZ(src->station_height[i] * Limits::CoordsZStep); - dstStation.Length = src->station_length[i]; - dstStation.Depart = src->station_light[i]; + dstStation.SetBaseZ(src->StationHeights[i] * Limits::CoordsZStep); + dstStation.Length = src->StationLengths[i]; + dstStation.Depart = src->StationLights[i]; - dstStation.TrainAtStation = src->station_depart[i]; + dstStation.TrainAtStation = src->StationDeparts[i]; // Direction is fixed later. - if (src->entrance[i].IsNull()) + if (src->Entrances[i].IsNull()) dstStation.Entrance.SetNull(); else - dstStation.Entrance = { src->entrance[i].x, src->entrance[i].y, src->station_height[i] / 2, 0 }; + dstStation.Entrance = { src->Entrances[i].x, src->Entrances[i].y, src->StationHeights[i] / 2, 0 }; - if (src->exit[i].IsNull()) + if (src->Exits[i].IsNull()) dstStation.Exit.SetNull(); else - dstStation.Exit = { src->exit[i].x, src->exit[i].y, src->station_height[i] / 2, 0 }; + dstStation.Exit = { src->Exits[i].x, src->Exits[i].y, src->StationHeights[i] / 2, 0 }; - dstStation.QueueTime = src->queue_time[i]; - dstStation.LastPeepInQueue = EntityId::FromUnderlying(src->last_peep_in_queue[i]); - dstStation.QueueLength = src->num_peeps_in_queue[i]; + dstStation.QueueTime = src->QueueTime[i]; + dstStation.LastPeepInQueue = EntityId::FromUnderlying(src->LastPeepInQueue[i]); + dstStation.QueueLength = src->NumPeepsInQueue[i]; - dstStation.SegmentTime = src->time[i]; - dstStation.SegmentLength = src->length[i]; + dstStation.SegmentTime = src->Time[i]; + dstStation.SegmentLength = src->Length[i]; } // All other values take 0 as their default. Since they're already memset to that, no need to do it again. for (int32_t i = Limits::MaxStationsPerRide; i < OpenRCT2::Limits::MaxStationsPerRide; i++) @@ -890,12 +888,12 @@ namespace RCT1 dstStation.LastPeepInQueue = EntityId::GetNull(); } - dst->num_stations = src->num_stations; + dst->num_stations = src->NumStations; // Vehicle links (indexes converted later) for (int32_t i = 0; i < Limits::MaxTrainsPerRide; i++) { - dst->vehicles[i] = EntityId::FromUnderlying(src->vehicles[i]); + dst->vehicles[i] = EntityId::FromUnderlying(src->Vehicles[i]); } for (int32_t i = Limits::MaxTrainsPerRide; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) { @@ -903,19 +901,19 @@ namespace RCT1 } dst->NumTrains = src->NumTrains; - dst->num_cars_per_train = src->num_cars_per_train + rideEntry->zero_cars; + dst->num_cars_per_train = src->NumCarsPerTrain + rideEntry->zero_cars; dst->ProposedNumTrains = src->NumTrains; - dst->max_trains = src->max_trains; - dst->proposed_num_cars_per_train = src->num_cars_per_train + rideEntry->zero_cars; - dst->special_track_elements = src->special_track_elements; - dst->num_sheltered_sections = src->num_sheltered_sections; - dst->sheltered_length = src->sheltered_length; + dst->max_trains = src->MaxTrains; + dst->proposed_num_cars_per_train = src->NumCarsPerTrain + rideEntry->zero_cars; + dst->special_track_elements = src->SpecialTrackElements; + dst->num_sheltered_sections = src->NumShelteredSections; + dst->sheltered_length = src->ShelteredLength; // Operation - dst->depart_flags = src->depart_flags; - dst->min_waiting_time = src->min_waiting_time; - dst->max_waiting_time = src->max_waiting_time; - dst->operation_option = src->operation_option; + dst->depart_flags = src->DepartFlags; + dst->min_waiting_time = src->MinWaitingTime; + dst->max_waiting_time = src->MaxWaitingTime; + dst->operation_option = src->OperationOption; dst->num_circuits = 1; dst->MinCarsPerTrain = rideEntry->min_cars_in_train; dst->MaxCarsPerTrain = rideEntry->max_cars_in_train; @@ -937,9 +935,9 @@ namespace RCT1 // Only merry-go-round and dodgems had music and used // the same flag as synchronise stations for the option to enable it - if (src->type == RideType::MerryGoRound || src->type == RideType::Dodgems) + if (src->Type == RideType::MerryGoRound || src->Type == RideType::Dodgems) { - if (src->depart_flags & RCT1_RIDE_DEPART_PLAY_MUSIC) + if (src->DepartFlags & RCT1_RIDE_DEPART_PLAY_MUSIC) { dst->depart_flags &= ~RCT1_RIDE_DEPART_PLAY_MUSIC; dst->lifecycle_flags |= RIDE_LIFECYCLE_MUSIC; @@ -948,112 +946,111 @@ namespace RCT1 } else { - dst->music = src->music; + dst->music = src->Music; } } - if (src->operating_mode == RCT1_RIDE_MODE_POWERED_LAUNCH) + if (src->OperatingMode == RCT1_RIDE_MODE_POWERED_LAUNCH) { // Launched rides never passed through the station in RCT1. dst->mode = RideMode::PoweredLaunch; } else { - dst->mode = static_cast(src->operating_mode); + dst->mode = static_cast(src->OperatingMode); } SetRideColourScheme(dst, src); // Maintenance - dst->build_date = static_cast(src->build_date); - dst->inspection_interval = src->inspection_interval; - dst->last_inspection = src->last_inspection; - dst->reliability = src->reliability; - dst->unreliability_factor = src->unreliability_factor; - dst->downtime = src->downtime; - dst->breakdown_reason = src->breakdown_reason; - dst->mechanic_status = src->mechanic_status; - dst->mechanic = EntityId::FromUnderlying(src->mechanic); - dst->breakdown_reason_pending = src->breakdown_reason_pending; - dst->inspection_station = StationIndex::FromUnderlying(src->inspection_station); - dst->broken_car = src->broken_car; - dst->broken_vehicle = src->broken_vehicle; + dst->build_date = static_cast(src->BuildDate); + dst->inspection_interval = src->InspectionInterval; + dst->last_inspection = src->LastInspection; + dst->reliability = src->Reliability; + dst->unreliability_factor = src->UnreliabilityFactor; + dst->downtime = src->Downtime; + dst->breakdown_reason = src->BreakdownReason; + dst->mechanic_status = src->MechanicStatus; + dst->mechanic = EntityId::FromUnderlying(src->Mechanic); + dst->breakdown_reason_pending = src->BreakdownReasonPending; + dst->inspection_station = StationIndex::FromUnderlying(src->InspectionStation); + dst->broken_car = src->BrokenCar; + dst->broken_vehicle = src->BrokenVehicle; // Measurement data - dst->excitement = src->excitement; - dst->intensity = src->intensity; - dst->nausea = src->nausea; + dst->excitement = src->Excitement; + dst->intensity = src->Intensity; + dst->nausea = src->Nausea; - dst->max_speed = src->max_speed; - dst->average_speed = src->average_speed; + dst->max_speed = src->MaxSpeed; + dst->average_speed = src->AverageSpeed; - dst->max_positive_vertical_g = src->max_positive_vertical_g; - dst->max_negative_vertical_g = src->max_negative_vertical_g; - dst->max_lateral_g = src->max_lateral_g; - dst->previous_lateral_g = src->previous_lateral_g; - dst->previous_vertical_g = src->previous_vertical_g; - dst->turn_count_banked = src->turn_count_banked; - dst->turn_count_default = src->turn_count_default; - dst->turn_count_sloped = src->turn_count_sloped; - dst->drops = src->num_drops; - dst->start_drop_height = src->start_drop_height / 2; - dst->highest_drop_height = src->highest_drop_height / 2; + dst->max_positive_vertical_g = src->MaxPositiveVerticalG; + dst->max_negative_vertical_g = src->MaxNegativeVerticalG; + dst->max_lateral_g = src->MaxLateralG; + dst->previous_lateral_g = src->PreviousLateralG; + dst->previous_vertical_g = src->PreviousVerticalG; + dst->turn_count_banked = src->TurnCountBanked; + dst->turn_count_default = src->TurnCountDefault; + dst->turn_count_sloped = src->TurnCountSloped; + dst->drops = 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->num_inversions & 0x1F; + dst->holes = src->NumInversions & 0x1F; else - dst->inversions = src->num_inversions & 0x1F; - dst->sheltered_eighths = src->num_inversions >> 5; - dst->boat_hire_return_direction = src->boat_hire_return_direction; - dst->boat_hire_return_position = { src->boat_hire_return_position.x, src->boat_hire_return_position.y }; - dst->chairlift_bullwheel_rotation = src->chairlift_bullwheel_rotation; + dst->inversions = src->NumInversions & 0x1F; + dst->sheltered_eighths = src->NumInversions >> 5; + dst->boat_hire_return_direction = src->BoatHireReturnDirection; + dst->boat_hire_return_position = { src->BoatHireReturnPosition.x, src->BoatHireReturnPosition.y }; + dst->chairlift_bullwheel_rotation = src->ChairliftBullwheelRotation; for (int i = 0; i < 2; i++) { - dst->ChairliftBullwheelLocation[i] = { src->chairlift_bullwheel_location[i].x, - src->chairlift_bullwheel_location[i].y, - src->chairlift_bullwheel_z[i] / 2 }; + dst->ChairliftBullwheelLocation[i] = { src->ChairliftBullwheelLocation[i].x, + src->ChairliftBullwheelLocation[i].y, src->ChairliftBullwheelZ[i] / 2 }; } - if (src->cur_test_track_location.IsNull()) + if (src->CurTestTrackLocation.IsNull()) { dst->CurTestTrackLocation.SetNull(); } else { - dst->CurTestTrackLocation = { src->cur_test_track_location.x, src->cur_test_track_location.y, - src->cur_test_track_z / 2 }; + dst->CurTestTrackLocation = { src->CurTestTrackLocation.x, src->CurTestTrackLocation.y, + src->CurTestTrackZ / 2 }; } - dst->testing_flags = src->testing_flags; - dst->current_test_segment = src->current_test_segment; + dst->testing_flags = src->TestingFlags; + dst->current_test_segment = src->CurrentTestSegment; dst->current_test_station = StationIndex::GetNull(); - dst->average_speed_test_timeout = src->average_speed_test_timeout; - dst->slide_in_use = src->slide_in_use; - dst->slide_peep_t_shirt_colour = RCT1::GetColour(src->slide_peep_t_shirt_colour); - dst->spiral_slide_progress = src->spiral_slide_progress; + dst->average_speed_test_timeout = src->AverageSpeedTestTimeout; + dst->slide_in_use = src->SlideInUse; + dst->slide_peep_t_shirt_colour = RCT1::GetColour(src->SlidePeepTshirtColour); + dst->spiral_slide_progress = src->SpiralSlideProgress; // Doubles as slide_peep - dst->maze_tiles = src->maze_tiles; + dst->maze_tiles = src->MazeTiles; // Finance / customers - dst->upkeep_cost = src->upkeep_cost; - dst->price[0] = src->price; - dst->price[1] = src->price_secondary; - dst->income_per_hour = ToMoney64(src->income_per_hour); - dst->total_customers = src->total_customers; - dst->profit = ToMoney64(src->profit); - dst->total_profit = ToMoney64(src->total_profit); - dst->value = src->value; - for (size_t i = 0; i < std::size(src->num_customers); i++) + dst->upkeep_cost = ToMoney64(src->UpkeepCost); + dst->price[0] = src->Price; + dst->price[1] = src->PriceSecondary; + dst->income_per_hour = ToMoney64(src->IncomePerHour); + dst->total_customers = src->TotalCustomers; + dst->profit = ToMoney64(src->Profit); + dst->total_profit = ToMoney64(src->TotalProfit); + dst->value = ToMoney64(src->Value); + for (size_t i = 0; i < std::size(src->NumCustomers); i++) { - dst->num_customers[i] = src->num_customers[i]; + dst->num_customers[i] = src->NumCustomers[i]; } - dst->satisfaction = src->satisfaction; - dst->satisfaction_time_out = src->satisfaction_time_out; - dst->satisfaction_next = src->satisfaction_next; - dst->popularity = src->popularity; - dst->popularity_next = src->popularity_next; - dst->popularity_time_out = src->popularity_time_out; + dst->satisfaction = src->Satisfaction; + dst->satisfaction_time_out = src->SatisfactionTimeOut; + dst->satisfaction_next = src->SatisfactionNext; + dst->popularity = src->Popularity; + dst->popularity_next = src->PopularityNext; + dst->popularity_time_out = src->PopularityTimeOut; - dst->num_riders = src->num_riders; + dst->num_riders = src->NumRiders; dst->music_tune_id = TUNE_ID_NULL; } @@ -1061,19 +1058,19 @@ namespace RCT1 void SetRideColourScheme(::Ride* dst, RCT1::Ride* src) { // Colours - dst->colour_scheme_type = src->colour_scheme; + dst->colour_scheme_type = src->ColourScheme; if (_gameVersion == FILE_VERSION_RCT1) { - dst->track_colour[0].main = RCT1::GetColour(src->track_primary_colour); - dst->track_colour[0].additional = RCT1::GetColour(src->track_secondary_colour); - dst->track_colour[0].supports = RCT1::GetColour(src->track_support_colour); + dst->track_colour[0].main = RCT1::GetColour(src->TrackPrimaryColour); + dst->track_colour[0].additional = RCT1::GetColour(src->TrackSecondaryColour); + dst->track_colour[0].supports = RCT1::GetColour(src->TrackSupportColour); // Balloons were always blue in the original RCT. - if (src->type == RideType::BalloonStall) + if (src->Type == RideType::BalloonStall) { dst->track_colour[0].main = COLOUR_LIGHT_BLUE; } - else if (src->type == RideType::RiverRapids) + else if (src->Type == RideType::RiverRapids) { dst->track_colour[0].main = COLOUR_WHITE; } @@ -1082,9 +1079,9 @@ namespace RCT1 { for (int i = 0; i < Limits::NumColourSchemes; i++) { - dst->track_colour[i].main = RCT1::GetColour(src->track_colour_main[i]); - dst->track_colour[i].additional = RCT1::GetColour(src->track_colour_additional[i]); - dst->track_colour[i].supports = RCT1::GetColour(src->track_colour_supports[i]); + dst->track_colour[i].main = RCT1::GetColour(src->TrackColourMain[i]); + dst->track_colour[i].additional = RCT1::GetColour(src->TrackColourAdditional[i]); + dst->track_colour[i].supports = RCT1::GetColour(src->TrackColourSupports[i]); } } @@ -1098,7 +1095,7 @@ namespace RCT1 } else { - dst->entrance_style = src->entrance_style; + dst->entrance_style = src->EntranceStyle; } } @@ -1113,14 +1110,14 @@ namespace RCT1 for (int i = 0; i < Limits::MaxTrainsPerRide; i++) { // RCT1 had no third colour - const auto colourSchemeCopyDescriptor = GetColourSchemeCopyDescriptor(src->vehicle_type); + const auto colourSchemeCopyDescriptor = GetColourSchemeCopyDescriptor(src->VehicleType); if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { - dst->vehicle_colours[i].Body = RCT1::GetColour(src->vehicle_colours[i].body); + dst->vehicle_colours[i].Body = RCT1::GetColour(src->VehicleColours[i].Body); } else if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_2) { - dst->vehicle_colours[i].Body = RCT1::GetColour(src->vehicle_colours[i].trim); + dst->vehicle_colours[i].Body = RCT1::GetColour(src->VehicleColours[i].Trim); } else { @@ -1129,11 +1126,11 @@ namespace RCT1 if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_1) { - dst->vehicle_colours[i].Trim = RCT1::GetColour(src->vehicle_colours[i].body); + dst->vehicle_colours[i].Trim = RCT1::GetColour(src->VehicleColours[i].Body); } else if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_2) { - dst->vehicle_colours[i].Trim = RCT1::GetColour(src->vehicle_colours[i].trim); + dst->vehicle_colours[i].Trim = RCT1::GetColour(src->VehicleColours[i].Trim); } else { @@ -1142,11 +1139,11 @@ namespace RCT1 if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_1) { - dst->vehicle_colours[i].Tertiary = RCT1::GetColour(src->vehicle_colours[i].body); + dst->vehicle_colours[i].Tertiary = RCT1::GetColour(src->VehicleColours[i].Body); } else if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_2) { - dst->vehicle_colours[i].Tertiary = RCT1::GetColour(src->vehicle_colours[i].trim); + dst->vehicle_colours[i].Tertiary = RCT1::GetColour(src->VehicleColours[i].Trim); } else { @@ -1157,22 +1154,22 @@ namespace RCT1 // In RCT1 and AA, the maze was always hedges. // LL has 4 types, like RCT2. For LL, only guard against invalid values. - if (src->type == RideType::HedgeMaze) + if (src->Type == RideType::HedgeMaze) { - if (_gameVersion < FILE_VERSION_RCT1_LL || src->track_colour_supports[0] > 3) + if (_gameVersion < FILE_VERSION_RCT1_LL || src->TrackColourSupports[0] > 3) dst->track_colour[0].supports = MAZE_WALL_TYPE_HEDGE; else - dst->track_colour[0].supports = src->track_colour_supports[0]; + dst->track_colour[0].supports = src->TrackColourSupports[0]; } } void ImportRideMeasurements() { - for (const auto& src : _s4.ride_measurements) + for (const auto& src : _s4.RideMeasurements) { - if (src.ride_index != RCT12_RIDE_ID_NULL) + if (src.RideIndex != RCT12_RIDE_ID_NULL) { - auto ride = get_ride(RCT12RideIdToOpenRCT2RideId(src.ride_index)); + auto ride = GetRide(RCT12RideIdToOpenRCT2RideId(src.RideIndex)); if (ride != nullptr) { ride->measurement = std::make_unique(); @@ -1184,47 +1181,47 @@ namespace RCT1 void ImportRideMeasurement(RideMeasurement& dst, const RCT12RideMeasurement& src) { - dst.flags = src.flags; - dst.last_use_tick = src.last_use_tick; - dst.num_items = src.num_items; - dst.current_item = src.current_item; - dst.vehicle_index = src.vehicle_index; - dst.current_station = StationIndex::FromUnderlying(src.current_station); - for (size_t i = 0; i < std::size(src.velocity); i++) + dst.flags = src.Flags; + dst.last_use_tick = src.LastUseTick; + dst.num_items = src.NumItems; + dst.current_item = src.CurrentItem; + dst.vehicle_index = src.VehicleIndex; + dst.current_station = StationIndex::FromUnderlying(src.CurrentStation); + for (size_t i = 0; i < std::size(src.Velocity); i++) { - dst.velocity[i] = src.velocity[i] / 2; - dst.altitude[i] = src.altitude[i] / 2; - dst.vertical[i] = src.vertical[i] / 2; - dst.lateral[i] = src.lateral[i] / 2; + dst.velocity[i] = src.Velocity[i] / 2; + dst.altitude[i] = src.Altitude[i] / 2; + dst.vertical[i] = src.Vertical[i] / 2; + dst.lateral[i] = src.Lateral[i] / 2; } } - void ImportEntity(const RCT12SpriteBase& src); - template void ImportEntity(const RCT12SpriteBase& src); + void ImportEntity(const RCT12EntityBase& src); + template void ImportEntity(const RCT12EntityBase& src); void ImportSprites() { for (int i = 0; i < Limits::MaxEntities; i++) { - ImportEntity(_s4.sprites[i].unknown); + ImportEntity(_s4.Entities[i].Unknown); } } void SetVehicleColours(::Vehicle* dst, const RCT1::Vehicle* src) { - const auto& srcRide = _s4.rides[src->ride]; - uint8_t vehicleTypeIndex = srcRide.vehicle_type; + const auto& srcRide = _s4.Rides[src->Ride]; + uint8_t vehicleTypeIndex = srcRide.VehicleType; RCT1::VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( vehicleTypeIndex); // RCT1 had no third colour if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { - dst->colours.Body = RCT1::GetColour(src->colours.body_colour); + dst->colours.Body = RCT1::GetColour(src->Colours.BodyColour); } else if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_2) { - dst->colours.Body = RCT1::GetColour(src->colours.trim_colour); + dst->colours.Body = RCT1::GetColour(src->Colours.TrimColour); } else { @@ -1233,11 +1230,11 @@ namespace RCT1 if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_1) { - dst->colours.Trim = RCT1::GetColour(src->colours.body_colour); + dst->colours.Trim = RCT1::GetColour(src->Colours.BodyColour); } else if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_2) { - dst->colours.Trim = RCT1::GetColour(src->colours.trim_colour); + dst->colours.Trim = RCT1::GetColour(src->Colours.TrimColour); } else { @@ -1246,11 +1243,11 @@ namespace RCT1 if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_1) { - dst->colours.Tertiary = RCT1::GetColour(src->colours.body_colour); + dst->colours.Tertiary = RCT1::GetColour(src->Colours.BodyColour); } else if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_2) { - dst->colours.Tertiary = RCT1::GetColour(src->colours.trim_colour); + dst->colours.Tertiary = RCT1::GetColour(src->Colours.TrimColour); } else { @@ -1267,53 +1264,53 @@ namespace RCT1 void ImportPeep(::Peep* dst, const RCT1::Peep* src) { // Peep vs. staff (including which kind) - dst->SpriteType = RCT1::GetPeepSpriteType(src->sprite_type); - dst->Action = static_cast(src->action); - dst->SpecialSprite = src->special_sprite; - dst->NextActionSpriteType = static_cast(src->next_action_sprite_type); - dst->ActionSpriteImageOffset = src->action_sprite_image_offset; - dst->WalkingFrameNum = src->no_action_frame_num; - dst->ActionSpriteType = static_cast(src->action_sprite_type); - dst->ActionFrame = src->action_frame; + dst->SpriteType = RCT1::GetPeepSpriteType(src->SpriteType); + dst->Action = static_cast(src->Action); + dst->SpecialSprite = src->SpecialSprite; + dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); + dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; + dst->WalkingFrameNum = src->NoActionFrameNum; + dst->ActionSpriteType = static_cast(src->ActionSpriteType); + dst->ActionFrame = src->ActionFrame; - const rct_sprite_bounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->ActionSpriteType); + const SpriteBounds* spriteBounds = &GetSpriteBounds(dst->SpriteType, dst->ActionSpriteType); dst->sprite_width = spriteBounds->sprite_width; dst->sprite_height_negative = spriteBounds->sprite_height_negative; dst->sprite_height_positive = spriteBounds->sprite_height_positive; dst->MoveTo({ src->x, src->y, src->z }); - dst->sprite_direction = src->sprite_direction; + dst->sprite_direction = src->EntityDirection; // Peep name - if (is_user_string_id(src->name_string_idx)) + if (IsUserStringID(src->NameStringID)) { - dst->SetName(GetUserString(src->name_string_idx)); + dst->SetName(GetUserString(src->NameStringID)); } - dst->State = static_cast(src->state); - dst->SubState = src->sub_state; - dst->NextLoc = { src->next_x, src->next_y, src->next_z * Limits::CoordsZStep }; - dst->NextFlags = src->next_flags; - dst->Var37 = src->var_37; - dst->StepProgress = src->step_progress; - dst->TshirtColour = RCT1::GetColour(src->tshirt_colour); - dst->TrousersColour = RCT1::GetColour(src->trousers_colour); - dst->DestinationX = src->destination_x; - dst->DestinationY = src->destination_y; - dst->DestinationTolerance = src->destination_tolerance; - dst->PeepDirection = src->direction; - dst->Energy = src->energy; - dst->EnergyTarget = src->energy_target; - dst->Mass = src->mass; + dst->State = static_cast(src->State); + dst->SubState = src->SubState; + dst->NextLoc = { src->NextX, src->NextY, src->NextZ * Limits::CoordsZStep }; + dst->NextFlags = src->NextFlags; + dst->Var37 = src->Var37; + dst->StepProgress = src->StepProgress; + dst->TshirtColour = RCT1::GetColour(src->TshirtColour); + dst->TrousersColour = RCT1::GetColour(src->TrousersColour); + dst->DestinationX = src->DestinationX; + dst->DestinationY = src->DestinationY; + dst->DestinationTolerance = src->DestinationTolerance; + dst->PeepDirection = src->Direction; + dst->Energy = src->Energy; + dst->EnergyTarget = src->EnergyTarget; + dst->Mass = src->Mass; dst->WindowInvalidateFlags = 0; - dst->CurrentRide = RCT12RideIdToOpenRCT2RideId(src->current_ride); - dst->CurrentRideStation = StationIndex::FromUnderlying(src->current_ride_station); - dst->CurrentTrain = src->current_train; - dst->CurrentCar = src->current_car; - dst->CurrentSeat = src->current_seat; - dst->InteractionRideIndex = RCT12RideIdToOpenRCT2RideId(src->interaction_ride_index); - dst->Id = src->id; + dst->CurrentRide = RCT12RideIdToOpenRCT2RideId(src->CurrentRide); + dst->CurrentRideStation = StationIndex::FromUnderlying(src->CurrentRideStation); + dst->CurrentTrain = src->CurrentTrain; + dst->CurrentCar = src->CurrentCar; + dst->CurrentSeat = src->CurrentSeat; + dst->InteractionRideIndex = RCT12RideIdToOpenRCT2RideId(src->InteractionRideIndex); + dst->PeepId = src->ID; dst->PathCheckOptimisation = 0; dst->PeepFlags = 0; dst->PathfindGoal.x = 0xFF; @@ -1340,7 +1337,7 @@ namespace RCT1 int32_t peepOffset = staffId * Limits::PatrolAreaSize; for (int32_t i = 0; i < Limits::PatrolAreaSize; i++) { - if (_s4.patrol_areas[peepOffset + i] == 0) + if (_s4.PatrolAreas[peepOffset + i] == 0) { // No patrol for this area continue; @@ -1349,7 +1346,7 @@ namespace RCT1 // Loop over the bits of the uint8_t for (int32_t j = 0; j < 8; j++) { - int8_t bit = (_s4.patrol_areas[peepOffset + i] >> j) & 1; + int8_t bit = (_s4.PatrolAreas[peepOffset + i] >> j) & 1; if (bit == 0) { // No patrol for this area @@ -1367,12 +1364,12 @@ namespace RCT1 } } - void ImportEntityCommonProperties(EntityBase* dst, const RCT12SpriteBase* src) + void ImportEntityCommonProperties(EntityBase* dst, const RCT12EntityBase* src) { - dst->sprite_direction = src->sprite_direction; - dst->sprite_width = src->sprite_width; - dst->sprite_height_negative = src->sprite_height_negative; - dst->sprite_height_positive = src->sprite_height_positive; + dst->sprite_direction = src->EntityDirection; + dst->sprite_width = src->SpriteWidth; + dst->sprite_height_negative = src->SpriteHeightNegative; + dst->sprite_height_positive = src->SpriteHeightPositive; dst->x = src->x; dst->y = src->y; dst->z = src->z; @@ -1383,10 +1380,10 @@ namespace RCT1 gPeepSpawns.clear(); for (size_t i = 0; i < Limits::MaxPeepSpawns; i++) { - if (_s4.peep_spawn[i].x != RCT12_PEEP_SPAWN_UNDEFINED) + if (_s4.PeepSpawn[i].x != RCT12_PEEP_SPAWN_UNDEFINED) { - PeepSpawn spawn = { _s4.peep_spawn[i].x, _s4.peep_spawn[i].y, _s4.peep_spawn[i].z * 16, - _s4.peep_spawn[i].direction }; + PeepSpawn spawn = { _s4.PeepSpawn[i].x, _s4.PeepSpawn[i].y, _s4.PeepSpawn[i].z * 16, + _s4.PeepSpawn[i].direction }; gPeepSpawns.push_back(spawn); } } @@ -1394,40 +1391,40 @@ namespace RCT1 void ImportFinance() { - gParkEntranceFee = _s4.park_entrance_fee; - gLandPrice = _s4.land_price; - gConstructionRightsPrice = _s4.construction_rights_price; + gParkEntranceFee = _s4.ParkEntranceFee; + gLandPrice = ToMoney64(_s4.LandPrice); + gConstructionRightsPrice = ToMoney64(_s4.ConstructionRightsPrice); - gCash = ToMoney64(_s4.cash); - gBankLoan = ToMoney64(_s4.loan); - gMaxBankLoan = ToMoney64(_s4.max_loan); + gCash = ToMoney64(_s4.Cash); + gBankLoan = ToMoney64(_s4.Loan); + gMaxBankLoan = ToMoney64(_s4.MaxLoan); // It's more like 1.33%, but we can only use integers. Can be fixed once we have our own save format. gBankLoanInterestRate = 1; - gInitialCash = ToMoney64(_s4.cash); + gInitialCash = ToMoney64(_s4.Cash); - gCompanyValue = ToMoney64(_s4.company_value); - gParkValue = ToMoney64(CorrectRCT1ParkValue(_s4.park_value)); - gCurrentProfit = ToMoney64(_s4.profit); + gCompanyValue = ToMoney64(_s4.CompanyValue); + gParkValue = CorrectRCT1ParkValue(_s4.ParkValue); + gCurrentProfit = ToMoney64(_s4.Profit); for (size_t i = 0; i < Limits::FinanceGraphSize; i++) { - gCashHistory[i] = ToMoney64(_s4.cash_history[i]); - gParkValueHistory[i] = ToMoney64(CorrectRCT1ParkValue(_s4.park_value_history[i])); - gWeeklyProfitHistory[i] = ToMoney64(_s4.weekly_profit_history[i]); + gCashHistory[i] = ToMoney64(_s4.CashHistory[i]); + gParkValueHistory[i] = CorrectRCT1ParkValue(_s4.ParkValueHistory[i]); + gWeeklyProfitHistory[i] = ToMoney64(_s4.WeeklyProfitHistory[i]); } for (size_t i = 0; i < Limits::ExpenditureTableMonthCount; i++) { for (size_t j = 0; j < Limits::ExpenditureTypeCount; j++) { - gExpenditureTable[i][j] = ToMoney64(_s4.expenditure[i][j]); + gExpenditureTable[i][j] = ToMoney64(_s4.Expenditure[i][j]); } } - gCurrentExpenditure = ToMoney64(_s4.total_expenditure); + gCurrentExpenditure = ToMoney64(_s4.TotalExpenditure); - gScenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s4.completed_company_value); - gTotalAdmissions = _s4.num_admissions; - gTotalIncomeFromAdmissions = ToMoney64(_s4.admission_total_income); + gScenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s4.CompletedCompanyValue); + gTotalAdmissions = _s4.NumAdmissions; + gTotalIncomeFromAdmissions = ToMoney64(_s4.AdmissionTotalIncome); // TODO marketing campaigns not working static_assert( @@ -1435,18 +1432,18 @@ namespace RCT1 "Advertising enum bigger than capacity of iterator"); for (uint8_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) { - if (_s4.marketing_status[i] & CAMPAIGN_ACTIVE_FLAG) + if (_s4.MarketingStatus[i] & CAMPAIGN_ACTIVE_FLAG) { MarketingCampaign campaign; campaign.Type = i; - campaign.WeeksLeft = _s4.marketing_status[i] & ~CAMPAIGN_ACTIVE_FLAG; + campaign.WeeksLeft = _s4.MarketingStatus[i] & ~CAMPAIGN_ACTIVE_FLAG; if (campaign.Type == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign.Type == ADVERTISING_CAMPAIGN_RIDE) { - campaign.RideId = RCT12RideIdToOpenRCT2RideId(_s4.marketing_assoc[i]); + campaign.RideId = RCT12RideIdToOpenRCT2RideId(_s4.MarketingAssoc[i]); } else if (campaign.Type == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) { - campaign.ShopItemType = ShopItem(_s4.marketing_assoc[i]); + campaign.ShopItemType = ShopItem(_s4.MarketingAssoc[i]); } gMarketingCampaigns.push_back(campaign); } @@ -1507,10 +1504,10 @@ namespace RCT1 // Build tile pointer cache (needed to get the first element at a certain location) auto tilePointerIndex = TilePointerIndex( - Limits::MaxMapSize, _s4.tile_elements, std::size(_s4.tile_elements)); + Limits::MaxMapSize, _s4.TileElements, std::size(_s4.TileElements)); std::vector tileElements; - const auto maxSize = _s4.map_size == 0 ? Limits::MaxMapSize : _s4.map_size; + const auto maxSize = _s4.MapSize == 0 ? Limits::MaxMapSize : _s4.MapSize; for (TileCoordsXY coords = { 0, 0 }; coords.y < MAXIMUM_MAP_SIZE_TECHNICAL; coords.y++) { for (coords.x = 0; coords.x < MAXIMUM_MAP_SIZE_TECHNICAL; coords.x++) @@ -1522,7 +1519,7 @@ namespace RCT1 RCT12TileElement* srcElement = tilePointerIndex.GetFirstElementAt(coords); do { - if (srcElement->base_height == Limits::MaxElementHeight) + if (srcElement->BaseHeight == Limits::MaxElementHeight) continue; // Reserve 8 elements for import @@ -1568,8 +1565,8 @@ namespace RCT1 // This flag will be set by the caller. dst->SetLastForTile(false); - dst->SetBaseZ(src->base_height * Limits::CoordsZStep); - dst->SetClearanceZ(src->clearance_height * Limits::CoordsZStep); + dst->SetBaseZ(src->BaseHeight * Limits::CoordsZStep); + dst->SetClearanceZ(src->ClearanceHeight * Limits::CoordsZStep); switch (tileElementType) { @@ -1651,7 +1648,7 @@ namespace RCT1 { auto dst2 = dst->AsTrack(); auto src2 = src->AsTrack(); - const auto* ride = get_ride(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); + const auto* ride = GetRide(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); auto rideType = (ride != nullptr) ? ride->type : RIDE_TYPE_NULL; dst2->SetTrackType(RCT1TrackTypeToOpenRCT2(src2->GetTrackType(), rideType)); @@ -1687,7 +1684,8 @@ namespace RCT1 } // This has to be done last, since the maze entry shares fields with the colour and sequence fields. - if (rideType == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(rideType); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { dst2->SetMazeEntry(src2->GetMazeEntry()); } @@ -1775,8 +1773,8 @@ namespace RCT1 ConvertWall(type, &colourA, &colourB); type = _wallTypeToEntryMap[type]; - auto baseZ = src->base_height * Limits::CoordsZStep; - auto clearanceZ = src->clearance_height * Limits::CoordsZStep; + auto baseZ = src->BaseHeight * Limits::CoordsZStep; + auto clearanceZ = src->ClearanceHeight * Limits::CoordsZStep; auto edgeSlope = LandSlopeToWallSlope[slope][edge & 3]; if (edgeSlope & (EDGE_SLOPE_UPWARDS | EDGE_SLOPE_DOWNWARDS)) { @@ -1834,9 +1832,9 @@ namespace RCT1 dst2->SetAllowedEdges(src2->GetAllowedEdges()); auto index = src2->GetIndex(); - if (index < std::size(_s4.banners)) + if (index < std::size(_s4.Banners)) { - auto srcBanner = &_s4.banners[index]; + auto srcBanner = &_s4.Banners[index]; auto dstBanner = GetOrCreateBanner(BannerIndex::FromUnderlying(index)); if (dstBanner == nullptr) { @@ -1866,7 +1864,7 @@ namespace RCT1 // All available objects must be loaded before this method is called as it // requires them to correctly insert objects into the research list - research_reset_items(); + ResearchResetItems(); size_t researchListCount; const RCT1::ResearchItem* researchList = GetResearchList(&researchListCount); @@ -1878,7 +1876,7 @@ namespace RCT1 // The first six scenery groups are always available for (uint8_t i = 0; i < 6; i++) { - research_insert_scenery_group_entry(i, true); + ResearchInsertSceneryGroupEntry(i, true); } bool researched = true; @@ -1887,36 +1885,36 @@ namespace RCT1 for (size_t i = 0; i < researchListCount; i++) { const auto& researchItem = researchList[i]; - if (researchItem.flags == RCT1_RESEARCH_FLAGS_SEPARATOR) + if (researchItem.Flags == RCT1ResearchFlagsSeparator) { - if (researchItem.item == RCT1_RESEARCH_END_AVAILABLE) + if (researchItem.Item == RCT1_RESEARCH_END_AVAILABLE) { researched = false; continue; } // We don't import the random items yet. - else if (researchItem.item == RCT1_RESEARCH_END_RESEARCHABLE || researchItem.item == RCT1_RESEARCH_END) + else if (researchItem.Item == RCT1_RESEARCH_END_RESEARCHABLE || researchItem.Item == RCT1_RESEARCH_END) { break; } } - switch (researchItem.type) + switch (researchItem.Type) { case RCT1_RESEARCH_TYPE_THEME: { - uint8_t rct1SceneryTheme = researchItem.item; + uint8_t rct1SceneryTheme = researchItem.Item; auto sceneryGroupEntryIndex = _sceneryThemeTypeToEntryMap[rct1SceneryTheme]; - if (sceneryGroupEntryIndex != OBJECT_ENTRY_INDEX_IGNORE + if (sceneryGroupEntryIndex != ObjectEntryIndexIgnore && sceneryGroupEntryIndex != OBJECT_ENTRY_INDEX_NULL) { - research_insert_scenery_group_entry(sceneryGroupEntryIndex, researched); + ResearchInsertSceneryGroupEntry(sceneryGroupEntryIndex, researched); } break; } case RCT1_RESEARCH_TYPE_RIDE: { - const auto rct1RideType = static_cast(researchItem.item); + const auto rct1RideType = static_cast(researchItem.Item); _researchRideTypeUsed[EnumValue(rct1RideType)] = true; auto ownRideEntryIndex = _rideTypeToRideEntryMap[EnumValue(rct1RideType)]; @@ -1931,10 +1929,10 @@ namespace RCT1 for (size_t j = 0; j < researchListCount; j++) { const auto& researchItem2 = researchList[j]; - if (researchItem2.flags == RCT1_RESEARCH_FLAGS_SEPARATOR) + if (researchItem2.Flags == RCT1ResearchFlagsSeparator) { - if (researchItem2.item == RCT1_RESEARCH_END_RESEARCHABLE - || researchItem2.item == RCT1_RESEARCH_END) + if (researchItem2.Item == RCT1_RESEARCH_END_RESEARCHABLE + || researchItem2.Item == RCT1_RESEARCH_END) { break; } @@ -1942,10 +1940,10 @@ namespace RCT1 continue; } - if (researchItem2.type == RCT1_RESEARCH_TYPE_VEHICLE - && static_cast(researchItem2.related_ride) == rct1RideType) + if (researchItem2.Type == RCT1_RESEARCH_TYPE_VEHICLE + && static_cast(researchItem2.RelatedRide) == rct1RideType) { - auto rideEntryIndex2 = _vehicleTypeToRideEntryMap[researchItem2.item]; + auto rideEntryIndex2 = _vehicleTypeToRideEntryMap[researchItem2.Item]; bool isOwnType = (ownRideEntryIndex == rideEntryIndex2); if (isOwnType) { @@ -1967,7 +1965,7 @@ namespace RCT1 if (!_researchRideEntryUsed[ownRideEntryIndex]) { _researchRideEntryUsed[ownRideEntryIndex] = true; - research_insert_ride_entry(ownRideEntryIndex, researched); + ResearchInsertRideEntry(ownRideEntryIndex, researched); } } @@ -1978,11 +1976,11 @@ namespace RCT1 // Only add vehicle if the related ride has been seen, this to make sure that vehicles // are researched only after the ride has been researched. Otherwise, remove them from the research // list, so that they are automatically co-invented when their master ride is invented. - if (_researchRideTypeUsed[researchItem.related_ride]) + if (_researchRideTypeUsed[researchItem.RelatedRide]) { InsertResearchVehicle(researchItem, researched); } - else if (!rideTypeInResearch[researchItem.related_ride] && _gameVersion == FILE_VERSION_RCT1_LL) + else if (!rideTypeInResearch[researchItem.RelatedRide] && _gameVersion == FILE_VERSION_RCT1_LL) { vehiclesWithMissingRideTypes.push_back(researchItem); } @@ -2001,53 +1999,53 @@ namespace RCT1 // Research funding / priority uint8_t activeResearchTypes = 0; - if (_s4.research_priority & RCT1_RESEARCH_CATEGORY_ROLLERCOASTERS) + if (_s4.ResearchPriority & RCT1_RESEARCH_CATEGORY_ROLLERCOASTERS) { activeResearchTypes |= EnumToFlag(ResearchCategory::Rollercoaster); } - if (_s4.research_priority & RCT1_RESEARCH_CATEGORY_THRILL_RIDES) + if (_s4.ResearchPriority & RCT1_RESEARCH_CATEGORY_THRILL_RIDES) { activeResearchTypes |= EnumToFlag(ResearchCategory::Thrill); activeResearchTypes |= EnumToFlag(ResearchCategory::Water); } - if (_s4.research_priority & RCT1_RESEARCH_CATEGORY_GENTLE_TRANSPORT_RIDES) + if (_s4.ResearchPriority & RCT1_RESEARCH_CATEGORY_GENTLE_TRANSPORT_RIDES) { activeResearchTypes |= EnumToFlag(ResearchCategory::Gentle); activeResearchTypes |= EnumToFlag(ResearchCategory::Transport); } - if (_s4.research_priority & RCT1_RESEARCH_CATEGORY_SHOPS) + if (_s4.ResearchPriority & RCT1_RESEARCH_CATEGORY_SHOPS) { activeResearchTypes |= EnumToFlag(ResearchCategory::Shop); } - if (_s4.research_priority & RCT1_RESEARCH_CATEGORY_SCENERY_THEMING) + if (_s4.ResearchPriority & RCT1_RESEARCH_CATEGORY_SCENERY_THEMING) { activeResearchTypes |= EnumToFlag(ResearchCategory::SceneryGroup); } gResearchPriorities = activeResearchTypes; - gResearchFundingLevel = _s4.research_level; + gResearchFundingLevel = _s4.ResearchLevel; // This will mark items as researched/unresearched according to the research list. // This needs to be called before importing progress, as it will reset it. - research_reset_current_item(); + ResearchResetCurrentItem(); // Research history - gResearchProgress = _s4.research_progress; - gResearchProgressStage = _s4.research_progress_stage; - gResearchExpectedDay = _s4.next_research_expected_day; - gResearchExpectedMonth = _s4.next_research_expected_month; + gResearchProgress = _s4.ResearchProgress; + gResearchProgressStage = _s4.ResearchProgressStage; + gResearchExpectedDay = _s4.NextResearchExpectedDay; + gResearchExpectedMonth = _s4.NextResearchExpectedMonth; - if (_s4.last_research_flags == 0xFF) + if (_s4.LastResearchFlags == 0xFF) { gResearchLastItem = std::nullopt; } else { ::ResearchItem researchItem = {}; - ConvertResearchEntry(&researchItem, _s4.last_research_item, _s4.last_research_type); + ConvertResearchEntry(&researchItem, _s4.LastResearchItem, _s4.LastResearchType); gResearchLastItem = researchItem; } - if (_s4.next_research_flags == 0xFF) + if (_s4.NextResearchFlags == 0xFF) { gResearchNextItem = std::nullopt; gResearchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; @@ -2056,7 +2054,7 @@ namespace RCT1 else { ::ResearchItem researchItem = {}; - ConvertResearchEntry(&researchItem, _s4.next_research_item, _s4.next_research_type); + ConvertResearchEntry(&researchItem, _s4.NextResearchItem, _s4.NextResearchType); gResearchNextItem = researchItem; } } @@ -2069,21 +2067,21 @@ namespace RCT1 for (size_t i = 0; i < researchListCount; i++) { const auto& researchItem = researchList[i]; - if (researchItem.flags == RCT1_RESEARCH_FLAGS_SEPARATOR) + if (researchItem.Flags == RCT1ResearchFlagsSeparator) { - if (researchItem.item == RCT1_RESEARCH_END_AVAILABLE || researchItem.item == RCT1_RESEARCH_END_RESEARCHABLE) + if (researchItem.Item == RCT1_RESEARCH_END_AVAILABLE || researchItem.Item == RCT1_RESEARCH_END_RESEARCHABLE) { continue; } - if (researchItem.item == RCT1_RESEARCH_END) + if (researchItem.Item == RCT1_RESEARCH_END) { break; } } - if (researchItem.type == RCT1_RESEARCH_TYPE_RIDE) + if (researchItem.Type == RCT1_RESEARCH_TYPE_RIDE) { - ret[researchItem.item] = true; + ret[researchItem.Item] = true; } } @@ -2092,22 +2090,22 @@ namespace RCT1 void InsertResearchVehicle(const ResearchItem& researchItem, bool researched) { - uint8_t vehicle = researchItem.item; + uint8_t vehicle = researchItem.Item; auto rideEntryIndex = _vehicleTypeToRideEntryMap[vehicle]; if (!_researchRideEntryUsed[rideEntryIndex]) { _researchRideEntryUsed[rideEntryIndex] = true; - research_insert_ride_entry(rideEntryIndex, researched); + ResearchInsertRideEntry(rideEntryIndex, researched); } } void ImportParkName() { - std::string parkName = std::string(_s4.scenario_name); - if (is_user_string_id(static_cast(_s4.park_name_string_index))) + std::string parkName = std::string(_s4.ScenarioName); + if (IsUserStringID(static_cast(_s4.ParkNameStringIndex))) { - std::string userString = GetUserString(_s4.park_name_string_index); + std::string userString = GetUserString(_s4.ParkNameStringIndex); if (!userString.empty()) { parkName = std::move(userString); @@ -2121,49 +2119,49 @@ namespace RCT1 void ImportParkFlags() { // Date and srand - gCurrentTicks = _s4.ticks; - scenario_rand_seed(_s4.random_a, _s4.random_b); - gDateMonthsElapsed = static_cast(_s4.month); - gDateMonthTicks = _s4.day; + gCurrentTicks = _s4.Ticks; + ScenarioRandSeed(_s4.RandomA, _s4.RandomB); + gDateMonthsElapsed = static_cast(_s4.Month); + gDateMonthTicks = _s4.Day; // Park rating - gParkRating = _s4.park_rating; + gParkRating = _s4.ParkRating; auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); park.ResetHistories(); - std::copy(std::begin(_s4.park_rating_history), std::end(_s4.park_rating_history), gParkRatingHistory); - for (size_t i = 0; i < std::size(_s4.guests_in_park_history); i++) + std::copy(std::begin(_s4.ParkRatingHistory), std::end(_s4.ParkRatingHistory), gParkRatingHistory); + for (size_t i = 0; i < std::size(_s4.GuestsInParkHistory); i++) { - if (_s4.guests_in_park_history[i] != RCT12ParkHistoryUndefined) + if (_s4.GuestsInParkHistory[i] != RCT12ParkHistoryUndefined) { - gGuestsInParkHistory[i] = _s4.guests_in_park_history[i] * RCT12GuestsInParkHistoryFactor; + gGuestsInParkHistory[i] = _s4.GuestsInParkHistory[i] * RCT12GuestsInParkHistoryFactor; } } // Awards auto& awards = GetAwards(); - for (auto& src : _s4.awards) + for (auto& src : _s4.Awards) { - if (src.time != 0) + if (src.Time != 0) { - awards.push_back(Award{ src.time, static_cast(src.type) }); + awards.push_back(Award{ src.Time, static_cast(src.Type) }); } } // Number of guests history std::fill(std::begin(gGuestsInParkHistory), std::end(gGuestsInParkHistory), std::numeric_limits::max()); - for (size_t i = 0; i < std::size(_s4.guests_in_park_history); i++) + for (size_t i = 0; i < std::size(_s4.GuestsInParkHistory); i++) { - if (_s4.guests_in_park_history[i] != std::numeric_limits::max()) + if (_s4.GuestsInParkHistory[i] != std::numeric_limits::max()) { - gGuestsInParkHistory[i] = _s4.guests_in_park_history[i] * 20; + gGuestsInParkHistory[i] = _s4.GuestsInParkHistory[i] * 20; } } // News items for (size_t i = 0; i < Limits::MaxNewsItems; i++) { - const rct12_news_item* src = &_s4.messages[i]; + const RCT12NewsItem* src = &_s4.Messages[i]; News::Item* dst = &gNewsItems[i]; dst->Type = static_cast(src->Type); @@ -2189,34 +2187,35 @@ namespace RCT1 } // Initial guest status - gGuestInitialCash = _s4.guest_initial_cash; - gGuestInitialHunger = _s4.guest_initial_hunger; - gGuestInitialThirst = _s4.guest_initial_thirst; - gGuestInitialHappiness = _s4.guest_initial_happiness; + gGuestInitialCash = ToMoney64(_s4.GuestInitialCash); + gGuestInitialHunger = _s4.GuestInitialHunger; + gGuestInitialThirst = _s4.GuestInitialThirst; + gGuestInitialHappiness = _s4.GuestInitialHappiness; - _guestGenerationProbability = _s4.guest_generation_probability; + _guestGenerationProbability = _s4.GuestGenerationProbability; // Staff colours - gStaffHandymanColour = RCT1::GetColour(_s4.handman_colour); - gStaffMechanicColour = RCT1::GetColour(_s4.mechanic_colour); - gStaffSecurityColour = RCT1::GetColour(_s4.security_guard_colour); + gStaffHandymanColour = RCT1::GetColour(_s4.HandymanColour); + gStaffMechanicColour = RCT1::GetColour(_s4.MechanicColour); + gStaffSecurityColour = RCT1::GetColour(_s4.SecurityGuardColour); // Flags - gParkFlags = _s4.park_flags; + gParkFlags = _s4.ParkFlags; gParkFlags &= ~PARK_FLAGS_ANTI_CHEAT_DEPRECATED; + gParkFlags |= PARK_FLAGS_RCT1_INTEREST; // Loopy Landscape parks can set a flag to lock the entry price to free. // If this flag is not set, the player can ask money for both rides and entry. - if (!(_s4.park_flags & RCT1_PARK_FLAGS_PARK_ENTRY_LOCKED_AT_FREE)) + if (!(_s4.ParkFlags & RCT1_PARK_FLAGS_PARK_ENTRY_LOCKED_AT_FREE)) { gParkFlags |= PARK_FLAGS_UNLOCK_ALL_PRICES; } - gParkSize = _s4.park_size; - gTotalRideValueForMoney = _s4.total_ride_value_for_money; + gParkSize = _s4.ParkSize; + gTotalRideValueForMoney = _s4.TotalRideValueForMoney; gSamePriceThroughoutPark = 0; if (_gameVersion == FILE_VERSION_RCT1_LL) { - gSamePriceThroughoutPark = _s4.same_price_throughout; + gSamePriceThroughoutPark = _s4.SamePriceThroughout; } } @@ -2229,7 +2228,7 @@ namespace RCT1 if (entryIndex != OBJECT_ENTRY_INDEX_NULL) { - rct_ride_entry* rideEntry = get_ride_entry(entryIndex); + const auto* rideEntry = GetRideEntryByIndex(entryIndex); if (rideEntry != nullptr) { @@ -2248,7 +2247,7 @@ namespace RCT1 if (entryIndex != OBJECT_ENTRY_INDEX_NULL) { - rct_ride_entry* rideEntry = get_ride_entry(entryIndex); + const auto* rideEntry = GetRideEntryByIndex(entryIndex); if (rideEntry != nullptr) { @@ -2265,7 +2264,7 @@ namespace RCT1 { auto entryIndex = _sceneryThemeTypeToEntryMap[srcItem]; - if (entryIndex != OBJECT_ENTRY_INDEX_IGNORE && entryIndex != OBJECT_ENTRY_INDEX_NULL) + if (entryIndex != ObjectEntryIndexIgnore && entryIndex != OBJECT_ENTRY_INDEX_NULL) { dst->entryIndex = entryIndex; dst->type = Research::EntryType::Scenery; @@ -2278,41 +2277,41 @@ namespace RCT1 void ImportClimate() { - gClimate = ClimateType{ _s4.climate }; - gClimateUpdateTimer = _s4.climate_timer; - gClimateCurrent.Temperature = _s4.temperature; - gClimateCurrent.Weather = WeatherType{ _s4.weather }; + gClimate = ClimateType{ _s4.Climate }; + gClimateUpdateTimer = _s4.ClimateTimer; + gClimateCurrent.Temperature = _s4.Temperature; + gClimateCurrent.Weather = WeatherType{ _s4.Weather }; gClimateCurrent.WeatherEffect = WeatherEffectType::None; - gClimateCurrent.WeatherGloom = _s4.weather_gloom; - gClimateCurrent.Level = static_cast(_s4.rain); - gClimateNext.Temperature = _s4.target_temperature; - gClimateNext.Weather = WeatherType{ _s4.target_weather }; + gClimateCurrent.WeatherGloom = _s4.WeatherGloom; + gClimateCurrent.Level = static_cast(_s4.Rain); + gClimateNext.Temperature = _s4.TargetTemperature; + gClimateNext.Weather = WeatherType{ _s4.TargetWeather }; gClimateNext.WeatherEffect = WeatherEffectType::None; - gClimateNext.WeatherGloom = _s4.target_weather_gloom; - gClimateNext.Level = static_cast(_s4.target_rain); + gClimateNext.WeatherGloom = _s4.TargetWeatherGloom; + gClimateNext.Level = static_cast(_s4.TargetRain); } void ImportScenarioNameDetails() { - std::string name = String::ToStd(_s4.scenario_name); + std::string name = String::ToStd(_s4.ScenarioName); std::string details; - int32_t scNumber = _s4.scenario_slot_index; + int32_t scNumber = _s4.ScenarioSlotIndex; if (scNumber != -1) { - source_desc sourceDesc; + SourceDescriptor sourceDesc; if (ScenarioSources::TryGetById(scNumber, &sourceDesc)) { StringId localisedStringIds[3]; - if (language_get_localised_scenario_strings(sourceDesc.title, localisedStringIds)) + if (LanguageGetLocalisedScenarioStrings(sourceDesc.title, localisedStringIds)) { if (localisedStringIds[0] != STR_NONE) { - name = String::ToStd(language_get_string(localisedStringIds[0])); + name = String::ToStd(LanguageGetString(localisedStringIds[0])); } if (localisedStringIds[2] != STR_NONE) { - details = String::ToStd(language_get_string(localisedStringIds[2])); + details = String::ToStd(LanguageGetString(localisedStringIds[2])); } } } @@ -2324,28 +2323,28 @@ namespace RCT1 void ImportScenarioObjective() { - gScenarioObjective.Type = _s4.scenario_objective_type; - gScenarioObjective.Year = _s4.scenario_objective_years; - gScenarioObjective.NumGuests = _s4.scenario_objective_num_guests; + gScenarioObjective.Type = _s4.ScenarioObjectiveType; + gScenarioObjective.Year = _s4.ScenarioObjectiveYears; + gScenarioObjective.NumGuests = _s4.ScenarioObjectiveNumGuests; // RCT1 used a different way of calculating the park value. // This is corrected here, but since scenario_objective_currency doubles as minimum excitement rating, // we need to check the goal to avoid affecting scenarios like Volcania. - if (_s4.scenario_objective_type == OBJECTIVE_PARK_VALUE_BY) - gScenarioObjective.Currency = ToMoney64(CorrectRCT1ParkValue(_s4.scenario_objective_currency)); + if (_s4.ScenarioObjectiveType == OBJECTIVE_PARK_VALUE_BY) + gScenarioObjective.Currency = CorrectRCT1ParkValue(_s4.ScenarioObjectiveCurrency); else - gScenarioObjective.Currency = ToMoney64(_s4.scenario_objective_currency); + gScenarioObjective.Currency = ToMoney64(_s4.ScenarioObjectiveCurrency); // This does not seem to be saved in the objective arguments, so look up the ID from the available rides instead. - if (_s4.scenario_objective_type == OBJECTIVE_BUILD_THE_BEST) + if (_s4.ScenarioObjectiveType == OBJECTIVE_BUILD_THE_BEST) gScenarioObjective.RideId = GetBuildTheBestRideId(); } void ImportSavedView() { - gSavedView = ScreenCoordsXY{ _s4.view_x, _s4.view_y }; - gSavedViewZoom = ZoomLevel{ static_cast(_s4.view_zoom) }; - gSavedViewRotation = _s4.view_rotation; + gSavedView = ScreenCoordsXY{ _s4.ViewX, _s4.ViewY }; + gSavedViewZoom = ZoomLevel{ static_cast(_s4.ViewZoom) }; + gSavedViewRotation = _s4.ViewRotation; } void ConvertWall(const int32_t& type, colour_t* colourA, colour_t* colourB) @@ -2389,21 +2388,21 @@ namespace RCT1 *dst = {}; dst->id = id; - dst->type = RCTEntryIndexToOpenRCT2EntryIndex(src->type); + dst->type = RCTEntryIndexToOpenRCT2EntryIndex(src->Type); dst->flags = 0; - if (src->flags & BANNER_FLAG_NO_ENTRY) + if (src->Flags & BANNER_FLAG_NO_ENTRY) { dst->flags |= BANNER_FLAG_NO_ENTRY; } - if (is_user_string_id(src->string_idx)) + if (IsUserStringID(src->StringID)) { - dst->text = GetUserString(src->string_idx); + dst->text = GetUserString(src->StringID); } - dst->colour = RCT1::GetColour(src->colour); - dst->text_colour = src->text_colour; + dst->colour = RCT1::GetColour(src->Colour); + dst->text_colour = src->TextColour; dst->position.x = src->x; dst->position.y = src->y; } @@ -2411,7 +2410,7 @@ namespace RCT1 void FixEntrancePositions() { gParkEntrances.clear(); - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it) && gParkEntrances.size() < Limits::MaxParkEntrances) { @@ -2461,27 +2460,27 @@ namespace RCT1 // Loopy Landscapes stores research items in a different place if (_gameVersion == FILE_VERSION_RCT1_LL) { - *count = std::size(_s4.research_items_LL); - return _s4.research_items_LL; + *count = std::size(_s4.ResearchItemsLL); + return _s4.ResearchItemsLL; } - *count = std::size(_s4.research_items); - return _s4.research_items; + *count = std::size(_s4.ResearchItems); + return _s4.ResearchItems; } std::string GetUserString(StringId stringId) { - const auto originalString = _s4.string_table[(stringId - USER_STRING_START) % 1024]; + const auto originalString = _s4.StringTable[stringId % 1024]; auto originalStringView = std::string_view( originalString, RCT2::GetRCT2StringBufferLen(originalString, USER_STRING_MAX_LENGTH)); - auto asUtf8 = rct2_to_utf8(originalStringView, RCT2LanguageId::EnglishUK); + auto asUtf8 = RCT2StringToUTF8(originalStringView, RCT2LanguageId::EnglishUK); auto justText = RCT12RemoveFormattingUTF8(asUtf8); return justText.data(); } void FixLandOwnership() { - switch (_s4.scenario_slot_index) + switch (_s4.ScenarioSlotIndex) { case SC_DYNAMITE_DUNES: FixLandOwnershipTiles({ { 97, 18 }, { 99, 19 }, { 83, 34 } }); @@ -2517,7 +2516,7 @@ namespace RCT1 */ void FixUrbanPark() { - if (_s4.scenario_slot_index == SC_URBAN_PARK && _isScenario) + if (_s4.ScenarioSlotIndex == SC_URBAN_PARK && _isScenario) { const auto merryGoRoundId = RideId::FromUnderlying(0); @@ -2533,7 +2532,7 @@ namespace RCT1 } // Now, swap the entrance and exit. - auto ride = get_ride(merryGoRoundId); + auto ride = GetRide(merryGoRoundId); if (ride != nullptr) { auto& station = ride->GetStation(); @@ -2591,7 +2590,7 @@ namespace RCT1 } RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { ride->num_block_brakes++; @@ -2623,14 +2622,14 @@ namespace RCT1 const RCT1::ResearchItem* researchList = GetResearchList(&researchListCount); for (size_t i = 0; i < researchListCount; i++) { - if (researchList[i].flags == 0xFF) + if (researchList[i].Flags == 0xFF) { break; } - if (researchList[i].type == RCT1_RESEARCH_TYPE_RIDE) + if (researchList[i].Type == RCT1_RESEARCH_TYPE_RIDE) { - return RCT1::GetRideType(static_cast(researchList[i].item), 0); + return RCT1::GetRideType(static_cast(researchList[i].Item), 0); } } @@ -2639,16 +2638,18 @@ namespace RCT1 }; // Very similar but not the same as S6Importer version (due to peeps) - constexpr EntityType GetEntityTypeFromRCT1Sprite(const RCT12SpriteBase& src) + constexpr EntityType GetEntityTypeFromRCT1Sprite(const RCT12EntityBase& src) { EntityType output = EntityType::Null; - switch (src.sprite_identifier) + switch (src.EntityIdentifier) { - case RCT12SpriteIdentifier::Vehicle: + case RCT12EntityIdentifier::Vehicle: output = EntityType::Vehicle; break; - case RCT12SpriteIdentifier::Peep: - if (RCT12PeepType(static_cast(&src)->type) == RCT12PeepType::Guest) + case RCT12EntityIdentifier::Peep: + { + const auto& peep = static_cast(src); + if (peep.PeepType == RCT12PeepType::Guest) { output = EntityType::Guest; } @@ -2657,9 +2658,10 @@ namespace RCT1 output = EntityType::Staff; } break; - case RCT12SpriteIdentifier::Misc: + } + case RCT12EntityIdentifier::Misc: - switch (RCT12MiscEntityType(src.type)) + switch (RCT12MiscEntityType(src.Type)) { case RCT12MiscEntityType::SteamParticle: output = EntityType::SteamParticle; @@ -2693,7 +2695,7 @@ namespace RCT1 break; } break; - case RCT12SpriteIdentifier::Litter: + case RCT12EntityIdentifier::Litter: output = EntityType::Litter; break; default: @@ -2702,91 +2704,91 @@ namespace RCT1 return output; } - template<> void S4Importer::ImportEntity<::Vehicle>(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity<::Vehicle>(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt<::Vehicle>(EntityId::FromUnderlying(srcBase.sprite_index)); + auto* dst = CreateEntityAt<::Vehicle>(EntityId::FromUnderlying(srcBase.EntityIndex)); auto* src = static_cast(&srcBase); - const auto* ride = get_ride(RideId::FromUnderlying(src->ride)); + const auto* ride = GetRide(RideId::FromUnderlying(src->Ride)); if (ride == nullptr) return; - const auto& rct1Ride = _s4.rides[src->ride]; - uint8_t vehicleEntryIndex = RCT1::GetVehicleSubEntryIndex(rct1Ride.vehicle_type, src->CarType); + const auto& rct1Ride = _s4.Rides[src->Ride]; + uint8_t vehicleEntryIndex = RCT1::GetVehicleSubEntryIndex(rct1Ride.VehicleType, src->CarType); - dst->ride = RideId::FromUnderlying(src->ride); + dst->ride = RideId::FromUnderlying(src->Ride); dst->ride_subtype = RCTEntryIndexToOpenRCT2EntryIndex(ride->subtype); dst->vehicle_type = vehicleEntryIndex; - dst->SubType = ::Vehicle::Type(src->type); - dst->var_44 = src->var_44; - dst->remaining_distance = src->remaining_distance; + dst->SubType = ::Vehicle::Type(src->Type); + dst->var_44 = src->Var44; + dst->remaining_distance = src->RemainingDistance; // Properties from vehicle entry - dst->sprite_width = src->sprite_width; - dst->sprite_height_negative = src->sprite_height_negative; - dst->sprite_height_positive = src->sprite_height_positive; - dst->sprite_direction = src->sprite_direction; + dst->sprite_width = src->SpriteWidth; + dst->sprite_height_negative = src->SpriteHeightNegative; + dst->sprite_height_positive = src->SpriteHeightPositive; + dst->sprite_direction = src->EntityDirection; - dst->SpriteRect = ScreenRect(src->sprite_left, src->sprite_top, src->sprite_right, src->sprite_bottom); + dst->SpriteRect = ScreenRect(src->SpriteLeft, src->SpriteTop, src->SpriteRight, src->SpriteBottom); - dst->mass = src->mass; - dst->num_seats = src->num_seats; - dst->speed = src->speed; - dst->powered_acceleration = src->powered_acceleration; - dst->brake_speed = src->brake_speed; + dst->mass = src->Mass; + dst->num_seats = src->NumSeats; + dst->speed = src->Speed; + dst->powered_acceleration = src->PoweredAcceleration; + dst->brake_speed = src->BrakeSpeed; - dst->velocity = src->velocity; - dst->acceleration = src->acceleration; + dst->velocity = src->Velocity; + dst->acceleration = src->Acceleration; dst->SwingSprite = src->SwingSprite; dst->SwingPosition = src->SwingPosition; dst->SwingSpeed = src->SwingSpeed; - dst->restraints_position = src->restraints_position; - dst->spin_sprite = src->spin_sprite; - dst->sound_vector_factor = src->sound_vector_factor; - dst->spin_speed = src->spin_speed; - dst->sound2_flags = src->sound2_flags; + dst->restraints_position = src->RestraintsPosition; + dst->spin_sprite = src->SpinSprite; + dst->sound_vector_factor = src->SoundVectorFactor; + dst->spin_speed = src->SpinSpeed; + dst->sound2_flags = src->Sound2Flags; dst->sound1_id = OpenRCT2::Audio::SoundId::Null; dst->sound2_id = OpenRCT2::Audio::SoundId::Null; - dst->var_C0 = src->var_C0; + dst->var_C0 = src->VarC0; dst->CollisionDetectionTimer = src->CollisionDetectionTimer; - dst->animation_frame = src->animation_frame; - dst->animationState = src->animationState; + dst->animation_frame = src->AnimationFrame; + dst->animationState = src->AnimationState; dst->NumLaps = src->NumLaps; - dst->var_D3 = src->var_D3; + dst->var_D3 = src->VarD3; dst->scream_sound_id = OpenRCT2::Audio::SoundId::Null; dst->Pitch = src->Pitch; - dst->bank_rotation = src->bank_rotation; + dst->bank_rotation = src->BankRotation; // Seat rotation was not in RCT1 dst->target_seat_rotation = DEFAULT_SEAT_ROTATION; dst->seat_rotation = DEFAULT_SEAT_ROTATION; // Vehicle links (indexes converted later) - dst->prev_vehicle_on_ride = EntityId::FromUnderlying(src->prev_vehicle_on_ride); - dst->next_vehicle_on_ride = EntityId::FromUnderlying(src->next_vehicle_on_ride); - dst->next_vehicle_on_train = EntityId::FromUnderlying(src->next_vehicle_on_train); + dst->prev_vehicle_on_ride = EntityId::FromUnderlying(src->PrevVehicleOnRide); + dst->next_vehicle_on_ride = EntityId::FromUnderlying(src->NextVehicleOnRide); + dst->next_vehicle_on_train = EntityId::FromUnderlying(src->NextVehicleOnTrain); // Guests (indexes converted later) for (int i = 0; i < 32; i++) { - const auto spriteIndex = EntityId::FromUnderlying(src->peep[i]); + const auto spriteIndex = EntityId::FromUnderlying(src->Peep[i]); dst->peep[i] = spriteIndex; if (!spriteIndex.IsNull()) { - dst->peep_tshirt_colours[i] = RCT1::GetColour(src->peep_tshirt_colours[i]); + dst->peep_tshirt_colours[i] = RCT1::GetColour(src->PeepTshirtColours[i]); } } ::Vehicle::Status statusSrc = ::Vehicle::Status::MovingToEndOfStation; - if (src->status <= static_cast(::Vehicle::Status::StoppedByBlockBrakes)) + if (src->Status <= static_cast(::Vehicle::Status::StoppedByBlockBrakes)) { - statusSrc = static_cast<::Vehicle::Status>(src->status); + statusSrc = static_cast<::Vehicle::Status>(src->Status); } dst->status = statusSrc; dst->TrackSubposition = VehicleTrackSubposition{ src->TrackSubposition }; - dst->TrackLocation = { src->track_x, src->track_y, src->track_z }; - dst->current_station = StationIndex::FromUnderlying(src->current_station); - if (src->boat_location.IsNull() || ride->mode != RideMode::BoatHire || statusSrc != ::Vehicle::Status::TravellingBoat) + dst->TrackLocation = { src->TrackX, src->TrackY, src->TrackZ }; + dst->current_station = StationIndex::FromUnderlying(src->CurrentStation); + if (src->BoatLocation.IsNull() || ride->mode != RideMode::BoatHire || statusSrc != ::Vehicle::Status::TravellingBoat) { dst->BoatLocation.SetNull(); dst->SetTrackDirection(src->GetTrackDirection()); @@ -2794,38 +2796,41 @@ namespace RCT1 } else { - dst->BoatLocation = TileCoordsXY{ src->boat_location.x, src->boat_location.y }.ToCoordsXY(); + dst->BoatLocation = TileCoordsXY{ src->BoatLocation.x, src->BoatLocation.y }.ToCoordsXY(); dst->SetTrackDirection(0); dst->SetTrackType(0); } - dst->track_progress = src->track_progress; - dst->vertical_drop_countdown = src->vertical_drop_countdown; - dst->sub_state = src->sub_state; - dst->update_flags = src->update_flags; + dst->track_progress = src->TrackProgress; + dst->vertical_drop_countdown = src->VerticalDropCountdown; + dst->sub_state = src->SubState; + dst->Flags = src->UpdateFlags; SetVehicleColours(dst, src); - dst->mini_golf_current_animation = MiniGolfAnimation(src->mini_golf_current_animation); - dst->mini_golf_flags = src->mini_golf_flags; + dst->mini_golf_current_animation = MiniGolfAnimation(src->MiniGolfCurrentAnimation); + dst->mini_golf_flags = src->MiniGolfFlags; dst->MoveTo({ src->x, src->y, src->z }); - dst->num_peeps = src->num_peeps; - dst->next_free_seat = src->next_free_seat; - dst->IsCrashedVehicle = src->flags & RCT12_SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE; + dst->num_peeps = src->NumPeeps; + dst->next_free_seat = src->NextFreeSeat; + if (src->Flags & RCT12_ENTITY_FLAGS_IS_CRASHED_VEHICLE_ENTITY) + { + dst->SetFlag(VehicleFlags::Crashed); + } } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); auto* src = static_cast(&srcBase); ImportPeep(dst, src); - dst->OutsideOfPark = static_cast(src->outside_of_park); - dst->TimeToConsume = src->time_to_consume; - dst->VandalismSeen = src->vandalism_seen; - dst->UmbrellaColour = RCT1::GetColour(src->umbrella_colour); - dst->HatColour = RCT1::GetColour(src->hat_colour); + dst->OutsideOfPark = static_cast(src->OutsideOfPark); + dst->TimeToConsume = src->TimeToConsume; + dst->VandalismSeen = src->VandalismSeen; + dst->UmbrellaColour = RCT1::GetColour(src->UmbrellaColour); + dst->HatColour = RCT1::GetColour(src->HatColour); // Balloons were always blue in RCT1 without AA/LL if (_gameVersion == FILE_VERSION_RCT1) @@ -2834,68 +2839,68 @@ namespace RCT1 } else { - dst->BalloonColour = RCT1::GetColour(src->balloon_colour); + dst->BalloonColour = RCT1::GetColour(src->BalloonColour); } - dst->Happiness = src->happiness; - dst->HappinessTarget = src->happiness_target; - dst->Nausea = src->nausea; - dst->NauseaTarget = src->nausea_target; - dst->Hunger = src->hunger; - dst->Thirst = src->thirst; - dst->Toilet = src->toilet; - dst->LitterCount = src->litter_count; - dst->DisgustingCount = src->disgusting_count; - dst->Intensity = static_cast(src->intensity); - dst->NauseaTolerance = static_cast(src->nausea_tolerance); - dst->GuestTimeOnRide = src->time_on_ride; - dst->DaysInQueue = src->days_in_queue; - dst->CashInPocket = src->cash_in_pocket; - dst->CashSpent = src->cash_spent; - dst->ParkEntryTime = src->park_entry_time; - dst->GuestNumRides = src->no_of_rides; - dst->AmountOfDrinks = src->no_of_drinks; - dst->AmountOfFood = src->no_of_food; - dst->AmountOfSouvenirs = src->no_of_souvenirs; - dst->PaidToEnter = src->paid_to_enter; - dst->PaidOnRides = src->paid_on_rides; - dst->PaidOnDrink = src->paid_on_drink; - dst->PaidOnFood = src->paid_on_food; - dst->PaidOnSouvenirs = src->paid_on_souvenirs; - dst->VoucherRideId = RCT12RideIdToOpenRCT2RideId(src->voucher_arguments); - dst->VoucherType = src->voucher_type; - dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; - dst->Angriness = src->angriness; - dst->TimeLost = src->time_lost; + dst->Happiness = src->Happiness; + dst->HappinessTarget = src->HappinessTarget; + dst->Nausea = src->Nausea; + dst->NauseaTarget = src->NauseaTarget; + dst->Hunger = src->Hunger; + dst->Thirst = src->Thirst; + dst->Toilet = src->Toilet; + dst->LitterCount = src->LitterCount; + dst->DisgustingCount = src->DisgustingCount; + dst->Intensity = static_cast(src->Intensity); + dst->NauseaTolerance = static_cast(src->NauseaTolerance); + dst->GuestTimeOnRide = src->TimeOnRide; + dst->DaysInQueue = src->DaysInQueue; + dst->CashInPocket = src->CashInPocket; + dst->CashSpent = src->CashSpent; + dst->ParkEntryTime = src->ParkEntryTime; + dst->GuestNumRides = src->NumRides; + dst->AmountOfDrinks = src->NumDrinks; + dst->AmountOfFood = src->NumFood; + dst->AmountOfSouvenirs = src->NumSouvenirs; + dst->PaidToEnter = src->PaidToEnter; + dst->PaidOnRides = src->PaidOnRides; + dst->PaidOnDrink = src->PaidOnDrink; + dst->PaidOnFood = src->PaidOnFood; + dst->PaidOnSouvenirs = src->PaidOnSouvenirs; + dst->VoucherRideId = RCT12RideIdToOpenRCT2RideId(src->VoucherArguments); + dst->VoucherType = src->VoucherType; + dst->SurroundingsThoughtTimeout = src->SurroundingsThoughtTimeout; + dst->Angriness = src->Angriness; + dst->TimeLost = src->TimeLost; - OpenRCT2::RideUse::GetHistory().Set(dst->sprite_index, RCT12GetRidesBeenOn(src)); - OpenRCT2::RideUse::GetTypeHistory().Set(dst->sprite_index, RCT12GetRideTypesBeenOn(src)); + OpenRCT2::RideUse::GetHistory().Set(dst->Id, RCT12GetRidesBeenOn(src)); + OpenRCT2::RideUse::GetTypeHistory().Set(dst->Id, RCT12GetRideTypesBeenOn(src)); - dst->Photo1RideRef = RCT12RideIdToOpenRCT2RideId(src->photo1_ride_ref); + dst->Photo1RideRef = RCT12RideIdToOpenRCT2RideId(src->Photo1RideRef); - for (size_t i = 0; i < std::size(src->thoughts); i++) + for (size_t i = 0; i < std::size(src->Thoughts); i++) { - auto srcThought = &src->thoughts[i]; + auto srcThought = &src->Thoughts[i]; auto dstThought = &dst->Thoughts[i]; - dstThought->type = static_cast(srcThought->type); - if (srcThought->item == RCT12PeepThoughtItemNone) + dstThought->type = static_cast(srcThought->Type); + if (srcThought->Item == RCT12PeepThoughtItemNone) dstThought->item = PeepThoughtItemNone; else - dstThought->item = srcThought->item; - dstThought->freshness = srcThought->freshness; - dstThought->fresh_timeout = srcThought->fresh_timeout; + dstThought->item = srcThought->Item; + dstThought->freshness = srcThought->Freshness; + dstThought->fresh_timeout = srcThought->FreshTimeout; } - dst->PreviousRide = RCT12RideIdToOpenRCT2RideId(src->previous_ride); - dst->PreviousRideTimeOut = src->previous_ride_time_out; - dst->GuestHeadingToRideId = RCT12RideIdToOpenRCT2RideId(src->guest_heading_to_ride_id); - dst->GuestIsLostCountdown = src->peep_is_lost_countdown; - dst->GuestNextInQueue = EntityId::FromUnderlying(src->next_in_queue); + dst->PreviousRide = RCT12RideIdToOpenRCT2RideId(src->PreviousRide); + dst->PreviousRideTimeOut = src->PreviousRideTimeOut; + dst->GuestHeadingToRideId = RCT12RideIdToOpenRCT2RideId(src->GuestHeadingToRideID); + dst->GuestIsLostCountdown = src->PeepIsLostCountdown; + dst->GuestNextInQueue = EntityId::FromUnderlying(src->NextInQueue); // Guests' favourite ride was only saved in LL. // Set it to N/A if the save comes from the original or AA. if (_gameVersion == FILE_VERSION_RCT1_LL) { - dst->FavouriteRide = RCT12RideIdToOpenRCT2RideId(src->favourite_ride); - dst->FavouriteRideRating = src->favourite_ride_rating; + dst->FavouriteRide = RCT12RideIdToOpenRCT2RideId(src->FavouriteRide); + dst->FavouriteRideRating = src->FavouriteRideRating; } else { @@ -2907,110 +2912,136 @@ namespace RCT1 if (dst->OutsideOfPark && dst->State != PeepState::LeavingPark) { - increment_guests_heading_for_park(); + IncrementGuestsHeadingForPark(); } else { - increment_guests_in_park(); + IncrementGuestsInPark(); } } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); auto* src = static_cast(&srcBase); ImportPeep(dst, src); - dst->AssignedStaffType = StaffType(src->staff_type); - dst->MechanicTimeSinceCall = src->mechanic_time_since_call; - dst->HireDate = src->park_entry_time; - dst->StaffOrders = src->staff_orders; - dst->StaffMowingTimeout = src->staff_mowing_timeout; - dst->StaffLawnsMown = src->paid_to_enter; - dst->StaffGardensWatered = src->paid_on_rides; - dst->StaffLitterSwept = src->paid_on_food; - dst->StaffBinsEmptied = src->paid_on_souvenirs; + dst->AssignedStaffType = StaffType(src->StaffType); + dst->MechanicTimeSinceCall = src->MechanicTimeSinceCall; + dst->HireDate = src->ParkEntryTime; + dst->StaffOrders = src->StaffOrders; + dst->StaffMowingTimeout = src->StaffMowingTimeout; + dst->StaffLawnsMown = src->PaidToEnter; + dst->StaffGardensWatered = src->PaidOnRides; + dst->StaffLitterSwept = src->PaidOnFood; + dst->StaffBinsEmptied = src->PaidOnSouvenirs; - ImportStaffPatrolArea(dst, src->staff_id); + ImportStaffPatrolArea(dst, src->StaffID); } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); - dst->SubType = Litter::Type(src->type); + dst->SubType = Litter::Type(src->Type); + dst->creationTick = src->CreationTick; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; + dst->frame = src->Frame; + dst->time_to_move = src->TimeToMove; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); - dst->MoveDelay = src->move_delay; - dst->NumMovements = src->num_movements; - dst->Value = src->value; - dst->OffsetX = src->offset_x; - dst->Wiggle = src->wiggle; + dst->MoveDelay = src->MoveDelay; + dst->NumMovements = src->NumMovements; + dst->GuestPurchase = src->Vertical; + dst->Value = src->Value; + dst->OffsetX = src->OffsetX; + dst->Wiggle = src->Wiggle; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); + dst->frame = src->Frame; + dst->time_to_live = src->TimeToLive; + dst->colour[0] = RCT1::GetColour(src->Colour[0]); + dst->colour[1] = RCT1::GetColour(src->Colour[1]); + dst->crashed_sprite_base = src->CrashedEntityBase; + dst->velocity_x = src->VelocityX; + dst->velocity_y = src->VelocityY; + dst->velocity_z = src->VelocityZ; + dst->acceleration_x = src->AccelerationX; + dst->acceleration_y = src->AccelerationY; + dst->acceleration_z = src->AccelerationZ; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); + dst->frame = src->Frame; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); + dst->frame = src->Frame; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); + dst->frame = src->Frame; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); + + auto fountainType = JumpingFountainType::Water; + if (RCT12MiscEntityType(src->Type) == RCT12MiscEntityType::JumpingFountainSnow) + fountainType = JumpingFountainType::Snow; ImportEntityCommonProperties(dst, src); - dst->FountainFlags = src->fountain_flags; - dst->Iteration = src->iteration; - dst->NumTicksAlive = src->num_ticks_alive; - dst->frame = src->frame; - dst->FountainType = JumpingFountainType::Water; + dst->frame = src->Frame; + dst->FountainType = fountainType; + dst->NumTicksAlive = src->NumTicksAlive; + dst->FountainFlags = src->FountainFlags; + dst->TargetX = src->TargetX; + dst->TargetY = src->TargetY; + dst->Iteration = src->Iteration; } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); + dst->frame = src->Frame; + dst->popped = src->Popped; + dst->time_to_move = src->TimeToMove; // Balloons were always blue in RCT1 without AA/LL if (_gameVersion == FILE_VERSION_RCT1) { @@ -3018,21 +3049,23 @@ namespace RCT1 } else { - dst->colour = RCT1::GetColour(src->colour); + dst->colour = RCT1::GetColour(src->Colour); } } - template<> void S4Importer::ImportEntity(const RCT12SpriteBase& srcBase) + template<> void S4Importer::ImportEntity(const RCT12EntityBase& srcBase) { - auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.sprite_index)); - auto* src = static_cast(&srcBase); + auto* dst = CreateEntityAt(EntityId::FromUnderlying(srcBase.EntityIndex)); + auto* src = static_cast(&srcBase); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; - dst->state = static_cast(src->state); + dst->frame = src->Frame; + dst->target_x = src->TargetX; + dst->target_y = src->TargetY; + dst->state = static_cast(src->State); } - void S4Importer::ImportEntity(const RCT12SpriteBase& src) + void S4Importer::ImportEntity(const RCT12EntityBase& src) { switch (GetEntityTypeFromRCT1Sprite(src)) { diff --git a/src/openrct2/rct1/T4Importer.cpp b/src/openrct2/rct1/T4Importer.cpp index 581449a5e6..333739ef04 100644 --- a/src/openrct2/rct1/T4Importer.cpp +++ b/src/openrct2/rct1/T4Importer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -89,12 +89,12 @@ namespace RCT1 for (int32_t i = 0; i < Limits::NumColourSchemes; i++) { - td->track_spine_colour[i] = RCT1::GetColour(td4aa.track_spine_colour[i]); - td->track_rail_colour[i] = RCT1::GetColour(td4aa.track_rail_colour[i]); - td->track_support_colour[i] = RCT1::GetColour(td4aa.track_support_colour[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->flags2 = td4aa.flags2; + td->flags2 = td4aa.Flags2; return ImportTD4Base(std::move(td), td4aa); } @@ -106,16 +106,16 @@ namespace RCT1 _stream.Read(&td4, sizeof(TD4)); for (int32_t i = 0; i < OpenRCT2::Limits::NumColourSchemes; i++) { - td->track_spine_colour[i] = RCT1::GetColour(td4.track_spine_colour_v0); - td->track_rail_colour[i] = RCT1::GetColour(td4.track_rail_colour_v0); - td->track_support_colour[i] = RCT1::GetColour(td4.track_support_colour_v0); + 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); // Mazes were only hedges - if (td4.type == RideType::HedgeMaze) + if (td4.Type == RideType::HedgeMaze) { td->track_support_colour[i] = MAZE_WALL_TYPE_HEDGE; } - else if (td4.type == RideType::RiverRapids) + else if (td4.Type == RideType::RiverRapids) { td->track_spine_colour[i] = COLOUR_WHITE; td->track_rail_colour[i] = COLOUR_WHITE; @@ -127,45 +127,45 @@ namespace RCT1 std::unique_ptr ImportTD4Base(std::unique_ptr td, TD4& td4Base) { - td->type = RCT1::GetRideType(td4Base.type, td4Base.vehicle_type); + td->type = 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); - if (td4Base.mode == RCT1_RIDE_MODE_POWERED_LAUNCH) + td->ride_mode = static_cast(td4Base.Mode); + if (td4Base.Mode == RCT1_RIDE_MODE_POWERED_LAUNCH) { td->ride_mode = RideMode::PoweredLaunch; } // Convert RCT1 vehicle type to RCT2 vehicle type. Initialise with a string consisting of 8 spaces. std::string_view vehicleObject; - if (td4Base.type == RideType::HedgeMaze) + if (td4Base.Type == RideType::HedgeMaze) { - vehicleObject = RCT1::GetRideTypeObject(td4Base.type); + vehicleObject = RCT1::GetRideTypeObject(td4Base.Type); } else { - vehicleObject = RCT1::GetVehicleObject(td4Base.vehicle_type); + vehicleObject = RCT1::GetVehicleObject(td4Base.VehicleType); } assert(!vehicleObject.empty()); td->vehicle_object = ObjectEntryDescriptor(vehicleObject); - td->vehicle_type = td4Base.vehicle_type; + td->vehicle_type = td4Base.VehicleType; - td->flags = td4Base.flags; - td->colour_scheme = td4Base.version_and_colour_scheme & 0x3; + td->flags = td4Base.Flags; + td->colour_scheme = td4Base.VersionAndColourScheme & 0x3; // Vehicle colours for (int32_t i = 0; i < Limits::MaxTrainsPerRide; i++) { // RCT1 had no third colour RCT1::VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( - td4Base.vehicle_type); + td4Base.VehicleType); if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { - td->vehicle_colours[i].Body = RCT1::GetColour(td4Base.vehicle_colours[i].body_colour); + td->vehicle_colours[i].Body = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); } else if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_2) { - td->vehicle_colours[i].Body = RCT1::GetColour(td4Base.vehicle_colours[i].trim_colour); + td->vehicle_colours[i].Body = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); } else { @@ -174,11 +174,11 @@ namespace RCT1 if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_1) { - td->vehicle_colours[i].Trim = RCT1::GetColour(td4Base.vehicle_colours[i].body_colour); + td->vehicle_colours[i].Trim = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); } else if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_2) { - td->vehicle_colours[i].Trim = RCT1::GetColour(td4Base.vehicle_colours[i].trim_colour); + td->vehicle_colours[i].Trim = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); } else { @@ -187,11 +187,11 @@ namespace RCT1 if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_1) { - td->vehicle_colours[i].Tertiary = RCT1::GetColour(td4Base.vehicle_colours[i].body_colour); + td->vehicle_colours[i].Tertiary = RCT1::GetColour(td4Base.VehicleColours[i].BodyColour); } else if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_2) { - td->vehicle_colours[i].Tertiary = RCT1::GetColour(td4Base.vehicle_colours[i].trim_colour); + td->vehicle_colours[i].Tertiary = RCT1::GetColour(td4Base.VehicleColours[i].TrimColour); } else { @@ -204,69 +204,70 @@ namespace RCT1 td->vehicle_colours[i] = td->vehicle_colours[0]; } - td->depart_flags = td4Base.depart_flags; - td->number_of_trains = td4Base.number_of_trains; - td->number_of_cars_per_train = td4Base.number_of_cars_per_train; - td->min_waiting_time = td4Base.min_waiting_time; - td->max_waiting_time = td4Base.max_waiting_time; + 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.operation_setting, GetRideTypeDescriptor(td->type).OperatingSettings.MaxValue); - td->max_speed = td4Base.max_speed; - td->average_speed = td4Base.average_speed; - td->ride_length = td4Base.ride_length; - td->max_positive_vertical_g = td4Base.max_positive_vertical_g; - td->max_negative_vertical_g = td4Base.max_negative_vertical_g; - td->max_lateral_g = td4Base.max_lateral_g; + 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; if (td->type == RIDE_TYPE_MINI_GOLF) { - td->holes = td4Base.num_holes; + td->holes = td4Base.NumHoles; } else { - td->inversions = td4Base.num_inversions; + td->inversions = td4Base.NumInversions; } - td->drops = td4Base.num_drops; - td->highest_drop_height = td4Base.highest_drop_height / 2; - td->excitement = td4Base.excitement; - td->intensity = td4Base.intensity; - td->nausea = td4Base.nausea; - td->upkeep_cost = td4Base.upkeep_cost; + 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); - if (td->type == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(td->type); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - rct_td46_maze_element t4MazeElement{}; - t4MazeElement.all = !0; - while (t4MazeElement.all != 0) + TD46MazeElement t4MazeElement{}; + t4MazeElement.All = !0; + while (t4MazeElement.All != 0) { - _stream.Read(&t4MazeElement, sizeof(rct_td46_maze_element)); - if (t4MazeElement.all != 0) + _stream.Read(&t4MazeElement, sizeof(TD46MazeElement)); + if (t4MazeElement.All != 0) { TrackDesignMazeElement mazeElement{}; mazeElement.x = t4MazeElement.x; mazeElement.y = t4MazeElement.y; - mazeElement.direction = t4MazeElement.direction; - mazeElement.type = t4MazeElement.type; + mazeElement.direction = t4MazeElement.Direction; + mazeElement.type = t4MazeElement.Type; td->maze_elements.push_back(mazeElement); } } } else { - rct_td46_track_element t4TrackElement{}; + TD46TrackElement t4TrackElement{}; for (uint8_t endFlag = _stream.ReadValue(); endFlag != 0xFF; endFlag = _stream.ReadValue()) { _stream.SetPosition(_stream.GetPosition() - 1); - _stream.Read(&t4TrackElement, sizeof(rct_td46_track_element)); + _stream.Read(&t4TrackElement, sizeof(TD46TrackElement)); TrackDesignTrackElement trackElement{}; - trackElement.type = RCT1TrackTypeToOpenRCT2(t4TrackElement.type, td->type); - trackElement.flags = t4TrackElement.flags; + trackElement.type = RCT1TrackTypeToOpenRCT2(t4TrackElement.Type, td->type); + trackElement.flags = t4TrackElement.Flags; td->track_elements.push_back(trackElement); } } diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index a3e62f6b23..7cd527a75c 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -62,7 +62,7 @@ namespace RCT1 }; if (colour >= std::size(map)) { - log_warning("Unsupported RCT1 colour."); + LOG_WARNING("Unsupported RCT1 colour."); return COLOUR_BLACK; } return map[colour]; @@ -110,7 +110,7 @@ namespace RCT1 }; if (EnumValue(rct1SpriteType) >= std::size(map)) { - log_warning("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1SpriteType)); + LOG_WARNING("Unsupported RCT1 peep sprite type: %d.", EnumValue(rct1SpriteType)); return ::PeepSpriteType::Normal; } return map[EnumValue(rct1SpriteType)]; @@ -282,7 +282,7 @@ namespace RCT1 { 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, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_STEAM_TRAIN, + { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_YELLOW }, // RCT1_VEHICLE_TYPE_STEAM_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_WOODEN_MOUSE_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_BUMPER_BOATS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_WOODEN_ROLLER_COASTER_TRAIN_BACKWARDS, @@ -291,7 +291,7 @@ namespace RCT1 { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SPORTSCARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_LYING_DOWN_SWINGING_CARS, // Inverted single-rail { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_WOODEN_MINE_CARS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SUSPENDED_SWINGING_AIRPLANE_CARS, + { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_SUSPENDED_SWINGING_AIRPLANE_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SMALL_MONORAIL_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_WATER_TRICYCLES, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_LAUNCHED_FREEFALL_CAR, @@ -316,21 +316,21 @@ namespace RCT1 { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_CINEMA_BUILDING, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_TOPSPIN_CAR, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SPACE_RINGS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_REVERSE_FREEFALL_ROLLER_COASTER_CAR, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_VERTICAL_ROLLER_COASTER_CARS, + { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_1 }, // RCT1_VEHICLE_TYPE_REVERSE_FREEFALL_ROLLER_COASTER_CAR, + { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_VERTICAL_ROLLER_COASTER_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_CAT_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_TWIST_ARMS_AND_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_HAUNTED_HOUSE_BUILDING, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_LOG_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_CIRCUS_TENT, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_GHOST_TRAIN_CARS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_STEEL_TWISTER_ROLLER_COASTER_TRAIN, + { COPY_COLOUR_1, COPY_COLOUR_1, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_STEEL_TWISTER_ROLLER_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_WOODEN_TWISTER_ROLLER_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_WOODEN_SIDE_FRICTION_CARS, { COPY_COLOUR_1, COPY_COLOUR_1, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_VINTAGE_CARS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_STEAM_TRAIN_COVERED_CARS, + { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_YELLOW }, // RCT1_VEHICLE_TYPE_STEAM_TRAIN_COVERED_CARS, { COPY_COLOUR_1, COLOUR_BLACK, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_STAND_UP_STEEL_TWISTER_ROLLER_COASTER_TRAIN, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_FLOORLESS_STEEL_TWISTER_ROLLER_COASTER_TRAIN, + { COPY_COLOUR_1, COLOUR_BLACK, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_FLOORLESS_STEEL_TWISTER_ROLLER_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_STEEL_MOUSE_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_CHAIRLIFT_CARS_ALTERNATIVE, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SUSPENDED_MONORAIL_TRAIN, @@ -339,8 +339,8 @@ 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, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_FLYING_ROLLER_COASTER_TRAIN, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_NON_LOOPING_STEEL_TWISTER_ROLLER_COASTER_TRAIN, + { COPY_COLOUR_1, COLOUR_BLACK, 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, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_RESERVED, @@ -351,9 +351,9 @@ namespace RCT1 { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_HYPERCOASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_4_ACROSS_INVERTED_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_WATER_COASTER_BOATS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_FACEOFF_CARS, + { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_FACEOFF_CARS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_JET_SKIS, - { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_RAFT_BOATS, + { COPY_COLOUR_1, COPY_COLOUR_2, COPY_COLOUR_2 }, // RCT1_VEHICLE_TYPE_RAFT_BOATS, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_YELLOW }, // RCT1_VEHICLE_TYPE_AMERICAN_STYLE_STEAM_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_AIR_POWERED_COASTER_TRAIN, { COPY_COLOUR_1, COPY_COLOUR_2, COLOUR_BLACK }, // RCT1_VEHICLE_TYPE_SUSPENDED_WILD_MOUSE_CARS, // Inverted Hairpin in RCT2 @@ -719,10 +719,10 @@ namespace RCT1 "rct2.ride.ding1", // RCT1_RIDE_TYPE_WATER_SLIDE "rct2.ride.amt1", // RCT1_RIDE_TYPE_MINE_TRAIN_ROLLER_COASTER "rct2.ride.clift1", // RCT1_RIDE_TYPE_CHAIRLIFT - "rct2.ride.arrt1", // RCT1_RIDE_TYPE_STEEL_CORKSCREW_ROLLER_COASTER + "rct1.ride.corkscrew_trains", // RCT1_RIDE_TYPE_STEEL_CORKSCREW_ROLLER_COASTER "rct2.ride.hmaze", // RCT1_RIDE_TYPE_HEDGE_MAZE "rct2.ride.hskelt", // RCT1_RIDE_TYPE_SPIRAL_SLIDE - "rct2.ride.kart1", // RCT1_RIDE_TYPE_GO_KARTS + "rct1.ride.go_karts", // RCT1_RIDE_TYPE_GO_KARTS "rct2.ride.lfb1", // RCT1_RIDE_TYPE_LOG_FLUME "rct2.ride.rapboat", // RCT1_RIDE_TYPE_RIVER_RAPIDS "rct2.ride.dodg1", // RCT1_RIDE_TYPE_DODGEMS @@ -828,11 +828,11 @@ namespace RCT1 "rct2.ride.obs1", // RCT1_VEHICLE_TYPE_ROTATING_CABIN "rct2.ride.amt1", // RCT1_VEHICLE_TYPE_MINE_TRAIN "rct2.ride.clift1", // RCT1_VEHICLE_TYPE_CHAIRLIFT_CARS - "rct2.ride.arrt1", // RCT1_VEHICLE_TYPE_CORKSCREW_ROLLER_COASTER_TRAIN + "rct1.ride.corkscrew_trains", // RCT1_VEHICLE_TYPE_CORKSCREW_ROLLER_COASTER_TRAIN "rct2.ride.steep2", // RCT1_VEHICLE_TYPE_MOTORBIKES "rct2.ride.rcr", // RCT1_VEHICLE_TYPE_RACING_CARS "rct2.ride.truck1", // RCT1_VEHICLE_TYPE_TRUCKS - "rct2.ride.kart1", // RCT1_VEHICLE_TYPE_GO_KARTS + "rct1.ride.go_karts", // RCT1_VEHICLE_TYPE_GO_KARTS "rct2.ride.rapboat", // RCT1_VEHICLE_TYPE_RAPIDS_BOATS "rct2.ride.lfb1", // RCT1_VEHICLE_TYPE_LOG_FLUME_BOATS "rct2.ride.dodg1", // RCT1_VEHICLE_TYPE_DODGEMS diff --git a/src/openrct2/rct1/Tables.h b/src/openrct2/rct1/Tables.h index 04389cdb6e..15161191f9 100644 --- a/src/openrct2/rct1/Tables.h +++ b/src/openrct2/rct1/Tables.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct12/EntryList.h b/src/openrct2/rct12/EntryList.h index 93299d7fee..a7625b8092 100644 --- a/src/openrct2/rct12/EntryList.h +++ b/src/openrct2/rct12/EntryList.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct12/Limits.h b/src/openrct2/rct12/Limits.h index 088f62461f..c3dc9999d7 100644 --- a/src/openrct2/rct12/Limits.h +++ b/src/openrct2/rct12/Limits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct12/RCT12.cpp b/src/openrct2/rct12/RCT12.cpp index 004526959a..cebe7f3d89 100644 --- a/src/openrct2/rct12/RCT12.cpp +++ b/src/openrct2/rct12/RCT12.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,6 @@ #include "../scenario/Scenario.h" #include "../world/Banner.h" #include "../world/Footpath.h" -#include "../world/LargeScenery.h" #include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/TileElement.h" @@ -30,7 +29,7 @@ using namespace OpenRCT2; RCT12TileElementType RCT12TileElementBase::GetType() const { - auto elem_type = static_cast((this->type & TILE_ELEMENT_TYPE_MASK) >> 2); + auto elem_type = static_cast((this->Type & TILE_ELEMENT_TYPE_MASK) >> 2); switch (elem_type) { case RCT12TileElementType::Surface: @@ -53,142 +52,142 @@ RCT12TileElementType RCT12TileElementBase::GetType() const uint8_t RCT12TileElementBase::GetDirection() const { - return this->type & TILE_ELEMENT_DIRECTION_MASK; + return this->Type & TILE_ELEMENT_DIRECTION_MASK; } uint8_t RCT12TileElementBase::GetOccupiedQuadrants() const { - return flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK; + return Flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK; } bool RCT12TileElementBase::IsLastForTile() const { - return (this->flags & RCT12_TILE_ELEMENT_FLAG_LAST_TILE) != 0; + return (this->Flags & RCT12_TILE_ELEMENT_FLAG_LAST_TILE) != 0; } bool RCT12TileElementBase::IsGhost() const { - return (this->flags & RCT12_TILE_ELEMENT_FLAG_GHOST) != 0; + return (this->Flags & RCT12_TILE_ELEMENT_FLAG_GHOST) != 0; } uint8_t RCT12SurfaceElement::GetSlope() const { - return (slope & TILE_ELEMENT_SURFACE_SLOPE_MASK); + return (Slope & TILE_ELEMENT_SURFACE_SLOPE_MASK); } uint32_t RCT12SurfaceElement::GetSurfaceStyle() const { - uint32_t retVal = (terrain >> 5) & 7; - retVal |= (type & RCT12_SURFACE_ELEMENT_TYPE_SURFACE_MASK) << 3; + uint32_t retVal = (Terrain >> 5) & 7; + retVal |= (Type & RCT12_SURFACE_ELEMENT_TYPE_SURFACE_MASK) << 3; return retVal; } uint32_t RCT12SurfaceElement::GetEdgeStyle() const { - uint32_t terrain_edge = (slope >> 5) & 7; - if (type & 128) - terrain_edge |= (1 << 3); - return terrain_edge; + uint32_t terrainEdge = (Slope >> 5) & 7; + if (Type & 128) + terrainEdge |= (1 << 3); + return terrainEdge; } uint8_t RCT12SurfaceElement::GetGrassLength() const { - return grass_length; + return GrassLength; } uint8_t RCT12SurfaceElement::GetOwnership() const { - return (ownership & TILE_ELEMENT_SURFACE_OWNERSHIP_MASK); + return (Ownership & TILE_ELEMENT_SURFACE_OWNERSHIP_MASK); } uint32_t RCT12SurfaceElement::GetWaterHeight() const { - return (terrain & RCT12_TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK) * WATER_HEIGHT_STEP; + return (Terrain & RCT12_TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK) * WATER_HEIGHT_STEP; } uint8_t RCT12SurfaceElement::GetParkFences() const { - return (ownership & TILE_ELEMENT_SURFACE_PARK_FENCE_MASK); + return (Ownership & TILE_ELEMENT_SURFACE_PARK_FENCE_MASK); } bool RCT12SurfaceElement::HasTrackThatNeedsWater() const { - return (type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0; + return (Type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0; } uint8_t RCT12PathElement::GetEntryIndex() const { - return (entryIndex & RCT12_FOOTPATH_PROPERTIES_TYPE_MASK) >> 4; + return (EntryIndex & RCT12_FOOTPATH_PROPERTIES_TYPE_MASK) >> 4; } uint8_t RCT12PathElement::GetQueueBannerDirection() const { - return ((type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6); + return ((Type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6); } bool RCT12PathElement::IsSloped() const { - return (entryIndex & RCT12_FOOTPATH_PROPERTIES_FLAG_IS_SLOPED) != 0; + return (EntryIndex & RCT12_FOOTPATH_PROPERTIES_FLAG_IS_SLOPED) != 0; } uint8_t RCT12PathElement::GetSlopeDirection() const { - return entryIndex & RCT12_FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK; + return EntryIndex & RCT12_FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK; } uint8_t RCT12PathElement::GetRideIndex() const { - return rideIndex; + return RideIndex; } uint8_t RCT12PathElement::GetStationIndex() const { - return (additions & RCT12_FOOTPATH_PROPERTIES_ADDITIONS_STATION_INDEX_MASK) >> 4; + return (Additions & RCT12_FOOTPATH_PROPERTIES_ADDITIONS_STATION_INDEX_MASK) >> 4; } bool RCT12PathElement::IsWide() const { - return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0; + return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0; } bool RCT12PathElement::IsQueue() const { - return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0; + return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0; } bool RCT12PathElement::HasQueueBanner() const { - return (entryIndex & RCT12_FOOTPATH_PROPERTIES_FLAG_HAS_QUEUE_BANNER) != 0; + return (EntryIndex & RCT12_FOOTPATH_PROPERTIES_FLAG_HAS_QUEUE_BANNER) != 0; } uint8_t RCT12PathElement::GetEdges() const { - return edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK; + return Edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK; } uint8_t RCT12PathElement::GetCorners() const { - return edges >> 4; + return Edges >> 4; } uint8_t RCT12PathElement::GetAddition() const { - return additions & RCT12_FOOTPATH_PROPERTIES_ADDITIONS_TYPE_MASK; + return Additions & RCT12_FOOTPATH_PROPERTIES_ADDITIONS_TYPE_MASK; } bool RCT12PathElement::AdditionIsGhost() const { - return (additions & RCT12_FOOTPATH_PROPERTIES_ADDITIONS_FLAG_GHOST) != 0; + return (Additions & RCT12_FOOTPATH_PROPERTIES_ADDITIONS_FLAG_GHOST) != 0; } uint8_t RCT12PathElement::GetAdditionStatus() const { - return additionStatus; + return AdditionStatus; } uint8_t RCT12PathElement::GetRCT1PathType() const { - uint8_t pathColour = type & 3; - uint8_t pathType2 = (entryIndex & RCT12_FOOTPATH_PROPERTIES_TYPE_MASK) >> 2; + uint8_t pathColour = Type & 3; + uint8_t pathType2 = (EntryIndex & RCT12_FOOTPATH_PROPERTIES_TYPE_MASK) >> 2; pathType2 = pathType2 | pathColour; return pathType2; @@ -196,210 +195,210 @@ uint8_t RCT12PathElement::GetRCT1PathType() const uint8_t RCT12PathElement::GetRCT1SupportType() const { - return (flags & 0b01100000) >> 5; + return (Flags & 0b01100000) >> 5; } uint8_t RCT12TrackElement::GetTrackType() const { - return trackType; + return TrackType; } uint8_t RCT12TrackElement::GetSequenceIndex() const { - return sequence & RCT12_TRACK_ELEMENT_SEQUENCE_SEQUENCE_MASK; + return Sequence & RCT12_TRACK_ELEMENT_SEQUENCE_SEQUENCE_MASK; } uint8_t RCT12TrackElement::GetRideIndex() const { - return rideIndex; + return RideIndex; } uint8_t RCT12TrackElement::GetColourScheme() const { - return colour & 0x3; + return Colour & 0x3; } uint8_t RCT12TrackElement::GetStationIndex() const { - if (track_type_is_station(trackType) || trackType == TrackElemType::TowerBase) + if (TrackTypeIsStation(TrackType) || TrackType == TrackElemType::TowerBase) { - return (sequence & RCT12_TRACK_ELEMENT_SEQUENCE_STATION_INDEX_MASK) >> 4; + return (Sequence & RCT12_TRACK_ELEMENT_SEQUENCE_STATION_INDEX_MASK) >> 4; } return 0; } bool RCT12TrackElement::HasChain() const { - return type & RCT12_TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT; + return Type & RCT12_TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT; } bool RCT12TrackElement::HasCableLift() const { - return colour & RCT12_TRACK_ELEMENT_COLOUR_FLAG_CABLE_LIFT; + return Colour & RCT12_TRACK_ELEMENT_COLOUR_FLAG_CABLE_LIFT; } bool RCT12TrackElement::IsInverted() const { - return colour & RCT12_TRACK_ELEMENT_COLOUR_FLAG_INVERTED; + return Colour & RCT12_TRACK_ELEMENT_COLOUR_FLAG_INVERTED; } uint8_t RCT12TrackElement::GetBrakeBoosterSpeed() const { if (TrackTypeHasSpeedSetting(GetTrackType())) { - return (sequence >> 4) << 1; + return (Sequence >> 4) << 1; } return 0; } bool RCT12TrackElement::HasGreenLight() const { - if (track_type_is_station(trackType)) + if (TrackTypeIsStation(TrackType)) { - return (sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) != 0; + return (Sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) != 0; } return false; } uint8_t RCT12TrackElement::GetSeatRotation() const { - return colour >> 4; + return Colour >> 4; } uint16_t RCT12TrackElement::GetMazeEntry() const { - return mazeEntry; + return MazeEntry; } uint8_t RCT12TrackElement::GetPhotoTimeout() const { if (GetTrackType() == TrackElemType::OnRidePhoto) { - return sequence >> 4; + return Sequence >> 4; } return 0; } uint8_t RCT12TrackElement::GetDoorAState() const { - return (colour & RCT12_TRACK_ELEMENT_DOOR_A_MASK) >> 2; + return (Colour & RCT12_TRACK_ELEMENT_DOOR_A_MASK) >> 2; } uint8_t RCT12TrackElement::GetDoorBState() const { - return (colour & RCT12_TRACK_ELEMENT_DOOR_B_MASK) >> 5; + return (Colour & RCT12_TRACK_ELEMENT_DOOR_B_MASK) >> 5; } bool RCT12TrackElement::IsIndestructible() const { - return (flags & RCT12_TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE) != 0; + return (Flags & RCT12_TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE) != 0; } uint8_t RCT12SmallSceneryElement::GetEntryIndex() const { - return this->entryIndex; + return this->EntryIndex; } uint8_t RCT12SmallSceneryElement::GetAge() const { - return this->age; + return this->Age; } uint8_t RCT12SmallSceneryElement::GetSceneryQuadrant() const { - return (this->type & TILE_ELEMENT_QUADRANT_MASK) >> 6; + return (this->Type & TILE_ELEMENT_QUADRANT_MASK) >> 6; } colour_t RCT12SmallSceneryElement::GetPrimaryColour() const { - return colour_1 & TILE_ELEMENT_COLOUR_MASK; + return Colour1 & TILE_ELEMENT_COLOUR_MASK; } colour_t RCT12SmallSceneryElement::GetSecondaryColour() const { - return colour_2 & TILE_ELEMENT_COLOUR_MASK; + return Colour2 & TILE_ELEMENT_COLOUR_MASK; } bool RCT12SmallSceneryElement::NeedsSupports() const { - return colour_1 & MAP_ELEM_SMALL_SCENERY_COLOUR_FLAG_NEEDS_SUPPORTS; + return Colour1 & MAP_ELEM_SMALL_SCENERY_COLOUR_FLAG_NEEDS_SUPPORTS; } uint32_t RCT12LargeSceneryElement::GetEntryIndex() const { - return entryIndex & RCT12_TILE_ELEMENT_LARGE_TYPE_MASK; + return EntryIndex & RCT12_TILE_ELEMENT_LARGE_TYPE_MASK; } uint16_t RCT12LargeSceneryElement::GetSequenceIndex() const { - return (entryIndex >> 10); + return (EntryIndex >> 10); } colour_t RCT12LargeSceneryElement::GetPrimaryColour() const { - return colour[0] & TILE_ELEMENT_COLOUR_MASK; + return Colour[0] & TILE_ELEMENT_COLOUR_MASK; } colour_t RCT12LargeSceneryElement::GetSecondaryColour() const { - return colour[1] & TILE_ELEMENT_COLOUR_MASK; + return Colour[1] & TILE_ELEMENT_COLOUR_MASK; } uint8_t RCT12LargeSceneryElement::GetBannerIndex() const { - return (type & 0xC0) | (((colour[0]) & ~TILE_ELEMENT_COLOUR_MASK) >> 2) | (((colour[1]) & ~TILE_ELEMENT_COLOUR_MASK) >> 5); + return (Type & 0xC0) | (((Colour[0]) & ~TILE_ELEMENT_COLOUR_MASK) >> 2) | (((Colour[1]) & ~TILE_ELEMENT_COLOUR_MASK) >> 5); } uint8_t RCT12WallElement::GetEntryIndex() const { - return entryIndex; + return EntryIndex; } uint8_t RCT12WallElement::GetSlope() const { - return (type & TILE_ELEMENT_QUADRANT_MASK) >> 6; + return (Type & TILE_ELEMENT_QUADRANT_MASK) >> 6; } colour_t RCT12WallElement::GetPrimaryColour() const { - return colour_1 & TILE_ELEMENT_COLOUR_MASK; + return Colour1 & TILE_ELEMENT_COLOUR_MASK; } colour_t RCT12WallElement::GetSecondaryColour() const { - uint8_t secondaryColour = (colour_1 & ~TILE_ELEMENT_COLOUR_MASK) >> 5; - secondaryColour |= (flags & 0x60) >> 2; + uint8_t secondaryColour = (Colour1 & ~TILE_ELEMENT_COLOUR_MASK) >> 5; + secondaryColour |= (Flags & 0x60) >> 2; return secondaryColour; } colour_t RCT12WallElement::GetTertiaryColour() const { - return colour_3 & TILE_ELEMENT_COLOUR_MASK; + return Colour3 & TILE_ELEMENT_COLOUR_MASK; } uint8_t RCT12WallElement::GetAnimationFrame() const { - return (animation >> 3) & 0xF; + return (Animation >> 3) & 0xF; } uint8_t RCT12WallElement::GetBannerIndex() const { - return banner_index; + return BannerIndex; } bool RCT12WallElement::IsAcrossTrack() const { - return (animation & WALL_ANIMATION_FLAG_ACROSS_TRACK) != 0; + return (Animation & WALL_ANIMATION_FLAG_ACROSS_TRACK) != 0; } bool RCT12WallElement::AnimationIsBackwards() const { - return (animation & WALL_ANIMATION_FLAG_DIRECTION_BACKWARD) != 0; + return (Animation & WALL_ANIMATION_FLAG_DIRECTION_BACKWARD) != 0; } int32_t RCT12WallElement::GetRCT1WallType(int32_t edge) const { - uint8_t var_05 = colour_3; - uint16_t var_06 = colour_1 | (animation << 8); + uint8_t var_05 = Colour3; + uint16_t var_06 = Colour1 | (Animation << 8); int32_t typeA = (var_05 >> (edge * 2)) & 3; int32_t typeB = (var_06 >> (edge * 4)) & 0x0F; @@ -414,47 +413,47 @@ int32_t RCT12WallElement::GetRCT1WallType(int32_t edge) const colour_t RCT12WallElement::GetRCT1WallColour() const { - return ((type & 0xC0) >> 3) | ((entryIndex & 0xE0) >> 5); + return ((Type & 0xC0) >> 3) | ((EntryIndex & 0xE0) >> 5); } uint8_t RCT12WallElement::GetRCT1Slope() const { - return entryIndex & 0b00011111; + return EntryIndex & 0b00011111; } uint8_t RCT12EntranceElement::GetEntranceType() const { - return entranceType; + return EntranceType; } uint8_t RCT12EntranceElement::GetRideIndex() const { - return rideIndex; + return RideIndex; } uint8_t RCT12EntranceElement::GetStationIndex() const { - return (index & RCT12_TRACK_ELEMENT_SEQUENCE_STATION_INDEX_MASK) >> 4; + return (Index & RCT12_TRACK_ELEMENT_SEQUENCE_STATION_INDEX_MASK) >> 4; } uint8_t RCT12EntranceElement::GetSequenceIndex() const { - return index & 0xF; + return Index & 0xF; } uint8_t RCT12EntranceElement::GetPathType() const { - return pathType; + return PathType; } uint8_t RCT12BannerElement::GetIndex() const { - return index; + return Index; } uint8_t RCT12BannerElement::GetPosition() const { - return position; + return Position; } uint8_t RCT12BannerElement::GetAllowedEdges() const @@ -462,39 +461,39 @@ uint8_t RCT12BannerElement::GetAllowedEdges() const return AllowedEdges & 0b00001111; } -bool is_user_string_id(StringId stringId) +bool IsUserStringID(StringId stringId) { return stringId >= 0x8000 && stringId < 0x9000; } bool RCT12PathElement::IsBroken() const { - return (flags & RCT12_TILE_ELEMENT_FLAG_BROKEN) != 0; + return (Flags & RCT12_TILE_ELEMENT_FLAG_BROKEN) != 0; } bool RCT12PathElement::IsBlockedByVehicle() const { - return (flags & RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE) != 0; + return (Flags & RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE) != 0; } bool RCT12TrackElement::BlockBrakeClosed() const { - return (flags & RCT12_TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED) != 0; + return (Flags & RCT12_TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED) != 0; } bool RCT12ResearchItem::IsInventedEndMarker() const { - return rawValue == RCT12_RESEARCHED_ITEMS_SEPARATOR; + return RawValue == RCT12_RESEARCHED_ITEMS_SEPARATOR; } bool RCT12ResearchItem::IsUninventedEndMarker() const { - return rawValue == RCT12_RESEARCHED_ITEMS_END; + return RawValue == RCT12_RESEARCHED_ITEMS_END; } bool RCT12ResearchItem::IsRandomEndMarker() const { - return rawValue == RCT12_RESEARCHED_ITEMS_END_2; + return RawValue == RCT12_RESEARCHED_ITEMS_END_2; } ObjectEntryIndex RCTEntryIndexToOpenRCT2EntryIndex(const RCT12ObjectEntryIndex index) @@ -632,7 +631,7 @@ std::string ConvertFormattedStringToOpenRCT2(std::string_view buffer) { buffer = buffer.substr(0, nullTerminator); } - auto asUtf8 = rct2_to_utf8(buffer, RCT2LanguageId::EnglishUK); + auto asUtf8 = RCT2StringToUTF8(buffer, RCT2LanguageId::EnglishUK); std::string result; CodepointView codepoints(asUtf8); @@ -841,15 +840,15 @@ ResearchItem RCT12ResearchItem::ToResearchItem() const } else { - newResearchItem.type = Research::EntryType{ type }; - newResearchItem.entryIndex = RCTEntryIndexToOpenRCT2EntryIndex(entryIndex); - newResearchItem.flags = flags; - newResearchItem.category = static_cast(category); + newResearchItem.type = Research::EntryType{ Type }; + newResearchItem.entryIndex = RCTEntryIndexToOpenRCT2EntryIndex(EntryIndex); + newResearchItem.flags = Flags; + newResearchItem.category = static_cast(Category); if (newResearchItem.type == Research::EntryType::Ride) { - auto* rideEntry = get_ride_entry(newResearchItem.entryIndex); - newResearchItem.baseRideType = rideEntry != nullptr ? RCT2::RCT2RideTypeToOpenRCT2RideType(baseRideType, rideEntry) - : baseRideType; + auto* rideEntry = GetRideEntryByIndex(newResearchItem.entryIndex); + newResearchItem.baseRideType = rideEntry != nullptr ? RCT2::RCT2RideTypeToOpenRCT2RideType(BaseRideType, *rideEntry) + : BaseRideType; } else { diff --git a/src/openrct2/rct12/RCT12.h b/src/openrct2/rct12/RCT12.h index ad68b6c38d..4f6b2103bd 100644 --- a/src/openrct2/rct12/RCT12.h +++ b/src/openrct2/rct12/RCT12.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -123,7 +123,7 @@ enum RCT12_TRACK_ELEMENT_DOOR_B_MASK = 0b11100000, }; -// Masks and flags for values stored in TileElement.properties.path.type +// Masks and Flags for values stored in TileElement.properties.path.type enum { RCT12_FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK = (1 << 0) | (1 << 1), @@ -132,7 +132,7 @@ enum RCT12_FOOTPATH_PROPERTIES_TYPE_MASK = (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7), }; -// Masks and flags for values stored in RCT12TileElement.properties.path.additions +// Masks and Flags for values stored in RCT12TileElement.properties.path.additions enum { RCT12_FOOTPATH_PROPERTIES_ADDITIONS_TYPE_MASK = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3), @@ -161,7 +161,7 @@ enum enum { - RCT12_SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE = 1 << 7, + RCT12_ENTITY_FLAGS_IS_CRASHED_VEHICLE_ENTITY = 1 << 7, }; #pragma pack(push, 1) @@ -190,49 +190,49 @@ struct RCT12xy8 assert_struct_size(RCT12xy8, 2); /* Maze Element entry size: 0x04 */ -struct rct_td46_maze_element +struct TD46MazeElement { union { - uint32_t all; + uint32_t All; struct { int8_t x; int8_t y; union { - uint16_t maze_entry; + uint16_t MazeEntry; struct { - uint8_t direction; - uint8_t type; + uint8_t Direction; + uint8_t Type; }; }; }; }; }; -assert_struct_size(rct_td46_maze_element, 0x04); +assert_struct_size(TD46MazeElement, 0x04); /* Track Element entry size: 0x02 */ -struct rct_td46_track_element +struct TD46TrackElement { - uint8_t type; // 0x00 - uint8_t flags; // 0x01 + uint8_t Type; // 0x00 + uint8_t Flags; // 0x01 }; -assert_struct_size(rct_td46_track_element, 0x02); +assert_struct_size(TD46TrackElement, 0x02); -struct rct12_award +struct RCT12Award { - uint16_t time; - uint16_t type; + uint16_t Time; + uint16_t Type; }; -assert_struct_size(rct12_award, 4); +assert_struct_size(RCT12Award, 4); /** * A single news item / message. * size: 0x10C */ -struct rct12_news_item +struct RCT12NewsItem { uint8_t Type; uint8_t Flags; @@ -240,25 +240,25 @@ struct rct12_news_item uint16_t Ticks; uint16_t MonthYear; uint8_t Day; - uint8_t pad_0B; + uint8_t Pad0B; char Text[256]; }; -assert_struct_size(rct12_news_item, 0x10C); +assert_struct_size(RCT12NewsItem, 0x10C); -struct rct12_xyzd8 +struct RCT12xyzd8 { uint8_t x, y, z, direction; }; -assert_struct_size(rct12_xyzd8, 4); +assert_struct_size(RCT12xyzd8, 4); -struct rct12_peep_spawn +struct RCT12PeepSpawn { uint16_t x; uint16_t y; uint8_t z; uint8_t direction; }; -assert_struct_size(rct12_peep_spawn, 6); +assert_struct_size(RCT12PeepSpawn, 6); enum class RCT12TileElementType : uint8_t { @@ -310,10 +310,10 @@ struct RCT12EightCarsCorruptElement15; struct RCT12TileElementBase { - uint8_t type; // 0 - uint8_t flags; // 1. Upper nibble: flags. Lower nibble: occupied quadrants (one bit per quadrant). - uint8_t base_height; // 2 - uint8_t clearance_height; // 3 + uint8_t Type; // 0 + uint8_t Flags; // 1. Upper nibble: Flags. Lower nibble: occupied quadrants (one bit per quadrant). + uint8_t BaseHeight; // 2 + uint8_t ClearanceHeight; // 3 RCT12TileElementType GetType() const; uint8_t GetDirection() const; @@ -328,7 +328,7 @@ struct RCT12TileElementBase */ struct RCT12TileElement : public RCT12TileElementBase { - uint8_t pad_04[4]; + uint8_t Pad04[4]; template const TType* as() const { return static_cast(GetType()) == TClass ? reinterpret_cast(this) : nullptr; @@ -407,10 +407,10 @@ assert_struct_size(RCT12TileElement, 8); struct RCT12SurfaceElement : RCT12TileElementBase { private: - uint8_t slope; // 4 0xE0 Edge Style, 0x1F Slope - uint8_t terrain; // 5 0xE0 Terrain Style, 0x1F Water height - uint8_t grass_length; // 6 - uint8_t ownership; // 7 + uint8_t Slope; // 4 0xE0 Edge Style, 0x1F Slope + uint8_t Terrain; // 5 0xE0 Terrain Style, 0x1F Water height + uint8_t GrassLength; // 6 + uint8_t Ownership; // 7 public: uint8_t GetSlope() const; uint32_t GetSurfaceStyle() const; @@ -425,13 +425,13 @@ assert_struct_size(RCT12SurfaceElement, 8); struct RCT12PathElement : RCT12TileElementBase { private: - uint8_t entryIndex; // 4, 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is sloped, 0x03 Rotation - uint8_t additions; // 5, 0bGSSSAAAA: G = Ghost, S = station index, A = addition (0 means no addition) - uint8_t edges; // 6 + uint8_t EntryIndex; // 4, 0xF0 Path type, 0x08 Ride sign, 0x04 Set when path is sloped, 0x03 Rotation + uint8_t Additions; // 5, 0bGSSSAAAA: G = Ghost, S = station index, A = addition (0 means no addition) + uint8_t Edges; // 6 union { - uint8_t additionStatus; // 7 - uint8_t rideIndex; + uint8_t AdditionStatus; // 7 + uint8_t RideIndex; }; public: @@ -460,13 +460,13 @@ assert_struct_size(RCT12PathElement, 8); struct RCT12TrackElement : RCT12TileElementBase { private: - uint8_t trackType; // 4 + uint8_t TrackType; // 4 union { struct { // The lower 4 bits are the track sequence. - // The upper 4 bits are either station bits or on-ride photo bits. + // The upper 4 bits are either station bits, brake speed bits, or on-ride photo bits. // // Station bits: // - Bit 8 marks green light @@ -476,12 +476,12 @@ private: // - Bits 7 and 8 are never set // - Bits 5 and 6 are set when a vehicle triggers the on-ride photo and act like a countdown from 3. // - If any of the bits 5-8 are set, the game counts it as a photo being taken. - uint8_t sequence; // 5. - uint8_t colour; // 6 + uint8_t Sequence; // 5. + uint8_t Colour; // 6 }; - uint16_t mazeEntry; // 5 + uint16_t MazeEntry; // 5 }; - uint8_t rideIndex; // 7 + uint8_t RideIndex; // 7 public: uint8_t GetTrackType() const; uint8_t GetSequenceIndex() const; @@ -507,10 +507,10 @@ assert_struct_size(RCT12TrackElement, 8); struct RCT12SmallSceneryElement : RCT12TileElementBase { private: - uint8_t entryIndex; // 4 - uint8_t age; // 5 - uint8_t colour_1; // 6 - uint8_t colour_2; // 7 + uint8_t EntryIndex; // 4 + uint8_t Age; // 5 + uint8_t Colour1; // 6 + uint8_t Colour2; // 7 public: RCT12ObjectEntryIndex GetEntryIndex() const; uint8_t GetAge() const; @@ -523,8 +523,8 @@ assert_struct_size(RCT12SmallSceneryElement, 8); struct RCT12LargeSceneryElement : RCT12TileElementBase { private: - uint16_t entryIndex; // 4 - uint8_t colour[2]; // 6 + uint16_t EntryIndex; // 4 + uint8_t Colour[2]; // 6 public: uint32_t GetEntryIndex() const; uint16_t GetSequenceIndex() const; @@ -536,14 +536,14 @@ assert_struct_size(RCT12LargeSceneryElement, 8); struct RCT12WallElement : RCT12TileElementBase { private: - uint8_t entryIndex; // 4 + uint8_t EntryIndex; // 4 union { - uint8_t colour_3; // 5 - uint8_t banner_index; // 5 + uint8_t Colour3; // 5 + uint8_t BannerIndex; // 5 }; - uint8_t colour_1; // 6 0b_2221_1111 2 = colour_2 (uses flags for rest of colour2), 1 = colour_1 - uint8_t animation; // 7 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used) + uint8_t Colour1; // 6 0b_2221_1111 2 = colour_2 (uses Flags for rest of colour2), 1 = colour_1 + uint8_t Animation; // 7 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used) public: RCT12ObjectEntryIndex GetEntryIndex() const; uint8_t GetSlope() const; @@ -562,10 +562,10 @@ assert_struct_size(RCT12WallElement, 8); struct RCT12EntranceElement : RCT12TileElementBase { private: - uint8_t entranceType; // 4 - uint8_t index; // 5. 0bUSSS????, S = station index. - uint8_t pathType; // 6 - uint8_t rideIndex; // 7 + uint8_t EntranceType; // 4 + uint8_t Index; // 5. 0bUSSS????, S = station index. + uint8_t PathType; // 6 + uint8_t RideIndex; // 7 public: uint8_t GetEntranceType() const; uint8_t GetRideIndex() const; @@ -577,12 +577,12 @@ assert_struct_size(RCT12EntranceElement, 8); struct RCT12BannerElement : RCT12TileElementBase { private: - uint8_t index; // 4 - uint8_t position; // 5 + uint8_t Index; // 4 + uint8_t Position; // 5 uint8_t AllowedEdges; // 6 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" - uint8_t unused; // 7 + uint8_t Unused; // 7 #pragma clang diagnostic pop public: uint8_t GetIndex() const; @@ -593,23 +593,23 @@ assert_struct_size(RCT12BannerElement, 8); struct RCT12CorruptElement : RCT12TileElementBase { - uint8_t pad[4]; + uint8_t Pad[4]; }; assert_struct_size(RCT12CorruptElement, 8); struct RCT12EightCarsCorruptElement14 : RCT12TileElementBase { - uint8_t pad[4]; + uint8_t Pad[4]; }; assert_struct_size(RCT12EightCarsCorruptElement14, 8); struct RCT12EightCarsCorruptElement15 : RCT12TileElementBase { - uint8_t pad[4]; + uint8_t Pad[4]; }; assert_struct_size(RCT12EightCarsCorruptElement15, 8); -// Offset into sprite_lists_head and sprite_lists_count +// Offset into EntityListHead and EntityListCount enum class RCT12EntityLinkListOffset : uint8_t { Free = 0, @@ -620,7 +620,7 @@ enum class RCT12EntityLinkListOffset : uint8_t Vehicle = 5 * sizeof(uint16_t), }; -enum class RCT12SpriteIdentifier : uint8_t +enum class RCT12EntityIdentifier : uint8_t { Vehicle = 0, Peep = 1, @@ -651,172 +651,172 @@ enum class RCT12PeepType : uint8_t Invalid = 0xFF }; -struct RCT12SpriteBase +struct RCT12EntityBase { - RCT12SpriteIdentifier sprite_identifier; // 0x00 - uint8_t type; // 0x01 - uint16_t next_in_quadrant; // 0x02 - uint16_t next; // 0x04 - uint16_t previous; // 0x06 - RCT12EntityLinkListOffset linked_list_type_offset; // 0x08 - uint8_t sprite_height_negative; // 0x09 - uint16_t sprite_index; // 0x0A - uint16_t flags; // 0x0C - int16_t x; // 0x0E - int16_t y; // 0x10 - int16_t z; // 0x12 - uint8_t sprite_width; // 0x14 - uint8_t sprite_height_positive; // 0x15 - int16_t sprite_left; // 0x16 - int16_t sprite_top; // 0x18 - int16_t sprite_right; // 0x1A - int16_t sprite_bottom; // 0x1C - uint8_t sprite_direction; // 0x1E + RCT12EntityIdentifier EntityIdentifier; // 0x00 + uint8_t Type; // 0x01 + uint16_t NextInQuadrant; // 0x02 + uint16_t Next; // 0x04 + uint16_t Previous; // 0x06 + RCT12EntityLinkListOffset LinkedListTypeOffset; // 0x08 + uint8_t SpriteHeightNegative; // 0x09 + uint16_t EntityIndex; // 0x0A + uint16_t Flags; // 0x0C + int16_t x; // 0x0E + int16_t y; // 0x10 + int16_t z; // 0x12 + uint8_t SpriteWidth; // 0x14 + uint8_t SpriteHeightPositive; // 0x15 + int16_t SpriteLeft; // 0x16 + int16_t SpriteTop; // 0x18 + int16_t SpriteRight; // 0x1A + int16_t SpriteBottom; // 0x1C + uint8_t EntityDirection; // 0x1E }; -assert_struct_size(RCT12SpriteBase, 0x1F); +assert_struct_size(RCT12EntityBase, 0x1F); -struct RCT12SpriteBalloon : RCT12SpriteBase +struct RCT12EntityBalloon : RCT12EntityBase { - uint8_t pad_1F[0x24 - 0x1F]; - uint16_t popped; // 0x24 - uint8_t time_to_move; // 0x26 - uint8_t frame; // 0x27 - uint8_t pad_28[4]; - uint8_t colour; // 0x2C + uint8_t Pad1F[0x24 - 0x1F]; + uint16_t Popped; // 0x24 + uint8_t TimeToMove; // 0x26 + uint8_t Frame; // 0x27 + uint8_t Pad28[4]; + uint8_t Colour; // 0x2C }; -assert_struct_size(RCT12SpriteBalloon, 0x2D); +assert_struct_size(RCT12EntityBalloon, 0x2D); -struct RCT12SpriteDuck : RCT12SpriteBase +struct RCT12EntityDuck : RCT12EntityBase { - uint8_t pad_1F[0x26 - 0x1F]; - uint16_t frame; // 0x26 - uint8_t pad_28[0x30 - 0x28]; - int16_t target_x; // 0x30 - int16_t target_y; // 0x32 - uint8_t pad_34[0x14]; - uint8_t state; // 0x48 + uint8_t Pad1F[0x26 - 0x1F]; + uint16_t Frame; // 0x26 + uint8_t Pad28[0x30 - 0x28]; + int16_t TargetX; // 0x30 + int16_t TargetY; // 0x32 + uint8_t Pad34[0x14]; + uint8_t State; // 0x48 }; -assert_struct_size(RCT12SpriteDuck, 0x49); +assert_struct_size(RCT12EntityDuck, 0x49); -struct RCT12SpriteLitter : RCT12SpriteBase +struct RCT12EntityLitter : RCT12EntityBase { - uint8_t pad_1F[0x24 - 0x1F]; - uint32_t creationTick; // 0x24 + uint8_t Pad1F[0x24 - 0x1F]; + uint32_t CreationTick; // 0x24 }; -assert_struct_size(RCT12SpriteLitter, 0x28); +assert_struct_size(RCT12EntityLitter, 0x28); -struct RCT12SpriteParticle : RCT12SpriteBase +struct RCT12EntityParticle : RCT12EntityBase { - uint8_t pad_1F[0x26 - 0x1F]; - uint16_t frame; // 0x26 + uint8_t Pad1F[0x26 - 0x1F]; + uint16_t Frame; // 0x26 }; -assert_struct_size(RCT12SpriteParticle, 0x28); +assert_struct_size(RCT12EntityParticle, 0x28); -struct RCT12SpriteJumpingFountain : RCT12SpriteBase +struct RCT12EntityJumpingFountain : RCT12EntityBase { - uint8_t pad_1F[0x26 - 0x1F]; - uint8_t num_ticks_alive; // 0x26 - uint8_t frame; // 0x27 - uint8_t pad_28[0x2F - 0x28]; - uint8_t fountain_flags; // 0x2F - int16_t target_x; // 0x30 - int16_t target_y; // 0x32 - uint8_t pad_34[0x46 - 0x34]; - uint16_t iteration; // 0x46 + uint8_t Pad1F[0x26 - 0x1F]; + uint8_t NumTicksAlive; // 0x26 + uint8_t Frame; // 0x27 + uint8_t Pad28[0x2F - 0x28]; + uint8_t FountainFlags; // 0x2F + int16_t TargetX; // 0x30 + int16_t TargetY; // 0x32 + uint8_t Pad34[0x46 - 0x34]; + uint16_t Iteration; // 0x46 }; -assert_struct_size(RCT12SpriteJumpingFountain, 0x48); +assert_struct_size(RCT12EntityJumpingFountain, 0x48); -struct RCT12SpriteMoneyEffect : RCT12SpriteBase +struct RCT12EntityMoneyEffect : RCT12EntityBase { - uint8_t pad_1F[0x24 - 0x1F]; - uint16_t move_delay; // 0x24 - uint8_t num_movements; // 0x26 - uint8_t vertical; - money32 value; // 0x28 - uint8_t pad_2C[0x44 - 0x2C]; - int16_t offset_x; // 0x44 - uint16_t wiggle; // 0x46 + uint8_t Pad1F[0x24 - 0x1F]; + uint16_t MoveDelay; // 0x24 + uint8_t NumMovements; // 0x26 + uint8_t Vertical; + money32 Value; // 0x28 + uint8_t Pad2C[0x44 - 0x2C]; + int16_t OffsetX; // 0x44 + uint16_t Wiggle; // 0x46 }; -assert_struct_size(RCT12SpriteMoneyEffect, 0x48); +assert_struct_size(RCT12EntityMoneyEffect, 0x48); -struct RCT12SpriteCrashedVehicleParticle : RCT12SpriteBase +struct RCT12EntityCrashedVehicleParticle : RCT12EntityBase { - uint8_t pad_1F[0x24 - 0x1F]; - uint16_t time_to_live; // 0x24 - uint16_t frame; // 0x26 - uint8_t pad_28[0x2C - 0x28]; - uint8_t colour[2]; // 0x2C - uint16_t crashed_sprite_base; // 0x2E - int16_t velocity_x; // 0x30 - int16_t velocity_y; // 0x32 - int16_t velocity_z; // 0x34 - uint8_t pad_36[0x38 - 0x36]; - int32_t acceleration_x; // 0x38 - int32_t acceleration_y; // 0x3C - int32_t acceleration_z; // 0x40 + uint8_t Pad1F[0x24 - 0x1F]; + uint16_t TimeToLive; // 0x24 + uint16_t Frame; // 0x26 + uint8_t Pad28[0x2C - 0x28]; + uint8_t Colour[2]; // 0x2C + uint16_t CrashedEntityBase; // 0x2E + int16_t VelocityX; // 0x30 + int16_t VelocityY; // 0x32 + int16_t VelocityZ; // 0x34 + uint8_t Pad36[0x38 - 0x36]; + int32_t AccelerationX; // 0x38 + int32_t AccelerationY; // 0x3C + int32_t AccelerationZ; // 0x40 }; -assert_struct_size(RCT12SpriteCrashedVehicleParticle, 0x44); +assert_struct_size(RCT12EntityCrashedVehicleParticle, 0x44); -struct RCT12SpriteCrashSplash : RCT12SpriteBase +struct RCT12EntityCrashSplash : RCT12EntityBase { - uint8_t pad_1F[0x26 - 0x1F]; - uint16_t frame; // 0x26 + uint8_t Pad1F[0x26 - 0x1F]; + uint16_t Frame; // 0x26 }; -assert_struct_size(RCT12SpriteCrashSplash, 0x28); +assert_struct_size(RCT12EntityCrashSplash, 0x28); -struct RCT12SpriteSteamParticle : RCT12SpriteBase +struct RCT12EntitySteamParticle : RCT12EntityBase { - uint8_t pad_1F[0x24 - 0x1F]; - uint16_t time_to_move; // 0x24 - uint16_t frame; // 0x26 + uint8_t Pad1F[0x24 - 0x1F]; + uint16_t TimeToMove; // 0x24 + uint16_t Frame; // 0x26 }; -assert_struct_size(RCT12SpriteSteamParticle, 0x28); +assert_struct_size(RCT12EntitySteamParticle, 0x28); struct RCT12PeepThought { - uint8_t type; - uint8_t item; - uint8_t freshness; - uint8_t fresh_timeout; + uint8_t Type; + uint8_t Item; + uint8_t Freshness; + uint8_t FreshTimeout; }; assert_struct_size(RCT12PeepThought, 4); struct RCT12RideMeasurement { - uint8_t ride_index; // 0x0000 - uint8_t flags; // 0x0001 - uint32_t last_use_tick; // 0x0002 - uint16_t num_items; // 0x0006 - uint16_t current_item; // 0x0008 - uint8_t vehicle_index; // 0x000A - uint8_t current_station; // 0x000B - int8_t vertical[RCT12::Limits::RideMeasurementMaxItems]; // 0x000C - int8_t lateral[RCT12::Limits::RideMeasurementMaxItems]; // 0x12CC - uint8_t velocity[RCT12::Limits::RideMeasurementMaxItems]; // 0x258C - uint8_t altitude[RCT12::Limits::RideMeasurementMaxItems]; // 0x384C + uint8_t RideIndex; // 0x0000 + uint8_t Flags; // 0x0001 + uint32_t LastUseTick; // 0x0002 + uint16_t NumItems; // 0x0006 + uint16_t CurrentItem; // 0x0008 + uint8_t VehicleIndex; // 0x000A + uint8_t CurrentStation; // 0x000B + int8_t Vertical[RCT12::Limits::RideMeasurementMaxItems]; // 0x000C + int8_t Lateral[RCT12::Limits::RideMeasurementMaxItems]; // 0x12CC + uint8_t Velocity[RCT12::Limits::RideMeasurementMaxItems]; // 0x258C + uint8_t Altitude[RCT12::Limits::RideMeasurementMaxItems]; // 0x384C }; assert_struct_size(RCT12RideMeasurement, 0x4B0C); struct RCT12Banner { - RCT12ObjectEntryIndex type; - uint8_t flags; // 0x01 - StringId string_idx; // 0x02 + RCT12ObjectEntryIndex Type; + uint8_t Flags; // 0x01 + ::StringId StringID; // 0x02 union { - uint8_t colour; // 0x04 - uint8_t ride_index; // 0x04 + uint8_t Colour; // 0x04 + uint8_t RideIndex; // 0x04 }; - uint8_t text_colour; // 0x05 - uint8_t x; // 0x06 - uint8_t y; // 0x07 + uint8_t TextColour; // 0x05 + uint8_t x; // 0x06 + uint8_t y; // 0x07 }; assert_struct_size(RCT12Banner, 8); struct RCT12MapAnimation { - uint8_t baseZ; - uint8_t type; + uint8_t BaseZ; + uint8_t Type; uint16_t x; uint16_t y; }; @@ -827,16 +827,16 @@ struct RCT12ResearchItem // Bit 16 (0: scenery entry, 1: ride entry) union { - uint32_t rawValue; + uint32_t RawValue; struct { - RCT12ObjectEntryIndex entryIndex; - uint8_t baseRideType; - uint8_t type; // 0: scenery entry, 1: ride entry - uint8_t flags; + RCT12ObjectEntryIndex EntryIndex; + uint8_t BaseRideType; + uint8_t Type; // 0: scenery entry, 1: ride entry + uint8_t Flags; }; }; - uint8_t category; + uint8_t Category; bool IsInventedEndMarker() const; bool IsRandomEndMarker() const; @@ -848,8 +848,8 @@ assert_struct_size(RCT12ResearchItem, 5); struct RCT12VehicleColour { - uint8_t body_colour; - uint8_t trim_colour; + uint8_t BodyColour; + uint8_t TrimColour; }; assert_struct_size(RCT12VehicleColour, 2); @@ -877,7 +877,7 @@ template std::vector RCT12GetRideTypesBeenOn(T* srcPeep) std::vector ridesTypesBeenOn; for (uint16_t i = 0; i < RCT12::Limits::MaxRideObjects; i++) { - if (srcPeep->ride_types_been_on[i / 8] & (1 << (i % 8))) + if (srcPeep->RideTypesBeenOn[i / 8] & (1 << (i % 8))) { ridesTypesBeenOn.push_back(i); } @@ -889,7 +889,7 @@ template std::vector RCT12GetRidesBeenOn(T* srcPeep) std::vector ridesBeenOn; for (uint16_t i = 0; i < RCT12::Limits::MaxRidesInPark; i++) { - if (srcPeep->rides_been_on[i / 8] & (1 << (i % 8))) + if (srcPeep->RidesBeenOn[i / 8] & (1 << (i % 8))) { ridesBeenOn.push_back(RideId::FromUnderlying(i)); } diff --git a/src/openrct2/rct12/SawyerChunk.cpp b/src/openrct2/rct12/SawyerChunk.cpp index fdb6273807..b4d054792a 100644 --- a/src/openrct2/rct12/SawyerChunk.cpp +++ b/src/openrct2/rct12/SawyerChunk.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct12/SawyerChunk.h b/src/openrct2/rct12/SawyerChunk.h index 0fde99d298..1ad3ea24a3 100644 --- a/src/openrct2/rct12/SawyerChunk.h +++ b/src/openrct2/rct12/SawyerChunk.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct12/SawyerChunkReader.cpp b/src/openrct2/rct12/SawyerChunkReader.cpp index 5566643e06..49795f9e15 100644 --- a/src/openrct2/rct12/SawyerChunkReader.cpp +++ b/src/openrct2/rct12/SawyerChunkReader.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ void SawyerChunkReader::SkipChunk() uint64_t originalPosition = _stream->GetPosition(); try { - auto header = _stream->ReadValue(); + auto header = _stream->ReadValue(); _stream->Seek(header.length, OpenRCT2::STREAM_SEEK_CURRENT); } catch (const std::exception&) @@ -54,7 +54,7 @@ std::shared_ptr SawyerChunkReader::ReadChunk() uint64_t originalPosition = _stream->GetPosition(); try { - auto header = _stream->ReadValue(); + auto header = _stream->ReadValue(); if (header.length >= MAX_UNCOMPRESSED_CHUNK_SIZE) throw SawyerChunkException(EXCEPTION_MSG_CORRUPT_CHUNK_SIZE); @@ -120,7 +120,7 @@ std::shared_ptr SawyerChunkReader::ReadChunkTrack() } auto buffer = static_cast(AllocateLargeTempBuffer()); - sawyercoding_chunk_header header{ CHUNK_ENCODING_RLE, compressedDataLength }; + SawyerCodingChunkHeader header{ CHUNK_ENCODING_RLE, compressedDataLength }; size_t uncompressedLength = DecodeChunk(buffer, MAX_UNCOMPRESSED_CHUNK_SIZE, compressedData.get(), header); if (uncompressedLength == 0) { @@ -162,7 +162,7 @@ void SawyerChunkReader::FreeChunk(void* data) FreeLargeTempBuffer(data); } -size_t SawyerChunkReader::DecodeChunk(void* dst, size_t dstCapacity, const void* src, const sawyercoding_chunk_header& header) +size_t SawyerChunkReader::DecodeChunk(void* dst, size_t dstCapacity, const void* src, const SawyerCodingChunkHeader& header) { size_t resultLength; switch (header.encoding) diff --git a/src/openrct2/rct12/SawyerChunkReader.h b/src/openrct2/rct12/SawyerChunkReader.h index 220c961b2f..949357bc00 100644 --- a/src/openrct2/rct12/SawyerChunkReader.h +++ b/src/openrct2/rct12/SawyerChunkReader.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -91,7 +91,7 @@ public: static void FreeChunk(void* data); private: - static size_t DecodeChunk(void* dst, size_t dstCapacity, const void* src, const sawyercoding_chunk_header& header); + static size_t DecodeChunk(void* dst, size_t dstCapacity, const void* src, const SawyerCodingChunkHeader& header); static size_t DecodeChunkRLERepeat(void* dst, size_t dstCapacity, const void* src, size_t srcLength); static size_t DecodeChunkRLE(void* dst, size_t dstCapacity, const void* src, size_t srcLength); static size_t DecodeChunkRepeat(void* dst, size_t dstCapacity, const void* src, size_t srcLength); diff --git a/src/openrct2/rct12/SawyerChunkWriter.cpp b/src/openrct2/rct12/SawyerChunkWriter.cpp index 30e4f07d57..05dc231089 100644 --- a/src/openrct2/rct12/SawyerChunkWriter.cpp +++ b/src/openrct2/rct12/SawyerChunkWriter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -28,12 +28,12 @@ void SawyerChunkWriter::WriteChunk(const SawyerChunk* chunk) void SawyerChunkWriter::WriteChunk(const void* src, size_t length, SAWYER_ENCODING encoding) { - sawyercoding_chunk_header header; + SawyerCodingChunkHeader header; header.encoding = static_cast(encoding); header.length = static_cast(length); auto data = std::make_unique(MAX_COMPRESSED_CHUNK_SIZE); - size_t dataLength = sawyercoding_write_chunk_buffer(data.get(), static_cast(src), header); + size_t dataLength = SawyerCodingWriteChunkBuffer(data.get(), static_cast(src), header); _stream->Write(data.get(), dataLength); } diff --git a/src/openrct2/rct12/SawyerChunkWriter.h b/src/openrct2/rct12/SawyerChunkWriter.h index 2d413b3e9d..e56ac88d52 100644 --- a/src/openrct2/rct12/SawyerChunkWriter.h +++ b/src/openrct2/rct12/SawyerChunkWriter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct2/DATLimits.h b/src/openrct2/rct2/DATLimits.h index a93f57455d..03a4a188da 100644 --- a/src/openrct2/rct2/DATLimits.h +++ b/src/openrct2/rct2/DATLimits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct2/Limits.h b/src/openrct2/rct2/Limits.h index 0a22bc1860..909b59a17f 100644 --- a/src/openrct2/rct2/Limits.h +++ b/src/openrct2/rct2/Limits.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct2/RCT2.cpp b/src/openrct2/rct2/RCT2.cpp index 408404752e..4c1d1aa03f 100644 --- a/src/openrct2/rct2/RCT2.cpp +++ b/src/openrct2/rct2/RCT2.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,28 +21,28 @@ namespace RCT2 { - ObjectEntryIndex RCT2RideTypeToOpenRCT2RideType(uint8_t rct2RideType, const rct_ride_entry* rideEntry) + ObjectEntryIndex RCT2RideTypeToOpenRCT2RideType(uint8_t rct2RideType, const RideObjectEntry& rideEntry) { switch (rct2RideType) { case RIDE_TYPE_CORKSCREW_ROLLER_COASTER: - if (rideEntry != nullptr && !ride_entry_get_supported_track_pieces(rideEntry).get(TRACK_VERTICAL_LOOP)) + if (!RideEntryGetSupportedTrackPieces(rideEntry).get(TRACK_VERTICAL_LOOP)) return RIDE_TYPE_HYPERCOASTER; return RIDE_TYPE_CORKSCREW_ROLLER_COASTER; case RIDE_TYPE_JUNIOR_ROLLER_COASTER: - if (rideEntry != nullptr && ride_entry_get_supported_track_pieces(rideEntry).get(TRACK_SLOPE_STEEP_DOWN)) + if (RideEntryGetSupportedTrackPieces(rideEntry).get(TRACK_SLOPE_STEEP_DOWN)) return RIDE_TYPE_CLASSIC_MINI_ROLLER_COASTER; return RIDE_TYPE_JUNIOR_ROLLER_COASTER; case RIDE_TYPE_CAR_RIDE: - if (rideEntry != nullptr && ride_entry_get_supported_track_pieces(rideEntry).get(TRACK_SLOPE_STEEP_DOWN)) + if (RideEntryGetSupportedTrackPieces(rideEntry).get(TRACK_SLOPE_STEEP_DOWN)) return RIDE_TYPE_MONSTER_TRUCKS; return RIDE_TYPE_CAR_RIDE; case RIDE_TYPE_TWISTER_ROLLER_COASTER: - if (rideEntry != nullptr && rideEntry->flags & RIDE_ENTRY_FLAG_NO_INVERSIONS) + if (rideEntry.flags & RIDE_ENTRY_FLAG_NO_INVERSIONS) return RIDE_TYPE_HYPER_TWISTER; return RIDE_TYPE_TWISTER_ROLLER_COASTER; case RIDE_TYPE_STEEL_WILD_MOUSE: - if (rideEntry != nullptr && !ride_entry_get_supported_track_pieces(rideEntry).get(TRACK_SLOPE_STEEP_DOWN)) + if (!RideEntryGetSupportedTrackPieces(rideEntry).get(TRACK_SLOPE_STEEP_DOWN)) return RIDE_TYPE_SPINNING_WILD_MOUSE; return RIDE_TYPE_STEEL_WILD_MOUSE; @@ -118,24 +118,24 @@ namespace RCT2 uint8_t Ride::GetMinCarsPerTrain() const { - return min_max_cars_per_train >> 4; + return MinMaxCarsPerTrain >> 4; } uint8_t Ride::GetMaxCarsPerTrain() const { - return min_max_cars_per_train & 0xF; + return MinMaxCarsPerTrain & 0xF; } void Ride::SetMinCarsPerTrain(uint8_t newValue) { - min_max_cars_per_train &= ~0xF0; - min_max_cars_per_train |= (newValue << 4); + MinMaxCarsPerTrain &= ~0xF0; + MinMaxCarsPerTrain |= (newValue << 4); } void Ride::SetMaxCarsPerTrain(uint8_t newValue) { - min_max_cars_per_train &= ~0x0F; - min_max_cars_per_train |= newValue & 0x0F; + MinMaxCarsPerTrain &= ~0x0F; + MinMaxCarsPerTrain |= newValue & 0x0F; } bool RCT2TrackTypeIsBooster(ride_type_t rideType, uint16_t trackType) @@ -201,7 +201,7 @@ namespace RCT2 "rct2.footpath_railings.concrete" }, { "PATHDIRT", "rct1.footpath_surface.dirt", "rct1aa.footpath_surface.queue_yellow", "rct2.footpath_railings.bamboo_brown" }, - { "PATHSPCE", "rct1aa.footpath_surface.tarmac_red", "rct1.footpath_surface.queue_red", + { "PATHSPCE", "rct1aa.footpath_surface.tarmac_red", "rct1aa.footpath_surface.queue_red", "rct1ll.footpath_railings.space" }, { "TARMACB ", "rct1aa.footpath_surface.tarmac_brown", "rct1aa.footpath_surface.queue_yellow", "rct2.footpath_railings.concrete" }, @@ -212,7 +212,7 @@ namespace RCT2 "rct2.footpath_railings.concrete" }, { "PATHCRZY", "rct1aa.footpath_surface.tiles_grey", "rct1.footpath_surface.queue_blue", "rct2.footpath_railings.concrete" }, - { "PATHCRZY", "rct1ll.footpath_surface.tiles_red", "rct1.footpath_surface.queue_red", + { "PATHCRZY", "rct1ll.footpath_surface.tiles_red", "rct1aa.footpath_surface.queue_red", "rct2.footpath_railings.concrete" }, { "PATHCRZY", "rct1ll.footpath_surface.tiles_green", "rct1aa.footpath_surface.queue_green", "rct2.footpath_railings.concrete" }, @@ -226,6 +226,14 @@ namespace RCT2 "openrct2.footpath_railings.invisible" }, { "JAINVSFP", "openrct2.footpath_surface.invisible", "openrct2.footpath_surface.queue_invisible", "openrct2.footpath_railings.invisible" }, + + // Some test objects were temporarily released to the public + { "#RCT1PTS", "rct1aa.footpath_surface.tiles_grey", "rct1.footpath_surface.queue_blue", "rct2.footpath_railings.wood" }, + { "#RCT1PTG", "rct1ll.footpath_surface.tiles_green", "rct1aa.footpath_surface.queue_green", + "rct2.footpath_railings.wood" }, + { "#RCT1PTR", "rct1ll.footpath_surface.tiles_red", "rct1aa.footpath_surface.queue_red", "rct2.footpath_railings.wood" }, + { "#RCT1PTB", "rct1.footpath_surface.tiles_brown", "rct1aa.footpath_surface.queue_yellow", + "rct2.footpath_railings.wood" }, }; const FootpathMapping* GetFootpathSurfaceId(const ObjectEntryDescriptor& desc, bool ideallyLoaded, bool isQueue) @@ -250,9 +258,9 @@ namespace RCT2 return nullptr; } - std::optional GetBestObjectEntryForSurface(std::string_view surface, std::string_view railings) + std::optional GetBestObjectEntryForSurface(std::string_view surface, std::string_view railings) { - rct_object_entry result; + RCTObjectEntry result; std::memset(&result, 0, sizeof(result)); result.SetType(ObjectType::Paths); diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index 2dab128e9a..08c6d01e8b 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,7 +18,7 @@ #include #include -struct rct_ride_entry; +struct RideObjectEntry; class ObjectList; enum class EditorStep : uint8_t; @@ -43,7 +43,7 @@ namespace RCT2 static_assert(RCT2_OBJECT_ENTRY_COUNT == 721); // clang-format off - constexpr const int32_t rct2_object_entry_group_counts[] = { + constexpr const int32_t RCT2ObjectEntryGroupCounts[] = { Limits::MaxRideObjects, Limits::MaxSmallSceneryObjects, Limits::MaxLargeSceneryObjects, @@ -69,220 +69,220 @@ namespace RCT2 */ struct Ride { - uint8_t type; // 0x000 + uint8_t Type; // 0x000 // pointer to static info. for example, wild mouse type is 0x36, subtype is // 0x4c. - RCT12ObjectEntryIndex subtype; // 0x001 - uint16_t pad_002; // 0x002 - uint8_t mode; // 0x004 - uint8_t colour_scheme_type; // 0x005 - RCT12VehicleColour vehicle_colours[Limits::MaxTrainsPerRide]; // 0x006 - uint8_t pad_046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions + RCT12ObjectEntryIndex Subtype; // 0x001 + uint16_t Pad002; // 0x002 + uint8_t Mode; // 0x004 + uint8_t ColourSchemeType; // 0x005 + RCT12VehicleColour VehicleColours[Limits::MaxTrainsPerRide]; // 0x006 + uint8_t Pad046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions // 0 = closed, 1 = open, 2 = test - uint8_t status; // 0x049 - StringId name; // 0x04A + uint8_t Status; // 0x049 + StringId Name; // 0x04A union { - uint32_t name_arguments; // 0x04C + uint32_t NameArguments; // 0x04C struct { - StringId name_arguments_type_name; // 0x04C - uint16_t name_arguments_number; // 0x04E + StringId NameArgumentsTypeName; // 0x04C + uint16_t NameArgumentsNumber; // 0x04E }; }; - RCT12xy8 overall_view; // 0x050 - RCT12xy8 station_starts[Limits::MaxStationsPerRide]; // 0x052 - uint8_t station_heights[Limits::MaxStationsPerRide]; // 0x05A - uint8_t station_length[Limits::MaxStationsPerRide]; // 0x05E - uint8_t station_depart[Limits::MaxStationsPerRide]; // 0x062 + 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 // ride->vehicle index for current train waiting for passengers // at station - uint8_t train_at_station[Limits::MaxStationsPerRide]; // 0x066 - RCT12xy8 entrances[Limits::MaxStationsPerRide]; // 0x06A - RCT12xy8 exits[Limits::MaxStationsPerRide]; // 0x072 - uint16_t last_peep_in_queue[Limits::MaxStationsPerRide]; // 0x07A - uint8_t pad_082[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 depart_flags; // 0x0C6 + 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 // Not sure if these should be uint or sint. - uint8_t num_stations; // 0x0C7 - uint8_t NumTrains; // 0x0C8 - uint8_t num_cars_per_train; // 0x0C9 - uint8_t ProposedNumTrains; // 0x0CA - uint8_t proposed_num_cars_per_train; // 0x0CB - uint8_t max_trains; // 0x0CC - uint8_t min_max_cars_per_train; // 0x0CD - uint8_t min_waiting_time; // 0x0CE - uint8_t max_waiting_time; // 0x0CF + uint8_t NumStations; // 0x0C7 + uint8_t NumTrains; // 0x0C8 + uint8_t NumCarsPerTrain; // 0x0C9 + uint8_t ProposedNumTrains; // 0x0CA + uint8_t ProposedNumCarsPerTrain; // 0x0CB + uint8_t MaxTrains; // 0x0CC + uint8_t MinMaxCarsPerTrain; // 0x0CD + uint8_t MinWaitingTime; // 0x0CE + uint8_t MaxWaitingTime; // 0x0CF union { - uint8_t operation_option; // 0x0D0 - uint8_t time_limit; // 0x0D0 - uint8_t NumLaps; // 0x0D0 - uint8_t launch_speed; // 0x0D0 - uint8_t speed; // 0x0D0 - uint8_t rotations; // 0x0D0 + uint8_t OperationOption; // 0x0D0 + uint8_t TimeLimit; // 0x0D0 + uint8_t NumLaps; // 0x0D0 + uint8_t LaunchSpeed; // 0x0D0 + uint8_t Speed; // 0x0D0 + uint8_t Rotations; // 0x0D0 }; - uint8_t boat_hire_return_direction; // 0x0D1 - RCT12xy8 boat_hire_return_position; // 0x0D2 - uint8_t measurement_index; // 0x0D4 + uint8_t BoatHireReturnDirection; // 0x0D1 + RCT12xy8 BoatHireReturnPosition; // 0x0D2 + uint8_t MeasurementIndex; // 0x0D4 // bits 0 through 4 are the number of helix sections // bit 5: spinning tunnel, water splash, or rapids // bit 6: log reverser, waterfall // bit 7: whirlpool - uint8_t special_track_elements; // 0x0D5 - uint8_t pad_0D6[2]; // 0x0D6 + uint8_t SpecialTrackElements; // 0x0D5 + 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 max_speed; // 0x0D8 - int32_t average_speed; // 0x0DC - uint8_t current_test_segment; // 0x0E0 - uint8_t average_speed_test_timeout; // 0x0E1 - uint8_t pad_0E2[0x2]; // 0x0E2 - int32_t length[Limits::MaxStationsPerRide]; // 0x0E4 - uint16_t time[Limits::MaxStationsPerRide]; // 0x0F4 - fixed16_2dp max_positive_vertical_g; // 0x0FC - fixed16_2dp max_negative_vertical_g; // 0x0FE - fixed16_2dp max_lateral_g; // 0x100 - fixed16_2dp previous_vertical_g; // 0x102 - fixed16_2dp previous_lateral_g; // 0x104 - uint8_t pad_106[0x2]; // 0x106 - uint32_t testing_flags; // 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::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 // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times - RCT12xy8 cur_test_track_location; // 0x10C + RCT12xy8 CurTestTrackLocation; // 0x10C // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16_t turn_count_default; // 0x10E X = current turn count - uint16_t turn_count_banked; // 0x110 - uint16_t turn_count_sloped; // 0x112 X = number turns > 3 elements + uint16_t TurnCountDefault; // 0x10E X = current turn count + uint16_t TurnCountBanked; // 0x110 + uint16_t TurnCountSloped; // 0x112 X = number turns > 3 elements union { - uint8_t inversions; // 0x114 (???X XXXX) - uint8_t holes; // 0x114 (???X XXXX) + uint8_t Inversions; // 0x114 (???X XXXX) + uint8_t Holes; // 0x114 (???X XXXX) // This is a very rough approximation of how much of the ride is undercover. // It reaches the maximum value of 7 at about 50% undercover and doesn't increase beyond that. - uint8_t sheltered_eighths; // 0x114 (XXX?-????) + uint8_t ShelteredEighths; // 0x114 (XXX?-????) }; // Y is number of powered lifts, X is drops - uint8_t drops; // 0x115 (YYXX XXXX) - uint8_t start_drop_height; // 0x116 - uint8_t highest_drop_height; // 0x117 - int32_t sheltered_length; // 0x118 + uint8_t Drops; // 0x115 (YYXX XXXX) + uint8_t StartDropHeight; // 0x116 + uint8_t HighestDropHeight; // 0x117 + int32_t ShelteredLength; // 0x118 // Unused always 0? Should affect nausea - uint16_t var_11C; // 0x11C - uint8_t num_sheltered_sections; // 0x11E (?abY YYYY) - // see cur_test_track_location - uint8_t cur_test_track_z; // 0x11F + uint16_t Var11C; // 0x11C + uint8_t NumShelteredSections; // 0x11E (?abY YYYY) + // see CurTestTrackLocation + uint8_t CurTestTrackZ; // 0x11F // Customer counter in the current 960 game tick (about 30 seconds) interval - uint16_t cur_num_customers; // 0x120 + uint16_t CurNumCustomers; // 0x120 // Counts ticks to update customer intervals, resets each 960 game ticks. - uint16_t num_customers_timeout; // 0x122 + uint16_t NumCustomersTimeout; // 0x122 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t num_customers[Limits::CustomerHistorySize]; // 0x124 - money16 price; // 0x138 - RCT12xy8 chairlift_bullwheel_location[2]; // 0x13A - uint8_t chairlift_bullwheel_z[2]; // 0x13E + uint16_t NumCustomers[Limits::CustomerHistorySize]; // 0x124 + money16 Price; // 0x138 + RCT12xy8 ChairliftBullwheelLocation[2]; // 0x13A + uint8_t ChairliftBullwheelZ[2]; // 0x13E union { - RatingTuple ratings; // 0x140 + RatingTuple Ratings; // 0x140 struct { - ride_rating excitement; // 0x140 - ride_rating intensity; // 0x142 - ride_rating nausea; // 0x144 + ride_rating Excitement; // 0x140 + ride_rating Intensity; // 0x142 + ride_rating Nausea; // 0x144 }; }; - uint16_t value; // 0x146 - uint16_t chairlift_bullwheel_rotation; // 0x148 - uint8_t satisfaction; // 0x14A - uint8_t satisfaction_time_out; // 0x14B - uint8_t satisfaction_next; // 0x14C + money16 Value; // 0x146 + uint16_t ChairliftBullwheelRotation; // 0x148 + uint8_t Satisfaction; // 0x14A + uint8_t SatisfactionTimeOut; // 0x14B + uint8_t SatisfactionNext; // 0x14C // Various flags stating whether a window needs to be refreshed - uint8_t window_invalidate_flags; // 0x14D - uint8_t pad_14E[0x02]; // 0x14E - uint32_t total_customers; // 0x150 - money32 total_profit; // 0x154 - uint8_t popularity; // 0x158 - uint8_t popularity_time_out; // 0x159 Updated every purchase and ?possibly by time? - uint8_t popularity_next; // 0x15A When timeout reached this will be the next popularity - uint8_t num_riders; // 0x15B - uint8_t music_tune_id; // 0x15C - uint8_t slide_in_use; // 0x15D + uint8_t WindowInvalidateFlags; // 0x14D + uint8_t Pad14E[0x02]; // 0x14E + uint32_t TotalCustomers; // 0x150 + money32 TotalProfit; // 0x154 + uint8_t Popularity; // 0x158 + uint8_t PopularityTimeOut; // 0x159 Updated every purchase and ?possibly by time? + uint8_t PopularityNext; // 0x15A When timeout reached this will be the next popularity + uint8_t NumRiders; // 0x15B + uint8_t MusicTuneId; // 0x15C + uint8_t SlideInUse; // 0x15D union { - uint16_t slide_peep; // 0x15E - uint16_t maze_tiles; // 0x15E + uint16_t SlidePeep; // 0x15E + uint16_t MazeTiles; // 0x15E }; - uint8_t pad_160[0xE]; // 0x160 - uint8_t slide_peep_t_shirt_colour; // 0x16E - uint8_t pad_16F[0x7]; // 0x16F - uint8_t spiral_slide_progress; // 0x176 - uint8_t pad_177[0x9]; // 0x177 - int16_t build_date; // 0x180 - money16 upkeep_cost; // 0x182 - uint16_t race_winner; // 0x184 - uint8_t pad_186[0x02]; // 0x186 - uint32_t music_position; // 0x188 - uint8_t breakdown_reason_pending; // 0x18C - uint8_t mechanic_status; // 0x18D - uint16_t mechanic; // 0x18E - uint8_t inspection_station; // 0x190 - uint8_t broken_vehicle; // 0x191 - uint8_t broken_car; // 0x192 - uint8_t breakdown_reason; // 0x193 - money16 price_secondary; // 0x194 + uint8_t Pad160[0xE]; // 0x160 + uint8_t SlidePeepTShirtColour; // 0x16E + uint8_t Pad16F[0x7]; // 0x16F + uint8_t SpiralSlideProgress; // 0x176 + uint8_t Pad177[0x9]; // 0x177 + int16_t BuildDate; // 0x180 + money16 UpkeepCost; // 0x182 + uint16_t RaceWinner; // 0x184 + uint8_t Pad186[0x02]; // 0x186 + uint32_t MusicPosition; // 0x188 + uint8_t BreakdownReasonPending; // 0x18C + uint8_t MechanicStatus; // 0x18D + uint16_t Mechanic; // 0x18E + uint8_t InspectionStation; // 0x190 + uint8_t BrokenVehicle; // 0x191 + uint8_t BrokenCar; // 0x192 + uint8_t BreakdownReason; // 0x193 + money16 PriceSecondary; // 0x194 union { struct { - uint8_t reliability_subvalue; // 0x196, 0 - 255, acts like the decimals for reliability_percentage - uint8_t reliability_percentage; // 0x197, Starts at 100 and decreases from there. + uint8_t ReliabilitySubvalue; // 0x196, 0 - 255, acts like the decimals for reliability_percentage + uint8_t ReliabilityPercentage; // 0x197, Starts at 100 and decreases from there. }; - uint16_t reliability; // 0x196 + uint16_t Reliability; // 0x196 }; // Small constant used to increase the unreliability as the game continues, // making breakdowns more and more likely. - uint8_t unreliability_factor; // 0x198 + uint8_t UnreliabilityFactor; // 0x198 // Range from [0, 100] - uint8_t downtime; // 0x199 - uint8_t inspection_interval; // 0x19A - uint8_t last_inspection; // 0x19B - uint8_t downtime_history[Limits::DowntimeHistorySize]; // 0x19C - uint32_t no_primary_items_sold; // 0x1A4 - uint32_t no_secondary_items_sold; // 0x1A8 - uint8_t breakdown_sound_modifier; // 0x1AC + 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 // Used to oscillate the sound when ride breaks down. // 0 = no change, 255 = max change - uint8_t not_fixed_timeout; // 0x1AD - uint8_t last_crash_type; // 0x1AE - uint8_t connected_message_throttle; // 0x1AF - money32 income_per_hour; // 0x1B0 - money32 profit; // 0x1B4 - uint8_t queue_time[Limits::MaxStationsPerRide]; // 0x1B8 - uint8_t track_colour_main[Limits::NumColourSchemes]; // 0x1BC - uint8_t track_colour_additional[Limits::NumColourSchemes]; // 0x1C0 - uint8_t track_colour_supports[Limits::NumColourSchemes]; // 0x1C4 - uint8_t music; // 0x1C8 - uint8_t entrance_style; // 0x1C9 - uint16_t vehicle_change_timeout; // 0x1CA - uint8_t num_block_brakes; // 0x1CC - uint8_t lift_hill_speed; // 0x1CD - uint16_t guests_favourite; // 0x1CE - uint32_t lifecycle_flags; // 0x1D0 - uint8_t vehicle_colours_extended[Limits::MaxTrainsPerRide]; // 0x1D4 - uint16_t total_air_time; // 0x1F4 - uint8_t current_test_station; // 0x1F6 - uint8_t num_circuits; // 0x1F7 - int16_t cable_lift_x; // 0x1F8 - int16_t cable_lift_y; // 0x1FA - uint8_t cable_lift_z; // 0x1FC - uint8_t pad_1FD; // 0x1FD - uint16_t cable_lift; // 0x1FE - uint16_t queue_length[Limits::MaxStationsPerRide]; // 0x200 - uint8_t pad_208[0x58]; // 0x208 + 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::MaxTrainsPerRide]; // 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 GetMinCarsPerTrain() const; uint8_t GetMaxCarsPerTrain() const; @@ -304,13 +304,13 @@ namespace RCT2 /* Track Scenery entry size: 0x16 */ struct TD6SceneryElement { - rct_object_entry scenery_object; // 0x00 - int8_t x; // 0x10 - int8_t y; // 0x11 - int8_t z; // 0x12 - uint8_t flags; // 0x13 direction quadrant tertiary colour - uint8_t primary_colour; // 0x14 - uint8_t secondary_colour; // 0x15 + RCTObjectEntry SceneryObject; // 0x00 + int8_t x; // 0x10 + int8_t y; // 0x11 + int8_t z; // 0x12 + uint8_t Flags; // 0x13 direction quadrant tertiary colour + uint8_t PrimaryColour; // 0x14 + uint8_t SecondaryColour; // 0x15 }; assert_struct_size(TD6SceneryElement, 0x16); @@ -320,71 +320,71 @@ namespace RCT2 */ struct TD6Track { - uint8_t type; // 0x00 - RCT12ObjectEntryIndex vehicle_type; + 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 + money32 Cost; // 0x02 + uint32_t Flags; // 0x02 }; union { // After loading the track this is converted to // a flags register - uint8_t ride_mode; // 0x06 - uint8_t track_flags; // 0x06 + uint8_t RideMode; // 0x06 + uint8_t TrackFlags; // 0x06 }; - uint8_t version_and_colour_scheme; // 0x07 0b0000_VVCC - RCT12VehicleColour vehicle_colours[Limits::MaxTrainsPerRide]; // 0x08 + uint8_t VersionAndColourScheme; // 0x07 0b0000_VVCC + RCT12VehicleColour VehicleColours[Limits::MaxTrainsPerRide]; // 0x08 union { - uint8_t pad_48; - uint8_t track_spine_colour_rct1; // 0x48 + uint8_t Pad48; + uint8_t TrackSpineColourRCT1; // 0x48 }; union { - uint8_t entrance_style; // 0x49 - uint8_t track_rail_colour_rct1; // 0x49 + uint8_t EntranceStyle; // 0x49 + uint8_t TrackRailColourRCT1; // 0x49 }; union { - uint8_t total_air_time; // 0x4A - uint8_t track_support_colour_rct1; // 0x4A + uint8_t TotalAirTime; // 0x4A + uint8_t TrackSupportColourRCT1; // 0x4A }; - uint8_t depart_flags; // 0x4B - uint8_t number_of_trains; // 0x4C - uint8_t number_of_cars_per_train; // 0x4D - uint8_t min_waiting_time; // 0x4E - uint8_t max_waiting_time; // 0x4F - uint8_t operation_setting; - int8_t max_speed; // 0x51 - int8_t average_speed; // 0x52 - uint16_t ride_length; // 0x53 - uint8_t max_positive_vertical_g; // 0x55 - int8_t max_negative_vertical_g; // 0x56 - uint8_t max_lateral_g; // 0x57 + 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 union { - uint8_t inversions; // 0x58 - uint8_t holes; // 0x58 + uint8_t Inversions; // 0x58 + uint8_t Holes; // 0x58 }; - uint8_t drops; // 0x59 - uint8_t highest_drop_height; // 0x5A - uint8_t excitement; // 0x5B - uint8_t intensity; // 0x5C - uint8_t nausea; // 0x5D - money16 upkeep_cost; // 0x5E - uint8_t track_spine_colour[Limits::NumColourSchemes]; // 0x60 - uint8_t track_rail_colour[Limits::NumColourSchemes]; // 0x64 - uint8_t track_support_colour[Limits::NumColourSchemes]; // 0x68 - uint32_t flags2; // 0x6C - rct_object_entry vehicle_object; // 0x70 - uint8_t space_required_x; // 0x80 - uint8_t space_required_y; // 0x81 - uint8_t vehicle_additional_colour[Limits::MaxTrainsPerRide]; // 0x82 - uint8_t lift_hill_speed_num_circuits; // 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::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 // 0xA3 (data starts here in file) }; assert_struct_size(TD6Track, 0xA3); @@ -395,9 +395,9 @@ namespace RCT2 */ struct ScoresHeader { - uint32_t var_0; - uint32_t var_4; - uint32_t var_8; + uint32_t Var0; + uint32_t Var4; + uint32_t Var8; uint32_t ScenarioCount; }; assert_struct_size(ScoresHeader, 0x10); @@ -410,7 +410,7 @@ namespace RCT2 { char Path[256]; uint8_t Category; - uint8_t pad_0101[0x1F]; + uint8_t Pad0101[0x1F]; int8_t ObjectiveType; int8_t ObjectiveArg1; int32_t objectiveArg2; @@ -423,107 +423,107 @@ namespace RCT2 }; assert_struct_size(ScoresEntry, 0x02B0); - struct Vehicle : RCT12SpriteBase + struct Vehicle : RCT12EntityBase { - uint8_t Pitch; // 0x1F - uint8_t bank_rotation; // 0x20 - uint8_t pad_21[3]; - int32_t remaining_distance; // 0x24 - int32_t velocity; // 0x28 - int32_t acceleration; // 0x2C - uint8_t ride; // 0x30 - uint8_t vehicle_type; // 0x31 - RCT12VehicleColour colours; // 0x32 + uint8_t Pitch; // 0x1F + uint8_t BankRotation; // 0x20 + uint8_t Pad21[3]; + int32_t RemainingDistance; // 0x24 + int32_t Velocity; // 0x28 + int32_t Acceleration; // 0x2C + uint8_t Ride; // 0x30 + uint8_t VehicleType; // 0x31 + RCT12VehicleColour Colours; // 0x32 union { - uint16_t track_progress; // 0x34 + uint16_t TrackProgress; // 0x34 struct { - int8_t var_34; - uint8_t var_35; + int8_t Var34; + uint8_t Var35; }; }; union { int16_t TrackTypeAndDirection; // 0x36 - RCT12xy8 boat_location; // 0x36 + RCT12xy8 BoatLocation; // 0x36 }; - uint16_t track_x; // 0x38 - uint16_t track_y; // 0x3A - uint16_t track_z; // 0x3C - uint16_t next_vehicle_on_train; // 0x3E - uint16_t prev_vehicle_on_ride; // 0x40 - uint16_t next_vehicle_on_ride; // 0x42 - uint16_t var_44; - uint16_t mass; // 0x46 - uint16_t update_flags; // 0x48 + uint16_t TrackX; // 0x38 + uint16_t TrackY; // 0x3A + uint16_t TrackZ; // 0x3C + uint16_t NextVehicleOnTrain; // 0x3E + uint16_t PrevVehicleOnRide; // 0x40 + uint16_t NextVehicleOnRide; // 0x42 + uint16_t Var44; + uint16_t Mass; // 0x46 + uint16_t UpdateFlags; // 0x48 uint8_t SwingSprite; - uint8_t current_station; // 0x4B + uint8_t CurrentStation; // 0x4B union { int16_t SwingPosition; // 0x4C - int16_t current_time; // 0x4C + int16_t CurrentTime; // 0x4C struct { - int8_t ferris_wheel_var_0; // 0x4C - int8_t ferris_wheel_var_1; // 0x4D + int8_t FerrisWheelVar0; // 0x4C + int8_t FerrisWheelVar1; // 0x4D }; }; union { int16_t SwingSpeed; - int16_t crash_z; // 0x4E + int16_t CrashZ; // 0x4E }; - uint8_t status; // 0x50 - uint8_t sub_state; // 0x51 - uint16_t peep[32]; // 0x52 - uint8_t peep_tshirt_colours[32]; // 0x92 - uint8_t num_seats; // 0xB2 - uint8_t num_peeps; // 0xB3 - uint8_t next_free_seat; // 0xB4 - uint8_t restraints_position; // 0xB5 + uint8_t Status; // 0x50 + uint8_t SubState; // 0x51 + uint16_t Peep[32]; // 0x52 + uint8_t PeepTshirtColours[32]; // 0x92 + uint8_t NumSeats; // 0xB2 + uint8_t NumPeeps; // 0xB3 + uint8_t NextFreeSeat; // 0xB4 + uint8_t RestraintsPosition; // 0xB5 union { - int16_t spin_speed; // 0xB6 - int16_t crash_x; // 0xB6 + int16_t SpinSpeed; // 0xB6 + int16_t CrashX; // 0xB6 }; - uint16_t sound2_flags; // 0xB8 - uint8_t spin_sprite; // 0xBA - uint8_t sound1_id; // 0xBB - uint8_t sound1_volume; // 0xBC - uint8_t sound2_id; // 0xBD - uint8_t sound2_volume; // 0xBE - int8_t sound_vector_factor; + uint16_t Sound2Flags; // 0xB8 + uint8_t SpinSprite; // 0xBA + uint8_t Sound1Id; // 0xBB + uint8_t Sound1Volume; // 0xBC + uint8_t Sound2Id; // 0xBD + uint8_t Sound2Volume; // 0xBE + int8_t SoundVectorFactor; union { - uint16_t var_C0; - int16_t crash_y; // 0xC0 - uint16_t time_waiting; // 0xC0 - uint16_t cable_lift_target; // 0xC0 + uint16_t VarC0; + int16_t CrashY; // 0xC0 + uint16_t TimeWaiting; // 0xC0 + uint16_t CableLiftTarget; // 0xC0 }; - uint8_t speed; // 0xC2 - uint8_t powered_acceleration; // 0xC3 + uint8_t Speed; // 0xC2 + uint8_t PoweredAcceleration; // 0xC3 union { uint8_t DodgemsCollisionDirection; // 0xC4 uint8_t CollisionDetectionTimer; // 0xC4 }; - uint8_t animation_frame; // 0xC5 - uint8_t pad_C6[0x2]; - uint32_t animationState; - uint8_t scream_sound_id; // 0xCC + uint8_t AnimationFrame; // 0xC5 + uint8_t PadC6[0x2]; + uint32_t AnimationState; + uint8_t ScreamSoundId; // 0xCC uint8_t TrackSubposition; - uint8_t NumLaps; // 0xCE - uint8_t brake_speed; // 0xCF - uint16_t lost_time_out; // 0xD0 - int8_t vertical_drop_countdown; // 0xD1 - uint8_t var_D3; - uint8_t mini_golf_current_animation; - uint8_t mini_golf_flags; // 0xD5 - uint8_t ride_subtype; // 0xD6 - uint8_t colours_extended; // 0xD7 - uint8_t seat_rotation; // 0xD8 - uint8_t target_seat_rotation; // 0xD9 + uint8_t NumLaps; // 0xCE + uint8_t BrakeSpeed; // 0xCF + uint16_t LostTimeOut; // 0xD0 + int8_t VerticalDropCountdown; // 0xD1 + uint8_t VarD3; + uint8_t MiniGolfCurrentAnimation; + uint8_t MiniGolfFlags; // 0xD5 + uint8_t RideSubtype; // 0xD6 + uint8_t ColoursExtended; // 0xD7 + uint8_t SeatRotation; // 0xD8 + uint8_t TargetSeatRotation; // 0xD9 uint16_t GetTrackType() const { @@ -548,163 +548,163 @@ namespace RCT2 }; assert_struct_size(Vehicle, 0xDA); - struct Peep : RCT12SpriteBase + struct Peep : RCT12EntityBase { - uint8_t pad_1F[0x22 - 0x1F]; - StringId name_string_idx; // 0x22 - uint16_t next_x; // 0x24 - uint16_t next_y; // 0x26 - uint8_t next_z; // 0x28 - uint8_t next_flags; // 0x29 - uint8_t outside_of_park; // 0x2A - uint8_t state; // 0x2B - uint8_t sub_state; // 0x2C - uint8_t sprite_type; // 0x2D - uint8_t peep_type; // 0x2E + uint8_t Pad1F[0x22 - 0x1F]; + StringId NameStringIdx; // 0x22 + uint16_t NextX; // 0x24 + uint16_t NextY; // 0x26 + uint8_t NextZ; // 0x28 + uint8_t NextFlags; // 0x29 + uint8_t OutsideOfPark; // 0x2A + uint8_t State; // 0x2B + uint8_t SubState; // 0x2C + uint8_t SpriteType; // 0x2D + uint8_t PeepType; // 0x2E union { - uint8_t staff_type; // 0x2F - uint8_t no_of_rides; // 0x2F + uint8_t StaffType; // 0x2F + uint8_t NoOfRides; // 0x2F }; - uint8_t tshirt_colour; // 0x30 - uint8_t trousers_colour; // 0x31 - uint16_t destination_x; // 0x32 - uint16_t destination_y; // 0x34 - uint8_t destination_tolerance; // 0x36 - uint8_t var_37; - uint8_t energy; // 0x38 - uint8_t energy_target; // 0x39 - uint8_t happiness; // 0x3A - uint8_t happiness_target; // 0x3B - uint8_t nausea; // 0x3C - uint8_t nausea_target; // 0x3D - uint8_t hunger; // 0x3E - uint8_t thirst; // 0x3F - uint8_t toilet; // 0x40 - uint8_t mass; // 0x41 - uint8_t time_to_consume; // 0x42 - uint8_t intensity; // 0x43 - uint8_t nausea_tolerance; // 0x44 - uint8_t window_invalidate_flags; // 0x45 - money16 paid_on_drink; // 0x46 - uint8_t ride_types_been_on[16]; // 0x48 - uint32_t item_extra_flags; // 0x58 - RCT12RideId photo2_ride_ref; // 0x5C - RCT12RideId photo3_ride_ref; // 0x5D - RCT12RideId photo4_ride_ref; // 0x5E - uint8_t pad_5F[0x09]; // 0x5F - RCT12RideId current_ride; // 0x68 - uint8_t current_ride_station; // 0x69 - uint8_t current_train; // 0x6A + uint8_t TshirtColour; // 0x30 + uint8_t TrousersColour; // 0x31 + uint16_t DestinationX; // 0x32 + uint16_t DestinationY; // 0x34 + uint8_t DestinationTolerance; // 0x36 + uint8_t Var37; + uint8_t Energy; // 0x38 + uint8_t EnergyTarget; // 0x39 + uint8_t Happiness; // 0x3A + uint8_t HappinessTarget; // 0x3B + uint8_t Nausea; // 0x3C + uint8_t NauseaTarget; // 0x3D + uint8_t Hunger; // 0x3E + uint8_t Thirst; // 0x3F + uint8_t Toilet; // 0x40 + uint8_t Mass; // 0x41 + uint8_t TimeToConsume; // 0x42 + uint8_t Intensity; // 0x43 + uint8_t NauseaTolerance; // 0x44 + uint8_t WindowInvalidateFlags; // 0x45 + money16 PaidOnDrink; // 0x46 + uint8_t RideTypesBeenOn[16]; // 0x48 + uint32_t ItemExtraFlags; // 0x58 + RCT12RideId Photo2RideRef; // 0x5C + RCT12RideId Photo3RideRef; // 0x5D + RCT12RideId Photo4RideRef; // 0x5E + uint8_t Pad5F[0x09]; // 0x5F + RCT12RideId CurrentRide; // 0x68 + uint8_t CurrentRideStation; // 0x69 + uint8_t CurrentTrain; // 0x6A union { struct { - uint8_t current_car; // 0x6B - uint8_t current_seat; // 0x6C + uint8_t CurrentCar; // 0x6B + uint8_t CurrentSeat; // 0x6C }; - uint16_t time_to_sitdown; // 0x6B + uint16_t TimeToSitdown; // 0x6B struct { - uint8_t time_to_stand; // 0x6B - uint8_t standing_flags; // 0x6C + uint8_t TimeToStand; // 0x6B + uint8_t StandingFlags; // 0x6C }; }; - uint8_t special_sprite; // 0x6D - uint8_t action_sprite_type; // 0x6E - uint8_t next_action_sprite_type; // 0x6F - uint8_t action_sprite_image_offset; // 0x70 - uint8_t action; // 0x71 - uint8_t action_frame; // 0x72 - uint8_t step_progress; // 0x73 + uint8_t SpecialSprite; // 0x6D + uint8_t ActionSpriteType; // 0x6E + uint8_t NextActionSpriteType; // 0x6F + uint8_t ActionSpriteImageOffset; // 0x70 + uint8_t Action; // 0x71 + uint8_t ActionFrame; // 0x72 + uint8_t StepProgress; // 0x73 union { - uint16_t mechanic_time_since_call; - uint16_t next_in_queue; // 0x74 + uint16_t MechanicTimeSinceCall; + uint16_t NextInQueue; // 0x74 }; - uint8_t pad_76; - uint8_t pad_77; + uint8_t Pad76; + uint8_t Pad77; union { - uint8_t maze_last_edge; // 0x78 - uint8_t direction; + uint8_t MazeLastEdge; // 0x78 + uint8_t Direction; }; - RCT12RideId interaction_ride_index; - uint16_t time_in_queue; // 0x7A - uint8_t rides_been_on[32]; // 0x7C - uint32_t id; // 0x9C - money32 cash_in_pocket; // 0xA0 - money32 cash_spent; // 0xA4 - int32_t park_entry_time; // 0xA8 - int8_t rejoin_queue_timeout; // 0xAC - RCT12RideId previous_ride; // 0xAD - uint16_t previous_ride_time_out; // 0xAE - RCT12PeepThought thoughts[Limits::MaxPeepThoughts]; // 0xB0 - uint8_t path_check_optimisation; // 0xC4 + RCT12RideId InteractionRideIndex; + uint16_t TimeInQueue; // 0x7A + uint8_t RidesBeenOn[32]; // 0x7C + uint32_t Id; // 0x9C + money32 CashInPocket; // 0xA0 + money32 CashSpent; // 0xA4 + int32_t ParkEntryTime; // 0xA8 + int8_t RejoinQueueTimeout; // 0xAC + RCT12RideId PreviousRide; // 0xAD + uint16_t PreviousRideTimeOut; // 0xAE + RCT12PeepThought Thoughts[Limits::MaxPeepThoughts]; // 0xB0 + uint8_t PathCheckOptimisation; // 0xC4 union { - uint8_t staff_id; // 0xC5 - RCT12RideId guest_heading_to_ride_id; // 0xC5 + uint8_t StaffId; // 0xC5 + RCT12RideId GuestHeadingToRideId; // 0xC5 }; union { - uint8_t staff_orders; // 0xC6 - uint8_t peep_is_lost_countdown; // 0xC6 + uint8_t StaffOrders; // 0xC6 + uint8_t PeepIsLostCountdown; // 0xC6 }; - RCT12RideId photo1_ride_ref; // 0xC7 - uint32_t peep_flags; // 0xC8 - rct12_xyzd8 pathfind_goal; // 0xCC - rct12_xyzd8 pathfind_history[4]; // 0xD0 - uint8_t no_action_frame_num; // 0xE0 - uint8_t litter_count; // 0xE1 + RCT12RideId Photo1RideRef; // 0xC7 + uint32_t PeepFlags; // 0xC8 + RCT12xyzd8 PathfindGoal; // 0xCC + RCT12xyzd8 PathfindHistory[4]; // 0xD0 + uint8_t NoActionFrameNum; // 0xE0 + uint8_t LitterCount; // 0xE1 union { - uint8_t time_on_ride; // 0xE2 - uint8_t staff_mowing_timeout; // 0xE2 + uint8_t TimeOnRide; // 0xE2 + uint8_t StaffMowingTimeout; // 0xE2 }; - uint8_t disgusting_count; // 0xE3 + uint8_t DisgustingCount; // 0xE3 union { - money16 paid_to_enter; // 0xE4 - uint16_t staff_lawns_mown; // 0xE4 - uint16_t staff_rides_fixed; // 0xE4 + money16 PaidToEnter; // 0xE4 + uint16_t StaffLawnsMown; // 0xE4 + uint16_t StaffRidesFixed; // 0xE4 }; union { - money16 paid_on_rides; // 0xE6 - uint16_t staff_gardens_watered; // 0xE6 - uint16_t staff_rides_inspected; // 0xE6 + money16 PaidOnRides; // 0xE6 + uint16_t StaffGardensWatered; // 0xE6 + uint16_t StaffRidesInspected; // 0xE6 }; union { - money16 paid_on_food; // 0xE8 - uint16_t staff_litter_swept; // 0xE8 + money16 PaidOnFood; // 0xE8 + uint16_t StaffLitterSwept; // 0xE8 }; union { - money16 paid_on_souvenirs; // 0xEA - uint16_t staff_bins_emptied; // 0xEA + money16 PaidOnSouvenirs; // 0xEA + uint16_t StaffBinsEmptied; // 0xEA }; - uint8_t no_of_food; // 0xEC - uint8_t no_of_drinks; // 0xED - uint8_t no_of_souvenirs; // 0xEE - uint8_t vandalism_seen; // 0xEF 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen - uint8_t voucher_type; // 0xF0 - RCT12RideId voucher_arguments; // 0xF1 ride_id or string_offset_id - uint8_t surroundings_thought_timeout; // 0xF2 - uint8_t angriness; // 0xF3 - uint8_t time_lost; // 0xF4 the time the peep has been lost when it reaches 254 generates the lost thought - uint8_t days_in_queue; // 0xF5 - uint8_t balloon_colour; // 0xF6 - uint8_t umbrella_colour; // 0xF7 - uint8_t hat_colour; // 0xF8 - RCT12RideId favourite_ride; // 0xF9 - uint8_t favourite_ride_rating; // 0xFA - uint8_t pad_FB; - uint32_t item_standard_flags; // 0xFC + uint8_t NoOfFood; // 0xEC + uint8_t NoOfDrinks; // 0xED + uint8_t NoOfSouvenirs; // 0xEE + uint8_t VandalismSeen; // 0xEF 0xC0 vandalism thought timeout, 0x3F vandalism tiles seen + uint8_t VoucherType; // 0xF0 + RCT12RideId VoucherArguments; // 0xF1 ride_id or string_offset_id + uint8_t SurroundingsThoughtTimeout; // 0xF2 + uint8_t Angriness; // 0xF3 + uint8_t TimeLost; // 0xF4 the time the peep has been lost when it reaches 254 generates the lost thought + uint8_t DaysInQueue; // 0xF5 + uint8_t BalloonColour; // 0xF6 + uint8_t UmbrellaColour; // 0xF7 + uint8_t HatColour; // 0xF8 + RCT12RideId FavouriteRide; // 0xF9 + uint8_t FavouriteRideRating; // 0xFA + uint8_t PadFB; + uint32_t ItemStandardFlags; // 0xFC uint64_t GetItemFlags() const { - return item_standard_flags | (static_cast(item_extra_flags) << 32); + return ItemStandardFlags | (static_cast(ItemExtraFlags) << 32); } }; assert_struct_size(Peep, 0x100); @@ -719,41 +719,41 @@ namespace RCT2 union Entity { private: - uint8_t pad_00[0x100]; + uint8_t Pad00[0x100]; public: - RCT12SpriteBase unknown; - Vehicle vehicle; - Peep peep; - RCT12SpriteLitter litter; - RCT12SpriteBalloon balloon; - RCT12SpriteDuck duck; - RCT12SpriteJumpingFountain jumping_fountain; - RCT12SpriteMoneyEffect money_effect; - RCT12SpriteCrashedVehicleParticle crashed_vehicle_particle; - RCT12SpriteCrashSplash crash_splash; - RCT12SpriteSteamParticle steam_particle; - RCT12SpriteParticle misc_particle; + RCT12EntityBase Unknown; + RCT2::Vehicle Vehicle; + RCT2::Peep Peep; + RCT12EntityLitter Litter; + RCT12EntityBalloon Balloon; + RCT12EntityDuck Duck; + RCT12EntityJumpingFountain JumpingFountain; + RCT12EntityMoneyEffect MoneyEffect; + RCT12EntityCrashedVehicleParticle CrashedVehicleParticle; + RCT12EntityCrashSplash CrashSplash; + RCT12EntitySteamParticle SteamParticle; + RCT12EntityParticle MiscParticle; }; assert_struct_size(Entity, 0x100); struct RideRatingCalculationData { - uint16_t proximity_x; - uint16_t proximity_y; - uint16_t proximity_z; - uint16_t proximity_start_x; - uint16_t proximity_start_y; - uint16_t proximity_start_z; - uint8_t current_ride; - uint8_t state; - uint8_t proximity_track_type; - uint8_t proximity_base_height; - uint16_t proximity_total; - uint16_t proximity_scores[26]; - uint16_t num_brakes; - uint16_t num_reversers; - uint16_t station_flags; + uint16_t ProximityX; + uint16_t ProximityY; + uint16_t ProximityZ; + uint16_t ProximityStartX; + uint16_t ProximityStartY; + uint16_t ProximityStartZ; + uint8_t CurrentRide; + uint8_t State; + uint8_t ProximityTrackType; + uint8_t ProximityBaseHeight; + uint16_t ProximityTotal; + uint16_t ProximityScores[26]; + uint16_t NumBrakes; + uint16_t NumReversers; + uint16_t StationFlags; }; assert_struct_size(RideRatingCalculationData, 76); @@ -763,12 +763,12 @@ namespace RCT2 */ struct S6Header { - uint8_t type; // 0x00 - uint8_t classic_flag; // 0x01 - uint16_t num_packed_objects; // 0x02 - uint32_t version; // 0x04 - uint32_t magic_number; // 0x08 - uint8_t pad_0C[0x14]; + uint8_t Type; // 0x00 + uint8_t ClassicFlag; // 0x01 + uint16_t NumPackedObjects; // 0x02 + uint32_t Version; // 0x04 + uint32_t MagicNumber; // 0x08 + uint8_t Pad0C[0x14]; }; assert_struct_size(S6Header, 0x20); @@ -778,26 +778,26 @@ namespace RCT2 */ struct S6Info { - EditorStep editor_step; - uint8_t category; // 0x01 - uint8_t objective_type; // 0x02 - uint8_t objective_arg_1; // 0x03 - int32_t objective_arg_2; // 0x04 - int16_t objective_arg_3; // 0x08 - uint8_t pad_00A[0x3E]; - char name[64]; // 0x48 - char details[256]; // 0x88 - rct_object_entry entry; // 0x188 + ::EditorStep EditorStep; + uint8_t Category; // 0x01 + uint8_t ObjectiveType; // 0x02 + uint8_t ObjectiveArg1; // 0x03 + int32_t ObjectiveArg2; // 0x04 + int16_t ObjectiveArg3; // 0x08 + uint8_t Pad00A[0x3E]; + char Name[64]; // 0x48 + char Details[256]; // 0x88 + RCTObjectEntry Entry; // 0x188 }; assert_struct_size(S6Info, 0x198); struct S6Data { // SC6[0] - S6Header header; + S6Header Header; // SC6[1] - S6Info info; + S6Info Info; // SC6[2] // packed objects @@ -805,233 +805,233 @@ namespace RCT2 // SC6[3] union { - rct_object_entry Objects[RCT2_OBJECT_ENTRY_COUNT]; + RCTObjectEntry Objects[RCT2_OBJECT_ENTRY_COUNT]; struct { - rct_object_entry RideObjects[Limits::MaxRideObjects]; - rct_object_entry SceneryObjects[Limits::MaxSmallSceneryObjects]; - rct_object_entry LargeSceneryObjects[Limits::MaxLargeSceneryObjects]; - rct_object_entry WallSceneryObjects[Limits::MaxWallSceneryObjects]; - rct_object_entry BannerObjects[Limits::MaxBannerObjects]; - rct_object_entry PathObjects[Limits::MaxPathObjects]; - rct_object_entry PathAdditionObjects[Limits::MaxPathAdditionObjects]; - rct_object_entry SceneryGroupObjects[Limits::MaxSceneryGroupObjects]; - rct_object_entry ParkEntranceObjects[Limits::MaxParkEntranceObjects]; - rct_object_entry WaterObjects[Limits::MaxWaterObjects]; - rct_object_entry ScenarioTextObjects[Limits::MaxScenarioTextObjects]; + 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]; }; }; // SC6[4] - uint16_t elapsed_months; - uint16_t current_day; - uint32_t scenario_ticks; - uint32_t scenario_srand_0; - uint32_t scenario_srand_1; + uint16_t ElapsedMonths; + uint16_t CurrentDay; + uint32_t ScenarioTicks; + uint32_t ScenarioSrand0; + uint32_t ScenarioSrand1; // SC6[5] - RCT12TileElement tile_elements[Limits::MaxTileElements]; + RCT12TileElement TileElements[Limits::MaxTileElements]; // SC6[6] - uint32_t next_free_tile_element_pointer_index; - Entity sprites[Limits::MaxEntitiesRCTCExtended]; - uint16_t sprite_lists_head[static_cast(EntityListId::Count)]; - uint16_t sprite_lists_count[static_cast(EntityListId::Count)]; - StringId park_name; - uint8_t pad_013573D6[2]; - uint32_t park_name_args; - money32 initial_cash; - money32 current_loan; - uint32_t park_flags; - money16 park_entrance_fee; - uint16_t rct1_park_entrance_x; - uint16_t rct1_park_entrance_y; - uint8_t pad_013573EE[2]; - uint8_t rct1_park_entrance_z; - uint8_t pad_013573F1; - rct12_peep_spawn peep_spawns[Limits::MaxPeepSpawns]; - uint8_t guest_count_change_modifier; - uint8_t current_research_level; - uint8_t pad_01357400[4]; - uint32_t researched_ride_types[Limits::MaxResearchedRideTypeQuads]; - uint32_t researched_ride_entries[Limits::MaxResearchedRideEntryQuads]; - uint32_t researched_track_types_a[128]; - uint32_t researched_track_types_b[128]; + uint32_t NextFreeTileElementPointerIndex; + Entity Entities[Limits::MaxEntitiesRCTCExtended]; + uint16_t EntityListsHead[static_cast(EntityListId::Count)]; + uint16_t EntityListsCount[static_cast(EntityListId::Count)]; + StringId ParkName; + uint8_t Pad013573D6[2]; + uint32_t ParkNameArgs; + money32 InitialCash; + money32 CurrentLoan; + uint32_t ParkFlags; + money16 ParkEntranceFee; + uint16_t RCT1ParkEntranceX; + uint16_t RCT1ParkEntranceY; + uint8_t Pad013573EE[2]; + uint8_t RCT1ParkEntranceZ; + uint8_t Pad013573F1; + RCT12PeepSpawn PeepSpawns[Limits::MaxPeepSpawns]; + uint8_t GuestCountChangeModifier; + uint8_t CurrentResearchLevel; + uint8_t Pad01357400[4]; + uint32_t ResearchedRideTypes[Limits::MaxResearchedRideTypeQuads]; + uint32_t ResearchedRideEntries[Limits::MaxResearchedRideEntryQuads]; + uint32_t ResearchedTrackTypesA[128]; + uint32_t ResearchedTrackTypesB[128]; // SC6[7] - uint16_t guests_in_park; - uint16_t guests_heading_for_park; + uint16_t GuestsInPark; + uint16_t GuestsHeadingForPark; // Ignored in scenario - money32 expenditure_table[Limits::ExpenditureTableMonthCount][Limits::ExpenditureTypeCount]; + money32 ExpenditureTable[Limits::ExpenditureTableMonthCount][Limits::ExpenditureTypeCount]; // SC6[8] - uint16_t last_guests_in_park; - uint8_t pad_01357BCA[3]; - uint8_t handyman_colour; - uint8_t mechanic_colour; - uint8_t security_colour; + uint16_t LastGuestsInPark; + uint8_t Pad01357BCA[3]; + uint8_t HandymanColour; + uint8_t MechanicColour; + uint8_t SecurityColour; // Ignored in scenario - uint32_t researched_scenery_items[Limits::MaxResearchedSceneryItemQuads]; + uint32_t ResearchedSceneryItems[Limits::MaxResearchedSceneryItemQuads]; // SC6[9] - uint16_t park_rating; + uint16_t ParkRating; // Ignored in scenario - uint8_t park_rating_history[32]; - uint8_t guests_in_park_history[32]; + uint8_t ParkRatingHistory[32]; + uint8_t GuestsInParkHistory[32]; // SC6[10] - uint8_t active_research_types; - uint8_t research_progress_stage; - uint32_t last_researched_item_subject; - uint8_t pad_01357CF8[1000]; - uint32_t next_research_item; - uint16_t research_progress; - uint8_t next_research_category; - uint8_t next_research_expected_day; - uint8_t next_research_expected_month; - uint8_t guest_initial_happiness; - uint16_t park_size; - uint16_t guest_generation_probability; - uint16_t total_ride_value_for_money; - money32 maximum_loan; - money16 guest_initial_cash; - uint8_t guest_initial_hunger; - uint8_t guest_initial_thirst; - uint8_t objective_type; - uint8_t objective_year; - uint8_t pad_013580FA[2]; - money32 objective_currency; - uint16_t objective_guests; - uint8_t campaign_weeks_left[20]; - uint8_t campaign_ride_index[22]; + uint8_t ActiveResearchTypes; + uint8_t ResearchProgressStage; + uint32_t LastResearchedItemSubject; + uint8_t Pad01357CF8[1000]; + uint32_t NextResearchItem; + uint16_t ResearchProgress; + uint8_t NextResearchCategory; + uint8_t NextResearchExpectedDay; + uint8_t NextResearchExpectedMonth; + uint8_t GuestInitialHappiness; + uint16_t ParkSize; + uint16_t GuestGenerationProbability; + uint16_t TotalRideValueForMoney; + money32 MaximumLoan; + money16 GuestInitialCash; + uint8_t GuestInitialHunger; + uint8_t GuestInitialThirst; + uint8_t ObjectiveType; + uint8_t ObjectiveYear; + uint8_t Pad013580FA[2]; + money32 ObjectiveCurrency; + uint16_t ObjectiveGuests; + uint8_t CampaignWeeksLeft[20]; + uint8_t CampaignRideIndex[22]; // Ignored in scenario - money32 balance_history[Limits::FinanceGraphSize]; + money32 BalanceHistory[Limits::FinanceGraphSize]; // SC6[11] - money32 current_expenditure; - money32 current_profit; - money32 weekly_profit_average_dividend; - uint16_t weekly_profit_average_divisor; - uint8_t pad_0135833A[2]; + money32 CurrentExpenditure; + money32 CurrentProfit; + money32 WeeklyProfitAverageDividend; + uint16_t WeeklyProfitAverageDivisor; + uint8_t Pad0135833A[2]; // Ignored in scenario - money32 weekly_profit_history[Limits::FinanceGraphSize]; + money32 WeeklyProfitHistory[Limits::FinanceGraphSize]; // SC6[12] - money32 park_value; + money32 ParkValue; // Ignored in scenario - money32 park_value_history[Limits::FinanceGraphSize]; + money32 ParkValueHistory[Limits::FinanceGraphSize]; // SC6[13] - money32 completed_company_value; - uint32_t total_admissions; - money32 income_from_admissions; - money32 company_value; - uint8_t peep_warning_throttle[16]; - rct12_award awards[Limits::MaxAwards]; - money16 land_price; - money16 construction_rights_price; - uint16_t word_01358774; - uint8_t pad_01358776[2]; - uint32_t cd_key; - uint8_t pad_0135877C[64]; - uint32_t game_version_number; - money32 completed_company_value_record; - uint32_t loan_hash; - uint16_t ride_count; - uint8_t pad_013587CA[6]; - money32 historical_profit; - uint8_t pad_013587D4[4]; - char scenario_completed_name[32]; - money32 cash; - uint8_t pad_013587FC[50]; - uint16_t park_rating_casualty_penalty; - uint16_t map_size_units; - uint16_t map_size_minus_2; - uint16_t map_size; - uint16_t map_max_xy; - uint32_t same_price_throughout; - uint16_t suggested_max_guests; - uint16_t park_rating_warning_days; - uint8_t last_entrance_style; - uint8_t rct1_water_colour; - uint8_t pad_01358842[2]; - RCT12ResearchItem research_items[Limits::MaxResearchItems]; - uint16_t map_base_z; - char scenario_name[64]; - char scenario_description[256]; - uint8_t current_interest_rate; - uint8_t pad_0135934B; - uint32_t same_price_throughout_extended; - int16_t park_entrance_x[Limits::MaxParkEntrances]; - int16_t park_entrance_y[Limits::MaxParkEntrances]; - int16_t park_entrance_z[Limits::MaxParkEntrances]; - uint8_t park_entrance_direction[Limits::MaxParkEntrances]; - char scenario_filename[256]; - uint8_t saved_expansion_pack_names[3256]; - RCT12Banner banners[Limits::MaxBanners]; - char custom_strings[Limits::MaxUserStrings][Limits::MaxUserStringLength]; - uint32_t game_ticks_1; - Ride rides[Limits::MaxRidesInPark]; - uint16_t saved_age; - int16_t saved_view_x; - int16_t saved_view_y; - uint8_t saved_view_zoom; - uint8_t saved_view_rotation; - RCT12MapAnimation map_animations[Limits::MaxAnimatedObjects]; - uint16_t num_map_animations; - uint8_t pad_0138B582[2]; - RideRatingCalculationData ride_ratings_calc_data; - uint8_t pad_0138B5D0[60]; - RCT12RideMeasurement ride_measurements[8]; - uint32_t next_guest_index; - uint16_t grass_and_scenery_tilepos; - uint32_t patrol_areas[(Limits::MaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; - StaffMode staff_modes[Limits::MaxStaff + Limits::StaffTypeCount]; - uint8_t pad_13CA73E; - uint8_t pad_13CA73F; - uint8_t byte_13CA740; - uint8_t pad_13CA741; - uint8_t byte_13CA742[4]; // unused - uint8_t climate; - uint8_t pad_013CA747; - uint16_t climate_update_timer; - uint8_t current_weather; - uint8_t next_weather; - uint8_t temperature; - uint8_t next_temperature; - uint8_t current_weather_effect; - uint8_t next_weather_effect; - uint8_t current_weather_gloom; - uint8_t next_weather_gloom; - uint8_t current_weather_level; - uint8_t next_weather_level; - rct12_news_item news_items[Limits::MaxNewsItems]; - char rct1_scenario_name[62]; // Unused in RCT2 - uint16_t rct1_scenario_slot_index; // Unused in RCT2 - uint32_t rct1_scenario_flags; // Unused in RCT2 - uint16_t wide_path_tile_loop_x; - uint16_t wide_path_tile_loop_y; - uint8_t pad_13CE778[434]; + money32 CompletedCompanyValue; + uint32_t TotalAdmissions; + money32 IncomeFromAdmissions; + money32 CompanyValue; + uint8_t PeepWarningThrottle[16]; + RCT12Award Awards[Limits::MaxAwards]; + money16 LandPrice; + money16 ConstructionRightsPrice; + uint16_t Word01358774; + uint8_t Pad01358776[2]; + uint32_t CDKey; + uint8_t Pad0135877C[64]; + uint32_t GameVersionNumber; + money32 CompletedCompanyValueRecord; + uint32_t LoanHash; + uint16_t RideCount; + uint8_t Pad013587CA[6]; + money32 HistoricalProfit; + uint8_t Pad013587D4[4]; + char ScenarioCompletedName[32]; + money32 Cash; + uint8_t Pad013587FC[50]; + uint16_t ParkRatingCasualtyPenalty; + uint16_t MapSizeUnits; + uint16_t MapSizeMinus2; + uint16_t MapSize; + uint16_t MapMaxXy; + uint32_t SamePriceThroughout; + uint16_t SuggestedMaxGuests; + uint16_t ParkRatingWarningDays; + uint8_t LastEntranceStyle; + uint8_t RCT1WaterColour; + uint8_t Pad01358842[2]; + RCT12ResearchItem ResearchItems[Limits::MaxResearchItems]; + 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]; + char ScenarioFilename[256]; + uint8_t SavedExpansionPackNames[3256]; + RCT12Banner Banners[Limits::MaxBanners]; + char CustomStrings[Limits::MaxUserStrings][Limits::MaxUserStringLength]; + uint32_t GameTicks1; + Ride Rides[Limits::MaxRidesInPark]; + uint16_t SavedAge; + int16_t SavedViewX; + int16_t SavedViewY; + uint8_t SavedViewZoom; + uint8_t SavedViewRotation; + RCT12MapAnimation MapAnimations[Limits::MaxAnimatedObjects]; + uint16_t NumMapAnimations; + uint8_t Pad0138B582[2]; + RideRatingCalculationData RideRatingsCalcData; + uint8_t Pad0138B5D0[60]; + RCT12RideMeasurement RideMeasurements[8]; + uint32_t NextGuestIndex; + uint16_t GrassAndSceneryTilepos; + uint32_t PatrolAreas[(Limits::MaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize]; + StaffMode StaffModes[Limits::MaxStaff + Limits::StaffTypeCount]; + uint8_t Pad13CA73E; + uint8_t Pad13CA73F; + uint8_t Byte13CA740; + uint8_t Pad13CA741; + uint8_t Byte13CA742[4]; // unused + uint8_t Climate; + uint8_t Pad013CA747; + uint16_t ClimateUpdateTimer; + uint8_t CurrentWeather; + uint8_t NextWeather; + uint8_t Temperature; + uint8_t NextTemperature; + uint8_t CurrentWeatherEffect; + uint8_t NextWeatherEffect; + uint8_t CurrentWeatherGloom; + uint8_t NextWeatherGloom; + uint8_t CurrentWeatherLevel; + uint8_t NextWeatherLevel; + RCT12NewsItem NewsItems[Limits::MaxNewsItems]; + char RCT1ScenarioName[62]; // Unused in RCT2 + uint16_t RCT1ScenarioSlotIndex; // Unused in RCT2 + uint32_t RCT1ScenarioFlags; // Unused in RCT2 + uint16_t WidePathTileLoopX; + uint16_t WidePathTileLoopY; + uint8_t Pad13CE778[434]; }; assert_struct_size(S6Data, 0x5a3c4a); struct StexEntry { - StringId scenario_name; // 0x00 - StringId park_name; // 0x02 - StringId details; // 0x04 - uint8_t var_06; + StringId ScenarioName; // 0x00 + StringId ParkName; // 0x02 + StringId Details; // 0x04 + uint8_t Var06; }; assert_struct_size(StexEntry, 7); #pragma pack(pop) - ObjectEntryIndex RCT2RideTypeToOpenRCT2RideType(uint8_t rct2RideType, const rct_ride_entry* rideEntry); + ObjectEntryIndex RCT2RideTypeToOpenRCT2RideType(uint8_t rct2RideType, const RideObjectEntry& rideEntry); bool RCT2TrackTypeIsBooster(ride_type_t rideType, uint16_t trackType); bool RCT2RideTypeNeedsConversion(uint8_t rct2RideType); uint8_t OpenRCT2RideTypeToRCT2RideType(ObjectEntryIndex openrct2Type); @@ -1054,7 +1054,7 @@ namespace RCT2 const FootpathMapping* GetFootpathSurfaceId( const ObjectEntryDescriptor& desc, bool ideallyLoaded = false, bool isQueue = false); - std::optional GetBestObjectEntryForSurface(std::string_view surface, std::string_view railings); + std::optional GetBestObjectEntryForSurface(std::string_view surface, std::string_view railings); static constexpr std::string_view DefaultTerrainSurfaces[] = { "rct2.terrain_surface.grass", "rct2.terrain_surface.sand", "rct2.terrain_surface.dirt", diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 1ab1bf8d4b..e47482ae28 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -44,10 +44,12 @@ #include "../management/NewsItem.h" #include "../management/Research.h" #include "../network/network.h" +#include "../object/LargeSceneryEntry.h" #include "../object/ObjectLimits.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" #include "../object/ObjectRepository.h" +#include "../object/WallSceneryEntry.h" #include "../peep/RideUseSystem.h" #include "../rct12/EntryList.h" #include "../rct12/RCT12.h" @@ -87,7 +89,7 @@ namespace RCT2 private: IObjectRepository& _objectRepository; - const utf8* _s6Path = nullptr; + u8string _s6Path; S6Data _s6{}; uint8_t _gameVersion = 0; bool _isSV7 = false; @@ -105,7 +107,7 @@ namespace RCT2 { } - ParkLoadResult Load(const utf8* path) override + ParkLoadResult Load(const u8string& path) override { const auto extension = Path::GetExtension(path); if (String::Equals(extension, ".sc6", true)) @@ -120,7 +122,7 @@ namespace RCT2 throw std::runtime_error("Invalid RCT2 park extension."); } - ParkLoadResult LoadSavedGame(const utf8* path, bool skipObjectCheck = false) override + ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) override { auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); auto result = LoadFromStream(&fs, false, skipObjectCheck); @@ -128,7 +130,7 @@ namespace RCT2 return result; } - ParkLoadResult LoadScenario(const utf8* path, bool skipObjectCheck = false) override + ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) override { auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); auto result = LoadFromStream(&fs, true, skipObjectCheck); @@ -138,23 +140,23 @@ namespace RCT2 ParkLoadResult LoadFromStream( OpenRCT2::IStream* stream, bool isScenario, [[maybe_unused]] bool skipObjectCheck = false, - const utf8* path = String::Empty) override + const u8string& path = {}) override { auto chunkReader = SawyerChunkReader(stream); - chunkReader.ReadChunk(&_s6.header, sizeof(_s6.header)); + chunkReader.ReadChunk(&_s6.Header, sizeof(_s6.Header)); - log_verbose("saved game classic_flag = 0x%02x", _s6.header.classic_flag); + LOG_VERBOSE("saved game classic_flag = 0x%02x", _s6.Header.ClassicFlag); if (isScenario) { - if (_s6.header.type != S6_TYPE_SCENARIO) + if (_s6.Header.Type != S6_TYPE_SCENARIO) { throw std::runtime_error("Park is not a scenario."); } - chunkReader.ReadChunk(&_s6.info, sizeof(_s6.info)); + chunkReader.ReadChunk(&_s6.Info, sizeof(_s6.Info)); } else { - if (_s6.header.type != S6_TYPE_SAVEDGAME) + if (_s6.Header.Type != S6_TYPE_SAVEDGAME) { throw std::runtime_error("Park is not a saved game."); } @@ -162,12 +164,12 @@ namespace RCT2 // Read packed objects // TODO try to contain this more and not store objects until later - for (uint16_t i = 0; i < _s6.header.num_packed_objects; i++) + for (uint16_t i = 0; i < _s6.Header.NumPackedObjects; i++) { _objectRepository.ExportPackedObject(stream); } - if (path) + if (!path.empty()) { auto extension = Path::GetExtension(path); _isSV7 = _stricmp(extension.c_str(), ".sv7") == 0; @@ -177,21 +179,21 @@ namespace RCT2 if (isScenario) { - chunkReader.ReadChunk(&_s6.elapsed_months, 16); - chunkReader.ReadChunk(&_s6.tile_elements, sizeof(_s6.tile_elements)); + chunkReader.ReadChunk(&_s6.ElapsedMonths, 16); + chunkReader.ReadChunk(&_s6.TileElements, sizeof(_s6.TileElements)); ReadChunk6(chunkReader, 76); - chunkReader.ReadChunk(&_s6.guests_in_park, 4); - chunkReader.ReadChunk(&_s6.last_guests_in_park, 8); - chunkReader.ReadChunk(&_s6.park_rating, 2); - chunkReader.ReadChunk(&_s6.active_research_types, 1082); - chunkReader.ReadChunk(&_s6.current_expenditure, 16); - chunkReader.ReadChunk(&_s6.park_value, 4); - chunkReader.ReadChunk(&_s6.completed_company_value, 483816); + chunkReader.ReadChunk(&_s6.GuestsInPark, 4); + chunkReader.ReadChunk(&_s6.LastGuestsInPark, 8); + chunkReader.ReadChunk(&_s6.ParkRating, 2); + chunkReader.ReadChunk(&_s6.ActiveResearchTypes, 1082); + chunkReader.ReadChunk(&_s6.CurrentExpenditure, 16); + chunkReader.ReadChunk(&_s6.ParkValue, 4); + chunkReader.ReadChunk(&_s6.CompletedCompanyValue, 483816); } else { - chunkReader.ReadChunk(&_s6.elapsed_months, 16); - chunkReader.ReadChunk(&_s6.tile_elements, sizeof(_s6.tile_elements)); + chunkReader.ReadChunk(&_s6.ElapsedMonths, 16); + chunkReader.ReadChunk(&_s6.TileElements, sizeof(_s6.TileElements)); ReadChunk6(chunkReader, 488816); } @@ -209,15 +211,15 @@ namespace RCT2 chunkReader.ReadChunk(buffer.data(), buffer.size()); auto stream = OpenRCT2::MemoryStream(buffer.data(), buffer.size()); - uint32_t preEntitiesSize = sizeof(_s6.next_free_tile_element_pointer_index); + uint32_t preEntitiesSize = sizeof(_s6.NextFreeTileElementPointerIndex); uint32_t postEntitiesSize = sizeWithoutEntities - preEntitiesSize; - stream.Read(&_s6.next_free_tile_element_pointer_index, preEntitiesSize); - stream.Read(&_s6.sprites, entitiesSize); - stream.Read(&_s6.sprite_lists_head, postEntitiesSize); + stream.Read(&_s6.NextFreeTileElementPointerIndex, preEntitiesSize); + stream.Read(&_s6.Entities, entitiesSize); + stream.Read(&_s6.EntityListsHead, postEntitiesSize); } - bool GetDetails(scenario_index_entry* dst) override + bool GetDetails(ScenarioIndexEntry* dst) override { *dst = {}; return false; @@ -227,250 +229,248 @@ namespace RCT2 { Initialise(); - gEditorStep = _s6.info.editor_step; - gScenarioCategory = static_cast(_s6.info.category); + gEditorStep = _s6.Info.EditorStep; + gScenarioCategory = static_cast(_s6.Info.Category); // Some scenarios have their scenario details in UTF-8, due to earlier bugs in OpenRCT2. auto loadMaybeUTF8 = [](std::string_view str) -> std::string { - return !IsLikelyUTF8(str) ? rct2_to_utf8(str, RCT2LanguageId::EnglishUK) : std::string(str); + return !IsLikelyUTF8(str) ? RCT2StringToUTF8(str, RCT2LanguageId::EnglishUK) : std::string(str); }; - if (_s6.header.type == S6_TYPE_SCENARIO) + if (_s6.Header.Type == S6_TYPE_SCENARIO) { - gScenarioName = loadMaybeUTF8(_s6.info.name); - gScenarioDetails = loadMaybeUTF8(_s6.info.details); + gScenarioName = loadMaybeUTF8(_s6.Info.Name); + gScenarioDetails = loadMaybeUTF8(_s6.Info.Details); } else { // Saved games do not have an info chunk - gScenarioName = loadMaybeUTF8(_s6.scenario_name); - gScenarioDetails = loadMaybeUTF8(_s6.scenario_description); + gScenarioName = loadMaybeUTF8(_s6.ScenarioName); + gScenarioDetails = loadMaybeUTF8(_s6.ScenarioDescription); } - gDateMonthsElapsed = static_cast(_s6.elapsed_months); - gDateMonthTicks = _s6.current_day; - gCurrentTicks = _s6.game_ticks_1; + gDateMonthsElapsed = static_cast(_s6.ElapsedMonths); + gDateMonthTicks = _s6.CurrentDay; + gCurrentTicks = _s6.GameTicks1; - scenario_rand_seed(_s6.scenario_srand_0, _s6.scenario_srand_1); + ScenarioRandSeed(_s6.ScenarioSrand0, _s6.ScenarioSrand1); DetermineFlatRideStatus(); ImportTileElements(); ImportEntities(); - gInitialCash = ToMoney64(_s6.initial_cash); - gBankLoan = ToMoney64(_s6.current_loan); + gInitialCash = ToMoney64(_s6.InitialCash); + gBankLoan = ToMoney64(_s6.CurrentLoan); - gParkFlags = _s6.park_flags & ~PARK_FLAGS_NO_MONEY_SCENARIO; + gParkFlags = _s6.ParkFlags & ~PARK_FLAGS_NO_MONEY_SCENARIO; // RCT2 used a different flag for `no money` when the park is a scenario - if (_s6.header.type == S6_TYPE_SCENARIO) + if (_s6.Header.Type == S6_TYPE_SCENARIO) { - if (_s6.park_flags & PARK_FLAGS_NO_MONEY_SCENARIO) + if (_s6.ParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO) gParkFlags |= PARK_FLAGS_NO_MONEY; else gParkFlags &= ~PARK_FLAGS_NO_MONEY; } - gParkEntranceFee = _s6.park_entrance_fee; - // rct1_park_entrance_x + gParkEntranceFee = _s6.ParkEntranceFee; + // rct1_park_entranceX // rct1_park_entrance_y - // pad_013573EE + // Pad013573EE // rct1_park_entrance_z ImportPeepSpawns(); - gGuestChangeModifier = _s6.guest_count_change_modifier; - gResearchFundingLevel = _s6.current_research_level; - // pad_01357400 - // _s6.researched_track_types_a - // _s6.researched_track_types_b + gGuestChangeModifier = _s6.GuestCountChangeModifier; + gResearchFundingLevel = _s6.CurrentResearchLevel; + // Pad01357400 + // _s6.ResearchedTrackTypesA + // _s6.ResearchedTrackTypesB - gNumGuestsInPark = _s6.guests_in_park; - gNumGuestsHeadingForPark = _s6.guests_heading_for_park; + gNumGuestsInPark = _s6.GuestsInPark; + gNumGuestsHeadingForPark = _s6.GuestsHeadingForPark; for (size_t i = 0; i < Limits::ExpenditureTableMonthCount; i++) { for (size_t j = 0; j < Limits::ExpenditureTypeCount; j++) { - gExpenditureTable[i][j] = ToMoney64(_s6.expenditure_table[i][j]); + gExpenditureTable[i][j] = ToMoney64(_s6.ExpenditureTable[i][j]); } } - gNumGuestsInParkLastWeek = _s6.last_guests_in_park; - // pad_01357BCA - gStaffHandymanColour = _s6.handyman_colour; - gStaffMechanicColour = _s6.mechanic_colour; - gStaffSecurityColour = _s6.security_colour; + gNumGuestsInParkLastWeek = _s6.LastGuestsInPark; + // Pad01357BCA + gStaffHandymanColour = _s6.HandymanColour; + gStaffMechanicColour = _s6.MechanicColour; + gStaffSecurityColour = _s6.SecurityColour; - gParkRating = _s6.park_rating; + gParkRating = _s6.ParkRating; auto& park = OpenRCT2::GetContext()->GetGameState()->GetPark(); park.ResetHistories(); - std::copy(std::begin(_s6.park_rating_history), std::end(_s6.park_rating_history), gParkRatingHistory); - for (size_t i = 0; i < std::size(_s6.guests_in_park_history); i++) + std::copy(std::begin(_s6.ParkRatingHistory), std::end(_s6.ParkRatingHistory), gParkRatingHistory); + for (size_t i = 0; i < std::size(_s6.GuestsInParkHistory); i++) { - if (_s6.guests_in_park_history[i] != RCT12ParkHistoryUndefined) + if (_s6.GuestsInParkHistory[i] != RCT12ParkHistoryUndefined) { - gGuestsInParkHistory[i] = _s6.guests_in_park_history[i] * RCT12GuestsInParkHistoryFactor; + gGuestsInParkHistory[i] = _s6.GuestsInParkHistory[i] * RCT12GuestsInParkHistoryFactor; } } - gResearchPriorities = _s6.active_research_types; - gResearchProgressStage = _s6.research_progress_stage; - if (_s6.last_researched_item_subject != RCT12_RESEARCHED_ITEMS_SEPARATOR) - gResearchLastItem = RCT12ResearchItem{ _s6.last_researched_item_subject, - EnumValue(ResearchCategory::Transport) } + gResearchPriorities = _s6.ActiveResearchTypes; + gResearchProgressStage = _s6.ResearchProgressStage; + if (_s6.LastResearchedItemSubject != RCT12_RESEARCHED_ITEMS_SEPARATOR) + gResearchLastItem = RCT12ResearchItem{ _s6.LastResearchedItemSubject, EnumValue(ResearchCategory::Transport) } .ToResearchItem(); else gResearchLastItem = std::nullopt; - // pad_01357CF8 - if (_s6.next_research_item != RCT12_RESEARCHED_ITEMS_SEPARATOR) - gResearchNextItem = RCT12ResearchItem{ _s6.next_research_item, _s6.next_research_category }.ToResearchItem(); + // Pad01357CF8 + if (_s6.NextResearchItem != RCT12_RESEARCHED_ITEMS_SEPARATOR) + gResearchNextItem = RCT12ResearchItem{ _s6.NextResearchItem, _s6.NextResearchCategory }.ToResearchItem(); else gResearchNextItem = std::nullopt; - gResearchProgress = _s6.research_progress; - gResearchExpectedDay = _s6.next_research_expected_day; - gResearchExpectedMonth = _s6.next_research_expected_month; - gGuestInitialHappiness = _s6.guest_initial_happiness; - gParkSize = _s6.park_size; - _guestGenerationProbability = _s6.guest_generation_probability; - gTotalRideValueForMoney = _s6.total_ride_value_for_money; - gMaxBankLoan = ToMoney64(_s6.maximum_loan); - gGuestInitialCash = _s6.guest_initial_cash; - gGuestInitialHunger = _s6.guest_initial_hunger; - gGuestInitialThirst = _s6.guest_initial_thirst; - gScenarioObjective.Type = _s6.objective_type; - gScenarioObjective.Year = _s6.objective_year; - // pad_013580FA - gScenarioObjective.Currency = _s6.objective_currency; + gResearchProgress = _s6.ResearchProgress; + gResearchExpectedDay = _s6.NextResearchExpectedDay; + gResearchExpectedMonth = _s6.NextResearchExpectedMonth; + gGuestInitialHappiness = _s6.GuestInitialHappiness; + gParkSize = _s6.ParkSize; + _guestGenerationProbability = _s6.GuestGenerationProbability; + gTotalRideValueForMoney = _s6.TotalRideValueForMoney; + gMaxBankLoan = ToMoney64(_s6.MaximumLoan); + gGuestInitialCash = ToMoney64(_s6.GuestInitialCash); + gGuestInitialHunger = _s6.GuestInitialHunger; + gGuestInitialThirst = _s6.GuestInitialThirst; + gScenarioObjective.Type = _s6.ObjectiveType; + gScenarioObjective.Year = _s6.ObjectiveYear; + // Pad013580FA + gScenarioObjective.Currency = _s6.ObjectiveCurrency; // In RCT2, the ride string IDs start at index STR_0002 and are directly mappable. // This is not always the case in OpenRCT2, so we use the actual ride ID. if (gScenarioObjective.Type == OBJECTIVE_BUILD_THE_BEST) - gScenarioObjective.RideId = _s6.objective_guests - RCT2_RIDE_STRING_START; + gScenarioObjective.RideId = _s6.ObjectiveGuests - RCT2_RIDE_STRING_START; else - gScenarioObjective.NumGuests = _s6.objective_guests; + gScenarioObjective.NumGuests = _s6.ObjectiveGuests; ImportMarketingCampaigns(); - gCurrentExpenditure = ToMoney64(_s6.current_expenditure); - gCurrentProfit = ToMoney64(_s6.current_profit); - gWeeklyProfitAverageDividend = ToMoney64(_s6.weekly_profit_average_dividend); - gWeeklyProfitAverageDivisor = _s6.weekly_profit_average_divisor; - // pad_0135833A + gCurrentExpenditure = ToMoney64(_s6.CurrentExpenditure); + gCurrentProfit = ToMoney64(_s6.CurrentProfit); + gWeeklyProfitAverageDividend = ToMoney64(_s6.WeeklyProfitAverageDividend); + gWeeklyProfitAverageDivisor = _s6.WeeklyProfitAverageDivisor; + // Pad0135833A - gParkValue = ToMoney64(_s6.park_value); + gParkValue = ToMoney64(_s6.ParkValue); for (size_t i = 0; i < Limits::FinanceGraphSize; i++) { - gCashHistory[i] = ToMoney64(_s6.balance_history[i]); - gWeeklyProfitHistory[i] = ToMoney64(_s6.weekly_profit_history[i]); - gParkValueHistory[i] = ToMoney64(_s6.park_value_history[i]); + gCashHistory[i] = ToMoney64(_s6.BalanceHistory[i]); + gWeeklyProfitHistory[i] = ToMoney64(_s6.WeeklyProfitHistory[i]); + gParkValueHistory[i] = ToMoney64(_s6.ParkValueHistory[i]); } - gScenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s6.completed_company_value); - gTotalAdmissions = _s6.total_admissions; - gTotalIncomeFromAdmissions = ToMoney64(_s6.income_from_admissions); - gCompanyValue = ToMoney64(_s6.company_value); - std::memcpy(gPeepWarningThrottle, _s6.peep_warning_throttle, sizeof(_s6.peep_warning_throttle)); + gScenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s6.CompletedCompanyValue); + gTotalAdmissions = _s6.TotalAdmissions; + gTotalIncomeFromAdmissions = ToMoney64(_s6.IncomeFromAdmissions); + gCompanyValue = ToMoney64(_s6.CompanyValue); + std::memcpy(gPeepWarningThrottle, _s6.PeepWarningThrottle, sizeof(_s6.PeepWarningThrottle)); // Awards auto& awards = GetAwards(); - for (auto& src : _s6.awards) + for (auto& src : _s6.Awards) { - if (src.time != 0) + if (src.Time != 0) { - awards.push_back(Award{ src.time, static_cast(src.type) }); + awards.push_back(Award{ src.Time, static_cast(src.Type) }); } } - gLandPrice = _s6.land_price; - gConstructionRightsPrice = _s6.construction_rights_price; + gLandPrice = ToMoney64(_s6.LandPrice); + gConstructionRightsPrice = ToMoney64(_s6.ConstructionRightsPrice); // unk_01358774 - // pad_01358776 - // _s6.cd_key - _gameVersion = _s6.game_version_number; - gScenarioCompanyValueRecord = _s6.completed_company_value_record; - // _s6.loan_hash; - // pad_013587CA - gHistoricalProfit = ToMoney64(_s6.historical_profit); - // pad_013587D4 - gScenarioCompletedBy = std::string_view(_s6.scenario_completed_name, sizeof(_s6.scenario_completed_name)); - gCash = ToMoney64(DECRYPT_MONEY(_s6.cash)); - // pad_013587FC - gParkRatingCasualtyPenalty = _s6.park_rating_casualty_penalty; - gMapSize = { _s6.map_size, _s6.map_size }; - gSamePriceThroughoutPark = _s6.same_price_throughout - | (static_cast(_s6.same_price_throughout_extended) << 32); - _suggestedGuestMaximum = _s6.suggested_max_guests; - gScenarioParkRatingWarningDays = _s6.park_rating_warning_days; - gLastEntranceStyle = _s6.last_entrance_style; + // Pad01358776 + // _s6.CdKey + _gameVersion = _s6.GameVersionNumber; + gScenarioCompanyValueRecord = _s6.CompletedCompanyValueRecord; + // _s6.LoanHash; + // Pad013587CA + gHistoricalProfit = ToMoney64(_s6.HistoricalProfit); + // Pad013587D4 + gScenarioCompletedBy = std::string_view(_s6.ScenarioCompletedName, sizeof(_s6.ScenarioCompletedName)); + gCash = ToMoney64(DECRYPT_MONEY(_s6.Cash)); + // Pad013587FC + gParkRatingCasualtyPenalty = _s6.ParkRatingCasualtyPenalty; + gMapSize = { _s6.MapSize, _s6.MapSize }; + gSamePriceThroughoutPark = _s6.SamePriceThroughout | (static_cast(_s6.SamePriceThroughoutExtended) << 32); + _suggestedGuestMaximum = _s6.SuggestedMaxGuests; + gScenarioParkRatingWarningDays = _s6.ParkRatingWarningDays; + gLastEntranceStyle = _s6.LastEntranceStyle; // rct1_water_colour - // pad_01358842 + // Pad01358842 ImportResearchList(); - gMapBaseZ = _s6.map_base_z; - gBankLoanInterestRate = _s6.current_interest_rate; - // pad_0135934B + gMapBaseZ = _s6.MapBaseZ; + gBankLoanInterestRate = _s6.CurrentInterestRate; + // Pad0135934B // Preserve compatibility with vanilla RCT2's save format. gParkEntrances.clear(); for (uint8_t i = 0; i < Limits::MaxParkEntrances; i++) { - if (_s6.park_entrance_x[i] != LOCATION_NULL) + if (_s6.ParkEntranceX[i] != LOCATION_NULL) { CoordsXYZD entrance; - entrance.x = _s6.park_entrance_x[i]; - entrance.y = _s6.park_entrance_y[i]; - entrance.z = _s6.park_entrance_z[i]; - entrance.direction = _s6.park_entrance_direction[i]; + entrance.x = _s6.ParkEntranceX[i]; + entrance.y = _s6.ParkEntranceY[i]; + entrance.z = _s6.ParkEntranceZ[i]; + entrance.direction = _s6.ParkEntranceDirection[i]; gParkEntrances.push_back(entrance); } } - if (_s6.header.type == S6_TYPE_SCENARIO) + if (_s6.Header.Type == S6_TYPE_SCENARIO) { - // _s6.scenario_filename is wrong for some RCT2 expansion scenarios, so we use the real filename + // _s6.ScenarioFilename is wrong for some RCT2 expansion scenarios, so we use the real filename gScenarioFileName = Path::GetFileName(_s6Path); } else { // For savegames the filename can be arbitrary, so we have no choice but to rely on the name provided - gScenarioFileName = std::string(String::ToStringView(_s6.scenario_filename, std::size(_s6.scenario_filename))); + gScenarioFileName = std::string(String::ToStringView(_s6.ScenarioFilename, std::size(_s6.ScenarioFilename))); } gCurrentRealTimeTicks = 0; ImportRides(); - gSavedAge = _s6.saved_age; - gSavedView = ScreenCoordsXY{ _s6.saved_view_x, _s6.saved_view_y }; - gSavedViewZoom = ZoomLevel{ static_cast(_s6.saved_view_zoom) }; - gSavedViewRotation = _s6.saved_view_rotation; + gSavedAge = _s6.SavedAge; + gSavedView = ScreenCoordsXY{ _s6.SavedViewX, _s6.SavedViewY }; + gSavedViewZoom = ZoomLevel{ static_cast(_s6.SavedViewZoom) }; + gSavedViewRotation = _s6.SavedViewRotation; ImportRideRatingsCalcData(); ImportRideMeasurements(); - gNextGuestNumber = _s6.next_guest_index; - gGrassSceneryTileLoopPosition = _s6.grass_and_scenery_tilepos; + gNextGuestNumber = _s6.NextGuestIndex; + gGrassSceneryTileLoopPosition = _s6.GrassAndSceneryTilepos; // unk_13CA73E - // pad_13CA73F + // Pad13CA73F // unk_13CA740 - gClimate = ClimateType{ _s6.climate }; - // pad_13CA741; - // byte_13CA742 - // pad_013CA747 - gClimateUpdateTimer = _s6.climate_update_timer; - gClimateCurrent.Weather = WeatherType{ _s6.current_weather }; - gClimateNext.Weather = WeatherType{ _s6.next_weather }; - gClimateCurrent.Temperature = _s6.temperature; - gClimateNext.Temperature = _s6.next_temperature; - gClimateCurrent.WeatherEffect = WeatherEffectType{ _s6.current_weather_effect }; - gClimateNext.WeatherEffect = WeatherEffectType{ _s6.next_weather_effect }; - gClimateCurrent.WeatherGloom = _s6.current_weather_gloom; - gClimateNext.WeatherGloom = _s6.next_weather_gloom; - gClimateCurrent.Level = static_cast(_s6.current_weather_level); - gClimateNext.Level = static_cast(_s6.next_weather_level); + gClimate = ClimateType{ _s6.Climate }; + // Pad13CA741; + // Byte13CA742 + // Pad013CA747 + gClimateUpdateTimer = _s6.ClimateUpdateTimer; + gClimateCurrent.Weather = WeatherType{ _s6.CurrentWeather }; + gClimateNext.Weather = WeatherType{ _s6.NextWeather }; + gClimateCurrent.Temperature = _s6.Temperature; + gClimateNext.Temperature = _s6.NextTemperature; + gClimateCurrent.WeatherEffect = WeatherEffectType{ _s6.CurrentWeatherEffect }; + gClimateNext.WeatherEffect = WeatherEffectType{ _s6.NextWeatherEffect }; + gClimateCurrent.WeatherGloom = _s6.CurrentWeatherGloom; + gClimateNext.WeatherGloom = _s6.NextWeatherGloom; + gClimateCurrent.Level = static_cast(_s6.CurrentWeatherLevel); + gClimateNext.Level = static_cast(_s6.NextWeatherLevel); // News items News::InitQueue(); for (size_t i = 0; i < Limits::MaxNewsItems; i++) { - const rct12_news_item* src = &_s6.news_items[i]; + const RCT12NewsItem* src = &_s6.NewsItems[i]; News::Item* dst = &gNewsItems[i]; if (src->Type < News::ItemTypeCount) { @@ -485,30 +485,31 @@ namespace RCT2 else { // In case where news item type is broken, consider all remaining news items invalid. - log_error("Invalid news type 0x%x for news item %d, ignoring remaining news items", src->Type, i); + LOG_ERROR("Invalid news type 0x%x for news item %d, ignoring remaining news items", src->Type, i); // Still need to set the correct type to properly terminate the queue dst->Type = News::ItemType::Null; break; } } - // pad_13CE730 + // Pad13CE730 // rct1_scenario_flags - gWidePathTileLoopPosition.x = _s6.wide_path_tile_loop_x; - gWidePathTileLoopPosition.y = _s6.wide_path_tile_loop_y; - // pad_13CE778 + gWidePathTileLoopPosition.x = _s6.WidePathTileLoopX; + gWidePathTileLoopPosition.y = _s6.WidePathTileLoopY; + // Pad13CE778 // Fix and set dynamic variables MapStripGhostFlagFromElements(); ConvertScenarioStringsToUTF8(); - determine_ride_entrance_and_exit_locations(); + DetermineRideEntranceAndExitLocations(); - park.Name = GetUserString(_s6.park_name); + park.Name = GetUserString(_s6.ParkName); FixLandOwnership(); + FixWater(); FixAyersRockScenario(); - research_determine_first_of_type(); + ResearchDetermineFirstOfType(); UpdateConsolidatedPatrolAreas(); CheatsReset(); @@ -527,17 +528,17 @@ namespace RCT2 void ConvertScenarioStringsToUTF8() { // Scenario details - gScenarioCompletedBy = rct2_to_utf8(gScenarioCompletedBy, RCT2LanguageId::EnglishUK); - gScenarioName = rct2_to_utf8(gScenarioName, RCT2LanguageId::EnglishUK); - gScenarioDetails = rct2_to_utf8(gScenarioDetails, RCT2LanguageId::EnglishUK); + gScenarioCompletedBy = RCT2StringToUTF8(gScenarioCompletedBy, RCT2LanguageId::EnglishUK); + gScenarioName = RCT2StringToUTF8(gScenarioName, RCT2LanguageId::EnglishUK); + gScenarioDetails = RCT2StringToUTF8(gScenarioDetails, RCT2LanguageId::EnglishUK); } void FixLandOwnership() const { - // Checking _s6.scenario_filename is generally more reliable as it survives renaming. + // Checking _s6.ScenarioFilename is generally more reliable as it survives renaming. // However, some WW/TT scenarios have this incorrectly set to "Six Flags Magic Mountain.SC6", // so for those cases (as well as for SFMM proper, we’ll have to check the filename. - if (String::Equals(_s6.scenario_filename, "Europe - European Cultural Festival.SC6")) + if (String::Equals(_s6.ScenarioFilename, "Europe - European Cultural Festival.SC6")) { // This scenario breaks pathfinding. Create passages between the worlds. (List is grouped by neighbouring // tiles.) @@ -552,7 +553,7 @@ namespace RCT2 OWNERSHIP_OWNED); // clang-format on } - else if (String::Equals(_s6.scenario_filename, "Six Flags Holland.SC6")) + else if (String::Equals(_s6.ScenarioFilename, "Six Flags Holland.SC6")) { // clang-format off FixLandOwnershipTilesWithOwnership( @@ -563,7 +564,7 @@ namespace RCT2 OWNERSHIP_AVAILABLE, true); // clang-format on } - else if (String::Equals(_s6.scenario_filename, "North America - Grand Canyon.SC6")) + else if (String::Equals(_s6.ScenarioFilename, "North America - Grand Canyon.SC6")) { // clang-format off FixLandOwnershipTilesWithOwnership( @@ -602,7 +603,7 @@ namespace RCT2 OWNERSHIP_AVAILABLE, true); // clang-format on } - else if (String::Equals(_s6.scenario_filename, "Great Wall of China Tourism Enhancement.SC6")) + else if (String::Equals(_s6.ScenarioFilename, "Great Wall of China Tourism Enhancement.SC6")) { FixLandOwnershipTilesWithOwnership( { @@ -641,9 +642,33 @@ namespace RCT2 } } + void FixWater() const + { + if (!_isScenario) + { + return; + } + if (String::Equals(_s6.ScenarioFilename, "Infernal Views.SC6", true) + || String::Equals(_s6.ScenarioFilename, "infernal views.sea", true)) + { + auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ 45, 62 }.ToCoordsXY()); + + surfaceElement->SetWaterHeight(96); + } + else if ( + String::Equals(_s6.ScenarioFilename, "Six Flags Holland.SC6") + || String::Equals(_s6.ScenarioFilename, "six flags holland.sea", true)) + + { + auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ 126, 73 }.ToCoordsXY()); + + surfaceElement->SetWaterHeight(96); + } + } + void FixAyersRockScenario() const { - if (!_isScenario || !String::Equals(_s6.scenario_filename, "Australasia - Ayers Rock.SC6")) + if (!_isScenario || !String::Equals(_s6.ScenarioFilename, "Australasia - Ayers Rock.SC6")) return; TileCoordsXY tilesToUncovered[] = { @@ -699,11 +724,11 @@ namespace RCT2 { for (uint8_t index = 0; index < Limits::MaxRidesInPark; index++) { - auto src = &_s6.rides[index]; - if (src->type != RIDE_TYPE_NULL) + auto src = &_s6.Rides[index]; + if (src->Type != RIDE_TYPE_NULL) { const auto rideId = RideId::FromUnderlying(index); - auto dst = GetOrAllocateRide(rideId); + auto dst = RideAllocateAtIndex(rideId); ImportRide(dst, src, rideId); } } @@ -725,14 +750,14 @@ namespace RCT2 { for (uint8_t index = 0; index < Limits::MaxRidesInPark; index++) { - auto src = &_s6.rides[index]; - if (src->type == RIDE_TYPE_NULL) + auto src = &_s6.Rides[index]; + if (src->Type == RIDE_TYPE_NULL) continue; - auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->subtype); - auto* rideEntry = get_ride_entry(subtype); + auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->Subtype); + auto* rideEntry = GetRideEntryByIndex(subtype); // If the ride is tracked, we don’t need to check the vehicle any more. - if (!GetRideTypeDescriptor(src->type).HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) + if (!GetRideTypeDescriptor(src->Type).HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) { _isFlatRide[index] = false; continue; @@ -740,7 +765,7 @@ namespace RCT2 // We have established the ride type is a flat ride, which means the vehicle now determines whether it is a // true flat ride (scenario 4) or a tracked ride with an invisibility hack (scenario 2). - ObjectEntryIndex originalRideType = src->type; + ObjectEntryIndex originalRideType = src->Type; if (rideEntry != nullptr) { originalRideType = rideEntry->GetFirstNonNullRideType(); @@ -762,54 +787,54 @@ namespace RCT2 *dst = {}; dst->id = rideIndex; - ObjectEntryIndex rideType = src->type; - auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->subtype); - if (RCT2RideTypeNeedsConversion(src->type)) + ObjectEntryIndex rideType = src->Type; + auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->Subtype); + if (RCT2RideTypeNeedsConversion(src->Type)) { - auto* rideEntry = get_ride_entry(subtype); + auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry != nullptr) { - rideType = RCT2RideTypeToOpenRCT2RideType(src->type, rideEntry); + rideType = RCT2RideTypeToOpenRCT2RideType(src->Type, *rideEntry); } } if (rideType >= RIDE_TYPE_COUNT) { - log_error("Invalid ride type for a ride in this save."); + LOG_ERROR("Invalid ride type for a ride in this save."); throw UnsupportedRideTypeException(rideType); } dst->type = rideType; dst->subtype = subtype; - // pad_002; - dst->mode = static_cast(src->mode); - dst->colour_scheme_type = src->colour_scheme_type; + // Pad002; + dst->mode = static_cast(src->Mode); + dst->colour_scheme_type = src->ColourSchemeType; for (uint8_t i = 0; i < Limits::MaxTrainsPerRide; i++) { - dst->vehicle_colours[i].Body = src->vehicle_colours[i].body_colour; - dst->vehicle_colours[i].Trim = src->vehicle_colours[i].trim_colour; + dst->vehicle_colours[i].Body = src->VehicleColours[i].BodyColour; + dst->vehicle_colours[i].Trim = src->VehicleColours[i].TrimColour; } - // pad_046; - dst->status = static_cast(src->status); + // Pad046; + dst->status = static_cast(src->Status); - dst->default_name_number = src->name_arguments_number; - if (is_user_string_id(src->name)) + dst->default_name_number = src->NameArgumentsNumber; + if (IsUserStringID(src->Name)) { - dst->custom_name = GetUserString(src->name); + dst->custom_name = GetUserString(src->Name); } else { - dst->default_name_number = src->name_arguments_number; + dst->default_name_number = src->NameArgumentsNumber; } - if (src->overall_view.IsNull()) + if (src->OverallView.IsNull()) { dst->overall_view.SetNull(); } else { - auto tileLoc = TileCoordsXY(src->overall_view.x, src->overall_view.y); + auto tileLoc = TileCoordsXY(src->OverallView.x, src->OverallView.y); dst->overall_view = tileLoc.ToCoordsXY(); } @@ -818,39 +843,39 @@ namespace RCT2 StationIndex stationIndex = StationIndex::FromUnderlying(i); auto& destStation = dst->GetStation(stationIndex); - if (src->station_starts[i].IsNull()) + if (src->StationStarts[i].IsNull()) { destStation.Start.SetNull(); } else { - auto tileStartLoc = TileCoordsXY(src->station_starts[i].x, src->station_starts[i].y); + auto tileStartLoc = TileCoordsXY(src->StationStarts[i].x, src->StationStarts[i].y); destStation.Start = tileStartLoc.ToCoordsXY(); } - destStation.Height = src->station_heights[i]; - destStation.Length = src->station_length[i]; - destStation.Depart = src->station_depart[i]; - destStation.TrainAtStation = src->train_at_station[i]; + destStation.Height = src->StationHeights[i]; + destStation.Length = src->StationLength[i]; + destStation.Depart = src->StationDepart[i]; + destStation.TrainAtStation = src->TrainAtStation[i]; // Direction is fixed later. - if (src->entrances[i].IsNull()) + if (src->Entrances[i].IsNull()) destStation.Entrance.SetNull(); else - destStation.Entrance = { src->entrances[i].x, src->entrances[i].y, src->station_heights[i], 0 }; + destStation.Entrance = { src->Entrances[i].x, src->Entrances[i].y, src->StationHeights[i], 0 }; - if (src->exits[i].IsNull()) + if (src->Exits[i].IsNull()) destStation.Exit.SetNull(); else - destStation.Exit = { src->exits[i].x, src->exits[i].y, src->station_heights[i], 0 }; + destStation.Exit = { src->Exits[i].x, src->Exits[i].y, src->StationHeights[i], 0 }; - destStation.LastPeepInQueue = EntityId::FromUnderlying(src->last_peep_in_queue[i]); + destStation.LastPeepInQueue = EntityId::FromUnderlying(src->LastPeepInQueue[i]); - destStation.SegmentLength = src->length[i]; - destStation.SegmentTime = src->time[i]; + destStation.SegmentLength = src->Length[i]; + destStation.SegmentTime = src->Time[i]; - destStation.QueueTime = src->queue_time[i]; + destStation.QueueTime = src->QueueTime[i]; - destStation.QueueLength = src->queue_length[i]; + destStation.QueueLength = src->QueueLength[i]; } // All other values take 0 as their default. Since they're already memset to that, no need to do it again. for (int32_t i = Limits::MaxStationsPerRide; i < OpenRCT2::Limits::MaxStationsPerRide; i++) @@ -867,167 +892,166 @@ namespace RCT2 for (int32_t i = 0; i < Limits::MaxTrainsPerRide; i++) { - dst->vehicles[i] = EntityId::FromUnderlying(src->vehicles[i]); + dst->vehicles[i] = EntityId::FromUnderlying(src->Vehicles[i]); } for (int32_t i = Limits::MaxTrainsPerRide - 1; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::GetNull(); } - dst->depart_flags = src->depart_flags; + dst->depart_flags = src->DepartFlags; - dst->num_stations = src->num_stations; + dst->num_stations = src->NumStations; dst->NumTrains = src->NumTrains; - dst->num_cars_per_train = src->num_cars_per_train; + dst->num_cars_per_train = src->NumCarsPerTrain; dst->ProposedNumTrains = src->ProposedNumTrains; - dst->proposed_num_cars_per_train = src->proposed_num_cars_per_train; - dst->max_trains = src->max_trains; + dst->proposed_num_cars_per_train = src->ProposedNumCarsPerTrain; + dst->max_trains = src->MaxTrains; dst->MinCarsPerTrain = src->GetMinCarsPerTrain(); dst->MaxCarsPerTrain = src->GetMaxCarsPerTrain(); - dst->min_waiting_time = src->min_waiting_time; - dst->max_waiting_time = src->max_waiting_time; + dst->min_waiting_time = src->MinWaitingTime; + dst->max_waiting_time = src->MaxWaitingTime; // Includes time_limit, NumLaps, launch_speed, speed, rotations - dst->operation_option = src->operation_option; + dst->operation_option = src->OperationOption; - dst->boat_hire_return_direction = src->boat_hire_return_direction; - dst->boat_hire_return_position = { src->boat_hire_return_position.x, src->boat_hire_return_position.y }; + dst->boat_hire_return_direction = src->BoatHireReturnDirection; + dst->boat_hire_return_position = { src->BoatHireReturnPosition.x, src->BoatHireReturnPosition.y }; - dst->special_track_elements = src->special_track_elements; - // pad_0D6[2]; + dst->special_track_elements = src->SpecialTrackElements; + // Pad0D6[2]; - dst->max_speed = src->max_speed; - dst->average_speed = src->average_speed; - dst->current_test_segment = src->current_test_segment; - dst->average_speed_test_timeout = src->average_speed_test_timeout; - // pad_0E2[0x2]; + dst->max_speed = src->MaxSpeed; + dst->average_speed = src->AverageSpeed; + dst->current_test_segment = src->CurrentTestSegment; + dst->average_speed_test_timeout = src->AverageSpeedTestTimeout; + // Pad0E2[0x2]; - dst->max_positive_vertical_g = src->max_positive_vertical_g; - dst->max_negative_vertical_g = src->max_negative_vertical_g; - dst->max_lateral_g = src->max_lateral_g; - dst->previous_vertical_g = src->previous_vertical_g; - dst->previous_lateral_g = src->previous_lateral_g; - // pad_106[0x2]; - dst->testing_flags = src->testing_flags; + dst->max_positive_vertical_g = src->MaxPositiveVerticalG; + dst->max_negative_vertical_g = src->MaxNegativeVerticalG; + dst->max_lateral_g = src->MaxLateralG; + dst->previous_vertical_g = src->PreviousVerticalG; + dst->previous_lateral_g = src->PreviousLateralG; + // Pad106[0x2]; + dst->testing_flags = src->TestingFlags; - if (src->cur_test_track_location.IsNull()) + if (src->CurTestTrackLocation.IsNull()) { dst->CurTestTrackLocation.SetNull(); } else { - dst->CurTestTrackLocation = { src->cur_test_track_location.x, src->cur_test_track_location.y, - src->cur_test_track_z }; + dst->CurTestTrackLocation = { src->CurTestTrackLocation.x, src->CurTestTrackLocation.y, src->CurTestTrackZ }; } - dst->turn_count_default = src->turn_count_default; - dst->turn_count_banked = src->turn_count_banked; - dst->turn_count_sloped = src->turn_count_sloped; + 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; + dst->holes = src->Inversions & 0x1F; else - dst->inversions = src->inversions & 0x1F; - dst->sheltered_eighths = src->inversions >> 5; - dst->drops = src->drops; - dst->start_drop_height = src->start_drop_height; - dst->highest_drop_height = src->highest_drop_height; - dst->sheltered_length = src->sheltered_length; - dst->var_11C = src->var_11C; - dst->num_sheltered_sections = src->num_sheltered_sections; + dst->inversions = src->Inversions & 0x1F; + dst->sheltered_eighths = src->Inversions >> 5; + dst->drops = src->Drops; + dst->start_drop_height = src->StartDropHeight; + dst->highest_drop_height = src->HighestDropHeight; + dst->sheltered_length = src->ShelteredLength; + dst->var_11C = src->Var11C; + dst->num_sheltered_sections = src->NumShelteredSections; - dst->cur_num_customers = src->cur_num_customers; - dst->num_customers_timeout = src->num_customers_timeout; + dst->cur_num_customers = src->CurNumCustomers; + dst->num_customers_timeout = src->NumCustomersTimeout; for (uint8_t i = 0; i < Limits::CustomerHistorySize; i++) { - dst->num_customers[i] = src->num_customers[i]; + dst->num_customers[i] = src->NumCustomers[i]; } - dst->price[0] = src->price; + dst->price[0] = src->Price; for (uint8_t i = 0; i < 2; i++) { - dst->ChairliftBullwheelLocation[i] = { src->chairlift_bullwheel_location[i].x, - src->chairlift_bullwheel_location[i].y, src->chairlift_bullwheel_z[i] }; + dst->ChairliftBullwheelLocation[i] = { src->ChairliftBullwheelLocation[i].x, + src->ChairliftBullwheelLocation[i].y, src->ChairliftBullwheelZ[i] }; } - dst->ratings = src->ratings; - dst->value = src->value; + dst->ratings = src->Ratings; + dst->value = ToMoney64(src->Value); - dst->chairlift_bullwheel_rotation = src->chairlift_bullwheel_rotation; + dst->chairlift_bullwheel_rotation = src->ChairliftBullwheelRotation; - dst->satisfaction = src->satisfaction; - dst->satisfaction_time_out = src->satisfaction_time_out; - dst->satisfaction_next = src->satisfaction_next; + dst->satisfaction = src->Satisfaction; + dst->satisfaction_time_out = src->SatisfactionTimeOut; + dst->satisfaction_next = src->SatisfactionNext; - dst->window_invalidate_flags = src->window_invalidate_flags; - // pad_14E[0x02]; + dst->window_invalidate_flags = src->WindowInvalidateFlags; + // Pad14E[0x02]; - dst->total_customers = src->total_customers; - dst->total_profit = ToMoney64(src->total_profit); - dst->popularity = src->popularity; - dst->popularity_time_out = src->popularity_time_out; - dst->popularity_next = src->popularity_next; + dst->total_customers = src->TotalCustomers; + dst->total_profit = ToMoney64(src->TotalProfit); + dst->popularity = src->Popularity; + dst->popularity_time_out = src->PopularityTimeOut; + dst->popularity_next = src->PopularityNext; ImportNumRiders(dst, rideIndex); - dst->music_tune_id = src->music_tune_id; - dst->slide_in_use = src->slide_in_use; + dst->music_tune_id = src->MusicTuneId; + dst->slide_in_use = src->SlideInUse; // Includes maze_tiles - dst->slide_peep = EntityId::FromUnderlying(src->slide_peep); - // pad_160[0xE]; - dst->slide_peep_t_shirt_colour = src->slide_peep_t_shirt_colour; - // pad_16F[0x7]; - dst->spiral_slide_progress = src->spiral_slide_progress; - // pad_177[0x9]; - dst->build_date = static_cast(src->build_date); - dst->upkeep_cost = src->upkeep_cost; - dst->race_winner = EntityId::FromUnderlying(src->race_winner); - // pad_186[0x02]; - dst->music_position = src->music_position; + dst->slide_peep = EntityId::FromUnderlying(src->SlidePeep); + // Pad160[0xE]; + dst->slide_peep_t_shirt_colour = src->SlidePeepTShirtColour; + // Pad16F[0x7]; + dst->spiral_slide_progress = src->SpiralSlideProgress; + // Pad177[0x9]; + dst->build_date = static_cast(src->BuildDate); + dst->upkeep_cost = ToMoney64(src->UpkeepCost); + dst->race_winner = EntityId::FromUnderlying(src->RaceWinner); + // Pad186[0x02]; + dst->music_position = src->MusicPosition; - dst->breakdown_reason_pending = src->breakdown_reason_pending; - dst->mechanic_status = src->mechanic_status; - dst->mechanic = EntityId::FromUnderlying(src->mechanic); - dst->inspection_station = StationIndex::FromUnderlying(src->inspection_station); - dst->broken_vehicle = src->broken_vehicle; - dst->broken_car = src->broken_car; - dst->breakdown_reason = src->breakdown_reason; + dst->breakdown_reason_pending = src->BreakdownReasonPending; + dst->mechanic_status = src->MechanicStatus; + dst->mechanic = EntityId::FromUnderlying(src->Mechanic); + dst->inspection_station = StationIndex::FromUnderlying(src->InspectionStation); + dst->broken_vehicle = src->BrokenVehicle; + dst->broken_car = src->BrokenCar; + dst->breakdown_reason = src->BreakdownReason; - dst->price[1] = src->price_secondary; + dst->price[1] = src->PriceSecondary; - dst->reliability = src->reliability; - dst->unreliability_factor = src->unreliability_factor; - dst->downtime = src->downtime; - dst->inspection_interval = src->inspection_interval; - dst->last_inspection = src->last_inspection; + dst->reliability = src->Reliability; + dst->unreliability_factor = src->UnreliabilityFactor; + dst->downtime = src->Downtime; + dst->inspection_interval = src->InspectionInterval; + dst->last_inspection = src->LastInspection; for (uint8_t i = 0; i < Limits::DowntimeHistorySize; i++) { - dst->downtime_history[i] = src->downtime_history[i]; + dst->downtime_history[i] = src->DowntimeHistory[i]; } - dst->no_primary_items_sold = src->no_primary_items_sold; - dst->no_secondary_items_sold = src->no_secondary_items_sold; + dst->no_primary_items_sold = src->NoPrimaryItemsSold; + dst->no_secondary_items_sold = src->NoSecondaryItemsSold; - dst->breakdown_sound_modifier = src->breakdown_sound_modifier; - dst->not_fixed_timeout = src->not_fixed_timeout; - dst->last_crash_type = src->last_crash_type; - dst->connected_message_throttle = src->connected_message_throttle; + dst->breakdown_sound_modifier = src->BreakdownSoundModifier; + dst->not_fixed_timeout = src->NotFixedTimeout; + dst->last_crash_type = src->LastCrashType; + dst->connected_message_throttle = src->ConnectedMessageThrottle; - dst->income_per_hour = ToMoney64(src->income_per_hour); - dst->profit = ToMoney64(src->profit); + dst->income_per_hour = ToMoney64(src->IncomePerHour); + dst->profit = ToMoney64(src->Profit); for (uint8_t i = 0; i < Limits::NumColourSchemes; i++) { - dst->track_colour[i].main = src->track_colour_main[i]; - dst->track_colour[i].additional = src->track_colour_additional[i]; - dst->track_colour[i].supports = src->track_colour_supports[i]; + dst->track_colour[i].main = src->TrackColourMain[i]; + dst->track_colour[i].additional = src->TrackColourAdditional[i]; + dst->track_colour[i].supports = src->TrackColourSupports[i]; } // This stall was not colourable in RCT2. if (dst->type == RIDE_TYPE_FOOD_STALL) { - auto object = object_entry_get_object(ObjectType::Ride, dst->subtype); + auto object = ObjectEntryGetObject(ObjectType::Ride, dst->subtype); if (object != nullptr && object->GetIdentifier() == "rct2.ride.icecr1") { dst->track_colour[0].main = COLOUR_LIGHT_BLUE; @@ -1037,7 +1061,7 @@ namespace RCT2 auto musicStyle = OBJECT_ENTRY_INDEX_NULL; if (GetRideTypeDescriptor(dst->type).HasFlag(RIDE_TYPE_FLAG_ALLOW_MUSIC)) { - musicStyle = src->music; + musicStyle = src->Music; } dst->music = musicStyle; @@ -1045,64 +1069,67 @@ namespace RCT2 auto entranceStyle = OBJECT_ENTRY_INDEX_NULL; if (!_isSV7 && GetRideTypeDescriptor(dst->type).HasFlag(RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT)) { - entranceStyle = src->entrance_style; + entranceStyle = src->EntranceStyle; } dst->entrance_style = entranceStyle; - dst->vehicle_change_timeout = src->vehicle_change_timeout; - dst->num_block_brakes = src->num_block_brakes; - dst->lift_hill_speed = src->lift_hill_speed; - dst->guests_favourite = src->guests_favourite; - dst->lifecycle_flags = src->lifecycle_flags; + dst->vehicle_change_timeout = src->VehicleChangeTimeout; + dst->num_block_brakes = src->NumBlockBrakes; + dst->lift_hill_speed = src->LiftHillSpeed; + dst->guests_favourite = src->GuestsFavourite; + dst->lifecycle_flags = src->LifecycleFlags; for (uint8_t i = 0; i < Limits::MaxTrainsPerRide; i++) { - dst->vehicle_colours[i].Tertiary = src->vehicle_colours_extended[i]; + dst->vehicle_colours[i].Tertiary = src->VehicleColoursExtended[i]; } - dst->total_air_time = src->total_air_time; - dst->current_test_station = StationIndex::FromUnderlying(src->current_test_station); - dst->num_circuits = src->num_circuits; - dst->CableLiftLoc = { src->cable_lift_x, src->cable_lift_y, src->cable_lift_z * COORDS_Z_STEP }; - // pad_1FD; - dst->cable_lift = EntityId::FromUnderlying(src->cable_lift); + dst->total_air_time = 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 }; + // Pad1FD; + dst->cable_lift = EntityId::FromUnderlying(src->CableLift); - // pad_208[0x58]; + // Pad208[0x58]; } void ImportRideRatingsCalcData() { - const auto& src = _s6.ride_ratings_calc_data; - auto& dst = gRideRatingUpdateState; + const auto& src = _s6.RideRatingsCalcData; + // S6 has only one state, ensure we reset all states before reading the first one. + RideRatingResetUpdateStates(); + auto& rideRatingStates = RideRatingGetUpdateStates(); + auto& dst = rideRatingStates[0]; dst = {}; - dst.Proximity = { src.proximity_x, src.proximity_y, src.proximity_z }; - dst.ProximityStart = { src.proximity_start_x, src.proximity_start_y, src.proximity_start_z }; - dst.CurrentRide = RCT12RideIdToOpenRCT2RideId(src.current_ride); - dst.State = src.state; - if (src.current_ride < Limits::MaxRidesInPark && _s6.rides[src.current_ride].type < std::size(RideTypeDescriptors)) + dst.Proximity = { src.ProximityX, src.ProximityY, src.ProximityZ }; + dst.ProximityStart = { src.ProximityStartX, src.ProximityStartY, src.ProximityStartZ }; + dst.CurrentRide = RCT12RideIdToOpenRCT2RideId(src.CurrentRide); + dst.State = src.State; + if (src.CurrentRide < Limits::MaxRidesInPark && _s6.Rides[src.CurrentRide].Type < std::size(RideTypeDescriptors)) dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2( - src.proximity_track_type, _s6.rides[src.current_ride].type, IsFlatRide(src.current_ride)); + src.ProximityTrackType, _s6.Rides[src.CurrentRide].Type, IsFlatRide(src.CurrentRide)); else dst.ProximityTrackType = 0xFF; - dst.ProximityBaseHeight = src.proximity_base_height; - dst.ProximityTotal = src.proximity_total; - for (size_t i = 0; i < std::size(src.proximity_scores); i++) + dst.ProximityBaseHeight = src.ProximityBaseHeight; + dst.ProximityTotal = src.ProximityTotal; + for (size_t i = 0; i < std::size(src.ProximityScores); i++) { - dst.ProximityScores[i] = src.proximity_scores[i]; + dst.ProximityScores[i] = src.ProximityScores[i]; } - dst.AmountOfBrakes = src.num_brakes; - dst.AmountOfReversers = src.num_reversers; - dst.StationFlags = src.station_flags; + dst.AmountOfBrakes = src.NumBrakes; + dst.AmountOfReversers = src.NumReversers; + dst.StationFlags = src.StationFlags; } void ImportRideMeasurements() { - for (const auto& src : _s6.ride_measurements) + for (const auto& src : _s6.RideMeasurements) { - if (src.ride_index != RCT12_RIDE_ID_NULL) + if (src.RideIndex != RCT12_RIDE_ID_NULL) { - const auto rideId = RideId::FromUnderlying(src.ride_index); - auto ride = get_ride(rideId); + const auto rideId = RideId::FromUnderlying(src.RideIndex); + auto ride = GetRide(rideId); if (ride != nullptr) { ride->measurement = std::make_unique(); @@ -1114,25 +1141,25 @@ namespace RCT2 void ImportRideMeasurement(RideMeasurement& dst, const RCT12RideMeasurement& src) { - dst.flags = src.flags; - dst.last_use_tick = src.last_use_tick; - dst.num_items = src.num_items; - dst.current_item = src.current_item; - dst.vehicle_index = src.vehicle_index; - dst.current_station = StationIndex::FromUnderlying(src.current_station); - for (size_t i = 0; i < std::size(src.velocity); i++) + dst.flags = src.Flags; + dst.last_use_tick = src.LastUseTick; + dst.num_items = src.NumItems; + dst.current_item = src.CurrentItem; + dst.vehicle_index = src.VehicleIndex; + dst.current_station = StationIndex::FromUnderlying(src.CurrentStation); + for (size_t i = 0; i < std::size(src.Velocity); i++) { - dst.velocity[i] = src.velocity[i]; - dst.altitude[i] = src.altitude[i]; - dst.vertical[i] = src.vertical[i]; - dst.lateral[i] = src.lateral[i]; + dst.velocity[i] = src.Velocity[i]; + dst.altitude[i] = src.Altitude[i]; + dst.vertical[i] = src.Vertical[i]; + dst.lateral[i] = src.Lateral[i]; } } void ImportResearchList() { bool invented = true; - for (const auto& researchItem : _s6.research_items) + for (const auto& researchItem : _s6.ResearchItems) { if (researchItem.IsInventedEndMarker()) { @@ -1157,31 +1184,31 @@ namespace RCT2 *dst = {}; dst->id = id; - dst->type = RCTEntryIndexToOpenRCT2EntryIndex(src->type); - dst->flags = src->flags; + dst->type = RCTEntryIndexToOpenRCT2EntryIndex(src->Type); + dst->flags = src->Flags; - if (!(src->flags & BANNER_FLAG_LINKED_TO_RIDE) && is_user_string_id(src->string_idx)) + if (!(src->Flags & BANNER_FLAG_LINKED_TO_RIDE) && IsUserStringID(src->StringID)) { - dst->text = GetUserString(src->string_idx); + dst->text = GetUserString(src->StringID); } - if (src->flags & BANNER_FLAG_LINKED_TO_RIDE) + if (src->Flags & BANNER_FLAG_LINKED_TO_RIDE) { - dst->ride_index = RCT12RideIdToOpenRCT2RideId(src->ride_index); + dst->ride_index = RCT12RideIdToOpenRCT2RideId(src->RideIndex); } else { - dst->colour = src->colour; + dst->colour = src->Colour; } - dst->text_colour = src->text_colour; + dst->text_colour = src->TextColour; dst->position.x = src->x; dst->position.y = src->y; } void Initialise() { - OpenRCT2::GetContext()->GetGameState()->InitAll({ _s6.map_size, _s6.map_size }); + OpenRCT2::GetContext()->GetGameState()->InitAll({ _s6.MapSize, _s6.MapSize }); } /** @@ -1194,38 +1221,38 @@ namespace RCT2 // and the corrected filename. // In this park, peep_spawns[0] is incorrect, and peep_spawns[1] is correct. - if (String::Equals(_s6.scenario_filename, "WW South America - Rio Carnival.SC6") - || String::Equals(_s6.scenario_filename, "South America - Rio Carnival.SC6")) + if (String::Equals(_s6.ScenarioFilename, "WW South America - Rio Carnival.SC6") + || String::Equals(_s6.ScenarioFilename, "South America - Rio Carnival.SC6")) { - _s6.peep_spawns[0] = { 2160, 3167, 6, 1 }; - _s6.peep_spawns[1].x = RCT12_PEEP_SPAWN_UNDEFINED; + _s6.PeepSpawns[0] = { 2160, 3167, 6, 1 }; + _s6.PeepSpawns[1].x = RCT12_PEEP_SPAWN_UNDEFINED; } // In this park, peep_spawns[0] is correct. Just clear the other. else if ( - String::Equals(_s6.scenario_filename, "Great Wall of China Tourism Enhancement.SC6") - || String::Equals(_s6.scenario_filename, "Asia - Great Wall of China Tourism Enhancement.SC6")) + String::Equals(_s6.ScenarioFilename, "Great Wall of China Tourism Enhancement.SC6") + || String::Equals(_s6.ScenarioFilename, "Asia - Great Wall of China Tourism Enhancement.SC6")) { - _s6.peep_spawns[1].x = RCT12_PEEP_SPAWN_UNDEFINED; + _s6.PeepSpawns[1].x = RCT12_PEEP_SPAWN_UNDEFINED; } // Amity Airfield has peeps entering from the corner of the tile, instead of the middle. - else if (String::Equals(_s6.scenario_filename, "Amity Airfield.SC6")) + else if (String::Equals(_s6.ScenarioFilename, "Amity Airfield.SC6")) { - _s6.peep_spawns[0].y = 1296; + _s6.PeepSpawns[0].y = 1296; } // #9926: Africa - Oasis has peeps spawning on the edge underground near the entrance - else if (String::Equals(_s6.scenario_filename, "Africa - Oasis.SC6")) + else if (String::Equals(_s6.ScenarioFilename, "Africa - Oasis.SC6")) { - _s6.peep_spawns[0].y = 2128; - _s6.peep_spawns[0].z = 7; + _s6.PeepSpawns[0].y = 2128; + _s6.PeepSpawns[0].z = 7; } gPeepSpawns.clear(); for (size_t i = 0; i < Limits::MaxPeepSpawns; i++) { - if (_s6.peep_spawns[i].x != RCT12_PEEP_SPAWN_UNDEFINED) + if (_s6.PeepSpawns[i].x != RCT12_PEEP_SPAWN_UNDEFINED) { - PeepSpawn spawn = { _s6.peep_spawns[i].x, _s6.peep_spawns[i].y, _s6.peep_spawns[i].z * 16, - _s6.peep_spawns[i].direction }; + PeepSpawn spawn = { _s6.PeepSpawns[i].x, _s6.PeepSpawns[i].y, _s6.PeepSpawns[i].z * 16, + _s6.PeepSpawns[i].direction }; gPeepSpawns.push_back(spawn); } } @@ -1237,12 +1264,12 @@ namespace RCT2 uint16_t numRiders = 0; for (int32_t i = 0; i < GetMaxEntities(); i++) { - const auto& sprite = _s6.sprites[i]; - if (sprite.unknown.sprite_identifier == RCT12SpriteIdentifier::Peep) + const auto& entity = _s6.Entities[i]; + if (entity.Unknown.EntityIdentifier == RCT12EntityIdentifier::Peep) { - if (sprite.peep.current_ride == static_cast(rideIndex.ToUnderlying()) - && (static_cast(sprite.peep.state) == PeepState::OnRide - || static_cast(sprite.peep.state) == PeepState::EnteringRide)) + if (entity.Peep.CurrentRide == static_cast(rideIndex.ToUnderlying()) + && (static_cast(entity.Peep.State) == PeepState::OnRide + || static_cast(entity.Peep.State) == PeepState::EnteringRide)) { numRiders++; } @@ -1255,12 +1282,12 @@ namespace RCT2 { // Build tile pointer cache (needed to get the first element at a certain location) auto tilePointerIndex = TilePointerIndex( - Limits::MaxMapSize, _s6.tile_elements, std::size(_s6.tile_elements)); + Limits::MaxMapSize, _s6.TileElements, std::size(_s6.TileElements)); std::vector tileElements; bool nextElementInvisible = false; bool restOfTileInvisible = false; - const auto maxSize = std::min(Limits::MaxMapSize, _s6.map_size); + const auto maxSize = std::min(Limits::MaxMapSize, _s6.MapSize); for (TileCoordsXY coords = { 0, 0 }; coords.y < MAXIMUM_MAP_SIZE_TECHNICAL; coords.y++) { for (coords.x = 0; coords.x < MAXIMUM_MAP_SIZE_TECHNICAL; coords.x++) @@ -1276,7 +1303,7 @@ namespace RCT2 { do { - if (srcElement->base_height == RCT12::Limits::MaxElementHeight) + if (srcElement->BaseHeight == RCT12::Limits::MaxElementHeight) { continue; } @@ -1329,8 +1356,8 @@ namespace RCT2 const auto rct12Type = src->GetType(); dst->ClearAs(ToOpenRCT2TileElementType(rct12Type)); dst->SetDirection(src->GetDirection()); - dst->SetBaseZ(src->base_height * COORDS_Z_STEP); - dst->SetClearanceZ(src->clearance_height * COORDS_Z_STEP); + dst->SetBaseZ(src->BaseHeight * COORDS_Z_STEP); + dst->SetClearanceZ(src->ClearanceHeight * COORDS_Z_STEP); // All saved in "flags" dst->SetOccupiedQuadrants(src->GetOccupiedQuadrants()); @@ -1401,7 +1428,7 @@ namespace RCT2 auto dst2 = dst->AsTrack(); auto src2 = src->AsTrack(); - auto rideType = _s6.rides[src2->GetRideIndex()].type; + auto rideType = _s6.Rides[src2->GetRideIndex()].Type; track_type_t trackType = static_cast(src2->GetTrackType()); dst2->SetTrackType(RCT2TrackTypeToOpenRCT2(trackType, rideType, IsFlatRide(src2->GetRideIndex()))); @@ -1414,7 +1441,7 @@ namespace RCT2 dst2->SetInverted(src2->IsInverted()); dst2->SetStationIndex(StationIndex::FromUnderlying(src2->GetStationIndex())); dst2->SetHasGreenLight(src2->HasGreenLight()); - dst2->SetBlockBrakeClosed(src2->BlockBrakeClosed()); + dst2->SetBrakeClosed(src2->BlockBrakeClosed()); dst2->SetIsIndestructible(src2->IsIndestructible()); // Skipping IsHighlighted() @@ -1428,7 +1455,8 @@ namespace RCT2 } // This has to be done last, since the maze entry shares fields with the colour and sequence fields. - if (rideType == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(rideType); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { dst2->SetMazeEntry(src2->GetMazeEntry()); } @@ -1515,9 +1543,9 @@ namespace RCT2 if (entry != nullptr && entry->scrolling_mode != SCROLLING_MODE_NONE) { auto bannerIndex = src2->GetBannerIndex(); - if (bannerIndex < std::size(_s6.banners)) + if (bannerIndex < std::size(_s6.Banners)) { - auto srcBanner = &_s6.banners[bannerIndex]; + auto srcBanner = &_s6.Banners[bannerIndex]; auto dstBanner = GetOrCreateBanner(BannerIndex::FromUnderlying(bannerIndex)); if (dstBanner == nullptr) { @@ -1548,9 +1576,9 @@ namespace RCT2 if (entry != nullptr && entry->scrolling_mode != SCROLLING_MODE_NONE) { auto bannerIndex = src2->GetBannerIndex(); - if (bannerIndex < std::size(_s6.banners)) + if (bannerIndex < std::size(_s6.Banners)) { - auto srcBanner = &_s6.banners[bannerIndex]; + auto srcBanner = &_s6.Banners[bannerIndex]; auto dstBanner = GetOrCreateBanner(BannerIndex::FromUnderlying(bannerIndex)); if (dstBanner == nullptr) { @@ -1574,9 +1602,9 @@ namespace RCT2 dst2->SetAllowedEdges(src2->GetAllowedEdges()); auto bannerIndex = src2->GetIndex(); - if (bannerIndex < std::size(_s6.banners)) + if (bannerIndex < std::size(_s6.Banners)) { - auto srcBanner = &_s6.banners[bannerIndex]; + auto srcBanner = &_s6.Banners[bannerIndex]; auto dstBanner = GetOrCreateBanner(BannerIndex::FromUnderlying(bannerIndex)); if (dstBanner == nullptr) { @@ -1603,22 +1631,22 @@ namespace RCT2 { for (size_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) { - if (_s6.campaign_weeks_left[i] & CAMPAIGN_ACTIVE_FLAG) + if (_s6.CampaignWeeksLeft[i] & CAMPAIGN_ACTIVE_FLAG) { MarketingCampaign campaign{}; campaign.Type = static_cast(i); - campaign.WeeksLeft = _s6.campaign_weeks_left[i] & ~(CAMPAIGN_ACTIVE_FLAG | CAMPAIGN_FIRST_WEEK_FLAG); - if ((_s6.campaign_weeks_left[i] & CAMPAIGN_FIRST_WEEK_FLAG) != 0) + campaign.WeeksLeft = _s6.CampaignWeeksLeft[i] & ~(CAMPAIGN_ACTIVE_FLAG | CAMPAIGN_FIRST_WEEK_FLAG); + if ((_s6.CampaignWeeksLeft[i] & CAMPAIGN_FIRST_WEEK_FLAG) != 0) { campaign.Flags |= MarketingCampaignFlags::FIRST_WEEK; } if (campaign.Type == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign.Type == ADVERTISING_CAMPAIGN_RIDE) { - campaign.RideId = RCT12RideIdToOpenRCT2RideId(_s6.campaign_ride_index[i]); + campaign.RideId = RCT12RideIdToOpenRCT2RideId(_s6.CampaignRideIndex[i]); } else if (campaign.Type == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) { - campaign.ShopItemType = ShopItem(_s6.campaign_ride_index[i]); + campaign.ShopItemType = ShopItem(_s6.CampaignRideIndex[i]); } gMarketingCampaigns.push_back(campaign); } @@ -1629,14 +1657,14 @@ namespace RCT2 { // First check staff mode as vanilla did not clean up patrol areas when switching from patrol to walk // without doing this we could accidentally add a patrol when it didn't exist. - if (_s6.staff_modes[staffId] != StaffMode::Patrol) + if (_s6.StaffModes[staffId] != StaffMode::Patrol) { return; } int32_t peepOffset = staffId * Limits::PatrolAreaSize; for (int32_t i = 0; i < Limits::PatrolAreaSize; i++) { - if (_s6.patrol_areas[peepOffset + i] == 0) + if (_s6.PatrolAreas[peepOffset + i] == 0) { // No patrol for this area continue; @@ -1645,7 +1673,7 @@ namespace RCT2 // Loop over the bits of the uint32_t for (int32_t j = 0; j < 32; j++) { - int8_t bit = (_s6.patrol_areas[peepOffset + i] >> j) & 1; + int8_t bit = (_s6.PatrolAreas[peepOffset + i] >> j) & 1; if (bit == 0) { // No patrol for this area @@ -1667,95 +1695,97 @@ namespace RCT2 { for (int32_t i = 0; i < GetMaxEntities(); i++) { - ImportEntity(_s6.sprites[i].unknown); + ImportEntity(_s6.Entities[i].Unknown); } } uint16_t GetMaxEntities() { - return (_s6.header.classic_flag == 0xf) ? Limits::MaxEntitiesRCTCExtended : Limits::MaxEntities; + return (_s6.Header.ClassicFlag == 0xf) ? Limits::MaxEntitiesRCTCExtended : Limits::MaxEntities; } - template void ImportEntity(const RCT12SpriteBase& src); + template void ImportEntity(const RCT12EntityBase& src); void ImportEntityPeep(::Peep* dst, const Peep* src) { - const auto isNullLocation = [](const rct12_xyzd8& pos) { + const auto isNullLocation = [](const RCT12xyzd8& pos) { return pos.x == 0xFF && pos.y == 0xFF && pos.z == 0xFF && pos.direction == INVALID_DIRECTION; }; ImportEntityCommonProperties(static_cast(dst), src); - if (is_user_string_id(src->name_string_idx)) + if (IsUserStringID(src->NameStringIdx)) { - dst->SetName(GetUserString(src->name_string_idx)); + dst->SetName(GetUserString(src->NameStringIdx)); } - dst->NextLoc = { src->next_x, src->next_y, src->next_z * COORDS_Z_STEP }; - dst->NextFlags = src->next_flags; - dst->State = static_cast(src->state); - dst->SubState = src->sub_state; - dst->SpriteType = static_cast(src->sprite_type); - dst->TshirtColour = src->tshirt_colour; - dst->TrousersColour = src->trousers_colour; - dst->DestinationX = src->destination_x; - dst->DestinationY = src->destination_y; - dst->DestinationTolerance = src->destination_tolerance; - dst->Var37 = src->var_37; - dst->Energy = src->energy; - dst->EnergyTarget = src->energy_target; - dst->Mass = src->mass; - dst->WindowInvalidateFlags = src->window_invalidate_flags; - dst->CurrentRide = RCT12RideIdToOpenRCT2RideId(src->current_ride); - dst->CurrentRideStation = StationIndex::FromUnderlying(src->current_ride_station); - dst->CurrentTrain = src->current_train; - dst->TimeToSitdown = src->time_to_sitdown; - dst->SpecialSprite = src->special_sprite; - dst->ActionSpriteType = static_cast(src->action_sprite_type); - dst->NextActionSpriteType = static_cast(src->next_action_sprite_type); - dst->ActionSpriteImageOffset = src->action_sprite_image_offset; - dst->Action = static_cast(src->action); - dst->ActionFrame = src->action_frame; - dst->StepProgress = src->step_progress; - dst->PeepDirection = src->direction; - dst->InteractionRideIndex = RCT12RideIdToOpenRCT2RideId(src->interaction_ride_index); - dst->Id = src->id; - dst->PathCheckOptimisation = src->path_check_optimisation; - dst->PeepFlags = src->peep_flags; - if (isNullLocation(src->pathfind_goal)) + dst->NextLoc = { src->NextX, src->NextY, src->NextZ * COORDS_Z_STEP }; + dst->NextFlags = src->NextFlags; + dst->State = static_cast(src->State); + dst->SubState = src->SubState; + dst->SpriteType = static_cast(src->SpriteType); + dst->TshirtColour = src->TshirtColour; + dst->TrousersColour = src->TrousersColour; + dst->DestinationX = src->DestinationX; + dst->DestinationY = src->DestinationY; + dst->DestinationTolerance = src->DestinationTolerance; + dst->Var37 = src->Var37; + dst->Energy = src->Energy; + dst->EnergyTarget = src->EnergyTarget; + dst->Mass = src->Mass; + dst->WindowInvalidateFlags = src->WindowInvalidateFlags; + dst->CurrentRide = RCT12RideIdToOpenRCT2RideId(src->CurrentRide); + dst->CurrentRideStation = StationIndex::FromUnderlying(src->CurrentRideStation); + dst->CurrentTrain = src->CurrentTrain; + dst->TimeToSitdown = src->TimeToSitdown; + dst->SpecialSprite = src->SpecialSprite; + dst->ActionSpriteType = static_cast(src->ActionSpriteType); + dst->NextActionSpriteType = static_cast(src->NextActionSpriteType); + dst->ActionSpriteImageOffset = src->ActionSpriteImageOffset; + dst->Action = static_cast(src->Action); + dst->ActionFrame = src->ActionFrame; + dst->StepProgress = src->StepProgress; + dst->PeepDirection = src->Direction; + dst->InteractionRideIndex = RCT12RideIdToOpenRCT2RideId(src->InteractionRideIndex); + dst->PeepId = src->Id; + dst->PathCheckOptimisation = src->PathCheckOptimisation; + dst->PeepFlags = src->PeepFlags; + if (isNullLocation(src->PathfindGoal)) { dst->PathfindGoal.SetNull(); dst->PathfindGoal.direction = INVALID_DIRECTION; } else { - dst->PathfindGoal = { src->pathfind_goal.x, src->pathfind_goal.y, src->pathfind_goal.z, - src->pathfind_goal.direction }; + dst->PathfindGoal = { src->PathfindGoal.x, src->PathfindGoal.y, src->PathfindGoal.z, + src->PathfindGoal.direction }; } - for (size_t i = 0; i < std::size(src->pathfind_history); i++) + for (size_t i = 0; i < std::size(src->PathfindHistory); i++) { - if (isNullLocation(src->pathfind_history[i])) + if (isNullLocation(src->PathfindHistory[i])) { dst->PathfindHistory[i].SetNull(); dst->PathfindHistory[i].direction = INVALID_DIRECTION; } else { - dst->PathfindHistory[i] = { src->pathfind_history[i].x, src->pathfind_history[i].y, - src->pathfind_history[i].z, src->pathfind_history[i].direction }; + dst->PathfindHistory[i] = { src->PathfindHistory[i].x, src->PathfindHistory[i].y, src->PathfindHistory[i].z, + src->PathfindHistory[i].direction }; } } - dst->WalkingFrameNum = src->no_action_frame_num; + dst->WalkingFrameNum = src->NoActionFrameNum; } - constexpr EntityType GetEntityTypeFromRCT2Sprite(const RCT12SpriteBase* src) + constexpr EntityType GetEntityTypeFromRCT2Sprite(const RCT12EntityBase* src) { EntityType output = EntityType::Null; - switch (src->sprite_identifier) + switch (src->EntityIdentifier) { - case RCT12SpriteIdentifier::Vehicle: + case RCT12EntityIdentifier::Vehicle: output = EntityType::Vehicle; break; - case RCT12SpriteIdentifier::Peep: - if (RCT12PeepType(static_cast(src)->peep_type) == RCT12PeepType::Guest) + case RCT12EntityIdentifier::Peep: + { + const auto& peep = static_cast(*src); + if (RCT12PeepType(peep.PeepType) == RCT12PeepType::Guest) { output = EntityType::Guest; } @@ -1764,9 +1794,10 @@ namespace RCT2 output = EntityType::Staff; } break; - case RCT12SpriteIdentifier::Misc: + } + case RCT12EntityIdentifier::Misc: - switch (RCT12MiscEntityType(src->type)) + switch (RCT12MiscEntityType(src->Type)) { case RCT12MiscEntityType::SteamParticle: output = EntityType::SteamParticle; @@ -1800,7 +1831,7 @@ namespace RCT2 break; } break; - case RCT12SpriteIdentifier::Litter: + case RCT12EntityIdentifier::Litter: output = EntityType::Litter; break; default: @@ -1809,28 +1840,28 @@ namespace RCT2 return output; } - void ImportEntityCommonProperties(EntityBase* dst, const RCT12SpriteBase* src) + void ImportEntityCommonProperties(EntityBase* dst, const RCT12EntityBase* src) { dst->Type = GetEntityTypeFromRCT2Sprite(src); - dst->sprite_height_negative = src->sprite_height_negative; - dst->sprite_index = EntityId::FromUnderlying(src->sprite_index); + dst->sprite_height_negative = src->SpriteHeightNegative; + dst->Id = EntityId::FromUnderlying(src->EntityIndex); dst->x = src->x; dst->y = src->y; dst->z = src->z; - dst->sprite_width = src->sprite_width; - dst->sprite_height_positive = src->sprite_height_positive; - dst->SpriteRect = ScreenRect(src->sprite_left, src->sprite_top, src->sprite_right, src->sprite_bottom); - dst->sprite_direction = src->sprite_direction; + dst->sprite_width = src->SpriteWidth; + dst->sprite_height_positive = src->SpriteHeightPositive; + dst->SpriteRect = ScreenRect(src->SpriteLeft, src->SpriteTop, src->SpriteRight, src->SpriteBottom); + dst->sprite_direction = src->EntityDirection; } - void ImportEntity(const RCT12SpriteBase& src); + void ImportEntity(const RCT12EntityBase& src); std::string GetUserString(StringId stringId) { - const auto originalString = _s6.custom_strings[(stringId - USER_STRING_START) % 1024]; + const auto originalString = _s6.CustomStrings[stringId % 1024]; auto originalStringView = std::string_view( originalString, GetRCT2StringBufferLen(originalString, USER_STRING_MAX_LENGTH)); - auto asUtf8 = rct2_to_utf8(originalStringView, RCT2LanguageId::EnglishUK); + auto asUtf8 = RCT2StringToUTF8(originalStringView, RCT2LanguageId::EnglishUK); auto justText = RCT12RemoveFormattingUTF8(asUtf8); return justText.data(); } @@ -1847,7 +1878,7 @@ namespace RCT2 ObjectEntryIndex railingCount = 0; for (int16_t objectType = EnumValue(ObjectType::Ride); objectType <= EnumValue(ObjectType::Water); objectType++) { - for (int16_t i = 0; i < rct2_object_entry_group_counts[objectType]; i++, objectIt++) + for (int16_t i = 0; i < RCT2ObjectEntryGroupCounts[objectType]; i++, objectIt++) { auto entry = ObjectEntryDescriptor(_s6.Objects[objectIt]); if (entry.HasValue()) @@ -1904,7 +1935,7 @@ namespace RCT2 // Find if any rct1 terrain surfaces or edges have been used const bool hasRCT1Terrain = std::any_of( - std::begin(_s6.tile_elements), std::end(_s6.tile_elements), [](RCT12TileElement& tile) { + std::begin(_s6.TileElements), std::end(_s6.TileElements), [](RCT12TileElement& tile) { auto* surface = tile.AsSurface(); if (surface == nullptr) { @@ -1935,35 +1966,35 @@ namespace RCT2 } }; - template<> void S6Importer::ImportEntity<::Vehicle>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::Vehicle>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::Vehicle>(EntityId::FromUnderlying(baseSrc.sprite_index)); + auto dst = CreateEntityAt<::Vehicle>(EntityId::FromUnderlying(baseSrc.EntityIndex)); auto src = static_cast(&baseSrc); - const auto& ride = _s6.rides[src->ride]; + const auto& ride = _s6.Rides[src->Ride]; ImportEntityCommonProperties(dst, src); - dst->SubType = ::Vehicle::Type(src->type); + dst->SubType = ::Vehicle::Type(src->Type); dst->Pitch = src->Pitch; - dst->bank_rotation = src->bank_rotation; - dst->remaining_distance = src->remaining_distance; - dst->velocity = src->velocity; - dst->acceleration = src->acceleration; - dst->ride = RideId::FromUnderlying(src->ride); - dst->vehicle_type = src->vehicle_type; - dst->colours.Body = src->colours.body_colour; - dst->colours.Trim = src->colours.trim_colour; - dst->colours.Tertiary = src->colours_extended; - dst->track_progress = src->track_progress; - dst->TrackLocation = { src->track_x, src->track_y, src->track_z }; - if (src->boat_location.IsNull() || static_cast(ride.mode) != RideMode::BoatHire - || src->status != static_cast(::Vehicle::Status::TravellingBoat)) + dst->bank_rotation = src->BankRotation; + dst->remaining_distance = src->RemainingDistance; + dst->velocity = src->Velocity; + dst->acceleration = src->Acceleration; + dst->ride = RideId::FromUnderlying(src->Ride); + dst->vehicle_type = src->VehicleType; + dst->colours.Body = src->Colours.BodyColour; + dst->colours.Trim = src->Colours.TrimColour; + dst->colours.Tertiary = src->ColoursExtended; + dst->track_progress = src->TrackProgress; + dst->TrackLocation = { src->TrackX, src->TrackY, src->TrackZ }; + if (src->BoatLocation.IsNull() || static_cast(ride.Mode) != RideMode::BoatHire + || src->Status != static_cast(::Vehicle::Status::TravellingBoat)) { dst->BoatLocation.SetNull(); dst->SetTrackDirection(src->GetTrackDirection()); dst->SetTrackType(src->GetTrackType()); // RotationControlToggle and Booster are saved as the same track piece ID // Which one the vehicle is using must be determined - if (IsFlatRide(src->ride)) + if (IsFlatRide(src->Ride)) { dst->SetTrackType(RCT12FlatTrackTypeToOpenRCT2(src->GetTrackType())); } @@ -1982,66 +2013,69 @@ namespace RCT2 } else { - dst->BoatLocation = TileCoordsXY{ src->boat_location.x, src->boat_location.y }.ToCoordsXY(); + dst->BoatLocation = TileCoordsXY{ src->BoatLocation.x, src->BoatLocation.y }.ToCoordsXY(); dst->SetTrackDirection(0); dst->SetTrackType(0); } - dst->next_vehicle_on_train = EntityId::FromUnderlying(src->next_vehicle_on_train); - dst->prev_vehicle_on_ride = EntityId::FromUnderlying(src->prev_vehicle_on_ride); - dst->next_vehicle_on_ride = EntityId::FromUnderlying(src->next_vehicle_on_ride); - dst->var_44 = src->var_44; - dst->mass = src->mass; - dst->update_flags = src->update_flags; + dst->next_vehicle_on_train = EntityId::FromUnderlying(src->NextVehicleOnTrain); + dst->prev_vehicle_on_ride = EntityId::FromUnderlying(src->PrevVehicleOnRide); + dst->next_vehicle_on_ride = EntityId::FromUnderlying(src->NextVehicleOnRide); + dst->var_44 = src->Var44; + dst->mass = src->Mass; + dst->Flags = src->UpdateFlags; dst->SwingSprite = src->SwingSprite; - dst->current_station = StationIndex::FromUnderlying(src->current_station); - dst->current_time = src->current_time; - dst->crash_z = src->crash_z; + dst->current_station = StationIndex::FromUnderlying(src->CurrentStation); + dst->current_time = src->CurrentTime; + dst->crash_z = src->CrashZ; ::Vehicle::Status statusSrc = ::Vehicle::Status::MovingToEndOfStation; - if (src->status <= static_cast(::Vehicle::Status::StoppedByBlockBrakes)) + if (src->Status <= static_cast(::Vehicle::Status::StoppedByBlockBrakes)) { - statusSrc = static_cast<::Vehicle::Status>(src->status); + statusSrc = static_cast<::Vehicle::Status>(src->Status); } dst->status = statusSrc; - dst->sub_state = src->sub_state; - for (size_t i = 0; i < std::size(src->peep); i++) + dst->sub_state = src->SubState; + for (size_t i = 0; i < std::size(src->Peep); i++) { - dst->peep[i] = EntityId::FromUnderlying(src->peep[i]); - dst->peep_tshirt_colours[i] = src->peep_tshirt_colours[i]; + dst->peep[i] = EntityId::FromUnderlying(src->Peep[i]); + dst->peep_tshirt_colours[i] = src->PeepTshirtColours[i]; } - dst->num_seats = src->num_seats; - dst->num_peeps = src->num_peeps; - dst->next_free_seat = src->next_free_seat; - dst->restraints_position = src->restraints_position; - dst->crash_x = src->crash_x; - dst->sound2_flags = src->sound2_flags; - dst->spin_sprite = src->spin_sprite; - dst->sound1_id = static_cast(src->sound1_id); - dst->sound1_volume = src->sound1_volume; - dst->sound2_id = static_cast(src->sound2_id); - dst->sound2_volume = src->sound2_volume; - dst->sound_vector_factor = src->sound_vector_factor; - dst->time_waiting = src->time_waiting; - dst->speed = src->speed; - dst->powered_acceleration = src->powered_acceleration; + dst->num_seats = src->NumSeats; + dst->num_peeps = src->NumPeeps; + dst->next_free_seat = src->NextFreeSeat; + dst->restraints_position = src->RestraintsPosition; + dst->crash_x = src->CrashX; + dst->sound2_flags = src->Sound2Flags; + dst->spin_sprite = src->SpinSprite; + dst->sound1_id = static_cast(src->Sound1Id); + dst->sound1_volume = src->Sound1Volume; + dst->sound2_id = static_cast(src->Sound2Id); + dst->sound2_volume = src->Sound2Volume; + dst->sound_vector_factor = src->SoundVectorFactor; + dst->time_waiting = src->TimeWaiting; + dst->speed = src->Speed; + dst->powered_acceleration = src->PoweredAcceleration; dst->CollisionDetectionTimer = src->CollisionDetectionTimer; - dst->animation_frame = src->animation_frame; - dst->animationState = src->animationState; - dst->scream_sound_id = static_cast(src->scream_sound_id); + dst->animation_frame = src->AnimationFrame; + dst->animationState = src->AnimationState; + dst->scream_sound_id = static_cast(src->ScreamSoundId); dst->TrackSubposition = VehicleTrackSubposition{ src->TrackSubposition }; dst->NumLaps = src->NumLaps; - dst->brake_speed = src->brake_speed; - dst->lost_time_out = src->lost_time_out; - dst->vertical_drop_countdown = src->vertical_drop_countdown; - dst->var_D3 = src->var_D3; - dst->mini_golf_current_animation = MiniGolfAnimation(src->mini_golf_current_animation); - dst->mini_golf_flags = src->mini_golf_flags; - dst->ride_subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->ride_subtype); - dst->seat_rotation = src->seat_rotation; - dst->target_seat_rotation = src->target_seat_rotation; - dst->IsCrashedVehicle = src->flags & RCT12_SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE; + dst->brake_speed = src->BrakeSpeed; + dst->lost_time_out = src->LostTimeOut; + dst->vertical_drop_countdown = src->VerticalDropCountdown; + dst->var_D3 = src->VarD3; + dst->mini_golf_current_animation = MiniGolfAnimation(src->MiniGolfCurrentAnimation); + dst->mini_golf_flags = src->MiniGolfFlags; + dst->ride_subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->RideSubtype); + dst->seat_rotation = src->SeatRotation; + dst->target_seat_rotation = src->TargetSeatRotation; + if (src->Flags & RCT12_ENTITY_FLAGS_IS_CRASHED_VEHICLE_ENTITY) + { + dst->SetFlag(VehicleFlags::Crashed); + } } static uint32_t AdjustScenarioToCurrentTicks(const S6Data& s6, uint32_t tick) @@ -2049,217 +2083,217 @@ namespace RCT2 // Previously gScenarioTicks was used as a time point, now it's gCurrentTicks. // gCurrentTicks and gScenarioTicks are now exported as the same, older saves that have a different // scenario tick must account for the difference between the two. - uint32_t ticksElapsed = s6.scenario_ticks - tick; - return s6.game_ticks_1 - ticksElapsed; + uint32_t ticksElapsed = s6.ScenarioTicks - tick; + return s6.GameTicks1 - ticksElapsed; } - template<> void S6Importer::ImportEntity<::Guest>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::Guest>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::Guest>(EntityId::FromUnderlying(baseSrc.sprite_index)); + auto dst = CreateEntityAt<::Guest>(EntityId::FromUnderlying(baseSrc.EntityIndex)); auto src = static_cast(&baseSrc); ImportEntityPeep(dst, src); - dst->OutsideOfPark = static_cast(src->outside_of_park); - dst->GuestNumRides = src->no_of_rides; - dst->Happiness = src->happiness; - dst->HappinessTarget = src->happiness_target; - dst->Nausea = src->nausea; - dst->NauseaTarget = src->nausea_target; - dst->Hunger = src->hunger; - dst->Thirst = src->thirst; - dst->Toilet = src->toilet; - dst->TimeToConsume = src->time_to_consume; - dst->Intensity = static_cast(src->intensity); - dst->NauseaTolerance = static_cast(src->nausea_tolerance); - dst->PaidOnDrink = src->paid_on_drink; + dst->OutsideOfPark = static_cast(src->OutsideOfPark); + dst->GuestNumRides = src->NoOfRides; + dst->Happiness = src->Happiness; + dst->HappinessTarget = src->HappinessTarget; + dst->Nausea = src->Nausea; + dst->NauseaTarget = src->NauseaTarget; + dst->Hunger = src->Hunger; + dst->Thirst = src->Thirst; + dst->Toilet = src->Toilet; + dst->TimeToConsume = src->TimeToConsume; + dst->Intensity = static_cast(src->Intensity); + dst->NauseaTolerance = static_cast(src->NauseaTolerance); + dst->PaidOnDrink = src->PaidOnDrink; - OpenRCT2::RideUse::GetHistory().Set(dst->sprite_index, RCT12GetRidesBeenOn(src)); - OpenRCT2::RideUse::GetTypeHistory().Set(dst->sprite_index, RCT12GetRideTypesBeenOn(src)); + OpenRCT2::RideUse::GetHistory().Set(dst->Id, RCT12GetRidesBeenOn(src)); + OpenRCT2::RideUse::GetTypeHistory().Set(dst->Id, RCT12GetRideTypesBeenOn(src)); dst->SetItemFlags(src->GetItemFlags()); - dst->Photo1RideRef = RCT12RideIdToOpenRCT2RideId(src->photo1_ride_ref); - dst->Photo2RideRef = RCT12RideIdToOpenRCT2RideId(src->photo2_ride_ref); - dst->Photo3RideRef = RCT12RideIdToOpenRCT2RideId(src->photo3_ride_ref); - dst->Photo4RideRef = RCT12RideIdToOpenRCT2RideId(src->photo4_ride_ref); - dst->GuestNextInQueue = EntityId::FromUnderlying(src->next_in_queue); - dst->TimeInQueue = src->time_in_queue; - dst->CashInPocket = src->cash_in_pocket; - dst->CashSpent = src->cash_spent; - dst->ParkEntryTime = AdjustScenarioToCurrentTicks(_s6, src->park_entry_time); - dst->RejoinQueueTimeout = src->rejoin_queue_timeout; - dst->PreviousRide = RCT12RideIdToOpenRCT2RideId(src->previous_ride); - dst->PreviousRideTimeOut = src->previous_ride_time_out; - for (size_t i = 0; i < std::size(src->thoughts); i++) + dst->Photo1RideRef = RCT12RideIdToOpenRCT2RideId(src->Photo1RideRef); + dst->Photo2RideRef = RCT12RideIdToOpenRCT2RideId(src->Photo2RideRef); + dst->Photo3RideRef = RCT12RideIdToOpenRCT2RideId(src->Photo3RideRef); + dst->Photo4RideRef = RCT12RideIdToOpenRCT2RideId(src->Photo4RideRef); + dst->GuestNextInQueue = EntityId::FromUnderlying(src->NextInQueue); + dst->TimeInQueue = src->TimeInQueue; + dst->CashInPocket = src->CashInPocket; + dst->CashSpent = src->CashSpent; + dst->ParkEntryTime = AdjustScenarioToCurrentTicks(_s6, src->ParkEntryTime); + dst->RejoinQueueTimeout = src->RejoinQueueTimeout; + dst->PreviousRide = RCT12RideIdToOpenRCT2RideId(src->PreviousRide); + dst->PreviousRideTimeOut = src->PreviousRideTimeOut; + for (size_t i = 0; i < std::size(src->Thoughts); i++) { - auto srcThought = &src->thoughts[i]; + auto srcThought = &src->Thoughts[i]; auto dstThought = &dst->Thoughts[i]; - dstThought->type = static_cast(srcThought->type); - if (srcThought->item == RCT12PeepThoughtItemNone) + dstThought->type = static_cast(srcThought->Type); + if (srcThought->Item == RCT12PeepThoughtItemNone) dstThought->item = PeepThoughtItemNone; else - dstThought->item = srcThought->item; - dstThought->freshness = srcThought->freshness; - dstThought->fresh_timeout = srcThought->fresh_timeout; + dstThought->item = srcThought->Item; + dstThought->freshness = srcThought->Freshness; + dstThought->fresh_timeout = srcThought->FreshTimeout; } - dst->GuestHeadingToRideId = RCT12RideIdToOpenRCT2RideId(src->guest_heading_to_ride_id); - dst->GuestIsLostCountdown = src->peep_is_lost_countdown; - dst->LitterCount = src->litter_count; - dst->GuestTimeOnRide = src->time_on_ride; - dst->DisgustingCount = src->disgusting_count; - dst->PaidToEnter = src->paid_to_enter; - dst->PaidOnRides = src->paid_on_rides; - dst->PaidOnFood = src->paid_on_food; - dst->PaidOnSouvenirs = src->paid_on_souvenirs; - dst->AmountOfFood = src->no_of_food; - dst->AmountOfDrinks = src->no_of_drinks; - dst->AmountOfSouvenirs = src->no_of_souvenirs; - dst->VandalismSeen = src->vandalism_seen; - dst->VoucherType = src->voucher_type; - dst->VoucherRideId = RCT12RideIdToOpenRCT2RideId(src->voucher_arguments); - dst->SurroundingsThoughtTimeout = src->surroundings_thought_timeout; - dst->Angriness = src->angriness; - dst->TimeLost = src->time_lost; - dst->DaysInQueue = src->days_in_queue; - dst->BalloonColour = src->balloon_colour; - dst->UmbrellaColour = src->umbrella_colour; - dst->HatColour = src->hat_colour; - dst->FavouriteRide = RCT12RideIdToOpenRCT2RideId(src->favourite_ride); - dst->FavouriteRideRating = src->favourite_ride_rating; + dst->GuestHeadingToRideId = RCT12RideIdToOpenRCT2RideId(src->GuestHeadingToRideId); + dst->GuestIsLostCountdown = src->PeepIsLostCountdown; + dst->LitterCount = src->LitterCount; + dst->GuestTimeOnRide = src->TimeOnRide; + dst->DisgustingCount = src->DisgustingCount; + dst->PaidToEnter = src->PaidToEnter; + dst->PaidOnRides = src->PaidOnRides; + dst->PaidOnFood = src->PaidOnFood; + dst->PaidOnSouvenirs = src->PaidOnSouvenirs; + dst->AmountOfFood = src->NoOfFood; + dst->AmountOfDrinks = src->NoOfDrinks; + dst->AmountOfSouvenirs = src->NoOfSouvenirs; + dst->VandalismSeen = src->VandalismSeen; + dst->VoucherType = src->VoucherType; + dst->VoucherRideId = RCT12RideIdToOpenRCT2RideId(src->VoucherArguments); + dst->SurroundingsThoughtTimeout = src->SurroundingsThoughtTimeout; + dst->Angriness = src->Angriness; + dst->TimeLost = src->TimeLost; + dst->DaysInQueue = src->DaysInQueue; + dst->BalloonColour = src->BalloonColour; + dst->UmbrellaColour = src->UmbrellaColour; + dst->HatColour = src->HatColour; + dst->FavouriteRide = RCT12RideIdToOpenRCT2RideId(src->FavouriteRide); + dst->FavouriteRideRating = src->FavouriteRideRating; } - template<> void S6Importer::ImportEntity<::Staff>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::Staff>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::Staff>(EntityId::FromUnderlying(baseSrc.sprite_index)); + auto dst = CreateEntityAt<::Staff>(EntityId::FromUnderlying(baseSrc.EntityIndex)); auto src = static_cast(&baseSrc); ImportEntityPeep(dst, src); - dst->AssignedStaffType = StaffType(src->staff_type); - dst->MechanicTimeSinceCall = src->mechanic_time_since_call; + dst->AssignedStaffType = StaffType(src->StaffType); + dst->MechanicTimeSinceCall = src->MechanicTimeSinceCall; - dst->HireDate = src->park_entry_time; - dst->StaffOrders = src->staff_orders; - dst->StaffMowingTimeout = src->staff_mowing_timeout; - dst->StaffLawnsMown = src->paid_to_enter; - dst->StaffGardensWatered = src->paid_on_rides; - dst->StaffLitterSwept = src->paid_on_food; - dst->StaffBinsEmptied = src->paid_on_souvenirs; + dst->HireDate = src->ParkEntryTime; + dst->StaffOrders = src->StaffOrders; + dst->StaffMowingTimeout = src->StaffMowingTimeout; + dst->StaffLawnsMown = src->PaidToEnter; + dst->StaffGardensWatered = src->PaidOnRides; + dst->StaffLitterSwept = src->PaidOnFood; + dst->StaffBinsEmptied = src->PaidOnSouvenirs; - ImportStaffPatrolArea(dst, src->staff_id); + ImportStaffPatrolArea(dst, src->StaffId); } - template<> void S6Importer::ImportEntity<::SteamParticle>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::SteamParticle>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::SteamParticle>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::SteamParticle>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->time_to_move = src->time_to_move; - dst->frame = src->frame; + dst->time_to_move = src->TimeToMove; + dst->frame = src->Frame; } - template<> void S6Importer::ImportEntity<::MoneyEffect>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::MoneyEffect>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::MoneyEffect>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::MoneyEffect>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->MoveDelay = src->move_delay; - dst->NumMovements = src->num_movements; - dst->Vertical = src->vertical; - dst->Value = src->value; - dst->OffsetX = src->offset_x; - dst->Wiggle = src->wiggle; + dst->MoveDelay = src->MoveDelay; + dst->NumMovements = src->NumMovements; + dst->GuestPurchase = src->Vertical; + dst->Value = src->Value; + dst->OffsetX = src->OffsetX; + dst->Wiggle = src->Wiggle; } - template<> void S6Importer::ImportEntity<::VehicleCrashParticle>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::VehicleCrashParticle>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::VehicleCrashParticle>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::VehicleCrashParticle>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; - dst->time_to_live = src->time_to_live; - dst->frame = src->frame; - dst->colour[0] = src->colour[0]; - dst->colour[1] = src->colour[1]; - dst->crashed_sprite_base = src->crashed_sprite_base; - dst->velocity_x = src->velocity_x; - dst->velocity_y = src->velocity_y; - dst->velocity_z = src->velocity_z; - dst->acceleration_x = src->acceleration_x; - dst->acceleration_y = src->acceleration_y; - dst->acceleration_z = src->acceleration_z; + dst->frame = src->Frame; + dst->time_to_live = src->TimeToLive; + dst->frame = src->Frame; + dst->colour[0] = src->Colour[0]; + dst->colour[1] = src->Colour[1]; + dst->crashed_sprite_base = src->CrashedEntityBase; + dst->velocity_x = src->VelocityX; + dst->velocity_y = src->VelocityY; + dst->velocity_z = src->VelocityZ; + dst->acceleration_x = src->AccelerationX; + dst->acceleration_y = src->AccelerationY; + dst->acceleration_z = src->AccelerationZ; } - template<> void S6Importer::ImportEntity<::ExplosionCloud>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::ExplosionCloud>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::ExplosionCloud>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::ExplosionCloud>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; + dst->frame = src->Frame; } - template<> void S6Importer::ImportEntity<::ExplosionFlare>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::ExplosionFlare>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::ExplosionFlare>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::ExplosionFlare>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; + dst->frame = src->Frame; } - template<> void S6Importer::ImportEntity<::CrashSplashParticle>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::CrashSplashParticle>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::CrashSplashParticle>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::CrashSplashParticle>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; + dst->frame = src->Frame; } - template<> void S6Importer::ImportEntity<::JumpingFountain>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::JumpingFountain>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::JumpingFountain>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::JumpingFountain>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->NumTicksAlive = src->num_ticks_alive; - dst->frame = src->frame; - dst->FountainFlags = src->fountain_flags; - dst->TargetX = src->target_x; - dst->TargetY = src->target_y; - dst->Iteration = src->iteration; - dst->FountainType = RCT12MiscEntityType(src->type) == RCT12MiscEntityType::JumpingFountainSnow + dst->NumTicksAlive = src->NumTicksAlive; + dst->frame = src->Frame; + dst->FountainFlags = src->FountainFlags; + dst->TargetX = src->TargetX; + dst->TargetY = src->TargetY; + dst->Iteration = src->Iteration; + dst->FountainType = RCT12MiscEntityType(src->Type) == RCT12MiscEntityType::JumpingFountainSnow ? ::JumpingFountainType::Snow : ::JumpingFountainType::Water; } - template<> void S6Importer::ImportEntity<::Balloon>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::Balloon>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::Balloon>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::Balloon>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->popped = src->popped; - dst->time_to_move = src->time_to_move; - dst->frame = src->frame; - dst->colour = src->colour; + dst->popped = src->Popped; + dst->time_to_move = src->TimeToMove; + dst->frame = src->Frame; + dst->colour = src->Colour; } - template<> void S6Importer::ImportEntity<::Duck>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::Duck>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::Duck>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::Duck>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->frame = src->frame; - dst->target_x = src->target_x; - dst->target_y = src->target_y; - dst->state = static_cast<::Duck::DuckState>(src->state); + dst->frame = src->Frame; + dst->target_x = src->TargetX; + dst->target_y = src->TargetY; + dst->state = static_cast<::Duck::DuckState>(src->State); } - template<> void S6Importer::ImportEntity<::Litter>(const RCT12SpriteBase& baseSrc) + template<> void S6Importer::ImportEntity<::Litter>(const RCT12EntityBase& baseSrc) { - auto dst = CreateEntityAt<::Litter>(EntityId::FromUnderlying(baseSrc.sprite_index)); - auto src = static_cast(&baseSrc); + auto dst = CreateEntityAt<::Litter>(EntityId::FromUnderlying(baseSrc.EntityIndex)); + auto src = static_cast(&baseSrc); ImportEntityCommonProperties(dst, src); - dst->SubType = ::Litter::Type(src->type); - dst->creationTick = AdjustScenarioToCurrentTicks(_s6, src->creationTick); + dst->SubType = ::Litter::Type(src->Type); + dst->creationTick = AdjustScenarioToCurrentTicks(_s6, src->CreationTick); } - void S6Importer::ImportEntity(const RCT12SpriteBase& src) + void S6Importer::ImportEntity(const RCT12EntityBase& src) { switch (GetEntityTypeFromRCT2Sprite(&src)) { diff --git a/src/openrct2/rct2/SeaDecrypt.cpp b/src/openrct2/rct2/SeaDecrypt.cpp index 1cc8caf40d..8eedae426e 100644 --- a/src/openrct2/rct2/SeaDecrypt.cpp +++ b/src/openrct2/rct2/SeaDecrypt.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct2/T6Exporter.cpp b/src/openrct2/rct2/T6Exporter.cpp index ed3181dc16..ec41a4f12e 100644 --- a/src/openrct2/rct2/T6Exporter.cpp +++ b/src/openrct2/rct2/T6Exporter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,6 +17,7 @@ #include "../object/ObjectList.h" #include "../rct12/SawyerChunkWriter.h" #include "../ride/Ride.h" +#include "../ride/RideData.h" #include "../ride/Station.h" #include "../ride/Track.h" #include "../ride/TrackData.h" @@ -42,7 +43,7 @@ namespace RCT2 } catch (const std::exception& e) { - log_error("Unable to save track design: %s", e.what()); + LOG_ERROR("Unable to save track design: %s", e.what()); return false; } } @@ -82,12 +83,12 @@ namespace RCT2 tempStream.WriteValue(_trackDesign->excitement); tempStream.WriteValue(_trackDesign->intensity); tempStream.WriteValue(_trackDesign->nausea); - tempStream.WriteValue(_trackDesign->upkeep_cost); + 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(rct_object_entry)); + tempStream.Write(&_trackDesign->vehicle_object.Entry, sizeof(RCTObjectEntry)); tempStream.WriteValue(_trackDesign->space_required_x); tempStream.WriteValue(_trackDesign->space_required_y); for (auto& colour : _trackDesign->vehicle_colours) @@ -96,7 +97,8 @@ namespace RCT2 } tempStream.WriteValue(_trackDesign->lift_hill_speed | (_trackDesign->num_circuits << 5)); - if (_trackDesign->type == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(_trackDesign->type); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { for (const auto& mazeElement : _trackDesign->maze_elements) { @@ -133,7 +135,7 @@ namespace RCT2 for (const auto& sceneryElement : _trackDesign->scenery_elements) { - tempStream.Write(&sceneryElement.scenery_object.Entry, sizeof(rct_object_entry)); + 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); diff --git a/src/openrct2/rct2/T6Exporter.h b/src/openrct2/rct2/T6Exporter.h index 585afe5069..e4a5bc102e 100644 --- a/src/openrct2/rct2/T6Exporter.h +++ b/src/openrct2/rct2/T6Exporter.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/rct2/T6Importer.cpp b/src/openrct2/rct2/T6Importer.cpp index 33a64fdace..bf13650ef2 100644 --- a/src/openrct2/rct2/T6Importer.cpp +++ b/src/openrct2/rct2/T6Importer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -71,107 +71,108 @@ namespace RCT2 // Rework td6 so that it is just the fields _stream.Read(&td6, 0xA3); - td->type = td6.type; // 0x00 - td->vehicle_type = td6.vehicle_type; + td->type = td6.Type; // 0x00 + td->vehicle_type = td6.VehicleType; - td->cost = 0; - td->flags = td6.flags; - td->ride_mode = static_cast(td6.ride_mode); + td->cost = 0.00_GBP; + td->flags = td6.Flags; + td->ride_mode = static_cast(td6.RideMode); td->track_flags = 0; - td->colour_scheme = td6.version_and_colour_scheme & 0x3; + td->colour_scheme = td6.VersionAndColourScheme & 0x3; for (auto i = 0; i < Limits::MaxTrainsPerRide; ++i) { - td->vehicle_colours[i].Body = td6.vehicle_colours[i].body_colour; - td->vehicle_colours[i].Trim = td6.vehicle_colours[i].trim_colour; - td->vehicle_colours[i].Tertiary = td6.vehicle_additional_colour[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->entrance_style = td6.entrance_style; - td->total_air_time = td6.total_air_time; - td->depart_flags = td6.depart_flags; - td->number_of_trains = td6.number_of_trains; - td->number_of_cars_per_train = td6.number_of_cars_per_train; - td->min_waiting_time = td6.min_waiting_time; - td->max_waiting_time = td6.max_waiting_time; - td->operation_setting = td6.operation_setting; - td->max_speed = td6.max_speed; - td->average_speed = td6.average_speed; - td->ride_length = td6.ride_length; - td->max_positive_vertical_g = td6.max_positive_vertical_g; - td->max_negative_vertical_g = td6.max_negative_vertical_g; - td->max_lateral_g = td6.max_lateral_g; + td->entrance_style = 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; if (td->type == RIDE_TYPE_MINI_GOLF) { - td->holes = td6.holes; + td->holes = td6.Holes; } else { - td->inversions = td6.inversions; + td->inversions = td6.Inversions; } - td->drops = td6.drops; - td->highest_drop_height = td6.highest_drop_height; - td->excitement = td6.excitement; - td->intensity = td6.intensity; - td->nausea = td6.nausea; - td->upkeep_cost = td6.upkeep_cost; + 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->track_spine_colour[i] = td6.track_spine_colour[i]; - td->track_rail_colour[i] = td6.track_rail_colour[i]; - td->track_support_colour[i] = td6.track_support_colour[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->flags2 = td6.flags2; - td->vehicle_object = ObjectEntryDescriptor(td6.vehicle_object); - td->space_required_x = td6.space_required_x; - td->space_required_y = td6.space_required_y; - td->lift_hill_speed = td6.lift_hill_speed_num_circuits & 0b00011111; - td->num_circuits = td6.lift_hill_speed_num_circuits >> 5; + 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; - auto version = static_cast((td6.version_and_colour_scheme >> 2) & 3); + auto version = static_cast((td6.VersionAndColourScheme >> 2) & 3); if (version != RCT12TrackDesignVersion::TD6) { - log_error("Unsupported track design."); + LOG_ERROR("Unsupported track design."); return nullptr; } td->operation_setting = std::min(td->operation_setting, GetRideTypeDescriptor(td->type).OperatingSettings.MaxValue); - if (td->type == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(td->type); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - rct_td46_maze_element t6MazeElement{}; - t6MazeElement.all = !0; - while (t6MazeElement.all != 0) + TD46MazeElement t6MazeElement{}; + t6MazeElement.All = !0; + while (t6MazeElement.All != 0) { - _stream.Read(&t6MazeElement, sizeof(rct_td46_maze_element)); - if (t6MazeElement.all != 0) + _stream.Read(&t6MazeElement, sizeof(TD46MazeElement)); + if (t6MazeElement.All != 0) { TrackDesignMazeElement mazeElement{}; mazeElement.x = t6MazeElement.x; mazeElement.y = t6MazeElement.y; - mazeElement.direction = t6MazeElement.direction; - mazeElement.type = t6MazeElement.type; + mazeElement.direction = t6MazeElement.Direction; + mazeElement.type = t6MazeElement.Type; td->maze_elements.push_back(mazeElement); } } } else { - rct_td46_track_element t6TrackElement{}; + TD46TrackElement t6TrackElement{}; for (uint8_t endFlag = _stream.ReadValue(); endFlag != 0xFF; endFlag = _stream.ReadValue()) { _stream.SetPosition(_stream.GetPosition() - 1); - _stream.Read(&t6TrackElement, sizeof(rct_td46_track_element)); + _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->type, true); if (trackType == TrackElemType::InvertedUp90ToFlatQuarterLoopAlias) { trackType = TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop; } trackElement.type = trackType; - trackElement.flags = t6TrackElement.flags; + trackElement.flags = t6TrackElement.Flags; td->track_elements.push_back(trackElement); } @@ -196,13 +197,13 @@ namespace RCT2 TD6SceneryElement t6SceneryElement{}; _stream.Read(&t6SceneryElement, sizeof(TD6SceneryElement)); TrackDesignSceneryElement sceneryElement{}; - sceneryElement.scenery_object = ObjectEntryDescriptor(t6SceneryElement.scenery_object); + 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.flags = t6SceneryElement.flags; - sceneryElement.primary_colour = t6SceneryElement.primary_colour; - sceneryElement.secondary_colour = t6SceneryElement.secondary_colour; + sceneryElement.flags = t6SceneryElement.Flags; + sceneryElement.primary_colour = t6SceneryElement.PrimaryColour; + sceneryElement.secondary_colour = t6SceneryElement.SecondaryColour; td->scenery_elements.push_back(std::move(sceneryElement)); } @@ -218,14 +219,14 @@ namespace RCT2 if (RCT2RideTypeNeedsConversion(td->type)) { std::scoped_lock lock(_objectLookupMutex); - auto rawObject = object_repository_load_object(&td->vehicle_object.Entry); + auto rawObject = ObjectRepositoryLoadObject(&td->vehicle_object.Entry); if (rawObject != nullptr) { - const auto* rideEntry = static_cast( + const auto* rideEntry = static_cast( static_cast(rawObject.get())->GetLegacyData()); if (rideEntry != nullptr) { - td->type = RCT2RideTypeToOpenRCT2RideType(td->type, rideEntry); + td->type = RCT2RideTypeToOpenRCT2RideType(td->type, *rideEntry); } rawObject->Unload(); } diff --git a/src/openrct2/readme.md b/src/openrct2/readme.md index 82f121ed75..2b7b144f01 100644 --- a/src/openrct2/readme.md +++ b/src/openrct2/readme.md @@ -8,7 +8,7 @@ Contains files for mixing and playing music and sound. -- **cmdline** +- **command_line** Code specific to command line (arguments). diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 64a2615f09..2d6b2ec8b9 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,7 +21,7 @@ #include -Vehicle* cable_lift_segment_create( +Vehicle* CableLiftSegmentCreate( Ride& ride, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head) { Vehicle* current = CreateEntity(); @@ -29,7 +29,7 @@ Vehicle* cable_lift_segment_create( current->ride_subtype = OBJECT_ENTRY_INDEX_NULL; if (head) { - ride.cable_lift = current->sprite_index; + ride.cable_lift = current->Id; } current->SubType = head ? Vehicle::Type::Head : Vehicle::Type::Tail; current->var_44 = var_44; @@ -73,12 +73,11 @@ Vehicle* cable_lift_segment_create( current->SetTrackType(TrackElemType::CableLiftHill); current->SetTrackDirection(current->sprite_direction >> 3); current->track_progress = 164; - current->update_flags = VEHICLE_UPDATE_FLAG_COLLISION_DISABLED; + current->Flags = VehicleFlags::CollisionDisabled; current->SetState(Vehicle::Status::MovingToEndOfStation, 0); current->num_peeps = 0; current->next_free_seat = 0; current->BoatLocation.SetNull(); - current->IsCrashedVehicle = false; return current; } @@ -116,7 +115,9 @@ void Vehicle::CableLiftUpdate() void Vehicle::CableLiftUpdateMovingToEndOfStation() { if (velocity >= -439800) + { acceleration = -2932; + } if (velocity < -439800) { @@ -139,7 +140,9 @@ void Vehicle::CableLiftUpdateMovingToEndOfStation() void Vehicle::CableLiftUpdateWaitingToDepart() { if (velocity >= -58640) + { acceleration = -14660; + } if (velocity < -58640) { @@ -203,7 +206,7 @@ void Vehicle::CableLiftUpdateTravelling() velocity = std::min(passengerVehicle->velocity, 439800); acceleration = 0; - if (passengerVehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN)) + if (passengerVehicle->HasFlag(VehicleFlags::TrainIsBroken)) return; if (!(CableLiftUpdateTrackMotion() & VEHICLE_UPDATE_MOTION_TRACK_FLAG_1)) @@ -252,7 +255,7 @@ bool Vehicle::CableLiftUpdateTrackMotionForwards() auto input = CoordsXYE{ TrackLocation, trackElement }; - if (!track_block_get_next(&input, &output, &outputZ, &outputDirection)) + if (!TrackBlockGetNext(&input, &output, &outputZ, &outputDirection)) return false; if (TrackPitchAndRollEnd(trackType) != TrackPitchAndRollStart(output.element->AsTrack()->GetTrackType())) @@ -310,9 +313,9 @@ bool Vehicle::CableLiftUpdateTrackMotionBackwards() TileElement* trackElement = MapGetTrackElementAtOfTypeSeq(TrackLocation, trackType, 0); auto input = CoordsXYE{ TrackLocation, trackElement }; - track_begin_end output; + TrackBeginEnd output; - if (!track_block_get_previous(input, &output)) + if (!TrackBlockGetPrevious(input, &output)) return false; if (TrackPitchAndRollStart(trackType) != TrackPitchAndRollEnd(output.begin_element->AsTrack()->GetTrackType())) @@ -441,13 +444,13 @@ int32_t Vehicle::CableLiftUpdateTrackMotion() uint16_t massTotal = 0; int32_t accelerationTotal = 0; - for (Vehicle* vehicle = GetEntity(sprite_index); vehicle != nullptr; + for (Vehicle* vehicle = GetEntity(Id); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { vehicleCount++; massTotal += vehicle->mass; - accelerationTotal = add_clamp_int32_t(accelerationTotal, vehicle->acceleration); + accelerationTotal = AddClamp_int32_t(accelerationTotal, vehicle->acceleration); } int32_t newAcceleration = (accelerationTotal / vehicleCount) >> 9; diff --git a/src/openrct2/ride/CableLift.h b/src/openrct2/ride/CableLift.h index 2e1a692f2c..0d7f4b76a6 100644 --- a/src/openrct2/ride/CableLift.h +++ b/src/openrct2/ride/CableLift.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,5 +14,5 @@ struct Vehicle; struct Ride; -Vehicle* cable_lift_segment_create( +Vehicle* CableLiftSegmentCreate( Ride& ride, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head); diff --git a/src/openrct2/ride/CarEntry.cpp b/src/openrct2/ride/CarEntry.cpp new file mode 100644 index 0000000000..7b173c94a3 --- /dev/null +++ b/src/openrct2/ride/CarEntry.cpp @@ -0,0 +1,140 @@ +/***************************************************************************** + * Copyright (c) 2014-2023 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 "CarEntry.h" + +#include "../drawing/Drawing.h" +#include "../entity/Yaw.hpp" + +#include + +uint32_t CarEntry::NumRotationSprites(SpriteGroupType spriteGroup) const +{ + return NumSpritesPrecision(SpriteGroups[static_cast(spriteGroup)].spritePrecision); +} + +int32_t CarEntry::SpriteByYaw(int32_t yaw, SpriteGroupType spriteGroup) const +{ + return YawToPrecision(yaw, SpriteGroups[static_cast(spriteGroup)].spritePrecision); +} + +bool CarEntry::GroupEnabled(SpriteGroupType spriteGroup) const +{ + return SpriteGroups[static_cast(spriteGroup)].Enabled(); +} + +uint32_t CarEntry::GroupImageId(SpriteGroupType spriteGroup) const +{ + return SpriteGroups[static_cast(spriteGroup)].imageId; +} + +uint32_t CarEntry::SpriteOffset(SpriteGroupType spriteGroup, int32_t imageDirection, uint8_t rankIndex) const +{ + return ((SpriteByYaw(imageDirection, spriteGroup) + NumRotationSprites(spriteGroup) * rankIndex) * base_num_frames) + + GroupImageId(spriteGroup); +} + +/** + * + * rct2: 0x006847BA + */ +void CarEntrySetImageMaxSizes(CarEntry& carEntry, int32_t numImages) +{ + uint8_t bitmap[200][200] = { 0 }; + + DrawPixelInfo dpi = { + /*.bits = */ reinterpret_cast(bitmap), + /*.x = */ -100, + /*.y = */ -100, + /*.width = */ 200, + /*.height = */ 200, + /*.pitch = */ 0, + /*.zoom_level = */ ZoomLevel{ 0 }, + }; + + for (int32_t i = 0; i < numImages; ++i) + { + GfxDrawSpriteSoftware(&dpi, ImageId(carEntry.base_image_id + i), { 0, 0 }); + } + int32_t spriteWidth = -1; + for (int32_t i = 99; i != 0; --i) + { + for (int32_t j = 0; j < 200; j++) + { + if (bitmap[j][100 - i] != 0) + { + spriteWidth = i; + break; + } + } + + if (spriteWidth != -1) + break; + + for (int32_t j = 0; j < 200; j++) + { + if (bitmap[j][100 + i] != 0) + { + spriteWidth = i; + break; + } + } + + if (spriteWidth != -1) + break; + } + + spriteWidth++; + int32_t spriteHeightNegative = -1; + + for (int32_t i = 99; i != 0; --i) + { + for (int32_t j = 0; j < 200; j++) + { + if (bitmap[100 - i][j] != 0) + { + spriteHeightNegative = i; + break; + } + } + + if (spriteHeightNegative != -1) + break; + } + spriteHeightNegative++; + + int32_t spriteHeightPositive = -1; + + for (int32_t i = 99; i != 0; --i) + { + for (int32_t j = 0; j < 200; j++) + { + if (bitmap[100 + i][j] != 0) + { + spriteHeightPositive = i; + break; + } + } + + if (spriteHeightPositive != -1) + break; + } + spriteHeightPositive++; + + // Moved from object paint + + if (carEntry.flags & CAR_ENTRY_FLAG_SPRITE_BOUNDS_INCLUDE_INVERTED_SET) + { + spriteHeightNegative += 16; + } + + carEntry.sprite_width = spriteWidth; + carEntry.sprite_height_negative = spriteHeightNegative; + carEntry.sprite_height_positive = spriteHeightPositive; +} diff --git a/src/openrct2/ride/VehicleEntry.h b/src/openrct2/ride/CarEntry.h similarity index 94% rename from src/openrct2/ride/VehicleEntry.h rename to src/openrct2/ride/CarEntry.h index 678df1d7ac..eda82c121f 100644 --- a/src/openrct2/ride/VehicleEntry.h +++ b/src/openrct2/ride/CarEntry.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,6 +23,19 @@ namespace OpenRCT2::Audio enum class SoundId : uint8_t; } +enum class CarEntryAnimation : uint8_t +{ + None = 0, + SimpleVehicle, + SteamLocomotive, + SwanBoat, + MonorailCycle, + MultiDimension, + ObservationTower, + AnimalFlying, + Count, +}; + enum : uint32_t { CAR_ENTRY_FLAG_POWERED_RIDE_UNRESTRICTED_GRAVITY = 1 @@ -166,7 +179,7 @@ struct CarEntry uint8_t sprite_width; uint8_t sprite_height_negative; uint8_t sprite_height_positive; - uint8_t animation; + CarEntryAnimation animation; uint32_t flags; uint16_t base_num_frames; // The number of sprites of animation or swinging per rotation frame uint32_t base_image_id; @@ -187,6 +200,13 @@ struct CarEntry uint8_t num_vertical_frames_override; // A custom number that can be used rather than letting RCT2 determine it. // Needs the CAR_ENTRY_FLAG_OVERRIDE_NUM_VERTICAL_FRAMES flag to be set. uint8_t peep_loading_waypoint_segments; + uint16_t AnimationSpeed; + uint8_t AnimationFrames; + struct + { + int8_t Longitudinal; + int8_t Vertical; + } SteamEffect; std::vector> peep_loading_waypoints = {}; std::vector peep_loading_positions = {}; @@ -196,3 +216,5 @@ struct CarEntry uint32_t GroupImageId(SpriteGroupType spriteGroup) const; uint32_t SpriteOffset(SpriteGroupType spriteGroup, int32_t imageDirection, uint8_t rankIndex) const; }; + +void CarEntrySetImageMaxSizes(CarEntry& carEntry, int32_t numImages); diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index dc0302c7d6..bdedbe61d6 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,6 +33,7 @@ #include "../interface/Window.h" #include "../localisation/Date.h" #include "../localisation/Formatter.h" +#include "../localisation/Formatting.h" #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../management/Marketing.h" @@ -94,7 +95,14 @@ static constexpr const int32_t RideInspectionInterval[] = { 10, 20, 30, 45, 60, 120, 0, 0, }; -static std::vector _rides; +// Ride storage for all the rides in the park, rides with RideId::Null are considered free. +static std::array _rides{}; + +// This is the highest used index + 1 of the _rides array. +static size_t _endOfUsedRange = 0; + +// A special instance of Ride that is used to draw previews such as the track designs. +static Ride _previewRide{}; struct StationIndexWithMessage { @@ -103,17 +111,17 @@ struct StationIndexWithMessage }; // Static function declarations -Staff* find_closest_mechanic(const CoordsXY& entrancePosition, int32_t forInspection); -static void ride_breakdown_status_update(Ride* ride); -static void ride_breakdown_update(Ride* ride); -static void ride_call_closest_mechanic(Ride* ride); -static void ride_call_mechanic(Ride* ride, Peep* mechanic, int32_t forInspection); -static void ride_entrance_exit_connected(Ride* ride); -static int32_t ride_get_new_breakdown_problem(Ride* ride); -static void ride_inspection_update(Ride* ride); -static void ride_mechanic_status_update(Ride* ride, int32_t mechanicStatus); -static void RideMusicUpdate(Ride* ride); -static void ride_shop_connected(Ride* ride); +Staff* FindClosestMechanic(const CoordsXY& entrancePosition, int32_t forInspection); +static void RideBreakdownStatusUpdate(Ride& ride); +static void RideBreakdownUpdate(Ride& ride); +static void RideCallClosestMechanic(Ride& ride); +static void RideCallMechanic(Ride& ride, Peep* mechanic, int32_t forInspection); +static void RideEntranceExitConnected(Ride& ride); +static int32_t RideGetNewBreakdownProblem(const Ride& ride); +static void RideInspectionUpdate(Ride& ride); +static void RideMechanicStatusUpdate(Ride& ride, int32_t mechanicStatus); +static void RideMusicUpdate(Ride& ride); +static void RideShopConnected(const Ride& ride); RideManager GetRideManager() { @@ -123,9 +131,9 @@ RideManager GetRideManager() size_t RideManager::size() const { size_t count = 0; - for (size_t i = 0; i < _rides.size(); i++) + for (size_t i = 0; i < _endOfUsedRange; i++) { - if (_rides[i].type != RIDE_TYPE_NULL) + if (!_rides[i].id.IsNull()) { count++; } @@ -135,90 +143,119 @@ size_t RideManager::size() const RideManager::Iterator RideManager::begin() { - const auto endIndex = static_cast(_rides.size()); - return RideManager::Iterator(*this, 0u, endIndex); + return RideManager::Iterator(*this, 0u, _endOfUsedRange); } RideManager::Iterator RideManager::end() { - const auto endIndex = static_cast(_rides.size()); - return RideManager::Iterator(*this, endIndex, endIndex); + return RideManager::Iterator(*this, _endOfUsedRange, _endOfUsedRange); } RideManager::Iterator RideManager::get(RideId rideId) { - return RideManager::Iterator(*this, rideId.ToUnderlying(), _rides.size()); + return RideManager::Iterator(*this, rideId.ToUnderlying(), _endOfUsedRange); } RideId GetNextFreeRideId() { - auto result = static_cast(_rides.size()); for (RideId::UnderlyingType i = 0; i < _rides.size(); i++) { - if (_rides[i].type == RIDE_TYPE_NULL) + if (_rides[i].id.IsNull()) { - result = i; - break; + return RideId::FromUnderlying(i); } } - if (result >= OpenRCT2::Limits::MaxRidesInPark) - { - return RideId::GetNull(); - } - return RideId::FromUnderlying(result); + return RideId::GetNull(); } -Ride* GetOrAllocateRide(RideId index) +Ride* RideAllocateAtIndex(RideId index) { const auto idx = index.ToUnderlying(); - if (_rides.size() <= idx) - { - _rides.resize(idx + 1); - } + _endOfUsedRange = std::max(idx + 1, _endOfUsedRange); auto result = &_rides[idx]; + assert(result->id == RideId::GetNull()); + result->id = index; return result; } -Ride* get_ride(RideId index) +Ride& RideGetTemporaryForPreview() { - const auto idx = index.ToUnderlying(); - if (idx < _rides.size()) + return _previewRide; +} + +static void RideReset(Ride& ride) +{ + ride.id = RideId::GetNull(); + ride.type = RIDE_TYPE_NULL; + ride.custom_name = {}; + ride.measurement = {}; +} + +void RideDelete(RideId id) +{ + const auto idx = id.ToUnderlying(); + + assert(idx < _rides.size()); + assert(_rides[idx].type != RIDE_TYPE_NULL); + + auto& ride = _rides[idx]; + RideReset(ride); + + // Shrink maximum ride size. + while (_endOfUsedRange > 0 && _rides[_endOfUsedRange - 1].id.IsNull()) { - auto& ride = _rides[idx]; - if (ride.type != RIDE_TYPE_NULL) - { - assert(ride.id == index); - return &ride; - } + _endOfUsedRange--; } +} + +Ride* GetRide(RideId index) +{ + if (index.IsNull()) + { + return nullptr; + } + + const auto idx = index.ToUnderlying(); + assert(idx < _rides.size()); + if (idx >= _rides.size()) + { + return nullptr; + } + + auto& ride = _rides[idx]; + if (ride.type != RIDE_TYPE_NULL) + { + assert(ride.id == index); + return &ride; + } + return nullptr; } -rct_ride_entry* get_ride_entry(ObjectEntryIndex index) +const RideObjectEntry* GetRideEntryByIndex(ObjectEntryIndex index) { - rct_ride_entry* result = nullptr; auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); auto obj = objMgr.GetLoadedObject(ObjectType::Ride, index); - if (obj != nullptr) + if (obj == nullptr) { - result = static_cast(obj->GetLegacyData()); + return nullptr; } - return result; + return static_cast(obj->GetLegacyData()); } -std::string_view get_ride_entry_name(ObjectEntryIndex index) +std::string_view GetRideEntryName(ObjectEntryIndex index) { if (index >= object_entry_group_counts[EnumValue(ObjectType::Ride)]) { - log_error("invalid index %d for ride type", index); + LOG_ERROR("invalid index %d for ride type", index); return {}; } - auto objectEntry = object_entry_get_object(ObjectType::Ride, index); + auto objectEntry = ObjectEntryGetObject(ObjectType::Ride, index); if (objectEntry != nullptr) { return objectEntry->GetLegacyIdentifier(); @@ -226,12 +263,12 @@ std::string_view get_ride_entry_name(ObjectEntryIndex index) return {}; } -rct_ride_entry* Ride::GetRideEntry() const +const RideObjectEntry* Ride::GetRideEntry() const { - return get_ride_entry(subtype); + return GetRideEntryByIndex(subtype); } -int32_t ride_get_count() +int32_t RideGetCount() { return static_cast(GetRideManager().size()); } @@ -327,11 +364,11 @@ void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Guest* peep) auto* queueHeadGuest = GetQueueHeadGuest(peep->CurrentRideStation); if (queueHeadGuest == nullptr) { - GetStation(peep->CurrentRideStation).LastPeepInQueue = peep->sprite_index; + GetStation(peep->CurrentRideStation).LastPeepInQueue = peep->Id; } else { - queueHeadGuest->GuestNextInQueue = peep->sprite_index; + queueHeadGuest->GuestNextInQueue = peep->Id; } UpdateQueueLength(peep->CurrentRideStation); } @@ -340,7 +377,7 @@ void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Guest* peep) * * rct2: 0x006AC916 */ -void ride_update_favourited_stat() +void RideUpdateFavouritedStat() { for (auto& ride : GetRideManager()) ride.guests_favourite = 0; @@ -349,7 +386,7 @@ void ride_update_favourited_stat() { if (!peep->FavouriteRide.IsNull()) { - auto ride = get_ride(peep->FavouriteRide); + auto ride = GetRide(peep->FavouriteRide); if (ride != nullptr) { ride->guests_favourite++; @@ -358,7 +395,7 @@ void ride_update_favourited_stat() } } - window_invalidate_by_class(WindowClass::RideList); + WindowInvalidateByClass(WindowClass::RideList); } /** @@ -368,13 +405,13 @@ void ride_update_favourited_stat() money64 Ride::CalculateIncomePerHour() const { // Get entry by ride to provide better reporting - rct_ride_entry* entry = GetRideEntry(); + const auto* entry = GetRideEntry(); if (entry == nullptr) { return 0; } - auto customersPerHour = ride_customers_per_hour(this); - money64 priceMinusCost = ride_get_price(this); + auto customersPerHour = RideCustomersPerHour(*this); + money64 priceMinusCost = RideGetPrice(*this); ShopItem currentShopItem = entry->shop_item[0]; if (currentShopItem != ShopItem::None) @@ -387,7 +424,7 @@ money64 Ride::CalculateIncomePerHour() const if (currentShopItem != ShopItem::None) { - const money16 shopItemProfit = price[1] - GetShopItemDescriptor(currentShopItem).Cost; + const money64 shopItemProfit = price[1] - GetShopItemDescriptor(currentShopItem).Cost; if (GetShopItemDescriptor(currentShopItem).IsPhoto()) { @@ -421,17 +458,17 @@ money64 Ride::CalculateIncomePerHour() const * dl ride index * esi result map element */ -bool ride_try_get_origin_element(const Ride* ride, CoordsXYE* output) +bool RideTryGetOriginElement(const Ride& ride, CoordsXYE* output) { TileElement* resultTileElement = nullptr; - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do { if (it.element->GetType() != TileElementType::Track) continue; - if (it.element->AsTrack()->GetRideIndex() != ride->id) + if (it.element->AsTrack()->GetRideIndex() != ride.id) continue; // Found a track piece for target ride @@ -473,8 +510,8 @@ bool ride_try_get_origin_element(const Ride* ride, CoordsXYE* output) * Use track_block_get_next if you are unsure if you are * on the first element of a track block */ -bool track_block_get_next_from_zero( - const CoordsXYZ& startPos, Ride* ride, uint8_t direction_start, CoordsXYE* output, int32_t* z, int32_t* direction, +bool TrackBlockGetNextFromZero( + const CoordsXYZ& startPos, const Ride& ride, uint8_t direction_start, CoordsXYE* output, int32_t* z, int32_t* direction, bool isGhost) { auto trackPos = startPos; @@ -498,7 +535,7 @@ bool track_block_get_next_from_zero( if (trackElement == nullptr) continue; - if (trackElement->GetRideIndex() != ride->id) + if (trackElement->GetRideIndex() != ride.id) continue; if (trackElement->GetSequenceIndex() != 0) @@ -543,7 +580,7 @@ bool track_block_get_next_from_zero( * * rct2: 0x006C60C2 */ -bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32_t* direction) +bool TrackBlockGetNext(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32_t* direction) { if (input == nullptr || input->element == nullptr) return false; @@ -553,7 +590,7 @@ bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32 return false; auto rideIndex = inputElement->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -582,7 +619,7 @@ bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32 uint8_t directionStart = ((trackCoordinate.rotation_end + rotation) & TILE_ELEMENT_DIRECTION_MASK) | (trackCoordinate.rotation_end & TRACK_BLOCK_2); - return track_block_get_next_from_zero({ coords, OriginZ }, ride, directionStart, output, z, direction, false); + return TrackBlockGetNextFromZero({ coords, OriginZ }, *ride, directionStart, output, z, direction, false); } /** @@ -593,8 +630,8 @@ bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32 * element of a track block * rct2: 0x006C63D6 */ -bool track_block_get_previous_from_zero( - const CoordsXYZ& startPos, Ride* ride, uint8_t direction, track_begin_end* outTrackBeginEnd) +bool TrackBlockGetPreviousFromZero( + const CoordsXYZ& startPos, const Ride& ride, uint8_t direction, TrackBeginEnd* outTrackBeginEnd) { uint8_t directionStart = direction; direction = DirectionReverse(direction); @@ -621,7 +658,7 @@ bool track_block_get_previous_from_zero( if (trackElement == nullptr) continue; - if (trackElement->GetRideIndex() != ride->id) + if (trackElement->GetRideIndex() != ride.id) continue; const auto* ted = &GetTrackElementDescriptor(trackElement->GetTrackType()); @@ -686,7 +723,7 @@ bool track_block_get_previous_from_zero( * higher two bytes of ecx and edx where as outTrackBeginEnd.end_x and * outTrackBeginEnd.end_y will be in the lower two bytes (cx and dx). */ -bool track_block_get_previous(const CoordsXYE& trackPos, track_begin_end* outTrackBeginEnd) +bool TrackBlockGetPrevious(const CoordsXYE& trackPos, TrackBeginEnd* outTrackBeginEnd) { if (trackPos.element == nullptr) return false; @@ -698,7 +735,7 @@ bool track_block_get_previous(const CoordsXYE& trackPos, track_begin_end* outTra const auto& ted = GetTrackElementDescriptor(trackElement->GetTrackType()); auto rideIndex = trackElement->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -721,7 +758,7 @@ bool track_block_get_previous(const CoordsXYE& trackPos, track_begin_end* outTra rotation = ((trackCoordinate.rotation_begin + rotation) & TILE_ELEMENT_DIRECTION_MASK) | (trackCoordinate.rotation_begin & TRACK_BLOCK_2); - return track_block_get_previous_from_zero({ coords, z }, ride, rotation, outTrackBeginEnd); + return TrackBlockGetPreviousFromZero({ coords, z }, *ride, rotation, outTrackBeginEnd); } /** @@ -732,52 +769,51 @@ bool track_block_get_previous(const CoordsXYE& trackPos, track_begin_end* outTra * bx result y * esi input / output map element */ -int32_t ride_find_track_gap(const Ride* ride, CoordsXYE* input, CoordsXYE* output) +bool Ride::FindTrackGap(const CoordsXYE& input, CoordsXYE* output) const { - if (ride == nullptr || input == nullptr || input->element == nullptr || input->element->GetType() != TileElementType::Track) - return 0; + if (input.element == nullptr || input.element->GetType() != TileElementType::Track) + return false; - if (ride->type == RIDE_TYPE_MAZE) - { - return 0; - } + const auto& rtd = GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + return false; - rct_window* w = window_find_by_class(WindowClass::RideConstruction); - if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == ride->id) + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); + if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == id) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); } bool moveSlowIt = true; - track_circuit_iterator it = {}; - track_circuit_iterator_begin(&it, *input); - track_circuit_iterator slowIt = it; - while (track_circuit_iterator_next(&it)) + TrackCircuitIterator it = {}; + TrackCircuitIteratorBegin(&it, input); + TrackCircuitIterator slowIt = it; + while (TrackCircuitIteratorNext(&it)) { - if (!track_is_connected_by_shape(it.last.element, it.current.element)) + if (!TrackIsConnectedByShape(it.last.element, it.current.element)) { *output = it.current; - return 1; + return true; } // #2081: prevent an infinite loop moveSlowIt = !moveSlowIt; if (moveSlowIt) { - track_circuit_iterator_next(&slowIt); - if (track_circuit_iterators_match(&it, &slowIt)) + TrackCircuitIteratorNext(&slowIt); + if (TrackCircuitIteratorsMatch(&it, &slowIt)) { *output = it.current; - return 1; + return true; } } } if (!it.looped) { *output = it.last; - return 1; + return true; } - return 0; + return false; } void Ride::FormatStatusTo(Formatter& ft) const @@ -903,17 +939,17 @@ bool Ride::SupportsStatus(RideStatus s) const * * rct2: 0x006ACA89 */ -void ride_init_all() +void RideInitAll() { - _rides.clear(); - _rides.shrink_to_fit(); + std::for_each(std::begin(_rides), std::end(_rides), RideReset); + _endOfUsedRange = 0; } /** * * rct2: 0x006B7A38 */ -void reset_all_ride_build_dates() +void ResetAllRideBuildDates() { for (auto& ride : GetRideManager()) { @@ -959,7 +995,7 @@ void Ride::UpdateAll() return; } - window_update_viewport_ride_music(); + WindowUpdateViewportRideMusic(); // Update rides for (auto& ride : GetRideManager()) @@ -976,7 +1012,7 @@ std::unique_ptr Ride::SaveToTrackDesign(TrackDesignState& tds) cons return nullptr; } - if (!ride_has_ratings(this)) + if (!RideHasRatings(*this)) { ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, STR_NONE, {}); return nullptr; @@ -984,11 +1020,15 @@ std::unique_ptr Ride::SaveToTrackDesign(TrackDesignState& tds) cons auto td = std::make_unique(); auto errMessage = td->CreateTrackDesign(tds, *this); - if (errMessage != STR_NONE) + if (!errMessage.Successful) { - ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, errMessage, {}); + ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, errMessage.Message, {}); return nullptr; } + if (errMessage.HasMessage()) + { + ContextShowError(errMessage.Message, STR_EMPTY, {}); + } return td; } @@ -1029,12 +1069,13 @@ void Ride::Update() if (vehicle_change_timeout != 0) vehicle_change_timeout--; - RideMusicUpdate(this); + RideMusicUpdate(*this); // Update stations - if (type != RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) - ride_update_station(this, StationIndex::FromUnderlying(i)); + RideUpdateStation(*this, StationIndex::FromUnderlying(i)); // Update financial statistics num_customers_timeout++; @@ -1057,16 +1098,15 @@ void Ride::Update() income_per_hour = CalculateIncomePerHour(); window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - if (upkeep_cost != MONEY16_UNDEFINED) - profit = (income_per_hour - (static_cast(upkeep_cost * 16))); + if (upkeep_cost != MONEY64_UNDEFINED) + profit = income_per_hour - (upkeep_cost * 16); } // Ride specific updates - const auto& rtd = GetRideTypeDescriptor(); if (rtd.RideUpdate != nullptr) rtd.RideUpdate(*this); - ride_breakdown_update(this); + RideBreakdownUpdate(*this); // Various things include news messages if (lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION)) @@ -1076,10 +1116,10 @@ void Ride::Update() // for identical balance with vanilla. const auto updatingRideByte = static_cast((gCurrentTicks / 2) & 0xFF); if (updatingRideByte == static_cast(id.ToUnderlying())) - ride_breakdown_status_update(this); + RideBreakdownStatusUpdate(*this); } - ride_inspection_update(this); + RideInspectionUpdate(*this); // If ride is simulating but crashed, reset the vehicles if (status == RideStatus::Simulating && (lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) @@ -1217,7 +1257,7 @@ void UpdateSpiralSlide(Ride& ride) } } - const uint8_t current_rotation = get_current_rotation(); + const uint8_t current_rotation = GetCurrentRotation(); // Invalidate something related to station start for (int32_t i = 0; i < OpenRCT2::Limits::MaxStationsPerRide; i++) { @@ -1226,7 +1266,7 @@ void UpdateSpiralSlide(Ride& ride) auto startLoc = ride.stations[i].Start; - TileElement* tileElement = ride_get_station_start_track_element(&ride, StationIndex::FromUnderlying(i)); + TileElement* tileElement = RideGetStationStartTrackElement(ride, StationIndex::FromUnderlying(i)); if (tileElement == nullptr) continue; @@ -1256,64 +1296,64 @@ static uint8_t _breakdownProblemProbabilities[] = { * * rct2: 0x006AC7C2 */ -static void ride_inspection_update(Ride* ride) +static void RideInspectionUpdate(Ride& ride) { if (gCurrentTicks & 2047) return; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) return; - ride->last_inspection++; - if (ride->last_inspection == 0) - ride->last_inspection--; + ride.last_inspection++; + if (ride.last_inspection == 0) + ride.last_inspection--; - int32_t inspectionIntervalMinutes = RideInspectionInterval[ride->inspection_interval]; + int32_t inspectionIntervalMinutes = RideInspectionInterval[ride.inspection_interval]; // An inspection interval of 0 minutes means the ride is set to never be inspected. if (inspectionIntervalMinutes == 0) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; return; } - if (ride->GetRideTypeDescriptor().AvailableBreakdowns == 0) + if (ride.GetRideTypeDescriptor().AvailableBreakdowns == 0) return; - if (inspectionIntervalMinutes > ride->last_inspection) + if (inspectionIntervalMinutes > ride.last_inspection) return; - if (ride->lifecycle_flags + if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION | RIDE_LIFECYCLE_CRASHED)) return; // Inspect the first station that has an exit - ride->lifecycle_flags |= RIDE_LIFECYCLE_DUE_INSPECTION; - ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride.lifecycle_flags |= RIDE_LIFECYCLE_DUE_INSPECTION; + ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - auto stationIndex = ride_get_first_valid_station_exit(ride); - ride->inspection_station = (!stationIndex.IsNull()) ? stationIndex : StationIndex::FromUnderlying(0); + auto stationIndex = RideGetFirstValidStationExit(ride); + ride.inspection_station = (!stationIndex.IsNull()) ? stationIndex : StationIndex::FromUnderlying(0); } -static int32_t get_age_penalty(Ride* ride) +static int32_t GetAgePenalty(const Ride& ride) { - auto years = date_get_year(ride->GetAge()); + auto years = DateGetYear(ride.GetAge()); switch (years) { case 0: return 0; case 1: - return ride->unreliability_factor / 8; + return ride.unreliability_factor / 8; case 2: - return ride->unreliability_factor / 4; + return ride.unreliability_factor / 4; case 3: case 4: - return ride->unreliability_factor / 2; + return ride.unreliability_factor / 2; case 5: case 6: case 7: - return ride->unreliability_factor; + return ride.unreliability_factor; default: - return ride->unreliability_factor * 2; + return ride.unreliability_factor * 2; } } @@ -1321,7 +1361,7 @@ static int32_t get_age_penalty(Ride* ride) * * rct2: 0x006AC622 */ -static void ride_breakdown_update(Ride* ride) +static void RideBreakdownUpdate(Ride& ride) { if (gCurrentTicks & 255) return; @@ -1329,8 +1369,8 @@ static void ride_breakdown_update(Ride* ride) if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) return; - if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) - ride->downtime_history[0]++; + if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + ride.downtime_history[0]++; if (!(gCurrentTicks & 8191)) { @@ -1338,35 +1378,35 @@ static void ride_breakdown_update(Ride* ride) for (int32_t i = 0; i < OpenRCT2::Limits::DowntimeHistorySize; i++) { - totalDowntime += ride->downtime_history[i]; + totalDowntime += ride.downtime_history[i]; } - ride->downtime = std::min(totalDowntime / 2, 100); + ride.downtime = std::min(totalDowntime / 2, 100); for (int32_t i = OpenRCT2::Limits::DowntimeHistorySize - 1; i > 0; i--) { - ride->downtime_history[i] = ride->downtime_history[i - 1]; + ride.downtime_history[i] = ride.downtime_history[i - 1]; } - ride->downtime_history[0] = 0; + ride.downtime_history[0] = 0; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; } - if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) return; - if (ride->status == RideStatus::Closed || ride->status == RideStatus::Simulating) + if (ride.status == RideStatus::Closed || ride.status == RideStatus::Simulating) return; - if (!ride->CanBreakDown()) + if (!ride.CanBreakDown()) { - ride->reliability = RIDE_INITIAL_RELIABILITY; + ride.reliability = RIDE_INITIAL_RELIABILITY; return; } // Calculate breakdown probability? - int32_t unreliabilityAccumulator = ride->unreliability_factor + get_age_penalty(ride); - ride->reliability = static_cast(std::max(0, (ride->reliability - unreliabilityAccumulator))); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + int32_t unreliabilityAccumulator = ride.unreliability_factor + GetAgePenalty(ride); + ride.reliability = static_cast(std::max(0, (ride.reliability - unreliabilityAccumulator))); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; // Random probability of a breakdown. Roughly this is 1 in // @@ -1374,13 +1414,13 @@ static void ride_breakdown_update(Ride* ride) // // a 0.8% chance, less the breakdown factor which accumulates as the game // continues. - if ((ride->reliability == 0 - || static_cast(scenario_rand() & 0x2FFFFF) <= 1 + RIDE_INITIAL_RELIABILITY - ride->reliability) + if ((ride.reliability == 0 + || static_cast(ScenarioRand() & 0x2FFFFF) <= 1 + RIDE_INITIAL_RELIABILITY - ride.reliability) && !gCheatsDisableAllBreakdowns) { - int32_t breakdownReason = ride_get_new_breakdown_problem(ride); + int32_t breakdownReason = RideGetNewBreakdownProblem(ride); if (breakdownReason != -1) - ride_prepare_breakdown(ride, breakdownReason); + RidePrepareBreakdown(ride, breakdownReason); } } @@ -1388,24 +1428,24 @@ static void ride_breakdown_update(Ride* ride) * * rct2: 0x006B7294 */ -static int32_t ride_get_new_breakdown_problem(Ride* ride) +static int32_t RideGetNewBreakdownProblem(const Ride& ride) { int32_t availableBreakdownProblems, totalProbability, randomProbability, problemBits, breakdownProblem; // Brake failure is more likely when it's raining _breakdownProblemProbabilities[BREAKDOWN_BRAKES_FAILURE] = ClimateIsRaining() ? 20 : 3; - if (!ride->CanBreakDown()) + if (!ride.CanBreakDown()) return -1; - availableBreakdownProblems = ride->GetRideTypeDescriptor().AvailableBreakdowns; + availableBreakdownProblems = ride.GetRideTypeDescriptor().AvailableBreakdowns; // Calculate the total probability range for all possible breakdown problems totalProbability = 0; problemBits = availableBreakdownProblems; while (problemBits != 0) { - breakdownProblem = bitscanforward(problemBits); + breakdownProblem = UtilBitScanForward(problemBits); problemBits &= ~(1 << breakdownProblem); totalProbability += _breakdownProblemProbabilities[breakdownProblem]; } @@ -1413,13 +1453,13 @@ static int32_t ride_get_new_breakdown_problem(Ride* ride) return -1; // Choose a random number within this range - randomProbability = scenario_rand() % totalProbability; + randomProbability = ScenarioRand() % totalProbability; // Find which problem range the random number lies problemBits = availableBreakdownProblems; do { - breakdownProblem = bitscanforward(problemBits); + breakdownProblem = UtilBitScanForward(problemBits); problemBits &= ~(1 << breakdownProblem); randomProbability -= _breakdownProblemProbabilities[breakdownProblem]; } while (randomProbability >= 0); @@ -1430,16 +1470,16 @@ static int32_t ride_get_new_breakdown_problem(Ride* ride) // Brakes failure can not happen if block brakes are used (so long as there is more than one vehicle) // However if this is the case, brake failure should be taken out the equation, otherwise block brake // rides have a lower probability to break down due to a random implementation reason. - if (ride->IsBlockSectioned()) - if (ride->NumTrains != 1) + if (ride.IsBlockSectioned()) + if (ride.NumTrains != 1) return -1; // If brakes failure is disabled, also take it out of the equation (see above comment why) if (gCheatsDisableBrakesFailure) return -1; - auto monthsOld = ride->GetAge(); - if (monthsOld < 16 || ride->reliability_percentage > 50) + auto monthsOld = ride.GetAge(); + if (monthsOld < 16 || ride.reliability_percentage > 50) return -1; return BREAKDOWN_BRAKES_FAILURE; @@ -1452,23 +1492,23 @@ bool Ride::CanBreakDown() const return false; } - rct_ride_entry* entry = GetRideEntry(); + const auto* entry = GetRideEntry(); return entry != nullptr && !(entry->flags & RIDE_ENTRY_FLAG_CANNOT_BREAK_DOWN); } -static void choose_random_train_to_breakdown_safe(Ride* ride) +static void ChooseRandomTrainToBreakdownSafe(Ride& ride) { // Prevent integer division by zero in case of hacked ride. - if (ride->NumTrains == 0) + if (ride.NumTrains == 0) return; - ride->broken_vehicle = scenario_rand() % ride->NumTrains; + ride.broken_vehicle = ScenarioRand() % ride.NumTrains; // Prevent crash caused by accessing SPRITE_INDEX_NULL on hacked rides. // This should probably be cleaned up on import instead. - while (ride->vehicles[ride->broken_vehicle].IsNull() && ride->broken_vehicle != 0) + while (ride.vehicles[ride.broken_vehicle].IsNull() && ride.broken_vehicle != 0) { - --ride->broken_vehicle; + --ride.broken_vehicle; } } @@ -1476,30 +1516,30 @@ static void choose_random_train_to_breakdown_safe(Ride* ride) * * rct2: 0x006B7348 */ -void ride_prepare_breakdown(Ride* ride, int32_t breakdownReason) +void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) { StationIndex i; Vehicle* vehicle; - if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) return; - ride->lifecycle_flags |= RIDE_LIFECYCLE_BREAKDOWN_PENDING; + ride.lifecycle_flags |= RIDE_LIFECYCLE_BREAKDOWN_PENDING; - ride->breakdown_reason_pending = breakdownReason; - ride->breakdown_sound_modifier = 0; - ride->not_fixed_timeout = 0; - ride->inspection_station = StationIndex::FromUnderlying(0); // ensure set to something. + ride.breakdown_reason_pending = breakdownReason; + ride.breakdown_sound_modifier = 0; + ride.not_fixed_timeout = 0; + ride.inspection_station = StationIndex::FromUnderlying(0); // ensure set to something. switch (breakdownReason) { case BREAKDOWN_SAFETY_CUT_OUT: case BREAKDOWN_CONTROL_FAILURE: // Inspect first station with an exit - i = ride_get_first_valid_station_exit(ride); + i = RideGetFirstValidStationExit(ride); if (!i.IsNull()) { - ride->inspection_station = i; + ride.inspection_station = i; } break; @@ -1508,42 +1548,42 @@ void ride_prepare_breakdown(Ride* ride, int32_t breakdownReason) case BREAKDOWN_DOORS_STUCK_CLOSED: case BREAKDOWN_DOORS_STUCK_OPEN: // Choose a random train and car - choose_random_train_to_breakdown_safe(ride); - if (ride->num_cars_per_train != 0) + ChooseRandomTrainToBreakdownSafe(ride); + if (ride.num_cars_per_train != 0) { - ride->broken_car = scenario_rand() % ride->num_cars_per_train; + ride.broken_car = ScenarioRand() % ride.num_cars_per_train; // Set flag on broken car - vehicle = GetEntity(ride->vehicles[ride->broken_vehicle]); + vehicle = GetEntity(ride.vehicles[ride.broken_vehicle]); if (vehicle != nullptr) { - vehicle = vehicle->GetCar(ride->broken_car); + vehicle = vehicle->GetCar(ride.broken_car); } if (vehicle != nullptr) { - vehicle->SetUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_CAR); + vehicle->SetFlag(VehicleFlags::CarIsBroken); } } break; case BREAKDOWN_VEHICLE_MALFUNCTION: // Choose a random train - choose_random_train_to_breakdown_safe(ride); - ride->broken_car = 0; + ChooseRandomTrainToBreakdownSafe(ride); + ride.broken_car = 0; // Set flag on broken train, first car - vehicle = GetEntity(ride->vehicles[ride->broken_vehicle]); + vehicle = GetEntity(ride.vehicles[ride.broken_vehicle]); if (vehicle != nullptr) { - vehicle->SetUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN); + vehicle->SetFlag(VehicleFlags::TrainIsBroken); } break; case BREAKDOWN_BRAKES_FAILURE: // Original code generates a random number but does not use it // Unsure if this was supposed to choose a random station (or random station with an exit) - i = ride_get_first_valid_station_exit(ride); + i = RideGetFirstValidStationExit(ride); if (!i.IsNull()) { - ride->inspection_station = i; + ride.inspection_station = i; } break; } @@ -1553,13 +1593,13 @@ void ride_prepare_breakdown(Ride* ride, int32_t breakdownReason) * * rct2: 0x006B74FA */ -void ride_breakdown_add_news_item(Ride* ride) +void RideBreakdownAddNewsItem(const Ride& ride) { if (gConfigNotifications.RideBrokenDown) { Formatter ft; - ride->FormatNameTo(ft); - News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_IS_BROKEN_DOWN, ride->id.ToUnderlying(), ft); + ride.FormatNameTo(ft); + News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_IS_BROKEN_DOWN, ride.id.ToUnderlying(), ft); } } @@ -1567,104 +1607,104 @@ void ride_breakdown_add_news_item(Ride* ride) * * rct2: 0x006B75C8 */ -static void ride_breakdown_status_update(Ride* ride) +static void RideBreakdownStatusUpdate(Ride& ride) { // Warn player if ride hasn't been fixed for ages - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) { - ride->not_fixed_timeout++; + ride.not_fixed_timeout++; // When there has been a full 255 timeout ticks this // will force timeout ticks to keep issuing news every // 16 ticks. Note there is no reason to do this. - if (ride->not_fixed_timeout == 0) - ride->not_fixed_timeout -= 16; + if (ride.not_fixed_timeout == 0) + ride.not_fixed_timeout -= 16; - if (!(ride->not_fixed_timeout & 15) && ride->mechanic_status != RIDE_MECHANIC_STATUS_FIXING - && ride->mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + if (!(ride.not_fixed_timeout & 15) && ride.mechanic_status != RIDE_MECHANIC_STATUS_FIXING + && ride.mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { if (gConfigNotifications.RideWarnings) { Formatter ft; - ride->FormatNameTo(ft); - News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_IS_STILL_NOT_FIXED, ride->id.ToUnderlying(), ft); + ride.FormatNameTo(ft); + News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_IS_STILL_NOT_FIXED, ride.id.ToUnderlying(), ft); } } } - ride_mechanic_status_update(ride, ride->mechanic_status); + RideMechanicStatusUpdate(ride, ride.mechanic_status); } /** * * rct2: 0x006B762F */ -static void ride_mechanic_status_update(Ride* ride, int32_t mechanicStatus) +static void RideMechanicStatusUpdate(Ride& ride, int32_t mechanicStatus) { // Turn a pending breakdown into a breakdown. if ((mechanicStatus == RIDE_MECHANIC_STATUS_UNDEFINED || mechanicStatus == RIDE_MECHANIC_STATUS_CALLING || mechanicStatus == RIDE_MECHANIC_STATUS_HEADING) - && (ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + && (ride.lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) && !(ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - auto breakdownReason = ride->breakdown_reason_pending; + auto breakdownReason = ride.breakdown_reason_pending; if (breakdownReason == BREAKDOWN_SAFETY_CUT_OUT || breakdownReason == BREAKDOWN_BRAKES_FAILURE || breakdownReason == BREAKDOWN_CONTROL_FAILURE) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_LIST + ride.lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAIN; - ride->breakdown_reason = breakdownReason; - ride_breakdown_add_news_item(ride); + ride.breakdown_reason = breakdownReason; + RideBreakdownAddNewsItem(ride); } } switch (mechanicStatus) { case RIDE_MECHANIC_STATUS_UNDEFINED: - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) { - ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; } break; case RIDE_MECHANIC_STATUS_CALLING: - if (ride->GetRideTypeDescriptor().AvailableBreakdowns == 0) + if (ride.GetRideTypeDescriptor().AvailableBreakdowns == 0) { - ride->lifecycle_flags &= ~( + ride.lifecycle_flags &= ~( RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION); break; } - ride_call_closest_mechanic(ride); + RideCallClosestMechanic(ride); break; case RIDE_MECHANIC_STATUS_HEADING: { - auto mechanic = ride_get_mechanic(ride); - bool rideNeedsRepair = (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)); + auto mechanic = RideGetMechanic(ride); + bool rideNeedsRepair = (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)); if (mechanic == nullptr || (mechanic->State != PeepState::HeadingToInspection && mechanic->State != PeepState::Answering) - || mechanic->CurrentRide != ride->id) + || mechanic->CurrentRide != ride.id) { - ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; - ride_mechanic_status_update(ride, RIDE_MECHANIC_STATUS_CALLING); + ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + RideMechanicStatusUpdate(ride, RIDE_MECHANIC_STATUS_CALLING); } // if the ride is broken down, but a mechanic was heading for an inspection, update orders to fix else if (rideNeedsRepair && mechanic->State == PeepState::HeadingToInspection) { // updates orders for mechanic already heading to inspect ride // forInspection == false means start repair (goes to PeepState::Answering) - ride_call_mechanic(ride, mechanic, false); + RideCallMechanic(ride, mechanic, false); } break; } case RIDE_MECHANIC_STATUS_FIXING: { - auto mechanic = ride_get_mechanic(ride); + auto mechanic = RideGetMechanic(ride); if (mechanic == nullptr || (mechanic->State != PeepState::HeadingToInspection && mechanic->State != PeepState::Fixing && mechanic->State != PeepState::Inspecting && mechanic->State != PeepState::Answering)) { - ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; - ride_mechanic_status_update(ride, RIDE_MECHANIC_STATUS_CALLING); + ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + RideMechanicStatusUpdate(ride, RIDE_MECHANIC_STATUS_CALLING); } break; } @@ -1675,33 +1715,33 @@ static void ride_mechanic_status_update(Ride* ride, int32_t mechanicStatus) * * rct2: 0x006B796C */ -static void ride_call_mechanic(Ride* ride, Peep* mechanic, int32_t forInspection) +static void RideCallMechanic(Ride& ride, Peep* mechanic, int32_t forInspection) { mechanic->SetState(forInspection ? PeepState::HeadingToInspection : PeepState::Answering); mechanic->SubState = 0; - ride->mechanic_status = RIDE_MECHANIC_STATUS_HEADING; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; - ride->mechanic = mechanic->sprite_index; - mechanic->CurrentRide = ride->id; - mechanic->CurrentRideStation = ride->inspection_station; + ride.mechanic_status = RIDE_MECHANIC_STATUS_HEADING; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanic = mechanic->Id; + mechanic->CurrentRide = ride.id; + mechanic->CurrentRideStation = ride.inspection_station; } /** * * rct2: 0x006B76AB */ -static void ride_call_closest_mechanic(Ride* ride) +static void RideCallClosestMechanic(Ride& ride) { - auto forInspection = (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) == 0; - auto mechanic = ride_find_closest_mechanic(ride, forInspection); + auto forInspection = (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) == 0; + auto mechanic = RideFindClosestMechanic(ride, forInspection); if (mechanic != nullptr) - ride_call_mechanic(ride, mechanic, forInspection); + RideCallMechanic(ride, mechanic, forInspection); } -Staff* ride_find_closest_mechanic(Ride* ride, int32_t forInspection) +Staff* RideFindClosestMechanic(const Ride& ride, int32_t forInspection) { // Get either exit position or entrance position if there is no exit - auto& station = ride->GetStation(ride->inspection_station); + auto& station = ride.GetStation(ride.inspection_station); TileCoordsXYZD location = station.Exit; if (location.IsNull()) { @@ -1712,14 +1752,14 @@ Staff* ride_find_closest_mechanic(Ride* ride, int32_t forInspection) // Get station start track element and position auto mapLocation = location.ToCoordsXYZ(); - TileElement* tileElement = ride_get_station_exit_element(mapLocation); + TileElement* tileElement = RideGetStationExitElement(mapLocation); if (tileElement == nullptr) return nullptr; // Set x,y to centre of the station exit for the mechanic search. auto centreMapLocation = mapLocation.ToTileCentre(); - return find_closest_mechanic(centreMapLocation, forInspection); + return FindClosestMechanic(centreMapLocation, forInspection); } /** @@ -1727,7 +1767,7 @@ Staff* ride_find_closest_mechanic(Ride* ride, int32_t forInspection) * rct2: 0x006B774B (forInspection = 0) * rct2: 0x006B78C3 (forInspection = 1) */ -Staff* find_closest_mechanic(const CoordsXY& entrancePosition, int32_t forInspection) +Staff* FindClosestMechanic(const CoordsXY& entrancePosition, int32_t forInspection) { Staff* closestMechanic = nullptr; uint32_t closestDistance = std::numeric_limits::max(); @@ -1776,9 +1816,9 @@ Staff* find_closest_mechanic(const CoordsXY& entrancePosition, int32_t forInspec return closestMechanic; } -Staff* ride_get_mechanic(Ride* ride) +Staff* RideGetMechanic(const Ride& ride) { - auto staff = GetEntity(ride->mechanic); + auto staff = GetEntity(ride.mechanic); if (staff != nullptr && staff->IsMechanic()) { return staff; @@ -1786,14 +1826,14 @@ Staff* ride_get_mechanic(Ride* ride) return nullptr; } -Staff* ride_get_assigned_mechanic(Ride* ride) +Staff* RideGetAssignedMechanic(const Ride& ride) { - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) { - if (ride->mechanic_status == RIDE_MECHANIC_STATUS_HEADING || ride->mechanic_status == RIDE_MECHANIC_STATUS_FIXING - || ride->mechanic_status == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + if (ride.mechanic_status == RIDE_MECHANIC_STATUS_HEADING || ride.mechanic_status == RIDE_MECHANIC_STATUS_FIXING + || ride.mechanic_status == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { - return ride_get_mechanic(ride); + return RideGetMechanic(ride); } } @@ -1808,15 +1848,15 @@ Staff* ride_get_assigned_mechanic(Ride* ride) * * Calculates the sample rate for ride music. */ -static int32_t RideMusicSampleRate(Ride* ride) +static int32_t RideMusicSampleRate(const Ride& ride) { int32_t sampleRate = 22050; // Alter sample rate for a power cut effect - if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { - sampleRate = ride->breakdown_sound_modifier * 70; - if (ride->breakdown_reason_pending != BREAKDOWN_CONTROL_FAILURE) + sampleRate = ride.breakdown_sound_modifier * 70; + if (ride.breakdown_reason_pending != BREAKDOWN_CONTROL_FAILURE) sampleRate *= -1; sampleRate += 22050; } @@ -1828,30 +1868,29 @@ static int32_t RideMusicSampleRate(Ride* ride) * * Ride music slows down upon breaking. If it's completely broken, no music should play. */ -static bool RideMusicBreakdownEffect(Ride* ride) +static bool RideMusicBreakdownEffect(Ride& ride) { // Oscillate parameters for a power cut effect when breaking down - if (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { - if (ride->breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) + if (ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) { if (!(gCurrentTicks & 7)) - if (ride->breakdown_sound_modifier != 255) - ride->breakdown_sound_modifier++; + if (ride.breakdown_sound_modifier != 255) + ride.breakdown_sound_modifier++; } else { - if ((ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) - || ride->breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE - || ride->breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) + if ((ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) || ride.breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE + || ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) { - if (ride->breakdown_sound_modifier != 255) - ride->breakdown_sound_modifier++; + if (ride.breakdown_sound_modifier != 255) + ride.breakdown_sound_modifier++; } - if (ride->breakdown_sound_modifier == 255) + if (ride.breakdown_sound_modifier == 255) { - ride->music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = TUNE_ID_NULL; return true; } } @@ -1863,13 +1902,13 @@ static bool RideMusicBreakdownEffect(Ride* ride) * * Circus music is a sound effect, rather than music. Needs separate processing. */ -void CircusMusicUpdate(Ride* ride) +void CircusMusicUpdate(Ride& ride) { - Vehicle* vehicle = GetEntity(ride->vehicles[0]); + Vehicle* vehicle = GetEntity(ride.vehicles[0]); if (vehicle == nullptr || vehicle->status != Vehicle::Status::DoingCircusShow) { - ride->music_position = 0; - ride->music_tune_id = TUNE_ID_NULL; + ride.music_position = 0; + ride.music_tune_id = TUNE_ID_NULL; return; } @@ -1878,22 +1917,22 @@ void CircusMusicUpdate(Ride* ride) return; } - CoordsXYZ rideCoords = ride->GetStation().GetStart().ToTileCentre(); + CoordsXYZ rideCoords = ride.GetStation().GetStart().ToTileCentre(); const auto sampleRate = RideMusicSampleRate(ride); - OpenRCT2::RideAudio::UpdateMusicInstance(*ride, rideCoords, sampleRate); + OpenRCT2::RideAudio::UpdateMusicInstance(ride, rideCoords, sampleRate); } /** * * rct2: 0x006ABE85 */ -void DefaultMusicUpdate(Ride* ride) +void DefaultMusicUpdate(Ride& ride) { - if (ride->status != RideStatus::Open || !(ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC)) + if (ride.status != RideStatus::Open || !(ride.lifecycle_flags & RIDE_LIFECYCLE_MUSIC)) { - ride->music_tune_id = TUNE_ID_NULL; + ride.music_tune_id = TUNE_ID_NULL; return; } @@ -1903,29 +1942,29 @@ void DefaultMusicUpdate(Ride* ride) } // Select random tune from available tunes for a music style (of course only merry-go-rounds have more than one tune) - if (ride->music_tune_id == TUNE_ID_NULL) + if (ride.music_tune_id == TUNE_ID_NULL) { auto& objManager = GetContext()->GetObjectManager(); - auto musicObj = static_cast(objManager.GetLoadedObject(ObjectType::Music, ride->music)); + auto musicObj = static_cast(objManager.GetLoadedObject(ObjectType::Music, ride.music)); if (musicObj != nullptr) { auto numTracks = musicObj->GetTrackCount(); - ride->music_tune_id = static_cast(util_rand() % numTracks); - ride->music_position = 0; + ride.music_tune_id = static_cast(UtilRand() % numTracks); + ride.music_position = 0; } return; } - CoordsXYZ rideCoords = ride->GetStation().GetStart().ToTileCentre(); + CoordsXYZ rideCoords = ride.GetStation().GetStart().ToTileCentre(); int32_t sampleRate = RideMusicSampleRate(ride); - OpenRCT2::RideAudio::UpdateMusicInstance(*ride, rideCoords, sampleRate); + OpenRCT2::RideAudio::UpdateMusicInstance(ride, rideCoords, sampleRate); } -static void RideMusicUpdate(Ride* ride) +static void RideMusicUpdate(Ride& ride) { - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride.GetRideTypeDescriptor(); if (!rtd.HasFlag(RIDE_TYPE_FLAG_MUSIC_ON_DEFAULT) && !rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_MUSIC)) return; @@ -1940,7 +1979,7 @@ static void RideMusicUpdate(Ride* ride) * * rct2: 0x006B64F2 */ -static void ride_measurement_update(Ride& ride, RideMeasurement& measurement) +static void RideMeasurementUpdate(Ride& ride, RideMeasurement& measurement) { if (measurement.vehicle_index >= std::size(ride.vehicles)) return; @@ -2014,7 +2053,7 @@ static void ride_measurement_update(Ride& ride, RideMeasurement& measurement) * * rct2: 0x006B6456 */ -void ride_measurements_update() +void RideMeasurementsUpdate() { PROFILED_FUNCTION(); @@ -2029,7 +2068,7 @@ void ride_measurements_update() { if (measurement->flags & RIDE_MEASUREMENT_FLAG_RUNNING) { - ride_measurement_update(ride, *measurement); + RideMeasurementUpdate(ride, *measurement); } else { @@ -2047,7 +2086,7 @@ void ride_measurements_update() measurement->current_station = vehicle->current_station; measurement->flags |= RIDE_MEASUREMENT_FLAG_RUNNING; measurement->flags &= ~RIDE_MEASUREMENT_FLAG_UNLOADING; - ride_measurement_update(ride, *measurement); + RideMeasurementUpdate(ride, *measurement); break; } } @@ -2060,7 +2099,7 @@ void ride_measurements_update() /** * If there are more than the threshold of allowed ride measurements, free the non-LRU one. */ -static void ride_free_old_measurements() +static void RideFreeOldMeasurements() { size_t numRideMeasurements; do @@ -2104,7 +2143,7 @@ std::pair Ride::GetMeasurement() { measurement->flags |= RIDE_MEASUREMENT_FLAG_G_FORCES; } - ride_free_old_measurements(); + RideFreeOldMeasurements(); assert(measurement != nullptr); } @@ -2115,8 +2154,8 @@ std::pair Ride::GetMeasurement() } auto ft = Formatter(); - ft.Add(GetRideComponentName(GetRideTypeDescriptor().NameConvention.vehicle).singular); - ft.Add(GetRideComponentName(GetRideTypeDescriptor().NameConvention.station).singular); + ft.Add(GetRideComponentName(rtd.NameConvention.vehicle).singular); + ft.Add(GetRideComponentName(rtd.NameConvention.station).singular); return { nullptr, { STR_DATA_LOGGING_WILL_START_WHEN_NEXT_LEAVES, ft } }; } @@ -2124,20 +2163,11 @@ std::pair Ride::GetMeasurement() #pragma region Colour functions -TrackColour ride_get_track_colour(Ride* ride, int32_t colourScheme) -{ - TrackColour result; - result.main = ride->track_colour[colourScheme].main; - result.additional = ride->track_colour[colourScheme].additional; - result.supports = ride->track_colour[colourScheme].supports; - return result; -} - -VehicleColour ride_get_vehicle_colour(Ride* ride, int32_t vehicleIndex) +VehicleColour RideGetVehicleColour(const Ride& ride, int32_t vehicleIndex) { // Prevent indexing array out of bounds vehicleIndex = std::min(vehicleIndex, OpenRCT2::Limits::MaxCarsPerTrain); - return ride->vehicle_colours[vehicleIndex]; + return ride.vehicle_colours[vehicleIndex]; } static bool RideTypeVehicleColourExists(ObjectEntryIndex subType, const VehicleColour& vehicleColour) @@ -2153,9 +2183,9 @@ static bool RideTypeVehicleColourExists(ObjectEntryIndex subType, const VehicleC return false; } -int32_t ride_get_unused_preset_vehicle_colour(ObjectEntryIndex subType) +int32_t RideGetUnusedPresetVehicleColour(ObjectEntryIndex subType) { - const auto* rideEntry = get_ride_entry(subType); + const auto* rideEntry = GetRideEntryByIndex(subType); if (rideEntry == nullptr) return 0; @@ -2179,10 +2209,10 @@ int32_t ride_get_unused_preset_vehicle_colour(ObjectEntryIndex subType) // If all presets have been used, just go with a random preset if (unused.size() == 0) - return util_rand() % colourPresets->count; + return UtilRand() % colourPresets->count; // Choose a random preset from the list of unused presets - auto unusedIndex = util_rand() % unused.size(); + auto unusedIndex = UtilRand() % unused.size(); return unused[unusedIndex]; } @@ -2190,28 +2220,25 @@ int32_t ride_get_unused_preset_vehicle_colour(ObjectEntryIndex subType) * * rct2: 0x006DE52C */ -void ride_set_vehicle_colours_to_random_preset(Ride* ride, uint8_t preset_index) +void RideSetVehicleColoursToRandomPreset(Ride& ride, uint8_t preset_index) { - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); - vehicle_colour_preset_list* presetList = rideEntry->vehicle_preset_list; + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); + const auto* presetList = rideEntry->vehicle_preset_list; if (presetList->count != 0 && presetList->count != 255) { assert(preset_index < presetList->count); - ride->colour_scheme_type = RIDE_COLOUR_SCHEME_MODE_ALL_SAME; - VehicleColour* preset = &presetList->list[preset_index]; - ride->vehicle_colours[0] = *preset; + ride.colour_scheme_type = RIDE_COLOUR_SCHEME_MODE_ALL_SAME; + ride.vehicle_colours[0] = presetList->list[preset_index]; } else { - ride->colour_scheme_type = RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN; - uint32_t count = presetList->count; - for (uint32_t i = 0; i < count; i++) + ride.colour_scheme_type = RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN; + for (uint32_t i = 0; i < presetList->count; i++) { - auto index = i % static_cast(32); - VehicleColour* preset = &presetList->list[index]; - ride->vehicle_colours[i] = *preset; + const auto index = i % 32U; + ride.vehicle_colours[i] = presetList->list[index]; } } } @@ -2224,7 +2251,7 @@ void ride_set_vehicle_colours_to_random_preset(Ride* ride, uint8_t preset_index) * * rct2: 0x006B7A5E */ -void ride_check_all_reachable() +void RideCheckAllReachable() { for (auto& ride : GetRideManager()) { @@ -2234,9 +2261,9 @@ void ride_check_all_reachable() continue; if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) - ride_shop_connected(&ride); + RideShopConnected(ride); else - ride_entrance_exit_connected(&ride); + RideEntranceExitConnected(ride); } } @@ -2245,7 +2272,7 @@ void ride_check_all_reachable() * rct2: 0x006B7C59 * @return true if the coordinate is reachable or has no entrance, false otherwise */ -static bool ride_entrance_exit_is_reachable(const TileCoordsXYZD& coordinates) +static bool RideEntranceExitIsReachable(const TileCoordsXYZD& coordinates) { if (coordinates.IsNull()) return true; @@ -2256,9 +2283,9 @@ static bool ride_entrance_exit_is_reachable(const TileCoordsXYZD& coordinates) return MapCoordIsConnected(loc, coordinates.direction); } -static void ride_entrance_exit_connected(Ride* ride) +static void RideEntranceExitConnected(Ride& ride) { - for (auto& station : ride->GetStations()) + for (auto& station : ride.GetStations()) { auto station_start = station.Start; auto entrance = station.Entrance; @@ -2266,35 +2293,35 @@ static void ride_entrance_exit_connected(Ride* ride) if (station_start.IsNull()) continue; - if (!entrance.IsNull() && !ride_entrance_exit_is_reachable(entrance)) + if (!entrance.IsNull() && !RideEntranceExitIsReachable(entrance)) { // name of ride is parameter of the format string Formatter ft; - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); if (gConfigNotifications.RideWarnings) { - News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride->id.ToUnderlying(), ft); + News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } - ride->connected_message_throttle = 3; + ride.connected_message_throttle = 3; } - if (!exit.IsNull() && !ride_entrance_exit_is_reachable(exit)) + if (!exit.IsNull() && !RideEntranceExitIsReachable(exit)) { // name of ride is parameter of the format string Formatter ft; - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); if (gConfigNotifications.RideWarnings) { - News::AddItemToQueue(News::ItemType::Ride, STR_EXIT_NOT_CONNECTED, ride->id.ToUnderlying(), ft); + News::AddItemToQueue(News::ItemType::Ride, STR_EXIT_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } - ride->connected_message_throttle = 3; + ride.connected_message_throttle = 3; } } } -static void ride_shop_connected(Ride* ride) +static void RideShopConnected(const Ride& ride) { - auto shopLoc = TileCoordsXY(ride->GetStation().Start); + auto shopLoc = TileCoordsXY(ride.GetStation().Start); if (shopLoc.IsNull()) return; @@ -2304,7 +2331,7 @@ static void ride_shop_connected(Ride* ride) { if (tileElement == nullptr) break; - if (tileElement->GetType() == TileElementType::Track && tileElement->AsTrack()->GetRideIndex() == ride->id) + if (tileElement->GetType() == TileElementType::Track && tileElement->AsTrack()->GetRideIndex() == ride.id) { trackElement = tileElement->AsTrack(); break; @@ -2315,8 +2342,8 @@ static void ride_shop_connected(Ride* ride) return; auto track_type = trackElement->GetTrackType(); - ride = get_ride(trackElement->GetRideIndex()); - if (ride == nullptr) + auto ride2 = GetRide(trackElement->GetRideIndex()); + if (ride2 == nullptr) { return; } @@ -2345,7 +2372,7 @@ static void ride_shop_connected(Ride* ride) int32_t y2 = shopLoc.y - TileDirectionDelta[face_direction].y; int32_t x2 = shopLoc.x - TileDirectionDelta[face_direction].x; - if (MapCoordIsConnected({ x2, y2, tileElement->base_height }, face_direction)) + if (MapCoordIsConnected({ x2, y2, tileElement->BaseHeight }, face_direction)) return; } @@ -2353,21 +2380,21 @@ static void ride_shop_connected(Ride* ride) if (gConfigNotifications.RideWarnings) { Formatter ft; - ride->FormatNameTo(ft); - News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride->id.ToUnderlying(), ft); + ride2->FormatNameTo(ft); + News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride2->id.ToUnderlying(), ft); } - ride->connected_message_throttle = 3; + ride2->connected_message_throttle = 3; } #pragma endregion #pragma region Interface -static void ride_track_set_map_tooltip(TileElement* tileElement) +static void RideTrackSetMapTooltip(TileElement* tileElement) { auto rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { auto ft = Formatter(); @@ -2375,15 +2402,15 @@ static void ride_track_set_map_tooltip(TileElement* tileElement) ride->FormatNameTo(ft); ride->FormatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } } -static void ride_queue_banner_set_map_tooltip(TileElement* tileElement) +static void RideQueueBannerSetMapTooltip(TileElement* tileElement) { auto rideIndex = tileElement->AsPath()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { auto ft = Formatter(); @@ -2391,15 +2418,15 @@ static void ride_queue_banner_set_map_tooltip(TileElement* tileElement) ride->FormatNameTo(ft); ride->FormatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } } -static void ride_station_set_map_tooltip(TileElement* tileElement) +static void RideStationSetMapTooltip(TileElement* tileElement) { auto rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { auto stationIndex = tileElement->AsTrack()->GetStationIndex(); @@ -2415,15 +2442,15 @@ static void ride_station_set_map_tooltip(TileElement* tileElement) ft.Add(stationIndex.ToUnderlying() + 1); ride->FormatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } } -static void ride_entrance_set_map_tooltip(TileElement* tileElement) +static void RideEntranceSetMapTooltip(TileElement* tileElement) { auto rideIndex = tileElement->AsEntrance()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr) { // Get the station @@ -2462,7 +2489,7 @@ static void ride_entrance_set_map_tooltip(TileElement* tileElement) } ft.Add(queueLength); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } else @@ -2482,32 +2509,32 @@ static void ride_entrance_set_map_tooltip(TileElement* tileElement) ft.Add(stationIndex.ToUnderlying() + 1); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } } } -void ride_set_map_tooltip(TileElement* tileElement) +void RideSetMapTooltip(TileElement* tileElement) { if (tileElement->GetType() == TileElementType::Entrance) { - ride_entrance_set_map_tooltip(tileElement); + RideEntranceSetMapTooltip(tileElement); } else if (tileElement->GetType() == TileElementType::Track) { if (tileElement->AsTrack()->IsStation()) { - ride_station_set_map_tooltip(tileElement); + RideStationSetMapTooltip(tileElement); } else { - ride_track_set_map_tooltip(tileElement); + RideTrackSetMapTooltip(tileElement); } } else if (tileElement->GetType() == TileElementType::Path) { - ride_queue_banner_set_map_tooltip(tileElement); + RideQueueBannerSetMapTooltip(tileElement); } } @@ -2517,10 +2544,10 @@ void ride_set_map_tooltip(TileElement* tileElement) * * rct2: 0x006B4CC1 */ -static ResultWithMessage ride_mode_check_valid_station_numbers(Ride* ride) +static ResultWithMessage RideModeCheckValidStationNumbers(const Ride& ride) { uint16_t numStations = 0; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { if (!station.Start.IsNull()) { @@ -2528,7 +2555,7 @@ static ResultWithMessage ride_mode_check_valid_station_numbers(Ride* ride) } } - switch (ride->mode) + switch (ride.mode) { case RideMode::ReverseInclineLaunchedShuttle: case RideMode::PoweredLaunchPasstrough: @@ -2548,7 +2575,7 @@ static ResultWithMessage ride_mode_check_valid_station_numbers(Ride* ride) } } - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride.GetRideTypeDescriptor(); if (rtd.HasFlag(RIDE_TYPE_FLAG_HAS_ONE_STATION) && numStations > 1) return { false, STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE }; @@ -2559,16 +2586,17 @@ static ResultWithMessage ride_mode_check_valid_station_numbers(Ride* ride) * returns stationIndex of first station on success * STATION_INDEX_NULL on failure. */ -static StationIndexWithMessage ride_mode_check_station_present(Ride* ride) +static StationIndexWithMessage RideModeCheckStationPresent(const Ride& ride) { - auto stationIndex = ride_get_first_valid_station_start(ride); + auto stationIndex = RideGetFirstValidStationStart(ride); if (stationIndex.IsNull()) { - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_NO_TRACK)) + const auto& rtd = ride.GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_HAS_NO_TRACK)) return { StationIndex::GetNull(), STR_NOT_YET_CONSTRUCTED }; - if (ride->type == RIDE_TYPE_MAZE) + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) return { StationIndex::GetNull(), STR_NOT_YET_CONSTRUCTED }; return { StationIndex::GetNull(), STR_REQUIRES_A_STATION_PLATFORM }; @@ -2581,9 +2609,9 @@ static StationIndexWithMessage ride_mode_check_station_present(Ride* ride) * * rct2: 0x006B5872 */ -static ResultWithMessage ride_check_for_entrance_exit(RideId rideIndex) +static ResultWithMessage RideCheckForEntranceExit(RideId rideIndex) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return { false }; @@ -2671,13 +2699,13 @@ static ResultWithMessage RideCheckBlockBrakes(const CoordsXYE& input, CoordsXYE* return { false }; RideId rideIndex = input.element->AsTrack()->GetRideIndex(); - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == rideIndex) - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); - track_circuit_iterator it; - track_circuit_iterator_begin(&it, input); - while (track_circuit_iterator_next(&it)) + TrackCircuitIterator it; + TrackCircuitIteratorBegin(&it, input); + while (TrackCircuitIteratorNext(&it)) { if (it.current.element->AsTrack()->GetTrackType() == TrackElemType::BlockBrakes) { @@ -2717,32 +2745,36 @@ static ResultWithMessage RideCheckBlockBrakes(const CoordsXYE& input, CoordsXYE* * @returns true if an inversion track piece is found, otherwise false. * rct2: 0x006CB149 */ -static bool ride_check_track_contains_inversions(CoordsXYE* input, CoordsXYE* output) +static bool RideCheckTrackContainsInversions(const CoordsXYE& input, CoordsXYE* output) { - if (input->element == nullptr) + if (input.element == nullptr) return false; - const auto* trackElement = input->element->AsTrack(); + const auto* trackElement = input.element->AsTrack(); if (trackElement == nullptr) return false; RideId rideIndex = trackElement->GetRideIndex(); - auto ride = get_ride(rideIndex); - if (ride != nullptr && ride->type == RIDE_TYPE_MAZE) - return true; + auto ride = GetRide(rideIndex); + if (ride != nullptr) + { + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + return true; + } - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && rideIndex == _currentRideIndex) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); } bool moveSlowIt = true; - track_circuit_iterator it, slowIt; - track_circuit_iterator_begin(&it, *input); + TrackCircuitIterator it, slowIt; + TrackCircuitIteratorBegin(&it, input); slowIt = it; - while (track_circuit_iterator_next(&it)) + while (TrackCircuitIteratorNext(&it)) { auto trackType = it.current.element->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); @@ -2756,8 +2788,8 @@ static bool ride_check_track_contains_inversions(CoordsXYE* input, CoordsXYE* ou moveSlowIt = !moveSlowIt; if (moveSlowIt) { - track_circuit_iterator_next(&slowIt); - if (track_circuit_iterators_match(&it, &slowIt)) + TrackCircuitIteratorNext(&slowIt); + if (TrackCircuitIteratorsMatch(&it, &slowIt)) { return false; } @@ -2773,35 +2805,36 @@ static bool ride_check_track_contains_inversions(CoordsXYE* input, CoordsXYE* ou * @returns true if a banked track piece is found, otherwise false. * rct2: 0x006CB1D3 */ -static bool ride_check_track_contains_banked(CoordsXYE* input, CoordsXYE* output) +static bool RideCheckTrackContainsBanked(const CoordsXYE& input, CoordsXYE* output) { - if (input->element == nullptr) + if (input.element == nullptr) return false; - const auto* trackElement = input->element->AsTrack(); + const auto* trackElement = input.element->AsTrack(); if (trackElement == nullptr) return false; auto rideIndex = trackElement->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) return true; - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && rideIndex == _currentRideIndex) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); } bool moveSlowIt = true; - track_circuit_iterator it, slowIt; - track_circuit_iterator_begin(&it, *input); + TrackCircuitIterator it, slowIt; + TrackCircuitIteratorBegin(&it, input); slowIt = it; - while (track_circuit_iterator_next(&it)) + while (TrackCircuitIteratorNext(&it)) { auto trackType = output->element->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); @@ -2815,8 +2848,8 @@ static bool ride_check_track_contains_banked(CoordsXYE* input, CoordsXYE* output moveSlowIt = !moveSlowIt; if (moveSlowIt) { - track_circuit_iterator_next(&slowIt); - if (track_circuit_iterators_match(&it, &slowIt)) + TrackCircuitIteratorNext(&slowIt); + if (TrackCircuitIteratorsMatch(&it, &slowIt)) { return false; } @@ -2829,20 +2862,20 @@ static bool ride_check_track_contains_banked(CoordsXYE* input, CoordsXYE* output * * rct2: 0x006CB25D */ -static int32_t ride_check_station_length(CoordsXYE* input, CoordsXYE* output) +static int32_t RideCheckStationLength(const CoordsXYE& input, CoordsXYE* output) { - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 - && _currentRideIndex == input->element->AsTrack()->GetRideIndex()) + && _currentRideIndex == input.element->AsTrack()->GetRideIndex()) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); } - output->x = input->x; - output->y = input->y; - output->element = input->element; - track_begin_end trackBeginEnd; - while (track_block_get_previous(*output, &trackBeginEnd)) + output->x = input.x; + output->y = input.y; + output->element = input.element; + TrackBeginEnd trackBeginEnd; + while (TrackBlockGetPrevious(*output, &trackBeginEnd)) { output->x = trackBeginEnd.begin_x; output->y = trackBeginEnd.begin_y; @@ -2870,7 +2903,7 @@ static int32_t ride_check_station_length(CoordsXYE* input, CoordsXYE* output) } num_station_elements = 0; } - } while (track_block_get_next(output, output, nullptr, nullptr)); + } while (TrackBlockGetNext(output, output, nullptr, nullptr)); // Prevent returning a pointer to a map element with no track. *output = last_good_station; @@ -2884,23 +2917,23 @@ static int32_t ride_check_station_length(CoordsXYE* input, CoordsXYE* output) * * rct2: 0x006CB2DA */ -static bool ride_check_start_and_end_is_station(CoordsXYE* input) +static bool RideCheckStartAndEndIsStation(const CoordsXYE& input) { CoordsXYE trackBack, trackFront; - RideId rideIndex = input->element->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + RideId rideIndex = input.element->AsTrack()->GetRideIndex(); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; - auto w = window_find_by_class(WindowClass::RideConstruction); + auto w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && rideIndex == _currentRideIndex) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); } // Check back of the track - track_get_back(input, &trackBack); + TrackGetBack(input, &trackBack); auto trackType = trackBack.element->AsTrack()->GetTrackType(); const auto* ted = &GetTrackElementDescriptor(trackType); if (!(std::get<0>(ted->SequenceProperties) & TRACK_SEQUENCE_FLAG_ORIGIN)) @@ -2910,7 +2943,7 @@ static bool ride_check_start_and_end_is_station(CoordsXYE* input) ride->ChairliftBullwheelLocation[0] = TileCoordsXYZ{ CoordsXYZ{ trackBack.x, trackBack.y, trackBack.element->GetBaseZ() } }; // Check front of the track - track_get_front(input, &trackFront); + TrackGetFront(input, &trackFront); trackType = trackFront.element->AsTrack()->GetTrackType(); ted = &GetTrackElementDescriptor(trackType); if (!(std::get<0>(ted->SequenceProperties) & TRACK_SEQUENCE_FLAG_ORIGIN)) @@ -2927,14 +2960,14 @@ static bool ride_check_start_and_end_is_station(CoordsXYE* input) * station or the last track piece from the end of the direction. * rct2: 0x006B4D39 */ -static void ride_set_boat_hire_return_point(Ride* ride, CoordsXYE* startElement) +static void RideSetBoatHireReturnPoint(Ride& ride, const CoordsXYE& startElement) { int32_t trackType = -1; - auto returnPos = *startElement; + auto returnPos = startElement; int32_t startX = returnPos.x; int32_t startY = returnPos.y; - track_begin_end trackBeginEnd; - while (track_block_get_previous(returnPos, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + while (TrackBlockGetPrevious(returnPos, &trackBeginEnd)) { // If previous track is back to the starting x, y, then break loop (otherwise possible infinite loop) if (trackType != -1 && startX == trackBeginEnd.begin_x && startY == trackBeginEnd.begin_y) @@ -2952,22 +2985,22 @@ static void ride_set_boat_hire_return_point(Ride* ride, CoordsXYE* startElement) trackType = returnPos.element->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); int32_t elementReturnDirection = ted.Coordinates.rotation_begin; - ride->boat_hire_return_direction = returnPos.element->GetDirectionWithOffset(elementReturnDirection); - ride->boat_hire_return_position = TileCoordsXY{ returnPos }; + ride.boat_hire_return_direction = returnPos.element->GetDirectionWithOffset(elementReturnDirection); + ride.boat_hire_return_position = TileCoordsXY{ returnPos }; } /** * * rct2: 0x006B4D39 */ -static void ride_set_maze_entrance_exit_points(Ride* ride) +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]; // Create a list of all the entrance and exit positions TileCoordsXYZD* position = positions; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { if (!station.Entrance.IsNull()) { @@ -3009,9 +3042,9 @@ static void ride_set_maze_entrance_exit_points(Ride* ride) * Opens all block brakes of a ride. * rct2: 0x006B4E6B */ -static void RideOpenBlockBrakes(CoordsXYE* startElement) +static void RideOpenBlockBrakes(const CoordsXYE& startElement) { - CoordsXYE currentElement = *startElement; + CoordsXYE currentElement = startElement; do { auto trackType = currentElement.element->AsTrack()->GetTrackType(); @@ -3024,32 +3057,28 @@ static void RideOpenBlockBrakes(CoordsXYE* startElement) case TrackElemType::DiagUp25ToFlat: case TrackElemType::DiagUp60ToFlat: case TrackElemType::BlockBrakes: - currentElement.element->AsTrack()->SetBlockBrakeClosed(false); + currentElement.element->AsTrack()->SetBrakeClosed(false); break; } - } while (track_block_get_next(¤tElement, ¤tElement, nullptr, nullptr) - && currentElement.element != startElement->element); + } while (TrackBlockGetNext(¤tElement, ¤tElement, nullptr, nullptr) + && currentElement.element != startElement.element); } /** * * rct2: 0x006B4D26 */ -static void ride_set_start_finish_points(RideId rideIndex, CoordsXYE* startElement) +static void RideSetStartFinishPoints(RideId rideIndex, const CoordsXYE& startElement) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return; - switch (ride->type) - { - case RIDE_TYPE_BOAT_HIRE: - ride_set_boat_hire_return_point(ride, startElement); - break; - case RIDE_TYPE_MAZE: - ride_set_maze_entrance_exit_points(ride); - break; - } + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + RideSetMazeEntranceExitPoints(*ride); + else if (ride->type == RIDE_TYPE_BOAT_HIRE) + RideSetBoatHireReturnPoint(*ride, startElement); if (ride->IsBlockSectioned() && !(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) { @@ -3093,48 +3122,47 @@ static constexpr const CoordsXY word_9A2A60[] = { * * rct2: 0x006DD90D */ -static Vehicle* vehicle_create_car( - RideId rideIndex, int32_t carEntryIndex, int32_t carIndex, int32_t vehicleIndex, const CoordsXYZ& carPosition, +static Vehicle* VehicleCreateCar( + Ride& ride, int32_t carEntryIndex, int32_t carIndex, int32_t vehicleIndex, const CoordsXYZ& carPosition, int32_t* remainingDistance, TrackElement* trackElement) { if (trackElement == nullptr) return nullptr; - auto ride = get_ride(rideIndex); - if (ride == nullptr) - return nullptr; - - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride.GetRideEntry(); if (rideEntry == nullptr) return nullptr; - auto carEntry = &rideEntry->Cars[carEntryIndex]; - auto vehicle = CreateEntity(); + auto& carEntry = rideEntry->Cars[carEntryIndex]; + + auto* vehicle = CreateEntity(); if (vehicle == nullptr) return nullptr; - vehicle->ride = rideIndex; - vehicle->ride_subtype = ride->subtype; + vehicle->ride = ride.id; + vehicle->ride_subtype = ride.subtype; vehicle->vehicle_type = carEntryIndex; vehicle->SubType = carIndex == 0 ? Vehicle::Type::Head : Vehicle::Type::Tail; - vehicle->var_44 = Numerics::ror32(carEntry->spacing, 10) & 0xFFFF; - auto edx = carEntry->spacing >> 1; - *remainingDistance -= edx; + vehicle->var_44 = Numerics::ror32(carEntry.spacing, 10) & 0xFFFF; + + const auto halfSpacing = carEntry.spacing >> 1; + *remainingDistance -= halfSpacing; vehicle->remaining_distance = *remainingDistance; - if (!(carEntry->flags & CAR_ENTRY_FLAG_GO_KART)) + + if (!(carEntry.flags & CAR_ENTRY_FLAG_GO_KART)) { - *remainingDistance -= edx; + *remainingDistance -= halfSpacing; } - // loc_6DD9A5: - vehicle->sprite_width = carEntry->sprite_width; - vehicle->sprite_height_negative = carEntry->sprite_height_negative; - vehicle->sprite_height_positive = carEntry->sprite_height_positive; - vehicle->mass = carEntry->car_mass; - vehicle->num_seats = carEntry->num_seats; - vehicle->speed = carEntry->powered_max_speed; - vehicle->powered_acceleration = carEntry->powered_acceleration; + // Loc6DD9A5: + vehicle->sprite_width = carEntry.sprite_width; + vehicle->sprite_height_negative = carEntry.sprite_height_negative; + vehicle->sprite_height_positive = carEntry.sprite_height_positive; + vehicle->mass = carEntry.car_mass; + vehicle->num_seats = carEntry.num_seats; + vehicle->speed = carEntry.powered_max_speed; + vehicle->powered_acceleration = carEntry.powered_acceleration; vehicle->velocity = 0; vehicle->acceleration = 0; vehicle->SwingSprite = 0; @@ -3160,26 +3188,27 @@ static Vehicle* vehicle_create_car( vehicle->peep[i] = EntityId::GetNull(); } - if (carEntry->flags & CAR_ENTRY_FLAG_DODGEM_CAR_PLACEMENT) + const auto& rtd = ride.GetRideTypeDescriptor(); + if (carEntry.flags & CAR_ENTRY_FLAG_DODGEM_CAR_PLACEMENT) { - // loc_6DDCA4: + // Loc6DDCA4: vehicle->TrackSubposition = VehicleTrackSubposition::Default; int32_t direction = trackElement->GetDirection(); auto dodgemPos = carPosition + CoordsXYZ{ word_9A3AB4[direction], 0 }; vehicle->TrackLocation = dodgemPos; vehicle->current_station = trackElement->GetStationIndex(); - dodgemPos.z += ride->GetRideTypeDescriptor().Heights.VehicleZOffset; + dodgemPos.z += rtd.Heights.VehicleZOffset; vehicle->SetTrackDirection(0); vehicle->SetTrackType(trackElement->GetTrackType()); vehicle->track_progress = 0; vehicle->SetState(Vehicle::Status::MovingToEndOfStation); - vehicle->update_flags = 0; + vehicle->Flags = 0; CoordsXY chosenLoc; auto numAttempts = 0; - // loc_6DDD26: + // Loc6DDD26: do { numAttempts++; @@ -3187,9 +3216,9 @@ static Vehicle* vehicle_create_car( if (numAttempts > 10000) return nullptr; - vehicle->sprite_direction = scenario_rand() & 0x1E; - chosenLoc.y = dodgemPos.y + (scenario_rand() & 0xFF); - chosenLoc.x = dodgemPos.x + (scenario_rand() & 0xFF); + vehicle->sprite_direction = ScenarioRand() & 0x1E; + chosenLoc.y = dodgemPos.y + (ScenarioRand() & 0xFF); + chosenLoc.x = dodgemPos.x + (ScenarioRand() & 0xFF); } while (vehicle->DodgemsCarWouldCollideAt(chosenLoc).has_value()); vehicle->MoveTo({ chosenLoc, dodgemPos.z }); @@ -3197,12 +3226,12 @@ static Vehicle* vehicle_create_car( else { VehicleTrackSubposition subposition = VehicleTrackSubposition::Default; - if (carEntry->flags & CAR_ENTRY_FLAG_CHAIRLIFT) + if (carEntry.flags & CAR_ENTRY_FLAG_CHAIRLIFT) { subposition = VehicleTrackSubposition::ChairliftGoingOut; } - if (carEntry->flags & CAR_ENTRY_FLAG_GO_KART) + if (carEntry.flags & CAR_ENTRY_FLAG_GO_KART) { // Choose which lane Go Kart should start in subposition = VehicleTrackSubposition::GoKartsLeftLane; @@ -3211,21 +3240,21 @@ static Vehicle* vehicle_create_car( subposition = VehicleTrackSubposition::GoKartsRightLane; } } - if (carEntry->flags & CAR_ENTRY_FLAG_MINI_GOLF) + if (carEntry.flags & CAR_ENTRY_FLAG_MINI_GOLF) { subposition = VehicleTrackSubposition::MiniGolfStart9; vehicle->var_D3 = 0; vehicle->mini_golf_current_animation = MiniGolfAnimation::Walk; vehicle->mini_golf_flags = 0; } - if (carEntry->flags & CAR_ENTRY_FLAG_REVERSER_BOGIE) + if (carEntry.flags & CAR_ENTRY_FLAG_REVERSER_BOGIE) { if (vehicle->IsHead()) { subposition = VehicleTrackSubposition::ReverserRCFrontBogie; } } - if (carEntry->flags & CAR_ENTRY_FLAG_REVERSER_PASSENGER_CAR) + if (carEntry.flags & CAR_ENTRY_FLAG_REVERSER_PASSENGER_CAR) { subposition = VehicleTrackSubposition::ReverserRCRearBogie; } @@ -3237,19 +3266,19 @@ static Vehicle* vehicle_create_car( int32_t direction = trackElement->GetDirection(); vehicle->sprite_direction = direction << 3; - if (ride->type == RIDE_TYPE_SPACE_RINGS) + if (ride.type == RIDE_TYPE_SPACE_RINGS) { direction = 4; } else { - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL)) + if (rtd.HasFlag(RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL)) { - if (ride->GetRideTypeDescriptor().StartTrackPiece != TrackElemType::FlatTrack1x4B) + if (rtd.StartTrackPiece != TrackElemType::FlatTrack1x4B) { - if (ride->GetRideTypeDescriptor().StartTrackPiece != TrackElemType::FlatTrack1x4A) + if (rtd.StartTrackPiece != TrackElemType::FlatTrack1x4A) { - if (ride->type == RIDE_TYPE_ENTERPRISE) + if (ride.type == RIDE_TYPE_ENTERPRISE) { direction += 5; } @@ -3262,7 +3291,7 @@ static Vehicle* vehicle_create_car( } } - chosenLoc += CoordsXYZ{ word_9A2A60[direction], ride->GetRideTypeDescriptor().Heights.VehicleZOffset }; + chosenLoc += CoordsXYZ{ word_9A2A60[direction], rtd.Heights.VehicleZOffset }; vehicle->current_station = trackElement->GetStationIndex(); @@ -3270,26 +3299,25 @@ static Vehicle* vehicle_create_car( vehicle->SetTrackType(trackElement->GetTrackType()); vehicle->SetTrackDirection(vehicle->sprite_direction >> 3); vehicle->track_progress = 31; - if (carEntry->flags & CAR_ENTRY_FLAG_MINI_GOLF) + if (carEntry.flags & CAR_ENTRY_FLAG_MINI_GOLF) { vehicle->track_progress = 15; } - vehicle->update_flags = VEHICLE_UPDATE_FLAG_COLLISION_DISABLED; - if (carEntry->flags & CAR_ENTRY_FLAG_HAS_INVERTED_SPRITE_SET) + vehicle->Flags = VehicleFlags::CollisionDisabled; + if (carEntry.flags & CAR_ENTRY_FLAG_HAS_INVERTED_SPRITE_SET) { if (trackElement->IsInverted()) { - vehicle->SetUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + vehicle->SetFlag(VehicleFlags::CarIsInverted); } } vehicle->SetState(Vehicle::Status::MovingToEndOfStation); } - // loc_6DDD5E: + // Loc6DDD5E: vehicle->num_peeps = 0; vehicle->next_free_seat = 0; vehicle->BoatLocation.SetNull(); - vehicle->IsCrashedVehicle = false; return vehicle; } @@ -3297,56 +3325,49 @@ static Vehicle* vehicle_create_car( * * rct2: 0x006DD84C */ -static train_ref vehicle_create_train( - RideId rideIndex, const CoordsXYZ& trainPos, int32_t vehicleIndex, int32_t* remainingDistance, TrackElement* trackElement) +static TrainReference VehicleCreateTrain( + Ride& ride, const CoordsXYZ& trainPos, int32_t vehicleIndex, int32_t* remainingDistance, TrackElement* trackElement) { - train_ref train = { nullptr, nullptr }; - auto ride = get_ride(rideIndex); - if (ride != nullptr) - { - for (int32_t carIndex = 0; carIndex < ride->num_cars_per_train; carIndex++) - { - auto vehicle = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, carIndex); - auto car = vehicle_create_car( - rideIndex, vehicle, carIndex, vehicleIndex, trainPos, remainingDistance, trackElement); - if (car == nullptr) - break; + TrainReference train = { nullptr, nullptr }; - if (carIndex == 0) - { - train.head = car; - } - else - { - // Link the previous car with this car - train.tail->next_vehicle_on_train = car->sprite_index; - train.tail->next_vehicle_on_ride = car->sprite_index; - car->prev_vehicle_on_ride = train.tail->sprite_index; - } - train.tail = car; + for (int32_t carIndex = 0; carIndex < ride.num_cars_per_train; carIndex++) + { + auto vehicle = RideEntryGetVehicleAtPosition(ride.subtype, ride.num_cars_per_train, carIndex); + auto car = VehicleCreateCar(ride, vehicle, carIndex, vehicleIndex, trainPos, remainingDistance, trackElement); + if (car == nullptr) + break; + + if (carIndex == 0) + { + train.head = car; } + else + { + // Link the previous car with this car + train.tail->next_vehicle_on_train = car->Id; + train.tail->next_vehicle_on_ride = car->Id; + car->prev_vehicle_on_ride = train.tail->Id; + } + train.tail = car; } + return train; } -static bool vehicle_create_trains(RideId rideIndex, const CoordsXYZ& trainsPos, TrackElement* trackElement) +static bool VehicleCreateTrains(Ride& ride, const CoordsXYZ& trainsPos, TrackElement* trackElement) { - auto ride = get_ride(rideIndex); - if (ride == nullptr) - return false; - - train_ref firstTrain = {}; - train_ref lastTrain = {}; + TrainReference firstTrain = {}; + TrainReference lastTrain = {}; int32_t remainingDistance = 0; bool allTrainsCreated = true; - for (int32_t vehicleIndex = 0; vehicleIndex < ride->NumTrains; vehicleIndex++) + for (int32_t vehicleIndex = 0; vehicleIndex < ride.NumTrains; vehicleIndex++) { - if (ride->IsBlockSectioned()) + if (ride.IsBlockSectioned()) { remainingDistance = 0; } - train_ref train = vehicle_create_train(rideIndex, trainsPos, vehicleIndex, &remainingDistance, trackElement); + TrainReference train = VehicleCreateTrain(ride, trainsPos, vehicleIndex, &remainingDistance, trackElement); if (train.head == nullptr || train.tail == nullptr) { allTrainsCreated = false; @@ -3360,16 +3381,16 @@ static bool vehicle_create_trains(RideId rideIndex, const CoordsXYZ& trainsPos, else { // Link the end of the previous train with the front of this train - lastTrain.tail->next_vehicle_on_ride = train.head->sprite_index; - train.head->prev_vehicle_on_ride = lastTrain.tail->sprite_index; + lastTrain.tail->next_vehicle_on_ride = train.head->Id; + train.head->prev_vehicle_on_ride = lastTrain.tail->Id; } lastTrain = train; for (int32_t i = 0; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) { - if (ride->vehicles[i].IsNull()) + if (ride.vehicles[i].IsNull()) { - ride->vehicles[i] = train.head->sprite_index; + ride.vehicles[i] = train.head->Id; break; } } @@ -3377,9 +3398,9 @@ static bool vehicle_create_trains(RideId rideIndex, const CoordsXYZ& trainsPos, // Link the first train and last train together. Nullptr checks are there to keep Clang happy. if (lastTrain.tail != nullptr) - firstTrain.head->prev_vehicle_on_ride = lastTrain.tail->sprite_index; + firstTrain.head->prev_vehicle_on_ride = lastTrain.tail->Id; if (firstTrain.head != nullptr) - lastTrain.tail->next_vehicle_on_ride = firstTrain.head->sprite_index; + lastTrain.tail->next_vehicle_on_ride = firstTrain.head->Id; return allTrainsCreated; } @@ -3388,9 +3409,9 @@ static bool vehicle_create_trains(RideId rideIndex, const CoordsXYZ& trainsPos, * * rct2: 0x006DDE9E */ -static void ride_create_vehicles_find_first_block(Ride* ride, CoordsXYE* outXYElement) +static void RideCreateVehiclesFindFirstBlock(const Ride& ride, CoordsXYE* outXYElement) { - Vehicle* vehicle = GetEntity(ride->vehicles[0]); + Vehicle* vehicle = GetEntity(ride.vehicles[0]); if (vehicle == nullptr) return; @@ -3401,8 +3422,8 @@ static void ride_create_vehicles_find_first_block(Ride* ride, CoordsXYE* outXYEl CoordsXY trackPos = curTrackPos; auto trackElement = curTrackElement; - track_begin_end trackBeginEnd; - while (track_block_get_previous({ trackPos, reinterpret_cast(trackElement) }, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + while (TrackBlockGetPrevious({ trackPos, reinterpret_cast(trackElement) }, &trackBeginEnd)) { trackPos = { trackBeginEnd.end_x, trackBeginEnd.end_y }; trackElement = trackBeginEnd.begin_element->AsTrack(); @@ -3489,7 +3510,7 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying vehiclePos.z = trackElement->GetBaseZ(); } - if (!vehicle_create_trains(id, vehiclePos, trackElement)) + if (!VehicleCreateTrains(*this, vehiclePos, trackElement)) { // This flag is needed for Ride::RemoveVehicles() lifecycle_flags |= RIDE_LIFECYCLE_ON_TRACK; @@ -3512,7 +3533,7 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying if (IsBlockSectioned()) { CoordsXYE firstBlock{}; - ride_create_vehicles_find_first_block(this, &firstBlock); + RideCreateVehiclesFindFirstBlock(*this, &firstBlock); MoveTrainsToBlockBrakes(firstBlock.element->AsTrack()); } else @@ -3536,7 +3557,7 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying } } } - ride_update_vehicle_colours(this); + RideUpdateVehicleColours(*this); return { true }; } @@ -3554,6 +3575,10 @@ void Ride::MoveTrainsToBlockBrakes(TrackElement* firstBlock) if (train == nullptr) continue; + // At this point, all vehicles have state of MovingToEndOfStation, which slowly moves forward at a constant speed + // regardless of incline. The first vehicle stops at the station immediately, while all other vehicles seek forward + // until they reach a closed block brake. The block brake directly before the station is set to closed every frame + // because the trains will open the block brake when the tail leaves the station. train->UpdateTrackMotion(nullptr); if (i == 0) @@ -3572,7 +3597,7 @@ void Ride::MoveTrainsToBlockBrakes(TrackElement* firstBlock) break; } - firstBlock->SetBlockBrakeClosed(true); + firstBlock->SetBrakeClosed(true); for (Vehicle* car = train; car != nullptr; car = GetEntity(car->next_vehicle_on_train)) { car->velocity = 0; @@ -3582,10 +3607,11 @@ void Ride::MoveTrainsToBlockBrakes(TrackElement* firstBlock) } } while (!(train->UpdateTrackMotion(nullptr) & VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_BLOCK_BRAKE)); - firstBlock->SetBlockBrakeClosed(true); + // All vehicles are in position, set the block brake directly before the station one last time + firstBlock->SetBrakeClosed(true); for (Vehicle* car = train; car != nullptr; car = GetEntity(car->next_vehicle_on_train)) { - car->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + car->ClearFlag(VehicleFlags::CollisionDisabled); car->SetState(Vehicle::Status::Travelling, car->sub_state); if ((car->GetTrackType()) == TrackElemType::EndStation) { @@ -3600,11 +3626,11 @@ void Ride::MoveTrainsToBlockBrakes(TrackElement* firstBlock) * appropriate track. * rct2: 0x006D31A6 */ -static ResultWithMessage ride_initialise_cable_lift_track(Ride* ride, bool isApplying) +static ResultWithMessage RideInitialiseCableLiftTrack(const Ride& ride, bool isApplying) { CoordsXYZ location; location.SetNull(); - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { location = station.GetStart(); if (!location.IsNull()) @@ -3647,9 +3673,9 @@ static ResultWithMessage ride_initialise_cable_lift_track(Ride* ride, bool isApp }; int32_t state = STATE_FIND_CABLE_LIFT; - track_circuit_iterator it; - track_circuit_iterator_begin(&it, { location, tileElement }); - while (track_circuit_iterator_previous(&it)) + TrackCircuitIterator it; + TrackCircuitIteratorBegin(&it, { location, tileElement }); + while (TrackCircuitIteratorPrevious(&it)) { tileElement = it.current.element; auto trackType = tileElement->AsTrack()->GetTrackType(); @@ -3702,9 +3728,9 @@ static ResultWithMessage ride_initialise_cable_lift_track(Ride* ride, bool isApp * * rct2: 0x006DF4D4 */ -static ResultWithMessage ride_create_cable_lift(RideId rideIndex, bool isApplying) +static ResultWithMessage RideCreateCableLift(RideId rideIndex, bool isApplying) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return { false }; @@ -3723,7 +3749,7 @@ static ResultWithMessage ride_create_cable_lift(RideId rideIndex, bool isApplyin return { false, STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES }; } - auto cableLiftInitialiseResult = ride_initialise_cable_lift_track(ride, isApplying); + auto cableLiftInitialiseResult = RideInitialiseCableLiftTrack(*ride, isApplying); if (!cableLiftInitialiseResult.Successful) { return { false, cableLiftInitialiseResult.Message }; @@ -3750,7 +3776,7 @@ static ResultWithMessage ride_create_cable_lift(RideId rideIndex, bool isApplyin int32_t remaining_distance = ebx; ebx -= edx; - Vehicle* current = cable_lift_segment_create( + Vehicle* current = CableLiftSegmentCreate( *ride, cableLiftLoc.x, cableLiftLoc.y, cableLiftLoc.z / 8, direction, var_44, remaining_distance, i == 0); current->next_vehicle_on_train = EntityId::GetNull(); if (i == 0) @@ -3759,14 +3785,14 @@ static ResultWithMessage ride_create_cable_lift(RideId rideIndex, bool isApplyin } else { - tail->next_vehicle_on_train = current->sprite_index; - tail->next_vehicle_on_ride = current->sprite_index; - current->prev_vehicle_on_ride = tail->sprite_index; + tail->next_vehicle_on_train = current->Id; + tail->next_vehicle_on_ride = current->Id; + current->prev_vehicle_on_ride = tail->Id; } tail = current; } - head->prev_vehicle_on_ride = tail->sprite_index; - tail->next_vehicle_on_ride = head->sprite_index; + head->prev_vehicle_on_ride = tail->Id; + tail->next_vehicle_on_ride = head->Id; ride->lifecycle_flags |= RIDE_LIFECYCLE_CABLE_LIFT; head->CableLiftUpdateTrackMotion(); @@ -3780,7 +3806,7 @@ static ResultWithMessage ride_create_cable_lift(RideId rideIndex, bool isApplyin */ void Ride::ConstructMissingEntranceOrExit() const { - auto* w = window_get_main(); + auto* w = WindowGetMain(); if (w == nullptr) return; @@ -3811,23 +3837,24 @@ void Ride::ConstructMissingEntranceOrExit() const return; } - if (type != RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { auto location = incompleteStation->GetStart(); - window_scroll_to_location(*w, location); + WindowScrollToLocation(*w, location); CoordsXYE trackElement; - ride_try_get_origin_element(this, &trackElement); - ride_find_track_gap(this, &trackElement, &trackElement); - int32_t ok = ride_modify(trackElement); + RideTryGetOriginElement(*this, &trackElement); + FindTrackGap(trackElement, &trackElement); + int32_t ok = RideModify(trackElement); if (ok == 0) { return; } - w = window_find_by_class(WindowClass::RideConstruction); + w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr) - window_event_mouse_up_call(w, entranceOrExit); + WindowEventMouseUpCall(w, entranceOrExit); } } @@ -3835,16 +3862,16 @@ void Ride::ConstructMissingEntranceOrExit() const * * rct2: 0x006B528A */ -static void ride_scroll_to_track_error(const CoordsXYE& trackElement) +static void RideScrollToTrackError(const CoordsXYE& trackElement) { if (trackElement.element == nullptr) return; - auto* w = window_get_main(); + auto* w = WindowGetMain(); if (w != nullptr) { - window_scroll_to_location(*w, { trackElement, trackElement.element->GetBaseZ() }); - ride_modify(trackElement); + WindowScrollToLocation(*w, { trackElement, trackElement.element->GetBaseZ() }); + RideModify(trackElement); } } @@ -3875,164 +3902,113 @@ TrackElement* Ride::GetOriginElement(StationIndex stationIndex) const return nullptr; } -ResultWithMessage Ride::Test(RideStatus newStatus, bool isApplying) +ResultWithMessage Ride::Test(bool isApplying) { - CoordsXYE trackElement, problematicTrackElement = {}; - if (type == RIDE_TYPE_NULL) { - log_warning("Invalid ride type for ride %u", id.ToUnderlying()); + LOG_WARNING("Invalid ride type for ride %u", id.ToUnderlying()); return { false }; } - if (newStatus != RideStatus::Simulating) + WindowCloseByNumber(WindowClass::RideConstruction, id.ToUnderlying()); + + StationIndex stationIndex = {}; + auto message = ChangeStatusDoStationChecks(stationIndex); + if (!message.Successful) { - window_close_by_number(WindowClass::RideConstruction, id.ToUnderlying()); + return message; } - auto stationIndexCheck = ride_mode_check_station_present(this); - auto stationIndex = stationIndexCheck.StationIndex; - if (stationIndex.IsNull()) - return { false, stationIndexCheck.Message }; - - auto stationNumbersCheck = ride_mode_check_valid_station_numbers(this); - if (!stationNumbersCheck.Successful) - return { false, stationNumbersCheck.Message }; - - if (newStatus != RideStatus::Simulating) + auto entranceExitCheck = RideCheckForEntranceExit(id); + if (!entranceExitCheck.Successful) { - auto entranceExitCheck = ride_check_for_entrance_exit(id); - if (!entranceExitCheck.Successful) - { - ConstructMissingEntranceOrExit(); - return { false, entranceExitCheck.Message }; - } + ConstructMissingEntranceOrExit(); + return { false, entranceExitCheck.Message }; } - // z = ride->stations[i].GetBaseZ(); - auto startLoc = GetStation(stationIndex).Start; - trackElement.x = startLoc.x; - trackElement.y = startLoc.y; - trackElement.element = reinterpret_cast(GetOriginElement(stationIndex)); - if (trackElement.element == nullptr) + CoordsXYE trackElement = {}; + message = ChangeStatusGetStartElement(stationIndex, trackElement); + if (!message.Successful) { - // Maze is strange, station start is 0... investigation required - if (type != RIDE_TYPE_MAZE) - return { false }; + return message; } - if (mode == RideMode::ContinuousCircuit || IsBlockSectioned()) + message = ChangeStatusCheckCompleteCircuit(trackElement); + if (!message.Successful) { - if (ride_find_track_gap(this, &trackElement, &problematicTrackElement) - && (newStatus != RideStatus::Simulating || IsBlockSectioned())) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT }; - } + return message; } - if (IsBlockSectioned()) + message = ChangeStatusCheckTrackValidity(trackElement); + if (!message.Successful) { - auto blockBrakeCheck = RideCheckBlockBrakes(trackElement, &problematicTrackElement); - if (!blockBrakeCheck.Successful) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, blockBrakeCheck.Message }; - } + return message; } - if (subtype != OBJECT_ENTRY_INDEX_NULL && !gCheatsEnableAllDrawableTrackPieces) - { - rct_ride_entry* rideType = get_ride_entry(subtype); - if (rideType->flags & RIDE_ENTRY_FLAG_NO_INVERSIONS) - { - if (ride_check_track_contains_inversions(&trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN }; - } - } - if (rideType->flags & RIDE_ENTRY_FLAG_NO_BANKED_TRACK) - { - if (ride_check_track_contains_banked(&trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN }; - } - } - } - - if (mode == RideMode::StationToStation) - { - if (!ride_find_track_gap(this, &trackElement, &problematicTrackElement)) - { - return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; - } - - if (!ride_check_station_length(&trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_STATION_NOT_LONG_ENOUGH }; - } - - if (!ride_check_start_and_end_is_station(&trackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; - } - } - - if (isApplying) - ride_set_start_finish_points(id, &trackElement); - - const auto& rtd = GetRideTypeDescriptor(); - if (!rtd.HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES) && !(lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) - { - const auto createVehicleResult = CreateVehicles(trackElement, isApplying); - if (!createVehicleResult.Successful) - { - return { false, createVehicleResult.Message }; - } - } - - if (rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL) && (lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) - && !(lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT)) - { - const auto createCableLiftResult = ride_create_cable_lift(id, isApplying); - if (!createCableLiftResult.Successful) - return { false, createCableLiftResult.Message }; - } - - return { true }; + return ChangeStatusCreateVehicles(isApplying, trackElement); } + +ResultWithMessage Ride::Simulate(bool isApplying) +{ + CoordsXYE trackElement, problematicTrackElement = {}; + if (type == RIDE_TYPE_NULL) + { + LOG_WARNING("Invalid ride type for ride %u", id.ToUnderlying()); + return { false }; + } + + StationIndex stationIndex = {}; + auto message = ChangeStatusDoStationChecks(stationIndex); + if (!message.Successful) + { + return message; + } + + message = ChangeStatusGetStartElement(stationIndex, trackElement); + if (!message.Successful) + { + return message; + } + + if (IsBlockSectioned() && FindTrackGap(trackElement, &problematicTrackElement)) + { + RideScrollToTrackError(problematicTrackElement); + return { false, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT }; + } + + message = ChangeStatusCheckTrackValidity(trackElement); + if (!message.Successful) + { + return message; + } + + return ChangeStatusCreateVehicles(isApplying, trackElement); +} + /** * * rct2: 0x006B4EEA */ ResultWithMessage Ride::Open(bool isApplying) { - CoordsXYE trackElement, problematicTrackElement = {}; - // Check to see if construction tool is in use. If it is close the construction window // to set the track to its final state and clean up ghosts. // We can't just call close as it would cause a stack overflow during shop creation // with auto open on. if (WindowClass::RideConstruction == gCurrentToolWidget.window_classification - && id.ToUnderlying() == gCurrentToolWidget.window_number && (input_test_flag(INPUT_FLAG_TOOL_ACTIVE))) + && id.ToUnderlying() == gCurrentToolWidget.window_number && (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) { - window_close_by_number(WindowClass::RideConstruction, id.ToUnderlying()); + WindowCloseByNumber(WindowClass::RideConstruction, id.ToUnderlying()); } - auto stationIndexCheck = ride_mode_check_station_present(this); - auto stationIndex = stationIndexCheck.StationIndex; - if (stationIndex.IsNull()) - return { false, stationIndexCheck.Message }; + StationIndex stationIndex = {}; + auto message = ChangeStatusDoStationChecks(stationIndex); + if (!message.Successful) + { + return message; + } - auto stationNumbersCheck = ride_mode_check_valid_station_numbers(this); - if (!stationNumbersCheck.Successful) - return { false, stationNumbersCheck.Message }; - - auto entranceExitCheck = ride_check_for_entrance_exit(id); + auto entranceExitCheck = RideCheckForEntranceExit(id); if (!entranceExitCheck.Successful) { ConstructMissingEntranceOrExit(); @@ -4045,113 +4021,40 @@ ResultWithMessage Ride::Open(bool isApplying) lifecycle_flags |= RIDE_LIFECYCLE_EVER_BEEN_OPENED; } - // z = ride->stations[i].GetBaseZ(); - auto startLoc = GetStation(stationIndex).Start; - trackElement.x = startLoc.x; - trackElement.y = startLoc.y; - trackElement.element = reinterpret_cast(GetOriginElement(stationIndex)); - if (trackElement.element == nullptr) + CoordsXYE trackElement = {}; + message = ChangeStatusGetStartElement(stationIndex, trackElement); + if (!message.Successful) { - // Maze is strange, station start is 0... investigation required - if (type != RIDE_TYPE_MAZE) - return { false }; + return message; } - if (mode == RideMode::Race || mode == RideMode::ContinuousCircuit || IsBlockSectioned()) + message = ChangeStatusCheckCompleteCircuit(trackElement); + if (!message.Successful) { - if (ride_find_track_gap(this, &trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT }; - } + return message; } - if (IsBlockSectioned()) + message = ChangeStatusCheckTrackValidity(trackElement); + if (!message.Successful) { - auto blockBrakeCheck = RideCheckBlockBrakes(trackElement, &problematicTrackElement); - if (!blockBrakeCheck.Successful) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, blockBrakeCheck.Message }; - } + return message; } - if (subtype != OBJECT_ENTRY_INDEX_NULL && !gCheatsEnableAllDrawableTrackPieces) - { - rct_ride_entry* rideEntry = get_ride_entry(subtype); - if (rideEntry->flags & RIDE_ENTRY_FLAG_NO_INVERSIONS) - { - if (ride_check_track_contains_inversions(&trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN }; - } - } - if (rideEntry->flags & RIDE_ENTRY_FLAG_NO_BANKED_TRACK) - { - if (ride_check_track_contains_banked(&trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN }; - } - } - } - - if (mode == RideMode::StationToStation) - { - if (!ride_find_track_gap(this, &trackElement, &problematicTrackElement)) - { - return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; - } - - if (!ride_check_station_length(&trackElement, &problematicTrackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_STATION_NOT_LONG_ENOUGH }; - } - - if (!ride_check_start_and_end_is_station(&trackElement)) - { - ride_scroll_to_track_error(problematicTrackElement); - return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; - } - } - - if (isApplying) - ride_set_start_finish_points(id, &trackElement); - - if (!GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES) && !(lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) - { - const auto createVehicleResult = CreateVehicles(trackElement, isApplying); - if (!createVehicleResult.Successful) - { - return { false, createVehicleResult.Message }; - } - } - - if ((GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL)) - && (lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) && !(lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT)) - { - const auto createCableLiftResult = ride_create_cable_lift(id, isApplying); - if (!createCableLiftResult.Successful) - return { false, createCableLiftResult.Message }; - } - - return { true }; + return ChangeStatusCreateVehicles(isApplying, trackElement); } /** * Given a track element of the ride, find the start of the track. * It has to do this as a backwards loop in case this is an incomplete track. */ -void ride_get_start_of_track(CoordsXYE* output) +void RideGetStartOfTrack(CoordsXYE* output) { - track_begin_end trackBeginEnd; + TrackBeginEnd trackBeginEnd; CoordsXYE trackElement = *output; - if (track_block_get_previous(trackElement, &trackBeginEnd)) + if (TrackBlockGetPrevious(trackElement, &trackBeginEnd)) { TileElement* initial_map = trackElement.element; - track_begin_end slowIt = trackBeginEnd; + TrackBeginEnd slowIt = trackBeginEnd; bool moveSlowIt = true; do { @@ -4164,7 +4067,7 @@ void ride_get_start_of_track(CoordsXYE* output) /* .element = */ trackBeginEnd.begin_element, }; - if (!track_block_get_previous( + if (!TrackBlockGetPrevious( { trackBeginEnd.end_x, trackBeginEnd.end_y, trackBeginEnd.begin_element }, &trackBeginEnd)) { trackElement = lastGood; @@ -4174,7 +4077,7 @@ void ride_get_start_of_track(CoordsXYE* output) moveSlowIt = !moveSlowIt; if (moveSlowIt) { - if (!track_block_get_previous({ slowIt.end_x, slowIt.end_y, slowIt.begin_element }, &slowIt) + if (!TrackBlockGetPrevious({ slowIt.end_x, slowIt.end_y, slowIt.begin_element }, &slowIt) || slowIt.begin_element == trackBeginEnd.begin_element) { break; @@ -4235,8 +4138,8 @@ bool Ride::NameExists(std::string_view name, RideId excludeRideId) { Formatter ft; ride.FormatNameTo(ft); - format_string(buffer, 256, STR_STRINGID, ft.Data()); - if (name == buffer && ride_has_any_track_elements(&ride)) + FormatStringLegacy(buffer, 256, STR_STRINGID, ft.Data()); + if (name == buffer && RideHasAnyTrackElements(ride)) { return true; } @@ -4245,7 +4148,7 @@ bool Ride::NameExists(std::string_view name, RideId excludeRideId) return false; } -int32_t ride_get_random_colour_preset_index(ride_type_t rideType) +int32_t RideGetRandomColourPresetIndex(ride_type_t rideType) { if (rideType >= std::size(RideTypeDescriptors)) { @@ -4267,10 +4170,10 @@ int32_t ride_get_random_colour_preset_index(ride_type_t rideType) // If all presets have been used, just go with a random preset if (unused.size() == 0) - return util_rand() % colourPresets.count; + return UtilRand() % colourPresets.count; // Choose a random preset from the list of unused presets - auto unusedIndex = util_rand() % unused.size(); + auto unusedIndex = UtilRand() % unused.size(); return unused[unusedIndex]; } @@ -4280,12 +4183,12 @@ int32_t ride_get_random_colour_preset_index(ride_type_t rideType) */ void Ride::SetColourPreset(uint8_t index) { - const track_colour_preset_list* colourPresets = &GetRideTypeDescriptor().ColourPresets; + const TrackColourPresetList* colourPresets = &GetRideTypeDescriptor().ColourPresets; TrackColour colours = { COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK }; // Stalls save their default colour in the vehicle settings (since they share a common ride type) if (!IsRide()) { - auto rideEntry = get_ride_entry(subtype); + const auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry != nullptr && rideEntry->vehicle_preset_list->count > 0) { auto list = rideEntry->vehicle_preset_list->list[0]; @@ -4305,17 +4208,17 @@ void Ride::SetColourPreset(uint8_t index) colour_scheme_type = 0; } -money32 ride_get_common_price(Ride* forRide) +money64 RideGetCommonPrice(const Ride& forRide) { for (const auto& ride : GetRideManager()) { - if (ride.type == forRide->type && &ride != forRide) + if (ride.type == forRide.type && ride.id != forRide.id) { return ride.price[0]; } } - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; } void Ride::SetNameToDefault() @@ -4330,21 +4233,22 @@ void Ride::SetNameToDefault() default_name_number++; Formatter ft; FormatNameTo(ft); - format_string(rideNameBuffer, 256, STR_STRINGID, ft.Data()); + FormatStringLegacy(rideNameBuffer, 256, STR_STRINGID, ft.Data()); } while (Ride::NameExists(rideNameBuffer, id)); } /** * This will return the name of the ride, as seen in the New Ride window. */ -RideNaming get_ride_naming(const ride_type_t rideType, rct_ride_entry* rideEntry) +RideNaming GetRideNaming(const ride_type_t rideType, const RideObjectEntry& rideEntry) { - if (!GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) + const auto& rtd = GetRideTypeDescriptor(rideType); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { - return GetRideTypeDescriptor(rideType).Naming; + return rtd.Naming; } - return rideEntry->naming; + return rideEntry.naming; } /* @@ -4361,19 +4265,19 @@ RideNaming get_ride_naming(const ride_type_t rideType, rct_ride_entry* rideEntry * if by some miracle you manage 4 element none sloped. */ -void increment_turn_count_1_element(Ride* ride, uint8_t type) +void IncrementTurnCount1Element(Ride& ride, uint8_t type) { uint16_t* turn_count; switch (type) { case 0: - turn_count = &ride->turn_count_default; + turn_count = &ride.turn_count_default; break; case 1: - turn_count = &ride->turn_count_banked; + turn_count = &ride.turn_count_banked; break; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return; @@ -4386,19 +4290,19 @@ void increment_turn_count_1_element(Ride* ride, uint8_t type) *turn_count |= value; } -void increment_turn_count_2_elements(Ride* ride, uint8_t type) +void IncrementTurnCount2Elements(Ride& ride, uint8_t type) { uint16_t* turn_count; switch (type) { case 0: - turn_count = &ride->turn_count_default; + turn_count = &ride.turn_count_default; break; case 1: - turn_count = &ride->turn_count_banked; + turn_count = &ride.turn_count_banked; break; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return; @@ -4411,19 +4315,19 @@ void increment_turn_count_2_elements(Ride* ride, uint8_t type) *turn_count |= value; } -void increment_turn_count_3_elements(Ride* ride, uint8_t type) +void IncrementTurnCount3Elements(Ride& ride, uint8_t type) { uint16_t* turn_count; switch (type) { case 0: - turn_count = &ride->turn_count_default; + turn_count = &ride.turn_count_default; break; case 1: - turn_count = &ride->turn_count_banked; + turn_count = &ride.turn_count_banked; break; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return; @@ -4436,7 +4340,7 @@ void increment_turn_count_3_elements(Ride* ride, uint8_t type) *turn_count |= value; } -void increment_turn_count_4_plus_elements(Ride* ride, uint8_t type) +void IncrementTurnCount4PlusElements(Ride& ride, uint8_t type) { uint16_t* turn_count; switch (type) @@ -4444,10 +4348,10 @@ void increment_turn_count_4_plus_elements(Ride* ride, uint8_t type) case 0: case 1: // Just in case fallback to 3 element turn - increment_turn_count_3_elements(ride, type); + IncrementTurnCount3Elements(ride, type); return; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return; @@ -4460,19 +4364,19 @@ void increment_turn_count_4_plus_elements(Ride* ride, uint8_t type) *turn_count |= value; } -int32_t get_turn_count_1_element(Ride* ride, uint8_t type) +int32_t GetTurnCount1Element(const Ride& ride, uint8_t type) { - uint16_t* turn_count; + const uint16_t* turn_count; switch (type) { case 0: - turn_count = &ride->turn_count_default; + turn_count = &ride.turn_count_default; break; case 1: - turn_count = &ride->turn_count_banked; + turn_count = &ride.turn_count_banked; break; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return 0; @@ -4481,19 +4385,19 @@ int32_t get_turn_count_1_element(Ride* ride, uint8_t type) return (*turn_count) & TURN_MASK_1_ELEMENT; } -int32_t get_turn_count_2_elements(Ride* ride, uint8_t type) +int32_t GetTurnCount2Elements(const Ride& ride, uint8_t type) { - uint16_t* turn_count; + const uint16_t* turn_count; switch (type) { case 0: - turn_count = &ride->turn_count_default; + turn_count = &ride.turn_count_default; break; case 1: - turn_count = &ride->turn_count_banked; + turn_count = &ride.turn_count_banked; break; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return 0; @@ -4502,19 +4406,19 @@ int32_t get_turn_count_2_elements(Ride* ride, uint8_t type) return ((*turn_count) & TURN_MASK_2_ELEMENTS) >> 5; } -int32_t get_turn_count_3_elements(Ride* ride, uint8_t type) +int32_t GetTurnCount3Elements(const Ride& ride, uint8_t type) { - uint16_t* turn_count; + const uint16_t* turn_count; switch (type) { case 0: - turn_count = &ride->turn_count_default; + turn_count = &ride.turn_count_default; break; case 1: - turn_count = &ride->turn_count_banked; + turn_count = &ride.turn_count_banked; break; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return 0; @@ -4523,16 +4427,16 @@ int32_t get_turn_count_3_elements(Ride* ride, uint8_t type) return ((*turn_count) & TURN_MASK_3_ELEMENTS) >> 8; } -int32_t get_turn_count_4_plus_elements(Ride* ride, uint8_t type) +int32_t GetTurnCount4PlusElements(const Ride& ride, uint8_t type) { - uint16_t* turn_count; + const uint16_t* turn_count; switch (type) { case 0: case 1: return 0; case 2: - turn_count = &ride->turn_count_sloped; + turn_count = &ride.turn_count_sloped; break; default: return 0; @@ -4571,10 +4475,10 @@ bool Ride::HasWhirlpool() const return special_track_elements & RIDE_ELEMENT_WHIRLPOOL; } -uint8_t ride_get_helix_sections(Ride* ride) +uint8_t RideGetHelixSections(const Ride& ride) { // Helix sections stored in the low 5 bits. - return ride->special_track_elements & 0x1F; + return ride.special_track_elements & 0x1F; } bool Ride::IsPoweredLaunched() const @@ -4588,16 +4492,16 @@ bool Ride::IsBlockSectioned() const return mode == RideMode::ContinuousCircuitBlockSectioned || mode == RideMode::PoweredLaunchBlockSectioned; } -bool ride_has_any_track_elements(const Ride* ride) +bool RideHasAnyTrackElements(const Ride& ride) { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it)) { if (it.element->GetType() != TileElementType::Track) continue; - if (it.element->AsTrack()->GetRideIndex() != ride->id) + if (it.element->AsTrack()->GetRideIndex() != ride.id) continue; if (it.element->IsGhost()) continue; @@ -4608,127 +4512,28 @@ bool ride_has_any_track_elements(const Ride* ride) return false; } -/** - * - * rct2: 0x006847BA - */ -void set_vehicle_type_image_max_sizes(CarEntry* vehicle_type, int32_t num_images) -{ - uint8_t bitmap[200][200] = { 0 }; - - rct_drawpixelinfo dpi = { - /*.bits = */ reinterpret_cast(bitmap), - /*.x = */ -100, - /*.y = */ -100, - /*.width = */ 200, - /*.height = */ 200, - /*.pitch = */ 0, - /*.zoom_level = */ ZoomLevel{ 0 }, - }; - - for (int32_t i = 0; i < num_images; ++i) - { - gfx_draw_sprite_software(&dpi, ImageId(vehicle_type->base_image_id + i), { 0, 0 }); - } - int32_t al = -1; - for (int32_t i = 99; i != 0; --i) - { - for (int32_t j = 0; j < 200; j++) - { - if (bitmap[j][100 - i] != 0) - { - al = i; - break; - } - } - - if (al != -1) - break; - - for (int32_t j = 0; j < 200; j++) - { - if (bitmap[j][100 + i] != 0) - { - al = i; - break; - } - } - - if (al != -1) - break; - } - - al++; - int32_t bl = -1; - - for (int32_t i = 99; i != 0; --i) - { - for (int32_t j = 0; j < 200; j++) - { - if (bitmap[100 - i][j] != 0) - { - bl = i; - break; - } - } - - if (bl != -1) - break; - } - bl++; - - int32_t bh = -1; - - for (int32_t i = 99; i != 0; --i) - { - for (int32_t j = 0; j < 200; j++) - { - if (bitmap[100 + i][j] != 0) - { - bh = i; - break; - } - } - - if (bh != -1) - break; - } - bh++; - - // Moved from object paint - - if (vehicle_type->flags & CAR_ENTRY_FLAG_SPRITE_BOUNDS_INCLUDE_INVERTED_SET) - { - bl += 16; - } - - vehicle_type->sprite_width = al; - vehicle_type->sprite_height_negative = bl; - vehicle_type->sprite_height_positive = bh; -} - /** * * rct2: 0x006B59C6 */ -void invalidate_test_results(Ride* ride) +void InvalidateTestResults(Ride& ride) { - ride->measurement = {}; - ride->excitement = RIDE_RATING_UNDEFINED; - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + ride.measurement = {}; + ride.excitement = RIDE_RATING_UNDEFINED; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; + if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { - for (int32_t i = 0; i < ride->NumTrains; i++) + for (int32_t i = 0; i < ride.NumTrains; i++) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle != nullptr) { - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING); + vehicle->ClearFlag(VehicleFlags::Testing); } } } - window_invalidate_by_number(WindowClass::Ride, ride->id.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); } /** @@ -4738,40 +4543,40 @@ void invalidate_test_results(Ride* ride) * @param rideIndex (dl) * @param reliabilityIncreaseFactor (ax) */ -void ride_fix_breakdown(Ride* ride, int32_t reliabilityIncreaseFactor) +void RideFixBreakdown(Ride& ride, int32_t reliabilityIncreaseFactor) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_BREAKDOWN_PENDING; - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_BROKEN_DOWN; - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_BREAKDOWN_PENDING; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_BROKEN_DOWN; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { - for (int32_t i = 0; i < ride->NumTrains; i++) + for (int32_t i = 0; i < ride.NumTrains; i++) { - for (Vehicle* vehicle = GetEntity(ride->vehicles[i]); vehicle != nullptr; + for (Vehicle* vehicle = GetEntity(ride.vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY); - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_CAR); - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN); + vehicle->ClearFlag(VehicleFlags::StoppedOnLift); + vehicle->ClearFlag(VehicleFlags::CarIsBroken); + vehicle->ClearFlag(VehicleFlags::TrainIsBroken); } } } - uint8_t unreliability = 100 - ride->reliability_percentage; - ride->reliability += reliabilityIncreaseFactor * (unreliability / 2); + uint8_t unreliability = 100 - ride.reliability_percentage; + ride.reliability += reliabilityIncreaseFactor * (unreliability / 2); } /** * * rct2: 0x006DE102 */ -void ride_update_vehicle_colours(Ride* ride) +void RideUpdateVehicleColours(const Ride& ride) { - if (ride->type == RIDE_TYPE_SPACE_RINGS || ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL)) + if (ride.type == RIDE_TYPE_SPACE_RINGS || ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL)) { - gfx_invalidate_screen(); + GfxInvalidateScreen(); } for (int32_t i = 0; i <= OpenRCT2::Limits::MaxTrainsPerRide; i++) @@ -4779,19 +4584,19 @@ void ride_update_vehicle_colours(Ride* ride) int32_t carIndex = 0; VehicleColour colours = {}; - for (Vehicle* vehicle = GetEntity(ride->vehicles[i]); vehicle != nullptr; + for (Vehicle* vehicle = GetEntity(ride.vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { - switch (ride->colour_scheme_type & 3) + switch (ride.colour_scheme_type & 3) { case RIDE_COLOUR_SCHEME_MODE_ALL_SAME: - colours = ride->vehicle_colours[0]; + colours = ride.vehicle_colours[0]; break; case RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_TRAIN: - colours = ride->vehicle_colours[i]; + colours = ride.vehicle_colours[i]; break; case RIDE_COLOUR_SCHEME_MODE_DIFFERENT_PER_CAR: - colours = ride->vehicle_colours[std::min(carIndex, OpenRCT2::Limits::MaxCarsPerTrain - 1)]; + colours = ride.vehicle_colours[std::min(carIndex, OpenRCT2::Limits::MaxCarsPerTrain - 1)]; break; } @@ -4802,9 +4607,9 @@ void ride_update_vehicle_colours(Ride* ride) } } -uint8_t ride_entry_get_vehicle_at_position(int32_t rideEntryIndex, int32_t numCarsPerTrain, int32_t position) +uint8_t RideEntryGetVehicleAtPosition(int32_t rideEntryIndex, int32_t numCarsPerTrain, int32_t position) { - rct_ride_entry* rideEntry = get_ride_entry(rideEntryIndex); + const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (position == 0 && rideEntry->FrontCar != 255) { return rideEntry->FrontCar; @@ -4834,7 +4639,7 @@ struct NecessarySpriteGroup }; // Finds track pieces that a given ride entry has sprites for -OpenRCT2::BitSet ride_entry_get_supported_track_pieces(const rct_ride_entry* rideEntry) +OpenRCT2::BitSet RideEntryGetSupportedTrackPieces(const RideObjectEntry& rideEntry) { // TODO: Use a std::span when C++20 available as 6 is due to jagged array static const std::array trackPieceRequiredSprites[TRACK_GROUP_COUNT] = { @@ -4981,7 +4786,7 @@ OpenRCT2::BitSet ride_entry_get_supported_track_pieces(const // exception, at least) auto supportedPieces = OpenRCT2::BitSet(); supportedPieces.flip(); - auto defaultVehicle = rideEntry->GetDefaultCar(); + auto defaultVehicle = rideEntry.GetDefaultCar(); if (defaultVehicle != nullptr) { for (size_t i = 0; i < std::size(trackPieceRequiredSprites); i++) @@ -4997,10 +4802,10 @@ OpenRCT2::BitSet ride_entry_get_supported_track_pieces(const return supportedPieces; } -static std::optional ride_get_smallest_station_length(Ride* ride) +static std::optional RideGetSmallestStationLength(const Ride& ride) { std::optional result; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { if (!station.Start.IsNull()) { @@ -5017,14 +4822,14 @@ static std::optional ride_get_smallest_station_length(Ride* ride) * * rct2: 0x006CB3AA */ -static int32_t ride_get_track_length(Ride* ride) +static int32_t RideGetTrackLength(const Ride& ride) { TileElement* tileElement = nullptr; track_type_t trackType; CoordsXYZ trackStart; bool foundTrack = false; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { trackStart = station.GetStart(); if (trackStart.IsNull()) @@ -5058,20 +4863,20 @@ static int32_t ride_get_track_length(Ride* ride) RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); - rct_window* w = window_find_by_class(WindowClass::RideConstruction); + WindowBase* w = WindowFindByClass(WindowClass::RideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == rideIndex) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); } bool moveSlowIt = true; int32_t result = 0; - track_circuit_iterator it; - track_circuit_iterator_begin(&it, { trackStart.x, trackStart.y, tileElement }); + TrackCircuitIterator it; + TrackCircuitIteratorBegin(&it, { trackStart.x, trackStart.y, tileElement }); - track_circuit_iterator slowIt = it; - while (track_circuit_iterator_next(&it)) + TrackCircuitIterator slowIt = it; + while (TrackCircuitIteratorNext(&it)) { trackType = it.current.element->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); @@ -5080,8 +4885,8 @@ static int32_t ride_get_track_length(Ride* ride) moveSlowIt = !moveSlowIt; if (moveSlowIt) { - track_circuit_iterator_next(&slowIt); - if (track_circuit_iterators_match(&it, &slowIt)) + TrackCircuitIteratorNext(&slowIt); + if (TrackCircuitIteratorsMatch(&it, &slowIt)) { return 0; } @@ -5099,39 +4904,39 @@ void Ride::UpdateMaxVehicles() if (subtype == OBJECT_ENTRY_INDEX_NULL) return; - rct_ride_entry* rideEntry = get_ride_entry(subtype); + const auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry == nullptr) { return; } - CarEntry* carEntry; + uint8_t numCarsPerTrain, numTrains; int32_t maxNumTrains; + const auto& rtd = GetRideTypeDescriptor(); if (rideEntry->cars_per_flat_ride == NoFlatRideCars) { - int32_t trainLength; num_cars_per_train = std::max(rideEntry->min_cars_in_train, num_cars_per_train); MinCarsPerTrain = rideEntry->min_cars_in_train; MaxCarsPerTrain = rideEntry->max_cars_in_train; // Calculate maximum train length based on smallest station length - auto stationNumTiles = ride_get_smallest_station_length(this); + auto stationNumTiles = RideGetSmallestStationLength(*this); if (!stationNumTiles.has_value()) return; auto stationLength = (stationNumTiles.value() * 0x44180) - 0x16B2A; - int32_t maxMass = GetRideTypeDescriptor().MaxMass << 8; + int32_t maxMass = rtd.MaxMass << 8; int32_t maxCarsPerTrain = 1; for (int32_t numCars = rideEntry->max_cars_in_train; numCars > 0; numCars--) { - trainLength = 0; + int32_t trainLength = 0; int32_t totalMass = 0; for (int32_t i = 0; i < numCars; i++) { - carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position(subtype, numCars, i)]; - trainLength += carEntry->spacing; - totalMass += carEntry->car_mass; + const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(subtype, numCars, i)]; + trainLength += carEntry.spacing; + totalMass += carEntry.car_mass; } if (trainLength <= stationLength && totalMass <= maxMass) @@ -5164,11 +4969,11 @@ void Ride::UpdateMaxVehicles() break; default: // Calculate maximum number of trains - trainLength = 0; + int32_t trainLength = 0; for (int32_t i = 0; i < newCarsPerTrain; i++) { - carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position(subtype, newCarsPerTrain, i)]; - trainLength += carEntry->spacing; + const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(subtype, newCarsPerTrain, i)]; + trainLength += carEntry.spacing; } int32_t totalLength = trainLength / 2; @@ -5183,24 +4988,24 @@ void Ride::UpdateMaxVehicles() } while (totalLength <= stationLength); if ((mode != RideMode::StationToStation && mode != RideMode::ContinuousCircuit) - || !(GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS))) + || !(rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_MORE_VEHICLES_THAN_STATION_FITS))) { maxNumTrains = std::min(maxNumTrains, int32_t(OpenRCT2::Limits::MaxTrainsPerRide)); } else { - carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position(subtype, newCarsPerTrain, 0)]; - int32_t poweredMaxSpeed = carEntry->powered_max_speed; + const auto& firstCarEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(subtype, newCarsPerTrain, 0)]; + int32_t poweredMaxSpeed = firstCarEntry.powered_max_speed; int32_t totalSpacing = 0; for (int32_t i = 0; i < newCarsPerTrain; i++) { - carEntry = &rideEntry->Cars[ride_entry_get_vehicle_at_position(subtype, newCarsPerTrain, i)]; - totalSpacing += carEntry->spacing; + const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(subtype, newCarsPerTrain, i)]; + totalSpacing += carEntry.spacing; } totalSpacing >>= 13; - int32_t trackLength = ride_get_track_length(this) / 4; + int32_t trackLength = RideGetTrackLength(*this) / 4; if (poweredMaxSpeed > 10) trackLength = (trackLength * 3) / 4; if (poweredMaxSpeed > 25) @@ -5242,7 +5047,7 @@ void Ride::UpdateMaxVehicles() { num_cars_per_train = numCarsPerTrain; NumTrains = numTrains; - window_invalidate_by_number(WindowClass::Ride, id.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, id.ToUnderlying()); } } @@ -5256,7 +5061,7 @@ void Ride::UpdateNumberOfCircuits() void Ride::SetRideEntry(ObjectEntryIndex entryIndex) { - auto colour = ride_get_unused_preset_vehicle_colour(entryIndex); + auto colour = RideGetUnusedPresetVehicleColour(entryIndex); auto rideSetVehicleAction = RideSetVehicleAction(id, RideSetVehicleType::RideEntry, entryIndex, colour); GameActions::Execute(&rideSetVehicleAction); } @@ -5280,7 +5085,7 @@ void Ride::SetToDefaultInspectionInterval() { if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) { - set_operating_setting(id, RideSetSetting::InspectionInterval, defaultInspectionInterval); + SetOperatingSetting(id, RideSetSetting::InspectionInterval, defaultInspectionInterval); } } } @@ -5297,10 +5102,10 @@ void Ride::Crash(uint8_t vehicleIndex) { // Open ride window for crashed vehicle auto intent = Intent(WD_VEHICLE); - intent.putExtra(INTENT_EXTRA_VEHICLE, vehicle); - rct_window* w = ContextOpenIntent(&intent); + intent.PutExtra(INTENT_EXTRA_VEHICLE, vehicle); + WindowBase* w = ContextOpenIntent(&intent); - rct_viewport* viewport = window_get_viewport(w); + Viewport* viewport = WindowGetViewport(w); if (w != nullptr && viewport != nullptr) { viewport->flags |= VIEWPORT_FLAG_SOUND_ON; @@ -5315,40 +5120,32 @@ void Ride::Crash(uint8_t vehicleIndex) } } -void ride_reset_all_names() -{ - for (auto& ride : GetRideManager()) - { - ride.SetNameToDefault(); - } -} - // Gets the approximate value of customers per hour for this ride. Multiplies ride_customers_in_last_5_minutes() by 12. -uint32_t ride_customers_per_hour(const Ride* ride) +uint32_t RideCustomersPerHour(const Ride& ride) { - return ride_customers_in_last_5_minutes(ride) * 12; + return RideCustomersInLast5Minutes(ride) * 12; } // Calculates the number of customers for this ride in the last 5 minutes (or more correctly 9600 game ticks) -uint32_t ride_customers_in_last_5_minutes(const Ride* ride) +uint32_t RideCustomersInLast5Minutes(const Ride& ride) { uint32_t sum = 0; for (int32_t i = 0; i < OpenRCT2::Limits::CustomerHistorySize; i++) { - sum += ride->num_customers[i]; + sum += ride.num_customers[i]; } return sum; } -Vehicle* ride_get_broken_vehicle(const Ride* ride) +Vehicle* RideGetBrokenVehicle(const Ride& ride) { - auto vehicleIndex = ride->vehicles[ride->broken_vehicle]; + auto vehicleIndex = ride.vehicles[ride.broken_vehicle]; Vehicle* vehicle = GetEntity(vehicleIndex); if (vehicle != nullptr) { - return vehicle->GetCar(ride->broken_car); + return vehicle->GetCar(ride.broken_car); } return nullptr; } @@ -5359,9 +5156,7 @@ Vehicle* ride_get_broken_vehicle(const Ride* ride) */ void Ride::Delete() { - custom_name = {}; - measurement = {}; - type = RIDE_TYPE_NULL; + RideDelete(id); } void Ride::Renew() @@ -5382,25 +5177,25 @@ bool Ride::IsRide() const return GetClassification() == RideClassification::Ride; } -money16 ride_get_price(const Ride* ride) +money64 RideGetPrice(const Ride& ride) { if (gParkFlags & PARK_FLAGS_NO_MONEY) return 0; - if (ride->IsRide()) + if (ride.IsRide()) { if (!ParkRidePricesUnlocked()) { return 0; } } - return ride->price[0]; + return ride.price[0]; } /** * Return the tile_element of an adjacent station at x,y,z(+-2). * Returns nullptr if no suitable tile_element is found. */ -TileElement* get_station_platform(const CoordsXYRangedZ& coords) +TileElement* GetStationPlatform(const CoordsXYRangedZ& coords) { bool foundTileElement = false; TileElement* tileElement = MapGetFirstElementAt(coords); @@ -5436,7 +5231,7 @@ TileElement* get_station_platform(const CoordsXYRangedZ& coords) /** * Check for an adjacent station to x,y,z in direction. */ -static bool check_for_adjacent_station(const CoordsXYZ& stationCoords, uint8_t direction) +static bool CheckForAdjacentStation(const CoordsXYZ& stationCoords, uint8_t direction) { bool found = false; int32_t adjX = stationCoords.x; @@ -5445,12 +5240,12 @@ static bool check_for_adjacent_station(const CoordsXYZ& stationCoords, uint8_t d { adjX += CoordsDirectionDelta[direction].x; adjY += CoordsDirectionDelta[direction].y; - TileElement* stationElement = get_station_platform( + TileElement* stationElement = GetStationPlatform( { { adjX, adjY, stationCoords.z }, stationCoords.z + 2 * COORDS_Z_STEP }); if (stationElement != nullptr) { auto rideIndex = stationElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride != nullptr && (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { found = true; @@ -5463,31 +5258,31 @@ static bool check_for_adjacent_station(const CoordsXYZ& stationCoords, uint8_t d /** * Return whether ride has at least one adjacent station to it. */ -bool ride_has_adjacent_station(Ride* ride) +bool RideHasAdjacentStation(const Ride& ride) { bool found = false; /* Loop through all of the ride stations, checking for an * adjacent station on either side. */ - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { auto stationStart = station.GetStart(); if (!stationStart.IsNull()) { /* Get the map element for the station start. */ - TileElement* stationElement = get_station_platform({ stationStart, stationStart.z + 0 }); + TileElement* stationElement = GetStationPlatform({ stationStart, stationStart.z + 0 }); if (stationElement == nullptr) { continue; } /* Check the first side of the station */ int32_t direction = stationElement->GetDirectionWithOffset(1); - found = check_for_adjacent_station(stationStart, direction); + found = CheckForAdjacentStation(stationStart, direction); if (found) break; /* Check the other side of the station */ direction = DirectionReverse(direction); - found = check_for_adjacent_station(stationStart, direction); + found = CheckForAdjacentStation(stationStart, direction); if (found) break; } @@ -5495,18 +5290,18 @@ bool ride_has_adjacent_station(Ride* ride) return found; } -bool ride_has_station_shelter(Ride* ride) +bool RideHasStationShelter(const Ride& ride) { - const auto* stationObj = ride->GetStationObject(); + const auto* stationObj = ride.GetStationObject(); return stationObj != nullptr && (stationObj->Flags & STATION_OBJECT_FLAGS::HAS_SHELTER); } -bool ride_has_ratings(const Ride* ride) +bool RideHasRatings(const Ride& ride) { - return ride->excitement != RIDE_RATING_UNDEFINED; + return ride.excitement != RIDE_RATING_UNDEFINED; } -int32_t get_booster_speed(ride_type_t rideType, int32_t rawSpeed) +int32_t GetBoosterSpeed(ride_type_t rideType, int32_t rawSpeed) { int8_t shiftFactor = GetRideTypeDescriptor(rideType).OperatingSettings.BoosterSpeedFactor; if (shiftFactor == 0) @@ -5523,7 +5318,7 @@ int32_t get_booster_speed(ride_type_t rideType, int32_t rawSpeed) return (rawSpeed >> shiftFactorAbs); } -void fix_invalid_vehicle_sprite_sizes() +void FixInvalidVehicleSpriteSizes() { for (const auto& ride : GetRideManager()) { @@ -5555,13 +5350,13 @@ void fix_invalid_vehicle_sprite_sizes() } } -bool ride_entry_has_category(const rct_ride_entry* rideEntry, uint8_t category) +bool RideEntryHasCategory(const RideObjectEntry& rideEntry, uint8_t category) { - auto rideType = rideEntry->GetFirstNonNullRideType(); + auto rideType = rideEntry.GetFirstNonNullRideType(); return GetRideTypeDescriptor(rideType).Category == category; } -int32_t ride_get_entry_index(int32_t rideType, int32_t rideSubType) +int32_t RideGetEntryIndex(int32_t rideType, int32_t rideSubType) { int32_t subType = rideSubType; @@ -5574,14 +5369,14 @@ int32_t ride_get_entry_index(int32_t rideType, int32_t rideSubType) subType = rideEntries[0]; for (auto rideEntryIndex : rideEntries) { - auto rideEntry = get_ride_entry(rideEntryIndex); + const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry == nullptr) { return OBJECT_ENTRY_INDEX_NULL; } // Can happen in select-by-track-type mode - if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) { continue; } @@ -5612,13 +5407,13 @@ const MusicObject* Ride::GetMusicObject() const // Normally, a station has at most one entrance and one exit, which are at the same height // as the station. But in hacked parks, neither can be taken for granted. This code ensures -// that the ride->entrances and ride->exits arrays will point to one of them. There is +// that the ride.entrances and ride.exits arrays will point to one of them. There is // an ever-so-slight chance two entrances/exits for the same station reside on the same tile. // In cases like this, the one at station height will be considered the "true" one. // If none exists at that height, newer and higher placed ones take precedence. -void determine_ride_entrance_and_exit_locations() +void DetermineRideEntranceAndExitLocations() { - log_verbose("Inspecting ride entrance / exit locations"); + LOG_VERBOSE("Inspecting ride entrance / exit locations"); for (auto& ride : GetRideManager()) { @@ -5703,18 +5498,18 @@ void determine_ride_entrance_and_exit_locations() { if (station.Entrance.z == expectedHeight) continue; - if (station.Entrance.z > entranceElement->base_height) + if (station.Entrance.z > entranceElement->BaseHeight) continue; } // Found our entrance - station.Entrance = { x, y, entranceElement->base_height, + station.Entrance = { x, y, entranceElement->BaseHeight, static_cast(entranceElement->GetDirection()) }; alreadyFoundEntrance = true; - log_verbose( + LOG_VERBOSE( "Fixed disconnected entrance of ride %d, station %d to x = %d, y = %d and z = %d.", ride.id, - stationIndex, x, y, entranceElement->base_height); + stationIndex, x, y, entranceElement->BaseHeight); } else if (fixExit && entranceElement->GetEntranceType() == ENTRANCE_TYPE_RIDE_EXIT) { @@ -5722,18 +5517,18 @@ void determine_ride_entrance_and_exit_locations() { if (station.Exit.z == expectedHeight) continue; - if (station.Exit.z > entranceElement->base_height) + if (station.Exit.z > entranceElement->BaseHeight) continue; } // Found our exit - station.Exit = { x, y, entranceElement->base_height, + station.Exit = { x, y, entranceElement->BaseHeight, static_cast(entranceElement->GetDirection()) }; alreadyFoundExit = true; - log_verbose( + LOG_VERBOSE( "Fixed disconnected exit of ride %d, station %d to x = %d, y = %d and z = %d.", ride.id, - stationIndex, x, y, entranceElement->base_height); + stationIndex, x, y, entranceElement->BaseHeight); } } while (!(tileElement++)->IsLastForTile()); } @@ -5743,18 +5538,18 @@ void determine_ride_entrance_and_exit_locations() if (fixEntrance && !alreadyFoundEntrance) { station.Entrance.SetNull(); - log_verbose("Cleared disconnected entrance of ride %d, station %d.", ride.id, stationIndex); + LOG_VERBOSE("Cleared disconnected entrance of ride %d, station %d.", ride.id, stationIndex); } if (fixExit && !alreadyFoundExit) { station.Exit.SetNull(); - log_verbose("Cleared disconnected exit of ride %d, station %d.", ride.id, stationIndex); + LOG_VERBOSE("Cleared disconnected exit of ride %d, station %d.", ride.id, stationIndex); } } } } -void ride_clear_leftover_entrances(Ride* ride) +void RideClearLeftoverEntrances(const Ride& ride) { for (TileCoordsXY tilePos = {}; tilePos.x < gMapSize.x; ++tilePos.x) { @@ -5766,7 +5561,7 @@ void ride_clear_leftover_entrances(Ride* ride) || entrance->GetEntranceType() == ENTRANCE_TYPE_RIDE_EXIT; if (!isRideEntranceExit) continue; - if (entrance->GetRideIndex() != ride->id) + if (entrance->GetRideIndex() != ride.id) continue; TileElementRemove(entrance->as()); @@ -5779,7 +5574,7 @@ std::string Ride::GetName() const { Formatter ft; FormatNameTo(ft); - return format_string(STR_STRINGID, ft.Data()); + return FormatStringID(STR_STRINGID, reinterpret_cast(ft.Data())); } void Ride::FormatNameTo(Formatter& ft) const @@ -5792,8 +5587,9 @@ void Ride::FormatNameTo(Formatter& ft) const } else { - auto rideTypeName = GetRideTypeDescriptor().Naming.Name; - if (GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) + const auto& rtd = GetRideTypeDescriptor(); + auto rideTypeName = rtd.Naming.Name; + if (rtd.HasFlag(RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY)) { auto rideEntry = GetRideEntry(); if (rideEntry != nullptr) @@ -5898,7 +5694,7 @@ std::vector GetTracklessRides() // Iterate map and build list of seen ride IDs std::vector seen; seen.resize(256); - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it)) { @@ -5927,3 +5723,133 @@ std::vector GetTracklessRides() } return result; } + +ResultWithMessage Ride::ChangeStatusDoStationChecks(StationIndex& stationIndex) +{ + auto stationIndexCheck = RideModeCheckStationPresent(*this); + stationIndex = stationIndexCheck.StationIndex; + if (stationIndex.IsNull()) + return { false, stationIndexCheck.Message }; + + auto stationNumbersCheck = RideModeCheckValidStationNumbers(*this); + if (!stationNumbersCheck.Successful) + return { false, stationNumbersCheck.Message }; + + return { true }; +} + +ResultWithMessage Ride::ChangeStatusGetStartElement(StationIndex stationIndex, CoordsXYE& trackElement) +{ + auto startLoc = GetStation(stationIndex).Start; + trackElement.x = startLoc.x; + trackElement.y = startLoc.y; + trackElement.element = reinterpret_cast(GetOriginElement(stationIndex)); + if (trackElement.element == nullptr) + { + // Maze is strange, station start is 0... investigation required + const auto& rtd = GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + return { false }; + } + + return { true }; +} + +ResultWithMessage Ride::ChangeStatusCheckCompleteCircuit(const CoordsXYE& trackElement) +{ + CoordsXYE problematicTrackElement = {}; + if (mode == RideMode::Race || mode == RideMode::ContinuousCircuit || IsBlockSectioned()) + { + if (FindTrackGap(trackElement, &problematicTrackElement)) + { + RideScrollToTrackError(problematicTrackElement); + return { false, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT }; + } + } + + return { true }; +} + +ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackElement) +{ + CoordsXYE problematicTrackElement = {}; + + if (IsBlockSectioned()) + { + auto blockBrakeCheck = RideCheckBlockBrakes(trackElement, &problematicTrackElement); + if (!blockBrakeCheck.Successful) + { + RideScrollToTrackError(problematicTrackElement); + return { false, blockBrakeCheck.Message }; + } + } + + if (subtype != OBJECT_ENTRY_INDEX_NULL && !gCheatsEnableAllDrawableTrackPieces) + { + const auto* rideEntry = GetRideEntryByIndex(subtype); + if (rideEntry->flags & RIDE_ENTRY_FLAG_NO_INVERSIONS) + { + if (RideCheckTrackContainsInversions(trackElement, &problematicTrackElement)) + { + RideScrollToTrackError(problematicTrackElement); + return { false, STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN }; + } + } + if (rideEntry->flags & RIDE_ENTRY_FLAG_NO_BANKED_TRACK) + { + if (RideCheckTrackContainsBanked(trackElement, &problematicTrackElement)) + { + RideScrollToTrackError(problematicTrackElement); + return { false, STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN }; + } + } + } + + if (mode == RideMode::StationToStation) + { + if (!FindTrackGap(trackElement, &problematicTrackElement)) + { + return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; + } + + if (!RideCheckStationLength(trackElement, &problematicTrackElement)) + { + RideScrollToTrackError(problematicTrackElement); + return { false, STR_STATION_NOT_LONG_ENOUGH }; + } + + if (!RideCheckStartAndEndIsStation(trackElement)) + { + RideScrollToTrackError(problematicTrackElement); + return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; + } + } + + return { true }; +} + +ResultWithMessage Ride::ChangeStatusCreateVehicles(bool isApplying, const CoordsXYE& trackElement) +{ + if (isApplying) + RideSetStartFinishPoints(id, trackElement); + + const auto& rtd = GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES) && !(lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + { + const auto createVehicleResult = CreateVehicles(trackElement, isApplying); + if (!createVehicleResult.Successful) + { + return { false, createVehicleResult.Message }; + } + } + + if (rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL) && (lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) + && !(lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT)) + { + const auto createCableLiftResult = RideCreateCableLift(id, isApplying); + if (!createCableLiftResult.Successful) + return { false, createCableLiftResult.Message }; + } + + return { true }; +} diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index 439038e070..fdd37c78fe 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,7 +37,7 @@ struct RideTypeDescriptor; struct Guest; struct Staff; struct Vehicle; -struct rct_ride_entry; +struct RideObjectEntry; struct ResultWithMessage; #define RIDE_ADJACENCY_CHECK_DISTANCE 5 @@ -187,7 +187,7 @@ struct Ride uint16_t num_customers_timeout; // Customer count in the last 10 * 960 game ticks (sliding window) uint16_t num_customers[OpenRCT2::Limits::CustomerHistorySize]; - money16 price[RCT2::ObjectLimits::MaxShopItemsPerRideEntry]; + money64 price[RCT2::ObjectLimits::MaxShopItemsPerRideEntry]; TileCoordsXYZ ChairliftBullwheelLocation[2]; union { @@ -199,7 +199,7 @@ struct Ride ride_rating nausea; }; }; - uint16_t value; + money64 value; uint16_t chairlift_bullwheel_rotation; uint8_t satisfaction; uint8_t satisfaction_time_out; @@ -222,7 +222,7 @@ struct Ride uint8_t slide_peep_t_shirt_colour; uint8_t spiral_slide_progress; int32_t build_date; - money16 upkeep_cost; + money64 upkeep_cost; EntityId race_winner; uint32_t music_position; uint8_t breakdown_reason_pending; @@ -309,6 +309,12 @@ private: void ChainQueues() const; void ConstructMissingEntranceOrExit() const; + ResultWithMessage ChangeStatusDoStationChecks(StationIndex& stationIndex); + ResultWithMessage ChangeStatusGetStartElement(StationIndex stationIndex, CoordsXYE& trackElement); + ResultWithMessage ChangeStatusCheckCompleteCircuit(const CoordsXYE& trackElement); + ResultWithMessage ChangeStatusCheckTrackValidity(const CoordsXYE& trackElement); + ResultWithMessage ChangeStatusCreateVehicles(bool isApplying, const CoordsXYE& trackElement); + public: bool CanBreakDown() const; RideClassification GetClassification() const; @@ -340,13 +346,14 @@ public: void ValidateStations(); ResultWithMessage Open(bool isApplying); - ResultWithMessage Test(RideStatus newStatus, bool isApplying); + ResultWithMessage Test(bool isApplying); + ResultWithMessage Simulate(bool isApplying); RideMode GetDefaultMode() const; void SetColourPreset(uint8_t index); - rct_ride_entry* GetRideEntry() const; + const RideObjectEntry* GetRideEntry() const; size_t GetNumPrices() const; int32_t GetAge() const; @@ -397,13 +404,15 @@ public: bool HasRecolourableShopItems() const; bool HasStation() const; + + bool FindTrackGap(const CoordsXYE& input, CoordsXYE* output) const; }; void UpdateSpiralSlide(Ride& ride); void UpdateChairlift(Ride& ride); #pragma pack(push, 1) -struct track_begin_end +struct TrackBeginEnd { int32_t begin_x; int32_t begin_y; @@ -416,16 +425,9 @@ struct track_begin_end TileElement* end_element; }; #ifdef PLATFORM_32BIT -assert_struct_size(track_begin_end, 36); +assert_struct_size(TrackBeginEnd, 36); #endif -struct ride_name_args -{ - uint16_t type_name; - uint16_t number; -}; -assert_struct_size(ride_name_args, 4); - #pragma pack(pop) // Constants used by the lifecycle_flags property at 0x1D0 @@ -483,6 +485,7 @@ enum // Must be set with swing mode 1 as well. RIDE_ENTRY_FLAG_ALTERNATIVE_SWING_MODE_2 = 1 << 20, RIDE_ENTRY_FLAG_RIDER_CONTROLS_SPEED = 1 << 21, + RIDE_ENTRY_FLAG_HIDE_EMPTY_TRAINS = 1 << 22, }; enum @@ -890,7 +893,7 @@ enum }; #define MAX_RIDE_MEASUREMENTS 8 -#define RIDE_VALUE_UNDEFINED 0xFFFF +constexpr money64 RIDE_VALUE_UNDEFINED = MONEY64_UNDEFINED; #define RIDE_INITIAL_RELIABILITY ((100 << 8) | 0xFF) // Upper byte is percentage, lower byte is "decimal". #define STATION_DEPART_FLAG (1 << 7) @@ -905,18 +908,18 @@ enum constexpr uint32_t CONSTRUCTION_LIFT_HILL_SELECTED = 1 << 0; constexpr uint32_t CONSTRUCTION_INVERTED_TRACK_SELECTED = 1 << 1; -Ride* get_ride(RideId index); +Ride* GetRide(RideId index); struct RideManager { const Ride* operator[](RideId id) const { - return get_ride(id); + return GetRide(id); } Ride* operator[](RideId id) { - return get_ride(id); + return GetRide(id); } class Iterator @@ -992,114 +995,111 @@ struct RideManager RideManager GetRideManager(); RideId GetNextFreeRideId(); -Ride* GetOrAllocateRide(RideId index); -rct_ride_entry* get_ride_entry(ObjectEntryIndex index); -std::string_view get_ride_entry_name(ObjectEntryIndex index); +Ride* RideAllocateAtIndex(RideId index); +Ride& RideGetTemporaryForPreview(); +void RideDelete(RideId id); -extern money16 gTotalRideValueForMoney; +const RideObjectEntry* GetRideEntryByIndex(ObjectEntryIndex index); +std::string_view GetRideEntryName(ObjectEntryIndex index); + +extern money64 gTotalRideValueForMoney; extern const StringId ColourSchemeNames[4]; extern ObjectEntryIndex gLastEntranceStyle; -int32_t ride_get_count(); -void ride_init_all(); -void reset_all_ride_build_dates(); -void ride_update_favourited_stat(); -void ride_check_all_reachable(); +int32_t RideGetCount(); +void RideInitAll(); +void ResetAllRideBuildDates(); +void RideUpdateFavouritedStat(); +void RideCheckAllReachable(); -bool ride_try_get_origin_element(const Ride* ride, CoordsXYE* output); -int32_t ride_find_track_gap(const Ride* ride, CoordsXYE* input, CoordsXYE* output); -void ride_construct(Ride* ride); -void ride_clear_blocked_tiles(Ride* ride); -Staff* ride_get_mechanic(Ride* ride); -Staff* ride_get_assigned_mechanic(Ride* ride); -TrackColour ride_get_track_colour(Ride* ride, int32_t colourScheme); -VehicleColour ride_get_vehicle_colour(Ride* ride, int32_t vehicleIndex); -int32_t ride_get_unused_preset_vehicle_colour(ObjectEntryIndex subType); -void ride_set_vehicle_colours_to_random_preset(Ride* ride, uint8_t preset_index); -void ride_measurements_update(); -void ride_breakdown_add_news_item(Ride* ride); -Staff* ride_find_closest_mechanic(Ride* ride, int32_t forInspection); -int32_t ride_initialise_construction_window(Ride* ride); -void ride_set_map_tooltip(TileElement* tileElement); -void ride_prepare_breakdown(Ride* ride, int32_t breakdownReason); -TileElement* ride_get_station_start_track_element(const Ride* ride, StationIndex stationIndex); -TileElement* ride_get_station_exit_element(const CoordsXYZ& elementPos); -int32_t ride_get_refund_price(const Ride* ride); -int32_t ride_get_random_colour_preset_index(ride_type_t rideType); -money32 ride_get_common_price(Ride* forRide); +bool RideTryGetOriginElement(const Ride& ride, CoordsXYE* output); +void RideClearBlockedTiles(const Ride& ride); +Staff* RideGetMechanic(const Ride& ride); +Staff* RideGetAssignedMechanic(const Ride& ride); +VehicleColour RideGetVehicleColour(const Ride& ride, int32_t vehicleIndex); +int32_t RideGetUnusedPresetVehicleColour(ObjectEntryIndex subType); +void RideSetVehicleColoursToRandomPreset(Ride& ride, uint8_t preset_index); +void RideMeasurementsUpdate(); +void RideBreakdownAddNewsItem(const Ride& ride); +Staff* RideFindClosestMechanic(const Ride& ride, int32_t forInspection); +int32_t RideInitialiseConstructionWindow(Ride& ride); +void RideSetMapTooltip(TileElement* tileElement); +void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason); +TileElement* RideGetStationStartTrackElement(const Ride& ride, StationIndex stationIndex); +TileElement* RideGetStationExitElement(const CoordsXYZ& elementPos); +money64 RideGetRefundPrice(const Ride& ride); +int32_t RideGetRandomColourPresetIndex(ride_type_t rideType); +money64 RideGetCommonPrice(const Ride& forRide); -void ride_clear_for_construction(Ride* ride); -void invalidate_test_results(Ride* ride); +void RideClearForConstruction(Ride& ride); +void InvalidateTestResults(Ride& ride); -void increment_turn_count_1_element(Ride* ride, uint8_t type); -void increment_turn_count_2_elements(Ride* ride, uint8_t type); -void increment_turn_count_3_elements(Ride* ride, uint8_t type); -void increment_turn_count_4_plus_elements(Ride* ride, uint8_t type); -int32_t get_turn_count_1_element(Ride* ride, uint8_t type); -int32_t get_turn_count_2_elements(Ride* ride, uint8_t type); -int32_t get_turn_count_3_elements(Ride* ride, uint8_t type); -int32_t get_turn_count_4_plus_elements(Ride* ride, uint8_t type); +void IncrementTurnCount1Element(Ride& ride, uint8_t type); +void IncrementTurnCount2Elements(Ride& ride, uint8_t type); +void IncrementTurnCount3Elements(Ride& ride, uint8_t type); +void IncrementTurnCount4PlusElements(Ride& ride, uint8_t type); +int32_t GetTurnCount1Element(const Ride& ride, uint8_t type); +int32_t GetTurnCount2Elements(const Ride& ride, uint8_t type); +int32_t GetTurnCount3Elements(const Ride& ride, uint8_t type); +int32_t GetTurnCount4PlusElements(const Ride& ride, uint8_t type); -uint8_t ride_get_helix_sections(Ride* ride); +uint8_t RideGetHelixSections(const Ride& ride); -bool ride_has_any_track_elements(const Ride* ride); +bool RideHasAnyTrackElements(const Ride& ride); -bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32_t* direction); -bool track_block_get_next_from_zero( - const CoordsXYZ& startPos, Ride* ride, uint8_t direction_start, CoordsXYE* output, int32_t* z, int32_t* direction, +bool TrackBlockGetNext(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32_t* direction); +bool TrackBlockGetNextFromZero( + const CoordsXYZ& startPos, const Ride& ride, uint8_t direction_start, CoordsXYE* output, int32_t* z, int32_t* direction, bool isGhost); -bool track_block_get_previous(const CoordsXYE& trackPos, track_begin_end* outTrackBeginEnd); -bool track_block_get_previous_from_zero( - const CoordsXYZ& startPos, Ride* ride, uint8_t direction, track_begin_end* outTrackBeginEnd); +bool TrackBlockGetPrevious(const CoordsXYE& trackPos, TrackBeginEnd* outTrackBeginEnd); +bool TrackBlockGetPreviousFromZero( + const CoordsXYZ& startPos, const Ride& ride, uint8_t direction, TrackBeginEnd* outTrackBeginEnd); -void ride_get_start_of_track(CoordsXYE* output); +void RideGetStartOfTrack(CoordsXYE* output); -void window_ride_construction_update_active_elements(); -money32 RideEntranceExitPlaceGhost( - Ride* ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum); +void WindowRideConstructionUpdateActiveElements(); +money64 RideEntranceExitPlaceGhost( + const Ride& ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum); -ResultWithMessage ride_are_all_possible_entrances_and_exits_built(Ride* ride); -void ride_fix_breakdown(Ride* ride, int32_t reliabilityIncreaseFactor); +ResultWithMessage RideAreAllPossibleEntrancesAndExitsBuilt(const Ride& ride); +void RideFixBreakdown(Ride& ride, int32_t reliabilityIncreaseFactor); -uint8_t ride_entry_get_vehicle_at_position(int32_t rideEntryIndex, int32_t numCarsPerTrain, int32_t position); -void ride_update_vehicle_colours(Ride* ride); +uint8_t RideEntryGetVehicleAtPosition(int32_t rideEntryIndex, int32_t numCarsPerTrain, int32_t position); +void RideUpdateVehicleColours(const Ride& ride); -OpenRCT2::BitSet ride_entry_get_supported_track_pieces(const rct_ride_entry* rideEntry); +OpenRCT2::BitSet RideEntryGetSupportedTrackPieces(const RideObjectEntry& rideEntry); enum class RideSetSetting : uint8_t; -money32 set_operating_setting(RideId rideId, RideSetSetting setting, uint8_t value); -money32 set_operating_setting_nested(RideId rideId, RideSetSetting setting, uint8_t value, uint8_t flags); +money64 SetOperatingSetting(RideId rideId, RideSetSetting setting, uint8_t value); +money64 SetOperatingSettingNested(RideId rideId, RideSetSetting setting, uint8_t value, uint8_t flags); void UpdateGhostTrackAndArrow(); -void ride_reset_all_names(); +uint32_t RideCustomersPerHour(const Ride& ride); +uint32_t RideCustomersInLast5Minutes(const Ride& ride); -uint32_t ride_customers_per_hour(const Ride* ride); -uint32_t ride_customers_in_last_5_minutes(const Ride* ride); +Vehicle* RideGetBrokenVehicle(const Ride& ride); -Vehicle* ride_get_broken_vehicle(const Ride* ride); +money64 RideGetPrice(const Ride& ride); -money16 ride_get_price(const Ride* ride); +TileElement* GetStationPlatform(const CoordsXYRangedZ& coords); +bool RideHasAdjacentStation(const Ride& ride); +bool RideHasStationShelter(const Ride& ride); +bool RideHasRatings(const Ride& ride); -TileElement* get_station_platform(const CoordsXYRangedZ& coords); -bool ride_has_adjacent_station(Ride* ride); -bool ride_has_station_shelter(Ride* ride); -bool ride_has_ratings(const Ride* ride); +int32_t GetBoosterSpeed(ride_type_t rideType, int32_t rawSpeed); +void FixInvalidVehicleSpriteSizes(); +bool RideEntryHasCategory(const RideObjectEntry& rideEntry, uint8_t category); -int32_t get_booster_speed(ride_type_t rideType, int32_t rawSpeed); -void fix_invalid_vehicle_sprite_sizes(); -bool ride_entry_has_category(const rct_ride_entry* rideEntry, uint8_t category); +int32_t RideGetEntryIndex(int32_t rideType, int32_t rideSubType); -int32_t ride_get_entry_index(int32_t rideType, int32_t rideSubType); - -void determine_ride_entrance_and_exit_locations(); -void ride_clear_leftover_entrances(Ride* ride); +void DetermineRideEntranceAndExitLocations(); +void RideClearLeftoverEntrances(const Ride& ride); std::vector GetTracklessRides(); -void ride_remove_vehicles(Ride* ride); -void CircusMusicUpdate(Ride* ride); -void DefaultMusicUpdate(Ride* ride); +void CircusMusicUpdate(Ride& ride); +void DefaultMusicUpdate(Ride& ride); diff --git a/src/openrct2/ride/RideAudio.cpp b/src/openrct2/ride/RideAudio.cpp index ef546c0366..47c9bd75da 100644 --- a/src/openrct2/ride/RideAudio.cpp +++ b/src/openrct2/ride/RideAudio.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -168,7 +168,7 @@ namespace OpenRCT2::RideAudio void DefaultStartRideMusicChannel(const ViewportRideMusicInstance& instance) { auto& objManager = GetContext()->GetObjectManager(); - auto ride = get_ride(instance.RideId); + auto ride = GetRide(instance.RideId); auto musicObj = static_cast(objManager.GetLoadedObject(ObjectType::Music, ride->music)); if (musicObj != nullptr) { @@ -187,7 +187,7 @@ namespace OpenRCT2::RideAudio void CircusStartRideMusicChannel(const ViewportRideMusicInstance& instance) { auto& objManager = GetContext()->GetObjectManager(); - ObjectEntryDescriptor desc(ObjectType::Audio, AudioObjectIdentifiers::Rct2Circus); + ObjectEntryDescriptor desc(ObjectType::Audio, AudioObjectIdentifiers::RCT2Circus); auto audioObj = static_cast(objManager.GetLoadedObject(desc)); if (audioObj != nullptr) { @@ -206,7 +206,7 @@ namespace OpenRCT2::RideAudio static void StartRideMusicChannel(const ViewportRideMusicInstance& instance) { // Create new music channel - auto ride = get_ride(instance.RideId); + auto ride = GetRide(instance.RideId); const auto& rtd = ride->GetRideTypeDescriptor(); rtd.StartRideMusic(instance); } @@ -382,7 +382,7 @@ namespace OpenRCT2::RideAudio { if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gGameSoundsOff && g_music_tracking_viewport != nullptr) { - auto rotatedCoords = Translate3DTo2DWithZ(get_current_rotation(), rideCoords); + auto rotatedCoords = Translate3DTo2DWithZ(GetCurrentRotation(), rideCoords); auto viewport = g_music_tracking_viewport; auto viewWidth = viewport->view_width; auto viewWidth2 = viewWidth * 2; diff --git a/src/openrct2/ride/RideAudio.h b/src/openrct2/ride/RideAudio.h index 477ce6050d..e4146dfa5c 100644 --- a/src/openrct2/ride/RideAudio.h +++ b/src/openrct2/ride/RideAudio.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ride/RideColour.h b/src/openrct2/ride/RideColour.h index b7e6969b7f..3901da386c 100644 --- a/src/openrct2/ride/RideColour.h +++ b/src/openrct2/ride/RideColour.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index ead0b12f27..61083d39db 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -50,9 +50,9 @@ using namespace OpenRCT2::TrackMetaData; -money16 gTotalRideValueForMoney; +money64 gTotalRideValueForMoney; -money32 _currentTrackPrice; +money64 _currentTrackPrice; uint32_t _currentTrackCurve; RideConstructionState _rideConstructionState; @@ -91,25 +91,25 @@ Direction gRideEntranceExitPlaceDirection; using namespace OpenRCT2; using namespace OpenRCT2::TrackMetaData; -static int32_t ride_check_if_construction_allowed(Ride* ride) +static int32_t ride_check_if_construction_allowed(Ride& ride) { Formatter ft; - rct_ride_entry* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride.GetRideEntry(); if (rideEntry == nullptr) { ContextShowError(STR_INVALID_RIDE_TYPE, STR_CANT_EDIT_INVALID_RIDE_TYPE, ft); return 0; } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) { - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); ContextShowError(STR_CANT_START_CONSTRUCTION_ON, STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING, ft); return 0; } - if (ride->status != RideStatus::Closed && ride->status != RideStatus::Simulating) + if (ride.status != RideStatus::Closed && ride.status != RideStatus::Simulating) { - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); ContextShowError(STR_CANT_START_CONSTRUCTION_ON, STR_MUST_BE_CLOSED_FIRST, ft); return 0; } @@ -117,33 +117,33 @@ static int32_t ride_check_if_construction_allowed(Ride* ride) return 1; } -static rct_window* ride_create_or_find_construction_window(RideId rideIndex) +static WindowBase* ride_create_or_find_construction_window(RideId rideIndex) { auto windowManager = GetContext()->GetUiContext()->GetWindowManager(); auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_FOCUS); - intent.putExtra(INTENT_EXTRA_RIDE_ID, rideIndex.ToUnderlying()); + intent.PutExtra(INTENT_EXTRA_RIDE_ID, rideIndex.ToUnderlying()); windowManager->BroadcastIntent(intent); - return window_find_by_class(WindowClass::RideConstruction); + return WindowFindByClass(WindowClass::RideConstruction); } /** * * rct2: 0x006B4857 */ -void ride_construct(Ride* ride) +void RideConstructionStart(Ride& ride) { CoordsXYE trackElement; - if (ride_try_get_origin_element(ride, &trackElement)) + if (RideTryGetOriginElement(ride, &trackElement)) { - ride_find_track_gap(ride, &trackElement, &trackElement); + ride.FindTrackGap(trackElement, &trackElement); - rct_window* w = window_get_main(); - if (w != nullptr && ride_modify(trackElement)) - window_scroll_to_location(*w, { trackElement, trackElement.element->GetBaseZ() }); + WindowBase* w = WindowGetMain(); + if (w != nullptr && RideModify(trackElement)) + WindowScrollToLocation(*w, { trackElement, trackElement.element->GetBaseZ() }); } else { - ride_initialise_construction_window(ride); + RideInitialiseConstructionWindow(ride); } } @@ -151,12 +151,12 @@ void ride_construct(Ride* ride) * * rct2: 0x006DD4D5 */ -static void ride_remove_cable_lift(Ride* ride) +static void ride_remove_cable_lift(Ride& ride) { - if (ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CABLE_LIFT; - auto spriteIndex = ride->cable_lift; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_CABLE_LIFT; + auto spriteIndex = ride.cable_lift; do { Vehicle* vehicle = GetEntity(spriteIndex); @@ -219,28 +219,28 @@ void Ride::RemoveVehicles() * * rct2: 0x006DD4AC */ -void ride_clear_for_construction(Ride* ride) +void RideClearForConstruction(Ride& ride) { - ride->measurement = {}; + ride.measurement = {}; - ride->lifecycle_flags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.lifecycle_flags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; // Open circuit rides will go directly into building mode (creating ghosts) where it would normally clear the stats, // however this causes desyncs since it's directly run from the window and other clients would not get it. // To prevent these problems, unconditionally invalidate the test results on all clients in multiplayer games. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { - invalidate_test_results(ride); + InvalidateTestResults(ride); } ride_remove_cable_lift(ride); - ride->RemoveVehicles(); - ride_clear_blocked_tiles(ride); + ride.RemoveVehicles(); + RideClearBlockedTiles(ride); - auto w = window_find_by_number(WindowClass::Ride, ride->id.ToUnderlying()); + auto w = WindowFindByNumber(WindowClass::Ride, ride.id.ToUnderlying()); if (w != nullptr) - window_event_resize_call(w); + WindowEventResizeCall(w); } /** @@ -250,7 +250,7 @@ void ride_clear_for_construction(Ride* ride) void Ride::RemovePeeps() { // Find first station - auto stationIndex = ride_get_first_valid_station_start(this); + auto stationIndex = RideGetFirstValidStationStart(*this); // Get exit position and direction auto exitPosition = CoordsXYZD{ 0, 0, 0, INVALID_DIRECTION }; @@ -281,7 +281,7 @@ void Ride::RemovePeeps() if (peep->CurrentRide != id) continue; - peep_decrement_num_riders(peep); + PeepDecrementNumRiders(peep); if (peep->State == PeepState::QueuingFront && peep->RideSubState == PeepRideSubState::AtEntrance) peep->RemoveFromQueue(); @@ -340,7 +340,7 @@ void Ride::RemovePeeps() window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN; } -void ride_clear_blocked_tiles(Ride* ride) +void RideClearBlockedTiles(const Ride& ride) { for (TileCoordsXY tilePos = {}; tilePos.x < gMapSize.x; ++tilePos.x) { @@ -348,12 +348,11 @@ void ride_clear_blocked_tiles(Ride* ride) { for (auto* trackElement : TileElementsView(tilePos.ToCoordsXY())) { - if (trackElement->GetRideIndex() != ride->id) + if (trackElement->GetRideIndex() != ride.id) continue; // Unblock footpath element that is at same position - auto* footpathElement = MapGetFootpathElement( - TileCoordsXYZ{ tilePos, trackElement->base_height }.ToCoordsXYZ()); + auto* footpathElement = MapGetFootpathElement(TileCoordsXYZ{ tilePos, trackElement->BaseHeight }.ToCoordsXYZ()); if (footpathElement == nullptr) continue; @@ -457,31 +456,29 @@ std::optional GetTrackElementOriginAndApplyChanges( return retCoordsXYZ; } -void ride_restore_provisional_track_piece() +void RideRestoreProvisionalTrackPiece() { if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) { RideId rideIndex; int32_t direction, type, liftHillAndAlternativeState; CoordsXYZ trackPos; - if (window_ride_construction_update_state( - &type, &direction, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr)) + if (WindowRideConstructionUpdateState(&type, &direction, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr)) { - ride_construction_remove_ghosts(); + RideConstructionRemoveGhosts(); } else { - _currentTrackPrice = place_provisional_track_piece( - rideIndex, type, direction, liftHillAndAlternativeState, trackPos); - window_ride_construction_update_active_elements(); + _currentTrackPrice = PlaceProvisionalTrackPiece(rideIndex, type, direction, liftHillAndAlternativeState, trackPos); + WindowRideConstructionUpdateActiveElements(); } } } -void ride_remove_provisional_track_piece() +void RideRemoveProvisionalTrackPiece() { auto rideIndex = _currentRideIndex; - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || !(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)) { return; @@ -490,7 +487,9 @@ void ride_remove_provisional_track_piece() int32_t x = _unkF440C5.x; int32_t y = _unkF440C5.y; int32_t z = _unkF440C5.z; - if (ride->type == RIDE_TYPE_MAZE) + + const auto& rtd = ride->GetRideTypeDescriptor(); + 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] = { @@ -515,7 +514,7 @@ void ride_remove_provisional_track_piece() y -= CoordsDirectionDelta[direction].y; } CoordsXYE next_track; - if (track_block_get_next_from_zero({ x, y, z }, ride, direction, &next_track, &z, &direction, true)) + if (TrackBlockGetNextFromZero({ x, y, z }, *ride, direction, &next_track, &z, &direction, true)) { auto trackType = next_track.element->AsTrack()->GetTrackType(); int32_t trackSequence = next_track.element->AsTrack()->GetSequenceIndex(); @@ -533,7 +532,7 @@ void ride_remove_provisional_track_piece() * * rct2: 0x006C96C0 */ -void ride_construction_remove_ghosts() +void RideConstructionRemoveGhosts() { if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) { @@ -542,7 +541,7 @@ void ride_construction_remove_ghosts() } if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) { - ride_remove_provisional_track_piece(); + RideRemoveProvisionalTrackPiece(); _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_TRACK; } } @@ -550,7 +549,7 @@ void ride_construction_remove_ghosts() /* * rct2: 0x006C9627 */ -void ride_construction_invalidate_current_track() +void RideConstructionInvalidateCurrentTrack() { switch (_rideConstructionState) { @@ -568,7 +567,7 @@ void ride_construction_invalidate_current_track() { MapInvalidateTileFull(_currentTrackBegin.ToTileStart()); } - ride_construction_remove_ghosts(); + RideConstructionRemoveGhosts(); break; case RideConstructionState::Place: case RideConstructionState::EntranceExit: @@ -579,7 +578,7 @@ void ride_construction_invalidate_current_track() gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; MapInvalidateTileFull(_currentTrackBegin); } - ride_construction_remove_ghosts(); + RideConstructionRemoveGhosts(); break; } } @@ -590,7 +589,7 @@ void ride_construction_invalidate_current_track() */ static void ride_construction_reset_current_piece() { - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride == nullptr) return; @@ -621,27 +620,27 @@ static void ride_construction_reset_current_piece() * * rct2: 0x006C9800 */ -void ride_construction_set_default_next_piece() +void RideConstructionSetDefaultNextPiece() { auto rideIndex = _currentRideIndex; - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return; const auto& rtd = ride->GetRideTypeDescriptor(); int32_t z, direction, trackType, curve, bank, slope; - track_begin_end trackBeginEnd; + TrackBeginEnd trackBeginEnd; CoordsXYE xyElement; TileElement* tileElement; - _currentTrackPrice = MONEY32_UNDEFINED; + _currentTrackPrice = MONEY64_UNDEFINED; const TrackElementDescriptor* ted; switch (_rideConstructionState) { case RideConstructionState::Front: direction = _currentTrackPieceDirection; - if (!track_block_get_previous_from_zero(_currentTrackBegin, ride, direction, &trackBeginEnd)) + if (!TrackBlockGetPreviousFromZero(_currentTrackBegin, *ride, direction, &trackBeginEnd)) { ride_construction_reset_current_piece(); return; @@ -693,7 +692,7 @@ void ride_construction_set_default_next_piece() break; case RideConstructionState::Back: direction = DirectionReverse(_currentTrackPieceDirection); - if (!track_block_get_next_from_zero(_currentTrackBegin, ride, direction, &xyElement, &z, &direction, false)) + if (!TrackBlockGetNextFromZero(_currentTrackBegin, *ride, direction, &xyElement, &z, &direction, false)) { ride_construction_reset_current_piece(); return; @@ -748,11 +747,11 @@ void ride_construction_set_default_next_piece() * * rct2: 0x006C9296 */ -void ride_select_next_section() +void RideSelectNextSection() { if (_rideConstructionState == RideConstructionState::Selected) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); int32_t direction = _currentTrackPieceDirection; int32_t type = _currentTrackPieceType; TileElement* tileElement; @@ -761,7 +760,7 @@ void ride_select_next_section() if (!newCoords.has_value()) { _rideConstructionState = RideConstructionState::State0; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } @@ -772,12 +771,12 @@ void ride_select_next_section() inputElement.x = newCoords->x; inputElement.y = newCoords->y; inputElement.element = tileElement; - if (track_block_get_next(&inputElement, &outputElement, &newCoords->z, &direction)) + if (TrackBlockGetNext(&inputElement, &outputElement, &newCoords->z, &direction)) { newCoords->x = outputElement.x; newCoords->y = outputElement.y; tileElement = outputElement.element; - if (!scenery_tool_is_active()) + if (!SceneryToolIsActive()) { // Set next element's height. VirtualFloorSetHeight(tileElement->GetBaseZ()); @@ -787,7 +786,7 @@ void ride_select_next_section() _currentTrackPieceDirection = tileElement->GetDirection(); _currentTrackPieceType = tileElement->AsTrack()->GetTrackType(); _currentTrackSelectionFlags = 0; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } else { @@ -796,17 +795,17 @@ void ride_select_next_section() _currentTrackPieceDirection = direction; _currentTrackPieceType = tileElement->AsTrack()->GetTrackType(); _currentTrackSelectionFlags = 0; - ride_construction_set_default_next_piece(); - window_ride_construction_update_active_elements(); + RideConstructionSetDefaultNextPiece(); + WindowRideConstructionUpdateActiveElements(); } } else if (_rideConstructionState == RideConstructionState::Back) { gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - if (ride_select_forwards_from_back()) + if (RideSelectForwardsFromBack()) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } } @@ -815,11 +814,11 @@ void ride_select_next_section() * * rct2: 0x006C93B8 */ -void ride_select_previous_section() +void RideSelectPreviousSection() { if (_rideConstructionState == RideConstructionState::Selected) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); int32_t direction = _currentTrackPieceDirection; int32_t type = _currentTrackPieceType; TileElement* tileElement; @@ -828,15 +827,15 @@ void ride_select_previous_section() if (newCoords == std::nullopt) { _rideConstructionState = RideConstructionState::State0; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return; } // Invalidate previous track piece (we may not be changing height!) VirtualFloorInvalidate(); - track_begin_end trackBeginEnd; - if (track_block_get_previous({ *newCoords, tileElement }, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + if (TrackBlockGetPrevious({ *newCoords, tileElement }, &trackBeginEnd)) { _currentTrackBegin.x = trackBeginEnd.begin_x; _currentTrackBegin.y = trackBeginEnd.begin_y; @@ -844,12 +843,12 @@ void ride_select_previous_section() _currentTrackPieceDirection = trackBeginEnd.begin_direction; _currentTrackPieceType = trackBeginEnd.begin_element->AsTrack()->GetTrackType(); _currentTrackSelectionFlags = 0; - if (!scenery_tool_is_active()) + if (!SceneryToolIsActive()) { // Set previous element's height. VirtualFloorSetHeight(trackBeginEnd.begin_element->GetBaseZ()); } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } else { @@ -860,17 +859,17 @@ void ride_select_previous_section() _currentTrackPieceDirection = trackBeginEnd.end_direction; _currentTrackPieceType = tileElement->AsTrack()->GetTrackType(); _currentTrackSelectionFlags = 0; - ride_construction_set_default_next_piece(); - window_ride_construction_update_active_elements(); + RideConstructionSetDefaultNextPiece(); + WindowRideConstructionUpdateActiveElements(); } } else if (_rideConstructionState == RideConstructionState::Front) { gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - if (ride_select_backwards_from_front()) + if (RideSelectBackwardsFromFront()) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); } } } @@ -889,7 +888,7 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) return false; auto rideIndex = entranceElement->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -900,37 +899,37 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) auto stationIndex = entranceElement->GetStationIndex(); // Get or create construction window for ride - auto constructionWindow = window_find_by_class(WindowClass::RideConstruction); + auto constructionWindow = WindowFindByClass(WindowClass::RideConstruction); if (constructionWindow == nullptr) { - if (!ride_initialise_construction_window(ride)) + if (!RideInitialiseConstructionWindow(*ride)) return false; - constructionWindow = window_find_by_class(WindowClass::RideConstruction); + constructionWindow = WindowFindByClass(WindowClass::RideConstruction); if (constructionWindow == nullptr) return false; } - ride_construction_invalidate_current_track(); - if (_rideConstructionState != RideConstructionState::EntranceExit || !(input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + RideConstructionInvalidateCurrentTrack(); + if (_rideConstructionState != RideConstructionState::EntranceExit || !(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) || gCurrentToolWidget.window_classification != WindowClass::RideConstruction) { // Replace entrance / exit - tool_set( + ToolSet( *constructionWindow, entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE ? WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE : WC_RIDE_CONSTRUCTION__WIDX_EXIT, Tool::Crosshair); gRideEntranceExitPlaceType = entranceType; gRideEntranceExitPlaceRideIndex = rideIndex; gRideEntranceExitPlaceStationIndex = stationIndex; - input_set_flag(INPUT_FLAG_6, true); + InputSetFlag(INPUT_FLAG_6, true); if (_rideConstructionState != RideConstructionState::EntranceExit) { gRideEntranceExitPlacePreviousRideConstructionState = _rideConstructionState; _rideConstructionState = RideConstructionState::EntranceExit; } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; } else @@ -943,13 +942,13 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) gCurrentToolWidget.widget_index = entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE ? WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE : WC_RIDE_CONSTRUCTION__WIDX_EXIT; gRideEntranceExitPlaceType = entranceType; - window_invalidate_by_class(WindowClass::RideConstruction); + WindowInvalidateByClass(WindowClass::RideConstruction); }); GameActions::Execute(&rideEntranceExitRemove); } - window_invalidate_by_class(WindowClass::RideConstruction); + WindowInvalidateByClass(WindowClass::RideConstruction); return true; } @@ -985,21 +984,21 @@ static bool ride_modify_maze(const CoordsXYE& tileElement) * * rct2: 0x006CC056 */ -bool ride_modify(const CoordsXYE& input) +bool RideModify(const CoordsXYE& input) { auto tileElement = input; if (tileElement.element == nullptr) return false; auto rideIndex = tileElement.element->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { return false; } auto rideEntry = ride->GetRideEntry(); - if (rideEntry == nullptr || !ride_check_if_construction_allowed(ride)) + if (rideEntry == nullptr || !ride_check_if_construction_allowed(*ride)) return false; if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) @@ -1024,7 +1023,8 @@ bool ride_modify(const CoordsXYE& input) ride_create_or_find_construction_window(rideIndex); - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { return ride_modify_maze(tileElement); } @@ -1032,7 +1032,7 @@ bool ride_modify(const CoordsXYE& input) if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS)) { CoordsXYE endOfTrackElement{}; - if (ride_find_track_gap(ride, &tileElement, &endOfTrackElement)) + if (ride->FindTrackGap(tileElement, &endOfTrackElement)) tileElement = endOfTrackElement; } @@ -1057,14 +1057,14 @@ bool ride_modify(const CoordsXYE& input) if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_NO_TRACK)) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return true; } - ride_select_next_section(); + RideSelectNextSection(); if (_rideConstructionState == RideConstructionState::Front) { - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return true; } @@ -1074,7 +1074,7 @@ bool ride_modify(const CoordsXYE& input) _currentTrackPieceType = type; _currentTrackSelectionFlags = 0; - ride_select_previous_section(); + RideSelectPreviousSection(); if (_rideConstructionState != RideConstructionState::Back) { @@ -1085,7 +1085,7 @@ bool ride_modify(const CoordsXYE& input) _currentTrackSelectionFlags = 0; } - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return true; } @@ -1093,34 +1093,30 @@ bool ride_modify(const CoordsXYE& input) * * rct2: 0x006CC3FB */ -int32_t ride_initialise_construction_window(Ride* ride) +int32_t RideInitialiseConstructionWindow(Ride& ride) { - rct_window* w; + WindowBase* w; - tool_cancel(); + ToolCancel(); if (!ride_check_if_construction_allowed(ride)) return 0; - ride_clear_for_construction(ride); - ride->RemovePeeps(); + RideClearForConstruction(ride); + ride.RemovePeeps(); - w = ride_create_or_find_construction_window(ride->id); + w = ride_create_or_find_construction_window(ride.id); - tool_set(*w, WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT, Tool::Crosshair); - input_set_flag(INPUT_FLAG_6, true); + ToolSet(*w, WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT, Tool::Crosshair); + InputSetFlag(INPUT_FLAG_6, true); - ride = get_ride(_currentRideIndex); - if (ride == nullptr) - return 0; - - _currentTrackCurve = ride->GetRideTypeDescriptor().StartTrackPiece | RideConstructionSpecialPieceSelected; + _currentTrackCurve = ride.GetRideTypeDescriptor().StartTrackPiece | RideConstructionSpecialPieceSelected; _currentTrackSlopeEnd = 0; _currentTrackBankEnd = 0; _currentTrackLiftHill = 0; _currentTrackAlternative = RIDE_TYPE_NO_ALTERNATIVES; - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_START_CONSTRUCTION_INVERTED)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_START_CONSTRUCTION_INVERTED)) _currentTrackAlternative |= RIDE_TYPE_ALTERNATIVE_TRACK_TYPE; _previousTrackBankEnd = 0; @@ -1130,7 +1126,7 @@ int32_t ride_initialise_construction_window(Ride* ride) _rideConstructionState = RideConstructionState::Place; _currentTrackSelectionFlags = 0; - window_ride_construction_update_active_elements(); + WindowRideConstructionUpdateActiveElements(); return 1; } @@ -1138,18 +1134,18 @@ int32_t ride_initialise_construction_window(Ride* ride) * * rct2: 0x006CB7FB */ -int32_t ride_get_refund_price(const Ride* ride) +money64 RideGetRefundPrice(const Ride& ride) { CoordsXYE trackElement; - money32 cost = 0; + money64 cost = 0; - if (!ride_try_get_origin_element(ride, &trackElement)) + if (!RideTryGetOriginElement(ride, &trackElement)) { return 0; // Ride has no track to refund } // Find the start in case it is not a complete circuit - ride_get_start_of_track(&trackElement); + RideGetStartOfTrack(&trackElement); uint8_t direction = trackElement.element->GetDirection(); @@ -1171,7 +1167,7 @@ int32_t ride_get_refund_price(const Ride* ride) cost += res.Cost; - if (!track_block_get_next(&trackElement, &trackElement, nullptr, nullptr)) + if (!TrackBlockGetNext(&trackElement, &trackElement, nullptr, nullptr)) { break; } @@ -1179,7 +1175,7 @@ int32_t ride_get_refund_price(const Ride* ride) moveSlowIt = !moveSlowIt; if (moveSlowIt) { - if (!track_block_get_next(&slowIt, &slowIt, nullptr, nullptr) || slowIt.element == trackElement.element) + if (!TrackBlockGetNext(&slowIt, &slowIt, nullptr, nullptr) || slowIt.element == trackElement.element) { break; } @@ -1192,32 +1188,32 @@ int32_t ride_get_refund_price(const Ride* ride) return cost; } -money32 set_operating_setting(RideId rideId, RideSetSetting setting, uint8_t value) +money64 SetOperatingSetting(RideId rideId, RideSetSetting setting, uint8_t value) { auto rideSetSetting = RideSetSettingAction(rideId, setting, value); auto res = GameActions::Execute(&rideSetSetting); - return res.Error == GameActions::Status::Ok ? 0 : MONEY32_UNDEFINED; + return res.Error == GameActions::Status::Ok ? 0 : MONEY64_UNDEFINED; } -money32 set_operating_setting_nested(RideId rideId, RideSetSetting setting, uint8_t value, uint8_t flags) +money64 SetOperatingSettingNested(RideId rideId, RideSetSetting setting, uint8_t value, uint8_t flags) { auto rideSetSetting = RideSetSettingAction(rideId, setting, value); rideSetSetting.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&rideSetSetting) : GameActions::QueryNested(&rideSetSetting); - return res.Error == GameActions::Status::Ok ? 0 : MONEY32_UNDEFINED; + return res.Error == GameActions::Status::Ok ? 0 : MONEY64_UNDEFINED; } /** * * rct2: 0x006CCF70 */ -CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenCoordsXY& screenCoords) +CoordsXYZD RideGetEntranceOrExitPositionFromScreenPosition(const ScreenCoordsXY& screenCoords) { CoordsXYZD entranceExitCoords{}; gRideEntranceExitPlaceDirection = INVALID_DIRECTION; // determine if the mouse is hovering over a station - that's the station to add the entrance to - auto info = get_map_coordinates_from_pos(screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); + auto info = GetMapCoordinatesFromPos(screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); if (info.SpriteType != ViewportInteractionItem::None) { if (info.Element->GetType() == TileElementType::Track) @@ -1241,7 +1237,7 @@ CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenC } } - auto ride = get_ride(gRideEntranceExitPlaceRideIndex); + auto ride = GetRide(gRideEntranceExitPlaceRideIndex); if (ride == nullptr) { entranceExitCoords.SetNull(); @@ -1250,7 +1246,7 @@ CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenC auto stationBaseZ = ride->GetStation(gRideEntranceExitPlaceStationIndex).GetBaseZ(); - auto coordsAtHeight = screen_get_map_xy_with_z(screenCoords, stationBaseZ); + auto coordsAtHeight = ScreenGetMapXYWithZ(screenCoords, stationBaseZ); if (!coordsAtHeight.has_value()) { entranceExitCoords.SetNull(); @@ -1343,7 +1339,8 @@ CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenC void Ride::ValidateStations() { const TrackElementDescriptor* ted; - if (type != RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { // find the stations of the ride to begin stepping over track elements from for (const auto& station : stations) @@ -1415,7 +1412,7 @@ void Ride::ValidateStations() } // update all the blocks with StationIndex ted = &GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType()); - const rct_preview_track* trackBlock = ted->Block; + const PreviewTrack* trackBlock = ted->Block; while ((++trackBlock)->index != 0xFF) { CoordsXYZ blockLocation = location + CoordsXYZ{ CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(direction), 0 }; @@ -1500,7 +1497,7 @@ void Ride::ValidateStations() { if (tileElement->GetType() != TileElementType::Entrance) continue; - if (tileElement->base_height != locationCoords.z) + if (tileElement->BaseHeight != locationCoords.z) continue; if (tileElement->AsEntrance()->GetRideIndex() != id) continue; @@ -1524,7 +1521,7 @@ void Ride::ValidateStations() continue; if (trackElement->AsTrack()->GetRideIndex() != id) continue; - if (trackElement->base_height != tileElement->base_height) + if (trackElement->BaseHeight != tileElement->BaseHeight) continue; auto trackType = trackElement->AsTrack()->GetTrackType(); @@ -1587,14 +1584,14 @@ void Ride::ValidateStations() } } -bool ride_select_backwards_from_front() +bool RideSelectBackwardsFromFront() { - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride != nullptr) { - ride_construction_invalidate_current_track(); - track_begin_end trackBeginEnd; - if (track_block_get_previous_from_zero(_currentTrackBegin, ride, _currentTrackPieceDirection, &trackBeginEnd)) + RideConstructionInvalidateCurrentTrack(); + TrackBeginEnd trackBeginEnd; + if (TrackBlockGetPreviousFromZero(_currentTrackBegin, *ride, _currentTrackPieceDirection, &trackBeginEnd)) { _rideConstructionState = RideConstructionState::Selected; _currentTrackBegin.x = trackBeginEnd.begin_x; @@ -1609,17 +1606,17 @@ bool ride_select_backwards_from_front() return false; } -bool ride_select_forwards_from_back() +bool RideSelectForwardsFromBack() { - auto ride = get_ride(_currentRideIndex); + auto ride = GetRide(_currentRideIndex); if (ride != nullptr) { - ride_construction_invalidate_current_track(); + RideConstructionInvalidateCurrentTrack(); int32_t z = _currentTrackBegin.z; int32_t direction = DirectionReverse(_currentTrackPieceDirection); CoordsXYE next_track; - if (track_block_get_next_from_zero(_currentTrackBegin, ride, direction, &next_track, &z, &direction, false)) + if (TrackBlockGetNextFromZero(_currentTrackBegin, *ride, direction, &next_track, &z, &direction, false)) { _rideConstructionState = RideConstructionState::Selected; _currentTrackBegin.x = next_track.x; @@ -1638,12 +1635,12 @@ bool ride_select_forwards_from_back() * * rct2: 0x006B58EF */ -ResultWithMessage ride_are_all_possible_entrances_and_exits_built(Ride* ride) +ResultWithMessage RideAreAllPossibleEntrancesAndExitsBuilt(const Ride& ride) { - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) return { true }; - for (auto& station : ride->GetStations()) + for (auto& station : ride.GetStations()) { if (station.Start.IsNull()) { diff --git a/src/openrct2/ride/RideConstruction.h b/src/openrct2/ride/RideConstruction.h index 731616754e..52e88b95f6 100644 --- a/src/openrct2/ride/RideConstruction.h +++ b/src/openrct2/ride/RideConstruction.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ enum class RideConstructionState : uint8_t MazeFill }; -extern money32 _currentTrackPrice; +extern money64 _currentTrackPrice; extern uint32_t _currentTrackCurve; extern RideConstructionState _rideConstructionState; @@ -74,21 +74,23 @@ std::optional GetTrackElementOriginAndApplyChanges( void RideEntranceExitPlaceProvisionalGhost(); void RideEntranceExitRemoveGhost(); -void ride_restore_provisional_track_piece(); -void ride_remove_provisional_track_piece(); +void RideRestoreProvisionalTrackPiece(); +void RideRemoveProvisionalTrackPiece(); -void ride_construction_remove_ghosts(); +void RideConstructionRemoveGhosts(); -void ride_construction_invalidate_current_track(); +void RideConstructionInvalidateCurrentTrack(); -void ride_construction_set_default_next_piece(); +void RideConstructionSetDefaultNextPiece(); -void ride_select_next_section(); -void ride_select_previous_section(); +void RideSelectNextSection(); +void RideSelectPreviousSection(); -bool ride_modify(const CoordsXYE& input); +bool RideModify(const CoordsXYE& input); -CoordsXYZD ride_get_entrance_or_exit_position_from_screen_position(const ScreenCoordsXY& screenCoords); +CoordsXYZD RideGetEntranceOrExitPositionFromScreenPosition(const ScreenCoordsXY& screenCoords); -bool ride_select_backwards_from_front(); -bool ride_select_forwards_from_back(); +bool RideSelectBackwardsFromFront(); +bool RideSelectForwardsFromBack(); + +void RideConstructionStart(Ride& ride); diff --git a/src/openrct2/ride/RideData.cpp b/src/openrct2/ride/RideData.cpp index 9680c5e951..1a330e901e 100644 --- a/src/openrct2/ride/RideData.cpp +++ b/src/openrct2/ride/RideData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -133,7 +133,7 @@ const CarEntry CableLiftVehicle = { /* .sprite_width = */ 0, /* .sprite_height_negative = */ 0, /* .sprite_height_positive = */ 0, - /* .animation = */ 0, + /* .animation = */ CarEntryAnimation::None, /* .flags = */ 0, /* .base_num_frames = */ 1, /* .base_image_id = */ 29110, @@ -184,7 +184,11 @@ const CarEntry CableLiftVehicle = { /* .effect_visual = */ 1, /* .draw_order = */ 14, /* .num_vertical_frames_override = */ 0, - /* .peep_loading_positions = */ 0 + /* .peep_loading_positions = */ 0, + /* .AnimationExponent = */ 0, + /* .AnimationFrames = */ 0, + /* .SteamEffectType.longitudinal = */ 0, + /* .SteamEffectType.vertical = */ 0 }; /* rct2: 0x009A0AA0 */ @@ -374,7 +378,7 @@ ResearchCategory RideTypeDescriptor::GetResearchCategory() const case RIDE_CATEGORY_NONE: break; } - log_error("Cannot get Research Category of invalid RideCategory"); + LOG_ERROR("Cannot get Research Category of invalid RideCategory"); return ResearchCategory::Transport; } diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index fe173bde03..9828919e60 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,15 @@ enum class ResearchCategory : uint8_t; -using ride_ratings_calculation = void (*)(Ride* ride, RideRatingUpdateState& state); +using ride_ratings_calculation = void (*)(Ride& ride, RideRatingUpdateState& state); + +constexpr const uint8_t DefaultFoodStallHeight = 8 * COORDS_Z_STEP; +constexpr const uint8_t DefaultDrinksStallHeight = 8 * COORDS_Z_STEP; +constexpr const uint8_t DefaultShopHeight = 8 * COORDS_Z_STEP; +constexpr const uint8_t DefaultToiletHeight = 4 * COORDS_Z_STEP; +constexpr const uint8_t DefaultInformationKioskHeight = 6 * COORDS_Z_STEP; +constexpr const uint8_t DefaultFirstAidHeight = 6 * COORDS_Z_STEP; +constexpr const uint8_t DefaultCashMachineHeight = 8 * COORDS_Z_STEP; struct RideComponentName { @@ -110,7 +118,7 @@ struct RideHeights uint8_t PlatformHeight; }; -struct rct_ride_lift_data +struct RideLiftData { OpenRCT2::Audio::SoundId sound_id; uint8_t minimum_speed; @@ -144,29 +152,29 @@ struct UpkeepCostsDescriptor * * Data generation script: https://gist.github.com/kevinburke/6bcf4a8fcc95faad7bac */ - uint8_t BaseCost; + money64 BaseCost; /** rct2: 0x0097E3AC */ uint8_t TrackLengthMultiplier; - uint8_t CostPerTrackPiece; + money64 CostPerTrackPiece; /** rct2: 0x0097E3B4 */ - uint8_t CostPerTrain; + money64 CostPerTrain; /** rct2: 0x0097E3B6 */ - uint8_t CostPerCar; + money64 CostPerCar; /** rct2: 0x0097E3B8 */ - uint8_t CostPerStation; + money64 CostPerStation; }; using RideTrackGroup = OpenRCT2::BitSet; using UpdateRideApproachVehicleWaypointsFunction = void (*)(Guest&, const CoordsXY&, int16_t&); -using RideMusicUpdateFunction = void (*)(Ride*); -using PeepUpdateRideLeaveEntranceFunc = void (*)(Guest*, Ride*, CoordsXYZD&); +using RideMusicUpdateFunction = void (*)(Ride&); +using PeepUpdateRideLeaveEntranceFunc = void (*)(Guest*, Ride&, CoordsXYZD&); using StartRideMusicFunction = void (*)(const OpenRCT2::RideAudio::ViewportRideMusicInstance&); using LightFXAddLightsMagicVehicleFunction = void (*)(const Vehicle* vehicle); using RideLocationFunction = CoordsXY (*)(const Vehicle& vehicle, const Ride& ride, const StationIndex& CurrentRideStation); using RideUpdateFunction = void (*)(Ride& ride); -using RideUpdateMeasurementsSpecialElementsFunc = void (*)(Ride* ride, const track_type_t trackType); +using RideUpdateMeasurementsSpecialElementsFunc = void (*)(Ride& ride, const track_type_t trackType); using MusicTrackOffsetLengthFunc = std::pair (*)(const Ride& ride); -using SpecialElementRatingAdjustmentFunc = void (*)(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); +using SpecialElementRatingAdjustmentFunc = void (*)(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); using UpdateRotatingFunction = void (*)(Vehicle& vehicle); enum class RideConstructionWindowContext : uint8_t @@ -186,7 +194,7 @@ struct RideTypeDescriptor RideTrackGroup ExtraTrackPieces; RideTrackGroup CoveredTrackPieces; /** rct2: 0x0097CC68 */ - uint64_t StartTrackPiece; + track_type_t StartTrackPiece; TRACK_PAINT_FUNCTION_GETTER TrackPaintFunction; uint64_t Flags; /** rct2: 0x0097C8AC */ @@ -202,7 +210,7 @@ struct RideTypeDescriptor RideHeights Heights; uint8_t MaxMass; /** rct2: 0x0097D7C8, 0x0097D7C9, 0x0097D7CA */ - rct_ride_lift_data LiftData; + RideLiftData LiftData; // rct2: 0x0097E050 ride_ratings_calculation RatingsCalculationFunction; // rct2: 0x0097CD1E @@ -210,13 +218,13 @@ struct RideTypeDescriptor UpkeepCostsDescriptor UpkeepCosts; // rct2: 0x0097DD78 RideBuildCost BuildCosts; - money16 DefaultPrices[RCT2::ObjectLimits::MaxShopItemsPerRideEntry]; + money64 DefaultPrices[RCT2::ObjectLimits::MaxShopItemsPerRideEntry]; std::string_view DefaultMusic; /** rct2: 0x0097D7CB */ ShopItemIndex PhotoItem; /** rct2: 0x0097D21E */ uint8_t BonusValue; - track_colour_preset_list ColourPresets; + TrackColourPresetList ColourPresets; RideColourPreview ColourPreview; RideColourKey ColourKey; @@ -338,6 +346,8 @@ enum ride_type_flags : uint64_t RIDE_TYPE_FLAG_HAS_ONE_STATION = (1uLL << 55), RIDE_TYPE_FLAG_HAS_SEAT_ROTATION = (1uLL << 56), RIDE_TYPE_FLAG_IS_FIRST_AID = (1uLL << 57), + RIDE_TYPE_FLAG_IS_MAZE = (1uLL << 58), + RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE = (1uLL << 59), }; // Set on ride types that have a main colour, additional colour and support colour. diff --git a/src/openrct2/ride/RideEntry.h b/src/openrct2/ride/RideEntry.h index 8efbc8305f..53b48fd6d5 100644 --- a/src/openrct2/ride/RideEntry.h +++ b/src/openrct2/ride/RideEntry.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,11 +10,11 @@ #pragma once #include "../rct2/DATLimits.h" +#include "CarEntry.h" #include "RideColour.h" #include "RideTypes.h" #include "ShopItem.h" #include "VehicleColour.h" -#include "VehicleEntry.h" #include @@ -28,13 +28,13 @@ struct RideNaming StringId Description; }; -struct track_colour_preset_list +struct TrackColourPresetList { uint8_t count; TrackColour list[256]; }; -struct vehicle_colour_preset_list +struct VehicleColourPresetList { uint8_t count; VehicleColour list[256]; @@ -43,7 +43,7 @@ struct vehicle_colour_preset_list /** * Ride type structure. */ -struct rct_ride_entry +struct RideObjectEntry { RideNaming naming; // The first three images are previews. They correspond to the ride_type[] array. @@ -65,7 +65,7 @@ struct rct_ride_entry uint8_t ThirdCar; uint8_t BuildMenuPriority; CarEntry Cars[RCT2::ObjectLimits::MaxCarTypesPerRideEntry]; - vehicle_colour_preset_list* vehicle_preset_list; + VehicleColourPresetList* vehicle_preset_list; int8_t excitement_multiplier; int8_t intensity_multiplier; int8_t nausea_multiplier; @@ -73,6 +73,7 @@ struct rct_ride_entry ShopItem shop_item[RCT2::ObjectLimits::MaxShopItemsPerRideEntry]; StringId capacity; void* obj; + uint8_t Clearance; const CarEntry* GetCar(size_t id) const { @@ -100,5 +101,4 @@ struct rct_ride_entry } }; -void set_vehicle_type_image_max_sizes(CarEntry* vehicle_type, int32_t num_images); -RideNaming get_ride_naming(const ride_type_t rideType, rct_ride_entry* rideEntry); +RideNaming GetRideNaming(const ride_type_t rideType, const RideObjectEntry& rideEntry); diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 8164318822..4ccdeb90f3 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -77,7 +77,12 @@ struct ShelteredEights uint8_t TotalShelteredEighths; }; -RideRatingUpdateState gRideRatingUpdateState; +static RideRatingUpdateStates gRideRatingUpdateStates; + +// Amount of updates allowed per updating state on the current tick. +// The total amount would be MaxRideRatingSubSteps * RideRatingMaxUpdateStates which +// would be currently 80, this is the worst case of sub-steps and may break out earlier. +static constexpr size_t MaxRideRatingUpdateSubSteps = 20; static void ride_ratings_update_state(RideRatingUpdateState& state); static void ride_ratings_update_state_0(RideRatingUpdateState& state); @@ -87,19 +92,31 @@ static void ride_ratings_update_state_3(RideRatingUpdateState& state); static void ride_ratings_update_state_4(RideRatingUpdateState& state); static void ride_ratings_update_state_5(RideRatingUpdateState& state); static void ride_ratings_begin_proximity_loop(RideRatingUpdateState& state); -static void ride_ratings_calculate(RideRatingUpdateState& state, Ride* ride); -static void ride_ratings_calculate_value(Ride* ride); +static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride); +static void RideRatingsCalculateValue(Ride& ride); static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, TileElement* inputTileElement); - static void ride_ratings_add(RatingTuple* rating, int32_t excitement, int32_t intensity, int32_t nausea); +RideRatingUpdateStates& RideRatingGetUpdateStates() +{ + return gRideRatingUpdateStates; +} + +void RideRatingResetUpdateStates() +{ + RideRatingUpdateState nullState{}; + nullState.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; + + std::fill(gRideRatingUpdateStates.begin(), gRideRatingUpdateStates.end(), nullState); +} + /** * This is a small hack function to keep calling the ride rating processor until * the given ride's ratings have been calculated. Whatever is currently being * processed will be overwritten. * Only purpose of this function currently is for testing. */ -void ride_ratings_update_ride(const Ride& ride) +void RideRatingsUpdateRide(const Ride& ride) { RideRatingUpdateState state; if (ride.status != RideStatus::Closed) @@ -117,16 +134,24 @@ void ride_ratings_update_ride(const Ride& ride) * * rct2: 0x006B5A2A */ -void ride_ratings_update_all() +void RideRatingsUpdateAll() { PROFILED_FUNCTION(); if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) return; - // NOTE: With the new save format more than one ride can be updated at once, but this has not yet been implemented. - // The SV6 format could store only a single state. - ride_ratings_update_state(gRideRatingUpdateState); + for (auto& updateState : gRideRatingUpdateStates) + { + for (size_t i = 0; i < MaxRideRatingUpdateSubSteps; ++i) + { + ride_ratings_update_state(updateState); + + // We need to abort the loop if the state machine requested to find the next ride. + if (updateState.State == RIDE_RATINGS_STATE_FIND_NEXT_RIDE) + break; + } + } } static void ride_ratings_update_state(RideRatingUpdateState& state) @@ -154,6 +179,42 @@ static void ride_ratings_update_state(RideRatingUpdateState& state) } } +static bool RideRatingIsUpdatingRide(RideId id) +{ + return std::any_of(gRideRatingUpdateStates.begin(), gRideRatingUpdateStates.end(), [id](auto& state) { + return state.CurrentRide == id && state.State != RIDE_RATINGS_STATE_FIND_NEXT_RIDE; + }); +} + +static bool ShouldSkipRatingCalculation(const Ride& ride) +{ + // Skip anything that isn't a real ride. + if (ride.GetClassification() != RideClassification::Ride) + { + return true; + } + + // Skip rides that are closed. + if (ride.status == RideStatus::Closed) + { + return true; + } + + // Skip anything that is already updating. + if (RideRatingIsUpdatingRide(ride.id)) + { + return true; + } + + // Skip rides that have a fixed rating. + if (ride.lifecycle_flags & RIDE_LIFECYCLE_FIXED_RATINGS) + { + return true; + } + + return false; +} + static RideId GetNextRideToUpdate(RideId currentRide) { auto rm = GetRideManager(); @@ -161,14 +222,31 @@ static RideId GetNextRideToUpdate(RideId currentRide) { return RideId::GetNull(); } - // Skip all empty ride ids - auto nextRide = std::next(rm.get(currentRide)); - // If at end, loop around - if (nextRide == rm.end()) + + auto it = rm.get(currentRide); + if (it == rm.end()) { - nextRide = rm.begin(); + // Start at the beginning, ride is missing. + it = rm.begin(); } - return (*nextRide).id; + else + { + it = std::next(it); + } + + // Filter out rides to avoid wasting a tick to find the next ride. + while (it != rm.end() && ShouldSkipRatingCalculation(*it)) + { + it++; + } + + // If we reached the end of the list we start over, + // in case the next ride doesn't pass the filter function it will + // look for the next matching ride in the next tick. + if (it == rm.end()) + it = rm.begin(); + + return (*it).id; } /** @@ -180,16 +258,16 @@ static void ride_ratings_update_state_0(RideRatingUpdateState& state) // It is possible that the current ride being calculated has // been removed or due to import invalid. For both, reset // ratings and start check at the start - if (get_ride(state.CurrentRide) == nullptr) + if (GetRide(state.CurrentRide) == nullptr) { state.CurrentRide = {}; } - auto nextRideId = GetNextRideToUpdate(state.CurrentRide); - auto nextRide = get_ride(nextRideId); - if (nextRide != nullptr && nextRide->status != RideStatus::Closed - && !(nextRide->lifecycle_flags & RIDE_LIFECYCLE_FIXED_RATINGS)) + const auto nextRideId = GetNextRideToUpdate(state.CurrentRide); + const auto* nextRide = GetRide(nextRideId); + if (nextRide != nullptr && !ShouldSkipRatingCalculation(*nextRide)) { + Guard::Assert(!RideRatingIsUpdatingRide(nextRideId)); state.State = RIDE_RATINGS_STATE_INITIALISE; } state.CurrentRide = nextRideId; @@ -220,7 +298,7 @@ static void ride_ratings_update_state_1(RideRatingUpdateState& state) static void ride_ratings_update_state_2(RideRatingUpdateState& state) { const RideId rideIndex = state.CurrentRide; - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || ride->status == RideStatus::Closed || ride->type >= RIDE_TYPE_COUNT) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; @@ -268,7 +346,7 @@ static void ride_ratings_update_state_2(RideRatingUpdateState& state) CoordsXYE trackElement = { state.Proximity, tileElement }; CoordsXYE nextTrackElement; - if (!track_block_get_next(&trackElement, &nextTrackElement, nullptr, nullptr)) + if (!TrackBlockGetNext(&trackElement, &nextTrackElement, nullptr, nullptr)) { state.State = RIDE_RATINGS_STATE_4; return; @@ -296,17 +374,17 @@ static void ride_ratings_update_state_2(RideRatingUpdateState& state) */ static void ride_ratings_update_state_3(RideRatingUpdateState& state) { - auto ride = get_ride(state.CurrentRide); + auto ride = GetRide(state.CurrentRide); if (ride == nullptr || ride->status == RideStatus::Closed) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; } - ride_ratings_calculate(state, ride); - ride_ratings_calculate_value(ride); + RideRatingsCalculate(state, *ride); + RideRatingsCalculateValue(*ride); - window_invalidate_by_number(WindowClass::Ride, state.CurrentRide.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, state.CurrentRide.ToUnderlying()); state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; } @@ -326,7 +404,7 @@ static void ride_ratings_update_state_4(RideRatingUpdateState& state) */ static void ride_ratings_update_state_5(RideRatingUpdateState& state) { - auto ride = get_ride(state.CurrentRide); + auto ride = GetRide(state.CurrentRide); if (ride == nullptr || ride->status == RideStatus::Closed) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; @@ -361,8 +439,8 @@ static void ride_ratings_update_state_5(RideRatingUpdateState& state) { ride_ratings_score_close_proximity(state, tileElement); - track_begin_end trackBeginEnd; - if (!track_block_get_previous({ state.Proximity, tileElement }, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + if (!TrackBlockGetPrevious({ state.Proximity, tileElement }, &trackBeginEnd)) { state.State = RIDE_RATINGS_STATE_CALCULATE; return; @@ -391,14 +469,15 @@ static void ride_ratings_update_state_5(RideRatingUpdateState& state) */ static void ride_ratings_begin_proximity_loop(RideRatingUpdateState& state) { - auto ride = get_ride(state.CurrentRide); + auto ride = GetRide(state.CurrentRide); if (ride == nullptr || ride->status == RideStatus::Closed) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; } - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { state.State = RIDE_RATINGS_STATE_CALCULATE; return; @@ -452,9 +531,9 @@ static void ride_ratings_score_close_proximity_in_direction( switch (tileElement->GetType()) { case TileElementType::Surface: - if (state.ProximityBaseHeight <= inputTileElement->base_height) + if (state.ProximityBaseHeight <= inputTileElement->BaseHeight) { - if (inputTileElement->clearance_height <= tileElement->base_height) + if (inputTileElement->ClearanceHeight <= tileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_SURFACE_SIDE_CLOSE); } @@ -508,8 +587,8 @@ static void ride_ratings_score_close_proximity_loops_helper(RideRatingUpdateStat auto type = tileElement->GetType(); if (type == TileElementType::Path) { - int32_t zDiff = static_cast(tileElement->base_height) - - static_cast(coordsElement.element->base_height); + int32_t zDiff = static_cast(tileElement->BaseHeight) + - static_cast(coordsElement.element->BaseHeight); if (zDiff >= 0 && zDiff <= 16) { proximity_score_increment(state, PROXIMITY_PATH_TROUGH_VERTICAL_LOOP); @@ -520,8 +599,8 @@ static void ride_ratings_score_close_proximity_loops_helper(RideRatingUpdateStat bool elementsAreAt90DegAngle = ((tileElement->GetDirection() ^ coordsElement.element->GetDirection()) & 1) != 0; if (elementsAreAt90DegAngle) { - int32_t zDiff = static_cast(tileElement->base_height) - - static_cast(coordsElement.element->base_height); + int32_t zDiff = static_cast(tileElement->BaseHeight) + - static_cast(coordsElement.element->BaseHeight); if (zDiff >= 0 && zDiff <= 16) { proximity_score_increment(state, PROXIMITY_TRACK_THROUGH_VERTICAL_LOOP); @@ -577,7 +656,7 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til switch (tileElement->GetType()) { case TileElementType::Surface: - state.ProximityBaseHeight = tileElement->base_height; + state.ProximityBaseHeight = tileElement->BaseHeight; if (tileElement->GetBaseZ() == state.Proximity.z) { proximity_score_increment(state, PROXIMITY_SURFACE_TOUCH); @@ -642,7 +721,7 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til int32_t sequence = tileElement->AsTrack()->GetSequenceIndex(); if (sequence == 3 || sequence == 6) { - if (tileElement->base_height - inputTileElement->clearance_height <= 10) + if (tileElement->BaseHeight - inputTileElement->ClearanceHeight <= 10) { proximity_score_increment(state, PROXIMITY_THROUGH_VERTICAL_LOOP); } @@ -655,20 +734,20 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til { proximity_score_increment(state, PROXIMITY_FOREIGN_TRACK_TOUCH_ABOVE); } - if (tileElement->clearance_height + 2 <= inputTileElement->base_height) + if (tileElement->ClearanceHeight + 2 <= inputTileElement->BaseHeight) { - if (tileElement->clearance_height + 10 >= inputTileElement->base_height) + if (tileElement->ClearanceHeight + 10 >= inputTileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_FOREIGN_TRACK_CLOSE_ABOVE); } } - if (inputTileElement->clearance_height == tileElement->base_height) + if (inputTileElement->ClearanceHeight == tileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_FOREIGN_TRACK_TOUCH_ABOVE); } - if (inputTileElement->clearance_height + 2 == tileElement->base_height) + if (inputTileElement->ClearanceHeight + 2 == tileElement->BaseHeight) { - if (static_cast(inputTileElement->clearance_height + 10) >= tileElement->base_height) + if (static_cast(inputTileElement->ClearanceHeight + 10) >= tileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_FOREIGN_TRACK_CLOSE_ABOVE); } @@ -677,7 +756,7 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til else { bool isStation = tileElement->AsTrack()->IsStation(); - if (tileElement->clearance_height == inputTileElement->base_height) + if (tileElement->ClearanceHeight == inputTileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_OWN_TRACK_TOUCH_ABOVE); if (isStation) @@ -685,9 +764,9 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til proximity_score_increment(state, PROXIMITY_OWN_STATION_TOUCH_ABOVE); } } - if (tileElement->clearance_height + 2 <= inputTileElement->base_height) + if (tileElement->ClearanceHeight + 2 <= inputTileElement->BaseHeight) { - if (tileElement->clearance_height + 10 >= inputTileElement->base_height) + if (tileElement->ClearanceHeight + 10 >= inputTileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_OWN_TRACK_CLOSE_ABOVE); if (isStation) @@ -705,9 +784,9 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til proximity_score_increment(state, PROXIMITY_OWN_STATION_TOUCH_ABOVE); } } - if (inputTileElement->clearance_height + 2 <= tileElement->base_height) + if (inputTileElement->ClearanceHeight + 2 <= tileElement->BaseHeight) { - if (inputTileElement->clearance_height + 10 >= tileElement->base_height) + if (inputTileElement->ClearanceHeight + 10 >= tileElement->BaseHeight) { proximity_score_increment(state, PROXIMITY_OWN_TRACK_CLOSE_ABOVE); if (isStation) @@ -741,39 +820,39 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til } } -static void ride_ratings_calculate(RideRatingUpdateState& state, Ride* ride) +static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) { - auto calcFunc = ride_ratings_get_calculate_func(ride->type); + auto calcFunc = RideRatingsGetCalculateFunc(ride.type); if (calcFunc != nullptr) { calcFunc(ride, state); } #ifdef ORIGINAL_RATINGS - if (ride->ratings.excitement != -1) + if (ride.ratings.excitement != -1) { // Address underflows allowed by original RCT2 code - ride->ratings.excitement = max(0, ride->ratings.excitement); - ride->ratings.intensity = max(0, ride->ratings.intensity); - ride->ratings.nausea = max(0, ride->ratings.nausea); + ride.ratings.excitement = max(0, ride.ratings.excitement); + ride.ratings.intensity = max(0, ride.ratings.intensity); + ride.ratings.nausea = max(0, ride.ratings.nausea); } #endif #ifdef ENABLE_SCRIPTING // Only call the 'ride.ratings.calculate' API hook if testing of the ride is complete - if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED) { auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); 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 originalExcitement = ride.excitement; + auto originalIntensity = ride.intensity; + auto originalNausea = ride.nausea; // Create event args object auto obj = DukObject(ctx); - obj.Set("rideId", ride->id.ToUnderlying()); + obj.Set("rideId", ride.id.ToUnderlying()); obj.Set("excitement", originalExcitement); obj.Set("intensity", originalIntensity); obj.Set("nausea", originalNausea); @@ -786,21 +865,21 @@ static void ride_ratings_calculate(RideRatingUpdateState& state, Ride* ride) auto scriptIntensity = AsOrDefault(e["intensity"], static_cast(originalIntensity)); auto scriptNausea = AsOrDefault(e["nausea"], static_cast(originalNausea)); - 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.excitement = std::clamp(scriptExcitement, 0, INT16_MAX); + ride.intensity = std::clamp(scriptIntensity, 0, INT16_MAX); + ride.nausea = std::clamp(scriptNausea, 0, INT16_MAX); } } #endif } -static void ride_ratings_calculate_value(Ride* ride) +static void RideRatingsCalculateValue(Ride& ride) { - struct row + struct Row { int32_t months, multiplier, divisor, summand; }; - static const row ageTableNew[] = { + static const Row ageTableNew[] = { { 5, 3, 2, 0 }, // 1.5x { 13, 6, 5, 0 }, // 1.2x { 40, 1, 1, 0 }, // 1x @@ -814,7 +893,7 @@ static void ride_ratings_calculate_value(Ride* ride) }; #ifdef ORIGINAL_RATINGS - static const row ageTableOld[] = { + static const Row ageTableOld[] = { { 5, 1, 1, 30 }, // +30 { 13, 1, 1, 10 }, // +10 { 40, 1, 1, 0 }, // 1x @@ -828,24 +907,24 @@ static void ride_ratings_calculate_value(Ride* ride) }; #endif - if (!ride_has_ratings(ride)) + if (!RideHasRatings(ride)) { return; } // Start with the base ratings, multiplied by the ride type specific weights for excitement, intensity and nausea. - const auto& ratingsMultipliers = ride->GetRideTypeDescriptor().RatingsMultipliers; - int32_t value = (((ride->excitement * ratingsMultipliers.Excitement) * 32) >> 15) - + (((ride->intensity * ratingsMultipliers.Intensity) * 32) >> 15) - + (((ride->nausea * ratingsMultipliers.Nausea) * 32) >> 15); + 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); int32_t monthsOld = 0; if (!gCheatsDisableRideValueAging) { - monthsOld = ride->GetAge(); + monthsOld = ride.GetAge(); } - const row* ageTable = ageTableNew; + const Row* ageTable = ageTableNew; size_t tableSize = std::size(ageTableNew); #ifdef ORIGINAL_RATINGS @@ -853,7 +932,7 @@ static void ride_ratings_calculate_value(Ride* ride) tableSize = std::size(ageTableOld); #endif - row lastRow = ageTable[tableSize - 1]; + Row lastRow = ageTable[tableSize - 1]; // Ride is older than oldest age in the table? if (monthsOld >= lastRow.months) @@ -865,7 +944,7 @@ static void ride_ratings_calculate_value(Ride* ride) // Find the first hit in the table that matches this ride's age for (size_t it = 0; it < tableSize; it++) { - row curr = ageTable[it]; + Row curr = ageTable[it]; if (monthsOld < curr.months) { @@ -877,43 +956,44 @@ static void ride_ratings_calculate_value(Ride* ride) // Other ride of same type penalty const auto& rideManager = GetRideManager(); - auto otherRidesOfSameType = std::count_if(rideManager.begin(), rideManager.end(), [ride](const Ride& r) { - return r.status == RideStatus::Open && r.type == ride->type; + auto rideType = ride.type; + auto otherRidesOfSameType = std::count_if(rideManager.begin(), rideManager.end(), [rideType](const Ride& r) { + return r.status == RideStatus::Open && r.type == rideType; }); if (otherRidesOfSameType > 1) value -= value / 4; - ride->value = std::max(0, value); + ride.value = std::max(0.00_GBP, value); } /** * I think this function computes ride upkeep? Though it is weird that the - * rct2: sub_65E621 + * rct2: Sub65E621 * inputs * - edi: ride ptr */ -static uint16_t ride_compute_upkeep(RideRatingUpdateState& state, Ride* ride) +static money64 ride_compute_upkeep(RideRatingUpdateState& state, const Ride& ride) { // data stored at 0x0057E3A8, incrementing 18 bytes at a time - uint16_t upkeep = ride->GetRideTypeDescriptor().UpkeepCosts.BaseCost; + auto upkeep = ride.GetRideTypeDescriptor().UpkeepCosts.BaseCost; - uint16_t trackCost = ride->GetRideTypeDescriptor().UpkeepCosts.CostPerTrackPiece; - uint8_t dropFactor = ride->drops; + auto trackCost = ride.GetRideTypeDescriptor().UpkeepCosts.CostPerTrackPiece; + uint8_t dropFactor = ride.drops; dropFactor >>= 6; dropFactor &= 3; upkeep += trackCost * dropFactor; - uint32_t totalLength = ride->GetTotalLength() >> 16; + uint32_t totalLength = ride.GetTotalLength() >> 16; // The data originally here was 20's and 0's. The 20's all represented // rides that had tracks. The 0's were fixed rides like crooked house or // dodgems. // Data source is 0x0097E3AC - totalLength *= ride->GetRideTypeDescriptor().UpkeepCosts.TrackLengthMultiplier; + totalLength *= ride.GetRideTypeDescriptor().UpkeepCosts.TrackLengthMultiplier; upkeep += static_cast(totalLength >> 10); - if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { // The original code read from a table starting at 0x0097E3AE and // incrementing by 0x12 bytes between values. However, all of these @@ -932,26 +1012,26 @@ static uint16_t ride_compute_upkeep(RideRatingUpdateState& state, Ride* ride) // various variables set on the ride itself. // https://gist.github.com/kevinburke/e19b803cd2769d96c540 - upkeep += ride->GetRideTypeDescriptor().UpkeepCosts.CostPerTrain * ride->NumTrains; - upkeep += ride->GetRideTypeDescriptor().UpkeepCosts.CostPerCar * ride->num_cars_per_train; + upkeep += ride.GetRideTypeDescriptor().UpkeepCosts.CostPerTrain * ride.NumTrains; + upkeep += ride.GetRideTypeDescriptor().UpkeepCosts.CostPerCar * ride.num_cars_per_train; // slight upkeep boosts for some rides - 5 for mini railway, 10 for log // flume/rapids, 10 for roller coaster, 28 for giga coaster - upkeep += ride->GetRideTypeDescriptor().UpkeepCosts.CostPerStation * ride->num_stations; + upkeep += ride.GetRideTypeDescriptor().UpkeepCosts.CostPerStation * ride.num_stations; - if (ride->mode == RideMode::ReverseInclineLaunchedShuttle) + if (ride.mode == RideMode::ReverseInclineLaunchedShuttle) { upkeep += 30; } - else if (ride->mode == RideMode::PoweredLaunchPasstrough) + else if (ride.mode == RideMode::PoweredLaunchPasstrough) { upkeep += 160; } - else if (ride->mode == RideMode::LimPoweredLaunch) + else if (ride.mode == RideMode::LimPoweredLaunch) { upkeep += 320; } - else if (ride->mode == RideMode::PoweredLaunch || ride->mode == RideMode::PoweredLaunchBlockSectioned) + else if (ride.mode == RideMode::PoweredLaunch || ride.mode == RideMode::PoweredLaunchBlockSectioned) { upkeep += 220; } @@ -972,9 +1052,9 @@ static uint16_t ride_compute_upkeep(RideRatingUpdateState& state, Ride* ride) * - bp: nausea * - edi: ride ptr */ -static void ride_ratings_apply_adjustments(Ride* ride, RatingTuple* ratings) +static void ride_ratings_apply_adjustments(const Ride& ride, RatingTuple* ratings) { - rct_ride_entry* rideEntry = get_ride_entry(ride->subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry == nullptr) { @@ -989,9 +1069,9 @@ static void ride_ratings_apply_adjustments(Ride* ride, RatingTuple* ratings) // Apply total air time #ifdef ORIGINAL_RATINGS - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_AIR_TIME)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_AIR_TIME)) { - uint16_t totalAirTime = ride->total_air_time; + uint16_t totalAirTime = ride.total_air_time; if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) { if (totalAirTime >= 96) @@ -1008,19 +1088,19 @@ static void ride_ratings_apply_adjustments(Ride* ride, RatingTuple* ratings) } } #else - if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_AIR_TIME)) + if (ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_AIR_TIME)) { int32_t excitementModifier; 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.total_air_time, 96) / 8; } else { - excitementModifier = ride->total_air_time / 8; + excitementModifier = ride.total_air_time / 8; } - int32_t nauseaModifier = ride->total_air_time / 16; + int32_t nauseaModifier = ride.total_air_time / 16; ride_ratings_add(ratings, excitementModifier, 0, nauseaModifier); } @@ -1049,11 +1129,11 @@ static void ride_ratings_apply_intensity_penalty(RatingTuple* ratings) * * rct2: 0x00655FD6 */ -static void set_unreliability_factor(Ride* ride) +static void set_unreliability_factor(Ride& ride) { // The bigger the difference in lift speed and minimum the higher the unreliability - uint8_t minLiftSpeed = ride->GetRideTypeDescriptor().LiftData.minimum_speed; - ride->unreliability_factor += (ride->lift_hill_speed - minLiftSpeed) * 2; + uint8_t minLiftSpeed = ride.GetRideTypeDescriptor().LiftData.minimum_speed; + ride.unreliability_factor += (ride.lift_hill_speed - minLiftSpeed) * 2; } static uint32_t get_proximity_score_helper_1(uint16_t x, uint16_t max, uint32_t multiplier) @@ -1116,10 +1196,10 @@ static uint32_t ride_ratings_get_proximity_score(RideRatingUpdateState& state) * Calculates how much of the track is sheltered in eighths. * rct2: 0x0065E72D */ -static ShelteredEights get_num_of_sheltered_eighths(Ride* ride) +static ShelteredEights get_num_of_sheltered_eighths(const Ride& ride) { - int32_t totalLength = ride->GetTotalLength(); - int32_t shelteredLength = ride->sheltered_length; + int32_t totalLength = ride.GetTotalLength(); + int32_t shelteredLength = ride.sheltered_length; int32_t lengthEighth = totalLength / 8; int32_t lengthCounter = lengthEighth; uint8_t numShelteredEighths = 0; @@ -1133,7 +1213,7 @@ static ShelteredEights get_num_of_sheltered_eighths(Ride* ride) } uint8_t trackShelteredEighths = numShelteredEighths; - rct_ride_entry* rideType = get_ride_entry(ride->subtype); + const auto* rideType = GetRideEntryByIndex(ride.subtype); if (rideType == nullptr) { return { 0, 0 }; @@ -1144,11 +1224,11 @@ static ShelteredEights get_num_of_sheltered_eighths(Ride* ride) return { trackShelteredEighths, numShelteredEighths }; } -static RatingTuple get_flat_turns_rating(Ride* ride) +static RatingTuple get_flat_turns_rating(const Ride& ride) { - int32_t num3PlusTurns = get_turn_count_3_elements(ride, 0); - int32_t num2Turns = get_turn_count_2_elements(ride, 0); - int32_t num1Turns = get_turn_count_1_element(ride, 0); + int32_t num3PlusTurns = GetTurnCount3Elements(ride, 0); + int32_t num2Turns = GetTurnCount2Elements(ride, 0); + int32_t num1Turns = GetTurnCount1Element(ride, 0); RatingTuple rating; rating.Excitement = (num3PlusTurns * 0x28000) >> 16; @@ -1170,11 +1250,11 @@ static RatingTuple get_flat_turns_rating(Ride* ride) * * rct2: 0x0065DF72 */ -static RatingTuple get_banked_turns_rating(Ride* ride) +static RatingTuple get_banked_turns_rating(const Ride& ride) { - int32_t num3PlusTurns = get_turn_count_3_elements(ride, 1); - int32_t num2Turns = get_turn_count_2_elements(ride, 1); - int32_t num1Turns = get_turn_count_1_element(ride, 1); + int32_t num3PlusTurns = GetTurnCount3Elements(ride, 1); + int32_t num2Turns = GetTurnCount2Elements(ride, 1); + int32_t num1Turns = GetTurnCount1Element(ride, 1); RatingTuple rating; rating.Excitement = (num3PlusTurns * 0x3C000) >> 16; @@ -1196,14 +1276,14 @@ static RatingTuple get_banked_turns_rating(Ride* ride) * * rct2: 0x0065E047 */ -static RatingTuple get_sloped_turns_rating(Ride* ride) +static RatingTuple get_sloped_turns_rating(const Ride& ride) { RatingTuple rating; - int32_t num4PlusTurns = get_turn_count_4_plus_elements(ride, 2); - int32_t num3Turns = get_turn_count_3_elements(ride, 2); - int32_t num2Turns = get_turn_count_2_elements(ride, 2); - int32_t num1Turns = get_turn_count_1_element(ride, 2); + int32_t num4PlusTurns = GetTurnCount4PlusElements(ride, 2); + int32_t num3Turns = GetTurnCount3Elements(ride, 2); + 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; @@ -1230,20 +1310,20 @@ static RatingTuple get_inversions_ratings(uint16_t inversions) return rating; } -void SpecialTrackElementRatingsAjustment_Default(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) +void SpecialTrackElementRatingsAjustment_Default(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) { - if (ride->HasWaterSplash()) + if (ride.HasWaterSplash()) { excitement += 50; intensity += 30; nausea += 20; } - if (ride->HasWaterfall()) + if (ride.HasWaterfall()) { excitement += 55; intensity += 30; } - if (ride->HasWhirlpool()) + if (ride.HasWhirlpool()) { excitement += 35; intensity += 20; @@ -1251,9 +1331,9 @@ void SpecialTrackElementRatingsAjustment_Default(const Ride* ride, int32_t& exci } } -void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) +void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) { - if (ride->HasSpinningTunnel()) + if (ride.HasSpinningTunnel()) { excitement += 40; intensity += 25; @@ -1261,9 +1341,9 @@ void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride* ride, int32_t& e } } -void SpecialTrackElementRatingsAjustment_LogFlume(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) +void SpecialTrackElementRatingsAjustment_LogFlume(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) { - if (ride->HasLogReverser()) + if (ride.HasLogReverser()) { excitement += 48; intensity += 55; @@ -1271,13 +1351,13 @@ void SpecialTrackElementRatingsAjustment_LogFlume(const Ride* ride, int32_t& exc } } -static RatingTuple GetSpecialTrackElementsRating(uint8_t type, Ride* ride) +static RatingTuple GetSpecialTrackElementsRating(uint8_t type, const Ride& ride) { int32_t excitement = 0, intensity = 0, nausea = 0; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride.GetRideTypeDescriptor(); rtd.SpecialElementRatingAdjustment(ride, excitement, intensity, nausea); - uint8_t helixSections = ride_get_helix_sections(ride); + uint8_t helixSections = RideGetHelixSections(ride); int32_t helixesUpTo9 = std::min(helixSections, 9); excitement += (helixesUpTo9 * 254862) >> 16; @@ -1297,11 +1377,11 @@ static RatingTuple GetSpecialTrackElementsRating(uint8_t type, Ride* ride) * * rct2: 0x0065DDD1 */ -static RatingTuple ride_ratings_get_turns_ratings(Ride* ride) +static RatingTuple ride_ratings_get_turns_ratings(const Ride& ride) { int32_t excitement = 0, intensity = 0, nausea = 0; - RatingTuple specialTrackElementsRating = GetSpecialTrackElementsRating(ride->type, ride); + RatingTuple specialTrackElementsRating = GetSpecialTrackElementsRating(ride.type, ride); excitement += specialTrackElementsRating.Excitement; intensity += specialTrackElementsRating.Intensity; nausea += specialTrackElementsRating.Nausea; @@ -1321,7 +1401,7 @@ static RatingTuple ride_ratings_get_turns_ratings(Ride* ride) intensity += slopedTurnsRating.Intensity; nausea += slopedTurnsRating.Nausea; - auto inversions = (ride->type == RIDE_TYPE_MINI_GOLF) ? ride->holes : ride->inversions; + auto inversions = (ride.type == RIDE_TYPE_MINI_GOLF) ? ride.holes : ride.inversions; RatingTuple inversionsRating = get_inversions_ratings(inversions); excitement += inversionsRating.Excitement; intensity += inversionsRating.Intensity; @@ -1336,9 +1416,9 @@ static RatingTuple ride_ratings_get_turns_ratings(Ride* ride) * * rct2: 0x0065E1C2 */ -static RatingTuple ride_ratings_get_sheltered_ratings(Ride* ride) +static RatingTuple ride_ratings_get_sheltered_ratings(const Ride& ride) { - int32_t shelteredLengthShifted = (ride->sheltered_length) >> 16; + int32_t shelteredLengthShifted = (ride.sheltered_length) >> 16; uint32_t shelteredLengthUpTo1000 = std::min(shelteredLengthShifted, 1000); uint32_t shelteredLengthUpTo2000 = std::min(shelteredLengthShifted, 2000); @@ -1347,22 +1427,22 @@ static RatingTuple ride_ratings_get_sheltered_ratings(Ride* ride) int32_t intensity = (shelteredLengthUpTo2000 * 0x2666) >> 16; int32_t nausea = (shelteredLengthUpTo1000 * 0x4000) >> 16; - /*eax = (ride->var_11C * 30340) >> 16;*/ + /*eax = (ride.var_11C * 30340) >> 16;*/ /*nausea += eax;*/ - if (ride->num_sheltered_sections & ShelteredSectionsBits::BankingWhileSheltered) + if (ride.num_sheltered_sections & ShelteredSectionsBits::BankingWhileSheltered) { excitement += 20; nausea += 15; } - if (ride->num_sheltered_sections & ShelteredSectionsBits::RotatingWhileSheltered) + if (ride.num_sheltered_sections & ShelteredSectionsBits::RotatingWhileSheltered) { excitement += 20; nausea += 15; } - uint8_t lowerVal = ride->GetNumShelteredSections(); + uint8_t lowerVal = ride.GetNumShelteredSections(); lowerVal = std::min(lowerVal, 11); excitement += (lowerVal * 774516) >> 16; @@ -1375,7 +1455,7 @@ static RatingTuple ride_ratings_get_sheltered_ratings(Ride* ride) * * rct2: 0x0065DCDC */ -static RatingTuple ride_ratings_get_gforce_ratings(Ride* ride) +static RatingTuple ride_ratings_get_gforce_ratings(const Ride& ride) { RatingTuple result = { /* .excitement = */ 0, @@ -1384,29 +1464,29 @@ static RatingTuple ride_ratings_get_gforce_ratings(Ride* ride) }; // Apply maximum positive G force factor - result.Excitement += (ride->max_positive_vertical_g * 5242) >> 16; - result.Intensity += (ride->max_positive_vertical_g * 52428) >> 16; - result.Nausea += (ride->max_positive_vertical_g * 17039) >> 16; + result.Excitement += (ride.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; + 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; // 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)) + if (ride.max_lateral_g > FIXED_2DP(2, 80)) { result.intensity += FIXED_2DP(3, 75); result.nausea += FIXED_2DP(2, 00); } - if (ride->max_lateral_g > FIXED_2DP(3, 10)) + if (ride.max_lateral_g > FIXED_2DP(3, 10)) { result.excitement /= 2; result.intensity += FIXED_2DP(8, 50); @@ -1421,7 +1501,7 @@ static RatingTuple ride_ratings_get_gforce_ratings(Ride* ride) * * rct2: 0x0065E139 */ -static RatingTuple ride_ratings_get_drop_ratings(Ride* ride) +static RatingTuple ride_ratings_get_drop_ratings(const Ride& ride) { RatingTuple result = { /* .excitement = */ 0, @@ -1430,15 +1510,15 @@ static RatingTuple ride_ratings_get_drop_ratings(Ride* ride) }; // Apply number of drops factor - int32_t drops = ride->drops & 0x3F; + int32_t drops = ride.drops & 0x3F; result.Excitement += (std::min(9, drops) * 728177) >> 16; result.Intensity += (drops * 928426) >> 16; result.Nausea += (drops * 655360) >> 16; // Apply highest drop factor ride_ratings_add( - &result, ((ride->highest_drop_height * 2) * 16000) >> 16, ((ride->highest_drop_height * 2) * 32000) >> 16, - ((ride->highest_drop_height * 2) * 10240) >> 16); + &result, ((ride.highest_drop_height * 2) * 16000) >> 16, ((ride.highest_drop_height * 2) * 32000) >> 16, + ((ride.highest_drop_height * 2) * 10240) >> 16); return result; } @@ -1447,9 +1527,9 @@ static RatingTuple ride_ratings_get_drop_ratings(Ride* ride) * Calculates a score based on the surrounding scenery. * rct2: 0x0065E557 */ -static int32_t ride_ratings_get_scenery_score(Ride* ride) +static int32_t ride_ratings_get_scenery_score(const Ride& ride) { - auto stationIndex = ride_get_first_valid_station_start(ride); + auto stationIndex = RideGetFirstValidStationStart(ride); CoordsXY location; if (stationIndex.IsNull()) @@ -1457,19 +1537,20 @@ static int32_t ride_ratings_get_scenery_score(Ride* ride) return 0; } - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride.GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { - location = ride->GetStation().Entrance.ToCoordsXY(); + location = ride.GetStation().Entrance.ToCoordsXY(); } else { - location = ride->GetStation(stationIndex).Start; + location = ride.GetStation(stationIndex).Start; } int32_t z = TileElementHeight(location); // Check if station is underground, returns a fixed mediocre score since you can't have scenery underground - if (z > ride->GetStation(stationIndex).GetBaseZ()) + if (z > ride.GetStation(stationIndex).GetBaseZ()) { return 40; } @@ -1523,47 +1604,48 @@ static void ride_ratings_add(RatingTuple* rating, int32_t excitement, int32_t in rating->Nausea = std::clamp(newNausea, 0, INT16_MAX); } -static void ride_ratings_apply_length(RatingTuple* ratings, Ride* ride, int32_t maxLength, int32_t excitementMultiplier) +static void ride_ratings_apply_length(RatingTuple* ratings, const Ride& ride, int32_t maxLength, int32_t excitementMultiplier) { - ride_ratings_add(ratings, (std::min(ride->GetTotalLength() >> 16, maxLength) * excitementMultiplier) >> 16, 0, 0); + ride_ratings_add(ratings, (std::min(ride.GetTotalLength() >> 16, maxLength) * excitementMultiplier) >> 16, 0, 0); } -static void ride_ratings_apply_synchronisation(RatingTuple* ratings, Ride* ride, int32_t excitement, int32_t intensity) +static void ride_ratings_apply_synchronisation(RatingTuple* ratings, const Ride& ride, int32_t excitement, int32_t intensity) { - if ((ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) && ride_has_adjacent_station(ride)) + if ((ride.depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) && RideHasAdjacentStation(ride)) { ride_ratings_add(ratings, excitement, intensity, 0); } } -static void ride_ratings_apply_train_length(RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier) +static void ride_ratings_apply_train_length(RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier) { - ride_ratings_add(ratings, ((ride->num_cars_per_train - 1) * excitementMultiplier) >> 16, 0, 0); + ride_ratings_add(ratings, ((ride.num_cars_per_train - 1) * excitementMultiplier) >> 16, 0, 0); } static void ride_ratings_apply_max_speed( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { - int32_t modifier = ride->max_speed >> 16; + int32_t modifier = ride.max_speed >> 16; ride_ratings_add( ratings, (modifier * excitementMultiplier) >> 16, (modifier * intensityMultiplier) >> 16, (modifier * nauseaMultiplier) >> 16); } static void ride_ratings_apply_average_speed( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier) { - int32_t modifier = ride->average_speed >> 16; + int32_t modifier = ride.average_speed >> 16; ride_ratings_add(ratings, (modifier * excitementMultiplier) >> 16, (modifier * intensityMultiplier) >> 16, 0); } -static void ride_ratings_apply_duration(RatingTuple* ratings, Ride* ride, int32_t maxDuration, int32_t excitementMultiplier) +static void ride_ratings_apply_duration( + RatingTuple* ratings, const Ride& ride, int32_t maxDuration, int32_t excitementMultiplier) { - ride_ratings_add(ratings, (std::min(ride->GetTotalTime(), maxDuration) * excitementMultiplier) >> 16, 0, 0); + ride_ratings_add(ratings, (std::min(ride.GetTotalTime(), maxDuration) * excitementMultiplier) >> 16, 0, 0); } static void ride_ratings_apply_gforces( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { RatingTuple subRating = ride_ratings_get_gforce_ratings(ride); ride_ratings_add( @@ -1572,7 +1654,7 @@ static void ride_ratings_apply_gforces( } static void ride_ratings_apply_turns( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { RatingTuple subRating = ride_ratings_get_turns_ratings(ride); ride_ratings_add( @@ -1581,7 +1663,7 @@ static void ride_ratings_apply_turns( } static void ride_ratings_apply_drops( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { RatingTuple subRating = ride_ratings_get_drop_ratings(ride); ride_ratings_add( @@ -1590,7 +1672,7 @@ static void ride_ratings_apply_drops( } static void ride_ratings_apply_sheltered_ratings( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { RatingTuple subRating = ride_ratings_get_sheltered_ratings(ride); ride_ratings_add( @@ -1599,19 +1681,19 @@ static void ride_ratings_apply_sheltered_ratings( } static void ride_ratings_apply_operation_option( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { ride_ratings_add( - ratings, (ride->operation_option * excitementMultiplier) >> 16, (ride->operation_option * intensityMultiplier) >> 16, - (ride->operation_option * nauseaMultiplier) >> 16); + ratings, (ride.operation_option * excitementMultiplier) >> 16, (ride.operation_option * intensityMultiplier) >> 16, + (ride.operation_option * nauseaMultiplier) >> 16); } static void ride_ratings_apply_rotations( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { ride_ratings_add( - ratings, ride->rotations * excitementMultiplier, ride->rotations * intensityMultiplier, - ride->rotations * nauseaMultiplier); + ratings, ride.rotations * excitementMultiplier, ride.rotations * intensityMultiplier, + ride.rotations * nauseaMultiplier); } static void ride_ratings_apply_proximity(RideRatingUpdateState& state, RatingTuple* ratings, int32_t excitementMultiplier) @@ -1619,16 +1701,16 @@ static void ride_ratings_apply_proximity(RideRatingUpdateState& state, RatingTup ride_ratings_add(ratings, (ride_ratings_get_proximity_score(state) * excitementMultiplier) >> 16, 0, 0); } -static void ride_ratings_apply_scenery(RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier) +static void ride_ratings_apply_scenery(RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier) { ride_ratings_add(ratings, (ride_ratings_get_scenery_score(ride) * excitementMultiplier) >> 16, 0, 0); } static void ride_ratings_apply_highest_drop_height_penalty( - RatingTuple* ratings, Ride* ride, int32_t minHighestDropHeight, int32_t excitementPenalty, int32_t intensityPenalty, + RatingTuple* ratings, const Ride& ride, int32_t minHighestDropHeight, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { - if (ride->highest_drop_height < minHighestDropHeight) + if (ride.highest_drop_height < minHighestDropHeight) { ratings->Excitement /= excitementPenalty; ratings->Intensity /= intensityPenalty; @@ -1637,10 +1719,10 @@ static void ride_ratings_apply_highest_drop_height_penalty( } static void ride_ratings_apply_max_speed_penalty( - RatingTuple* ratings, Ride* ride, int32_t minMaxSpeed, int32_t excitementPenalty, int32_t intensityPenalty, + RatingTuple* ratings, const Ride& ride, int32_t minMaxSpeed, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { - if (ride->max_speed < minMaxSpeed) + if (ride.max_speed < minMaxSpeed) { ratings->Excitement /= excitementPenalty; ratings->Intensity /= intensityPenalty; @@ -1649,10 +1731,10 @@ static void ride_ratings_apply_max_speed_penalty( } static void ride_ratings_apply_num_drops_penalty( - RatingTuple* ratings, Ride* ride, int32_t minNumDrops, int32_t excitementPenalty, int32_t intensityPenalty, + RatingTuple* ratings, const Ride& ride, int32_t minNumDrops, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { - if ((ride->drops & 0x3F) < minNumDrops) + if ((ride.drops & 0x3F) < minNumDrops) { ratings->Excitement /= excitementPenalty; ratings->Intensity /= intensityPenalty; @@ -1661,10 +1743,10 @@ static void ride_ratings_apply_num_drops_penalty( } static void ride_ratings_apply_max_negative_g_penalty( - RatingTuple* ratings, Ride* ride, int32_t maxMaxNegativeVerticalG, int32_t excitementPenalty, int32_t intensityPenalty, - int32_t nauseaPenalty) + RatingTuple* ratings, const Ride& ride, int32_t maxMaxNegativeVerticalG, int32_t excitementPenalty, + int32_t intensityPenalty, int32_t nauseaPenalty) { - if (ride->max_negative_vertical_g >= maxMaxNegativeVerticalG) + if (ride.max_negative_vertical_g >= maxMaxNegativeVerticalG) { ratings->Excitement /= excitementPenalty; ratings->Intensity /= intensityPenalty; @@ -1673,10 +1755,10 @@ static void ride_ratings_apply_max_negative_g_penalty( } static void ride_ratings_apply_max_lateral_g_penalty( - RatingTuple* ratings, Ride* ride, int32_t minMaxLateralG, int32_t excitementPenalty, int32_t intensityPenalty, + RatingTuple* ratings, const Ride& ride, int32_t minMaxLateralG, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { - if (ride->max_lateral_g < minMaxLateralG) + if (ride.max_lateral_g < minMaxLateralG) { ratings->Excitement /= excitementPenalty; ratings->Intensity /= intensityPenalty; @@ -1684,26 +1766,26 @@ static void ride_ratings_apply_max_lateral_g_penalty( } } -static RatingTuple ride_ratings_get_excessive_lateral_g_penalty(Ride* ride) +static RatingTuple ride_ratings_get_excessive_lateral_g_penalty(const Ride& ride) { RatingTuple result{}; - if (ride->max_lateral_g > FIXED_2DP(2, 80)) + if (ride.max_lateral_g > FIXED_2DP(2, 80)) { result.Intensity = FIXED_2DP(3, 75); result.Nausea = FIXED_2DP(2, 00); } - if (ride->max_lateral_g > FIXED_2DP(3, 10)) + 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; + fixed16_2dp gforce = ride.max_negative_vertical_g; 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; @@ -1715,7 +1797,7 @@ static RatingTuple ride_ratings_get_excessive_lateral_g_penalty(Ride* ride) } static void ride_ratings_apply_excessive_lateral_g_penalty( - RatingTuple* ratings, Ride* ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) + RatingTuple* ratings, const Ride& ride, int32_t excitementMultiplier, int32_t intensityMultiplier, int32_t nauseaMultiplier) { #ifndef ORIGINAL_RATINGS RatingTuple subRating = ride_ratings_get_excessive_lateral_g_penalty(ride); @@ -1726,10 +1808,10 @@ static void ride_ratings_apply_excessive_lateral_g_penalty( } static void ride_ratings_apply_first_length_penalty( - RatingTuple* ratings, Ride* ride, int32_t minFirstLength, int32_t excitementPenalty, int32_t intensityPenalty, + RatingTuple* ratings, const Ride& ride, int32_t minFirstLength, int32_t excitementPenalty, int32_t intensityPenalty, int32_t nauseaPenalty) { - if (ride->GetStation().SegmentLength < minFirstLength) + if (ride.GetStation().SegmentLength < minFirstLength) { ratings->Excitement /= excitementPenalty; ratings->Intensity /= intensityPenalty; @@ -1741,12 +1823,12 @@ static void ride_ratings_apply_first_length_penalty( #pragma region Ride rating calculation functions -void ride_ratings_calculate_spiral_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSpiralRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -1764,12 +1846,12 @@ void ride_ratings_calculate_spiral_roller_coaster(Ride* ride, RideRatingUpdateSt ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -1779,20 +1861,20 @@ void ride_ratings_calculate_spiral_roller_coaster(Ride* ride, RideRatingUpdateSt ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_stand_up_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateStandUpRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 17; + ride.unreliability_factor = 17; set_unreliability_factor(ride); RatingTuple ratings; @@ -1817,20 +1899,20 @@ void ride_ratings_calculate_stand_up_roller_coaster(Ride* ride, RideRatingUpdate ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_suspended_swinging_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSuspendedSwingingCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 18; + ride.unreliability_factor = 18; set_unreliability_factor(ride); RatingTuple ratings; @@ -1857,20 +1939,20 @@ void ride_ratings_calculate_suspended_swinging_coaster(Ride* ride, RideRatingUpd ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_inverted_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateInvertedRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 17; + ride.unreliability_factor = 17; set_unreliability_factor(ride); RatingTuple ratings; @@ -1888,32 +1970,32 @@ void ride_ratings_calculate_inverted_roller_coaster(Ride* ride, RideRatingUpdate ride_ratings_apply_proximity(state, &ratings, 15657); ride_ratings_apply_scenery(&ratings, ride, 8366); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 30), 2, 2, 2); ride_ratings_apply_excessive_lateral_g_penalty(&ratings, ride, 24576, 29789, 55606); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_junior_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateJuniorRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 13; + ride.unreliability_factor = 13; set_unreliability_factor(ride); RatingTuple ratings; @@ -1938,20 +2020,20 @@ void ride_ratings_calculate_junior_roller_coaster(Ride* ride, RideRatingUpdateSt ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_miniature_railway(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMiniatureRailway(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 11; + ride.unreliability_factor = 11; set_unreliability_factor(ride); RatingTuple ratings; @@ -1969,24 +2051,24 @@ void ride_ratings_calculate_miniature_railway(Ride* ride, RideRatingUpdateState& ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; auto shelteredEighths = get_num_of_sheltered_eighths(ride); if (shelteredEighths.TrackShelteredEighths >= 4) - ride->excitement /= 4; + ride.excitement /= 4; - ride->sheltered_eighths = shelteredEighths.TotalShelteredEighths; + ride.sheltered_eighths = shelteredEighths.TotalShelteredEighths; } -void ride_ratings_calculate_monorail(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMonorail(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -2004,24 +2086,24 @@ void ride_ratings_calculate_monorail(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; auto shelteredEighths = get_num_of_sheltered_eighths(ride); if (shelteredEighths.TrackShelteredEighths >= 4) - ride->excitement /= 4; + ride.excitement /= 4; - ride->sheltered_eighths = shelteredEighths.TotalShelteredEighths; + ride.sheltered_eighths = shelteredEighths.TotalShelteredEighths; } -void ride_ratings_calculate_mini_suspended_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMiniSuspendedCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 15; + ride.unreliability_factor = 15; set_unreliability_factor(ride); RatingTuple ratings; @@ -2047,17 +2129,17 @@ void ride_ratings_calculate_mini_suspended_coaster(Ride* ride, RideRatingUpdateS ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_boat_hire(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateBoatHire(Ride& ride, RideRatingUpdateState& state) { - ride->unreliability_factor = 7; + ride.unreliability_factor = 7; set_unreliability_factor(ride); // NOTE In the original game, the ratings were zeroed before calling set_unreliability_factor which is unusual as rest @@ -2068,7 +2150,7 @@ void ride_ratings_calculate_boat_hire(Ride* ride, RideRatingUpdateState& state) ride_ratings_set(&ratings, RIDE_RATING(1, 90), RIDE_RATING(0, 80), RIDE_RATING(0, 90)); // Most likely checking if the ride has does not have a circuit - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) { ride_ratings_add(&ratings, RIDE_RATING(0, 20), 0, 0); } @@ -2079,20 +2161,20 @@ void ride_ratings_calculate_boat_hire(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_wooden_wild_mouse(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateWoodenWildMouse(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -2120,20 +2202,20 @@ void ride_ratings_calculate_wooden_wild_mouse(Ride* ride, RideRatingUpdateState& ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_steeplechase(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSteeplechase(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -2160,20 +2242,20 @@ void ride_ratings_calculate_steeplechase(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_car_ride(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateCarRide(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 12; + ride.unreliability_factor = 12; set_unreliability_factor(ride); RatingTuple ratings; @@ -2194,38 +2276,38 @@ void ride_ratings_calculate_car_ride(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_launched_freefall(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateLaunchedFreefall(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(2, 70), RIDE_RATING(3, 00), RIDE_RATING(3, 50)); - if (ride->mode == RideMode::DownwardLaunch) + if (ride.mode == RideMode::DownwardLaunch) { ride_ratings_add(&ratings, RIDE_RATING(0, 30), RIDE_RATING(0, 65), RIDE_RATING(0, 45)); } - int32_t excitementModifier = ((ride->GetTotalLength() >> 16) * 32768) >> 16; + int32_t excitementModifier = ((ride.GetTotalLength() >> 16) * 32768) >> 16; ride_ratings_add(&ratings, excitementModifier, 0, 0); #ifdef ORIGINAL_RATINGS ride_ratings_apply_operation_option(&ratings, ride, 0, 1355917, 451972); #else // Only apply "launch speed" effects when the setting can be modified - if (ride->mode == RideMode::UpwardLaunch) + if (ride.mode == RideMode::UpwardLaunch) { ride_ratings_apply_operation_option(&ratings, ride, 0, 1355917, 451972); } @@ -2234,7 +2316,7 @@ void ride_ratings_calculate_launched_freefall(Ride* ride, RideRatingUpdateState& // Fix #3282: When the ride mode is in downward launch mode, the intensity and // nausea were fixed regardless of how high the ride is. The following // calculation is based on roto-drop which is a similar mechanic. - int32_t lengthFactor = ((ride->GetTotalLength() >> 16) * 209715) >> 16; + int32_t lengthFactor = ((ride.GetTotalLength() >> 16) * 209715) >> 16; ride_ratings_add(&ratings, lengthFactor, lengthFactor * 2, lengthFactor * 2); } #endif @@ -2245,20 +2327,20 @@ void ride_ratings_calculate_launched_freefall(Ride* ride, RideRatingUpdateState& ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_bobsleigh_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateBobsleighCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -2283,50 +2365,49 @@ void ride_ratings_calculate_bobsleigh_coaster(Ride* ride, RideRatingUpdateState& ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_observation_tower(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateObservationTower(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 15; + ride.unreliability_factor = 15; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 50), RIDE_RATING(0, 00), RIDE_RATING(0, 10)); - ride_ratings_add( - &ratings, ((ride->GetTotalLength() >> 16) * 45875) >> 16, 0, ((ride->GetTotalLength() >> 16) * 26214) >> 16); + ride_ratings_add(&ratings, ((ride.GetTotalLength() >> 16) * 45875) >> 16, 0, ((ride.GetTotalLength() >> 16) * 26214) >> 16); ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 83662); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; auto shelteredEighths = get_num_of_sheltered_eighths(ride); if (shelteredEighths.TrackShelteredEighths >= 5) - ride->excitement /= 4; + ride.excitement /= 4; } -void ride_ratings_calculate_looping_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateLoopingRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = ride->IsPoweredLaunched() ? 20 : 15; + ride.unreliability_factor = ride.IsPoweredLaunched() ? 20 : 15; set_unreliability_factor(ride); RatingTuple ratings; @@ -2344,12 +2425,12 @@ void ride_ratings_calculate_looping_roller_coaster(Ride* ride, RideRatingUpdateS ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 14, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 10), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -2359,20 +2440,20 @@ void ride_ratings_calculate_looping_roller_coaster(Ride* ride, RideRatingUpdateS ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_dinghy_slide(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateDinghySlide(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 13; + ride.unreliability_factor = 13; set_unreliability_factor(ride); RatingTuple ratings; @@ -2397,20 +2478,20 @@ void ride_ratings_calculate_dinghy_slide(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_mine_train_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMineTrainCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -2437,20 +2518,20 @@ void ride_ratings_calculate_mine_train_coaster(Ride* ride, RideRatingUpdateState ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_chairlift(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateChairlift(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14 + (ride->speed * 2); + ride.unreliability_factor = 14 + (ride.speed * 2); set_unreliability_factor(ride); RatingTuple ratings; @@ -2469,30 +2550,30 @@ void ride_ratings_calculate_chairlift(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - if (ride->num_stations <= 1) + if (ride.num_stations <= 1) { ratings.Excitement = 0; ratings.Intensity /= 2; } - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; auto shelteredEighths = get_num_of_sheltered_eighths(ride); if (shelteredEighths.TrackShelteredEighths >= 4) - ride->excitement /= 4; + ride.excitement /= 4; - ride->sheltered_eighths = shelteredEighths.TotalShelteredEighths; + ride.sheltered_eighths = shelteredEighths.TotalShelteredEighths; } -void ride_ratings_calculate_corkscrew_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateCorkscrewRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -2510,12 +2591,12 @@ void ride_ratings_calculate_corkscrew_roller_coaster(Ride* ride, RideRatingUpdat ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -2525,25 +2606,25 @@ void ride_ratings_calculate_corkscrew_roller_coaster(Ride* ride, RideRatingUpdat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_maze(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMaze(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 8; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 8; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 30), RIDE_RATING(0, 50), RIDE_RATING(0, 00)); - int32_t size = std::min(ride->maze_tiles, 100); + int32_t size = std::min(ride.maze_tiles, 100); ride_ratings_add(&ratings, size, size * 2, 0); ride_ratings_apply_scenery(&ratings, ride, 22310); @@ -2551,26 +2632,26 @@ void ride_ratings_calculate_maze(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_spiral_slide(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSpiralSlide(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 8; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 8; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 50), RIDE_RATING(1, 40), RIDE_RATING(0, 90)); // Unlimited slides boost - if (ride->mode == RideMode::UnlimitedRidesPerAdmission) + if (ride.mode == RideMode::UnlimitedRidesPerAdmission) { ride_ratings_add(&ratings, RIDE_RATING(0, 40), RIDE_RATING(0, 20), RIDE_RATING(0, 25)); } @@ -2580,31 +2661,31 @@ void ride_ratings_calculate_spiral_slide(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 2; + ride.sheltered_eighths = 2; } -void ride_ratings_calculate_go_karts(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateGoKarts(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 42), RIDE_RATING(1, 73), RIDE_RATING(0, 40)); ride_ratings_apply_length(&ratings, ride, 700, 32768); - if (ride->mode == RideMode::Race && ride->NumTrains >= 4) + if (ride.mode == RideMode::Race && ride.NumTrains >= 4) { ride_ratings_add(&ratings, RIDE_RATING(1, 40), RIDE_RATING(0, 50), 0); - int32_t lapsFactor = (ride->NumLaps - 1) * 30; + int32_t lapsFactor = (ride.NumLaps - 1) * 30; ride_ratings_add(&ratings, lapsFactor, lapsFactor / 2, 0); } @@ -2617,24 +2698,24 @@ void ride_ratings_calculate_go_karts(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; auto shelteredEighths = get_num_of_sheltered_eighths(ride); - ride->sheltered_eighths = shelteredEighths.TotalShelteredEighths; + ride.sheltered_eighths = shelteredEighths.TotalShelteredEighths; if (shelteredEighths.TrackShelteredEighths >= 6) - ride->excitement /= 2; + ride.excitement /= 2; } -void ride_ratings_calculate_log_flume(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateLogFlume(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 15; + ride.unreliability_factor = 15; set_unreliability_factor(ride); RatingTuple ratings; @@ -2653,20 +2734,20 @@ void ride_ratings_calculate_log_flume(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_river_rapids(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateRiverRapids(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -2686,32 +2767,32 @@ void ride_ratings_calculate_river_rapids(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_dodgems(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateDodgems(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 16; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 30), RIDE_RATING(0, 50), RIDE_RATING(0, 35)); - if (ride->NumTrains >= 4) + if (ride.NumTrains >= 4) { ride_ratings_add(&ratings, RIDE_RATING(0, 40), 0, 0); } - ride_ratings_add(&ratings, ride->operation_option, ride->operation_option / 2, 0); + ride_ratings_add(&ratings, ride.operation_option, ride.operation_option / 2, 0); - if (ride->NumTrains >= 4) + if (ride.NumTrains >= 4) { ride_ratings_add(&ratings, RIDE_RATING(0, 40), 0, 0); } @@ -2721,87 +2802,87 @@ void ride_ratings_calculate_dodgems(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; } -void ride_ratings_calculate_swinging_ship(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSwingingShip(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 10; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 10; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 50), RIDE_RATING(1, 90), RIDE_RATING(1, 41)); - ride_ratings_add(&ratings, ride->operation_option * 5, ride->operation_option * 5, ride->operation_option * 10); + ride_ratings_add(&ratings, ride.operation_option * 5, ride.operation_option * 5, ride.operation_option * 10); ride_ratings_apply_scenery(&ratings, ride, 16732); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_inverter_ship(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateInverterShip(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 16; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(2, 50), RIDE_RATING(2, 70), RIDE_RATING(2, 74)); - ride_ratings_add(&ratings, ride->operation_option * 11, ride->operation_option * 22, ride->operation_option * 22); + ride_ratings_add(&ratings, ride.operation_option * 11, ride.operation_option * 22, ride.operation_option * 22); ride_ratings_apply_scenery(&ratings, ride, 11155); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_food_stall(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateFoodStall(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_drink_stall(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateDrinkStall(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_shop(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateShop(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_merry_go_round(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMerryGoRound(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 16; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -2811,31 +2892,31 @@ void ride_ratings_calculate_merry_go_round(Ride* ride, RideRatingUpdateState& st ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; } -void ride_ratings_calculate_information_kiosk(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateInformationKiosk(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_toilets(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateToilets(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_ferris_wheel(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateFerrisWheel(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 16; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -2845,24 +2926,24 @@ void ride_ratings_calculate_ferris_wheel(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_motion_simulator(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMotionSimulator(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 21; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 21; set_unreliability_factor(ride); // Base ratings RatingTuple ratings; - if (ride->mode == RideMode::FilmThrillRiders) + if (ride.mode == RideMode::FilmThrillRiders) { ratings.Excitement = RIDE_RATING(3, 25); ratings.Intensity = RIDE_RATING(4, 10); @@ -2878,24 +2959,24 @@ void ride_ratings_calculate_motion_simulator(Ride* ride, RideRatingUpdateState& ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; } -void ride_ratings_calculate_3d_cinema(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculate3dCinema(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 21; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 21; set_unreliability_factor(ride); // Base ratings RatingTuple ratings; - switch (ride->mode) + switch (ride.mode) { default: case RideMode::MouseTails3DFilm: @@ -2918,24 +2999,24 @@ void ride_ratings_calculate_3d_cinema(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths |= 7; + ride.sheltered_eighths |= 7; } -void ride_ratings_calculate_top_spin(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateTopSpin(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 19; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 19; set_unreliability_factor(ride); // Base ratings RatingTuple ratings; - switch (ride->mode) + switch (ride.mode) { default: case RideMode::Beginners: @@ -2960,19 +3041,19 @@ void ride_ratings_calculate_top_spin(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_space_rings(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSpaceRings(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 7; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 7; set_unreliability_factor(ride); RatingTuple ratings; @@ -2982,20 +3063,20 @@ void ride_ratings_calculate_space_rings(Ride* ride, RideRatingUpdateState& state ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_reverse_freefall_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateReverseFreefallCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 25; + ride.unreliability_factor = 25; set_unreliability_factor(ride); RatingTuple ratings; @@ -3012,26 +3093,26 @@ void ride_ratings_calculate_reverse_freefall_coaster(Ride* ride, RideRatingUpdat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_lift(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateLift(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 15; + ride.unreliability_factor = 15; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(1, 11), RIDE_RATING(0, 35), RIDE_RATING(0, 30)); - int32_t totalLength = ride->GetTotalLength() >> 16; + int32_t totalLength = ride.GetTotalLength() >> 16; ride_ratings_add(&ratings, (totalLength * 45875) >> 16, 0, (totalLength * 26214) >> 16); ride_ratings_apply_proximity(state, &ratings, 11183); @@ -3040,23 +3121,23 @@ void ride_ratings_calculate_lift(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; if ((get_num_of_sheltered_eighths(ride).TrackShelteredEighths) >= 5) - ride->excitement /= 4; + ride.excitement /= 4; } -void ride_ratings_calculate_vertical_drop_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateVerticalDropRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -3081,25 +3162,25 @@ void ride_ratings_calculate_vertical_drop_roller_coaster(Ride* ride, RideRatingU ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_cash_machine(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateCashMachine(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_twist(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateTwist(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 16; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -3109,19 +3190,19 @@ void ride_ratings_calculate_twist(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_haunted_house(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateHauntedHouse(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 8; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 8; set_unreliability_factor(ride); RatingTuple ratings = { @@ -3133,20 +3214,20 @@ void ride_ratings_calculate_haunted_house(Ride* ride, RideRatingUpdateState& sta ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; } -void ride_ratings_calculate_flying_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateFlyingRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 17; + ride.unreliability_factor = 17; set_unreliability_factor(ride); RatingTuple ratings; @@ -3164,12 +3245,12 @@ void ride_ratings_calculate_flying_roller_coaster(Ride* ride, RideRatingUpdateSt ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ratings.Excitement /= 2; ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 1, 1); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 1, 1); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 1, 1); @@ -3178,20 +3259,20 @@ void ride_ratings_calculate_flying_roller_coaster(Ride* ride, RideRatingUpdateSt ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_virginia_reel(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateVirginiaReel(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 19; + ride.unreliability_factor = 19; set_unreliability_factor(ride); RatingTuple ratings; @@ -3215,20 +3296,20 @@ void ride_ratings_calculate_virginia_reel(Ride* ride, RideRatingUpdateState& sta ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_splash_boats(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSplashBoats(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 15; + ride.unreliability_factor = 15; set_unreliability_factor(ride); RatingTuple ratings; @@ -3247,20 +3328,20 @@ void ride_ratings_calculate_splash_boats(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_mini_helicopters(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMiniHelicopters(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 12; + ride.unreliability_factor = 12; set_unreliability_factor(ride); RatingTuple ratings; @@ -3281,20 +3362,20 @@ void ride_ratings_calculate_mini_helicopters(Ride* ride, RideRatingUpdateState& ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 6; + ride.sheltered_eighths = 6; } -void ride_ratings_calculate_lay_down_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateLayDownRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 18; + ride.unreliability_factor = 18; set_unreliability_factor(ride); RatingTuple ratings; @@ -3312,7 +3393,7 @@ void ride_ratings_calculate_lay_down_roller_coaster(Ride* ride, RideRatingUpdate ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) { ratings.Excitement /= 4; ratings.Intensity /= 2; @@ -3321,7 +3402,7 @@ void ride_ratings_calculate_lay_down_roller_coaster(Ride* ride, RideRatingUpdate ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -3331,20 +3412,20 @@ void ride_ratings_calculate_lay_down_roller_coaster(Ride* ride, RideRatingUpdate ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_suspended_monorail(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSuspendedMonorail(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -3362,24 +3443,24 @@ void ride_ratings_calculate_suspended_monorail(Ride* ride, RideRatingUpdateState ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; auto shelteredEighths = get_num_of_sheltered_eighths(ride); if (shelteredEighths.TrackShelteredEighths >= 4) - ride->excitement /= 4; + ride.excitement /= 4; - ride->sheltered_eighths = shelteredEighths.TotalShelteredEighths; + ride.sheltered_eighths = shelteredEighths.TotalShelteredEighths; } -void ride_ratings_calculate_reverser_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateReverserRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 19; + ride.unreliability_factor = 19; set_unreliability_factor(ride); RatingTuple ratings; @@ -3414,20 +3495,20 @@ void ride_ratings_calculate_reverser_roller_coaster(Ride* ride, RideRatingUpdate ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_heartline_twister_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateHeartlineTwisterCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 18; + ride.unreliability_factor = 18; set_unreliability_factor(ride); RatingTuple ratings; @@ -3449,7 +3530,7 @@ void ride_ratings_calculate_heartline_twister_coaster(Ride* ride, RideRatingUpda ride_ratings_apply_proximity(state, &ratings, 9841); ride_ratings_apply_scenery(&ratings, ride, 3904); - if (ride->inversions == 0) + if (ride.inversions == 0) ratings.Excitement /= 4; ride_ratings_apply_num_drops_penalty(&ratings, ride, 1, 4, 1, 1); @@ -3458,20 +3539,20 @@ void ride_ratings_calculate_heartline_twister_coaster(Ride* ride, RideRatingUpda ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_mini_golf(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMiniGolf(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 0; + ride.unreliability_factor = 0; set_unreliability_factor(ride); RatingTuple ratings; @@ -3483,10 +3564,10 @@ void ride_ratings_calculate_mini_golf(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_scenery(&ratings, ride, 27887); // Apply golf holes factor - ride_ratings_add(&ratings, (ride->holes) * 5, 0, 0); + ride_ratings_add(&ratings, (ride.holes) * 5, 0, 0); // Apply no golf holes penalty - if (ride->holes == 0) + if (ride.holes == 0) { ratings.Excitement /= 8; ratings.Intensity /= 2; @@ -3496,25 +3577,25 @@ void ride_ratings_calculate_mini_golf(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_first_aid(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateFirstAid(Ride& ride, RideRatingUpdateState& state) { - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; } -void ride_ratings_calculate_circus(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateCircus(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 9; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 9; set_unreliability_factor(ride); RatingTuple ratings = { @@ -3526,20 +3607,20 @@ void ride_ratings_calculate_circus(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; } -void ride_ratings_calculate_ghost_train(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateGhostTrain(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 12; + ride.unreliability_factor = 12; set_unreliability_factor(ride); RatingTuple ratings; @@ -3559,20 +3640,20 @@ void ride_ratings_calculate_ghost_train(Ride* ride, RideRatingUpdateState& state ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_twister_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateTwisterRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 15; + ride.unreliability_factor = 15; set_unreliability_factor(ride); RatingTuple ratings; @@ -3590,12 +3671,12 @@ void ride_ratings_calculate_twister_roller_coaster(Ride* ride, RideRatingUpdateS ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -3605,20 +3686,20 @@ void ride_ratings_calculate_twister_roller_coaster(Ride* ride, RideRatingUpdateS ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_wooden_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateWoodenRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 19; + ride.unreliability_factor = 19; set_unreliability_factor(ride); RatingTuple ratings; @@ -3645,20 +3726,20 @@ void ride_ratings_calculate_wooden_roller_coaster(Ride* ride, RideRatingUpdateSt ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_side_friction_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSideFrictionRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 19; + ride.unreliability_factor = 19; set_unreliability_factor(ride); RatingTuple ratings; @@ -3684,20 +3765,20 @@ void ride_ratings_calculate_side_friction_roller_coaster(Ride* ride, RideRatingU ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_wild_mouse(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateWildMouse(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -3724,20 +3805,20 @@ void ride_ratings_calculate_wild_mouse(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_multi_dimension_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMultiDimensionRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 18; + ride.unreliability_factor = 18; set_unreliability_factor(ride); RatingTuple ratings; @@ -3755,34 +3836,34 @@ void ride_ratings_calculate_multi_dimension_roller_coaster(Ride* ride, RideRatin ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ratings.Excitement /= 4; ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 1, 1); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 1, 1); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 1, 1); ride_ratings_apply_excessive_lateral_g_penalty(&ratings, ride, 24576, 38130, 49648); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_giga_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateGigaCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -3800,12 +3881,12 @@ void ride_ratings_calculate_giga_coaster(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 16, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -3815,26 +3896,26 @@ void ride_ratings_calculate_giga_coaster(Ride* ride, RideRatingUpdateState& stat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_roto_drop(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateRotoDrop(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 24; + ride.unreliability_factor = 24; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(2, 80), RIDE_RATING(3, 50), RIDE_RATING(3, 50)); - int32_t lengthFactor = ((ride->GetTotalLength() >> 16) * 209715) >> 16; + int32_t lengthFactor = ((ride.GetTotalLength() >> 16) * 209715) >> 16; ride_ratings_add(&ratings, lengthFactor, lengthFactor * 2, lengthFactor * 2); ride_ratings_apply_proximity(state, &ratings, 11183); @@ -3843,19 +3924,19 @@ void ride_ratings_calculate_roto_drop(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_flying_saucers(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateFlyingSaucers(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 32; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 32; set_unreliability_factor(ride); RatingTuple ratings = { @@ -3864,14 +3945,14 @@ void ride_ratings_calculate_flying_saucers(Ride* ride, RideRatingUpdateState& st /* .nausea = */ RIDE_RATING(0, 39), }; - if (ride->NumTrains >= 4) + if (ride.NumTrains >= 4) { ride_ratings_add(&ratings, RIDE_RATING(0, 40), 0, 0); } - ride_ratings_add(&ratings, ride->time_limit, ride->time_limit / 2, 0); + ride_ratings_add(&ratings, ride.time_limit, ride.time_limit / 2, 0); - if (ride->NumTrains >= 4) + if (ride.NumTrains >= 4) { ride_ratings_add(&ratings, RIDE_RATING(0, 40), 0, 0); } @@ -3881,19 +3962,19 @@ void ride_ratings_calculate_flying_saucers(Ride* ride, RideRatingUpdateState& st ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_crooked_house(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateCrookedHouse(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 5; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 5; set_unreliability_factor(ride); RatingTuple ratings = { @@ -3905,20 +3986,20 @@ void ride_ratings_calculate_crooked_house(Ride* ride, RideRatingUpdateState& sta ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 7; + ride.sheltered_eighths = 7; } -void ride_ratings_calculate_monorail_cycles(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMonorailCycles(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 4; + ride.unreliability_factor = 4; set_unreliability_factor(ride); RatingTuple ratings; @@ -3939,20 +4020,20 @@ void ride_ratings_calculate_monorail_cycles(Ride* ride, RideRatingUpdateState& s ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_compact_inverted_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateCompactInvertedCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = ride->mode == RideMode::ReverseInclineLaunchedShuttle ? 31 : 21; + ride.unreliability_factor = ride.mode == RideMode::ReverseInclineLaunchedShuttle ? 31 : 21; set_unreliability_factor(ride); RatingTuple ratings; @@ -3970,32 +4051,32 @@ void ride_ratings_calculate_compact_inverted_coaster(Ride* ride, RideRatingUpdat ride_ratings_apply_proximity(state, &ratings, 15657); ride_ratings_apply_scenery(&ratings, ride, 8366); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 30), 2, 2, 2); ride_ratings_apply_excessive_lateral_g_penalty(&ratings, ride, 24576, 30980, 55606); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_water_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateWaterCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -4020,23 +4101,23 @@ void ride_ratings_calculate_water_coaster(Ride* ride, RideRatingUpdateState& sta ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - if (!(ride->special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS)) + if (!(ride.special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS)) ratings.Excitement /= 8; - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_air_powered_vertical_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateAirPoweredVerticalCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 28; + ride.unreliability_factor = 28; set_unreliability_factor(ride); RatingTuple ratings; @@ -4054,20 +4135,20 @@ void ride_ratings_calculate_air_powered_vertical_coaster(Ride* ride, RideRatingU ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_inverted_hairpin_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateInvertedHairpinCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 14; + ride.unreliability_factor = 14; set_unreliability_factor(ride); RatingTuple ratings; @@ -4095,42 +4176,42 @@ void ride_ratings_calculate_inverted_hairpin_coaster(Ride* ride, RideRatingUpdat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_magic_carpet(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMagicCarpet(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 16; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; ride_ratings_set(&ratings, RIDE_RATING(2, 45), RIDE_RATING(1, 60), RIDE_RATING(2, 60)); - ride_ratings_add(&ratings, ride->operation_option * 10, ride->operation_option * 20, ride->operation_option * 20); + ride_ratings_add(&ratings, ride.operation_option * 10, ride.operation_option * 20, ride.operation_option * 20); ride_ratings_apply_scenery(&ratings, ride, 11155); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 0; + ride.sheltered_eighths = 0; } -void ride_ratings_calculate_submarine_ride(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSubmarineRide(Ride& ride, RideRatingUpdateState& state) { - ride->unreliability_factor = 7; + ride.unreliability_factor = 7; set_unreliability_factor(ride); // NOTE Fixed bug from original game, see boat Hire. @@ -4144,21 +4225,21 @@ void ride_ratings_calculate_submarine_ride(Ride* ride, RideRatingUpdateState& st ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; // Originally, this was always to zero, even though the default vehicle is completely enclosed. - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_river_rafts(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateRiverRafts(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 12; + ride.unreliability_factor = 12; set_unreliability_factor(ride); RatingTuple ratings; @@ -4175,19 +4256,19 @@ void ride_ratings_calculate_river_rafts(Ride* ride, RideRatingUpdateState& state ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_enterprise(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateEnterprise(Ride& ride, RideRatingUpdateState& state) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - ride->unreliability_factor = 22; + ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.unreliability_factor = 22; set_unreliability_factor(ride); // Base ratings @@ -4197,27 +4278,27 @@ void ride_ratings_calculate_enterprise(Ride* ride, RideRatingUpdateState& state) /* .nausea = */ RIDE_RATING(5, 72), }; - ride_ratings_add(&ratings, ride->operation_option, ride->operation_option * 16, ride->operation_option * 16); + ride_ratings_add(&ratings, ride.operation_option, ride.operation_option * 16, ride.operation_option * 16); ride_ratings_apply_scenery(&ratings, ride, 19521); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = 3; + ride.sheltered_eighths = 3; } -void ride_ratings_calculate_inverted_impulse_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateInvertedImpulseCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 20; + ride.unreliability_factor = 20; set_unreliability_factor(ride); RatingTuple ratings; @@ -4241,20 +4322,20 @@ void ride_ratings_calculate_inverted_impulse_coaster(Ride* ride, RideRatingUpdat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_mini_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMiniRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 13; + ride.unreliability_factor = 13; set_unreliability_factor(ride); RatingTuple ratings; @@ -4280,20 +4361,20 @@ void ride_ratings_calculate_mini_roller_coaster(Ride* ride, RideRatingUpdateStat ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_mine_ride(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateMineRide(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -4316,20 +4397,20 @@ void ride_ratings_calculate_mine_ride(Ride* ride, RideRatingUpdateState& state) ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_lim_launched_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateLimLaunchedRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 25; + ride.unreliability_factor = 25; set_unreliability_factor(ride); RatingTuple ratings; @@ -4347,12 +4428,12 @@ void ride_ratings_calculate_lim_launched_roller_coaster(Ride* ride, RideRatingUp ride_ratings_apply_proximity(state, &ratings, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 10, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, 10, 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -4362,20 +4443,20 @@ void ride_ratings_calculate_lim_launched_roller_coaster(Ride* ride, RideRatingUp ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_classic_mini_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateClassicMiniRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 13; + ride.unreliability_factor = 13; set_unreliability_factor(ride); RatingTuple ratings; @@ -4400,20 +4481,20 @@ void ride_ratings_calculate_classic_mini_roller_coaster(Ride* ride, RideRatingUp ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_hybrid_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateHybridCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -4431,14 +4512,14 @@ void ride_ratings_calculate_hybrid_coaster(Ride* ride, RideRatingUpdateState& st ride_ratings_apply_proximity(state, &ratings, 22367); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 14, 2, 2, 2); } ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -4447,18 +4528,18 @@ void ride_ratings_calculate_hybrid_coaster(Ride* ride, RideRatingUpdateState& st ride_ratings_apply_excessive_lateral_g_penalty(&ratings, ride, 24576, 35746, 49648); ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.ratings = ratings; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_single_rail_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateSingleRailRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 16; + ride.unreliability_factor = 16; set_unreliability_factor(ride); RatingTuple ratings; @@ -4476,12 +4557,12 @@ void ride_ratings_calculate_single_rail_roller_coaster(Ride* ride, RideRatingUpd ride_ratings_apply_proximity(state, &ratings, 22367); ride_ratings_apply_scenery(&ratings, ride, 6693); - if (ride->inversions == 0) + if (ride.inversions == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 14, 2, 2, 2); // Done ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); // Done - if (ride->inversions == 0) + if (ride.inversions == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); // Done ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); // Done @@ -4491,20 +4572,20 @@ void ride_ratings_calculate_single_rail_roller_coaster(Ride* ride, RideRatingUpd ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_alpine_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateAlpineCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 7; + ride.unreliability_factor = 7; set_unreliability_factor(ride); RatingTuple ratings; @@ -4525,20 +4606,20 @@ void ride_ratings_calculate_alpine_coaster(Ride* ride, RideRatingUpdateState& st ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } -void ride_ratings_calculate_classic_wooden_roller_coaster(Ride* ride, RideRatingUpdateState& state) +void RideRatingsCalculateClassicWoodenRollerCoaster(Ride& ride, RideRatingUpdateState& state) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - ride->unreliability_factor = 19; + ride.unreliability_factor = 19; set_unreliability_factor(ride); RatingTuple ratings; @@ -4565,19 +4646,19 @@ void ride_ratings_calculate_classic_wooden_roller_coaster(Ride* ride, RideRating ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - ride->ratings = ratings; + ride.ratings = ratings; - ride->upkeep_cost = ride_compute_upkeep(state, ride); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeep_cost = ride_compute_upkeep(state, ride); + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride->sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; + ride.sheltered_eighths = get_num_of_sheltered_eighths(ride).TotalShelteredEighths; } #pragma endregion #pragma region Ride rating calculation function table -ride_ratings_calculation ride_ratings_get_calculate_func(ride_type_t rideType) +ride_ratings_calculation RideRatingsGetCalculateFunc(ride_type_t rideType) { return GetRideTypeDescriptor(rideType).RatingsCalculationFunction; } diff --git a/src/openrct2/ride/RideRatings.h b/src/openrct2/ride/RideRatings.h index 930f162711..3ed0481744 100644 --- a/src/openrct2/ride/RideRatings.h +++ b/src/openrct2/ride/RideRatings.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -54,100 +54,105 @@ struct RideRatingUpdateState uint16_t StationFlags; }; -extern RideRatingUpdateState gRideRatingUpdateState; +static constexpr size_t RideRatingMaxUpdateStates = 4; -void ride_ratings_update_ride(const Ride& ride); -void ride_ratings_update_all(); +using RideRatingUpdateStates = std::array; -using ride_ratings_calculation = void (*)(Ride* ride, RideRatingUpdateState& state); -ride_ratings_calculation ride_ratings_get_calculate_func(ride_type_t rideType); +RideRatingUpdateStates& RideRatingGetUpdateStates(); +void RideRatingResetUpdateStates(); -void ride_ratings_calculate_spiral_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_stand_up_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_suspended_swinging_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_inverted_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_junior_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_miniature_railway(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_monorail(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_mini_suspended_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_boat_hire(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_wooden_wild_mouse(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_steeplechase(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_car_ride(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_launched_freefall(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_bobsleigh_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_observation_tower(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_looping_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_dinghy_slide(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_mine_train_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_chairlift(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_corkscrew_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_maze(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_spiral_slide(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_go_karts(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_log_flume(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_river_rapids(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_dodgems(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_swinging_ship(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_inverter_ship(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_food_stall(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_shop(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_merry_go_round(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_information_kiosk(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_toilets(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_ferris_wheel(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_motion_simulator(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_3d_cinema(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_top_spin(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_space_rings(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_reverse_freefall_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_lift(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_vertical_drop_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_cash_machine(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_twist(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_haunted_house(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_first_aid(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_circus(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_ghost_train(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_twister_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_wooden_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_side_friction_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_wild_mouse(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_multi_dimension_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_flying_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_virginia_reel(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_splash_boats(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_mini_helicopters(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_lay_down_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_suspended_monorail(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_reverser_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_heartline_twister_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_mini_golf(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_giga_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_roto_drop(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_flying_saucers(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_crooked_house(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_monorail_cycles(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_compact_inverted_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_water_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_air_powered_vertical_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_inverted_hairpin_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_magic_carpet(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_submarine_ride(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_river_rafts(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_enterprise(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_inverted_impulse_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_mini_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_mine_ride(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_lim_launched_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_classic_mini_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_hybrid_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_single_rail_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_alpine_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_classic_wooden_roller_coaster(Ride* ride, RideRatingUpdateState& state); -void ride_ratings_calculate_drink_stall(Ride* ride, RideRatingUpdateState& state); +void RideRatingsUpdateRide(const Ride& ride); +void RideRatingsUpdateAll(); + +using ride_ratings_calculation = void (*)(Ride& ride, RideRatingUpdateState& state); +ride_ratings_calculation RideRatingsGetCalculateFunc(ride_type_t rideType); + +void RideRatingsCalculateSpiralRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateStandUpRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSuspendedSwingingCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateInvertedRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateJuniorRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMiniatureRailway(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMonorail(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMiniSuspendedCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateBoatHire(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateWoodenWildMouse(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSteeplechase(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateCarRide(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateLaunchedFreefall(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateBobsleighCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateObservationTower(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateLoopingRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateDinghySlide(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMineTrainCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateChairlift(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateCorkscrewRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMaze(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSpiralSlide(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateGoKarts(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateLogFlume(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateRiverRapids(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateDodgems(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSwingingShip(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateInverterShip(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateFoodStall(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateShop(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMerryGoRound(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateInformationKiosk(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateToilets(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateFerrisWheel(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMotionSimulator(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculate3dCinema(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateTopSpin(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSpaceRings(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateReverseFreefallCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateLift(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateVerticalDropRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateCashMachine(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateTwist(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateHauntedHouse(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateFirstAid(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateCircus(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateGhostTrain(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateTwisterRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateWoodenRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSideFrictionRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateWildMouse(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMultiDimensionRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateFlyingRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateVirginiaReel(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSplashBoats(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMiniHelicopters(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateLayDownRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSuspendedMonorail(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateReverserRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateHeartlineTwisterCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMiniGolf(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateGigaCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateRotoDrop(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateFlyingSaucers(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateCrookedHouse(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMonorailCycles(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateCompactInvertedCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateWaterCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateAirPoweredVerticalCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateInvertedHairpinCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMagicCarpet(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSubmarineRide(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateRiverRafts(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateEnterprise(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateInvertedImpulseCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMiniRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateMineRide(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateLimLaunchedRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateClassicMiniRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateHybridCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateSingleRailRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateAlpineCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateClassicWoodenRollerCoaster(Ride& ride, RideRatingUpdateState& state); +void RideRatingsCalculateDrinkStall(Ride& ride, RideRatingUpdateState& state); // Special Track Element Adjustment functions for RTDs -void SpecialTrackElementRatingsAjustment_Default(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); -void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); -void SpecialTrackElementRatingsAjustment_LogFlume(const Ride* ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); +void SpecialTrackElementRatingsAjustment_Default(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); +void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); +void SpecialTrackElementRatingsAjustment_LogFlume(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); diff --git a/src/openrct2/ride/RideTypes.h b/src/openrct2/ride/RideTypes.h index 692e48d625..3a276be547 100644 --- a/src/openrct2/ride/RideTypes.h +++ b/src/openrct2/ride/RideTypes.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,7 +10,7 @@ #pragma once #include "../Identifiers.h" -#include "../object/Object.h" +#include "../object/ObjectTypes.h" #include #include diff --git a/src/openrct2/ride/ShopItem.cpp b/src/openrct2/ride/ShopItem.cpp index 0901968814..443f0b9461 100644 --- a/src/openrct2/ride/ShopItem.cpp +++ b/src/openrct2/ride/ShopItem.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -115,7 +115,7 @@ uint64_t ShopItemsGetAllContainers() return AllContainerFlags; } -money32 shop_item_get_common_price(Ride* forRide, const ShopItem shopItem) +money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem) { for (const auto& ride : GetRideManager()) { @@ -141,10 +141,10 @@ money32 shop_item_get_common_price(Ride* forRide, const ShopItem shopItem) } } - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; } -bool shop_item_has_common_price(const ShopItem shopItem) +bool ShopItemHasCommonPrice(const ShopItem shopItem) { return (gSamePriceThroughoutPark & EnumToFlag(shopItem)) != 0; } diff --git a/src/openrct2/ride/ShopItem.h b/src/openrct2/ride/ShopItem.h index 4f3a9340e2..77ff1ce3c5 100644 --- a/src/openrct2/ride/ShopItem.h +++ b/src/openrct2/ride/ShopItem.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -88,11 +88,11 @@ struct ShopItemStrings struct ShopItemDescriptor { - money16 Cost; - money16 BaseValue; - money16 HotValue; - money16 ColdValue; - money8 DefaultPrice; + money64 Cost; + money64 BaseValue; + money64 HotValue; + money64 ColdValue; + money64 DefaultPrice; uint32_t Image; ShopItemStrings Naming; uint16_t Flags; @@ -130,7 +130,7 @@ enum extern uint64_t gSamePriceThroughoutPark; -money32 shop_item_get_common_price(Ride* forRide, const ShopItem shopItem); -bool shop_item_has_common_price(const ShopItem shopItem); +money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem); +bool ShopItemHasCommonPrice(const ShopItem shopItem); const ShopItemDescriptor& GetShopItemDescriptor(ShopItem item); diff --git a/src/openrct2/ride/Station.cpp b/src/openrct2/ride/Station.cpp index db893963f2..6117d380fd 100644 --- a/src/openrct2/ride/Station.cpp +++ b/src/openrct2/ride/Station.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,36 +17,36 @@ #include "Track.h" #include "Vehicle.h" -static void ride_update_station_blocksection(Ride* ride, StationIndex stationIndex); -static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex); -static void ride_update_station_normal(Ride* ride, StationIndex stationIndex); -static void ride_update_station_race(Ride* ride, StationIndex stationIndex); -static void ride_race_init_vehicle_speeds(Ride* ride); -static void ride_invalidate_station_start(Ride* ride, StationIndex stationIndex, bool greenLight); +static void RideUpdateStationBlockSection(Ride& ride, StationIndex stationIndex); +static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex); +static void RideUpdateStationNormal(Ride& ride, StationIndex stationIndex); +static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex); +static void RideRaceInitVehicleSpeeds(const Ride& ride); +static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bool greenLight); /** * * rct2: 0x006ABFFB */ -void ride_update_station(Ride* ride, StationIndex stationIndex) +void RideUpdateStation(Ride& ride, StationIndex stationIndex) { - if (ride->GetStation(stationIndex).Start.IsNull()) + if (ride.GetStation(stationIndex).Start.IsNull()) return; - switch (ride->mode) + switch (ride.mode) { case RideMode::Race: - ride_update_station_race(ride, stationIndex); + RideUpdateStationRace(ride, stationIndex); break; case RideMode::Dodgems: - ride_update_station_dodgems(ride, stationIndex); + RideUpdateStationDodgems(ride, stationIndex); break; case RideMode::ContinuousCircuitBlockSectioned: case RideMode::PoweredLaunchBlockSectioned: - ride_update_station_blocksection(ride, stationIndex); + RideUpdateStationBlockSection(ride, stationIndex); break; default: - ride_update_station_normal(ride, stationIndex); + RideUpdateStationNormal(ride, stationIndex); break; } } @@ -55,29 +55,29 @@ void ride_update_station(Ride* ride, StationIndex stationIndex) * * rct2: 0x006AC0A1 */ -static void ride_update_station_blocksection(Ride* ride, StationIndex stationIndex) +static void RideUpdateStationBlockSection(Ride& ride, StationIndex stationIndex) { - TileElement* tileElement = ride_get_station_start_track_element(ride, stationIndex); - auto& station = ride->GetStation(stationIndex); + TileElement* tileElement = RideGetStationStartTrackElement(ride, stationIndex); + auto& station = ride.GetStation(stationIndex); - if ((ride->status == RideStatus::Closed && ride->num_riders == 0) - || (tileElement != nullptr && tileElement->AsTrack()->BlockBrakeClosed())) + if ((ride.status == RideStatus::Closed && ride.num_riders == 0) + || (tileElement != nullptr && tileElement->AsTrack()->IsBrakeClosed())) { station.Depart &= ~STATION_DEPART_FLAG; if ((station.Depart & STATION_DEPART_FLAG) || (tileElement != nullptr && tileElement->AsTrack()->HasGreenLight())) - ride_invalidate_station_start(ride, stationIndex, false); + RideInvalidateStationStart(ride, stationIndex, false); } else { if (!(station.Depart & STATION_DEPART_FLAG)) { station.Depart |= STATION_DEPART_FLAG; - ride_invalidate_station_start(ride, stationIndex, true); + RideInvalidateStationStart(ride, stationIndex, true); } else if (tileElement != nullptr && tileElement->AsTrack()->HasGreenLight()) { - ride_invalidate_station_start(ride, stationIndex, true); + RideInvalidateStationStart(ride, stationIndex, true); } } } @@ -86,25 +86,25 @@ static void ride_update_station_blocksection(Ride* ride, StationIndex stationInd * * rct2: 0x006AC12B */ -static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex) +static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex) { - auto& station = ride->GetStation(stationIndex); + auto& station = ride.GetStation(stationIndex); // Change of station depart flag should really call invalidate_station_start // but since dodgems do not have station lights there is no point. - if (ride->status == RideStatus::Closed || (ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) + if (ride.status == RideStatus::Closed || (ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) { station.Depart &= ~STATION_DEPART_FLAG; return; } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { - int32_t dx = ride->time_limit * 32; + int32_t dx = ride.time_limit * 32; int32_t dh = (dx >> 8) & 0xFF; - for (size_t i = 0; i < ride->NumTrains; i++) + for (size_t i = 0; i < ride.NumTrains; i++) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) continue; @@ -112,7 +112,7 @@ static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex) continue; // End match - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; station.Depart &= ~STATION_DEPART_FLAG; return; } @@ -123,9 +123,9 @@ static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex) else { // Check if all vehicles are ready to go - for (size_t i = 0; i < ride->NumTrains; i++) + for (size_t i = 0; i < ride.NumTrains; i++) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) continue; @@ -137,9 +137,9 @@ static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex) } // Begin the match - ride->lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; station.Depart |= STATION_DEPART_FLAG; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } @@ -147,25 +147,25 @@ static void ride_update_station_dodgems(Ride* ride, StationIndex stationIndex) * * rct2: 0x006AC02C */ -static void ride_update_station_normal(Ride* ride, StationIndex stationIndex) +static void RideUpdateStationNormal(Ride& ride, StationIndex stationIndex) { - auto& station = ride->GetStation(stationIndex); + auto& station = ride.GetStation(stationIndex); int32_t time = station.Depart & STATION_DEPART_MASK; - if ((ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) - || (ride->status == RideStatus::Closed && ride->num_riders == 0)) + if ((ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + || (ride.status == RideStatus::Closed && ride.num_riders == 0)) { if (time != 0 && time != 127 && !(gCurrentTicks & 7)) time--; station.Depart = time; - ride_invalidate_station_start(ride, stationIndex, false); + RideInvalidateStationStart(ride, stationIndex, false); } else { if (time == 0) { station.Depart |= STATION_DEPART_FLAG; - ride_invalidate_station_start(ride, stationIndex, true); + RideInvalidateStationStart(ride, stationIndex, true); } else { @@ -173,7 +173,7 @@ static void ride_update_station_normal(Ride* ride, StationIndex stationIndex) time--; station.Depart = time; - ride_invalidate_station_start(ride, stationIndex, false); + RideInvalidateStationStart(ride, stationIndex, false); } } } @@ -182,26 +182,26 @@ static void ride_update_station_normal(Ride* ride, StationIndex stationIndex) * * rct2: 0x006AC1DF */ -static void ride_update_station_race(Ride* ride, StationIndex stationIndex) +static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) { - auto& station = ride->GetStation(stationIndex); - if (ride->status == RideStatus::Closed || (ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) + auto& station = ride.GetStation(stationIndex); + if (ride.status == RideStatus::Closed || (ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) { if (station.Depart & STATION_DEPART_FLAG) { station.Depart &= ~STATION_DEPART_FLAG; - ride_invalidate_station_start(ride, stationIndex, false); + RideInvalidateStationStart(ride, stationIndex, false); } return; } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (ride.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { - int32_t numLaps = ride->NumLaps; + int32_t numLaps = ride.NumLaps; - for (size_t i = 0; i < ride->NumTrains; i++) + for (size_t i = 0; i < ride.NumTrains; i++) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) continue; @@ -213,17 +213,17 @@ static void ride_update_station_race(Ride* ride, StationIndex stationIndex) auto* peep = GetEntity(vehicle->peep[0]); if (peep != nullptr) { - ride->race_winner = peep->sprite_index; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.race_winner = peep->Id; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } // Race is over - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; if (station.Depart & STATION_DEPART_FLAG) { station.Depart &= ~STATION_DEPART_FLAG; - ride_invalidate_station_start(ride, stationIndex, false); + RideInvalidateStationStart(ride, stationIndex, false); } return; } @@ -235,9 +235,9 @@ static void ride_update_station_race(Ride* ride, StationIndex stationIndex) else { // Check if all vehicles are ready to go - for (size_t i = 0; i < ride->NumTrains; i++) + for (size_t i = 0; i < ride.NumTrains; i++) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) continue; @@ -246,21 +246,21 @@ static void ride_update_station_race(Ride* ride, StationIndex stationIndex) if (station.Depart & STATION_DEPART_FLAG) { station.Depart &= ~STATION_DEPART_FLAG; - ride_invalidate_station_start(ride, stationIndex, false); + RideInvalidateStationStart(ride, stationIndex, false); } return; } } // Begin the race - ride_race_init_vehicle_speeds(ride); - ride->lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + RideRaceInitVehicleSpeeds(ride); + ride.lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; if (!(station.Depart & STATION_DEPART_FLAG)) { station.Depart |= STATION_DEPART_FLAG; - ride_invalidate_station_start(ride, stationIndex, true); + RideInvalidateStationStart(ride, stationIndex, true); } - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } @@ -270,19 +270,19 @@ static void ride_update_station_race(Ride* ride, StationIndex stationIndex) * set the speed of the go kart type vehicle at the start to a random value or alter if peep name is an easter egg * @param ride (esi) */ -static void ride_race_init_vehicle_speeds(Ride* ride) +static void RideRaceInitVehicleSpeeds(const Ride& ride) { - for (size_t i = 0; i < ride->NumTrains; i++) + for (size_t i = 0; i < ride.NumTrains; i++) { - Vehicle* vehicle = GetEntity(ride->vehicles[i]); + Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) continue; - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_6); + vehicle->ClearFlag(VehicleFlags::CurrentlyColliding); - rct_ride_entry* rideEntry = vehicle->GetRideEntry(); + const auto* rideEntry = vehicle->GetRideEntry(); - vehicle->speed = (scenario_rand() & 15) - 8 + rideEntry->Cars[vehicle->vehicle_type].powered_max_speed; + vehicle->speed = (ScenarioRand() & 15) - 8 + rideEntry->Cars[vehicle->vehicle_type].powered_max_speed; if (vehicle->num_peeps != 0) { @@ -318,10 +318,10 @@ static void ride_race_init_vehicle_speeds(Ride* ride) * * rct2: 0x006AC2C7 */ -static void ride_invalidate_station_start(Ride* ride, StationIndex stationIndex, bool greenLight) +static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bool greenLight) { - auto startPos = ride->GetStation(stationIndex).Start; - TileElement* tileElement = ride_get_station_start_track_element(ride, stationIndex); + auto startPos = ride.GetStation(stationIndex).Start; + TileElement* tileElement = RideGetStationStartTrackElement(ride, stationIndex); // If no station track found return if (tileElement == nullptr) @@ -333,9 +333,9 @@ static void ride_invalidate_station_start(Ride* ride, StationIndex stationIndex, MapInvalidateTileZoom1({ startPos, tileElement->GetBaseZ(), tileElement->GetClearanceZ() }); } -TileElement* ride_get_station_start_track_element(const Ride* ride, StationIndex stationIndex) +TileElement* RideGetStationStartTrackElement(const Ride& ride, StationIndex stationIndex) { - auto stationStart = ride->GetStation(stationIndex).GetStart(); + auto stationStart = ride.GetStation(stationIndex).GetStart(); // Find the station track element TileElement* tileElement = MapGetFirstElementAt(stationStart); @@ -351,7 +351,7 @@ TileElement* ride_get_station_start_track_element(const Ride* ride, StationIndex return nullptr; } -TileElement* ride_get_station_exit_element(const CoordsXYZ& elementPos) +TileElement* RideGetStationExitElement(const CoordsXYZ& elementPos) { // Find the station track element TileElement* tileElement = MapGetFirstElementAt(elementPos); @@ -368,37 +368,37 @@ TileElement* ride_get_station_exit_element(const CoordsXYZ& elementPos) return nullptr; } -StationIndex ride_get_first_valid_station_exit(Ride* ride) +StationIndex RideGetFirstValidStationExit(const Ride& ride) { - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { if (!station.Exit.IsNull()) { - return ride->GetStationIndex(&station); + return ride.GetStationIndex(&station); } } return StationIndex::GetNull(); } -StationIndex ride_get_first_valid_station_start(const Ride* ride) +StationIndex RideGetFirstValidStationStart(const Ride& ride) { - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { if (!station.Start.IsNull()) { - return ride->GetStationIndex(&station); + return ride.GetStationIndex(&station); } } return StationIndex::GetNull(); } -StationIndex ride_get_first_empty_station_start(const Ride* ride) +StationIndex RideGetFirstEmptyStationStart(const Ride& ride) { - for (const auto& station : ride->GetStations()) + for (const auto& station : ride.GetStations()) { if (station.Start.IsNull()) { - return ride->GetStationIndex(&station); + return ride.GetStationIndex(&station); } } return StationIndex::GetNull(); diff --git a/src/openrct2/ride/Station.h b/src/openrct2/ride/Station.h index 64ab850d16..f412af76b2 100644 --- a/src/openrct2/ride/Station.h +++ b/src/openrct2/ride/Station.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ struct Ride; struct TileCoordsXYZD; -void ride_update_station(Ride* ride, StationIndex stationIndex); -StationIndex ride_get_first_valid_station_exit(Ride* ride); -StationIndex ride_get_first_valid_station_start(const Ride* ride); -StationIndex ride_get_first_empty_station_start(const Ride* ride); +void RideUpdateStation(Ride& ride, StationIndex stationIndex); +StationIndex RideGetFirstValidStationExit(const Ride& ride); +StationIndex RideGetFirstValidStationStart(const Ride& ride); +StationIndex RideGetFirstEmptyStationStart(const Ride& ride); diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 2f2bcb1d05..ebcf61b5b7 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -51,7 +51,7 @@ PitchAndRoll TrackPitchAndRollEnd(track_type_t trackType) /** * Helper method to determine if a connects to b by its bank and angle, not location. */ -int32_t track_is_connected_by_shape(TileElement* a, TileElement* b) +int32_t TrackIsConnectedByShape(TileElement* a, TileElement* b) { int32_t trackType, aBank, aAngle, bBank, bAngle; @@ -59,13 +59,13 @@ int32_t track_is_connected_by_shape(TileElement* a, TileElement* b) const auto* ted = &GetTrackElementDescriptor(trackType); aBank = ted->Definition.bank_end; aAngle = ted->Definition.vangle_end; - aBank = track_get_actual_bank(a, aBank); + aBank = TrackGetActualBank(a, aBank); trackType = b->AsTrack()->GetTrackType(); ted = &GetTrackElementDescriptor(trackType); bBank = ted->Definition.bank_start; bAngle = ted->Definition.vangle_start; - bBank = track_get_actual_bank(b, bBank); + bBank = TrackGetActualBank(b, bBank); return aBank == bBank && aAngle == bAngle; } @@ -93,15 +93,15 @@ static TileElement* find_station_element(const CoordsXYZD& loc, RideId rideIndex return nullptr; } -static void ride_remove_station(Ride* ride, const CoordsXYZ& location) +static void ride_remove_station(Ride& ride, const CoordsXYZ& location) { - for (auto& station : ride->GetStations()) + for (auto& station : ride.GetStations()) { auto stationStart = station.GetStart(); if (stationStart == location) { station.Start.SetNull(); - ride->num_stations--; + ride.num_stations--; break; } } @@ -111,9 +111,9 @@ static void ride_remove_station(Ride* ride, const CoordsXYZ& location) * * rct2: 0x006C4D89 */ -ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, int32_t flags, bool fromTrackDesign) +ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32_t flags, bool fromTrackDesign) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return { false }; @@ -129,7 +129,7 @@ ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, in } if (flags & GAME_COMMAND_FLAG_APPLY) { - auto stationIndex = ride_get_first_empty_station_start(ride); + auto stationIndex = RideGetFirstEmptyStationStart(*ride); assert(!stationIndex.IsNull()); auto& station = ride->GetStation(stationIndex); @@ -158,7 +158,7 @@ ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, in { if (flags & GAME_COMMAND_FLAG_APPLY) { - ride_remove_station(ride, loc); + ride_remove_station(*ride, loc); } } @@ -180,7 +180,7 @@ ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, in { if (flags & GAME_COMMAND_FLAG_APPLY) { - ride_remove_station(ride, loc); + ride_remove_station(*ride, loc); } } @@ -217,10 +217,10 @@ ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, in track_type_t targetTrackType; if (stationFrontLoc == loc) { - auto stationIndex = ride_get_first_empty_station_start(ride); + auto stationIndex = RideGetFirstEmptyStationStart(*ride); if (stationIndex.IsNull()) { - log_verbose("No empty station starts, not updating metadata! This can happen with hacked rides."); + LOG_VERBOSE("No empty station starts, not updating metadata! This can happen with hacked rides."); } else { @@ -261,9 +261,9 @@ ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, in * * rct2: 0x006C494B */ -ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rideIndex, int32_t flags) +ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIndex, int32_t flags) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return { false }; @@ -271,7 +271,7 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid CoordsXYZD stationBackLoc = loc; CoordsXYZD stationFrontLoc = loc; int32_t stationLength = 0; - int32_t byte_F441D1 = -1; + int32_t ByteF441D1 = -1; if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION)) { @@ -280,7 +280,7 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid { if (flags & GAME_COMMAND_FLAG_APPLY) { - ride_remove_station(ride, loc); + ride_remove_station(*ride, loc); } } return { true }; @@ -296,12 +296,12 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid { if (flags & GAME_COMMAND_FLAG_APPLY) { - ride_remove_station(ride, currentLoc); + ride_remove_station(*ride, currentLoc); } } stationBackLoc = currentLoc; - byte_F441D1++; + ByteF441D1++; currentLoc -= CoordsDirectionDelta[currentLoc.direction]; } @@ -319,7 +319,7 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid { if (flags & GAME_COMMAND_FLAG_APPLY) { - ride_remove_station(ride, currentLoc); + ride_remove_station(*ride, currentLoc); } } stationFrontLoc = currentLoc; @@ -352,10 +352,10 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid track_type_t targetTrackType; if ((currentLoc == stationFrontLoc) || (currentLoc + CoordsDirectionDelta[currentLoc.direction] == removeLoc)) { - auto stationIndex = ride_get_first_empty_station_start(ride); + auto stationIndex = RideGetFirstEmptyStationStart(*ride); if (stationIndex.IsNull()) { - log_verbose("No empty station starts, not updating metadata! This can happen with hacked rides."); + LOG_VERBOSE("No empty station starts, not updating metadata! This can happen with hacked rides."); } else { @@ -363,7 +363,7 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid station.Start = currentLoc; station.Height = currentLoc.z / COORDS_Z_STEP; station.Depart = 1; - station.Length = stationLength != 0 ? stationLength : byte_F441D1; + station.Length = stationLength != 0 ? stationLength : ByteF441D1; ride->num_stations++; } @@ -404,7 +404,7 @@ ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rid return { true }; } -void track_circuit_iterator_begin(track_circuit_iterator* it, CoordsXYE first) +void TrackCircuitIteratorBegin(TrackCircuitIterator* it, CoordsXYE first) { it->last = first; it->first = nullptr; @@ -412,13 +412,13 @@ void track_circuit_iterator_begin(track_circuit_iterator* it, CoordsXYE first) it->looped = false; } -bool track_circuit_iterator_previous(track_circuit_iterator* it) +bool TrackCircuitIteratorPrevious(TrackCircuitIterator* it) { - track_begin_end trackBeginEnd; + TrackBeginEnd trackBeginEnd; if (it->first == nullptr) { - if (!track_block_get_previous({ it->last.x, it->last.y, it->last.element }, &trackBeginEnd)) + if (!TrackBlockGetPrevious({ it->last.x, it->last.y, it->last.element }, &trackBeginEnd)) return false; it->current.x = trackBeginEnd.begin_x; @@ -440,7 +440,7 @@ bool track_circuit_iterator_previous(track_circuit_iterator* it) it->firstIteration = false; it->last = it->current; - if (track_block_get_previous({ it->last.x, it->last.y, it->last.element }, &trackBeginEnd)) + if (TrackBlockGetPrevious({ it->last.x, it->last.y, it->last.element }, &trackBeginEnd)) { it->current.x = trackBeginEnd.end_x; it->current.y = trackBeginEnd.end_y; @@ -453,11 +453,11 @@ bool track_circuit_iterator_previous(track_circuit_iterator* it) return false; } -bool track_circuit_iterator_next(track_circuit_iterator* it) +bool TrackCircuitIteratorNext(TrackCircuitIterator* it) { if (it->first == nullptr) { - if (!track_block_get_next(&it->last, &it->current, &it->currentZ, &it->currentDirection)) + if (!TrackBlockGetNext(&it->last, &it->current, &it->currentZ, &it->currentDirection)) return false; it->first = it->current.element; @@ -472,26 +472,26 @@ bool track_circuit_iterator_next(track_circuit_iterator* it) it->firstIteration = false; it->last = it->current; - return track_block_get_next(&it->last, &it->current, &it->currentZ, &it->currentDirection); + return TrackBlockGetNext(&it->last, &it->current, &it->currentZ, &it->currentDirection); } -bool track_circuit_iterators_match(const track_circuit_iterator* firstIt, const track_circuit_iterator* secondIt) +bool TrackCircuitIteratorsMatch(const TrackCircuitIterator* firstIt, const TrackCircuitIterator* secondIt) { return ( firstIt->currentZ == secondIt->currentZ && firstIt->currentDirection == secondIt->currentDirection && firstIt->current.x == secondIt->current.x && firstIt->current.y == secondIt->current.y); } -void track_get_back(CoordsXYE* input, CoordsXYE* output) +void TrackGetBack(const CoordsXYE& input, CoordsXYE* output) { CoordsXYE lastTrack; - track_begin_end currentTrack; + TrackBeginEnd currentTrack; bool result; - lastTrack = *input; + lastTrack = input; do { - result = track_block_get_previous(lastTrack, ¤tTrack); + result = TrackBlockGetPrevious(lastTrack, ¤tTrack); if (result) { lastTrack.x = currentTrack.begin_x; @@ -502,16 +502,16 @@ void track_get_back(CoordsXYE* input, CoordsXYE* output) *output = lastTrack; } -void track_get_front(CoordsXYE* input, CoordsXYE* output) +void TrackGetFront(const CoordsXYE& input, CoordsXYE* output) { CoordsXYE lastTrack, currentTrack; int32_t z, direction; bool result; - lastTrack = *input; + lastTrack = input; do { - result = track_block_get_next(&lastTrack, ¤tTrack, &z, &direction); + result = TrackBlockGetNext(&lastTrack, ¤tTrack, &z, &direction); if (result) { lastTrack = currentTrack; @@ -563,18 +563,18 @@ bool TrackElement::IsBlockStart() const return false; } -roll_type_t track_get_actual_bank(TileElement* tileElement, roll_type_t bank) +roll_type_t TrackGetActualBank(TileElement* tileElement, roll_type_t bank) { - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride != nullptr) { bool isInverted = tileElement->AsTrack()->IsInverted(); - return track_get_actual_bank_2(ride->type, isInverted, bank); + return TrackGetActualBank2(ride->type, isInverted, bank); } return bank; } -roll_type_t track_get_actual_bank_2(int32_t rideType, bool isInverted, roll_type_t bank) +roll_type_t TrackGetActualBank2(int32_t rideType, bool isInverted, roll_type_t bank) { if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)) { @@ -593,25 +593,25 @@ roll_type_t track_get_actual_bank_2(int32_t rideType, bool isInverted, roll_type return bank; } -roll_type_t track_get_actual_bank_3(bool useInvertedSprites, TileElement* tileElement) +roll_type_t TrackGetActualBank3(bool useInvertedSprites, TileElement* tileElement) { auto trackType = tileElement->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); auto bankStart = ted.Definition.bank_start; - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr) return bankStart; bool isInverted = useInvertedSprites ^ tileElement->AsTrack()->IsInverted(); - return track_get_actual_bank_2(ride->type, isInverted, bankStart); + return TrackGetActualBank2(ride->type, isInverted, bankStart); } bool TrackElement::IsStation() const { - return track_type_is_station(GetTrackType()); + return TrackTypeIsStation(GetTrackType()); } -bool track_type_is_station(track_type_t trackType) +bool TrackTypeIsStation(track_type_t trackType) { switch (trackType) { @@ -624,7 +624,7 @@ bool track_type_is_station(track_type_t trackType) } } -bool track_element_is_covered(track_type_t trackElementType) +bool TrackElementIsCovered(track_type_t trackElementType) { switch (trackElementType) { @@ -658,6 +658,17 @@ bool TrackTypeHasSpeedSetting(track_type_t trackType) return trackType == TrackElemType::Brakes || trackType == TrackElemType::Booster; } +bool TrackTypeIsHelix(track_type_t trackType) +{ + if (trackType >= TrackElemType::LeftHalfBankedHelixUpSmall && trackType <= TrackElemType::RightHalfBankedHelixDownLarge) + return true; + + if (trackType >= TrackElemType::LeftQuarterBankedHelixLargeUp && trackType <= TrackElemType::RightQuarterHelixLargeDown) + return true; + + return false; +} + std::optional GetTrackSegmentOrigin(const CoordsXYE& posEl) { auto trackEl = posEl.element->AsTrack(); @@ -682,7 +693,7 @@ std::optional GetTrackSegmentOrigin(const CoordsXYE& posEl) uint8_t TrackElement::GetSeatRotation() const { - const auto* ride = get_ride(GetRideIndex()); + const auto* ride = GetRide(GetRideIndex()); if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_LANDSCAPE_DOORS)) return DEFAULT_SEAT_ROTATION; @@ -852,20 +863,20 @@ void TrackElement::SetInverted(bool inverted) } } -bool TrackElement::BlockBrakeClosed() const +bool TrackElement::IsBrakeClosed() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED) != 0; + return (Flags2 & TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED) != 0; } -void TrackElement::SetBlockBrakeClosed(bool isClosed) +void TrackElement::SetBrakeClosed(bool isClosed) { if (isClosed) { - Flags2 |= TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED; + Flags2 |= TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED; } else { - Flags2 &= ~TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED; + Flags2 &= ~TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED; } } diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index c8fd0f4e6b..9fec34a7db 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ using pitch_type_t = uint8_t; struct ResultWithMessage; -struct rct_trackdefinition +struct TrackDefinition { track_type_t type; pitch_type_t vangle_end; @@ -51,7 +51,7 @@ constexpr bool operator!=(const PitchAndRoll& vb1, const PitchAndRoll& vb2) } /* size 0x0A */ -struct rct_preview_track +struct PreviewTrack { uint8_t index; // 0x00 int16_t x; // 0x01 @@ -63,7 +63,7 @@ struct rct_preview_track }; /* size 0x0A */ -struct rct_track_coordinates +struct TrackCoordinates { int8_t rotation_begin; // 0x00 int8_t rotation_end; // 0x01 @@ -94,7 +94,7 @@ enum TRACK_ELEMENT_FLAGS2_CABLE_LIFT = 1 << 2, TRACK_ELEMENT_FLAGS2_HIGHLIGHT = 1 << 3, TRACK_ELEMENT_FLAGS2_HAS_GREEN_LIGHT = 1 << 4, - TRACK_ELEMENT_FLAGS2_BLOCK_BRAKE_CLOSED = 1 << 5, + TRACK_ELEMENT_FLAGS2_BRAKE_CLOSED = 1 << 5, TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE = 1 << 6, }; @@ -598,7 +598,7 @@ enum GC_SET_MAZE_TRACK_FILL = 2, }; -struct track_circuit_iterator +struct TrackCircuitIterator { CoordsXYE last; CoordsXYE current; @@ -612,27 +612,28 @@ struct track_circuit_iterator PitchAndRoll TrackPitchAndRollStart(track_type_t trackType); PitchAndRoll TrackPitchAndRollEnd(track_type_t trackType); -int32_t track_is_connected_by_shape(TileElement* a, TileElement* b); +int32_t TrackIsConnectedByShape(TileElement* a, TileElement* b); -void track_circuit_iterator_begin(track_circuit_iterator* it, CoordsXYE first); -bool track_circuit_iterator_previous(track_circuit_iterator* it); -bool track_circuit_iterator_next(track_circuit_iterator* it); -bool track_circuit_iterators_match(const track_circuit_iterator* firstIt, const track_circuit_iterator* secondIt); +void TrackCircuitIteratorBegin(TrackCircuitIterator* it, CoordsXYE first); +bool TrackCircuitIteratorPrevious(TrackCircuitIterator* it); +bool TrackCircuitIteratorNext(TrackCircuitIterator* it); +bool TrackCircuitIteratorsMatch(const TrackCircuitIterator* firstIt, const TrackCircuitIterator* secondIt); -void track_get_back(CoordsXYE* input, CoordsXYE* output); -void track_get_front(CoordsXYE* input, CoordsXYE* output); +void TrackGetBack(const CoordsXYE& input, CoordsXYE* output); +void TrackGetFront(const CoordsXYE& input, CoordsXYE* output); -bool track_element_is_covered(track_type_t trackElementType); -bool track_type_is_station(track_type_t trackType); +bool TrackElementIsCovered(track_type_t trackElementType); +bool TrackTypeIsStation(track_type_t trackType); -roll_type_t track_get_actual_bank(TileElement* tileElement, roll_type_t bank); -roll_type_t track_get_actual_bank_2(int32_t rideType, bool isInverted, roll_type_t bank); -roll_type_t track_get_actual_bank_3(bool useInvertedSprites, TileElement* tileElement); +roll_type_t TrackGetActualBank(TileElement* tileElement, roll_type_t bank); +roll_type_t TrackGetActualBank2(int32_t rideType, bool isInverted, roll_type_t bank); +roll_type_t TrackGetActualBank3(bool useInvertedSprites, TileElement* tileElement); -ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, int32_t flags, bool fromTrackDesign); -ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rideIndex, int32_t flags); +ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32_t flags, bool fromTrackDesign); +ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIndex, int32_t flags); bool TrackTypeHasSpeedSetting(track_type_t trackType); +bool TrackTypeIsHelix(track_type_t trackType); std::optional GetTrackSegmentOrigin(const CoordsXYE& posEl); /** diff --git a/src/openrct2/ride/TrackData.cpp b/src/openrct2/ride/TrackData.cpp index bc3308966c..75bc46b980 100644 --- a/src/openrct2/ride/TrackData.cpp +++ b/src/openrct2/ride/TrackData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,7 +17,7 @@ #include // clang-format off -static constexpr rct_track_coordinates TrackCoordinates[TrackElemType::Count] = { +static constexpr TrackCoordinates _trackCoordinates[TrackElemType::Count] = { { 0, 0, 0, 0, 0, 0 }, // ELEM_FLAT { 0, 0, 0, 0, 0, 0 }, // ELEM_END_STATION { 0, 0, 0, 0, 0, 0 }, // ELEM_BEGIN_STATION @@ -613,87 +613,87 @@ static constexpr uint8_t TrackSequenceProperties[][MaxSequencesPerPiece] = { #define TRACK_BLOCK_END { 255, 255, 255, 255, 255, {255, 255}, 255 } -static constexpr rct_preview_track TrackBlocks000[] = { +static constexpr PreviewTrack TrackBlocks000[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks001[] = { +static constexpr const PreviewTrack TrackBlocks001[] = { { 0, 0, 0, 0, 0,{ 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks002[] = { +static constexpr const PreviewTrack TrackBlocks002[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks003[] = { +static constexpr const PreviewTrack TrackBlocks003[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks004[] = { +static constexpr const PreviewTrack TrackBlocks004[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks005[] = { +static constexpr const PreviewTrack TrackBlocks005[] = { { 0, 0, 0, 0, 64, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks006[] = { +static constexpr const PreviewTrack TrackBlocks006[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks007[] = { +static constexpr const PreviewTrack TrackBlocks007[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks008[] = { +static constexpr const PreviewTrack TrackBlocks008[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks009[] = { +static constexpr const PreviewTrack TrackBlocks009[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks010[] = { +static constexpr const PreviewTrack TrackBlocks010[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks011[] = { +static constexpr const PreviewTrack TrackBlocks011[] = { { 0, 0, 0, 0, 64, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks012[] = { +static constexpr const PreviewTrack TrackBlocks012[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks013[] = { +static constexpr const PreviewTrack TrackBlocks013[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks014[] = { +static constexpr const PreviewTrack TrackBlocks014[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks015[] = { +static constexpr const PreviewTrack TrackBlocks015[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks016[] = { +static constexpr const PreviewTrack TrackBlocks016[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, @@ -704,7 +704,7 @@ static constexpr const rct_preview_track TrackBlocks016[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks017[] = { +static constexpr const PreviewTrack TrackBlocks017[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, @@ -715,27 +715,27 @@ static constexpr const rct_preview_track TrackBlocks017[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks018[] = { +static constexpr const PreviewTrack TrackBlocks018[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks019[] = { +static constexpr const PreviewTrack TrackBlocks019[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks020[] = { +static constexpr const PreviewTrack TrackBlocks020[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks021[] = { +static constexpr const PreviewTrack TrackBlocks021[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks022[] = { +static constexpr const PreviewTrack TrackBlocks022[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, @@ -746,7 +746,7 @@ static constexpr const rct_preview_track TrackBlocks022[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks023[] = { +static constexpr const PreviewTrack TrackBlocks023[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, @@ -757,57 +757,57 @@ static constexpr const rct_preview_track TrackBlocks023[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks024[] = { +static constexpr const PreviewTrack TrackBlocks024[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks025[] = { +static constexpr const PreviewTrack TrackBlocks025[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks026[] = { +static constexpr const PreviewTrack TrackBlocks026[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks027[] = { +static constexpr const PreviewTrack TrackBlocks027[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks028[] = { +static constexpr const PreviewTrack TrackBlocks028[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks029[] = { +static constexpr const PreviewTrack TrackBlocks029[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks030[] = { +static constexpr const PreviewTrack TrackBlocks030[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks031[] = { +static constexpr const PreviewTrack TrackBlocks031[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks032[] = { +static constexpr const PreviewTrack TrackBlocks032[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks033[] = { +static constexpr const PreviewTrack TrackBlocks033[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks034[] = { +static constexpr const PreviewTrack TrackBlocks034[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, { 1, 0, -32, 16, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 16, { 0b0111, 0b0100 }, 0 }, @@ -818,7 +818,7 @@ static constexpr const rct_preview_track TrackBlocks034[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks035[] = { +static constexpr const PreviewTrack TrackBlocks035[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, { 1, 0, 32, 16, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 16, { 0b1011, 0b1000 }, 0 }, @@ -829,7 +829,7 @@ static constexpr const rct_preview_track TrackBlocks035[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks036[] = { +static constexpr const PreviewTrack TrackBlocks036[] = { { 0, 0, 0, 48, 16, { 0b1111, 0b0011 }, 0 }, { 1, 0, -32, 48, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 32, 16, { 0b0111, 0b0001 }, 0 }, @@ -840,7 +840,7 @@ static constexpr const rct_preview_track TrackBlocks036[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks037[] = { +static constexpr const PreviewTrack TrackBlocks037[] = { { 0, 0, 0, 48, 16, { 0b1111, 0b0011 }, 0 }, { 1, 0, 32, 48, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 32, 16, { 0b1011, 0b0010 }, 0 }, @@ -851,7 +851,7 @@ static constexpr const rct_preview_track TrackBlocks037[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks038[] = { +static constexpr const PreviewTrack TrackBlocks038[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, { 2, -32, -32, 0, 0, { 0b1101, 0 }, 0 }, @@ -859,7 +859,7 @@ static constexpr const rct_preview_track TrackBlocks038[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks039[] = { +static constexpr const PreviewTrack TrackBlocks039[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, { 2, -32, 32, 0, 0, { 0b1110, 0 }, 0 }, @@ -867,7 +867,7 @@ static constexpr const rct_preview_track TrackBlocks039[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks040[] = { +static constexpr const PreviewTrack TrackBlocks040[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 16, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 96, { 0b0010, 0 }, 0 }, @@ -881,7 +881,7 @@ static constexpr const rct_preview_track TrackBlocks040[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks041[] = { +static constexpr const PreviewTrack TrackBlocks041[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 16, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 96, { 0b0001, 0 }, 0 }, @@ -895,7 +895,7 @@ static constexpr const rct_preview_track TrackBlocks041[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks042[] = { +static constexpr const PreviewTrack TrackBlocks042[] = { { 0, 0, 0, 0, 0, { 0b0111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0010, 0 }, 0 }, @@ -903,7 +903,7 @@ static constexpr const rct_preview_track TrackBlocks042[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks043[] = { +static constexpr const PreviewTrack TrackBlocks043[] = { { 0, 0, 0, 0, 0, { 0b1011, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, 0 }, @@ -911,7 +911,7 @@ static constexpr const rct_preview_track TrackBlocks043[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks044[] = { +static constexpr const PreviewTrack TrackBlocks044[] = { { 0, 0, 0, 0, 0, { 0b0111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0010, 0 }, 0 }, @@ -919,7 +919,7 @@ static constexpr const rct_preview_track TrackBlocks044[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks045[] = { +static constexpr const PreviewTrack TrackBlocks045[] = { { 0, 0, 0, 0, 0, { 0b1011, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, 0 }, @@ -927,7 +927,7 @@ static constexpr const rct_preview_track TrackBlocks045[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks046[] = { +static constexpr const PreviewTrack TrackBlocks046[] = { { 0, 0, 0, 0, 16, { 0b0111, 0b0100 }, 0 }, { 1, 0, -32, 16, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0010, 0 }, 0 }, @@ -935,7 +935,7 @@ static constexpr const rct_preview_track TrackBlocks046[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks047[] = { +static constexpr const PreviewTrack TrackBlocks047[] = { { 0, 0, 0, 0, 16, { 0b1011, 0b1000 }, 0 }, { 1, 0, 32, 16, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0001, 0 }, 0 }, @@ -943,7 +943,7 @@ static constexpr const rct_preview_track TrackBlocks047[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks048[] = { +static constexpr const PreviewTrack TrackBlocks048[] = { { 0, 0, 0, 16, 16,{ 0b0111, 0b0011 }, 0 }, { 1, 0, -32, 16, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0010, 0 }, 0 }, @@ -951,7 +951,7 @@ static constexpr const rct_preview_track TrackBlocks048[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks049[] = { +static constexpr const PreviewTrack TrackBlocks049[] = { { 0, 0, 0, 16, 16, { 0b1011, 0b0011 }, 0 }, { 1, 0, 32, 16, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0001, 0 }, 0 }, @@ -959,45 +959,45 @@ static constexpr const rct_preview_track TrackBlocks049[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks050[] = { +static constexpr const PreviewTrack TrackBlocks050[] = { { 0, 0, 0, 0, 0, { 0b0111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks051[] = { +static constexpr const PreviewTrack TrackBlocks051[] = { { 0, 0, 0, 0, 0, { 0b1011, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks052[] = { +static constexpr const PreviewTrack TrackBlocks052[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 16, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks053[] = { +static constexpr const PreviewTrack TrackBlocks053[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 16, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks054[] = { +static constexpr const PreviewTrack TrackBlocks054[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, -16, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, -16, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks055[] = { +static constexpr const PreviewTrack TrackBlocks055[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, -16, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, -16, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks056[] = { +static constexpr const PreviewTrack TrackBlocks056[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 16, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 96,{ 0b0011, 0 }, 0 }, @@ -1005,7 +1005,7 @@ static constexpr const rct_preview_track TrackBlocks056[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks057[] = { +static constexpr const PreviewTrack TrackBlocks057[] = { { 0, 0, 0, -32, 32, { 0b1111, 0 }, 0 }, { 1, -32, 0, -120, 96,{ 0b0011, 0 }, 0 }, { 2, 0, 0, -136, 16, { 0b1111, 0b1100 }, 0 }, @@ -1013,55 +1013,55 @@ static constexpr const rct_preview_track TrackBlocks057[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks058[] = { +static constexpr const PreviewTrack TrackBlocks058[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 24, 32, { 0b0111, 0 }, 0 }, { 2, -32, -32, 48, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks059[] = { +static constexpr const PreviewTrack TrackBlocks059[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 24, 32, { 0b1011, 0 }, 0 }, { 2, -32, 32, 48, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks060[] = { +static constexpr const PreviewTrack TrackBlocks060[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -56, 32, { 0b0111, 0 }, 0 }, { 2, -32, -32, -80, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks061[] = { +static constexpr const PreviewTrack TrackBlocks061[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -56, 32, { 0b1011, 0 }, 0 }, { 2, -32, 32, -80, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks062[] = { +static constexpr const PreviewTrack TrackBlocks062[] = { { 0, 0, 0, 0, 24, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks063[] = { +static constexpr const PreviewTrack TrackBlocks063[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks064[] = { +static constexpr const PreviewTrack TrackBlocks064[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks065[] = { +static constexpr const PreviewTrack TrackBlocks065[] = { { 0, 0, 0, 0, 24, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks066[] = { +static constexpr const PreviewTrack TrackBlocks066[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, { 1, -32, -32, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -1074,78 +1074,78 @@ static constexpr const rct_preview_track TrackBlocks066[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks067[] = { +static constexpr const PreviewTrack TrackBlocks067[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 32, 0, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_1 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks068[] = { +static constexpr const PreviewTrack TrackBlocks068[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks069[] = { +static constexpr const PreviewTrack TrackBlocks069[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks070[] = { +static constexpr const PreviewTrack TrackBlocks070[] = { { 0, 0, 0, 0, 64, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks071[] = { +static constexpr const PreviewTrack TrackBlocks071[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks072[] = { +static constexpr const PreviewTrack TrackBlocks072[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks073[] = { +static constexpr const PreviewTrack TrackBlocks073[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks074[] = { +static constexpr const PreviewTrack TrackBlocks074[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks075[] = { +static constexpr const PreviewTrack TrackBlocks075[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks076[] = { +static constexpr const PreviewTrack TrackBlocks076[] = { { 0, 0, 0, 0, 64, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks077[] = { +static constexpr const PreviewTrack TrackBlocks077[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks078[] = { +static constexpr const PreviewTrack TrackBlocks078[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks079[] = { +static constexpr const PreviewTrack TrackBlocks079[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks080[] = { +static constexpr const PreviewTrack TrackBlocks080[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks081[] = { +static constexpr const PreviewTrack TrackBlocks081[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, @@ -1156,7 +1156,7 @@ static constexpr const rct_preview_track TrackBlocks081[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks082[] = { +static constexpr const PreviewTrack TrackBlocks082[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, @@ -1167,7 +1167,7 @@ static constexpr const rct_preview_track TrackBlocks082[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks083[] = { +static constexpr const PreviewTrack TrackBlocks083[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, { 2, -32, -32, 0, 0, { 0b1101, 0 }, 0 }, @@ -1175,7 +1175,7 @@ static constexpr const rct_preview_track TrackBlocks083[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks084[] = { +static constexpr const PreviewTrack TrackBlocks084[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, { 2, -32, 32, 0, 0, { 0b1110, 0 }, 0 }, @@ -1183,7 +1183,7 @@ static constexpr const rct_preview_track TrackBlocks084[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks085[] = { +static constexpr const PreviewTrack TrackBlocks085[] = { { 0, 0, 0, 0, 0, { 0b0111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0010, 0 }, 0 }, @@ -1191,7 +1191,7 @@ static constexpr const rct_preview_track TrackBlocks085[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks086[] = { +static constexpr const PreviewTrack TrackBlocks086[] = { { 0, 0, 0, 0, 0, { 0b1011, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, 0 }, @@ -1199,7 +1199,7 @@ static constexpr const rct_preview_track TrackBlocks086[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks087[] = { +static constexpr const PreviewTrack TrackBlocks087[] = { { 0, 0, 0, 0, 0, { 0b0111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 4, { 0b0010, 0 }, 0 }, @@ -1211,7 +1211,7 @@ static constexpr const rct_preview_track TrackBlocks087[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks088[] = { +static constexpr const PreviewTrack TrackBlocks088[] = { { 0, 0, 0, 0, 0, { 0b1011, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0b0000 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 4, { 0b0001, 0 }, 0 }, @@ -1223,7 +1223,7 @@ static constexpr const rct_preview_track TrackBlocks088[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks089[] = { +static constexpr const PreviewTrack TrackBlocks089[] = { { 0, 0, 0, 8, 4, { 0b0111, 0 }, 0 }, { 1, 0, -32, 8, 4, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 8, 0, { 0b0010, 0 }, 0 }, @@ -1235,7 +1235,7 @@ static constexpr const rct_preview_track TrackBlocks089[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks090[] = { +static constexpr const PreviewTrack TrackBlocks090[] = { { 0, 0, 0, 8, 4, { 0b1011, 0 }, 0 }, { 1, 0, 32, 8, 4, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 8, 0, { 0b0001, 0 }, 0 }, @@ -1247,7 +1247,7 @@ static constexpr const rct_preview_track TrackBlocks090[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks091[] = { +static constexpr const PreviewTrack TrackBlocks091[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, @@ -1265,7 +1265,7 @@ static constexpr const rct_preview_track TrackBlocks091[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks092[] = { +static constexpr const PreviewTrack TrackBlocks092[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, @@ -1283,7 +1283,7 @@ static constexpr const rct_preview_track TrackBlocks092[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks093[] = { +static constexpr const PreviewTrack TrackBlocks093[] = { { 0, 0, 0, 8, 4, { 0b1111, 0 }, 0 }, { 1, 0, -32, 8, 4, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 8, 4, { 0b0111, 0 }, 0 }, @@ -1301,7 +1301,7 @@ static constexpr const rct_preview_track TrackBlocks093[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks094[] = { +static constexpr const PreviewTrack TrackBlocks094[] = { { 0, 0, 0, 8, 4, { 0b1111, 0 }, 0 }, { 1, 0, 32, 8, 4, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 8, 4, { 0b1011, 0 }, 0 }, @@ -1319,42 +1319,42 @@ static constexpr const rct_preview_track TrackBlocks094[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks095[] = { +static constexpr const PreviewTrack TrackBlocks095[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks096[] = { +static constexpr const PreviewTrack TrackBlocks096[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks097[] = { +static constexpr const PreviewTrack TrackBlocks097[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks098[] = { +static constexpr const PreviewTrack TrackBlocks098[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks099[] = { +static constexpr const PreviewTrack TrackBlocks099[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks100[] = { +static constexpr const PreviewTrack TrackBlocks100[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks101[] = { +static constexpr const PreviewTrack TrackBlocks101[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks102[] = { +static constexpr const PreviewTrack TrackBlocks102[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, @@ -1365,7 +1365,7 @@ static constexpr const rct_preview_track TrackBlocks102[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks103[] = { +static constexpr const PreviewTrack TrackBlocks103[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, @@ -1376,7 +1376,7 @@ static constexpr const rct_preview_track TrackBlocks103[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks104[] = { +static constexpr const PreviewTrack TrackBlocks104[] = { { 0, 0, 0, 0, 12, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 12, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 12, { 0b0111, 0 }, 0 }, @@ -1387,7 +1387,7 @@ static constexpr const rct_preview_track TrackBlocks104[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks105[] = { +static constexpr const PreviewTrack TrackBlocks105[] = { { 0, 0, 0, 0, 12, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 12, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 12, { 0b1011, 0 }, 0 }, @@ -1398,7 +1398,7 @@ static constexpr const rct_preview_track TrackBlocks105[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks106[] = { +static constexpr const PreviewTrack TrackBlocks106[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0111, 0 }, 0 }, @@ -1409,7 +1409,7 @@ static constexpr const rct_preview_track TrackBlocks106[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks107[] = { +static constexpr const PreviewTrack TrackBlocks107[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b1011, 0 }, 0 }, @@ -1420,7 +1420,7 @@ static constexpr const rct_preview_track TrackBlocks107[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks108[] = { +static constexpr const PreviewTrack TrackBlocks108[] = { { 0, 0, 0, 0, 12, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 12, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 12, { 0b0111, 0 }, 0 }, @@ -1431,7 +1431,7 @@ static constexpr const rct_preview_track TrackBlocks108[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks109[] = { +static constexpr const PreviewTrack TrackBlocks109[] = { { 0, 0, 0, 0, 12, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 12, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 12, { 0b1011, 0 }, 0 }, @@ -1442,42 +1442,42 @@ static constexpr const rct_preview_track TrackBlocks109[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks110[] = { +static constexpr const PreviewTrack TrackBlocks110[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks111[] = { +static constexpr const PreviewTrack TrackBlocks111[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks112[] = { +static constexpr const PreviewTrack TrackBlocks112[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks113[] = { +static constexpr const PreviewTrack TrackBlocks113[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks114[] = { +static constexpr const PreviewTrack TrackBlocks114[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks115[] = { +static constexpr const PreviewTrack TrackBlocks115[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks116[] = { +static constexpr const PreviewTrack TrackBlocks116[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks117[] = { +static constexpr const PreviewTrack TrackBlocks117[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 16, { 0b1111, 0 }, 0 }, @@ -1486,7 +1486,7 @@ static constexpr const rct_preview_track TrackBlocks117[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks118[] = { +static constexpr const PreviewTrack TrackBlocks118[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 16, 24, { 0b1111, 0 }, 0 }, @@ -1494,7 +1494,7 @@ static constexpr const rct_preview_track TrackBlocks118[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks119[] = { +static constexpr const PreviewTrack TrackBlocks119[] = { { 0, 0, 0, 0, 48, { 0b1111, 0 }, 0 }, { 1, -32, 0, 40, 48, { 0b1111, 0 }, 0 }, { 2, -64, 0, 64, 24, { 0b1111, 0 }, 0 }, @@ -1502,12 +1502,12 @@ static constexpr const rct_preview_track TrackBlocks119[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks120[] = { +static constexpr const PreviewTrack TrackBlocks120[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks121[] = { +static constexpr const PreviewTrack TrackBlocks121[] = { { 0, 0, 0, 40, 48, { 0b1111, 0 }, 0 }, { 1, -32, 0, 16, 24, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 16, { 0b1111, 0 }, 0 }, @@ -1515,7 +1515,7 @@ static constexpr const rct_preview_track TrackBlocks121[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks122[] = { +static constexpr const PreviewTrack TrackBlocks122[] = { { 0, 0, 0, 80, 8, { 0b1111, 0 }, 0 }, { 1, -32, 0, 64, 24, { 0b1111, 0 }, 0 }, { 2, -64, 0, 40, 48, { 0b1111, 0 }, 0 }, @@ -1523,7 +1523,7 @@ static constexpr const rct_preview_track TrackBlocks122[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks123[] = { +static constexpr const PreviewTrack TrackBlocks123[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, { 2, -64, 0, -32, 32, { 0b1111, 0b0011 }, 0 }, @@ -1531,7 +1531,7 @@ static constexpr const rct_preview_track TrackBlocks123[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks124[] = { +static constexpr const PreviewTrack TrackBlocks124[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 32, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 48, { 0b1111, 0 }, 0 }, @@ -1542,52 +1542,52 @@ static constexpr const rct_preview_track TrackBlocks124[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks125[] = { +static constexpr const PreviewTrack TrackBlocks125[] = { { 0, 0, 0, 0, 48, { 0b1111, 0 }, 0 }, { 1, 32, 0, 0, 48, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks126[] = { +static constexpr const PreviewTrack TrackBlocks126[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks127[] = { +static constexpr const PreviewTrack TrackBlocks127[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks128[] = { +static constexpr const PreviewTrack TrackBlocks128[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks129[] = { +static constexpr const PreviewTrack TrackBlocks129[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b0011 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks130[] = { +static constexpr const PreviewTrack TrackBlocks130[] = { { 0, 0, 0, 0, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks131[] = { +static constexpr const PreviewTrack TrackBlocks131[] = { { 0, 0, 0, 0, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks132[] = { +static constexpr const PreviewTrack TrackBlocks132[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks133[] = { +static constexpr const PreviewTrack TrackBlocks133[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, -32, 0, 0, { 0b1000, 0 }, 0 }, @@ -1596,7 +1596,7 @@ static constexpr const rct_preview_track TrackBlocks133[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks134[] = { +static constexpr const PreviewTrack TrackBlocks134[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 32, 0, 0, { 0b0100, 0 }, 0 }, @@ -1605,7 +1605,7 @@ static constexpr const rct_preview_track TrackBlocks134[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks135[] = { +static constexpr const PreviewTrack TrackBlocks135[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b0001, 0 }, 0 }, { 2, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1614,7 +1614,7 @@ static constexpr const rct_preview_track TrackBlocks135[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks136[] = { +static constexpr const PreviewTrack TrackBlocks136[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1623,7 +1623,7 @@ static constexpr const rct_preview_track TrackBlocks136[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks137[] = { +static constexpr const PreviewTrack TrackBlocks137[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, -32, 0, 0, { 0b1000, 0 }, 0 }, @@ -1632,7 +1632,7 @@ static constexpr const rct_preview_track TrackBlocks137[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks138[] = { +static constexpr const PreviewTrack TrackBlocks138[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 32, 0, 0, { 0b0100, 0 }, 0 }, @@ -1641,7 +1641,7 @@ static constexpr const rct_preview_track TrackBlocks138[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks139[] = { +static constexpr const PreviewTrack TrackBlocks139[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b0001, 0 }, 0 }, { 2, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1650,7 +1650,7 @@ static constexpr const rct_preview_track TrackBlocks139[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks140[] = { +static constexpr const PreviewTrack TrackBlocks140[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1659,7 +1659,7 @@ static constexpr const rct_preview_track TrackBlocks140[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks141[] = { +static constexpr const PreviewTrack TrackBlocks141[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1667,7 +1667,7 @@ static constexpr const rct_preview_track TrackBlocks141[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks142[] = { +static constexpr const PreviewTrack TrackBlocks142[] = { { 0, 0, 0, 0, 16, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 16, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 16, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1675,7 +1675,7 @@ static constexpr const rct_preview_track TrackBlocks142[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks143[] = { +static constexpr const PreviewTrack TrackBlocks143[] = { { 0, 0, 0, 0, 64, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 64, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 64, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1683,7 +1683,7 @@ static constexpr const rct_preview_track TrackBlocks143[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks144[] = { +static constexpr const PreviewTrack TrackBlocks144[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1691,7 +1691,7 @@ static constexpr const rct_preview_track TrackBlocks144[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks145[] = { +static constexpr const PreviewTrack TrackBlocks145[] = { { 0, 0, 0, 0, 32, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 32, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 32, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1699,7 +1699,7 @@ static constexpr const rct_preview_track TrackBlocks145[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks146[] = { +static constexpr const PreviewTrack TrackBlocks146[] = { { 0, 0, 0, 0, 32, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 32, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 32, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1707,7 +1707,7 @@ static constexpr const rct_preview_track TrackBlocks146[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks147[] = { +static constexpr const PreviewTrack TrackBlocks147[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1715,7 +1715,7 @@ static constexpr const rct_preview_track TrackBlocks147[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks148[] = { +static constexpr const PreviewTrack TrackBlocks148[] = { { 0, 0, 0, 0, 16, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 16, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 16, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1723,7 +1723,7 @@ static constexpr const rct_preview_track TrackBlocks148[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks149[] = { +static constexpr const PreviewTrack TrackBlocks149[] = { { 0, 0, 0, 0, 64, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 64, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 64, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1731,7 +1731,7 @@ static constexpr const rct_preview_track TrackBlocks149[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks150[] = { +static constexpr const PreviewTrack TrackBlocks150[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1739,7 +1739,7 @@ static constexpr const rct_preview_track TrackBlocks150[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks151[] = { +static constexpr const PreviewTrack TrackBlocks151[] = { { 0, 0, 0, 0, 32, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 32, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 32, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1747,7 +1747,7 @@ static constexpr const rct_preview_track TrackBlocks151[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks152[] = { +static constexpr const PreviewTrack TrackBlocks152[] = { { 0, 0, 0, 0, 32, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 32, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 32, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1755,7 +1755,7 @@ static constexpr const rct_preview_track TrackBlocks152[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks153[] = { +static constexpr const PreviewTrack TrackBlocks153[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1763,7 +1763,7 @@ static constexpr const rct_preview_track TrackBlocks153[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks154[] = { +static constexpr const PreviewTrack TrackBlocks154[] = { { 0, 0, 0, 0, 24, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 24, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 24, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1771,7 +1771,7 @@ static constexpr const rct_preview_track TrackBlocks154[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks155[] = { +static constexpr const PreviewTrack TrackBlocks155[] = { { 0, 0, 0, 0, 24, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 24, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 24, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1779,7 +1779,7 @@ static constexpr const rct_preview_track TrackBlocks155[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks156[] = { +static constexpr const PreviewTrack TrackBlocks156[] = { { 0, 0, 0, 0, 24, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 24, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 24, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1787,7 +1787,7 @@ static constexpr const rct_preview_track TrackBlocks156[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks157[] = { +static constexpr const PreviewTrack TrackBlocks157[] = { { 0, 0, 0, 0, 24, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 24, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 24, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1795,7 +1795,7 @@ static constexpr const rct_preview_track TrackBlocks157[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks158[] = { +static constexpr const PreviewTrack TrackBlocks158[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1803,7 +1803,7 @@ static constexpr const rct_preview_track TrackBlocks158[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks159[] = { +static constexpr const PreviewTrack TrackBlocks159[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1811,7 +1811,7 @@ static constexpr const rct_preview_track TrackBlocks159[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks160[] = { +static constexpr const PreviewTrack TrackBlocks160[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1819,7 +1819,7 @@ static constexpr const rct_preview_track TrackBlocks160[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks161[] = { +static constexpr const PreviewTrack TrackBlocks161[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1827,7 +1827,7 @@ static constexpr const rct_preview_track TrackBlocks161[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks162[] = { +static constexpr const PreviewTrack TrackBlocks162[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1835,7 +1835,7 @@ static constexpr const rct_preview_track TrackBlocks162[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks163[] = { +static constexpr const PreviewTrack TrackBlocks163[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1843,7 +1843,7 @@ static constexpr const rct_preview_track TrackBlocks163[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks164[] = { +static constexpr const PreviewTrack TrackBlocks164[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1851,7 +1851,7 @@ static constexpr const rct_preview_track TrackBlocks164[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks165[] = { +static constexpr const PreviewTrack TrackBlocks165[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1859,7 +1859,7 @@ static constexpr const rct_preview_track TrackBlocks165[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks166[] = { +static constexpr const PreviewTrack TrackBlocks166[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1867,7 +1867,7 @@ static constexpr const rct_preview_track TrackBlocks166[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks167[] = { +static constexpr const PreviewTrack TrackBlocks167[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1875,7 +1875,7 @@ static constexpr const rct_preview_track TrackBlocks167[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks168[] = { +static constexpr const PreviewTrack TrackBlocks168[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1883,7 +1883,7 @@ static constexpr const rct_preview_track TrackBlocks168[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks169[] = { +static constexpr const PreviewTrack TrackBlocks169[] = { { 0, 0, 0, 0, 8, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 8, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1891,7 +1891,7 @@ static constexpr const rct_preview_track TrackBlocks169[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks170[] = { +static constexpr const PreviewTrack TrackBlocks170[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1899,7 +1899,7 @@ static constexpr const rct_preview_track TrackBlocks170[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks171[] = { +static constexpr const PreviewTrack TrackBlocks171[] = { { 0, 0, 0, 0, 0, { 0b1101, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 0, { 0b0001, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, @@ -1907,45 +1907,45 @@ static constexpr const rct_preview_track TrackBlocks171[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks172[] = { +static constexpr const PreviewTrack TrackBlocks172[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks173[] = { +static constexpr const PreviewTrack TrackBlocks173[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks174[] = { +static constexpr const PreviewTrack TrackBlocks174[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks175[] = { +static constexpr const PreviewTrack TrackBlocks175[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks176[] = { +static constexpr const PreviewTrack TrackBlocks176[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -32, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, -32, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks177[] = { +static constexpr const PreviewTrack TrackBlocks177[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -32, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, -32, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks178[] = { +static constexpr const PreviewTrack TrackBlocks178[] = { { 0, 0, 0, 0, 0, { 0b0111, 0b0100 }, 0 }, { 1, 0, -32, 0, 16, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 16, { 0b0010, 0 }, 0 }, @@ -1953,7 +1953,7 @@ static constexpr const rct_preview_track TrackBlocks178[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks179[] = { +static constexpr const PreviewTrack TrackBlocks179[] = { { 0, 0, 0, 0, 16, { 0b1011, 0b1000 }, 0 }, { 1, 0, 32, 0, 16, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 16, { 0b0001, 0 }, 0 }, @@ -1961,7 +1961,7 @@ static constexpr const rct_preview_track TrackBlocks179[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks180[] = { +static constexpr const PreviewTrack TrackBlocks180[] = { { 0, 0, 0, 16, 16,{ 0b0111, 0b0011 }, 0 }, { 1, 0, -32, 0, 16, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 16, { 0b0010, 0 }, 0 }, @@ -1969,7 +1969,7 @@ static constexpr const rct_preview_track TrackBlocks180[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks181[] = { +static constexpr const PreviewTrack TrackBlocks181[] = { { 0, 0, 0, 16, 16, { 0b1011, 0b0011 }, 0 }, { 1, 0, 32, 0, 16, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 16, { 0b0001, 0 }, 0 }, @@ -1977,12 +1977,12 @@ static constexpr const rct_preview_track TrackBlocks181[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks182[] = { +static constexpr const PreviewTrack TrackBlocks182[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks183[] = { +static constexpr const PreviewTrack TrackBlocks183[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 40, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 56, { 0b1111, 0 }, 0 }, @@ -1993,7 +1993,7 @@ static constexpr const rct_preview_track TrackBlocks183[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks184[] = { +static constexpr const PreviewTrack TrackBlocks184[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 40, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 56, { 0b1111, 0 }, 0 }, @@ -2004,7 +2004,7 @@ static constexpr const rct_preview_track TrackBlocks184[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks185[] = { +static constexpr const PreviewTrack TrackBlocks185[] = { { 0, 0, 0, -32, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -216, 192, { 0b1111, 0 }, 0 }, { 2, -64, 0, -160, 96, { 0b1111, 0 }, 0 }, @@ -2015,7 +2015,7 @@ static constexpr const rct_preview_track TrackBlocks185[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks186[] = { +static constexpr const PreviewTrack TrackBlocks186[] = { { 0, 0, 0, -32, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -216, 192, { 0b1111, 0 }, 0 }, { 2, -64, 0, -160, 96, { 0b1111, 0 }, 0 }, @@ -2026,35 +2026,35 @@ static constexpr const rct_preview_track TrackBlocks186[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks187[] = { +static constexpr const PreviewTrack TrackBlocks187[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, -16, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, -16, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks188[] = { +static constexpr const PreviewTrack TrackBlocks188[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, -16, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, -16, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks189[] = { +static constexpr const PreviewTrack TrackBlocks189[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 16, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks190[] = { +static constexpr const PreviewTrack TrackBlocks190[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 16, { 0b1111, 0 }, 0 }, { 2, -64, 0, 16, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks191[] = { +static constexpr const PreviewTrack TrackBlocks191[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 16, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 96,{ 0b0011, 0 }, 0 }, @@ -2062,7 +2062,7 @@ static constexpr const rct_preview_track TrackBlocks191[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks192[] = { +static constexpr const PreviewTrack TrackBlocks192[] = { { 0, 0, 0, 0, 32, { 0b1111, 0 }, 0 }, { 1, -32, 0, -88, 96,{ 0b0011, 0 }, 0 }, { 2, 0, 0, -104, 16, { 0b1111, 0b1100 }, 0 }, @@ -2070,35 +2070,35 @@ static constexpr const rct_preview_track TrackBlocks192[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks193[] = { +static constexpr const PreviewTrack TrackBlocks193[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 24, 32, { 0b0111, 0 }, 0 }, { 2, -32, -32, 48, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks194[] = { +static constexpr const PreviewTrack TrackBlocks194[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 24, 32, { 0b1011, 0 }, 0 }, { 2, -32, 32, 48, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks195[] = { +static constexpr const PreviewTrack TrackBlocks195[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -24, 32, { 0b0111, 0 }, 0 }, { 2, -32, -32, -48, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks196[] = { +static constexpr const PreviewTrack TrackBlocks196[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -24, 32, { 0b1011, 0 }, 0 }, { 2, -32, 32, -48, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks197[] = { +static constexpr const PreviewTrack TrackBlocks197[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 32, { 0b1111, 0 }, 0 }, { 2, -64, 0, 16, 0, { 0b1111, 0 }, 0 }, @@ -2106,7 +2106,7 @@ static constexpr const rct_preview_track TrackBlocks197[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks198[] = { +static constexpr const PreviewTrack TrackBlocks198[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, -32, 32, { 0b1111, 0 }, 0 }, { 2, -64, 0, -16, 0, { 0b1111, 0 }, 0 }, @@ -2114,7 +2114,7 @@ static constexpr const rct_preview_track TrackBlocks198[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks199[] = { +static constexpr const PreviewTrack TrackBlocks199[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2124,7 +2124,7 @@ static constexpr const rct_preview_track TrackBlocks199[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks200[] = { +static constexpr const PreviewTrack TrackBlocks200[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2134,39 +2134,39 @@ static constexpr const rct_preview_track TrackBlocks200[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks201[] = { +static constexpr const PreviewTrack TrackBlocks201[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks202[] = { +static constexpr const PreviewTrack TrackBlocks202[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks203[] = { +static constexpr const PreviewTrack TrackBlocks203[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks204[] = { +static constexpr const PreviewTrack TrackBlocks204[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 32, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks205[] = { +static constexpr const PreviewTrack TrackBlocks205[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, -32, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks206[] = { +static constexpr const PreviewTrack TrackBlocks206[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, -32, 0, -40, 32, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 2, -64, 0, -96, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, @@ -2174,14 +2174,14 @@ static constexpr const rct_preview_track TrackBlocks206[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks207[] = { +static constexpr const PreviewTrack TrackBlocks207[] = { { 0, 0, 0, 0, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 56, 32, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 2, 64, 0, 96, 16, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks208[] = { +static constexpr const PreviewTrack TrackBlocks208[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, -32, 0, -72, 32, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 2, -64, 0, -128, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, @@ -2189,7 +2189,7 @@ static constexpr const rct_preview_track TrackBlocks208[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks209[] = { +static constexpr const PreviewTrack TrackBlocks209[] = { { 0, 0, 0, 0, 0, { 0b0111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0010, 0 }, 0 }, @@ -2197,7 +2197,7 @@ static constexpr const rct_preview_track TrackBlocks209[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks210[] = { +static constexpr const PreviewTrack TrackBlocks210[] = { { 0, 0, 0, 0, 0, { 0b1011, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 0, 8, { 0b0001, 0 }, 0 }, @@ -2205,7 +2205,7 @@ static constexpr const rct_preview_track TrackBlocks210[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks211[] = { +static constexpr const PreviewTrack TrackBlocks211[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, -32, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, -32, 0, 0, { 0b1111, 0 }, 0 }, @@ -2215,7 +2215,7 @@ static constexpr const rct_preview_track TrackBlocks211[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks212[] = { +static constexpr const PreviewTrack TrackBlocks212[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 32, 0, 0, { 0b1111, 0 }, 0 }, @@ -2225,7 +2225,7 @@ static constexpr const rct_preview_track TrackBlocks212[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks213[] = { +static constexpr const PreviewTrack TrackBlocks213[] = { { 0, 0, 0, 0, 32, { 0b1111, 0 }, 0 }, { 1, 32, 0, 0, 32, { 0b1111, 0 }, 0 }, { 2, -64, 0, 0, 32, { 0b1111, 0 }, 0 }, @@ -2233,13 +2233,13 @@ static constexpr const rct_preview_track TrackBlocks213[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks214[] = { +static constexpr const PreviewTrack TrackBlocks214[] = { { 0, 0, 0, 0, 48, { 0b1111, 0 }, 0 }, { 1, 32, 0, 0, 48, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks215[] = { +static constexpr const PreviewTrack TrackBlocks215[] = { { 0, 0, 0, 0, 208, { 0b1111, 0 }, 0 }, { 1, 32, 0, 0, 208, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 160, { 0b1111, 0 }, 0 }, @@ -2250,12 +2250,12 @@ static constexpr const rct_preview_track TrackBlocks215[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks216[] = { +static constexpr const PreviewTrack TrackBlocks216[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks217[] = { +static constexpr const PreviewTrack TrackBlocks217[] = { { 0, 0, 0, 0, 16, { 0b0111, 0b0100 }, 0 }, { 1, 0, -32, 16, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0010, 0 }, 0 }, @@ -2263,7 +2263,7 @@ static constexpr const rct_preview_track TrackBlocks217[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks218[] = { +static constexpr const PreviewTrack TrackBlocks218[] = { { 0, 0, 0, 0, 16, { 0b1011, 0b1000 }, 0 }, { 1, 0, 32, 16, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0001, 0 }, 0 }, @@ -2271,7 +2271,7 @@ static constexpr const rct_preview_track TrackBlocks218[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks219[] = { +static constexpr const PreviewTrack TrackBlocks219[] = { { 0, 0, 0, 16, 16,{ 0b0111, 0b0011 }, 0 }, { 1, 0, -32, 16, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0010, 0 }, 0 }, @@ -2279,7 +2279,7 @@ static constexpr const rct_preview_track TrackBlocks219[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks220[] = { +static constexpr const PreviewTrack TrackBlocks220[] = { { 0, 0, 0, 16, 16, { 0b1011, 0b0011 }, 0 }, { 1, 0, 32, 16, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 0, { 0b0001, 0 }, 0 }, @@ -2287,7 +2287,7 @@ static constexpr const rct_preview_track TrackBlocks220[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks221[] = { +static constexpr const PreviewTrack TrackBlocks221[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, { 1, 0, -32, 16, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 16, { 0b0111, 0b0100 }, 0 }, @@ -2298,7 +2298,7 @@ static constexpr const rct_preview_track TrackBlocks221[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks222[] = { +static constexpr const PreviewTrack TrackBlocks222[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, { 1, 0, 32, 16, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 16, 16, { 0b1011, 0b1000 }, 0 }, @@ -2309,7 +2309,7 @@ static constexpr const rct_preview_track TrackBlocks222[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks223[] = { +static constexpr const PreviewTrack TrackBlocks223[] = { { 0, 0, 0, 48, 16, { 0b1111, 0b0011 }, 0 }, { 1, 0, -32, 48, 0, { 0b1000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 32, 16, { 0b0111, 0b0001 }, 0 }, @@ -2320,7 +2320,7 @@ static constexpr const rct_preview_track TrackBlocks223[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks224[] = { +static constexpr const PreviewTrack TrackBlocks224[] = { { 0, 0, 0, 48, 16, { 0b1111, 0b0011 }, 0 }, { 1, 0, 32, 48, 0, { 0b0100, 0 }, RCT_PREVIEW_TRACK_FLAG_0 }, { 2, -32, 0, 32, 16, { 0b1011, 0b0010 }, 0 }, @@ -2331,158 +2331,158 @@ static constexpr const rct_preview_track TrackBlocks224[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks225[] = { +static constexpr const PreviewTrack TrackBlocks225[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks226[] = { +static constexpr const PreviewTrack TrackBlocks226[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks227[] = { +static constexpr const PreviewTrack TrackBlocks227[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks228[] = { +static constexpr const PreviewTrack TrackBlocks228[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks229[] = { +static constexpr const PreviewTrack TrackBlocks229[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks230[] = { +static constexpr const PreviewTrack TrackBlocks230[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks231[] = { +static constexpr const PreviewTrack TrackBlocks231[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks232[] = { +static constexpr const PreviewTrack TrackBlocks232[] = { { 0, 0, 0, 0, 16, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks233[] = { +static constexpr const PreviewTrack TrackBlocks233[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks234[] = { +static constexpr const PreviewTrack TrackBlocks234[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks235[] = { +static constexpr const PreviewTrack TrackBlocks235[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks236[] = { +static constexpr const PreviewTrack TrackBlocks236[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks237[] = { +static constexpr const PreviewTrack TrackBlocks237[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks238[] = { +static constexpr const PreviewTrack TrackBlocks238[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks239[] = { +static constexpr const PreviewTrack TrackBlocks239[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks240[] = { +static constexpr const PreviewTrack TrackBlocks240[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks241[] = { +static constexpr const PreviewTrack TrackBlocks241[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks242[] = { +static constexpr const PreviewTrack TrackBlocks242[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks243[] = { +static constexpr const PreviewTrack TrackBlocks243[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks244[] = { +static constexpr const PreviewTrack TrackBlocks244[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks245[] = { +static constexpr const PreviewTrack TrackBlocks245[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks246[] = { +static constexpr const PreviewTrack TrackBlocks246[] = { { 0, 0, 0, 0, 8, { 0b1111, 0b0011 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks247[] = { +static constexpr const PreviewTrack TrackBlocks247[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks248[] = { +static constexpr const PreviewTrack TrackBlocks248[] = { { 0, 0, 0, 0, 8, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks249[] = { +static constexpr const PreviewTrack TrackBlocks249[] = { { 0, 0, 0, 0, 72, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 0, 32, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks250[] = { +static constexpr const PreviewTrack TrackBlocks250[] = { { 0, 0, 0, 0, 72, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 0, -32, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks251[] = { +static constexpr const PreviewTrack TrackBlocks251[] = { { 0, 0, 0, 0, 72, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 0, 32, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks252[] = { +static constexpr const PreviewTrack TrackBlocks252[] = { { 0, 0, 0, 0, 72, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 0, -32, 0, 0, { 0b0000, 0 }, RCT_PREVIEW_TRACK_FLAG_0 | RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks253[] = { +static constexpr const PreviewTrack TrackBlocks253[] = { { 0, 0, 0, 0, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 56, 32, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 2, 64, 0, 96, 16, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks254[] = { +static constexpr const PreviewTrack TrackBlocks254[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, -32, 0, -72, 32, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 2, -64, 0, -128, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, @@ -2490,19 +2490,19 @@ static constexpr const rct_preview_track TrackBlocks254[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocks255[] = { +static constexpr const PreviewTrack TrackBlocks255[] = { { 0, 0, 0, 32, 56, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 1, 32, 0, 88, 32, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, { 2, 64, 0, 128, 16, { 0b1111, 0 }, RCT_PREVIEW_TRACK_FLAG_IS_VERTICAL }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRotationControlToggle[] = { +static constexpr const PreviewTrack TrackBlocksRotationControlToggle[] = { { 0, 0, 0, 0, 0, { 0b1111, 0b1100 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack1x4A[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack1x4A[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -64, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2510,7 +2510,7 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack1x4A[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack2x2[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack2x2[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b1111, 0 }, 0 }, { 2, 32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2518,7 +2518,7 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack2x2[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack4x4[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack4x4[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b1111, 0 }, 0 }, { 2, 0, 64, 0, 0, { 0b1111, 0 }, 0 }, @@ -2538,7 +2538,7 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack4x4[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack2x4[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack2x4[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, 0, 32, 0, 0, { 0b1111, 0 }, 0 }, { 2, 0, 64, 0, 0, { 0b1111, 0 }, 0 }, @@ -2550,7 +2550,7 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack2x4[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack1x5[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack1x5[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -64, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2559,12 +2559,12 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack1x5[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack1x1A[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack1x1A[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack1x4B[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack1x4B[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -64, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2572,12 +2572,12 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack1x4B[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack1x1B[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack1x1B[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack1x4C[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack1x4C[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -64, 0, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2585,7 +2585,7 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack1x4C[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlatTrack3x3[] = { +static constexpr const PreviewTrack TrackBlocksFlatTrack3x3[] = { { 0, 0, 0, 0, 0, { 0b1111, 0 }, 0 }, { 1, -32, -32, 0, 0, { 0b1111, 0 }, 0 }, { 2, -32, 0, 0, 0, { 0b1111, 0 }, 0 }, @@ -2599,7 +2599,7 @@ static constexpr const rct_preview_track TrackBlocksFlatTrack3x3[] = { }; -static constexpr const rct_preview_track TrackBlocksLeftLargeCorkscrewUp[] = { +static constexpr const PreviewTrack TrackBlocksLeftLargeCorkscrewUp[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 8, 32, { 0b1111, 0 }, 0 }, { 2, -64, 0, 32, 24, { 0b0111, 0 }, 0 }, @@ -2609,7 +2609,7 @@ static constexpr const rct_preview_track TrackBlocksLeftLargeCorkscrewUp[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightLargeCorkscrewUp[] = { +static constexpr const PreviewTrack TrackBlocksRightLargeCorkscrewUp[] = { { 0, 0, 0 , 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 8, 32, { 0b1111, 0 }, 0 }, { 2, -64, 0, 32, 24, { 0b1011, 0 }, 0 }, @@ -2619,7 +2619,7 @@ static constexpr const rct_preview_track TrackBlocksRightLargeCorkscrewUp[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftLargeCorkscrewDown[] = { +static constexpr const PreviewTrack TrackBlocksLeftLargeCorkscrewDown[] = { { 0, 0, 0 , -40, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -64, 40, { 0b1111, 0 }, 0 }, { 2, -32, -32, -80, 24, { 0b1000, 0 }, 0 }, @@ -2629,7 +2629,7 @@ static constexpr const rct_preview_track TrackBlocksLeftLargeCorkscrewDown[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightLargeCorkscrewDown[] = { +static constexpr const PreviewTrack TrackBlocksRightLargeCorkscrewDown[] = { { 0, 0, 0 , -40, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -64, 40, { 0b1111, 0 }, 0 }, { 2, -32, 32, -80, 24, { 0b0100, 0 }, 0 }, @@ -2639,7 +2639,7 @@ static constexpr const rct_preview_track TrackBlocksRightLargeCorkscrewDown[] = TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftMediumHalfLoopUp[] = { +static constexpr const PreviewTrack TrackBlocksLeftMediumHalfLoopUp[] = { { 0, 0, 0, 0, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, 16, 48, { 0b1111, 0 }, 0 }, { 2, -64, 0, 56,120, { 0b1111, 0 }, 0 }, @@ -2648,7 +2648,7 @@ static constexpr const rct_preview_track TrackBlocksLeftMediumHalfLoopUp[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightMediumHalfLoopUp[] = { +static constexpr const PreviewTrack TrackBlocksRightMediumHalfLoopUp[] = { { 0, 0, 0, 0, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, 16, 48, { 0b1111, 0 }, 0 }, { 2, -64, 0, 56,120, { 0b1111, 0 }, 0 }, @@ -2657,7 +2657,7 @@ static constexpr const rct_preview_track TrackBlocksRightMediumHalfLoopUp[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftMediumHalfLoopDown[] = { +static constexpr const PreviewTrack TrackBlocksLeftMediumHalfLoopDown[] = { { 0, 0, 0, -48, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -160,120, { 0b1111, 0 }, 0 }, { 2, -32, -32, -160,120, { 0b1111, 0 }, 0 }, @@ -2666,7 +2666,7 @@ static constexpr const rct_preview_track TrackBlocksLeftMediumHalfLoopDown[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightMediumHalfLoopDown[] = { +static constexpr const PreviewTrack TrackBlocksRightMediumHalfLoopDown[] = { { 0, 0, 0 , -48, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -160, 120, { 0b1111, 0 }, 0 }, { 2, -32, 32, -160, 120, { 0b1111, 0 }, 0 }, @@ -2675,28 +2675,28 @@ static constexpr const rct_preview_track TrackBlocksRightMediumHalfLoopDown[] = TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftZeroGRollUp[] = { +static constexpr const PreviewTrack TrackBlocksLeftZeroGRollUp[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 8, 24, { 0b1111, 0 }, 0 }, { 2, -64, 0, 24, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightZeroGRollUp[] = { +static constexpr const PreviewTrack TrackBlocksRightZeroGRollUp[] = { { 0, 0, 0, 0, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, 8, 24, { 0b1111, 0 }, 0 }, { 2, -64, 0, 24, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftZeroGRollDown[] = { +static constexpr const PreviewTrack TrackBlocksLeftZeroGRollDown[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -48, 24, { 0b1111, 0 }, 0 }, { 2, -64, 0, -56, 16, { 0b1111, 0 }, 0 }, TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightZeroGRollDown[] = { +static constexpr const PreviewTrack TrackBlocksRightZeroGRollDown[] = { { 0, 0, 0 ,-32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -48, 24, { 0b1111, 0 }, 0 }, { 2, -64, 0, -56, 16, { 0b1111, 0 }, 0 }, @@ -2704,7 +2704,7 @@ static constexpr const rct_preview_track TrackBlocksRightZeroGRollDown[] = { }; -static constexpr const rct_preview_track TrackBlocksLeftLargeZeroGRollUp[] = { +static constexpr const PreviewTrack TrackBlocksLeftLargeZeroGRollUp[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, { 1, -32, 0, 56, 48, { 0b1111, 0 }, 0 }, { 2, -64, 0, 96, 40, { 0b1111, 0 }, 0 }, @@ -2712,7 +2712,7 @@ static constexpr const rct_preview_track TrackBlocksLeftLargeZeroGRollUp[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightLargeZeroGRollUp[] = { +static constexpr const PreviewTrack TrackBlocksRightLargeZeroGRollUp[] = { { 0, 0, 0, 0, 64, { 0b1111, 0 }, 0 }, { 1, -32, 0, 56, 48, { 0b1111, 0 }, 0 }, { 2, -64, 0, 96, 40, { 0b1111, 0 }, 0 }, @@ -2720,7 +2720,7 @@ static constexpr const rct_preview_track TrackBlocksRightLargeZeroGRollUp[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftLargeZeroGRollDown[] = { +static constexpr const PreviewTrack TrackBlocksLeftLargeZeroGRollDown[] = { { 0, 0, 0, -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -56, 40, { 0b1111, 0 }, 0 }, { 2, -64, 0, -96, 48, { 0b1111, 0 }, 0 }, @@ -2728,7 +2728,7 @@ static constexpr const rct_preview_track TrackBlocksLeftLargeZeroGRollDown[] = { TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightLargeZeroGRollDown[] = { +static constexpr const PreviewTrack TrackBlocksRightLargeZeroGRollDown[] = { { 0, 0, 0 , -32, 16, { 0b1111, 0 }, 0 }, { 1, -32, 0, -56, 40, { 0b1111, 0 }, 0 }, { 2, -64, 0, -96, 48, { 0b1111, 0 }, 0 }, @@ -2736,7 +2736,7 @@ static constexpr const rct_preview_track TrackBlocksRightLargeZeroGRollDown[] = TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopUninvertedUp[] = { +static constexpr const PreviewTrack TrackBlocksLeftFlyerLargeHalfLoopUninvertedUp[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 40, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 56, { 0b1111, 0 }, 0 }, @@ -2747,7 +2747,7 @@ static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopUninve TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopUninvertedUp[] = { +static constexpr const PreviewTrack TrackBlocksRightFlyerLargeHalfLoopUninvertedUp[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 40, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 56, { 0b1111, 0 }, 0 }, @@ -2759,7 +2759,7 @@ static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopUninv }; -static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopInvertedUp[] = { +static constexpr const PreviewTrack TrackBlocksLeftFlyerLargeHalfLoopInvertedUp[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 40, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 56, { 0b1111, 0 }, 0 }, @@ -2770,7 +2770,7 @@ static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopInvert TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopInvertedUp[] = { +static constexpr const PreviewTrack TrackBlocksRightFlyerLargeHalfLoopInvertedUp[] = { { 0, 0, 0, 0, 24, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 40, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 56, { 0b1111, 0 }, 0 }, @@ -2781,7 +2781,7 @@ static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopInver TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopInvertedDown[] = { +static constexpr const PreviewTrack TrackBlocksRightFlyerLargeHalfLoopInvertedDown[] = { { 0, 0, 0, 0, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -184, 192, { 0b1111, 0 }, 0 }, { 2, -64, 0, -128, 96, { 0b1111, 0 }, 0 }, @@ -2792,7 +2792,7 @@ static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopInver TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopInvertedDown[] = { +static constexpr const PreviewTrack TrackBlocksLeftFlyerLargeHalfLoopInvertedDown[] = { { 0, 0, 0, 0, 24, { 0b1111, 0 }, 0 }, { 1, -32, 0, -184, 192, { 0b1111, 0 }, 0 }, { 2, -64, 0, -128, 96, { 0b1111, 0 }, 0 }, @@ -2803,7 +2803,7 @@ static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopInvert TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopUninvertedDown[] = { +static constexpr const PreviewTrack TrackBlocksRightFlyerLargeHalfLoopUninvertedDown[] = { { 0, 0, 0, -32, 40, { 0b1111, 0 }, 0 }, { 1, -32, 0, -216, 192, { 0b1111, 0 }, 0 }, { 2, -64, 0, -160, 96, { 0b1111, 0 }, 0 }, @@ -2814,7 +2814,7 @@ static constexpr const rct_preview_track TrackBlocksRightFlyerLargeHalfLoopUninv TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopUninvertedDown[] = { +static constexpr const PreviewTrack TrackBlocksLeftFlyerLargeHalfLoopUninvertedDown[] = { { 0, 0, 0, -32, 40, { 0b1111, 0 }, 0 }, { 1, -32, 0, -216, 192, { 0b1111, 0 }, 0 }, { 2, -64, 0, -160, 96, { 0b1111, 0 }, 0 }, @@ -2825,7 +2825,7 @@ static constexpr const rct_preview_track TrackBlocksLeftFlyerLargeHalfLoopUninve TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlyerHalfLoopUpInverted[] = { +static constexpr const PreviewTrack TrackBlocksFlyerHalfLoopUpInverted[] = { { 0, 0, 0, 0, 32, { 0b1111, 0b1100 }, 0 }, { 1, -32, 0, 16, 16, { 0b1111, 0b1100 }, 0 }, { 2, -64, 0, 32, 96,{ 0b0011, 0 }, 0 }, @@ -2833,7 +2833,7 @@ static constexpr const rct_preview_track TrackBlocksFlyerHalfLoopUpInverted[] = TRACK_BLOCK_END }; -static constexpr const rct_preview_track TrackBlocksFlyerHalfLoopDownUpright[] = { +static constexpr const PreviewTrack TrackBlocksFlyerHalfLoopDownUpright[] = { { 0, 0, 0, -32, 32, { 0b1111, 0 }, 0 }, { 1, -32, 0, -120, 96,{ 0b0011, 0 }, 0 }, { 2, 0, 0, -136, 16, { 0b1111, 0b1100 }, 0 }, @@ -2842,7 +2842,7 @@ static constexpr const rct_preview_track TrackBlocksFlyerHalfLoopDownUpright[] = }; // rct2: 0x00994638 -static constexpr std::array TrackBlocks = { +static constexpr std::array TrackBlocks = { TrackBlocks000, TrackBlocks001, TrackBlocks002, @@ -3437,7 +3437,7 @@ static constexpr uint8_t TrackPieceLengths[TrackElemType::Count] = { }; // rct2: 0x00998C95 -static constexpr track_curve_chain gTrackCurveChain[TrackElemType::Count] = { +static constexpr TrackCurveChain gTrackCurveChain[TrackElemType::Count] = { { TRACK_CURVE_NONE, TRACK_CURVE_NONE }, { RideConstructionSpecialPieceSelected | TrackElemType::EndStation, RideConstructionSpecialPieceSelected | TrackElemType::EndStation }, { RideConstructionSpecialPieceSelected | TrackElemType::EndStation, RideConstructionSpecialPieceSelected | TrackElemType::EndStation }, @@ -3733,7 +3733,7 @@ static constexpr track_curve_chain gTrackCurveChain[TrackElemType::Count] = { { TRACK_CURVE_NONE, TRACK_CURVE_NONE }, // FlyerHalfLoopUninvertedUp }; -const track_descriptor gTrackDescriptors[142] = { +const TrackDescriptor gTrackDescriptors[142] = { { true, TRACK_SLOPE_DOWN_60, TRACK_BANK_NONE, TRACK_CURVE_NONE, TRACK_SLOPE_DOWN_60, TRACK_BANK_NONE, TrackElemType::DiagDown60 }, { true, TRACK_SLOPE_DOWN_60, TRACK_BANK_NONE, TRACK_CURVE_NONE, TRACK_SLOPE_DOWN_25, TRACK_BANK_NONE, TrackElemType::DiagDown60ToDown25 }, { true, TRACK_SLOPE_DOWN_60, TRACK_BANK_NONE, TRACK_CURVE_NONE, TRACK_SLOPE_NONE, TRACK_BANK_NONE, TrackElemType::DiagDown60ToFlat }, @@ -4172,7 +4172,7 @@ static constexpr track_type_t AlternativeTrackTypes[TrackElemType::Count] = { }; /** rct2: 0x0099DA34 */ -static constexpr money32 TrackPricing[TrackElemType::Count] = { +static constexpr money64 TrackPricing[TrackElemType::Count] = { 65536, // TrackElemType::Flat 98304, // TrackElemType::EndStation 98304, // TrackElemType::BeginStation @@ -5660,7 +5660,7 @@ static constexpr uint16_t TrackFlags[TrackElemType::Count] = { /** rct2: 0x00997C9D */ // clang-format off -static constexpr rct_trackdefinition TrackDefinitions[TrackElemType::Count] = +static constexpr TrackDefinition TrackDefinitions[TrackElemType::Count] = { // TYPE VANGLE END VANGLE START BANK END BANK START PREVIEW Z OFFSET { TRACK_FLAT, TRACK_SLOPE_NONE, TRACK_SLOPE_NONE, TRACK_BANK_NONE, TRACK_BANK_NONE, 0 }, // ELEM_FLAT @@ -7156,8 +7156,8 @@ namespace OpenRCT2 TrackElementDescriptor& desc = res[i]; desc.Description = RideConfigurationStringIds[i]; desc.AlternativeType = AlternativeTrackTypes[i]; - desc.Block = const_cast(TrackBlocks[i]); - desc.Coordinates = TrackCoordinates[i]; + desc.Block = const_cast(TrackBlocks[i]); + desc.Coordinates = _trackCoordinates[i]; desc.CurveChain = gTrackCurveChain[i]; desc.Flags = TrackFlags[i]; desc.HeightMarkerPositions = TrackHeightMarkerPositions[i]; @@ -7191,7 +7191,7 @@ namespace OpenRCT2 } // namespace TrackMetaData } // namespace OpenRCT2 -const rct_preview_track* TrackElementDescriptor::GetBlockForSequence(uint8_t sequenceIndex) const +const PreviewTrack* TrackElementDescriptor::GetBlockForSequence(uint8_t sequenceIndex) const { const auto* trackBlock = Block; if (trackBlock == nullptr) diff --git a/src/openrct2/ride/TrackData.h b/src/openrct2/ride/TrackData.h index 29aa6e56d2..6c50546d03 100644 --- a/src/openrct2/ride/TrackData.h +++ b/src/openrct2/ride/TrackData.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,13 +17,13 @@ constexpr const uint8_t MaxSequencesPerPiece = 16; // 0x009968BB, 0x009968BC, 0x009968BD, 0x009968BF, 0x009968C1, 0x009968C3 -struct track_curve_chain +struct TrackCurveChain { int32_t next; int32_t previous; }; -struct track_descriptor +struct TrackDescriptor { bool starts_diagonal; uint8_t slope_start; @@ -51,9 +51,9 @@ enum R9_SPIN }; -extern const track_descriptor gTrackDescriptors[142]; +extern const TrackDescriptor gTrackDescriptors[142]; -struct dodgems_track_size +struct DodgemsTrackSize { uint8_t left; uint8_t top; @@ -61,7 +61,7 @@ struct dodgems_track_size uint8_t bottom; }; -constexpr const dodgems_track_size DodgemsTrackSize(track_type_t type) +constexpr const DodgemsTrackSize GetDodgemsTrackSize(track_type_t type) { if (type == TrackElemType::FlatTrack2x2) return { 4, 4, 59, 59 }; @@ -76,11 +76,11 @@ using TrackComputeFunction = int32_t (*)(const int16_t); struct TrackElementDescriptor { StringId Description; - rct_track_coordinates Coordinates; + TrackCoordinates Coordinates; - rct_preview_track* Block; + PreviewTrack* Block; uint8_t PieceLength; - track_curve_chain CurveChain; + TrackCurveChain CurveChain; track_type_t AlternativeType; // Price Modifier should be used as in the following calculation: // (RideTrackPrice * TED::PriceModifier) / 65536 @@ -92,7 +92,7 @@ struct TrackElementDescriptor std::array SequenceElementAllowedWallEdges; std::array SequenceProperties; - rct_trackdefinition Definition; + TrackDefinition Definition; uint8_t SpinFunction; TrackComputeFunction VerticalFactor; @@ -105,7 +105,7 @@ struct TrackElementDescriptor * @param sequenceIndex * @return The track block, or nullptr if it doesn’t exist. */ - const rct_preview_track* GetBlockForSequence(uint8_t sequenceIndex) const; + const PreviewTrack* GetBlockForSequence(uint8_t sequenceIndex) const; }; namespace OpenRCT2 diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 54002069da..3ed1129d3f 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,7 +14,7 @@ #include "../Game.h" #include "../OpenRCT2.h" #include "../TrackImporter.h" -#include "../actions/FootpathPlaceFromTrackAction.h" +#include "../actions/FootpathLayoutPlaceAction.h" #include "../actions/FootpathRemoveAction.h" #include "../actions/LargeSceneryPlaceAction.h" #include "../actions/LargeSceneryRemoveAction.h" @@ -40,9 +40,12 @@ #include "../network/network.h" #include "../object/FootpathObject.h" #include "../object/FootpathSurfaceObject.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" #include "../object/ObjectRepository.h" +#include "../object/SmallSceneryEntry.h" #include "../object/StationObject.h" #include "../rct1/RCT1.h" #include "../rct1/Tables.h" @@ -52,7 +55,6 @@ #include "../world/Footpath.h" #include "../world/Park.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/Wall.h" #include "Ride.h" @@ -92,18 +94,18 @@ static uint8_t TrackDesignGetEntranceStyle(const Ride& ride) return GetStationStyleFromIdentifier(objectName); } -StringId TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ride& ride) +ResultWithMessage TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ride& ride) { type = ride.type; - auto object = object_entry_get_object(ObjectType::Ride, ride.subtype); + auto object = ObjectEntryGetObject(ObjectType::Ride, ride.subtype); if (object != nullptr) { auto entry = object->GetObjectEntry(); // Remove this check for new track design format if (entry.IsEmpty()) { - return STR_VEHICLE_UNSUPPORTED_TD6; + return { false, STR_VEHICLE_UNSUPPORTED_TD6 }; } vehicle_object = ObjectEntryDescriptor(entry); } @@ -172,15 +174,15 @@ StringId TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ride& ride) } } -StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& ride) +ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& ride) { CoordsXYE trackElement; - if (!ride_try_get_origin_element(&ride, &trackElement)) + if (!RideTryGetOriginElement(ride, &trackElement)) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } - ride_get_start_of_track(&trackElement); + RideGetStartOfTrack(&trackElement); int32_t z = trackElement.element->GetBaseZ(); auto trackType = trackElement.element->AsTrack()->GetTrackType(); @@ -191,14 +193,14 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& if (!newCoords.has_value()) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } trackElement.x = newCoords->x; trackElement.y = newCoords->y; z = newCoords->z; const auto& ted = GetTrackElementDescriptor(trackElement.element->AsTrack()->GetTrackType()); - const rct_track_coordinates* trackCoordinates = &ted.Coordinates; + const TrackCoordinates* trackCoordinates = &ted.Coordinates; const auto* trackBlock = ted.Block; // Used in the following loop to know when we have // completed all of the elements and are back at the @@ -213,7 +215,7 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& // Remove this check for new track design format if (trackElement.element->AsTrack()->GetTrackType() > TrackElemType::HighestAlias) { - return STR_TRACK_ELEM_UNSUPPORTED_TD6; + return { false, STR_TRACK_ELEM_UNSUPPORTED_TD6 }; } TrackDesignTrackElement track{}; @@ -241,7 +243,7 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& track.flags = trackFlags; track_elements.push_back(track); - if (!track_block_get_next(&trackElement, &trackElement, nullptr, nullptr)) + if (!TrackBlockGetNext(&trackElement, &trackElement, nullptr, nullptr)) { break; } @@ -261,7 +263,7 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& if (track_elements.size() > RCT2::Limits::TD6MaxTrackElements) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } } while (trackElement.element != initialMap); @@ -322,7 +324,7 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& if (z > 127 || z < -126) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } entrance.z = z; @@ -336,7 +338,7 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& } } - TrackDesignPreviewDrawOutlines(tds, this, GetOrAllocateRide(PreviewRideId), { 4096, 4096, 0, _currentTrackPieceDirection }); + TrackDesignPreviewDrawOutlines(tds, this, RideGetTemporaryForPreview(), { 4096, 4096, 0, _currentTrackPieceDirection }); // Resave global vars for scenery reasons. tds.Origin = startPos; @@ -347,16 +349,16 @@ StringId TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& space_required_x = ((tds.PreviewMax.x - tds.PreviewMin.x) / 32) + 1; space_required_y = ((tds.PreviewMax.y - tds.PreviewMin.y) / 32) + 1; - return STR_NONE; + return { true }; } -StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& ride) +ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& ride) { auto startLoc = MazeGetFirstElement(ride); if (startLoc.element == nullptr) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } tds.Origin = { startLoc.x, startLoc.y, startLoc.element->GetBaseZ() }; @@ -388,7 +390,7 @@ StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& r if (maze_elements.size() >= 2000) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } } while (!(tileElement++)->IsLastForTile()); } @@ -398,7 +400,7 @@ StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& r auto location = ride.GetStation().Entrance; if (location.IsNull()) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } CoordsXY entranceLoc = location.ToCoordsXY(); @@ -406,7 +408,7 @@ StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& r do { if (tileElement == nullptr) - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; if (tileElement->GetType() != TileElementType::Entrance) continue; if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_ENTRANCE) @@ -427,13 +429,13 @@ StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& r location = ride.GetStation().Exit; if (location.IsNull()) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } CoordsXY exitLoc = location.ToCoordsXY(); tileElement = MapGetFirstElementAt(exitLoc); if (tileElement == nullptr) - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; do { if (tileElement->GetType() != TileElementType::Entrance) @@ -455,7 +457,7 @@ StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& r // Save global vars as they are still used by scenery???? int32_t startZ = tds.Origin.z; - TrackDesignPreviewDrawOutlines(tds, this, GetOrAllocateRide(PreviewRideId), { 4096, 4096, 0, _currentTrackPieceDirection }); + TrackDesignPreviewDrawOutlines(tds, this, RideGetTemporaryForPreview(), { 4096, 4096, 0, _currentTrackPieceDirection }); tds.Origin = { startLoc.x, startLoc.y, startZ }; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; @@ -464,7 +466,7 @@ StringId TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, const Ride& r space_required_x = ((tds.PreviewMax.x - tds.PreviewMin.x) / 32) + 1; space_required_y = ((tds.PreviewMax.y - tds.PreviewMin.y) / 32) + 1; - return STR_NONE; + return { true }; } CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride) @@ -493,7 +495,7 @@ CoordsXYE TrackDesign::MazeGetFirstElement(const Ride& ride) return tile; } -StringId TrackDesign::CreateTrackDesignScenery(TrackDesignState& tds) +ResultWithMessage TrackDesign::CreateTrackDesignScenery(TrackDesignState& tds) { scenery_elements = _trackSavedTileElementsDesc; // Run an element loop @@ -547,17 +549,17 @@ StringId TrackDesign::CreateTrackDesignScenery(TrackDesignState& tds) if (rotatedRelativeMapPos.x > 127 * COORDS_XY_STEP || rotatedRelativeMapPos.y > 127 * COORDS_XY_STEP || rotatedRelativeMapPos.x < -126 * COORDS_XY_STEP || rotatedRelativeMapPos.y < -126 * COORDS_XY_STEP) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } if (relativeMapPosition.z > 127 * COORDS_Z_STEP || relativeMapPosition.z < -126 * COORDS_Z_STEP) { - return STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY; + return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; } scenery.loc = CoordsXYZ(rotatedRelativeMapPos, relativeMapPosition.z); } - return STR_NONE; + return { true }; } void TrackDesign::Serialise(DataSerialiser& stream) @@ -627,9 +629,9 @@ std::unique_ptr TrackDesignImport(const utf8* path) } catch (const std::exception& e) { - log_error("Unable to load track design: %s", e.what()); + LOG_ERROR("Unable to load track design: %s", e.what()); } - log_verbose("track_design_open(\"%s\")", path); + LOG_VERBOSE("track_design_open(\"%s\")", path); return nullptr; } @@ -779,7 +781,7 @@ static void TrackDesignMirrorScenery(TrackDesign* td6) { auto* sceneryEntry = reinterpret_cast(obj->GetLegacyData()); int16_t x1 = 0, x2 = 0, y1 = 0, y2 = 0; - for (rct_large_scenery_tile* tile = sceneryEntry->tiles; tile->x_offset != -1; tile++) + for (LargeSceneryTile* tile = sceneryEntry->tiles; tile->x_offset != -1; tile++) { if (x1 > tile->x_offset) { @@ -921,7 +923,7 @@ static void TrackDesignMirrorMaze(TrackDesign* td6) uint16_t maze_entry = maze.maze_entry; uint16_t new_entry = 0; - for (uint8_t position = bitscanforward(maze_entry); position != 0xFF; position = bitscanforward(maze_entry)) + for (uint8_t position = UtilBitScanForward(maze_entry); position != 0xFF; position = UtilBitScanForward(maze_entry)) { maze_entry &= ~(1 << position); new_entry |= (1 << maze_segment_mirror_map[position]); @@ -936,7 +938,8 @@ static void TrackDesignMirrorMaze(TrackDesign* td6) */ void TrackDesignMirror(TrackDesign* td6) { - if (td6->type == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(td6->type); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { TrackDesignMirrorMaze(td6); } @@ -990,7 +993,7 @@ static GameActions::Result TrackDesignPlaceSceneryElementRemoveGhost( uint8_t quadrant = (scenery.flags >> 2) + _currentTrackPieceDirection; quadrant &= 3; - auto* sceneryEntry = GetSmallSceneryEntry(entryInfo->Index); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(entryInfo->Index); if (!(!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_FULL_TILE) && sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_DIAGONAL)) && sceneryEntry->HasFlag( SMALL_SCENERY_FLAG_DIAGONAL | SMALL_SCENERY_FLAG_HALF_SPACE | SMALL_SCENERY_FLAG_THREE_QUARTERS)) @@ -1052,7 +1055,7 @@ static GameActions::Result TrackDesignPlaceSceneryElement( return GameActions::Result(); } - money32 cost = 0; + 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) @@ -1236,7 +1239,7 @@ static GameActions::Result TrackDesignPlaceSceneryElement( constructFlags |= PathConstructFlag::IsQueue; if (entryInfo->Type == ObjectType::Paths) constructFlags |= PathConstructFlag::IsLegacyPathObject; - auto footpathPlaceAction = FootpathPlaceFromTrackAction( + auto footpathPlaceAction = FootpathLayoutPlaceAction( { mapCoord.x, mapCoord.y, z }, slope, entryInfo->Index, entryInfo->SecondaryIndex, edges, constructFlags); footpathPlaceAction.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&footpathPlaceAction) @@ -1307,7 +1310,7 @@ static GameActions::Result TrackDesignPlaceAllScenery( { const auto& origin = tds.Origin; - money32 cost = 0; + money64 cost = 0; for (uint8_t mode = 0; mode <= 1; mode++) { @@ -1345,7 +1348,8 @@ static GameActions::Result TrackDesignPlaceAllScenery( return res; } -static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesign* td6, const CoordsXYZ& coords, Ride* ride) +static GameActions::Result TrackDesignPlaceMaze( + TrackDesignState& tds, TrackDesign* td6, const CoordsXYZ& coords, const Ride& ride) { if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES) { @@ -1355,7 +1359,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi } tds.PlaceZ = 0; - money32 totalCost = 0; + money64 totalCost = 0; for (const auto& maze_element : td6->maze_elements) { @@ -1375,7 +1379,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi || tds.PlaceOperation == PTD_OPERATION_PLACE_GHOST || tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW) { uint8_t flags; - money32 cost = 0; + money64 cost = 0; uint16_t maze_entry; switch (maze_element.type) { @@ -1412,7 +1416,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi flags |= GAME_COMMAND_FLAG_REPLAY; } auto rideEntranceExitPlaceAction = RideEntranceExitPlaceAction( - mapCoord, rotation, ride->id, StationIndex::FromUnderlying(0), false); + mapCoord, rotation, ride.id, StationIndex::FromUnderlying(0), false); rideEntranceExitPlaceAction.SetFlags(flags); auto res = GameActions::ExecuteNested(&rideEntranceExitPlaceAction); if (res.Error != GameActions::Status::Ok) @@ -1457,7 +1461,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi flags |= GAME_COMMAND_FLAG_REPLAY; } auto rideEntranceExitPlaceAction = RideEntranceExitPlaceAction( - mapCoord, rotation, ride->id, StationIndex::FromUnderlying(0), true); + mapCoord, rotation, ride.id, StationIndex::FromUnderlying(0), true); rideEntranceExitPlaceAction.SetFlags(flags); auto res = GameActions::ExecuteNested(&rideEntranceExitPlaceAction); if (res.Error != GameActions::Status::Ok) @@ -1494,7 +1498,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi flags |= GAME_COMMAND_FLAG_REPLAY; } - auto mazePlace = MazePlaceTrackAction({ mapCoord, coords.z }, ride->id, maze_entry); + auto mazePlace = MazePlaceTrackAction({ mapCoord, coords.z }, ride.id, maze_entry); mazePlace.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&mazePlace) : GameActions::QueryNested(&mazePlace); @@ -1545,7 +1549,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi if (tds.PlaceOperation == PTD_OPERATION_REMOVE_GHOST) { - auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); + 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); GameActions::Execute(&gameAction); } @@ -1558,7 +1562,7 @@ static GameActions::Result TrackDesignPlaceMaze(TrackDesignState& tds, TrackDesi return res; } -static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesign* td6, const CoordsXYZ& origin, Ride* ride) +static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesign* td6, const CoordsXYZ& origin, Ride& ride) { tds.Origin = origin; if (tds.PlaceOperation == PTD_OPERATION_DRAW_OUTLINES) @@ -1569,7 +1573,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi } tds.PlaceZ = 0; - money32 totalCost = 0; + money64 totalCost = 0; uint8_t rotation = _currentTrackPieceDirection; // Track elements @@ -1584,7 +1588,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi switch (tds.PlaceOperation) { case PTD_OPERATION_DRAW_OUTLINES: - for (const rct_preview_track* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) + for (const PreviewTrack* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) { auto tile = CoordsXY{ newCoords } + CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(rotation); TrackDesignUpdatePreviewBounds(tds, { tile, newCoords.z }); @@ -1593,8 +1597,8 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi break; case PTD_OPERATION_REMOVE_GHOST: { - const rct_track_coordinates* trackCoordinates = &ted.Coordinates; - const rct_preview_track* trackBlock = ted.Block; + const TrackCoordinates* trackCoordinates = &ted.Coordinates; + const PreviewTrack* trackBlock = ted.Block; int32_t tempZ = newCoords.z - trackCoordinates->z_begin + trackBlock->z; auto trackRemoveAction = TrackRemoveAction( trackType, 0, { newCoords, tempZ, static_cast(rotation & 3) }); @@ -1608,7 +1612,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi case PTD_OPERATION_PLACE_GHOST: case PTD_OPERATION_PLACE_TRACK_PREVIEW: { - const rct_track_coordinates* trackCoordinates = &ted.Coordinates; + const TrackCoordinates* trackCoordinates = &ted.Coordinates; // di int16_t tempZ = newCoords.z - trackCoordinates->z_begin; @@ -1648,7 +1652,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi } auto trackPlaceAction = TrackPlaceAction( - ride->id, trackType, ride->type, { newCoords, tempZ, static_cast(rotation) }, brakeSpeed, + ride.id, trackType, ride.type, { newCoords, tempZ, static_cast(rotation) }, brakeSpeed, trackColour, seatRotation, liftHillAndAlternativeState, true); trackPlaceAction.SetFlags(flags); @@ -1665,7 +1669,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi case PTD_OPERATION_GET_PLACE_Z: { int32_t tempZ = newCoords.z - ted.Coordinates.z_begin; - for (const rct_preview_track* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) + for (const PreviewTrack* trackBlock = ted.Block; trackBlock->index != 0xFF; trackBlock++) { auto tile = CoordsXY{ newCoords } + CoordsXY{ trackBlock->x, trackBlock->y }.Rotate(rotation); if (!MapIsLocationValid(tile)) @@ -1704,7 +1708,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi } } - const rct_track_coordinates& track_coordinates = ted.Coordinates; + const TrackCoordinates& track_coordinates = ted.Coordinates; auto offsetAndRotatedTrack = CoordsXY{ newCoords } + CoordsXY{ track_coordinates.x, track_coordinates.y }.Rotate(rotation); @@ -1758,7 +1762,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi { continue; } - if (tile_element->base_height != newCoords.z) + if (tile_element->BaseHeight != newCoords.z) { continue; } @@ -1785,7 +1789,7 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi } auto rideEntranceExitPlaceAction = RideEntranceExitPlaceAction( - newCoords, rotation, ride->id, stationIndex, entrance.isExit); + newCoords, rotation, ride.id, stationIndex, entrance.isExit); rideEntranceExitPlaceAction.SetFlags(flags); auto res = flags & GAME_COMMAND_FLAG_APPLY ? GameActions::ExecuteNested(&rideEntranceExitPlaceAction) : GameActions::QueryNested(&rideEntranceExitPlaceAction); @@ -1822,8 +1826,8 @@ static GameActions::Result TrackDesignPlaceRide(TrackDesignState& tds, TrackDesi if (tds.PlaceOperation == PTD_OPERATION_REMOVE_GHOST) { - ride->ValidateStations(); - ride->Delete(); + ride.ValidateStations(); + ride.Delete(); } auto res = GameActions::Result(GameActions::Status::Ok, STR_NONE, STR_NONE); @@ -1846,7 +1850,7 @@ 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, TrackDesign* td6, uint8_t ptdOperation, bool placeScenery, Ride& ride, const CoordsXYZD& coords) { _trackDesignPlaceStateSceneryUnavailable = false; _trackDesignPlaceStateEntranceExitPlaced = false; @@ -1871,11 +1875,12 @@ static GameActions::Result TrackDesignPlaceVirtual( // NOTE: We need to save this, in networked games this would affect all clients otherwise. auto savedRideId = _currentRideIndex; auto savedTrackPieceDirection = _currentTrackPieceDirection; - _currentRideIndex = ride->id; + _currentRideIndex = ride.id; _currentTrackPieceDirection = coords.direction; GameActions::Result trackPlaceRes; - if (td6->type == RIDE_TYPE_MAZE) + const auto& rtd = GetRideTypeDescriptor(td6->type); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { trackPlaceRes = TrackDesignPlaceMaze(tds, td6, coords, ride); } @@ -1913,7 +1918,7 @@ static GameActions::Result TrackDesignPlaceVirtual( return res; } -GameActions::Result TrackDesignPlace(TrackDesign* td6, uint32_t flags, bool placeScenery, Ride* ride, const CoordsXYZD& coords) +GameActions::Result TrackDesignPlace(TrackDesign* td6, 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; if ((flags & GAME_COMMAND_FLAG_APPLY) != 0 && (flags & GAME_COMMAND_FLAG_GHOST) != 0) @@ -1927,18 +1932,18 @@ GameActions::Result TrackDesignPlace(TrackDesign* td6, uint32_t flags, bool plac return TrackDesignPlaceVirtual(tds, td6, ptdOperation, placeScenery, ride, coords); } -void TrackDesignPreviewRemoveGhosts(TrackDesign* td6, Ride* ride, const CoordsXYZD& coords) +void TrackDesignPreviewRemoveGhosts(TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) { TrackDesignState tds{}; TrackDesignPlaceVirtual(tds, td6, PTD_OPERATION_REMOVE_GHOST, true, ride, coords); } -void TrackDesignPreviewDrawOutlines(TrackDesignState& tds, TrackDesign* td6, Ride* ride, const CoordsXYZD& coords) +void TrackDesignPreviewDrawOutlines(TrackDesignState& tds, TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) { TrackDesignPlaceVirtual(tds, td6, PTD_OPERATION_DRAW_OUTLINES, true, ride, coords); } -static int32_t TrackDesignGetZPlacement(TrackDesignState& tds, TrackDesign* td6, Ride* ride, const CoordsXYZD& coords) +static int32_t TrackDesignGetZPlacement(TrackDesignState& tds, TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) { TrackDesignPlaceVirtual(tds, td6, PTD_OPERATION_GET_PLACE_Z, true, ride, coords); @@ -1947,13 +1952,13 @@ static int32_t TrackDesignGetZPlacement(TrackDesignState& tds, TrackDesign* td6, return tds.PlaceZ - tds.PlaceSceneryZ; } -int32_t TrackDesignGetZPlacement(TrackDesign* td6, Ride* ride, const CoordsXYZD& coords) +int32_t TrackDesignGetZPlacement(TrackDesign* td6, Ride& ride, const CoordsXYZD& coords) { TrackDesignState tds{}; return TrackDesignGetZPlacement(tds, td6, ride, coords); } -static money32 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flags, RideId* outRideIndex) +static money64 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flags, RideId* outRideIndex) { // Don't set colours as will be set correctly later. auto gameAction = RideCreateAction(type, subType, 0, 0, gLastEntranceStyle); @@ -1961,10 +1966,10 @@ static money32 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flag auto res = GameActions::ExecuteNested(&gameAction); - // Callee's of this function expect MONEY32_UNDEFINED in case of failure. + // Callee's of this function expect MONEY64_UNDEFINED in case of failure. if (res.Error != GameActions::Status::Ok) { - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; } *outRideIndex = res.GetData(); @@ -1978,7 +1983,7 @@ static money32 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flag * ebx = ride_id * cost = edi */ -static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, money32* cost, Ride** outRide, uint8_t* flags) +static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, money64* cost, Ride** outRide, uint8_t* flags) { *outRide = nullptr; *flags = 0; @@ -1988,12 +1993,12 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon 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) == MONEY32_UNDEFINED) + if (TrackDesignCreateRide(td6->type, entry_index, rideCreateFlags, &rideIndex) == MONEY64_UNDEFINED) { return false; } - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return false; @@ -2031,7 +2036,7 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon _currentTrackPieceDirection = 0; int32_t z = TrackDesignGetZPlacement( - tds, td6, GetOrAllocateRide(PreviewRideId), { mapSize.x, mapSize.y, 16, _currentTrackPieceDirection }); + tds, td6, RideGetTemporaryForPreview(), { mapSize.x, mapSize.y, 16, _currentTrackPieceDirection }); if (tds.HasScenery) { @@ -2048,7 +2053,7 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon } auto res = TrackDesignPlaceVirtual( - tds, td6, PTD_OPERATION_PLACE_TRACK_PREVIEW, placeScenery, ride, + tds, td6, PTD_OPERATION_PLACE_TRACK_PREVIEW, placeScenery, *ride, { mapSize.x, mapSize.y, z, _currentTrackPieceDirection }); gParkFlags = backup_park_flags; @@ -2058,7 +2063,7 @@ static bool TrackDesignPlacePreview(TrackDesignState& tds, TrackDesign* td6, mon { *flags |= TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE; } - else if (!ride_entry_is_invented(entry_index) && !gCheatsIgnoreResearchStatus) + else if (!RideEntryIsInvented(entry_index) && !gCheatsIgnoreResearchStatus) { *flags |= TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE; } @@ -2094,7 +2099,7 @@ void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels) TrackDesignState tds{}; - money32 cost; + money64 cost; Ride* ride; uint8_t flags; if (!TrackDesignPlacePreview(tds, td6, &cost, &ride, &flags)) @@ -2140,7 +2145,7 @@ void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels) size_x = zoom_level.ApplyTo(370); size_y = zoom_level.ApplyTo(217); - rct_viewport view; + Viewport view; view.width = 370; view.height = 217; view.view_width = size_x; @@ -2149,7 +2154,7 @@ void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels) view.zoom = zoom_level; view.flags = VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_ENTITIES; - rct_drawpixelinfo dpi; + DrawPixelInfo dpi; dpi.zoom_level = zoom_level; dpi.x = 0; dpi.y = 0; @@ -2167,7 +2172,7 @@ void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels) gCurrentRotation = i; view.viewPos = Translate3DTo2DWithZ(i, centre) - offset; - viewport_paint(&view, &dpi, { view.viewPos, view.viewPos + ScreenCoordsXY{ size_x, size_y } }); + ViewportPaint(&view, &dpi, { view.viewPos, view.viewPos + ScreenCoordsXY{ size_x, size_y } }); dpi.bits += TRACK_PREVIEW_IMAGE_SIZE; } @@ -2206,7 +2211,7 @@ static void TrackDesignPreviewClearMap() SetTileElements(std::move(tileElements)); } -bool track_design_are_entrance_and_exit_placed() +bool TrackDesignAreEntranceAndExitPlaced() { return _trackDesignPlaceStateEntranceExitPlaced; } diff --git a/src/openrct2/ride/TrackDesign.h b/src/openrct2/ride/TrackDesign.h index 416f935a66..f5c3d0c2ce 100644 --- a/src/openrct2/ride/TrackDesign.h +++ b/src/openrct2/ride/TrackDesign.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,6 +20,7 @@ #include struct Ride; +struct ResultWithMessage; #define TRACK_PREVIEW_IMAGE_SIZE (370 * 217) @@ -102,7 +103,7 @@ struct TrackDesign { uint8_t type; uint8_t vehicle_type; - money32 cost; + money64 cost; uint32_t flags; RideMode ride_mode; uint8_t track_flags; @@ -129,7 +130,7 @@ struct TrackDesign uint8_t excitement; uint8_t intensity; uint8_t nausea; - money16 upkeep_cost; + money64 upkeep_cost; uint8_t track_spine_colour[RCT12::Limits::NumColourSchemes]; uint8_t track_rail_colour[RCT12::Limits::NumColourSchemes]; uint8_t track_support_colour[RCT12::Limits::NumColourSchemes]; @@ -148,14 +149,14 @@ struct TrackDesign std::string name; public: - StringId CreateTrackDesign(TrackDesignState& tds, const Ride& ride); - StringId CreateTrackDesignScenery(TrackDesignState& tds); + ResultWithMessage CreateTrackDesign(TrackDesignState& tds, const Ride& ride); + ResultWithMessage CreateTrackDesignScenery(TrackDesignState& tds); void Serialise(DataSerialiser& stream); private: uint8_t _saveDirection; - StringId CreateTrackDesignTrack(TrackDesignState& tds, const Ride& ride); - StringId CreateTrackDesignMaze(TrackDesignState& tds, const Ride& ride); + ResultWithMessage CreateTrackDesignTrack(TrackDesignState& tds, const Ride& ride); + ResultWithMessage CreateTrackDesignMaze(TrackDesignState& tds, const Ride& ride); CoordsXYE MazeGetFirstElement(const Ride& ride); }; @@ -210,8 +211,6 @@ enum MAZE_ELEMENT_TYPE_EXIT = (1 << 7) }; -static constexpr RideId PreviewRideId = RideId::FromUnderlying(0); - extern bool gTrackDesignSceneryToggle; extern bool _trackDesignDrawingPreview; @@ -224,10 +223,10 @@ extern RideId gTrackDesignSaveRideIndex; void TrackDesignMirror(TrackDesign* td6); -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(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); /////////////////////////////////////////////////////////////////////////////// // Track design preview @@ -237,14 +236,14 @@ void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels); /////////////////////////////////////////////////////////////////////////////// // Track design saving /////////////////////////////////////////////////////////////////////////////// -void track_design_save_init(); -void track_design_save_reset_scenery(); -bool track_design_save_contains_tile_element(const TileElement* tileElement); -void track_design_save_select_nearby_scenery(RideId rideIndex); -void track_design_save_select_tile_element( +void TrackDesignSaveInit(); +void TrackDesignSaveResetScenery(); +bool TrackDesignSaveContainsTileElement(const TileElement* tileElement); +void TrackDesignSaveSelectNearbyScenery(RideId rideIndex); +void TrackDesignSaveSelectTileElement( ViewportInteractionItem interactionType, const CoordsXY& loc, TileElement* tileElement, bool collect); -bool track_design_are_entrance_and_exit_placed(); +bool TrackDesignAreEntranceAndExitPlaced(); extern std::vector _trackSavedTileElementsDesc; extern std::vector _trackSavedTileElements; diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index 09cfed73c7..ea7fa3064f 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -284,7 +284,7 @@ private: { return a.RideType < b.RideType; } - return strlogicalcmp(a.Name.c_str(), b.Name.c_str()) < 0; + return StrLogicalCmp(a.Name.c_str(), b.Name.c_str()) < 0; }); } @@ -317,26 +317,26 @@ std::unique_ptr CreateTrackDesignRepository(const std::s return std::make_unique(env); } -void track_repository_scan() +void TrackRepositoryScan() { ITrackDesignRepository* repo = GetContext()->GetTrackDesignRepository(); repo->Scan(LocalisationService_GetCurrentLanguage()); } -bool track_repository_delete(const u8string& path) +bool TrackRepositoryDelete(const u8string& path) { ITrackDesignRepository* repo = GetContext()->GetTrackDesignRepository(); return repo->Delete(path); } -bool track_repository_rename(const u8string& path, const u8string& newName) +bool TrackRepositoryRename(const u8string& path, const u8string& newName) { ITrackDesignRepository* repo = GetContext()->GetTrackDesignRepository(); std::string newPath = repo->Rename(path, newName); return !newPath.empty(); } -bool track_repository_install(const u8string& srcPath, const u8string& name) +bool TrackRepositoryInstall(const u8string& srcPath, const u8string& name) { ITrackDesignRepository* repo = GetContext()->GetTrackDesignRepository(); std::string newPath = repo->Install(srcPath, name); diff --git a/src/openrct2/ride/TrackDesignRepository.h b/src/openrct2/ride/TrackDesignRepository.h index 35dd2e7f79..cdfceb2f0b 100644 --- a/src/openrct2/ride/TrackDesignRepository.h +++ b/src/openrct2/ride/TrackDesignRepository.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -47,7 +47,7 @@ struct ITrackDesignRepository const std::shared_ptr& env); [[nodiscard]] std::string GetNameFromTrackPath(const std::string& path); -void track_repository_scan(); -bool track_repository_delete(const u8string& path); -bool track_repository_rename(const u8string& path, const u8string& newName); -bool track_repository_install(const u8string& srcPath, const u8string& name); +void TrackRepositoryScan(); +bool TrackRepositoryDelete(const u8string& path); +bool TrackRepositoryRename(const u8string& path, const u8string& newName); +bool TrackRepositoryInstall(const u8string& srcPath, const u8string& name); diff --git a/src/openrct2/ride/TrackDesignSave.cpp b/src/openrct2/ride/TrackDesignSave.cpp index 16664f51f6..6a13be56e8 100644 --- a/src/openrct2/ride/TrackDesignSave.cpp +++ b/src/openrct2/ride/TrackDesignSave.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,9 +24,7 @@ #include "../util/Util.h" #include "../windows/Intent.h" #include "../world/Footpath.h" -#include "../world/LargeScenery.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Wall.h" #include "RideData.h" #include "Station.h" @@ -69,7 +67,7 @@ static TrackDesignAddStatus track_design_save_add_tile_element( static void track_design_save_remove_tile_element( ViewportInteractionItem interactionType, const CoordsXY& loc, TileElement* tileElement); -void track_design_save_init() +void TrackDesignSaveInit() { _trackSavedTileElements.clear(); _trackSavedTileElementsDesc.clear(); @@ -79,10 +77,10 @@ void track_design_save_init() * * rct2: 0x006D2B07 */ -void track_design_save_select_tile_element( +void TrackDesignSaveSelectTileElement( ViewportInteractionItem interactionType, const CoordsXY& loc, TileElement* tileElement, bool collect) { - if (track_design_save_contains_tile_element(tileElement)) + if (TrackDesignSaveContainsTileElement(tileElement)) { if (!collect) { @@ -106,9 +104,9 @@ void track_design_save_select_tile_element( * * rct2: 0x006D303D */ -void track_design_save_select_nearby_scenery(RideId rideIndex) +void TrackDesignSaveSelectNearbyScenery(RideId rideIndex) { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do { @@ -118,20 +116,20 @@ void track_design_save_select_nearby_scenery(RideId rideIndex) } } while (TileElementIteratorNext(&it)); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } /** * * rct2: 0x006D3026 */ -void track_design_save_reset_scenery() +void TrackDesignSaveResetScenery() { - track_design_save_init(); - gfx_invalidate_screen(); + TrackDesignSaveInit(); + GfxInvalidateScreen(); } -bool track_design_save_contains_tile_element(const TileElement* tileElement) +bool TrackDesignSaveContainsTileElement(const TileElement* tileElement) { for (auto& tile : _trackSavedTileElements) { @@ -146,7 +144,7 @@ bool track_design_save_contains_tile_element(const TileElement* tileElement) static int32_t tile_element_get_total_element_count(TileElement* tileElement) { int32_t elementCount; - rct_large_scenery_tile* tile; + LargeSceneryTile* tile; switch (tileElement->GetType()) { @@ -215,7 +213,7 @@ static bool track_design_is_supported_object(const Object* obj) } static void track_design_save_push_tile_element_desc( - const rct_object_entry& entry, const CoordsXYZ& loc, uint8_t flags, uint8_t primaryColour, uint8_t secondaryColour) + const RCTObjectEntry& entry, const CoordsXYZ& loc, uint8_t flags, uint8_t primaryColour, uint8_t secondaryColour) { TrackDesignSceneryElement item{}; item.scenery_object = ObjectEntryDescriptor(entry); @@ -243,7 +241,7 @@ static void track_design_save_push_tile_element_desc( static TrackDesignAddStatus track_design_save_add_scenery(const CoordsXY& loc, SmallSceneryElement* sceneryElement) { auto entryIndex = sceneryElement->GetEntryIndex(); - auto obj = object_entry_get_object(ObjectType::SmallScenery, entryIndex); + auto obj = ObjectEntryGetObject(ObjectType::SmallScenery, entryIndex); if (obj != nullptr && track_design_is_supported_object(obj)) { uint8_t flags = 0; @@ -272,7 +270,7 @@ static TrackDesignAddStatus track_design_save_add_large_scenery(const CoordsXY& auto sceneryEntry = reinterpret_cast(obj->GetLegacyData()); auto sceneryTiles = sceneryEntry->tiles; - int32_t z = tileElement->base_height; + int32_t z = tileElement->BaseHeight; auto direction = tileElement->GetDirection(); auto sequence = tileElement->GetSequenceIndex(); @@ -315,7 +313,7 @@ static TrackDesignAddStatus track_design_save_add_large_scenery(const CoordsXY& static TrackDesignAddStatus track_design_save_add_wall(const CoordsXY& loc, WallElement* wallElement) { auto entryIndex = wallElement->GetEntryIndex(); - auto obj = object_entry_get_object(ObjectType::Walls, entryIndex); + auto obj = ObjectEntryGetObject(ObjectType::Walls, entryIndex); if (obj != nullptr && track_design_is_supported_object(obj)) { uint8_t flags = 0; @@ -334,9 +332,9 @@ static TrackDesignAddStatus track_design_save_add_wall(const CoordsXY& loc, Wall return TrackDesignAddStatus::Fail(STR_UNSUPPORTED_OBJECT_FORMAT); } -static std::optional track_design_save_footpath_get_best_entry(PathElement* pathElement) +static std::optional track_design_save_footpath_get_best_entry(PathElement* pathElement) { - rct_object_entry pathEntry; + RCTObjectEntry pathEntry; auto legacyPathObj = pathElement->GetLegacyPathEntry(); if (legacyPathObj != nullptr) { @@ -461,7 +459,7 @@ static void track_design_save_pop_tile_element_desc(const ObjectEntryDescriptor& static void track_design_save_remove_scenery(const CoordsXY& loc, SmallSceneryElement* sceneryElement) { auto entryIndex = sceneryElement->GetEntryIndex(); - auto obj = object_entry_get_object(ObjectType::SmallScenery, entryIndex); + auto obj = ObjectEntryGetObject(ObjectType::SmallScenery, entryIndex); if (obj != nullptr) { uint8_t flags = 0; @@ -477,7 +475,7 @@ static void track_design_save_remove_large_scenery(const CoordsXY& loc, LargeSce { if (tileElement == nullptr) { - log_warning("Null tile element"); + LOG_WARNING("Null tile element"); return; } @@ -489,7 +487,7 @@ static void track_design_save_remove_large_scenery(const CoordsXY& loc, LargeSce auto sceneryEntry = reinterpret_cast(obj->GetLegacyData()); auto sceneryTiles = sceneryEntry->tiles; - int32_t z = tileElement->base_height; + int32_t z = tileElement->BaseHeight; auto direction = tileElement->GetDirection(); auto sequence = tileElement->GetSequenceIndex(); @@ -526,7 +524,7 @@ static void track_design_save_remove_large_scenery(const CoordsXY& loc, LargeSce static void track_design_save_remove_wall(const CoordsXY& loc, WallElement* wallElement) { auto entryIndex = wallElement->GetEntryIndex(); - auto obj = object_entry_get_object(ObjectType::Walls, entryIndex); + auto obj = ObjectEntryGetObject(ObjectType::Walls, entryIndex); if (obj != nullptr) { uint8_t flags = 0; @@ -647,7 +645,7 @@ static void track_design_save_select_nearby_scenery_for_tile(RideId rideIndex, i if (interactionType != ViewportInteractionItem::None) { - if (!track_design_save_contains_tile_element(tileElement)) + if (!TrackDesignSaveContainsTileElement(tileElement)) { track_design_save_add_tile_element(interactionType, TileCoordsXY(x, y).ToCoordsXY(), tileElement); } diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 614b11c7e7..4333bed1b9 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -231,7 +231,7 @@ enum SPR_STATION_COVER_OFFSET_TALL }; -bool track_paint_util_has_fence( +bool TrackPaintUtilHasFence( enum edge_t edge, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, uint8_t rotation) { const auto* stationObject = ride.GetStationObject(); @@ -262,7 +262,7 @@ bool track_paint_util_has_fence( return (entranceLoc != station.Entrance && entranceLoc != station.Exit); } -void track_paint_util_paint_floor( +void TrackPaintUtilPaintFloor( PaintSession& session, uint8_t edges, ImageId colourFlags, uint16_t height, const uint32_t floorSprites[4], const StationObject* stationStyle) { @@ -288,37 +288,37 @@ void track_paint_util_paint_floor( imageId = floorSprites[3]; } - PaintAddImageAsParent(session, colourFlags.WithIndex(imageId), { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height }); + PaintAddImageAsParent(session, colourFlags.WithIndex(imageId), { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); } -void track_paint_util_paint_fences( +void TrackPaintUtilPaintFences( PaintSession& session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, const ImageId colourFlags, uint16_t height, const uint32_t fenceSprites[4], uint8_t rotation) { - if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, rotation)) + if (edges & EDGE_NW && TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, rotation)) { PaintAddImageAsChild( session, colourFlags.WithIndex(fenceSprites[3]), { 0, 0, height }, { { 0, 2, height + 2 }, { 32, 1, 7 } }); } - if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, rotation)) + if (edges & EDGE_NE && TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, rotation)) { PaintAddImageAsChild( session, colourFlags.WithIndex(fenceSprites[0]), { 0, 0, height }, { { 2, 0, height + 2 }, { 1, 32, 7 } }); } - if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, rotation)) + if (edges & EDGE_SE && TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, rotation)) { PaintAddImageAsParent( session, colourFlags.WithIndex(fenceSprites[1]), { 0, 0, height }, { { 0, 30, height + 2 }, { 32, 1, 7 } }); } - if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, rotation)) + if (edges & EDGE_SW && TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, rotation)) { PaintAddImageAsParent( - session, colourFlags.WithIndex(fenceSprites[2]), { 0, 0, height }, { 1, 32, 7 }, { 30, 0, height + 2 }); + session, colourFlags.WithIndex(fenceSprites[2]), { 0, 0, height }, { { 30, 0, height + 2 }, { 1, 32, 7 } }); } } /* Supports are only placed every 2 tiles for flat pieces*/ -bool track_paint_util_should_paint_supports(const CoordsXY& position) +bool TrackPaintUtilShouldPaintSupports(const CoordsXY& position) { if ((position.x & (1 << 5)) == (position.y & (1 << 5))) return true; @@ -329,31 +329,31 @@ bool track_paint_util_should_paint_supports(const CoordsXY& position) return false; } -static void track_paint_util_draw_station_impl( +static void TrackPaintUtilDrawStationImpl( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB); -void track_paint_util_draw_station( +void TrackPaintUtilDrawStation( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement) { - track_paint_util_draw_station_impl(session, ride, direction, height, height, trackElement, 5, 7); + TrackPaintUtilDrawStationImpl(session, ride, direction, height, height, trackElement, 5, 7); } -void track_paint_util_draw_station_2( +void TrackPaintUtilDrawStation2( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB) { - track_paint_util_draw_station_impl(session, ride, direction, height, height, trackElement, fenceOffsetA, fenceOffsetB); + TrackPaintUtilDrawStationImpl(session, ride, direction, height, height, trackElement, fenceOffsetA, fenceOffsetB); } -void track_paint_util_draw_station_3( +void TrackPaintUtilDrawStation3( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, const TrackElement& trackElement) { - track_paint_util_draw_station_impl(session, ride, direction, height, coverHeight, trackElement, 5, 7); + TrackPaintUtilDrawStationImpl(session, ride, direction, height, coverHeight, trackElement, 5, 7); } -static void track_paint_util_draw_station_impl( +static void TrackPaintUtilDrawStationImpl( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB) { @@ -370,7 +370,7 @@ static void track_paint_util_draw_station_impl( if (direction == 0 || direction == 2) { // height += 5 (height + 5); - hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0) { @@ -397,7 +397,7 @@ static void track_paint_util_draw_station_impl( } PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 32, 8, 1 }); // height -= 5 (height) - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, coverHeight); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, coverHeight); // height += 5 (height + 5) if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0) @@ -416,7 +416,7 @@ static void track_paint_util_draw_station_impl( PaintAddImageAsParent(session, imageId, { 0, 24, height + fenceOffsetA }, { 32, 8, 1 }); // height += 2 (height + 7) - hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); if (hasFence) { if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0) @@ -446,7 +446,7 @@ static void track_paint_util_draw_station_impl( PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 }); } // height -= 7 (height) - track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, coverHeight); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, coverHeight); // height += 7 (height + 7) if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0) @@ -463,7 +463,7 @@ static void track_paint_util_draw_station_impl( else if (direction == 1 || direction == 3) { // height += 5 (height + 5); - hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3) { @@ -490,7 +490,7 @@ static void track_paint_util_draw_station_impl( } PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 8, 32, 1 }); // height -= 5 (height) - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, coverHeight); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, coverHeight); // height += 5 (height + 5) if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3) @@ -509,7 +509,7 @@ static void track_paint_util_draw_station_impl( PaintAddImageAsParent(session, imageId, { 24, 0, height + fenceOffsetA }, { 8, 32, 1 }); // height += 2 (height + 7) - hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); if (hasFence) { if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3) @@ -540,7 +540,7 @@ static void track_paint_util_draw_station_impl( } // height -= 7 (height) - track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, coverHeight); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, coverHeight); // height += 7 (height + 7) if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3) @@ -556,7 +556,7 @@ static void track_paint_util_draw_station_impl( } } -void track_paint_util_draw_station_inverted( +void TrackPaintUtilDrawStationInverted( PaintSession& session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t stationVariant) { @@ -573,7 +573,7 @@ void track_paint_util_draw_station_inverted( if (direction == 0 || direction == 2) { // height += 5 (height + 5); - hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0) { @@ -600,7 +600,7 @@ void track_paint_util_draw_station_inverted( } PaintAddImageAsParent(session, imageId, { 0, 0, height + 6 }, { 32, 8, 1 }); // height -= 5 (height) - track_paint_util_draw_station_covers_2(session, EDGE_NW, hasFence, stationObj, height, stationVariant); + TrackPaintUtilDrawStationCovers2(session, EDGE_NW, hasFence, stationObj, height, stationVariant); // height += 5 (height + 5) if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0) @@ -619,7 +619,7 @@ void track_paint_util_draw_station_inverted( PaintAddImageAsParent(session, imageId, { 0, 24, height + 6 }, { 32, 8, 1 }); // height += 2 (height + 7) - hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); if (hasFence) { if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0) @@ -649,7 +649,7 @@ void track_paint_util_draw_station_inverted( PaintAddImageAsParent(session, imageId, { 31, 23, height + 8 }, { 1, 8, 7 }); } // height -= 7 (height) - track_paint_util_draw_station_covers_2(session, EDGE_SE, hasFence, stationObj, height, stationVariant); + TrackPaintUtilDrawStationCovers2(session, EDGE_SE, hasFence, stationObj, height, stationVariant); // height += 7 (height + 7) if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0) @@ -666,7 +666,7 @@ void track_paint_util_draw_station_inverted( else if (direction == 1 || direction == 3) { // height += 5 (height + 5); - hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3) { @@ -693,7 +693,7 @@ void track_paint_util_draw_station_inverted( } PaintAddImageAsParent(session, imageId, { 0, 0, height + 6 }, { 8, 32, 1 }); // height -= 5 (height) - track_paint_util_draw_station_covers_2(session, EDGE_NE, hasFence, stationObj, height, stationVariant); + TrackPaintUtilDrawStationCovers2(session, EDGE_NE, hasFence, stationObj, height, stationVariant); // height += 5 (height + 5) if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3) @@ -712,7 +712,7 @@ void track_paint_util_draw_station_inverted( PaintAddImageAsParent(session, imageId, { 24, 0, height + 6 }, { 8, 32, 1 }); // height += 2 (height + 7) - hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); if (hasFence) { if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3) @@ -743,7 +743,7 @@ void track_paint_util_draw_station_inverted( } // height -= 7 (height) - track_paint_util_draw_station_covers_2(session, EDGE_SW, hasFence, stationObj, height, stationVariant); + TrackPaintUtilDrawStationCovers2(session, EDGE_SW, hasFence, stationObj, height, stationVariant); // height += 7 (height + 7) if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3) @@ -759,13 +759,13 @@ void track_paint_util_draw_station_inverted( } } -bool track_paint_util_draw_station_covers( +bool TrackPaintUtilDrawStationCovers( PaintSession& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height) { - return track_paint_util_draw_station_covers_2(session, edge, hasFence, stationObject, height, STATION_VARIANT_BASIC); + return TrackPaintUtilDrawStationCovers2(session, edge, hasFence, stationObject, height, STATION_VARIANT_BASIC); } -bool track_paint_util_draw_station_covers_2( +bool TrackPaintUtilDrawStationCovers2( PaintSession& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height, uint8_t stationVariant) { @@ -822,8 +822,7 @@ bool track_paint_util_draw_station_covers_2( PaintAddImageAsParent(session, imageId, offset, boundBox); // Glass - if (session.TrackColours[SCHEME_MISC].ToUInt32() == IMAGE_TYPE_REMAP - && (stationObject->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)) + if (session.TrackColours[SCHEME_MISC] == TrackGhost && (stationObject->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)) { imageId = ImageId(baseImageIndex + imageOffset + 12).WithTransparency(imageTemplate.GetPrimary()); PaintAddImageAsChild(session, imageId, offset, boundBox); @@ -831,7 +830,7 @@ bool track_paint_util_draw_station_covers_2( return true; } -void track_paint_util_draw_narrow_station_platform( +void TrackPaintUtilDrawNarrowStationPlatform( PaintSession& session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset, const TrackElement& trackElement) { @@ -842,45 +841,45 @@ void track_paint_util_draw_narrow_station_platform( if (direction & 1) { - bool hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); + bool hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); ImageId imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE)); PaintAddImageAsParent(session, imageId, { 0, 0, height + zOffset }, { 8, 32, 1 }); - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height); imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_NARROW_EDGE_SW); PaintAddImageAsParent(session, imageId, { 24, 0, height + zOffset }, { 8, 32, 1 }); - hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_FENCE_NW_SE); PaintAddImageAsParent(session, imageId, { 31, 0, height + zOffset + 2 }, { 1, 32, 7 }); } - track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height); } else { - bool hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); + bool hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); ImageId imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW)); PaintAddImageAsParent(session, imageId, { 0, 0, height + zOffset }, { 32, 8, 1 }); - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height); imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_NARROW_EDGE_SE); PaintAddImageAsParent(session, imageId, { 0, 24, height + zOffset }, { 32, 8, 1 }); - hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_FENCE_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 31, height + zOffset + 2 }, { 32, 1, 7 }); } - track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height); } } -void track_paint_util_draw_pier( +void TrackPaintUtilDrawPier( PaintSession& session, const Ride& ride, const StationObject* stationObj, const CoordsXY& position, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t rotation) { @@ -892,50 +891,50 @@ void track_paint_util_draw_pier( if (direction & 1) { - hasFence = track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 1 }, { 2, 0, height }); - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 6, 32, 1 } }); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height); imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_PIER_EDGE_SW); PaintAddImageAsParent(session, imageId, { 24, 0, height }, { 8, 32, 1 }); - hasFence = track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_PIER_FENCE_SW); PaintAddImageAsParent(session, imageId, { 31, 0, height + 2 }, { 1, 32, 7 }); } - track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height); } else { - hasFence = track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, rotation); + hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, rotation); imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 1 }, { 0, 2, height }); - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 6, 1 } }); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height); imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_PIER_EDGE_SE); PaintAddImageAsParent(session, imageId, { 0, 24, height }, { 32, 8, 1 }); - hasFence = track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, rotation); + hasFence = TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, rotation); if (hasFence) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_STATION_PIER_FENCE_SE); PaintAddImageAsParent(session, imageId, { 0, 31, height + 2 }, { 32, 1, 7 }); } - track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height); } } -void track_paint_util_draw_station_metal_supports(PaintSession& session, Direction direction, uint16_t height, ImageId colour) +void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction direction, uint16_t height, ImageId colour) { - track_paint_util_draw_station_metal_supports_2(session, direction, height, colour, 3); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, colour, 3); } -void track_paint_util_draw_station_metal_supports_2( +void TrackPaintUtilDrawStationMetalSupports2( PaintSession& session, Direction direction, uint16_t height, ImageId colour, uint8_t type) { if (direction & 1) @@ -1003,7 +1002,7 @@ static constexpr const int8_t right_helix_up_small_quarter_tiles_sprite_map[] = 2, }; -void track_paint_util_right_helix_up_small_quarter_tiles_paint( +void TrackPaintUtilRightHelixUpSmallQuarterTilesPaint( PaintSession& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3][2], const CoordsXY offsets[4][3][2], const CoordsXY boundsLengths[4][3][2], const CoordsXYZ boundsOffsets[4][3][2]) @@ -1022,8 +1021,8 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][0]); PaintAddImageAsParent( - session, imageId, { offset, height }, { boundsLength, thickness[0] }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength, thickness[0] } }); } if (sprites[direction][index][1] != 0) { @@ -1033,8 +1032,8 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][1]); PaintAddImageAsParent( - session, imageId, { offset, height }, { boundsLength, thickness[1] }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength, thickness[1] } }); } } @@ -1103,7 +1102,7 @@ constexpr CoordsXY defaultRightHelixUpLargeQuarterBoundLengths[4][5][2] = { static constexpr const int8_t right_helix_up_large_quarter_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4, }; -void track_paint_util_right_helix_up_large_quarter_tiles_paint( +void TrackPaintUtilRightHelixUpLargeQuarterTilesPaint( PaintSession& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][5][2], const CoordsXY offsets[4][5][2], const CoordsXY boundsLengths[4][5][2], const CoordsXYZ boundsOffsets[4][5][2]) @@ -1122,8 +1121,8 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][0]); PaintAddImageAsParent( - session, imageId, { offset, height }, { boundsLength, thickness[0] }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength, thickness[0] } }); } if (sprites[direction][index][1] != 0) { @@ -1133,8 +1132,8 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][1]); PaintAddImageAsParent( - session, imageId, { offset, height }, { boundsLength, thickness[1] }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength, thickness[1] } }); } } @@ -1280,7 +1279,7 @@ const uint8_t mapLeftEighthTurnToOrthogonal[] = { static constexpr const int8_t eighth_to_diag_sprite_map[] = { 0, 1, 2, -1, 3, }; -void track_paint_util_eighth_to_diag_tiles_paint( +void TrackPaintUtilEighthToDiagTilesPaint( PaintSession& session, const int8_t thickness[4][4], int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][4], const CoordsXY offsets[4][4], const CoordsXY boundsLengths[4][4], const CoordsXYZ boundsOffsets[4][4]) @@ -1297,8 +1296,9 @@ void track_paint_util_eighth_to_diag_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]); PaintAddImageAsParent( - session, imageId, { offset.x, offset.y, height }, { boundsLength.x, boundsLength.y, thickness[direction][index] }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset.x, offset.y, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, + { boundsLength.x, boundsLength.y, thickness[direction][index] } }); } constexpr CoordsXY defaultDiagTileOffsets[4] = { @@ -1322,7 +1322,7 @@ static constexpr const int8_t diag_sprite_map[4][4] = { { 0, -1, -1, -1 }, }; -void track_paint_util_diag_tiles_paint( +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]) @@ -1339,8 +1339,8 @@ void track_paint_util_diag_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction]); PaintAddImageAsParent( - session, imageId, { offset, height }, { boundsLength, thickness }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength, thickness } }); } const uint8_t mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[] = { @@ -1444,7 +1444,7 @@ static constexpr const int8_t right_quarter_turn_5_tiles_sprite_map[] = { 0, -1, 1, 2, -1, 3, 4, }; -void track_paint_util_right_quarter_turn_5_tiles_paint( +void TrackPaintUtilRightQuarterTurn5TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][5], const CoordsXY offsets[4][5], const CoordsXY boundsLengths[4][5], const CoordsXYZ boundsOffsets[4][5]) @@ -1462,10 +1462,10 @@ void track_paint_util_right_quarter_turn_5_tiles_paint( PaintAddImageAsParent( session, imageId, { static_cast(offset.x), static_cast(offset.y), height }, - { boundsLength.x, boundsLength.y, thickness }, { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength.x, boundsLength.y, thickness } }); } -void track_paint_util_right_quarter_turn_5_tiles_paint_2( +void TrackPaintUtilRightQuarterTurn5TilesPaint2( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[][5]) { @@ -1480,11 +1480,11 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_2( const auto& offset = spriteBB->offset; const auto& bbOffset = spriteBB->bb_offset; PaintAddImageAsParent( - session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size, - { bbOffset.x, bbOffset.y, height + bbOffset.z }); + session, imageId, { offset.x, offset.y, height + offset.z }, + { { bbOffset.x, bbOffset.y, height + bbOffset.z }, spriteBB->bb_size }); } -void track_paint_util_right_quarter_turn_5_tiles_paint_3( +void TrackPaintUtilRightQuarterTurn5TilesPaint3( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[][5]) { @@ -1500,7 +1500,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_3( PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size); } -void track_paint_util_right_quarter_turn_5_tiles_tunnel( +void TrackPaintUtilRightQuarterTurn5TilesTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType) { if (direction == 0 && trackSequence == 0) @@ -1521,7 +1521,7 @@ void track_paint_util_right_quarter_turn_5_tiles_tunnel( } } -void track_paint_util_right_quarter_turn_5_tiles_wooden_supports( +void TrackPaintUtilRightQuarterTurn5TilesWoodenSupports( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence) { if (trackSequence != 1 && trackSequence != 4) @@ -1620,7 +1620,7 @@ static constexpr const int8_t right_quarter_turn_3_tiles_sprite_map[] = { 2, }; -void track_paint_util_right_quarter_turn_3_tiles_paint( +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], const CoordsXYZ boundsOffsets[4][3]) @@ -1637,19 +1637,19 @@ void track_paint_util_right_quarter_turn_3_tiles_paint( CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]); PaintAddImageAsParent( - session, imageId, { offset, height }, { boundsLength.x, boundsLength.y, thickness }, - { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); + session, imageId, { offset, height }, + { { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }, { boundsLength.x, boundsLength.y, thickness } }); } -void track_paint_util_right_quarter_turn_3_tiles_paint_2( +void TrackPaintUtilRightQuarterTurn3TilesPaint2( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3]) { - track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( + TrackPaintUtilRightQuarterTurn3TilesPaint2WithHeightOffset( session, thickness, height, direction, trackSequence, colourFlags, sprites, 0); } -void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( +void TrackPaintUtilRightQuarterTurn3TilesPaint2WithHeightOffset( 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) { @@ -1668,15 +1668,15 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 16, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 16, 16, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; } break; @@ -1686,15 +1686,15 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 16, 0, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; } break; @@ -1704,15 +1704,15 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 0, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; } break; @@ -1722,22 +1722,22 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 16, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 16, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; } break; } } -void track_paint_util_right_quarter_turn_3_tiles_paint_3( +void TrackPaintUtilRightQuarterTurn3TilesPaint3( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[4][3]) { @@ -1750,11 +1750,11 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_3( const auto& offset = spriteBB->offset; const auto& bbOffset = spriteBB->bb_offset; PaintAddImageAsParent( - session, colourFlags.WithIndex(spriteBB->sprite_id), { offset.x, offset.y, offset.z + height }, spriteBB->bb_size, - { bbOffset.x, bbOffset.y, height + bbOffset.z }); + session, colourFlags.WithIndex(spriteBB->sprite_id), { offset.x, offset.y, offset.z + height }, + { { bbOffset.x, bbOffset.y, height + bbOffset.z }, spriteBB->bb_size }); } -void track_paint_util_right_quarter_turn_3_tiles_paint_4( +void TrackPaintUtilRightQuarterTurn3TilesPaint4( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[4][3]) { @@ -1770,7 +1770,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_4( PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size); } -void track_paint_util_right_quarter_turn_3_tiles_tunnel( +void TrackPaintUtilRightQuarterTurn3TilesTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType) { if (direction == 0 && trackSequence == 0) @@ -1794,7 +1794,7 @@ void track_paint_util_right_quarter_turn_3_tiles_tunnel( } } -void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel( +void TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3) { if (direction == 0 && trackSequence == 0) @@ -1815,7 +1815,7 @@ void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel( } } -void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel( +void TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3) { if (direction == 0 && trackSequence == 0) @@ -1843,15 +1843,15 @@ static constexpr const int8_t left_quarter_turn_3_tiles_sprite_map[] = { 0, }; -void track_paint_util_left_quarter_turn_3_tiles_paint( +void TrackPaintUtilLeftQuarterTurn3TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3]) { - track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( + TrackPaintUtilLeftQuarterTurn3TilesPaintWithHeightOffset( session, thickness, height, direction, trackSequence, colourFlags, sprites, 0); } -void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( +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) { @@ -1870,15 +1870,15 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 16, 0, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; } break; @@ -1888,15 +1888,15 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 0, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; } break; @@ -1906,15 +1906,15 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 16, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 16, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; } break; @@ -1924,22 +1924,22 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 6, 0, height + heightOffset }, { 20, 32, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 16, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 16, 16, height + heightOffset }, { 16, 16, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset }); + session, imageId, { 0, 0, height }, { { 0, 6, height + heightOffset }, { 32, 20, thickness } }); break; } break; } } -void track_paint_util_left_quarter_turn_3_tiles_tunnel( +void TrackPaintUtilLeftQuarterTurn3TilesTunnel( PaintSession& session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence) { if (direction == 0 && trackSequence == 0) @@ -1963,7 +1963,7 @@ void track_paint_util_left_quarter_turn_3_tiles_tunnel( } } -void track_paint_util_left_quarter_turn_1_tile_paint( +void TrackPaintUtilLeftQuarterTurn1TilePaint( PaintSession& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction, const ImageId colourFlags, const uint32_t* sprites) { @@ -1973,32 +1973,32 @@ void track_paint_util_left_quarter_turn_1_tile_paint( { case 0: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 26, 24, thickness }, { 6, 2, height + boundBoxZOffset }); + session, imageId, { 0, 0, height }, { { 6, 2, height + boundBoxZOffset }, { 26, 24, thickness } }); break; case 1: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 26, 26, thickness }, { 0, 0, height + boundBoxZOffset }); + session, imageId, { 0, 0, height }, { { 0, 0, height + boundBoxZOffset }, { 26, 26, thickness } }); break; case 2: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 24, 26, thickness }, { 2, 6, height + boundBoxZOffset }); + session, imageId, { 0, 0, height }, { { 2, 6, height + boundBoxZOffset }, { 24, 26, thickness } }); break; case 3: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { 24, 24, thickness }, { 6, 6, height + boundBoxZOffset }); + session, imageId, { 0, 0, height }, { { 6, 6, height + boundBoxZOffset }, { 24, 24, thickness } }); break; } } -void track_paint_util_right_quarter_turn_1_tile_tunnel( +void TrackPaintUtilRightQuarterTurn1TileTunnel( PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel) { - track_paint_util_left_quarter_turn_1_tile_tunnel( + TrackPaintUtilLeftQuarterTurn1TileTunnel( session, (direction + 3) % 4, baseHeight, endOffset, endTunnel, startOffset, startTunnel); } -void track_paint_util_left_quarter_turn_1_tile_tunnel( +void TrackPaintUtilLeftQuarterTurn1TileTunnel( PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel) { @@ -2017,7 +2017,7 @@ void track_paint_util_left_quarter_turn_1_tile_tunnel( } } -void track_paint_util_spinning_tunnel_paint(PaintSession& session, int8_t thickness, int16_t height, Direction direction) +void TrackPaintUtilSpinningTunnelPaint(PaintSession& session, int8_t thickness, int16_t height, Direction direction) { int32_t frame = gCurrentTicks >> 2 & 3; auto colourFlags = session.TrackColours[SCHEME_SUPPORTS]; @@ -2041,15 +2041,15 @@ void track_paint_util_spinning_tunnel_paint(PaintSession& session, int8_t thickn imageId = colourFlags.WithIndex(trackSpritesGhostTrainSpinningTunnel[direction & 1][1][frame]); if (direction == 0 || direction == 2) { - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 1, 23 }, { 4, 28, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 28, height }, { 26, 1, 23 } }); } else { - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 26, 23 }, { 28, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 4, height }, { 1, 26, 23 } }); } } -void track_paint_util_onride_photo_small_paint( +void TrackPaintUtilOnridePhotoSmallPaint( PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement) { static constexpr const uint32_t imageIds[4][3] = { @@ -2087,7 +2087,7 @@ void track_paint_util_onride_photo_small_paint( } } -void track_paint_util_onride_photo_paint( +void TrackPaintUtilOnridePhotoPaint( PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement) { static constexpr const uint32_t imageIds[4][3] = { @@ -2138,7 +2138,7 @@ static constexpr const uint16_t RightVerticalLoopSegments[] = { SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, }; -void track_paint_util_right_vertical_loop_segments(PaintSession& session, Direction direction, uint8_t trackSequence) +void TrackPaintUtilRightVerticalLoopSegments(PaintSession& session, Direction direction, uint8_t trackSequence) { if (trackSequence > 9) { @@ -2150,7 +2150,7 @@ void track_paint_util_right_vertical_loop_segments(PaintSession& session, Direct session, PaintUtilRotateSegments(RightVerticalLoopSegments[trackSequence], direction), 0xFFFF, 0); } -void track_paint_util_left_corkscrew_up_supports(PaintSession& session, Direction direction, uint16_t height) +void TrackPaintUtilLeftCorkscrewUpSupports(PaintSession& session, Direction direction, uint16_t height) { // TODO: Figure out which of these looks best, and use one to keep a consistent world if (direction == 2) @@ -2175,10 +2175,10 @@ void track_paint_util_left_corkscrew_up_supports(PaintSession& session, Directio void PaintTrack(PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement) { RideId rideIndex = trackElement.GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) { - log_error("Attempted to paint invalid ride: %d", rideIndex); + LOG_ERROR("Attempted to paint invalid ride: %d", rideIndex); return; } @@ -2197,15 +2197,15 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons { uint16_t ax = ride->GetRideTypeDescriptor().Heights.VehicleZOffset; // 0x1689 represents 0 height there are -127 to 128 heights above and below it - // There are 3 arrays of 256 heights (units, m, ft) chosen with the get_height_marker_offset() + // There are 3 arrays of 256 heights (units, m, ft) chosen with the GetHeightMarkerOffset() auto heightNum = (height + 8) / 16 - gMapBaseZ; - auto imageId = ImageId(SPR_HEIGHT_MARKER_BASE + get_height_marker_offset() + heightNum, COLOUR_LIGHT_BLUE); + auto imageId = ImageId(SPR_HEIGHT_MARKER_BASE + GetHeightMarkerOffset() + heightNum, COLOUR_LIGHT_BLUE); - PaintAddImageAsParent(session, imageId, { 16, 16, height + ax + 3 }, { 1, 1, 0 }, { 1000, 1000, 2047 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height + ax + 3 }, { { 1000, 1000, 2047 }, { 1, 1, 0 } }); } } - if (lightfx_is_available()) + if (LightFXIsAvailable()) { uint8_t zOffset = 16; const auto& rtd = ride->GetRideTypeDescriptor(); diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 85c80981a9..5521953bff 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -279,198 +279,198 @@ extern const uint8_t mapLeftEighthTurnToOrthogonal[5]; extern const size_t MiniGolfPeepAnimationLengths[]; -bool track_paint_util_has_fence( +bool TrackPaintUtilHasFence( enum edge_t edge, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, uint8_t rotation); -void track_paint_util_paint_floor( +void TrackPaintUtilPaintFloor( PaintSession& session, uint8_t edges, ImageId colourFlags, uint16_t height, const uint32_t floorSprites[4], const StationObject* stationStyle); -void track_paint_util_paint_fences( +void TrackPaintUtilPaintFences( PaintSession& session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, const ImageId colourFlags, uint16_t height, const uint32_t fenceSprites[4], uint8_t rotation); -bool track_paint_util_draw_station_covers( +bool TrackPaintUtilDrawStationCovers( PaintSession& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height); -bool track_paint_util_draw_station_covers_2( +bool TrackPaintUtilDrawStationCovers2( PaintSession& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height, uint8_t stationVariant); -void track_paint_util_draw_narrow_station_platform( +void TrackPaintUtilDrawNarrowStationPlatform( PaintSession& session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset, const TrackElement& trackElement); -void track_paint_util_draw_station( +void TrackPaintUtilDrawStation( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement); -void track_paint_util_draw_station_2( +void TrackPaintUtilDrawStation2( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB); -void track_paint_util_draw_station_3( +void TrackPaintUtilDrawStation3( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, const TrackElement& trackElement); -void track_paint_util_draw_station_inverted( +void TrackPaintUtilDrawStationInverted( PaintSession& session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t stationVariant); -bool track_paint_util_should_paint_supports(const CoordsXY& position); -void track_paint_util_draw_pier( +bool TrackPaintUtilShouldPaintSupports(const CoordsXY& position); +void TrackPaintUtilDrawPier( PaintSession& session, const Ride& ride, const StationObject* stationObject, const CoordsXY& position, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t rotation); -void track_paint_util_draw_station_metal_supports(PaintSession& session, Direction direction, uint16_t height, ImageId colour); -void track_paint_util_draw_station_metal_supports_2( +void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction direction, uint16_t height, ImageId colour); +void TrackPaintUtilDrawStationMetalSupports2( PaintSession& session, Direction direction, uint16_t height, ImageId colour, uint8_t type); -void track_paint_util_right_quarter_turn_5_tiles_paint( +void TrackPaintUtilRightQuarterTurn5TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][5], const CoordsXY offsets[4][5], const CoordsXY boundsLengths[4][5], const CoordsXYZ boundsOffsets[4][5]); -void track_paint_util_right_quarter_turn_5_tiles_paint_2( +void TrackPaintUtilRightQuarterTurn5TilesPaint2( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[][5]); -void track_paint_util_right_quarter_turn_5_tiles_paint_3( +void TrackPaintUtilRightQuarterTurn5TilesPaint3( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[][5]); -void track_paint_util_right_quarter_turn_5_tiles_tunnel( +void TrackPaintUtilRightQuarterTurn5TilesTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType); -void track_paint_util_right_quarter_turn_5_tiles_wooden_supports( +void TrackPaintUtilRightQuarterTurn5TilesWoodenSupports( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence); -void track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel( +void TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3); -void track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel( +void TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType0, uint8_t tunnelType3); -void track_paint_util_right_quarter_turn_3_tiles_paint( +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], const CoordsXYZ boundsOffsets[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_paint_2( +void TrackPaintUtilRightQuarterTurn3TilesPaint2( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( +void TrackPaintUtilRightQuarterTurn3TilesPaint2WithHeightOffset( 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 track_paint_util_right_quarter_turn_3_tiles_paint_3( +void TrackPaintUtilRightQuarterTurn3TilesPaint3( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_paint_4( +void TrackPaintUtilRightQuarterTurn3TilesPaint4( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const SpriteBb sprites[4][3]); -void track_paint_util_right_quarter_turn_3_tiles_tunnel( +void TrackPaintUtilRightQuarterTurn3TilesTunnel( PaintSession& session, int16_t height, Direction direction, uint8_t trackSequence, uint8_t tunnelType); -void track_paint_util_left_quarter_turn_3_tiles_paint( +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 track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( +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 track_paint_util_left_quarter_turn_3_tiles_tunnel( +void TrackPaintUtilLeftQuarterTurn3TilesTunnel( PaintSession& session, int16_t height, uint8_t tunnelType, Direction direction, uint8_t trackSequence); -void track_paint_util_left_quarter_turn_1_tile_paint( +void TrackPaintUtilLeftQuarterTurn1TilePaint( PaintSession& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction, const ImageId colourFlags, const uint32_t* sprites); -void track_paint_util_spinning_tunnel_paint(PaintSession& session, int8_t thickness, int16_t height, Direction direction); -void track_paint_util_onride_photo_small_paint( +void TrackPaintUtilSpinningTunnelPaint(PaintSession& session, int8_t thickness, int16_t height, Direction direction); +void TrackPaintUtilOnridePhotoSmallPaint( PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement); -void track_paint_util_onride_photo_paint( +void TrackPaintUtilOnridePhotoPaint( PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement); -void track_paint_util_right_helix_up_small_quarter_tiles_paint( +void TrackPaintUtilRightHelixUpSmallQuarterTilesPaint( PaintSession& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][3][2], const CoordsXY offsets[4][3][2], const CoordsXY boundsLengths[4][3][2], const CoordsXYZ boundsOffsets[4][3][2]); -void track_paint_util_right_helix_up_large_quarter_tiles_paint( +void TrackPaintUtilRightHelixUpLargeQuarterTilesPaint( PaintSession& session, const int8_t thickness[2], int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][5][2], const CoordsXY offsets[4][5][2], const CoordsXY boundsLengths[4][5][2], const CoordsXYZ boundsOffsets[4][5][2]); -void track_paint_util_eighth_to_diag_tiles_paint( +void TrackPaintUtilEighthToDiagTilesPaint( PaintSession& session, const int8_t thickness[4][4], int16_t height, Direction direction, uint8_t trackSequence, const ImageId colourFlags, const uint32_t sprites[4][4], const CoordsXY offsets[4][4], const CoordsXY boundsLengths[4][4], const CoordsXYZ boundsOffsets[4][4]); -void track_paint_util_diag_tiles_paint( +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]); -void track_paint_util_left_quarter_turn_1_tile_tunnel( +void TrackPaintUtilLeftQuarterTurn1TileTunnel( PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel); -void track_paint_util_right_quarter_turn_1_tile_tunnel( +void TrackPaintUtilRightQuarterTurn1TileTunnel( PaintSession& session, Direction direction, uint16_t baseHeight, int8_t startOffset, uint8_t startTunnel, int8_t endOffset, uint8_t endTunnel); -void track_paint_util_right_vertical_loop_segments(PaintSession& session, Direction direction, uint8_t trackSequence); +void TrackPaintUtilRightVerticalLoopSegments(PaintSession& session, Direction direction, uint8_t trackSequence); -void track_paint_util_left_corkscrew_up_supports(PaintSession& session, Direction direction, uint16_t height); +void TrackPaintUtilLeftCorkscrewUpSupports(PaintSession& session, Direction direction, uint16_t height); using TRACK_PAINT_FUNCTION = void (*)( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement); using TRACK_PAINT_FUNCTION_GETTER = TRACK_PAINT_FUNCTION (*)(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_monorail(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_boat_hire(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionStandUpRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSuspendedSwingingRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionJuniorRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMonorail(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniSuspendedRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniatureRailway(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionBoatHire(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWoodenWildMouse(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSteeplechase(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionCarRide(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLaunchedFreefall(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionBobsleighRC(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionObservationTower(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLoopingRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionDinghySlide(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 get_track_paint_function_go_karts(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionGoKarts(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLogFlume(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionRiverRapids(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionDodgems(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_swinging_ship(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_swinging_inverter_ship(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSwingingShip(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSwingingInverterShip(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionFerrisWheel(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_motionsimulator(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_topspin(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMotionsimulator(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunction3dCinema(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionTopspin(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionSpaceRings(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_lift(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_shop(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionReverseFreefallRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLift(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionShop(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMerryGoRound(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_facility(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_twist(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionFacility(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionTwist(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionHauntedHouse(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionCircus(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionGhostTrain(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSideFrictionRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWoodenRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWildMouse(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMultiDimensionRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionVirginiaReel(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSplashBoats(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniHelicopters(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLayDownRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSuspendedMonorail(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionReverserRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionHeartlineTwisterRC(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniGolf(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionGigaRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionRotoDrop(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingSaucers(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionCrookedHouse(int32_t trackType); TRACK_PAINT_FUNCTION GetTrackPaintFunctionMonorailCycles(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(int32_t trackType); -TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionCompactInvertedRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWaterRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionAirPoweredVerticalRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedHairpinRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMagicCarpet(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSubmarineRide(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionEnterprise(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedImpulseRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniRC(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMineRide(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLimLaunchedRC(int32_t trackType); namespace HybridRC { TRACK_PAINT_FUNCTION GetTrackPaintFunction(int32_t trackType); @@ -483,4 +483,4 @@ namespace AlpineRC { TRACK_PAINT_FUNCTION GetTrackPaintFunction(int32_t trackType); } -TRACK_PAINT_FUNCTION get_track_paint_function_classic_wooden_rc(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionClassicWoodenRC(int32_t trackType); diff --git a/src/openrct2/ride/TrainManager.cpp b/src/openrct2/ride/TrainManager.cpp index 5c09380c6f..71aa42f55c 100644 --- a/src/openrct2/ride/TrainManager.cpp +++ b/src/openrct2/ride/TrainManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ride/TrainManager.h b/src/openrct2/ride/TrainManager.h index 0cec7dfcc0..b3405e8aea 100644 --- a/src/openrct2/ride/TrainManager.h +++ b/src/openrct2/ride/TrainManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 568181b484..1dd7cf3606 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,6 +26,8 @@ #include "../localisation/Formatter.h" #include "../localisation/Localisation.h" #include "../management/NewsItem.h" +#include "../math/Trigonometry.hpp" +#include "../object/SmallSceneryEntry.h" #include "../platform/Platform.h" #include "../profiling/Profiling.h" #include "../rct12/RCT12.h" @@ -38,7 +40,6 @@ #include "../world/MapAnimation.h" #include "../world/Park.h" #include "../world/Scenery.h" -#include "../world/SmallScenery.h" #include "../world/Surface.h" #include "../world/Wall.h" #include "CableLift.h" @@ -56,6 +57,7 @@ using namespace OpenRCT2::Audio; using namespace OpenRCT2::TrackMetaData; +using namespace OpenRCT2::Math::Trigonometry; static bool vehicle_boat_is_location_accessible(const CoordsXYZ& location); constexpr int16_t VEHICLE_MAX_SPIN_SPEED = 1536; @@ -360,7 +362,7 @@ static constexpr const int8_t* SwingingTimeToSpriteMaps[] = { SwingingTimeToSpriteMap_8, SwingingTimeToSpriteMap_9, SwingingTimeToSpriteMap_10, SwingingTimeToSpriteMap_11, }; -struct unk_9a36c4 +struct Unk9A36C4Struct { int16_t x; int16_t y; @@ -368,7 +370,7 @@ struct unk_9a36c4 }; /** rct2: 0x009A36C4 */ -static constexpr const unk_9a36c4 Unk9A36C4[] = { +static constexpr const Unk9A36C4Struct Unk9A36C4[] = { { -1, 0, 8716 }, { -1, 0, 8716 }, { -1, 0, 8716 }, { -1, 1, 12327 }, { -1, 1, 12327 }, { -1, 1, 12327 }, { 0, 1, 8716 }, { -1, 1, 12327 }, { 0, 1, 8716 }, { 0, 1, 8716 }, { 0, 1, 8716 }, { 1, 1, 12327 }, { 1, 1, 12327 }, { 1, 1, 12327 }, { 1, 0, 8716 }, { 1, 1, 12327 }, { 1, 0, 8716 }, { 1, 0, 8716 }, @@ -435,66 +437,6 @@ static constexpr const OpenRCT2::Audio::SoundId DoorCloseSoundIds[] = { OpenRCT2::Audio::SoundId::Portcullis, }; -static const struct -{ - int8_t x, y, z; -} SteamParticleOffsets[][16] = { - { - { -11, 0, 22 }, - { -10, 4, 22 }, - { -8, 8, 22 }, - { -4, 10, 22 }, - { 0, 11, 22 }, - { 4, 10, 22 }, - { 8, 8, 22 }, - { 10, 4, 22 }, - { 11, 0, 22 }, - { 10, -4, 22 }, - { 8, -8, 22 }, - { 4, -10, 22 }, - { 0, -11, 22 }, - { -4, -10, 22 }, - { -8, -8, 22 }, - { -10, -4, 22 }, - }, - { - { -9, 0, 27 }, - { -8, 4, 27 }, - { -6, 6, 27 }, - { -4, 8, 27 }, - { 0, 9, 27 }, - { 4, 8, 27 }, - { 6, 6, 27 }, - { 8, 4, 27 }, - { 9, 0, 27 }, - { 8, -4, 27 }, - { 6, -6, 27 }, - { 4, -8, 27 }, - { 0, -9, 27 }, - { -4, -8, 27 }, - { -6, -6, 27 }, - { -8, -4, 27 }, - }, - { - { -13, 0, 18 }, - { -12, 4, 17 }, - { -9, 9, 17 }, - { -4, 8, 17 }, - { 0, 13, 18 }, - { 4, 8, 17 }, - { 6, 6, 17 }, - { 8, 4, 17 }, - { 13, 0, 18 }, - { 8, -4, 17 }, - { 6, -6, 17 }, - { 4, -8, 17 }, - { 0, -13, 18 }, - { -4, -8, 17 }, - { -6, -6, 17 }, - { -8, -4, 17 }, - }, -}; - template<> bool EntityBase::Is() const { return Type == EntityType::Vehicle; @@ -580,25 +522,25 @@ static bool vehicle_move_info_valid( return true; } -static const rct_vehicle_info* vehicle_get_move_info( +static const VehicleInfo* vehicle_get_move_info( VehicleTrackSubposition trackSubposition, track_type_t type, uint8_t direction, int32_t offset) { uint16_t typeAndDirection = (type << 2) | (direction & 3); if (!vehicle_move_info_valid(trackSubposition, type, direction, offset)) { - static constexpr const rct_vehicle_info zero = {}; + static constexpr const VehicleInfo zero = {}; return &zero; } return &gTrackVehicleInfo[static_cast(trackSubposition)][typeAndDirection]->info[offset]; } -const rct_vehicle_info* Vehicle::GetMoveInfo() const +const VehicleInfo* Vehicle::GetMoveInfo() const { return vehicle_get_move_info(TrackSubposition, GetTrackType(), GetTrackDirection(), track_progress); } -uint16_t vehicle_get_move_info_size(VehicleTrackSubposition trackSubposition, track_type_t type, uint8_t direction) +uint16_t VehicleGetMoveInfoSize(VehicleTrackSubposition trackSubposition, track_type_t type, uint8_t direction) { uint16_t typeAndDirection = (type << 2) | (direction & 3); @@ -611,7 +553,7 @@ uint16_t vehicle_get_move_info_size(VehicleTrackSubposition trackSubposition, tr uint16_t Vehicle::GetTrackProgress() const { - return vehicle_get_move_info_size(TrackSubposition, GetTrackType(), GetTrackDirection()); + return VehicleGetMoveInfoSize(TrackSubposition, GetTrackType(), GetTrackDirection()); } void Vehicle::ApplyMass(int16_t appliedMass) @@ -623,12 +565,12 @@ void Vehicle::MoveRelativeDistance(int32_t distance) { remaining_distance += distance; - SetUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION | VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + SetFlag(VehicleFlags::MoveSingleCar | VehicleFlags::CollisionDisabled); UpdateTrackMotion(nullptr); - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION | VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + ClearFlag(VehicleFlags::MoveSingleCar | VehicleFlags::CollisionDisabled); } -Vehicle* try_get_vehicle(EntityId spriteIndex) +Vehicle* TryGetVehicle(EntityId spriteIndex) { return TryGetEntity(spriteIndex); } @@ -738,7 +680,7 @@ bool Vehicle::SoundCanPlay() const auto left = g_music_tracking_viewport->viewPos.x; auto bottom = g_music_tracking_viewport->viewPos.y; - if (window_get_classification(*gWindowAudioExclusive) == WindowClass::MainWindow) + if (WindowGetClassification(*gWindowAudioExclusive) == WindowClass::MainWindow) { left -= quarter_w; bottom -= quarter_h; @@ -750,7 +692,7 @@ bool Vehicle::SoundCanPlay() const auto right = g_music_tracking_viewport->view_width + left; auto top = g_music_tracking_viewport->view_height + bottom; - if (window_get_classification(*gWindowAudioExclusive) == WindowClass::MainWindow) + if (WindowGetClassification(*gWindowAudioExclusive) == WindowClass::MainWindow) { right += quarter_w + quarter_w; top += quarter_h + quarter_h; @@ -772,7 +714,7 @@ uint16_t Vehicle::GetSoundPriority() const for (const auto& vehicleSound : OpenRCT2::Audio::gVehicleSoundList) { - if (vehicleSound.id == sprite_index.ToUnderlying()) + if (vehicleSound.id == Id.ToUnderlying()) { // Vehicle sounds will get higher priority if they are already playing return result + 300; @@ -810,7 +752,7 @@ OpenRCT2::Audio::VehicleSoundParams Vehicle::CreateSoundParam(uint16_t priority) int32_t frequency = std::abs(velocity); - rct_ride_entry* rideType = GetRideEntry(); + const auto* rideType = GetRideEntry(); if (rideType != nullptr) { if (rideType->Cars[vehicle_type].double_sound_frequency & 1) @@ -827,7 +769,7 @@ OpenRCT2::Audio::VehicleSoundParams Vehicle::CreateSoundParam(uint16_t priority) frequency += 11025; frequency += 16 * sound_vector_factor; param.frequency = static_cast(frequency); - param.id = sprite_index.ToUnderlying(); + param.id = Id.ToUnderlying(); param.volume = 0; if (x != LOCATION_NULL) @@ -883,13 +825,13 @@ static void vehicle_sounds_update_window_setup() { g_music_tracking_viewport = nullptr; - rct_window* window = window_get_listening(); + WindowBase* window = WindowGetListening(); if (window == nullptr) { return; } - rct_viewport* viewport = window_get_viewport(window); + Viewport* viewport = WindowGetViewport(window); if (viewport == nullptr) { return; @@ -1140,7 +1082,7 @@ static void UpdateSound( * * rct2: 0x006BBC6B */ -void vehicle_sounds_update() +void VehicleSoundsUpdate() { PROFILED_FUNCTION(); @@ -1227,7 +1169,7 @@ void vehicle_sounds_update() * * rct2: 0x006D4204 */ -void vehicle_update_all() +void VehicleUpdateAll() { PROFILED_FUNCTION(); @@ -1255,10 +1197,10 @@ bool Vehicle::CloseRestraints() return true; bool restraintsClosed = true; - for (Vehicle* vehicle = GetEntity(sprite_index); vehicle != nullptr; + for (Vehicle* vehicle = GetEntity(Id); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_CAR) && vehicle->restraints_position != 0 + if (vehicle->HasFlag(VehicleFlags::CarIsBroken) && vehicle->restraints_position != 0 && (curRide->breakdown_reason_pending == BREAKDOWN_RESTRAINTS_STUCK_OPEN || curRide->breakdown_reason_pending == BREAKDOWN_DOORS_STUCK_OPEN)) { @@ -1266,7 +1208,7 @@ bool Vehicle::CloseRestraints() { curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride_breakdown_add_news_item(curRide); + RideBreakdownAddNewsItem(*curRide); curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; @@ -1304,7 +1246,7 @@ bool Vehicle::CloseRestraints() bool Vehicle::OpenRestraints() { int32_t restraintsOpen = true; - for (Vehicle* vehicle = GetEntity(sprite_index); vehicle != nullptr; + for (Vehicle* vehicle = GetEntity(Id); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { vehicle->SwingPosition = 0; @@ -1321,15 +1263,15 @@ bool Vehicle::OpenRestraints() continue; } - CarEntry* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; + const auto& carEntry = rideEntry->Cars[vehicle->vehicle_type]; - if (carEntry->flags & CAR_ENTRY_FLAG_SPINNING) + if (carEntry.flags & CAR_ENTRY_FLAG_SPINNING) { // If the vehicle is a spinner it must be spinning slow // For vehicles without additional frames there are 4 rotations it can unload from // For vehicles with additional frames it must be facing forward if (abs(vehicle->spin_speed) <= VEHICLE_MAX_SPIN_SPEED_FOR_STOPPING && !(vehicle->spin_sprite & 0x30) - && (!(carEntry->flags & CAR_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES) || !(vehicle->spin_sprite & 0xF8))) + && (!(carEntry.flags & CAR_ENTRY_FLAG_SPINNING_ADDITIONAL_FRAMES) || !(vehicle->spin_sprite & 0xF8))) { vehicle->spin_speed = 0; } @@ -1350,23 +1292,23 @@ bool Vehicle::OpenRestraints() continue; } } - if (carEntry->animation == CAR_ENTRY_ANIMATION_OBSERVATION_TOWER && vehicle->animation_frame != 0) + if (carEntry.animation == CarEntryAnimation::ObservationTower && vehicle->animation_frame != 0) { if (vehicle->animationState <= 0xCCCC) { - vehicle->animationState += 0x3333; + vehicle->animationState += carEntry.AnimationSpeed; } else { vehicle->animationState = 0; vehicle->animation_frame++; - vehicle->animation_frame &= 7; + vehicle->animation_frame %= carEntry.AnimationFrames; vehicle->Invalidate(); } restraintsOpen = false; continue; } - if (carEntry->animation == CAR_ENTRY_ANIMATION_ANIMAL_FLYING + if (carEntry.animation == CarEntryAnimation::AnimalFlying && (vehicle->animation_frame != 0 || vehicle->animationState > 0)) { vehicle->UpdateAnimationAnimalFlying(); @@ -1374,7 +1316,7 @@ bool Vehicle::OpenRestraints() continue; } - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_CAR) && vehicle->restraints_position != 0xFF + if (vehicle->HasFlag(VehicleFlags::CarIsBroken) && vehicle->restraints_position != 0xFF && (curRide->breakdown_reason_pending == BREAKDOWN_RESTRAINTS_STUCK_CLOSED || curRide->breakdown_reason_pending == BREAKDOWN_DOORS_STUCK_CLOSED)) { @@ -1382,7 +1324,7 @@ bool Vehicle::OpenRestraints() { curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride_breakdown_add_news_item(curRide); + RideBreakdownAddNewsItem(*curRide); curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; @@ -1413,33 +1355,33 @@ bool Vehicle::OpenRestraints() return restraintsOpen; } -void RideUpdateMeasurementsSpecialElements_Default(Ride* ride, const track_type_t trackType) +void RideUpdateMeasurementsSpecialElements_Default(Ride& ride, const track_type_t trackType) { const auto& ted = GetTrackElementDescriptor(trackType); uint16_t trackFlags = ted.Flags; if (trackFlags & TRACK_ELEM_FLAG_NORMAL_TO_INVERSION) { - if (ride->inversions < OpenRCT2::Limits::MaxInversions) - ride->inversions++; + if (ride.inversions < OpenRCT2::Limits::MaxInversions) + ride.inversions++; } } -void RideUpdateMeasurementsSpecialElements_MiniGolf(Ride* ride, const track_type_t trackType) +void RideUpdateMeasurementsSpecialElements_MiniGolf(Ride& ride, const track_type_t trackType) { const auto& ted = GetTrackElementDescriptor(trackType); uint16_t trackFlags = ted.Flags; if (trackFlags & TRACK_ELEM_FLAG_IS_GOLF_HOLE) { - if (ride->holes < OpenRCT2::Limits::MaxGolfHoles) - ride->holes++; + if (ride.holes < OpenRCT2::Limits::MaxGolfHoles) + ride.holes++; } } -void RideUpdateMeasurementsSpecialElements_WaterCoaster(Ride* ride, const track_type_t trackType) +void RideUpdateMeasurementsSpecialElements_WaterCoaster(Ride& ride, const track_type_t trackType) { if (trackType >= TrackElemType::FlatCovered && trackType <= TrackElemType::RightQuarterTurn3TilesCovered) { - ride->special_track_elements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + ride.special_track_elements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } } @@ -1458,8 +1400,8 @@ void Vehicle::UpdateMeasurements() curRide->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; curRide->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; curRide->lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING); - window_invalidate_by_number(WindowClass::Ride, ride.ToUnderlying()); + ClearFlag(VehicleFlags::Testing); + WindowInvalidateByNumber(WindowClass::Ride, ride.ToUnderlying()); return; } @@ -1485,14 +1427,14 @@ void Vehicle::UpdateMeasurements() if (curRide->average_speed_test_timeout == 0 && absVelocity > 0x8000) { - curRide->average_speed = add_clamp_int32_t(curRide->average_speed, absVelocity); + curRide->average_speed = AddClamp_int32_t(curRide->average_speed, absVelocity); stationForTestSegment.SegmentTime++; } int32_t distance = abs(((velocity + acceleration) >> 10) * 42); if (NumLaps == 0) { - stationForTestSegment.SegmentLength = add_clamp_int32_t(stationForTestSegment.SegmentLength, distance); + stationForTestSegment.SegmentLength = AddClamp_int32_t(stationForTestSegment.SegmentLength, distance); } if (curRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_G_FORCES)) @@ -1531,7 +1473,7 @@ void Vehicle::UpdateMeasurements() return; auto trackElemType = GetTrackType(); - if (trackElemType == TrackElemType::PoweredLift || HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) + if (trackElemType == TrackElemType::PoweredLift || HasFlag(VehicleFlags::OnLiftHill)) { if (!(curRide->testing_flags & RIDE_TESTING_POWERED_LIFT)) { @@ -1548,7 +1490,7 @@ void Vehicle::UpdateMeasurements() } const auto& rtd = curRide->GetRideTypeDescriptor(); - rtd.UpdateMeasurementsSpecialElements(curRide, trackElemType); + rtd.UpdateMeasurementsSpecialElements(*curRide, trackElemType); switch (trackElemType) { @@ -1564,7 +1506,7 @@ void Vehicle::UpdateMeasurements() curRide->special_track_elements |= RIDE_ELEMENT_WHIRLPOOL; break; case TrackElemType::Watersplash: - if (velocity >= 0xB0000) + if (velocity >= 11.0_mph) { curRide->special_track_elements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } @@ -1600,16 +1542,16 @@ void Vehicle::UpdateMeasurements() switch (curRide->turn_count_default >> 11) { case 0: - increment_turn_count_1_element(curRide, turnType); + IncrementTurnCount1Element(*curRide, turnType); break; case 1: - increment_turn_count_2_elements(curRide, turnType); + IncrementTurnCount2Elements(*curRide, turnType); break; case 2: - increment_turn_count_3_elements(curRide, turnType); + IncrementTurnCount3Elements(*curRide, turnType); break; default: - increment_turn_count_4_plus_elements(curRide, turnType); + IncrementTurnCount4PlusElements(*curRide, turnType); break; } } @@ -1711,7 +1653,7 @@ void Vehicle::UpdateMeasurements() if (trackFlags & TRACK_ELEM_FLAG_HELIX) { - uint8_t helixes = ride_get_helix_sections(curRide); + uint8_t helixes = RideGetHelixSections(*curRide); if (helixes != OpenRCT2::Limits::MaxHelices) helixes++; @@ -1801,7 +1743,7 @@ void Vehicle::UpdateMeasurements() if (distance < 0) return; - curRide->sheltered_length = add_clamp_int32_t(curRide->sheltered_length, distance); + curRide->sheltered_length = AddClamp_int32_t(curRide->sheltered_length, distance); } struct SoundIdVolume @@ -1810,7 +1752,7 @@ struct SoundIdVolume uint8_t volume; }; -static SoundIdVolume sub_6D7AC0( +static SoundIdVolume Sub6D7AC0( OpenRCT2::Audio::SoundId currentSoundId, uint8_t currentVolume, OpenRCT2::Audio::SoundId targetSoundId, uint8_t targetVolume) { @@ -1834,13 +1776,13 @@ static SoundIdVolume sub_6D7AC0( return { currentSoundId, currentVolume }; } -void Vehicle::GetLiftHillSound(Ride* curRide, SoundIdVolume& curSound) +void Vehicle::GetLiftHillSound(const Ride& curRide, SoundIdVolume& curSound) { scream_sound_id = OpenRCT2::Audio::SoundId::Null; - if (curRide->type < std::size(RideTypeDescriptors)) + if (curRide.type < std::size(RideTypeDescriptors)) { // Get lift hill sound - curSound.id = GetRideTypeDescriptor(curRide->type).LiftData.sound_id; + curSound.id = GetRideTypeDescriptor(curRide.type).LiftData.sound_id; curSound.volume = 243; if (!(sound2_flags & VEHICLE_SOUND2_FLAGS_LIFT_HILL)) curSound.id = OpenRCT2::Audio::SoundId::Null; @@ -1853,8 +1795,7 @@ void Vehicle::GetLiftHillSound(Ride* curRide, SoundIdVolume& curSound) */ void Vehicle::Update() { - // The cable lift uses a ride entry index of NULL - if (ride_subtype == OBJECT_ENTRY_INDEX_NULL) + if (IsCableLift()) { CableLiftUpdate(); return; @@ -1871,7 +1812,7 @@ void Vehicle::Update() if (curRide->type >= RIDE_TYPE_COUNT) return; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING)) + if (HasFlag(VehicleFlags::Testing)) UpdateMeasurements(); _vehicleBreakdown = 255; @@ -1881,9 +1822,9 @@ void Vehicle::Update() auto carEntry = &rideEntry->Cars[vehicle_type]; if ((carEntry->flags & CAR_ENTRY_FLAG_POWERED) && curRide->breakdown_reason_pending == BREAKDOWN_SAFETY_CUT_OUT) { - if (!(carEntry->flags & CAR_ENTRY_FLAG_WATER_RIDE) || (Pitch == 2 && velocity <= 0x20000)) + if (!(carEntry->flags & CAR_ENTRY_FLAG_WATER_RIDE) || (Pitch == 2 && velocity <= 2.0_mph)) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY); + SetFlag(VehicleFlags::StoppedOnLift); } } } @@ -2019,15 +1960,15 @@ void Vehicle::UpdateMovingToEndOfStation() break; default: { - rct_ride_entry* rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); if (rideEntry == nullptr) { return; } - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto& carEntry = rideEntry->Cars[vehicle_type]; - if (!(carEntry->flags & CAR_ENTRY_FLAG_POWERED)) + if (!(carEntry.flags & CAR_ENTRY_FLAG_POWERED)) { if (velocity <= 131940) { @@ -2088,7 +2029,7 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se return; if (curRide->status == RideStatus::Open && !(curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) - && !HasUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART)) + && !HasFlag(VehicleFlags::ReadyToDepart)) { return; } @@ -2130,20 +2071,20 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se SetState(Vehicle::Status::WaitingForPassengers); } -static std::optional ride_get_train_index_from_vehicle(Ride* ride, EntityId spriteIndex) +static std::optional ride_get_train_index_from_vehicle(const Ride& ride, EntityId spriteIndex) { uint32_t trainIndex = 0; - while (ride->vehicles[trainIndex] != spriteIndex) + while (ride.vehicles[trainIndex] != spriteIndex) { trainIndex++; - if (trainIndex >= ride->NumTrains) + if (trainIndex >= ride.NumTrains) { // This should really return nullopt, but doing so // would break some hacked parks that hide track by setting tracked rides' // track type to, e.g., Crooked House break; } - if (trainIndex >= std::size(ride->vehicles)) + if (trainIndex >= std::size(ride.vehicles)) { return std::nullopt; } @@ -2176,7 +2117,7 @@ void Vehicle::UpdateWaitingForPassengers() return; } - auto trainIndex = ride_get_train_index_from_vehicle(curRide, sprite_index); + auto trainIndex = ride_get_train_index_from_vehicle(*curRide, Id); if (!trainIndex.has_value()) { return; @@ -2197,12 +2138,12 @@ void Vehicle::UpdateWaitingForPassengers() if (time_waiting != 0xFFFF) time_waiting++; - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART); + ClearFlag(VehicleFlags::ReadyToDepart); // 0xF64E31, 0xF64E32, 0xF64E33 uint8_t num_peeps_on_train = 0, num_used_seats_on_train = 0, num_seats_on_train = 0; - for (const Vehicle* trainCar = GetEntity(sprite_index); trainCar != nullptr; + for (const Vehicle* trainCar = GetEntity(Id); trainCar != nullptr; trainCar = GetEntity(trainCar->next_vehicle_on_train)) { num_peeps_on_train += trainCar->num_peeps; @@ -2243,7 +2184,7 @@ void Vehicle::UpdateWaitingForPassengers() { if (curRide->max_waiting_time * 32 < time_waiting) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART); + SetFlag(VehicleFlags::ReadyToDepart); TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); return; } @@ -2254,7 +2195,7 @@ void Vehicle::UpdateWaitingForPassengers() { for (auto train_id : curRide->vehicles) { - if (train_id == sprite_index) + if (train_id == Id) continue; Vehicle* train = GetEntity(train_id); @@ -2266,7 +2207,7 @@ void Vehicle::UpdateWaitingForPassengers() { if (train->current_station == current_station) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART); + SetFlag(VehicleFlags::ReadyToDepart); TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); return; } @@ -2279,7 +2220,7 @@ void Vehicle::UpdateWaitingForPassengers() { if (num_peeps_on_train == num_seats_on_train) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART); + SetFlag(VehicleFlags::ReadyToDepart); TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); return; } @@ -2296,13 +2237,13 @@ void Vehicle::UpdateWaitingForPassengers() peepTarget = 1; if (num_peeps_on_train >= peepTarget) - SetUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART); + SetFlag(VehicleFlags::ReadyToDepart); TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); return; } - SetUpdateFlag(VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART); + SetFlag(VehicleFlags::ReadyToDepart); TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); return; } @@ -2311,11 +2252,11 @@ void Vehicle::UpdateWaitingForPassengers() return; velocity = 0; - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT); + ClearFlag(VehicleFlags::WaitingOnAdjacentStation); if (curRide->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT); + SetFlag(VehicleFlags::WaitingOnAdjacentStation); } SetState(Vehicle::Status::WaitingToDepart); @@ -2331,15 +2272,15 @@ void Vehicle::UpdateDodgemsMode() if (curRide == nullptr) return; - rct_ride_entry* rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); if (rideEntry == nullptr) { return; } - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto& carEntry = rideEntry->Cars[vehicle_type]; // Mark the dodgem as in use. - if (carEntry->flags & CAR_ENTRY_FLAG_DODGEM_INUSE_LIGHTS && animation_frame != 1) + if (carEntry.flags & CAR_ENTRY_FLAG_DODGEM_INUSE_LIGHTS && animation_frame != 1) { animation_frame = 1; Invalidate(); @@ -2416,7 +2357,7 @@ void Vehicle::UpdateWaitingToDepart() } else { - for (const Vehicle* trainCar = GetEntity(sprite_index); trainCar != nullptr; + for (const Vehicle* trainCar = GetEntity(Id); trainCar != nullptr; trainCar = GetEntity(trainCar->next_vehicle_on_train)) { if (trainCar->num_peeps != 0) @@ -2442,7 +2383,7 @@ void Vehicle::UpdateWaitingToDepart() { if (curRide->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT)) + if (HasFlag(VehicleFlags::WaitingOnAdjacentStation)) { if (!CanDepartSynchronised()) { @@ -2461,7 +2402,7 @@ void Vehicle::UpdateWaitingToDepart() int32_t direction; uint8_t trackDirection = GetTrackDirection(); - if (track_block_get_next_from_zero(TrackLocation, curRide, trackDirection, &track, &zUnused, &direction, false)) + if (TrackBlockGetNextFromZero(TrackLocation, *curRide, trackDirection, &track, &zUnused, &direction, false)) { if (track.element->AsTrack()->HasCableLift()) { @@ -2589,7 +2530,7 @@ void Vehicle::UpdateWaitingToDepart() } } -struct rct_synchronised_vehicle +struct SynchronisedVehicle { RideId ride_id; StationIndex stationIndex; @@ -2599,9 +2540,9 @@ struct rct_synchronised_vehicle constexpr int32_t SYNCHRONISED_VEHICLE_COUNT = 16; // Synchronised vehicle info -static rct_synchronised_vehicle _synchronisedVehicles[SYNCHRONISED_VEHICLE_COUNT] = {}; +static SynchronisedVehicle _synchronisedVehicles[SYNCHRONISED_VEHICLE_COUNT] = {}; -static rct_synchronised_vehicle* _lastSynchronisedVehicle = nullptr; +static SynchronisedVehicle* _lastSynchronisedVehicle = nullptr; /** * Checks if a map position contains a synchronised ride station and adds the vehicle @@ -2616,7 +2557,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) return false; } - TileElement* tileElement = get_station_platform({ coords, coords.z + 2 * COORDS_Z_STEP }); + TileElement* tileElement = GetStationPlatform({ coords, coords.z + 2 * COORDS_Z_STEP }); if (tileElement == nullptr) { /* No station platform element found, @@ -2625,7 +2566,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) } auto rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || !(ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { /* Ride is not set to synchronise with adjacent stations. */ @@ -2638,7 +2579,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) auto stationIndex = tileElement->AsTrack()->GetStationIndex(); - rct_synchronised_vehicle* sv = _lastSynchronisedVehicle; + SynchronisedVehicle* sv = _lastSynchronisedVehicle; sv->ride_id = rideIndex; sv->stationIndex = stationIndex; sv->vehicle_id = EntityId::GetNull(); @@ -2676,7 +2617,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) { continue; } - if (!vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT)) + if (!vehicle->HasFlag(VehicleFlags::WaitingOnAdjacentStation)) { continue; } @@ -2685,7 +2626,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) continue; } - sv->vehicle_id = vehicle->sprite_index; + sv->vehicle_id = vehicle->Id; return true; } @@ -2703,7 +2644,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) * * Permits vehicles to depart in two ways: * Returns true, permitting the vehicle in the param to depart immediately; - * The vehicle flag VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT is cleared for those + * The vehicle flag VehicleFlags::WaitingOnAdjacentStation is cleared for those * vehicles that depart in sync with the vehicle in the param. */ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex stationIndex) @@ -2767,9 +2708,9 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex return true; } - for (rct_synchronised_vehicle* sv = _synchronisedVehicles; sv < _lastSynchronisedVehicle; sv++) + for (SynchronisedVehicle* sv = _synchronisedVehicles; sv < _lastSynchronisedVehicle; sv++) { - Ride* sv_ride = get_ride(sv->ride_id); + Ride* sv_ride = GetRide(sv->ride_id); if (!(sv_ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) { @@ -2795,7 +2736,7 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex } /* Here all the of sync-ed stations are from the same ride */ - auto curRide = get_ride(rideId); + auto curRide = GetRide(rideId); if (curRide != nullptr) { for (int32_t i = 0; i < curRide->NumTrains; i++) @@ -2881,12 +2822,12 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex } // At this point all vehicles in _snychronisedVehicles can depart. - for (rct_synchronised_vehicle* sv = _synchronisedVehicles; sv < _lastSynchronisedVehicle; sv++) + for (SynchronisedVehicle* sv = _synchronisedVehicles; sv < _lastSynchronisedVehicle; sv++) { auto v = GetEntity(sv->vehicle_id); if (v != nullptr) { - v->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT); + v->ClearFlag(VehicleFlags::WaitingOnAdjacentStation); } } @@ -2907,7 +2848,7 @@ bool Vehicle::CanDepartSynchronised() const */ void Vehicle::PeepEasterEggHereWeAre() const { - for (Vehicle* vehicle = GetEntity(sprite_index); vehicle != nullptr; + for (Vehicle* vehicle = GetEntity(Id); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { for (int32_t i = 0; i < vehicle->num_peeps; ++i) @@ -2953,7 +2894,7 @@ static void test_finish(Ride& ride) totalTime = std::max(totalTime, 1u); ride.average_speed = ride.average_speed / totalTime; - window_invalidate_by_number(WindowClass::Ride, ride.id.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); } void Vehicle::UpdateTestFinish() @@ -2962,7 +2903,7 @@ void Vehicle::UpdateTestFinish() if (curRide == nullptr) return; test_finish(*curRide); - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING); + ClearFlag(VehicleFlags::Testing); } /** @@ -3003,12 +2944,12 @@ static void test_reset(Ride& ride, StationIndex curStation) } ride.total_air_time = 0; ride.current_test_station = curStation; - window_invalidate_by_number(WindowClass::Ride, ride.id.ToUnderlying()); + WindowInvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); } void Vehicle::TestReset() { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING); + SetFlag(VehicleFlags::Testing); auto curRide = GetRide(); if (curRide == nullptr) return; @@ -3100,19 +3041,19 @@ void Vehicle::UpdateDeparting() if (curRide == nullptr) return; - auto rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); if (rideEntry == nullptr) return; if (sub_state == 0) { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN)) + if (HasFlag(VehicleFlags::TrainIsBroken)) { if (curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) return; curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride_breakdown_add_news_item(curRide); + RideBreakdownAddNewsItem(*curRide); curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; @@ -3141,7 +3082,7 @@ void Vehicle::UpdateDeparting() if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING)) + if (HasFlag(VehicleFlags::Testing)) { if (curRide->current_test_segment + 1 < curRide->num_stations) { @@ -3160,7 +3101,7 @@ void Vehicle::UpdateDeparting() } } - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto& carEntry = rideEntry->Cars[vehicle_type]; const auto& rtd = curRide->GetRideTypeDescriptor(); switch (curRide->mode) { @@ -3191,7 +3132,7 @@ void Vehicle::UpdateDeparting() case RideMode::RotatingLift: case RideMode::FreefallDrop: case RideMode::BoatHire: - if (carEntry->flags & CAR_ENTRY_FLAG_POWERED) + if (carEntry.flags & CAR_ENTRY_FLAG_POWERED) break; if (velocity <= 131940) @@ -3231,7 +3172,7 @@ void Vehicle::UpdateDeparting() } if (curRide->mode == RideMode::Shuttle) { - update_flags ^= VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE; + Flags ^= VehicleFlags::PoweredCarInReverse; velocity = 0; // We have turned, so treat it like entering a new tile @@ -3252,12 +3193,12 @@ void Vehicle::UpdateDeparting() { if (_vehicleBreakdown == BREAKDOWN_SAFETY_CUT_OUT) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY); - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + SetFlag(VehicleFlags::StoppedOnLift); + ClearFlag(VehicleFlags::CollisionDisabled); } } else - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + ClearFlag(VehicleFlags::CollisionDisabled); } } else @@ -3270,12 +3211,12 @@ void Vehicle::UpdateDeparting() { if (_vehicleBreakdown == BREAKDOWN_SAFETY_CUT_OUT) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY); - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + SetFlag(VehicleFlags::StoppedOnLift); + ClearFlag(VehicleFlags::CollisionDisabled); } } else - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + ClearFlag(VehicleFlags::CollisionDisabled); } } } @@ -3409,7 +3350,7 @@ void Vehicle::CheckIfMissing() uint8_t vehicleIndex = 0; for (; vehicleIndex < curRide->NumTrains; ++vehicleIndex) - if (curRide->vehicles[vehicleIndex] == sprite_index) + if (curRide->vehicles[vehicleIndex] == Id) break; vehicleIndex++; @@ -3453,7 +3394,7 @@ void Vehicle::UpdateCollisionSetup() if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) { auto frontVehicle = GetHead(); - auto trainIndex = ride_get_train_index_from_vehicle(curRide, frontVehicle->sprite_index); + auto trainIndex = ride_get_train_index_from_vehicle(*curRide, frontVehicle->Id); if (!trainIndex.has_value()) { return; @@ -3474,15 +3415,14 @@ void Vehicle::UpdateCollisionSetup() KillAllPassengersInTrain(); Vehicle* lastVehicle = this; - for (Vehicle* train = GetEntity(sprite_index); train != nullptr; - train = GetEntity(train->next_vehicle_on_train)) + for (Vehicle* train = GetEntity(Id); train != nullptr; train = GetEntity(train->next_vehicle_on_train)) { lastVehicle = train; train->sub_state = 2; #ifdef ENABLE_SCRIPTING - InvokeVehicleCrashHook(train->sprite_index, "another_vehicle"); + InvokeVehicleCrashHook(train->Id, "another_vehicle"); #endif const auto trainLoc = train->GetLocation(); @@ -3495,10 +3435,10 @@ void Vehicle::UpdateCollisionSetup() VehicleCrashParticle::Create(train->colours, trainLoc); } - train->IsCrashedVehicle = true; - train->animationState = scenario_rand() & 0xFFFF; + train->SetFlag(VehicleFlags::Crashed); + train->animationState = ScenarioRand() & 0xFFFF; - train->animation_frame = scenario_rand() & 0x7; + train->animation_frame = ScenarioRand() & 0x7; train->sprite_width = 13; train->sprite_height_negative = 45; train->sprite_height_positive = 5; @@ -3513,7 +3453,7 @@ void Vehicle::UpdateCollisionSetup() auto nextTrain = GetEntity(lastVehicle->next_vehicle_on_ride); if (prevTrain == nullptr || nextTrain == nullptr) { - log_error("Corrupted vehicle list for ride!"); + LOG_ERROR("Corrupted vehicle list for ride!"); } else { @@ -3552,7 +3492,7 @@ void Vehicle::UpdateCrashSetup() int32_t edx = velocity >> 10; Vehicle* lastVehicle = this; - auto spriteId = sprite_index; + auto spriteId = Id; for (Vehicle* trainVehicle; !spriteId.IsNull(); spriteId = trainVehicle->next_vehicle_on_train) { trainVehicle = GetEntity(spriteId); @@ -3582,9 +3522,9 @@ void Vehicle::UpdateCrashSetup() trainVehicle->crash_x = trainX; trainVehicle->crash_y = trainY; trainVehicle->crash_z = trainZ; - trainVehicle->crash_x += (scenario_rand() & 0xF) - 8; - trainVehicle->crash_y += (scenario_rand() & 0xF) - 8; - trainVehicle->crash_z += (scenario_rand() & 0xF) - 8; + trainVehicle->crash_x += (ScenarioRand() & 0xF) - 8; + trainVehicle->crash_y += (ScenarioRand() & 0xF) - 8; + trainVehicle->crash_z += (ScenarioRand() & 0xF) - 8; trainVehicle->TrackLocation = { 0, 0, 0 }; } @@ -3594,7 +3534,7 @@ void Vehicle::UpdateCrashSetup() auto nextTrain = GetEntity(lastVehicle->next_vehicle_on_ride); if (prevTrain == nullptr || nextTrain == nullptr) { - log_error("Corrupted vehicle list for ride!"); + LOG_ERROR("Corrupted vehicle list for ride!"); } else { @@ -3677,7 +3617,7 @@ void Vehicle::UpdateTravelling() } if (curRide->mode == RideMode::Shuttle) { - update_flags ^= VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE; + Flags ^= VehicleFlags::PoweredCarInReverse; velocity = 0; } else @@ -3726,7 +3666,7 @@ void Vehicle::UpdateTravelling() if (velocity != 0) sound2_flags |= VEHICLE_SOUND2_FLAGS_LIFT_HILL; - if (!HasUpdateFlag(VEHICLE_UPDATE_FLAG_12)) + if (!HasFlag(VehicleFlags::ReverseInclineCompletedLap)) { if (velocity >= curRide->lift_hill_speed * -31079) { @@ -3735,7 +3675,7 @@ void Vehicle::UpdateTravelling() if (_vehicleBreakdown == 0) { sound2_flags &= ~VEHICLE_SOUND2_FLAGS_LIFT_HILL; - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY); + SetFlag(VehicleFlags::StoppedOnLift); } } } @@ -3751,7 +3691,7 @@ void Vehicle::UpdateTravelling() { if (_vehicleBreakdown == 0) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY); + SetFlag(VehicleFlags::StoppedOnLift); sound2_flags &= ~VEHICLE_SOUND2_FLAGS_LIFT_HILL; } } @@ -3766,7 +3706,8 @@ void Vehicle::UpdateTravelling() if (!(curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_3)) return; - if (curRide->mode == RideMode::ReverseInclineLaunchedShuttle && velocity >= 0 && !HasUpdateFlag(VEHICLE_UPDATE_FLAG_12)) + if (curRide->mode == RideMode::ReverseInclineLaunchedShuttle && velocity >= 0 + && !HasFlag(VehicleFlags::ReverseInclineCompletedLap)) { return; } @@ -3797,7 +3738,7 @@ void Vehicle::UpdateArrivingPassThroughStation(const Ride& curRide, const CarEnt } int32_t velocity_diff = velocity; - if (velocity_diff >= 1572864) + if (velocity_diff >= 24.0_mph) velocity_diff /= 8; else velocity_diff /= 16; @@ -3830,7 +3771,7 @@ void Vehicle::UpdateArrivingPassThroughStation(const Ride& curRide, const CarEnt } int32_t velocity_diff = velocity; - if (velocity_diff < -1572864) + if (velocity_diff < -24.0_mph) velocity_diff /= 8; else velocity_diff /= 16; @@ -3855,7 +3796,7 @@ void Vehicle::UpdateArrivingPassThroughStation(const Ride& curRide, const CarEnt if (GetRideTypeDescriptor(curRide.type).HasFlag(RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS) && curRide.mode != RideMode::Shuttle && curRide.mode != RideMode::PoweredLaunch) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_12); + SetFlag(VehicleFlags::ReverseInclineCompletedLap); } else { @@ -3896,7 +3837,7 @@ void Vehicle::UpdateArriving() case RideMode::SpaceRings: case RideMode::HauntedHouse: case RideMode::CrookedHouse: - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_12); + ClearFlag(VehicleFlags::ReverseInclineCompletedLap); velocity = 0; acceleration = 0; SetState(Vehicle::Status::UnloadingPassengers); @@ -3916,10 +3857,10 @@ void Vehicle::UpdateArriving() stationBrakesWork = false; } - rct_ride_entry* rideEntry = GetRideEntry(); - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto* rideEntry = GetRideEntry(); + const auto& carEntry = rideEntry->Cars[vehicle_type]; - UpdateArrivingPassThroughStation(*curRide, *carEntry, stationBrakesWork); + UpdateArrivingPassThroughStation(*curRide, carEntry, stationBrakesWork); curFlags = UpdateTrackMotion(nullptr); if (curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_COLLISION && !stationBrakesWork) @@ -3944,7 +3885,7 @@ void Vehicle::UpdateArriving() } var_C0++; - if ((curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_1) && (carEntry->flags & CAR_ENTRY_FLAG_GO_KART) && (var_C0 < 40)) + if ((curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_1) && (carEntry.flags & CAR_ENTRY_FLAG_GO_KART) && (var_C0 < 40)) { return; } @@ -3967,7 +3908,7 @@ void Vehicle::UpdateArriving() return; } - if (NumLaps == curRide->num_circuits && HasUpdateFlag(VEHICLE_UPDATE_FLAG_12)) + if (NumLaps == curRide->num_circuits && HasFlag(VehicleFlags::ReverseInclineCompletedLap)) { SetState(Vehicle::Status::Departing, 1); return; @@ -3995,7 +3936,7 @@ void Vehicle::UpdateArriving() return; } - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_12); + ClearFlag(VehicleFlags::ReverseInclineCompletedLap); velocity = 0; acceleration = 0; SetState(Vehicle::Status::UnloadingPassengers); @@ -4054,7 +3995,7 @@ void Vehicle::UpdateUnloadingPassengers() if (sub_state != 1) return; - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED) && HasUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING) + if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED) && HasFlag(VehicleFlags::Testing) && curRide->current_test_segment + 1 >= curRide->num_stations) { UpdateTestFinish(); @@ -4063,7 +4004,7 @@ void Vehicle::UpdateUnloadingPassengers() return; } - for (Vehicle* train = GetEntity(sprite_index); train != nullptr; + for (Vehicle* train = GetEntity(Id); train != nullptr; train = GetEntity(train->next_vehicle_on_train)) { if (train->restraints_position != 255) @@ -4088,14 +4029,13 @@ void Vehicle::UpdateUnloadingPassengers() if (sub_state != 1) return; - for (Vehicle* train = GetEntity(sprite_index); train != nullptr; - train = GetEntity(train->next_vehicle_on_train)) + for (Vehicle* train = GetEntity(Id); train != nullptr; train = GetEntity(train->next_vehicle_on_train)) { if (train->num_peeps != train->next_free_seat) return; } - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED) && HasUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING) + if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED) && HasFlag(VehicleFlags::Testing) && curRide->current_test_segment + 1 >= curRide->num_stations) { UpdateTestFinish(); @@ -4121,7 +4061,7 @@ void Vehicle::UpdateWaitingForCableLift() return; cableLift->SetState(Vehicle::Status::WaitingToDepart, sub_state); - cableLift->cable_lift_target = sprite_index; + cableLift->cable_lift_target = Id; } /** @@ -4136,13 +4076,13 @@ void Vehicle::UpdateTravellingCableLift() if (sub_state == 0) { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_BROKEN_TRAIN)) + if (HasFlag(VehicleFlags::TrainIsBroken)) { if (curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) return; curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride_breakdown_add_news_item(curRide); + RideBreakdownAddNewsItem(*curRide); curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; @@ -4157,7 +4097,7 @@ void Vehicle::UpdateTravellingCableLift() PeepEasterEggHereWeAre(); if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_TESTING)) + if (HasFlag(VehicleFlags::Testing)) { if (curRide->current_test_segment + 1 < curRide->num_stations) { @@ -4231,12 +4171,13 @@ void Vehicle::TryReconnectBoatToTrack(const CoordsXY& currentBoatLocation, const TrackLocation.x = trackCoords.x; TrackLocation.y = trackCoords.y; - auto trackElement = MapGetTrackElementAt(TrackLocation); - auto curRide = GetRide(); if (curRide != nullptr) { - SetTrackType(trackElement->GetTrackType()); + auto trackElement = MapGetTrackElementAt(TrackLocation); + if (trackElement != nullptr) + SetTrackType(trackElement->GetTrackType()); + SetTrackDirection(curRide->boat_hire_return_direction); BoatLocation.SetNull(); } @@ -4280,7 +4221,7 @@ void Vehicle::UpdateMotionBoatHire() for (;;) { - // loc_6DA7A5 + // Loc6DA7A5 var_35++; auto loc = BoatLocation.ToTileCentre(); CoordsXY loc2 = loc; @@ -4292,7 +4233,7 @@ void Vehicle::UpdateMotionBoatHire() loc2.y -= y; if (loc2.y < 0) { - // loc_6DA81A: + // Loc6DA81A: loc2.y = -loc2.y; bl = 24; if (loc2.y <= loc2.x * 4) @@ -4322,7 +4263,7 @@ void Vehicle::UpdateMotionBoatHire() loc2.y -= y; if (loc2.y < 0) { - // loc_6DA83D: + // Loc6DA83D: loc2.x = -loc2.x; loc2.y = -loc2.y; bl = 24; @@ -4350,7 +4291,7 @@ void Vehicle::UpdateMotionBoatHire() } } - // loc_6DA861: + // Loc6DA861: var_34 = bl; loc2.x += loc2.y; if (loc2.x <= 12) @@ -4404,27 +4345,27 @@ void Vehicle::UpdateMotionBoatHire() { if (!vehicle_boat_is_location_accessible({ loc2, TrackLocation.z })) { - // loc_6DA939: + // Loc6DA939: auto curRide = GetRide(); if (curRide == nullptr) return; - bool do_loc_6DAA97 = false; + bool do_Loc6DAA97 = false; if (sub_state != 1) { - do_loc_6DAA97 = true; + do_Loc6DAA97 = true; } else { auto flooredTileLoc = TileCoordsXY(flooredLocation); if (curRide->boat_hire_return_position != flooredTileLoc) { - do_loc_6DAA97 = true; + do_Loc6DAA97 = true; } } - // loc_6DAA97: - if (do_loc_6DAA97) + // Loc6DAA97: + if (do_Loc6DAA97) { remaining_distance = 0; if (sprite_direction == var_34) @@ -4454,7 +4395,7 @@ void Vehicle::UpdateMotionBoatHire() } else { - // loc_6DA9A2: + // Loc6DA9A2: uint16_t tilePart = loc2.x % COORDS_XY_STEP; if (tilePart == COORDS_XY_HALF_TILE) { @@ -4472,7 +4413,7 @@ void Vehicle::UpdateMotionBoatHire() } } - // loc_6DA9D1: + // Loc6DA9D1: remaining_distance = 0; if (!UpdateMotionCollisionDetection({ loc2, z }, nullptr)) { @@ -4497,7 +4438,7 @@ void Vehicle::UpdateMotionBoatHire() MoveTo(_vehicleCurPosition); } - // loc_6DAAC9: + // Loc6DAAC9: { int32_t edx = velocity >> 8; edx = (edx * edx); @@ -4516,7 +4457,7 @@ void Vehicle::UpdateMotionBoatHire() { eax = speed << 14; int32_t ebx = (speed * curMass) >> 2; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE)) + if (HasFlag(VehicleFlags::PoweredCarInReverse)) { eax = -eax; } @@ -4554,11 +4495,11 @@ void Vehicle::UpdateBoatLocation() sub_state = 0; uint8_t curDirection = ((sprite_direction + 19) >> 3) & 3; - uint8_t randDirection = scenario_rand() & 3; + uint8_t randDirection = ScenarioRand() & 3; if (lost_time_out > 1920) { - if (scenario_rand() & 1) + if (ScenarioRand() & 1) { CoordsXY destLocation = (returnPosition.ToCoordsXY() - CoordsDirectionDelta[returnDirection]).ToTileCentre(); @@ -5038,7 +4979,7 @@ void Vehicle::UpdateTopSpinOperating() if (_vehicleBreakdown == 0) return; - const top_spin_time_to_sprite_map* sprite_map = TopSpinTimeToSpriteMaps[sub_state]; + const TopSpinTimeToSpriteMap* sprite_map = TopSpinTimeToSpriteMaps[sub_state]; uint8_t rotation = sprite_map[current_time + 1].arm_rotation; if (rotation != 0xFF) { @@ -5148,24 +5089,24 @@ static TileElement* vehicle_check_collision(const CoordsXYZ& vehiclePosition) return nullptr; } -static void ride_train_crash(Ride* ride, uint16_t numFatalities) +static void ride_train_crash(Ride& ride, uint16_t numFatalities) { Formatter ft; ft.Add(numFatalities); uint8_t crashType = numFatalities == 0 ? RIDE_CRASH_TYPE_NO_FATALITIES : RIDE_CRASH_TYPE_FATALITIES; - if (crashType >= ride->last_crash_type) - ride->last_crash_type = crashType; + if (crashType >= ride.last_crash_type) + ride.last_crash_type = crashType; if (numFatalities != 0) { if (gConfigNotifications.RideCasualties) { - ride->FormatNameTo(ft); + ride.FormatNameTo(ft); News::AddItemToQueue( News::ItemType::Ride, numFatalities == 1 ? STR_X_PERSON_DIED_ON_X : STR_X_PEOPLE_DIED_ON_X, - ride->id.ToUnderlying(), ft); + ride.id.ToUnderlying(), ft); } if (gParkRatingCasualtyPenalty < 500) @@ -5184,16 +5125,16 @@ void Vehicle::KillAllPassengersInTrain() if (curRide == nullptr) return; - ride_train_crash(curRide, NumPeepsUntilTrainTail()); + ride_train_crash(*curRide, NumPeepsUntilTrainTail()); - for (Vehicle* trainCar = GetEntity(sprite_index); trainCar != nullptr; + for (Vehicle* trainCar = GetEntity(Id); trainCar != nullptr; trainCar = GetEntity(trainCar->next_vehicle_on_train)) { - trainCar->KillPassengers(curRide); + trainCar->KillPassengers(*curRide); } } -void Vehicle::KillPassengers(Ride* curRide) +void Vehicle::KillPassengers(const Ride& curRide) { if (num_peeps != next_free_seat) return; @@ -5209,11 +5150,11 @@ void Vehicle::KillPassengers(Ride* curRide) if (!curPeep->OutsideOfPark) { - decrement_guests_in_park(); + DecrementGuestsInPark(); auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); ContextBroadcastIntent(&intent); } - peep_sprite_remove(curPeep); + PeepEntityRemove(curPeep); } num_peeps = 0; @@ -5234,13 +5175,13 @@ void Vehicle::CrashOnLand() SetState(Vehicle::Status::Crashed, sub_state); #ifdef ENABLE_SCRIPTING - InvokeVehicleCrashHook(sprite_index, "land"); + InvokeVehicleCrashHook(Id, "land"); #endif if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) { auto frontVehicle = GetHead(); - auto trainIndex = ride_get_train_index_from_vehicle(curRide, frontVehicle->sprite_index); + auto trainIndex = ride_get_train_index_from_vehicle(*curRide, frontVehicle->Id); if (!trainIndex.has_value()) { return; @@ -5276,7 +5217,7 @@ void Vehicle::CrashOnLand() while (numParticles-- != 0) VehicleCrashParticle::Create(colours, curLoc); - IsCrashedVehicle = true; + SetFlag(VehicleFlags::Crashed); animation_frame = 0; animationState = 0; sprite_width = 13; @@ -5302,13 +5243,13 @@ void Vehicle::CrashOnWater() SetState(Vehicle::Status::Crashed, sub_state); #ifdef ENABLE_SCRIPTING - InvokeVehicleCrashHook(sprite_index, "water"); + InvokeVehicleCrashHook(Id, "water"); #endif if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) { auto frontVehicle = GetHead(); - auto trainIndex = ride_get_train_index_from_vehicle(curRide, frontVehicle->sprite_index); + auto trainIndex = ride_get_train_index_from_vehicle(*curRide, frontVehicle->Id); if (!trainIndex.has_value()) { return; @@ -5345,7 +5286,7 @@ void Vehicle::CrashOnWater() for (int32_t i = 0; i < 10; ++i) VehicleCrashParticle::Create(colours, curLoc + CoordsXYZ{ -4, 8, 0 }); - IsCrashedVehicle = true; + SetFlag(VehicleFlags::Crashed); animation_frame = 0; animationState = 0; sprite_width = 13; @@ -5363,7 +5304,7 @@ void Vehicle::CrashOnWater() */ void Vehicle::UpdateCrash() { - for (Vehicle* curVehicle = GetEntity(sprite_index); curVehicle != nullptr; + for (Vehicle* curVehicle = GetEntity(Id); curVehicle != nullptr; curVehicle = GetEntity(curVehicle->next_vehicle_on_train)) { CoordsXYZ curPos = curVehicle->GetLocation(); @@ -5373,10 +5314,10 @@ void Vehicle::UpdateCrash() if (curVehicle->crash_z <= 96) { curVehicle->crash_z++; - if ((scenario_rand() & 0xFFFF) <= 0x1555) + if ((ScenarioRand() & 0xFFFF) <= 0x1555) { - int32_t xOffset = (scenario_rand() & 2) - 1; - int32_t yOffset = (scenario_rand() & 2) - 1; + int32_t xOffset = (ScenarioRand() & 2) - 1; + int32_t yOffset = (ScenarioRand() & 2) - 1; ExplosionCloud::Create(curPos + CoordsXYZ{ xOffset, yOffset, 0 }); } @@ -5467,29 +5408,29 @@ void Vehicle::UpdateSound() if (rideEntry == nullptr) return; - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto& carEntry = rideEntry->Cars[vehicle_type]; - int32_t ecx = abs(velocity) - 0x10000; + int32_t ecx = abs(velocity) - 1.0_mph; if (ecx >= 0) { - frictionSound.id = carEntry->friction_sound_id; + frictionSound.id = carEntry.friction_sound_id; ecx >>= 15; frictionSound.volume = std::min(208 + (ecx & 0xFF), 255); } - switch (carEntry->sound_range) + switch (carEntry.sound_range) { case SOUND_RANGE_WHISTLE: screamSound.id = scream_sound_id; if (!(gCurrentTicks & 0x7F)) { - if (velocity < 0x40000 || scream_sound_id != OpenRCT2::Audio::SoundId::Null) + if (velocity < 4.0_mph || scream_sound_id != OpenRCT2::Audio::SoundId::Null) { - GetLiftHillSound(curRide, screamSound); + GetLiftHillSound(*curRide, screamSound); break; } - if ((scenario_rand() & 0xFFFF) <= 0x5555) + if ((ScenarioRand() & 0xFFFF) <= 0x5555) { scream_sound_id = OpenRCT2::Audio::SoundId::TrainWhistle; screamSound.volume = 255; @@ -5505,13 +5446,13 @@ void Vehicle::UpdateSound() screamSound.id = scream_sound_id; if (!(gCurrentTicks & 0x7F)) { - if (velocity < 0x40000 || scream_sound_id != OpenRCT2::Audio::SoundId::Null) + if (velocity < 4.0_mph || scream_sound_id != OpenRCT2::Audio::SoundId::Null) { - GetLiftHillSound(curRide, screamSound); + GetLiftHillSound(*curRide, screamSound); break; } - if ((scenario_rand() & 0xFFFF) <= 0x5555) + if ((ScenarioRand() & 0xFFFF) <= 0x5555) { scream_sound_id = OpenRCT2::Audio::SoundId::Tram; screamSound.volume = 255; @@ -5524,7 +5465,7 @@ void Vehicle::UpdateSound() break; default: - if ((carEntry->flags & CAR_ENTRY_FLAG_RIDERS_SCREAM)) + if ((carEntry.flags & CAR_ENTRY_FLAG_RIDERS_SCREAM)) { screamSound.id = UpdateScreamSound(); if (screamSound.id == OpenRCT2::Audio::SoundId::NoScream) @@ -5537,16 +5478,16 @@ void Vehicle::UpdateSound() break; } } - GetLiftHillSound(curRide, screamSound); + GetLiftHillSound(*curRide, screamSound); } // Friction sound - auto soundIdVolume = sub_6D7AC0(sound1_id, sound1_volume, frictionSound.id, frictionSound.volume); + auto soundIdVolume = Sub6D7AC0(sound1_id, sound1_volume, frictionSound.id, frictionSound.volume); sound1_id = soundIdVolume.id; sound1_volume = soundIdVolume.volume; // Scream sound - soundIdVolume = sub_6D7AC0(sound2_id, sound2_volume, screamSound.id, screamSound.volume); + soundIdVolume = Sub6D7AC0(sound2_id, sound2_volume, screamSound.id, screamSound.volume); sound2_id = soundIdVolume.id; sound2_volume = soundIdVolume.volume; @@ -5570,10 +5511,10 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound() if (velocity < 0) { - if (velocity > -0x2C000) + if (velocity > -2.75_mph) return OpenRCT2::Audio::SoundId::Null; - for (Vehicle* vehicle2 = GetEntity(sprite_index); vehicle2 != nullptr; + for (Vehicle* vehicle2 = GetEntity(Id); vehicle2 != nullptr; vehicle2 = GetEntity(vehicle2->next_vehicle_on_train)) { if (vehicle2->Pitch < 1) @@ -5588,10 +5529,10 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound() return OpenRCT2::Audio::SoundId::Null; } - if (velocity < 0x2C000) + if (velocity < 2.75_mph) return OpenRCT2::Audio::SoundId::Null; - for (Vehicle* vehicle2 = GetEntity(sprite_index); vehicle2 != nullptr; + for (Vehicle* vehicle2 = GetEntity(Id); vehicle2 != nullptr; vehicle2 = GetEntity(vehicle2->next_vehicle_on_train)) { if (vehicle2->Pitch < 5) @@ -5608,16 +5549,16 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound() OpenRCT2::Audio::SoundId Vehicle::ProduceScreamSound(const int32_t totalNumPeeps) { - rct_ride_entry* rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto& carEntry = rideEntry->Cars[vehicle_type]; if (scream_sound_id == OpenRCT2::Audio::SoundId::Null) { - auto r = scenario_rand(); + auto r = ScenarioRand(); if (totalNumPeeps >= static_cast(r % 16)) { - switch (carEntry->sound_range) + switch (carEntry.sound_range) { case SOUND_RANGE_SCREAMS_0: scream_sound_id = _screamSet0[r % std::size(_screamSet0)]; @@ -5685,7 +5626,7 @@ void Vehicle::SetMapToolbar() const size_t vehicleIndex; for (vehicleIndex = 0; vehicleIndex < std::size(curRide->vehicles); vehicleIndex++) - if (curRide->vehicles[vehicleIndex] == vehicle->sprite_index) + if (curRide->vehicles[vehicleIndex] == vehicle->Id) break; auto ft = Formatter(); @@ -5696,7 +5637,7 @@ void Vehicle::SetMapToolbar() const ft.Add(vehicleIndex + 1); curRide->FormatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); - intent.putExtra(INTENT_EXTRA_FORMATTER, &ft); + intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); } } @@ -5786,7 +5727,7 @@ int32_t Vehicle::UpdateMotionDodgems() sprite_direction &= 0x1E; Invalidate(); } - else if ((scenario_rand() & 0xFFFF) <= 2849) + else if ((ScenarioRand() & 0xFFFF) <= 2849) { if (var_35 & (1 << 6)) sprite_direction -= 2; @@ -5860,9 +5801,9 @@ int32_t Vehicle::UpdateMotionDodgems() Vehicle* collideVehicle = GetEntity(collideSprite.value()); if (collideVehicle != nullptr) { - var_34 = (scenario_rand() & 1) ? 1 : -1; + var_34 = (ScenarioRand() & 1) ? 1 : -1; - if (oldVelocity >= 131072) + if (oldVelocity >= 2.0_mph) { collideVehicle->DodgemsCollisionDirection = direction; DodgemsCollisionDirection = direction ^ (1 << 4); @@ -5870,9 +5811,9 @@ int32_t Vehicle::UpdateMotionDodgems() } else { - var_34 = (scenario_rand() & 1) ? 6 : -6; + var_34 = (ScenarioRand() & 1) ? 6 : -6; - if (oldVelocity >= 131072) + if (oldVelocity >= 2.0_mph) { DodgemsCollisionDirection = direction ^ (1 << 4); } @@ -5893,10 +5834,10 @@ int32_t Vehicle::UpdateMotionDodgems() { eax /= mass; } - rct_ride_entry* rideEntry = GetRideEntry(); - CarEntry* carEntry = &rideEntry->Cars[vehicle_type]; + const auto* rideEntry = GetRideEntry(); + const auto& carEntry = rideEntry->Cars[vehicle_type]; - if (!(carEntry->flags & CAR_ENTRY_FLAG_POWERED)) + if (!(carEntry.flags & CAR_ENTRY_FLAG_POWERED)) { acceleration = -eax; return _vehicleMotionTrackFlags; @@ -5904,7 +5845,7 @@ int32_t Vehicle::UpdateMotionDodgems() int32_t momentum = (speed * mass) >> 2; int32_t _eax = speed << 14; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE)) + if (HasFlag(VehicleFlags::PoweredCarInReverse)) { _eax = -_eax; } @@ -5924,10 +5865,10 @@ int32_t Vehicle::UpdateMotionDodgems() static bool wouldCollideWithDodgemsTrackEdge( const CoordsXY& coords, const CoordsXY& trackLocation, uint32_t trackType, uint16_t dodgemsCarRadius) { - int16_t rideLeft = trackLocation.x + DodgemsTrackSize(trackType).left; - int16_t rideRight = trackLocation.x + DodgemsTrackSize(trackType).right; - int16_t rideTop = trackLocation.y + DodgemsTrackSize(trackType).top; - int16_t rideBottom = trackLocation.y + DodgemsTrackSize(trackType).bottom; + int16_t rideLeft = trackLocation.x + GetDodgemsTrackSize(trackType).left; + int16_t rideRight = trackLocation.x + GetDodgemsTrackSize(trackType).right; + int16_t rideTop = trackLocation.y + GetDodgemsTrackSize(trackType).top; + int16_t rideBottom = trackLocation.y + GetDodgemsTrackSize(trackType).bottom; return coords.x - dodgemsCarRadius < rideLeft || coords.y - dodgemsCarRadius < rideTop || coords.x + dodgemsCarRadius > rideRight || coords.y + dodgemsCarRadius > rideBottom; @@ -5969,7 +5910,7 @@ std::optional Vehicle::DodgemsCarWouldCollideAt(const CoordsXY& coords ecx >>= 8; if (std::max(distX, distY) < ecx) { - return vehicle2->sprite_index; + return vehicle2->Id; } } } @@ -5983,7 +5924,7 @@ std::optional Vehicle::DodgemsCarWouldCollideAt(const CoordsXY& coords */ void Vehicle::UpdateTrackMotionUpStopCheck() const { - auto carEntry = Entry(); + const auto* carEntry = Entry(); if (carEntry == nullptr) { return; @@ -5993,7 +5934,7 @@ void Vehicle::UpdateTrackMotionUpStopCheck() const if (carEntry->flags & CAR_ENTRY_FLAG_NO_UPSTOP_WHEELS) { auto trackType = GetTrackType(); - if (!track_element_is_covered(trackType)) + if (!TrackElementIsCovered(trackType)) { auto gForces = GetGForces(); gForces.LateralG = std::abs(gForces.LateralG); @@ -6022,7 +5963,7 @@ void Vehicle::UpdateTrackMotionUpStopCheck() const { // No up stops bobsleigh type auto trackType = GetTrackType(); - if (!track_element_is_covered(trackType)) + if (!TrackElementIsCovered(trackType)) { auto gForces = GetGForces(); @@ -6086,7 +6027,7 @@ void Vehicle::ApplyStopBlockBrake() _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_BLOCK_BRAKE; acceleration = 0; // If the this is slow enough, stop it. If not, slow it down - if (velocity <= 0x20000) + if (velocity <= 2.0_mph) { velocity = 0; } @@ -6129,14 +6070,14 @@ void Vehicle::CheckAndApplyBlockSectionStopSite() switch (trackType) { case TrackElemType::BlockBrakes: - if (curRide->IsBlockSectioned() && trackElement->AsTrack()->BlockBrakeClosed()) + if (curRide->IsBlockSectioned() && trackElement->AsTrack()->IsBrakeClosed()) ApplyStopBlockBrake(); else ApplyNonStopBlockBrake(); break; case TrackElemType::EndStation: - if (trackElement->AsTrack()->BlockBrakeClosed()) + if (trackElement->AsTrack()->IsBrakeClosed()) _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_BLOCK_BRAKE; break; @@ -6149,7 +6090,7 @@ void Vehicle::CheckAndApplyBlockSectionStopSite() { if (trackType == TrackElemType::CableLiftHill || trackElement->AsTrack()->HasChain()) { - if (trackElement->AsTrack()->BlockBrakeClosed()) + if (trackElement->AsTrack()->IsBrakeClosed()) { ApplyStopBlockBrake(); } @@ -6166,16 +6107,16 @@ void Vehicle::CheckAndApplyBlockSectionStopSite() void Vehicle::UpdateVelocity() { int32_t nextVelocity = acceleration + velocity; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_ZERO_VELOCITY)) + if (HasFlag(VehicleFlags::StoppedOnLift)) { nextVelocity = 0; } - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP)) + if (HasFlag(VehicleFlags::StoppedOnHoldingBrake)) { vertical_drop_countdown--; if (vertical_drop_countdown == -70) { - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP); + ClearFlag(VehicleFlags::StoppedOnHoldingBrake); } if (vertical_drop_countdown >= 0) { @@ -6189,16 +6130,17 @@ void Vehicle::UpdateVelocity() _vehicleVelocityF64E0C = (nextVelocity >> 10) * 42; } -static void block_brakes_open_previous_section(Ride& ride, const CoordsXYZ& vehicleTrackLocation, TileElement* tileElement) +static void block_brakes_open_previous_section( + const Ride& ride, const CoordsXYZ& vehicleTrackLocation, TileElement* tileElement) { auto location = vehicleTrackLocation; - track_begin_end trackBeginEnd, slowTrackBeginEnd; + TrackBeginEnd trackBeginEnd, slowTrackBeginEnd; TileElement slowTileElement = *tileElement; bool counter = true; CoordsXY slowLocation = location; do { - if (!track_block_get_previous({ location, tileElement }, &trackBeginEnd)) + if (!TrackBlockGetPrevious({ location, tileElement }, &trackBeginEnd)) { return; } @@ -6217,7 +6159,7 @@ static void block_brakes_open_previous_section(Ride& ride, const CoordsXYZ& vehi counter = !counter; if (counter) { - track_block_get_previous({ slowLocation, &slowTileElement }, &slowTrackBeginEnd); + TrackBlockGetPrevious({ slowLocation, &slowTileElement }, &slowTrackBeginEnd); slowLocation.x = slowTrackBeginEnd.end_x; slowLocation.y = slowTrackBeginEnd.end_y; slowTileElement = *(slowTrackBeginEnd.begin_element); @@ -6237,7 +6179,7 @@ static void block_brakes_open_previous_section(Ride& ride, const CoordsXYZ& vehi { return; } - trackElement->SetBlockBrakeClosed(false); + trackElement->SetBrakeClosed(false); MapInvalidateElement(location, reinterpret_cast(trackElement)); auto trackType = trackElement->GetTrackType(); @@ -6268,7 +6210,7 @@ int32_t Vehicle::GetSwingAmount() const case TrackElemType::LeftQuarterHelixLargeDown: case TrackElemType::LeftBankedQuarterTurn5TileUp25: case TrackElemType::LeftBankedQuarterTurn5TileDown25: - // loc_6D67E1 + // Loc6D67E1 return 14; case TrackElemType::RightQuarterTurn5Tiles: @@ -6284,12 +6226,12 @@ int32_t Vehicle::GetSwingAmount() const case TrackElemType::RightQuarterHelixLargeDown: case TrackElemType::RightBankedQuarterTurn5TileUp25: case TrackElemType::RightBankedQuarterTurn5TileDown25: - // loc_6D6804 + // Loc6D6804 return -14; case TrackElemType::SBendLeft: case TrackElemType::SBendLeftCovered: - // loc_6D67EF + // Loc6D67EF if (track_progress < 48) { return 14; @@ -6298,7 +6240,7 @@ int32_t Vehicle::GetSwingAmount() const case TrackElemType::SBendRight: case TrackElemType::SBendRightCovered: - // loc_6D67CC + // Loc6D67CC if (track_progress < 48) { return -14; @@ -6317,7 +6259,7 @@ int32_t Vehicle::GetSwingAmount() const case TrackElemType::LeftCurvedLiftHill: case TrackElemType::LeftBankedQuarterTurn3TileUp25: case TrackElemType::LeftBankedQuarterTurn3TileDown25: - // loc_6D67BE + // Loc6D67BE return 13; case TrackElemType::RightQuarterTurn3Tiles: @@ -6332,33 +6274,33 @@ int32_t Vehicle::GetSwingAmount() const case TrackElemType::RightCurvedLiftHill: case TrackElemType::RightBankedQuarterTurn3TileUp25: case TrackElemType::RightBankedQuarterTurn3TileDown25: - // loc_6D67B0 + // Loc6D67B0 return -13; case TrackElemType::LeftQuarterTurn1Tile: case TrackElemType::LeftQuarterTurn1TileUp60: case TrackElemType::LeftQuarterTurn1TileDown60: - // loc_6D67A2 + // Loc6D67A2 return 12; case TrackElemType::RightQuarterTurn1Tile: case TrackElemType::RightQuarterTurn1TileUp60: case TrackElemType::RightQuarterTurn1TileDown60: - // loc_6D6794 + // Loc6D6794 return -12; case TrackElemType::LeftEighthToDiag: case TrackElemType::LeftEighthToOrthogonal: case TrackElemType::LeftEighthBankToDiag: case TrackElemType::LeftEighthBankToOrthogonal: - // loc_6D67D3 + // Loc6D67D3 return 15; case TrackElemType::RightEighthToDiag: case TrackElemType::RightEighthToOrthogonal: case TrackElemType::RightEighthBankToDiag: case TrackElemType::RightEighthBankToOrthogonal: - // loc_6D67F6 + // Loc6D67F6 return -15; } return 0; @@ -6455,13 +6397,13 @@ void Vehicle::UpdateSwingingCar() break; } - if (track_type_is_station(trackType) || trackType == TrackElemType::Brakes || trackType == TrackElemType::BlockBrakes) + if (TrackTypeIsStation(trackType) || trackType == TrackElemType::Brakes || trackType == TrackElemType::BlockBrakes) { dx = 0; cx = 0; } - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) + if (HasFlag(VehicleFlags::OnLiftHill)) { dx = 0; cx = 0; @@ -6497,7 +6439,7 @@ void Vehicle::UpdateSwingingCar() */ void Vehicle::UpdateSpinningCar() { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE)) + if (HasFlag(VehicleFlags::SpinningIsLocked)) { spin_speed = 0; return; @@ -6524,7 +6466,7 @@ void Vehicle::UpdateSpinningCar() spinningInertia += 6; spinSpeed = dword_F64E08 >> spinningInertia; // Alternate the spin direction (roughly). Perhaps in future save a value to the track - if (sprite_index.ToUnderlying() & 1) + if (Id.ToUnderlying() & 1) { spin_speed -= spinSpeed; } @@ -6637,164 +6579,211 @@ void Vehicle::UpdateAnimationAnimalFlying() animationState = frameWaitTimes[animation_frame]; } +/** + * Get the frame of animation for the current animationState based on animation speed and animation frames + */ +static uint8_t GetTargetFrame(const CarEntry& carEntry, uint32_t animationState) +{ + if (carEntry.AnimationSpeed == 0) + return 0; + auto targetFrame = animationState / (carEntry.AnimationSpeed << 2); + // mask of 0xFF + targetFrame &= std::numeric_limits::max(); + // multiply by number of frames. After the bitshift 8, the range will be 0 to AnimationFrames - 1 + targetFrame *= carEntry.AnimationFrames; + return targetFrame >> std::numeric_limits::digits; +} + +/** + * Compute the position that steam should be spawned + */ +static constexpr CoordsXYZ ComputeSteamOffset(int32_t height, int32_t length, uint8_t pitch, uint8_t yaw) +{ + uint8_t trueYaw = OpenRCT2::Entity::Yaw::YawTo64(yaw); + auto offsets = PitchToDirectionVectorFromGeometry[pitch]; + int32_t projectedRun = (offsets.x * length - offsets.y * height) / 256; + int32_t projectedHeight = (offsets.x * height + offsets.y * length) / 256; + return { ComputeXYVector(projectedRun, trueYaw), projectedHeight }; +} + +/** + * Decide based on current frame and number of frames if a steam particle should be generated on this frame + */ +static bool ShouldMakeSteam(uint8_t targetFrame, uint8_t animationFrames) +{ + if (animationFrames < 1) + return false; + // steam is produced twice per wheel revolution + return targetFrame == 0 || targetFrame == animationFrames / 2; +} + +/** + * Dummy function + */ +static void AnimateNone(Vehicle& vehicle, const CarEntry& carEntry) +{ + return; +} + +/** + * Animate the vehicle based on its speed + */ +static void AnimateSimpleVehicle(Vehicle& vehicle, const CarEntry& carEntry) +{ + vehicle.animationState += _vehicleVelocityF64E08; + uint8_t targetFrame = GetTargetFrame(carEntry, vehicle.animationState); + if (vehicle.animation_frame != targetFrame) + { + vehicle.animation_frame = targetFrame; + vehicle.Invalidate(); + } +} + +/** + * Animate the vehicle based on its speed plus add steam particles + */ +static void AnimateSteamLocomotive(Vehicle& vehicle, const CarEntry& carEntry) +{ + vehicle.animationState += _vehicleVelocityF64E08; + uint8_t targetFrame = GetTargetFrame(carEntry, vehicle.animationState); + if (vehicle.animation_frame != targetFrame) + { + vehicle.animation_frame = targetFrame; + if (ShouldMakeSteam(targetFrame, carEntry.AnimationFrames)) + { + auto curRide = vehicle.GetRide(); + if (curRide != nullptr) + { + if (!RideHasStationShelter(*curRide) + || (vehicle.status != Vehicle::Status::MovingToEndOfStation && vehicle.status != Vehicle::Status::Arriving)) + { + CoordsXYZ steamOffset = ComputeSteamOffset( + carEntry.SteamEffect.Vertical, carEntry.SteamEffect.Longitudinal, vehicle.Pitch, + vehicle.sprite_direction); + SteamParticle::Create(CoordsXYZ(vehicle.x, vehicle.y, vehicle.z) + steamOffset); + } + } + } + vehicle.Invalidate(); + } +} + +/** + * Animate the vehicle based on its speed. Specialized animation with exactly 2 frames due to how peep animation works. + */ +static void AnimateSwanBoat(Vehicle& vehicle, const CarEntry& carEntry) +{ + // The animation of swan boats places frames at 0 and 2 instead of 0 and 1 like Water Tricycles due to the second + // pair of peeps. The animation technically uses 4 frames, but ignores frames 1 and 3. + vehicle.animationState += _vehicleVelocityF64E08; + uint8_t targetFrame = GetTargetFrame(carEntry, vehicle.animationState) * 2; + if (vehicle.animation_frame != targetFrame) + { + vehicle.animation_frame = targetFrame; + vehicle.Invalidate(); + } +} + +/** + * Monorail Cycle animation only animates when a peep is present + */ +static void AnimateMonorailCycle(Vehicle& vehicle, const CarEntry& carEntry) +{ + if (vehicle.num_peeps != 0) + { + AnimateSimpleVehicle(vehicle, carEntry); + } +} + +/** + * Observation tower animates at a constant speed continuously + */ +static void AnimateObservationTower(Vehicle& vehicle, const CarEntry& carEntry) +{ + if (vehicle.animationState <= 0xCCCC) + { + vehicle.animationState += carEntry.AnimationSpeed; + } + else + { + vehicle.animationState = 0; + vehicle.animation_frame += 1; + vehicle.animation_frame %= carEntry.AnimationFrames; + vehicle.Invalidate(); + } +} +/** + * seatRotation value of 4 translates to animationFrame value of 0. This function makes that true for any number of animation + * frames + */ +static int16_t MultiDimensionTargetAngle(int16_t seatRotation, int16_t animationFrames) +{ + return ((seatRotation - 4) % animationFrames + animationFrames) % animationFrames; +} + +/** + * Multidimension targets a specific animation frame based on track + */ +static void AnimateMultiDimension(Vehicle& vehicle, const CarEntry& carEntry) +{ + if (vehicle.seat_rotation != vehicle.target_seat_rotation) + { + if (vehicle.animationState <= 0xCCCC) + { + vehicle.animationState += carEntry.AnimationSpeed; + } + else + { + vehicle.animationState = 0; + + if (vehicle.seat_rotation >= vehicle.target_seat_rotation) + vehicle.seat_rotation--; + else + vehicle.seat_rotation++; + + int16_t targetSeatRotation = MultiDimensionTargetAngle(vehicle.seat_rotation, carEntry.AnimationFrames); + if (targetSeatRotation != vehicle.animation_frame) + { + vehicle.animation_frame = targetSeatRotation; + vehicle.Invalidate(); + } + } + } +} + +/** + * Animal Flying animates only on chainlift and in an unusual way. Made by Spacek531 + */ +static void AnimateAnimalFlying(Vehicle& vehicle, const CarEntry& carEntry) +{ + vehicle.UpdateAnimationAnimalFlying(); + // makes animation play faster with vehicle speed + uint8_t targetFrame = abs(_vehicleVelocityF64E08) >> carEntry.AnimationSpeed; + vehicle.animationState = std::max(vehicle.animationState - targetFrame, 0u); +} + +using AnimateFunction = void (*)(Vehicle& vehicle, const CarEntry& carEntry); + +constexpr static const AnimateFunction AnimationFunctions[]{ + AnimateNone, AnimateSimpleVehicle, AnimateSteamLocomotive, AnimateSwanBoat, + AnimateMonorailCycle, AnimateMultiDimension, AnimateObservationTower, AnimateAnimalFlying, +}; +static_assert(std::size(AnimationFunctions) == EnumValue(CarEntryAnimation::Count)); + /** * * rct2: 0x006D63D4 */ void Vehicle::UpdateAdditionalAnimation() { - uint8_t targetFrame{}; - uint8_t curFrame{}; - uint32_t eax{}; - auto carEntry = Entry(); if (carEntry == nullptr) { return; } - switch (carEntry->animation) - { - case CAR_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE: // loc_6D652B - animationState += _vehicleVelocityF64E08; - targetFrame = (animationState >> 20) & 3; - if (animation_frame != targetFrame) - { - curFrame = animation_frame; - animation_frame = targetFrame; - targetFrame &= 0x02; - curFrame &= 0x02; - if (targetFrame != curFrame) - { - auto curRide = GetRide(); - if (curRide != nullptr) - { - if (!ride_has_station_shelter(curRide) - || (status != Vehicle::Status::MovingToEndOfStation && status != Vehicle::Status::Arriving)) - { - int32_t typeIndex = [&] { - switch (Pitch) - { - case 2: - // uphill - return 1; - case 6: - // downhill - return 2; - default: - return 0; - } - }(); - int32_t directionIndex = sprite_direction >> 1; - auto offset = SteamParticleOffsets[typeIndex][directionIndex]; - SteamParticle::Create({ x + offset.x, y + offset.y, z + offset.z }); - } - } - } - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_SWAN: // loc_6D6424 - animationState += _vehicleVelocityF64E08; - targetFrame = (animationState >> 18) & 2; - if (animation_frame != targetFrame) - { - animation_frame = targetFrame; - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_CANOES: // loc_6D6482 - animationState += _vehicleVelocityF64E08; - eax = ((animationState >> 13) & 0xFF) * 6; - targetFrame = (eax >> 8) & 0xFF; - if (animation_frame != targetFrame) - { - animation_frame = targetFrame; - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_ROW_BOATS: // loc_6D64F7 - animationState += _vehicleVelocityF64E08; - eax = ((animationState >> 13) & 0xFF) * 7; - targetFrame = (eax >> 8) & 0xFF; - if (animation_frame != targetFrame) - { - animation_frame = targetFrame; - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_WATER_TRICYCLES: // loc_6D6453 - animationState += _vehicleVelocityF64E08; - targetFrame = (animationState >> 19) & 1; - if (animation_frame != targetFrame) - { - animation_frame = targetFrame; - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_OBSERVATION_TOWER: // loc_6D65C3 - if (animationState <= 0xCCCC) - { - animationState += 0x3333; - } - else - { - animationState = 0; - animation_frame += 1; - animation_frame &= 7; - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_HELICARS: // loc_6D63F5 - animationState += _vehicleVelocityF64E08; - targetFrame = (animationState >> 18) & 3; - if (animation_frame != targetFrame) - { - animation_frame = targetFrame; - Invalidate(); - } - break; - case CAR_ENTRY_ANIMATION_MONORAIL_CYCLES: // loc_6D64B6 - if (num_peeps != 0) - { - animationState += _vehicleVelocityF64E08; - eax = ((animationState >> 13) & 0xFF) << 2; - targetFrame = (eax >> 8) & 0xFF; - if (animation_frame != targetFrame) - { - animation_frame = targetFrame; - Invalidate(); - } - } - break; - case CAR_ENTRY_ANIMATION_MULTI_DIM_COASTER: // loc_6D65E1 - if (seat_rotation != target_seat_rotation) - { - if (animationState <= 0xCCCC) - { - animationState += 0x3333; - } - else - { - animationState = 0; - - if (seat_rotation >= target_seat_rotation) - seat_rotation--; - - else - seat_rotation++; - - animation_frame = (seat_rotation - 4) & 7; - Invalidate(); - } - } - break; - case CAR_ENTRY_ANIMATION_ANIMAL_FLYING: - UpdateAnimationAnimalFlying(); - // makes animation play faster with vehicle speed - targetFrame = abs(_vehicleVelocityF64E08) >> 24; - animationState = std::max(animationState - targetFrame, 0u); - break; - } + if (carEntry->AnimationFrames == 0 || carEntry->animation >= CarEntryAnimation::Count) + return; + AnimationFunctions[EnumValue(carEntry->animation)](*this, *carEntry); } /** @@ -6866,12 +6855,12 @@ void Vehicle::UpdateSceneryDoor() const { auto trackType = GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - const rct_preview_track* trackBlock = ted.Block; + const PreviewTrack* trackBlock = ted.Block; while ((trackBlock + 1)->index != 255) { trackBlock++; } - const rct_track_coordinates* trackCoordinates = &ted.Coordinates; + const TrackCoordinates* trackCoordinates = &ted.Coordinates; auto wallCoords = CoordsXYZ{ x, y, TrackLocation.z - trackBlock->z + trackCoordinates->z_end }.ToTileStart(); int32_t direction = (GetTrackDirection() + trackCoordinates->rotation_end) & 3; @@ -6924,21 +6913,21 @@ static PitchAndRoll PitchAndRollStart(bool useInvertedSprites, TileElement* tile { auto trackType = tileElement->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - return PitchAndRoll{ ted.Definition.vangle_start, track_get_actual_bank_3(useInvertedSprites, tileElement) }; + return PitchAndRoll{ ted.Definition.vangle_start, TrackGetActualBank3(useInvertedSprites, tileElement) }; } void Vehicle::UpdateGoKartAttemptSwitchLanes() { uint16_t probability = 0x8000; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_6)) + if (HasFlag(VehicleFlags::CurrentlyColliding)) { - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_6); + ClearFlag(VehicleFlags::CurrentlyColliding); } else { probability = 0x0A3D; } - if ((scenario_rand() & 0xFFFF) <= probability) + if ((ScenarioRand() & 0xFFFF) <= probability) { // This changes "riding left" to "moving to right lane" and "riding right" to "moving to left lane". TrackSubposition = VehicleTrackSubposition{ static_cast(static_cast(TrackSubposition) + 2u) }; @@ -6964,8 +6953,8 @@ void Vehicle::UpdateSceneryDoorBackwards() const { auto trackType = GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); - const rct_preview_track* trackBlock = ted.Block; - const rct_track_coordinates* trackCoordinates = &ted.Coordinates; + const PreviewTrack* trackBlock = ted.Block; + const TrackCoordinates* trackCoordinates = &ted.Coordinates; auto wallCoords = CoordsXYZ{ TrackLocation, TrackLocation.z - trackBlock->z + trackCoordinates->z_begin }; int32_t direction = (GetTrackDirection() + trackCoordinates->rotation_begin) & 3; direction = DirectionReverse(direction); @@ -7006,7 +6995,7 @@ static void vehicle_update_play_water_splash_sound() */ void Vehicle::UpdateHandleWaterSplash() const { - rct_ride_entry* rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); auto trackType = GetTrackType(); if (!(rideEntry->flags & RIDE_ENTRY_FLAG_PLAY_SPLASH_SOUND)) @@ -7015,7 +7004,7 @@ void Vehicle::UpdateHandleWaterSplash() const { if (IsHead()) { - if (track_element_is_covered(trackType)) + if (TrackElementIsCovered(trackType)) { Vehicle* nextVehicle = GetEntity(next_vehicle_on_ride); if (nextVehicle == nullptr) @@ -7024,7 +7013,7 @@ void Vehicle::UpdateHandleWaterSplash() const Vehicle* nextNextVehicle = GetEntity(nextVehicle->next_vehicle_on_ride); if (nextNextVehicle == nullptr) return; - if (!track_element_is_covered(nextNextVehicle->GetTrackType())) + if (!TrackElementIsCovered(nextNextVehicle->GetTrackType())) { if (track_progress == 4) { @@ -7067,6 +7056,11 @@ void Vehicle::UpdateReverserCarBogies() MoveTo({ TrackLocation.x + moveInfo->x, TrackLocation.y + moveInfo->y, z }); } +bool Vehicle::IsCableLift() const +{ + return ride_subtype == OBJECT_ENTRY_INDEX_NULL; +} + /** * Collision Detection * rct2: 0x006DD078 @@ -7078,7 +7072,7 @@ void Vehicle::UpdateReverserCarBogies() */ bool Vehicle::UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* otherVehicleIndex) { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED)) + if (HasFlag(VehicleFlags::CollisionDisabled)) return false; auto carEntry = Entry(); @@ -7142,7 +7136,7 @@ bool Vehicle::UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* oth if (z_diff > 16) continue; - if (vehicle2->ride_subtype == OBJECT_ENTRY_INDEX_NULL) + if (vehicle2->IsCableLift()) continue; auto collideCarEntry = vehicle2->Entry(); @@ -7213,9 +7207,9 @@ bool Vehicle::UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* oth CollisionDetectionTimer++; if (CollisionDetectionTimer < 200) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_6); + SetFlag(VehicleFlags::CurrentlyColliding); if (otherVehicleIndex != nullptr) - *otherVehicleIndex = collideVehicle->sprite_index; + *otherVehicleIndex = collideVehicle->Id; return true; } @@ -7259,9 +7253,9 @@ bool Vehicle::UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* oth return false; } - SetUpdateFlag(VEHICLE_UPDATE_FLAG_6); + SetFlag(VehicleFlags::CurrentlyColliding); if (otherVehicleIndex != nullptr) - *otherVehicleIndex = collideVehicle->sprite_index; + *otherVehicleIndex = collideVehicle->Id; return true; } @@ -7294,7 +7288,7 @@ void Vehicle::ReverseReverserCar() */ void Vehicle::Sub6DBF3E() { - CarEntry* carEntry = Entry(); + const auto* carEntry = Entry(); acceleration /= _vehicleUnkF64E10; if (TrackSubposition == VehicleTrackSubposition::ChairliftGoingBack) @@ -7329,13 +7323,13 @@ void Vehicle::Sub6DBF3E() if (trackType == TrackElemType::TowerBase && this == gCurrentVehicle) { - if (track_progress > 3 && !HasUpdateFlag(VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE)) + if (track_progress > 3 && !HasFlag(VehicleFlags::PoweredCarInReverse)) { CoordsXYE output; int32_t outputZ, outputDirection; CoordsXYE input = { TrackLocation, tileElement }; - if (!track_block_get_next(&input, &output, &outputZ, &outputDirection)) + if (!TrackBlockGetNext(&input, &output, &outputZ, &outputDirection)) { _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_12; } @@ -7386,7 +7380,7 @@ void Vehicle::Sub6DBF3E() * * rct2: 0x006DB08C */ -bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* curRide, rct_ride_entry* rideEntry) +bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, const Ride& curRide, const RideObjectEntry& rideEntry) { CoordsXYZD location = {}; @@ -7407,16 +7401,17 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur { if (next_vehicle_on_train.IsNull()) { - tileElement->AsTrack()->SetBlockBrakeClosed(true); + tileElement->AsTrack()->SetBrakeClosed(true); + if (trackType == TrackElemType::BlockBrakes || trackType == TrackElemType::EndStation) { - if (!(rideEntry->Cars[0].flags & CAR_ENTRY_FLAG_POWERED)) + if (!(rideEntry.Cars[0].flags & CAR_ENTRY_FLAG_POWERED)) { OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::BlockBrakeRelease, TrackLocation); } } MapInvalidateElement(TrackLocation, tileElement); - block_brakes_open_previous_section(*curRide, TrackLocation, tileElement); + block_brakes_open_previous_section(curRide, TrackLocation, tileElement); } } @@ -7447,8 +7442,8 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur if (isGoingBack) { - track_begin_end trackBeginEnd; - if (!track_block_get_previous({ TrackLocation, tileElement }, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + if (!TrackBlockGetPrevious({ TrackLocation, tileElement }, &trackBeginEnd)) { return false; } @@ -7463,7 +7458,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur { int32_t curZ, direction; CoordsXYE xyElement = { TrackLocation, tileElement }; - if (!track_block_get_next(&xyElement, &xyElement, &curZ, &direction)) + if (!TrackBlockGetNext(&xyElement, &xyElement, &curZ, &direction)) { return false; } @@ -7473,26 +7468,26 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur if (tileElement->AsTrack()->GetTrackType() == TrackElemType::LeftReverser || tileElement->AsTrack()->GetTrackType() == TrackElemType::RightReverser) { - if (IsHead() && velocity <= 0x30000) + if (IsHead() && velocity <= 3.0_mph) { velocity = 0; } } - if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement) != pitchAndRollEnd) + if (PitchAndRollStart(HasFlag(VehicleFlags::CarIsInverted), tileElement) != pitchAndRollEnd) { return false; } - // Update VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES flag - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + // Update VehicleFlags::CarIsInverted flag + ClearFlag(VehicleFlags::CarIsInverted); { - int32_t rideType = get_ride(tileElement->AsTrack()->GetRideIndex())->type; + int32_t rideType = ::GetRide(tileElement->AsTrack()->GetRideIndex())->type; if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)) { if (tileElement->AsTrack()->IsInverted()) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + SetFlag(VehicleFlags::CarIsInverted); } } } @@ -7501,7 +7496,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur TrackLocation = location; // TODO check if getting the vehicle entry again is necessary - CarEntry* carEntry = Entry(); + const auto* carEntry = Entry(); if (carEntry == nullptr) { return false; @@ -7510,7 +7505,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur { trackType = tileElement->AsTrack()->GetTrackType(); if (trackType == TrackElemType::Flat - || ((curRide->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) && tileElement->AsTrack()->IsStation())) + || ((curRide.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) && tileElement->AsTrack()->IsStation())) { UpdateGoKartAttemptSwitchLanes(); } @@ -7521,22 +7516,22 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur { TileCoordsXYZ curLocation{ TrackLocation }; - if (curLocation == curRide->ChairliftBullwheelLocation[1]) + if (curLocation == curRide.ChairliftBullwheelLocation[1]) { TrackSubposition = VehicleTrackSubposition::ChairliftEndBullwheel; } - else if (curLocation == curRide->ChairliftBullwheelLocation[0]) + else if (curLocation == curRide.ChairliftBullwheelLocation[0]) { TrackSubposition = VehicleTrackSubposition::ChairliftStartBullwheel; } } - // loc_6DB500 - // Update VEHICLE_UPDATE_FLAG_ON_LIFT_HILL - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL); + // Loc6DB500 + // Update VehicleFlags::OnLiftHill + ClearFlag(VehicleFlags::OnLiftHill); if (tileElement->AsTrack()->HasChain()) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL); + SetFlag(VehicleFlags::OnLiftHill); } trackType = tileElement->AsTrack()->GetTrackType(); @@ -7553,7 +7548,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur } if (trackType == TrackElemType::RotationControlToggle) { - update_flags ^= VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE; + Flags ^= VehicleFlags::SpinningIsLocked; } // Change from original: this used to check if the vehicle allowed doors. UpdateSceneryDoorBackwards(); @@ -7566,10 +7561,10 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* cur * * rct2: 0x006DAEB9 */ -bool Vehicle::UpdateTrackMotionForwards(CarEntry* carEntry, Ride* curRide, rct_ride_entry* rideEntry) +bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& curRide, const RideObjectEntry& rideEntry) { EntityId otherVehicleIndex = EntityId::GetNull(); -loc_6DAEB9: +Loc6DAEB9: auto trackType = GetTrackType(); if (trackType == TrackElemType::HeartLineTransferUp || trackType == TrackElemType::HeartLineTransferDown) { @@ -7589,9 +7584,9 @@ loc_6DAEB9: } else if (trackType == TrackElemType::Brakes) { - bool hasBrakesFailure = curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN - && curRide->breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE; - if (!hasBrakesFailure || curRide->mechanic_status == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + bool hasBrakesFailure = curRide.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN + && curRide.breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE; + if (!hasBrakesFailure || curRide.mechanic_status == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { auto brakeSpeed = brake_speed << 16; if (brakeSpeed < _vehicleVelocityF64E08) @@ -7610,35 +7605,35 @@ loc_6DAEB9: } else if (trackType == TrackElemType::Booster) { - auto boosterSpeed = get_booster_speed(curRide->type, (brake_speed << 16)); + auto boosterSpeed = GetBoosterSpeed(curRide.type, (brake_speed << 16)); if (boosterSpeed > _vehicleVelocityF64E08) { - acceleration = GetRideTypeDescriptor(curRide->type).OperatingSettings.BoosterAcceleration + acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.BoosterAcceleration << 16; //_vehicleVelocityF64E08 * 1.2; } } - else if (rideEntry->flags & RIDE_ENTRY_FLAG_RIDER_CONTROLS_SPEED && num_peeps > 0) + else if (rideEntry.flags & RIDE_ENTRY_FLAG_RIDER_CONTROLS_SPEED && num_peeps > 0) { acceleration += CalculateRiderBraking(); } - if ((trackType == TrackElemType::Flat && curRide->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) + if ((trackType == TrackElemType::Flat && curRide.type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) || (trackType == TrackElemType::PoweredLift)) { - acceleration = GetRideTypeDescriptor(curRide->type).OperatingSettings.PoweredLiftAcceleration << 16; + acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.PoweredLiftAcceleration << 16; } if (trackType == TrackElemType::BrakeForDrop) { if (IsHead()) { - if (!HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP)) + if (!HasFlag(VehicleFlags::StoppedOnHoldingBrake)) { if (track_progress >= 8) { acceleration = -_vehicleVelocityF64E08 * 16; if (track_progress >= 24) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP); + SetFlag(VehicleFlags::StoppedOnHoldingBrake); vertical_drop_countdown = 90; } } @@ -7647,7 +7642,7 @@ loc_6DAEB9: } if (trackType == TrackElemType::LogFlumeReverser) { - if (track_progress != 16 || velocity < 0x40000) + if (track_progress != 16 || velocity < 4.0_mph) { if (track_progress == 32) { @@ -7682,13 +7677,13 @@ loc_6DAEB9: track_progress = newTrackProgress; UpdateHandleWaterSplash(); - // loc_6DB706 + // Loc6DB706 const auto moveInfo = GetMoveInfo(); trackType = GetTrackType(); uint8_t moveInfovehicleSpriteType; { auto nextVehiclePosition = TrackLocation - + CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset }; + + CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset }; uint8_t remainingDistanceFlags = 0; if (nextVehiclePosition.x != _vehicleCurPosition.x) @@ -7716,12 +7711,12 @@ loc_6DAEB9: { ReverseReverserCar(); - const rct_vehicle_info* moveInfo2 = GetMoveInfo(); + const VehicleInfo* moveInfo2 = GetMoveInfo(); nextVehiclePosition.x = x + moveInfo2->x; nextVehiclePosition.y = y + moveInfo2->y; } - // loc_6DB8A5 + // Loc6DB8A5 remaining_distance -= SubpositionTranslationDistances[remainingDistanceFlags]; _vehicleCurPosition = nextVehiclePosition; sprite_direction = moveInfo->direction; @@ -7753,15 +7748,15 @@ loc_6DAEB9: if (otherVeh == nullptr) { // This can never happen as prev_vehicle_on_ride will always be set to a vehicle - log_error("Failed to get next vehicle during update!"); + LOG_ERROR("Failed to get next vehicle during update!"); return true; } auto head = otherVeh->TrainHead(); auto velocityDelta = abs(velocity - head->velocity); - if (!(rideEntry->flags & RIDE_ENTRY_FLAG_DISABLE_COLLISION_CRASHES)) + if (!(rideEntry.flags & RIDE_ENTRY_FLAG_DISABLE_COLLISION_CRASHES)) { - if (velocityDelta > 0xE0000) + if (velocityDelta > 14.0_mph) { if (!(carEntry->flags & CAR_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION)) { @@ -7787,7 +7782,7 @@ loc_6DAEB9: } } - // loc_6DB928 + // Loc6DB928 if (remaining_distance < 0x368A) { return true; @@ -7795,21 +7790,21 @@ loc_6DAEB9: acceleration += AccelerationFromPitch[moveInfovehicleSpriteType]; _vehicleUnkF64E10++; - goto loc_6DAEB9; + goto Loc6DAEB9; } -static PitchAndRoll PitchAndRollEnd(Ride* curRide, bool useInvertedSprites, uint16_t trackType, TileElement* tileElement) +static PitchAndRoll PitchAndRollEnd(const Ride& curRide, bool useInvertedSprites, uint16_t trackType, TileElement* tileElement) { bool isInverted = useInvertedSprites ^ tileElement->AsTrack()->IsInverted(); const auto& ted = GetTrackElementDescriptor(trackType); - return { ted.Definition.vangle_end, track_get_actual_bank_2(curRide->type, isInverted, ted.Definition.bank_end) }; + return { ted.Definition.vangle_end, TrackGetActualBank2(curRide.type, isInverted, ted.Definition.bank_end) }; } /** * * rct2: 0x006DBAA6 */ -bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* curRide, uint16_t* progress) +bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, const Ride& curRide, uint16_t* progress) { auto pitchAndRollStart = TrackPitchAndRollStart(trackType); TileElement* tileElement = MapGetTrackElementAtOfTypeSeq(TrackLocation, trackType, 0); @@ -7819,7 +7814,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu bool nextTileBackwards = true; int32_t direction = 0; - // loc_6DBB08:; + // Loc6DBB08:; auto trackPos = CoordsXYZ{ TrackLocation.x, TrackLocation.y, 0 }; switch (TrackSubposition) @@ -7844,9 +7839,9 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu if (nextTileBackwards) { - // loc_6DBB7E:; - track_begin_end trackBeginEnd; - if (!track_block_get_previous({ trackPos, tileElement }, &trackBeginEnd)) + // Loc6DBB7E:; + TrackBeginEnd trackBeginEnd; + if (!TrackBlockGetPrevious({ trackPos, tileElement }, &trackBeginEnd)) { return false; } @@ -7858,19 +7853,18 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu return false; } - if (PitchAndRollEnd(curRide, HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), trackType, tileElement) - != pitchAndRollStart) + if (PitchAndRollEnd(curRide, HasFlag(VehicleFlags::CarIsInverted), trackType, tileElement) != pitchAndRollStart) { return false; } - // Update VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); - if (GetRideTypeDescriptor(curRide->type).HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)) + // Update VehicleFlags::CarIsInverted + ClearFlag(VehicleFlags::CarIsInverted); + if (GetRideTypeDescriptor(curRide.type).HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)) { if (tileElement->AsTrack()->IsInverted()) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + SetFlag(VehicleFlags::CarIsInverted); } } @@ -7879,7 +7873,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu } else { - // loc_6DBB4F:; + // Loc6DBB4F:; CoordsXYE input; CoordsXYE output; int32_t outputZ{}; @@ -7887,7 +7881,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu input.x = trackPos.x; input.y = trackPos.y; input.element = tileElement; - if (!track_block_get_next(&input, &output, &outputZ, &direction)) + if (!TrackBlockGetNext(&input, &output, &outputZ, &direction)) { return false; } @@ -7895,7 +7889,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu trackPos = { output, outputZ }; } - // loc_6DBC3B: + // Loc6DBC3B: TrackLocation = trackPos; if (TrackSubposition >= VehicleTrackSubposition::ChairliftGoingOut @@ -7903,11 +7897,11 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu { TileCoordsXYZ curLocation{ TrackLocation }; - if (curLocation == curRide->ChairliftBullwheelLocation[1]) + if (curLocation == curRide.ChairliftBullwheelLocation[1]) { TrackSubposition = VehicleTrackSubposition::ChairliftEndBullwheel; } - else if (curLocation == curRide->ChairliftBullwheelLocation[0]) + else if (curLocation == curRide.ChairliftBullwheelLocation[0]) { TrackSubposition = VehicleTrackSubposition::ChairliftStartBullwheel; } @@ -7926,14 +7920,14 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_9; } } - SetUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL); + SetFlag(VehicleFlags::OnLiftHill); } } else { - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) + if (HasFlag(VehicleFlags::OnLiftHill)) { - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL); + ClearFlag(VehicleFlags::OnLiftHill); if (next_vehicle_on_train.IsNull()) { if (_vehicleVelocityF64E08 < 0) @@ -7964,14 +7958,14 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* cu * * rct2: 0x006DBA33 */ -bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ride_entry* rideEntry) +bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& curRide, const RideObjectEntry& rideEntry) { EntityId otherVehicleIndex = EntityId::GetNull(); while (true) { auto trackType = GetTrackType(); - if (trackType == TrackElemType::Flat && curRide->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) + if (trackType == TrackElemType::Flat && curRide.type == RIDE_TYPE_REVERSE_FREEFALL_COASTER) { int32_t unkVelocity = _vehicleVelocityF64E08; if (unkVelocity < -524288) @@ -7991,10 +7985,10 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ if (trackType == TrackElemType::Booster) { - auto boosterSpeed = get_booster_speed(curRide->type, (brake_speed << 16)); + auto boosterSpeed = GetBoosterSpeed(curRide.type, (brake_speed << 16)); if (boosterSpeed < _vehicleVelocityF64E08) { - acceleration = GetRideTypeDescriptor(curRide->type).OperatingSettings.BoosterAcceleration << 16; + acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.BoosterAcceleration << 16; } } @@ -8012,14 +8006,14 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ } } - // loc_6DBD42 + // Loc6DBD42 track_progress = newTrackProgress; uint8_t moveInfoVehicleSpriteType; { - const rct_vehicle_info* moveInfo = GetMoveInfo(); + const VehicleInfo* moveInfo = GetMoveInfo(); auto nextVehiclePosition = TrackLocation + CoordsXYZ{ moveInfo->x, moveInfo->y, - moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset }; + moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset }; uint8_t remainingDistanceFlags = 0; if (nextVehiclePosition.x != _vehicleCurPosition.x) @@ -8066,9 +8060,9 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ return false; } - if (!(rideEntry->flags & RIDE_ENTRY_FLAG_DISABLE_COLLISION_CRASHES)) + if (!(rideEntry.flags & RIDE_ENTRY_FLAG_DISABLE_COLLISION_CRASHES)) { - if (abs(v4->velocity - v3->velocity) > 0xE0000) + if (abs(v4->velocity - v3->velocity) > 14.0_mph) { if (!(carEntry->flags & CAR_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION)) { @@ -8096,7 +8090,7 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ } } - // loc_6DBE3F + // Loc6DBE3F if (remaining_distance >= 0) { return true; @@ -8111,7 +8105,8 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ * * */ -void Vehicle::UpdateTrackMotionMiniGolfVehicle(Ride* curRide, rct_ride_entry* rideEntry, CarEntry* carEntry) + +void Vehicle::UpdateTrackMotionMiniGolfVehicle(const Ride& curRide, const RideObjectEntry& rideEntry, const CarEntry* carEntry) { EntityId otherVehicleIndex = EntityId::GetNull(); TileElement* tileElement = nullptr; @@ -8120,13 +8115,14 @@ void Vehicle::UpdateTrackMotionMiniGolfVehicle(Ride* curRide, rct_ride_entry* ri _vehicleUnkF64E10 = 1; acceleration = AccelerationFromPitch[Pitch]; - if (!HasUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION)) + if (!HasFlag(VehicleFlags::MoveSingleCar)) { remaining_distance = _vehicleVelocityF64E0C + remaining_distance; } if (remaining_distance >= 0 && remaining_distance < 0x368A) { - goto loc_6DCE02; + Loc6DCE02(curRide); + return; } sound2_flags &= ~VEHICLE_SOUND2_FLAGS_LIFT_HILL; _vehicleCurPosition.x = x; @@ -8134,24 +8130,24 @@ void Vehicle::UpdateTrackMotionMiniGolfVehicle(Ride* curRide, rct_ride_entry* ri _vehicleCurPosition.z = z; Invalidate(); if (remaining_distance < 0) - goto loc_6DCA9A; + goto Loc6DCA9A; -loc_6DC462: +Loc6DC462: if (var_D3 == 0) { - goto loc_6DC476; + goto Loc6DC476; } var_D3--; - goto loc_6DC985; + goto Loc6DC985; -loc_6DC476: +Loc6DC476: if (mini_golf_flags & MiniGolfFlag::Flag2) { uint8_t nextFrame = animation_frame + 1; if (nextFrame < MiniGolfPeepAnimationLengths[EnumValue(mini_golf_current_animation)]) { animation_frame = nextFrame; - goto loc_6DC985; + goto Loc6DC985; } mini_golf_flags &= ~MiniGolfFlag::Flag2; } @@ -8166,11 +8162,11 @@ loc_6DC476: } if (!(vEDI->mini_golf_flags & MiniGolfFlag::Flag0) || (vEDI->mini_golf_flags & MiniGolfFlag::Flag2)) { - goto loc_6DC985; + goto Loc6DC985; } if (vEDI->var_D3 != 0) { - goto loc_6DC985; + goto Loc6DC985; } vEDI->mini_golf_flags &= ~MiniGolfFlag::Flag0; mini_golf_flags &= ~MiniGolfFlag::Flag0; @@ -8186,11 +8182,11 @@ loc_6DC476: } if (!(vEDI->mini_golf_flags & MiniGolfFlag::Flag1) || (vEDI->mini_golf_flags & MiniGolfFlag::Flag2)) { - goto loc_6DC985; + goto Loc6DC985; } if (vEDI->var_D3 != 0) { - goto loc_6DC985; + goto Loc6DC985; } vEDI->mini_golf_flags &= ~MiniGolfFlag::Flag1; mini_golf_flags &= ~MiniGolfFlag::Flag1; @@ -8213,7 +8209,7 @@ loc_6DC476: continue; if (vEDI->TrackLocation != TrackLocation) continue; - goto loc_6DC985; + goto Loc6DC985; } mini_golf_flags |= MiniGolfFlag::Flag4; @@ -8226,7 +8222,7 @@ loc_6DC476: if (track_progress + 1 < trackTotalProgress) { track_progress += 1; - goto loc_6DC743; + goto Loc6DC743; } } @@ -8236,29 +8232,28 @@ loc_6DC476: int32_t outZ{}; int32_t outDirection{}; CoordsXYE input = { TrackLocation, tileElement }; - if (!track_block_get_next(&input, &output, &outZ, &outDirection)) + if (!TrackBlockGetNext(&input, &output, &outZ, &outDirection)) { - goto loc_6DC9BC; + goto Loc6DC9BC; } tileElement = output.element; trackPos = { output.x, output.y, outZ }; direction = outDirection; } - if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement) - != TrackPitchAndRollEnd(GetTrackType())) + if (PitchAndRollStart(HasFlag(VehicleFlags::CarIsInverted), tileElement) != TrackPitchAndRollEnd(GetTrackType())) { - goto loc_6DC9BC; + goto Loc6DC9BC; } { - int32_t rideType = get_ride(tileElement->AsTrack()->GetRideIndex())->type; - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + int32_t rideType = ::GetRide(tileElement->AsTrack()->GetRideIndex())->type; + ClearFlag(VehicleFlags::CarIsInverted); if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)) { if (tileElement->AsTrack()->IsInverted()) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + SetFlag(VehicleFlags::CarIsInverted); } } } @@ -8278,13 +8273,13 @@ loc_6DC476: } } - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL); + ClearFlag(VehicleFlags::OnLiftHill); SetTrackType(tileElement->AsTrack()->GetTrackType()); SetTrackDirection(direction); brake_speed = tileElement->AsTrack()->GetBrakeBoosterSpeed(); track_progress = 0; -loc_6DC743: +Loc6DC743: if (!IsHead()) { animation_frame++; @@ -8293,7 +8288,7 @@ loc_6DC743: animation_frame = 0; } } - const rct_vehicle_info* moveInfo; + const VehicleInfo* moveInfo; for (;;) { moveInfo = GetMoveInfo(); @@ -8303,14 +8298,14 @@ loc_6DC743: } switch (MiniGolfState(moveInfo->y)) { - case MiniGolfState::Unk0: // loc_6DC7B4 + case MiniGolfState::Unk0: // Loc6DC7B4 if (!IsHead()) { mini_golf_flags |= MiniGolfFlag::Flag3; } else { - uint16_t rand16 = scenario_rand() & 0xFFFF; + uint16_t rand16 = ScenarioRand() & 0xFFFF; VehicleTrackSubposition nextTrackSubposition = VehicleTrackSubposition::MiniGolfBallPathC14; if (rand16 <= 0xA000) { @@ -8324,21 +8319,21 @@ loc_6DC743: } track_progress++; break; - case MiniGolfState::Unk1: // loc_6DC7ED - log_error("Unused move info..."); + case MiniGolfState::Unk1: // Loc6DC7ED + LOG_ERROR("Unused move info..."); assert(false); var_D3 = static_cast(moveInfo->z); track_progress++; break; - case MiniGolfState::Unk2: // loc_6DC800 + case MiniGolfState::Unk2: // Loc6DC800 mini_golf_flags |= MiniGolfFlag::Flag0; track_progress++; break; - case MiniGolfState::Unk3: // loc_6DC810 + case MiniGolfState::Unk3: // Loc6DC810 mini_golf_flags |= MiniGolfFlag::Flag1; track_progress++; break; - case MiniGolfState::Unk4: // loc_6DC820 + case MiniGolfState::Unk4: // Loc6DC820 { auto animation = MiniGolfAnimation(moveInfo->z); // When the ride is closed occasionally the peep is removed @@ -8349,14 +8344,14 @@ loc_6DC743: { if (animation == MiniGolfAnimation::SwingLeft) { - if (curPeep->Id & 7) + if (curPeep->PeepId & 7) { animation = MiniGolfAnimation::Swing; } } if (animation == MiniGolfAnimation::PuttLeft) { - if (curPeep->Id & 7) + if (curPeep->PeepId & 7) { animation = MiniGolfAnimation::Putt; } @@ -8367,25 +8362,25 @@ loc_6DC743: track_progress++; break; } - case MiniGolfState::Unk5: // loc_6DC87A + case MiniGolfState::Unk5: // Loc6DC87A mini_golf_flags |= MiniGolfFlag::Flag2; track_progress++; break; - case MiniGolfState::Unk6: // loc_6DC88A + case MiniGolfState::Unk6: // Loc6DC88A mini_golf_flags &= ~MiniGolfFlag::Flag4; mini_golf_flags |= MiniGolfFlag::Flag5; track_progress++; break; default: - log_error("Invalid move info..."); + LOG_ERROR("Invalid move info..."); assert(false); break; } } - // loc_6DC8A1 + // Loc6DC8A1 trackPos = { TrackLocation.x + moveInfo->x, TrackLocation.y + moveInfo->y, - TrackLocation.z + moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset }; + TrackLocation.z + moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset }; remaining_distance -= 0x368A; if (remaining_distance < 0) @@ -8398,7 +8393,7 @@ loc_6DC743: bank_rotation = moveInfo->bank_rotation; Pitch = moveInfo->Pitch; - if (rideEntry->Cars[0].flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) + if (rideEntry.Cars[0].flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) { if (Pitch != 0) { @@ -8416,72 +8411,71 @@ loc_6DC743: UpdateMotionCollisionDetection(trackPos, &otherVehicleIndex); } } - goto loc_6DC99A; + goto Loc6DC99A; -loc_6DC985: +Loc6DC985: remaining_distance -= 0x368A; if (remaining_distance < 0) { remaining_distance = 0; } -loc_6DC99A: +Loc6DC99A: if (remaining_distance < 0x368A) { - goto loc_6DCDE4; + goto Loc6DCDE4; } acceleration = AccelerationFromPitch[Pitch]; _vehicleUnkF64E10++; - goto loc_6DC462; + goto Loc6DC462; -loc_6DC9BC: +Loc6DC9BC: _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= remaining_distance + 1; remaining_distance = -1; - goto loc_6DCD2B; + goto Loc6DCD2B; -loc_6DCA9A: +Loc6DCA9A: if (track_progress != 0) { track_progress -= 1; - goto loc_6DCC2C; + goto Loc6DCC2C; } tileElement = MapGetTrackElementAtOfTypeSeq(TrackLocation, GetTrackType(), 0); { - track_begin_end trackBeginEnd; - if (!track_block_get_previous({ TrackLocation, tileElement }, &trackBeginEnd)) + TrackBeginEnd trackBeginEnd; + if (!TrackBlockGetPrevious({ TrackLocation, tileElement }, &trackBeginEnd)) { - goto loc_6DC9BC; + goto Loc6DC9BC; } trackPos = { trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z }; direction = trackBeginEnd.begin_direction; tileElement = trackBeginEnd.begin_element; } - if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement) - != TrackPitchAndRollEnd(GetTrackType())) + if (PitchAndRollStart(HasFlag(VehicleFlags::CarIsInverted), tileElement) != TrackPitchAndRollEnd(GetTrackType())) { - goto loc_6DCD4A; + goto Loc6DCD4A; } { - int32_t rideType = get_ride(tileElement->AsTrack()->GetRideIndex())->type; - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + int32_t rideType = ::GetRide(tileElement->AsTrack()->GetRideIndex())->type; + ClearFlag(VehicleFlags::CarIsInverted); if (GetRideTypeDescriptor(rideType).HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE)) { if (tileElement->AsTrack()->IsInverted()) { - SetUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES); + SetFlag(VehicleFlags::CarIsInverted); } } } TrackLocation = trackPos; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) + if (HasFlag(VehicleFlags::OnLiftHill)) { - ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL); + ClearFlag(VehicleFlags::OnLiftHill); if (next_vehicle_on_train.IsNull()) { if (_vehicleVelocityF64E08 < 0) @@ -8498,10 +8492,10 @@ loc_6DCA9A: // There are two bytes before the move info list track_progress = GetTrackProgress(); -loc_6DCC2C: +Loc6DCC2C: moveInfo = GetMoveInfo(); trackPos = { TrackLocation.x + moveInfo->x, TrackLocation.y + moveInfo->y, - TrackLocation.z + moveInfo->z + GetRideTypeDescriptor(curRide->type).Heights.VehicleZOffset }; + TrackLocation.z + moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset }; remaining_distance -= 0x368A; if (remaining_distance < 0) @@ -8514,7 +8508,7 @@ loc_6DCC2C: bank_rotation = moveInfo->bank_rotation; Pitch = moveInfo->Pitch; - if (rideEntry->Cars[0].flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) + if (rideEntry.Cars[0].flags & CAR_ENTRY_FLAG_WOODEN_WILD_MOUSE_SWING) { if (Pitch != 0) { @@ -8531,27 +8525,27 @@ loc_6DCC2C: otherVehicleIndex = EntityId::FromUnderlying(var_44); // Possibly wrong?. if (UpdateMotionCollisionDetection(trackPos, &otherVehicleIndex)) { - goto loc_6DCD6B; + goto Loc6DCD6B; } } } -loc_6DCD2B: +Loc6DCD2B: if (remaining_distance >= 0) { - goto loc_6DCDE4; + goto Loc6DCDE4; } acceleration += AccelerationFromPitch[Pitch]; _vehicleUnkF64E10++; - goto loc_6DCA9A; + goto Loc6DCA9A; -loc_6DCD4A: +Loc6DCD4A: _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5; _vehicleVelocityF64E0C -= remaining_distance - 0x368A; remaining_distance = 0x368A; - goto loc_6DC99A; + goto Loc6DC99A; -loc_6DCD6B: +Loc6DCD6B: _vehicleVelocityF64E0C -= remaining_distance - 0x368A; remaining_distance = 0x368A; { @@ -8561,7 +8555,7 @@ loc_6DCD6B: return; } Vehicle* vEDI = gCurrentVehicle; - if (abs(vEDI->velocity - vEBP->velocity) > 0xE0000) + if (abs(vEDI->velocity - vEBP->velocity) > 14.0_mph) { if (!(carEntry->flags & CAR_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION)) { @@ -8572,29 +8566,32 @@ loc_6DCD6B: vEBP->velocity = vEDI->velocity >> 1; } _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_2; - goto loc_6DC99A; + goto Loc6DC99A; -loc_6DCDE4: +Loc6DCDE4: MoveTo(_vehicleCurPosition); -loc_6DCE02: + Loc6DCE02(curRide); +} + +void Vehicle::Loc6DCE02(const Ride& curRide) +{ acceleration /= _vehicleUnkF64E10; if (TrackSubposition == VehicleTrackSubposition::ChairliftGoingBack) { return; } + + auto trackType = GetTrackType(); + const auto& ted = GetTrackElementDescriptor(trackType); + if (!(std::get<0>(ted.SequenceProperties) & TRACK_SEQUENCE_FLAG_ORIGIN)) { - auto trackType = GetTrackType(); - const auto& ted = GetTrackElementDescriptor(trackType); - if (!(std::get<0>(ted.SequenceProperties) & TRACK_SEQUENCE_FLAG_ORIGIN)) - { - return; - } - _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_3; - if (trackType != TrackElemType::EndStation) - { - return; - } + return; + } + _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_3; + if (trackType != TrackElemType::EndStation) + { + return; } if (this != gCurrentVehicle) { @@ -8614,7 +8611,7 @@ loc_6DCE02: _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION; - for (const auto& station : curRide->GetStations()) + for (const auto& station : curRide.GetStations()) { if (TrackLocation != station.Start) { @@ -8624,7 +8621,7 @@ loc_6DCE02: { continue; } - _vehicleStationIndex = curRide->GetStationIndex(&station); + _vehicleStationIndex = curRide.GetStationIndex(&station); } } @@ -8677,7 +8674,7 @@ int32_t Vehicle::UpdateTrackMotionMiniGolfCalculateAcceleration(const CarEntry& { int32_t poweredAcceleration = speed << 14; int32_t quarterForce = (speed * totalMass) >> 2; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE)) + if (HasFlag(VehicleFlags::PoweredCarInReverse)) { poweredAcceleration = -poweredAcceleration; } @@ -8713,7 +8710,7 @@ int32_t Vehicle::UpdateTrackMotionMiniGolfCalculateAcceleration(const CarEntry& } } - if (abs(velocity) > 0x10000) + if (abs(velocity) > 1.0_mph) { newAcceleration = 0; } @@ -8729,8 +8726,11 @@ int32_t Vehicle::UpdateTrackMotionMiniGolf(int32_t* outStation) if (curRide == nullptr) return 0; - rct_ride_entry* rideEntry = GetRideEntry(); - CarEntry* carEntry = Entry(); + const auto* rideEntry = GetRideEntry(); + if (rideEntry == nullptr) + return 0; + + const auto* carEntry = Entry(); gCurrentVehicle = this; _vehicleMotionTrackFlags = 0; @@ -8741,12 +8741,12 @@ int32_t Vehicle::UpdateTrackMotionMiniGolf(int32_t* outStation) for (Vehicle* vehicle = _vehicleFrontVehicle; vehicle != nullptr;) { - vehicle->UpdateTrackMotionMiniGolfVehicle(curRide, rideEntry, carEntry); - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) + vehicle->UpdateTrackMotionMiniGolfVehicle(*curRide, *rideEntry, carEntry); + if (vehicle->HasFlag(VehicleFlags::OnLiftHill)) { _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_ON_LIFT_HILL; } - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION)) + if (vehicle->HasFlag(VehicleFlags::MoveSingleCar)) { if (outStation != nullptr) *outStation = _vehicleStationIndex.ToUnderlying(); @@ -8807,14 +8807,15 @@ static uint8_t modified_speed(uint16_t trackType, VehicleTrackSubposition trackS return speed; } -int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration(CarEntry* carEntry, uint32_t totalMass, const int32_t curAcceleration) +int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration( + const CarEntry* carEntry, uint32_t totalMass, const int32_t curAcceleration) { if (carEntry->flags & CAR_ENTRY_FLAG_POWERED_RIDE_UNRESTRICTED_GRAVITY) { if (velocity > (speed * 0x4000)) { // Same code as none powered rides - if (curAcceleration <= 0 && curAcceleration >= -500 && velocity <= 0x8000) + if (curAcceleration <= 0 && curAcceleration >= -500 && velocity <= 0.5_mph) { return curAcceleration + 400; } @@ -8824,7 +8825,7 @@ int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration(CarEntry* carEntry, ui uint8_t modifiedSpeed = modified_speed(GetTrackType(), TrackSubposition, speed); int32_t poweredAcceleration = modifiedSpeed << 14; int32_t quarterForce = (modifiedSpeed * totalMass) >> 2; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE)) + if (HasFlag(VehicleFlags::PoweredCarInReverse)) { poweredAcceleration = -poweredAcceleration; } @@ -8871,7 +8872,7 @@ int32_t Vehicle::UpdateTrackMotionPoweredRideAcceleration(CarEntry* carEntry, ui } } - if (std::abs(velocity) <= 0x10000) + if (std::abs(velocity) <= 1.0_mph) { return poweredAcceleration; } @@ -8889,8 +8890,8 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) if (curRide == nullptr) return 0; - rct_ride_entry* rideEntry = GetRideEntry(); - auto carEntry = Entry(); + const auto* rideEntry = GetRideEntry(); + const auto* carEntry = Entry(); if (carEntry == nullptr) { @@ -8912,7 +8913,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) UpdateVelocity(); Vehicle* vehicle = this; - if (_vehicleVelocityF64E08 < 0 && !vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION)) + if (_vehicleVelocityF64E08 < 0 && !vehicle->HasFlag(VehicleFlags::MoveSingleCar)) { vehicle = vehicle->TrainTail(); } @@ -8920,7 +8921,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) // backwards. _vehicleFrontVehicle = vehicle; - auto spriteId = vehicle->sprite_index; + auto spriteId = vehicle->Id; while (!spriteId.IsNull()) { Vehicle* car = GetEntity(spriteId); @@ -8931,7 +8932,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) carEntry = car->Entry(); if (carEntry == nullptr) { - goto loc_6DBF3E; + goto Loc6DBF3E; } // Swinging cars @@ -8952,7 +8953,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) car->acceleration = AccelerationFromPitch[car->Pitch]; _vehicleUnkF64E10 = 1; - if (!car->HasUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION)) + if (!car->HasFlag(VehicleFlags::MoveSingleCar)) { car->remaining_distance += _vehicleVelocityF64E0C; } @@ -8968,7 +8969,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) if (car->remaining_distance < 0) { // Backward loop - if (car->UpdateTrackMotionBackwards(carEntry, curRide, rideEntry)) + if (car->UpdateTrackMotionBackwards(carEntry, *curRide, *rideEntry)) { break; } @@ -8984,9 +8985,9 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) if (car->remaining_distance < 0x368A) { // Location found - goto loc_6DBF3E; + goto Loc6DBF3E; } - if (car->UpdateTrackMotionForwards(carEntry, curRide, rideEntry)) + if (car->UpdateTrackMotionForwards(carEntry, *curRide, *rideEntry)) { break; } @@ -8999,18 +9000,18 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) _vehicleUnkF64E10++; continue; } - // loc_6DBF20 + // Loc6DBF20 car->MoveTo(_vehicleCurPosition); - loc_6DBF3E: + Loc6DBF3E: car->Sub6DBF3E(); - // loc_6DC0F7 - if (car->HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL)) + // Loc6DC0F7 + if (car->HasFlag(VehicleFlags::OnLiftHill)) { _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_ON_LIFT_HILL; } - if (car->HasUpdateFlag(VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION)) + if (car->HasFlag(VehicleFlags::MoveSingleCar)) { if (outStation != nullptr) *outStation = _vehicleStationIndex.ToUnderlying(); @@ -9029,7 +9030,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) spriteId = car->prev_vehicle_on_ride; } } - // loc_6DC144 + // Loc6DC144 vehicle = gCurrentVehicle; carEntry = vehicle->Entry(); @@ -9067,7 +9068,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) { // Probably moving slowly on a flat track piece, low rolling resistance and drag. - if (vehicle->velocity <= 0x8000 && vehicle->velocity >= 0) + if (vehicle->velocity <= 0.5_mph && vehicle->velocity >= 0) { // Vehicle is creeping forwards very slowly (less than ~2km/h), boost speed a bit. curAcceleration += 400; @@ -9086,9 +9087,9 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) { if (vehicle->IsHead()) { - if (track_element_is_covered(vehicle->GetTrackType())) + if (TrackElementIsCovered(vehicle->GetTrackType())) { - if (vehicle->velocity > 0x20000) + if (vehicle->velocity > 2.0_mph) { curAcceleration -= vehicle->velocity >> 6; } @@ -9104,14 +9105,14 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) return _vehicleMotionTrackFlags; } -rct_ride_entry* Vehicle::GetRideEntry() const +const RideObjectEntry* Vehicle::GetRideEntry() const { - return get_ride_entry(ride_subtype); + return GetRideEntryByIndex(ride_subtype); } -CarEntry* Vehicle::Entry() const +const CarEntry* Vehicle::Entry() const { - rct_ride_entry* rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); if (rideEntry == nullptr) { return nullptr; @@ -9121,13 +9122,13 @@ CarEntry* Vehicle::Entry() const Ride* Vehicle::GetRide() const { - return get_ride(ride); + return ::GetRide(ride); } int32_t Vehicle::NumPeepsUntilTrainTail() const { int32_t numPeeps = 0; - for (const Vehicle* vehicle = GetEntity(sprite_index); vehicle != nullptr; + for (const Vehicle* vehicle = GetEntity(Id); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { numPeeps += vehicle->num_peeps; @@ -9143,7 +9144,7 @@ int32_t Vehicle::NumPeepsUntilTrainTail() const void Vehicle::InvalidateWindow() { auto intent = Intent(INTENT_ACTION_INVALIDATE_VEHICLE_WINDOW); - intent.putExtra(INTENT_EXTRA_VEHICLE, this); + intent.PutExtra(INTENT_EXTRA_VEHICLE, this); ContextBroadcastIntent(&intent); } @@ -9157,7 +9158,7 @@ void Vehicle::UpdateCrossings() const const Vehicle* frontVehicle{}; const Vehicle* backVehicle{}; - bool travellingForwards = !HasUpdateFlag(VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE); + bool travellingForwards = !HasFlag(VehicleFlags::PoweredCarInReverse); if (travellingForwards) { @@ -9170,7 +9171,7 @@ void Vehicle::UpdateCrossings() const backVehicle = this; } - track_begin_end output{}; + TrackBeginEnd output{}; int32_t direction{}; CoordsXYE xyElement = { frontVehicle->TrackLocation, @@ -9217,18 +9218,18 @@ void Vehicle::UpdateCrossings() const break; } - curZ = xyElement.element->base_height; + curZ = xyElement.element->BaseHeight; if (travellingForwards) { - if (!track_block_get_next(&xyElement, &xyElement, &curZ, &direction)) + if (!TrackBlockGetNext(&xyElement, &xyElement, &curZ, &direction)) { break; } } else { - if (!track_block_get_previous(xyElement, &output)) + if (!TrackBlockGetPrevious(xyElement, &output)) { break; } @@ -9260,7 +9261,7 @@ void Vehicle::UpdateCrossings() const pathElement->SetIsBlockedByVehicle(false); } - if (travellingForwards && freeCount > 0 && track_block_get_previous(xyElement, &output)) + if (travellingForwards && freeCount > 0 && TrackBlockGetPrevious(xyElement, &output)) { xyElement.x = output.begin_x; xyElement.y = output.begin_y; @@ -9271,7 +9272,7 @@ void Vehicle::UpdateCrossings() const void Vehicle::Claxon() const { - rct_ride_entry* rideEntry = GetRideEntry(); + const auto* rideEntry = GetRideEntry(); switch (rideEntry->Cars[vehicle_type].sound_range) { case SOUND_RANGE_WHISTLE: @@ -9306,7 +9307,7 @@ Vehicle* Vehicle::GetCar(size_t carIndex) const car = GetEntity(car->next_vehicle_on_train); if (car == nullptr) { - log_error("Tried to get non-existent car from index!"); + LOG_ERROR("Tried to get non-existent car from index!"); return nullptr; } } @@ -9331,7 +9332,7 @@ void Vehicle::EnableCollisionsForTrain() assert(this->IsHead()); for (auto vehicle = this; vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) { - vehicle->ClearUpdateFlag(VEHICLE_UPDATE_FLAG_COLLISION_DISABLED); + vehicle->ClearFlag(VehicleFlags::CollisionDisabled); } } @@ -9355,7 +9356,7 @@ void Vehicle::Serialise(DataSerialiser& stream) stream << next_vehicle_on_ride; stream << var_44; stream << mass; - stream << update_flags; + stream << Flags; stream << SwingSprite; stream << current_station; stream << SwingPosition; @@ -9395,5 +9396,4 @@ void Vehicle::Serialise(DataSerialiser& stream) stream << seat_rotation; stream << target_seat_rotation; stream << BoatLocation; - stream << IsCrashedVehicle; } diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index 761cf057ac..55fc833ecf 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,9 +15,9 @@ #include "../entity/EntityBase.h" #include "../ride/RideTypes.h" #include "../world/Location.hpp" +#include "CarEntry.h" #include "Station.h" #include "VehicleColour.h" -#include "VehicleEntry.h" #include "VehicleSubpositionData.h" #include @@ -27,7 +27,7 @@ using track_type_t = uint16_t; struct Ride; -struct rct_ride_entry; +struct RideObjectEntry; struct CarEntry; class DataSerialiser; struct PaintSession; @@ -38,8 +38,11 @@ struct GForces int32_t LateralG{}; }; +// How many valid pitch values are currently in the game. Eventually pitch will be enumerated. +constexpr const uint8_t NumVehiclePitches = 60; + // Size: 0x09 -struct rct_vehicle_info +struct VehicleInfo { int16_t x; // 0x00 int16_t y; // 0x02 @@ -131,7 +134,7 @@ struct Vehicle : EntityBase uint16_t var_44; uint16_t mass; - uint16_t update_flags; + uint32_t Flags; uint8_t SwingSprite; StationIndex current_station; union @@ -185,7 +188,7 @@ struct Vehicle : EntityBase uint8_t CollisionDetectionTimer; }; uint8_t animation_frame; - uint8_t pad_C6[0x2]; + uint8_t PadC6[0x2]; uint32_t animationState; OpenRCT2::Audio::SoundId scream_sound_id; VehicleTrackSubposition TrackSubposition; @@ -207,7 +210,6 @@ struct Vehicle : EntityBase uint8_t seat_rotation; uint8_t target_seat_rotation; CoordsXY BoatLocation; - bool IsCrashedVehicle; constexpr bool IsHead() const { @@ -226,11 +228,12 @@ struct Vehicle : EntityBase GForces GetGForces() const; void SetMapToolbar() const; int32_t IsUsedInPairs() const; - rct_ride_entry* GetRideEntry() const; - CarEntry* Entry() const; + const RideObjectEntry* GetRideEntry() const; + const CarEntry* Entry() const; Ride* GetRide() const; Vehicle* TrainHead() const; Vehicle* TrainTail() const; + void UpdateAnimationAnimalFlying(); void EnableCollisionsForTrain(); /** * Instantly moves the specific car forward or backwards along the track. @@ -256,21 +259,22 @@ struct Vehicle : EntityBase TrackTypeAndDirection &= ~VehicleTrackDirectionMask; TrackTypeAndDirection |= trackDirection & VehicleTrackDirectionMask; } - bool HasUpdateFlag(uint32_t flag) const + bool HasFlag(uint32_t flag) const { - return (update_flags & flag) != 0; + return (Flags & flag) != 0; } - void ClearUpdateFlag(uint32_t flag) + void ClearFlag(uint32_t flag) { - update_flags &= ~flag; + Flags &= ~flag; } - void SetUpdateFlag(uint32_t flag) + void SetFlag(uint32_t flag) { - update_flags |= flag; + Flags |= flag; } void ApplyMass(int16_t appliedMass); void Serialise(DataSerialiser& stream); void Paint(PaintSession& session, int32_t imageDirection) const; + bool IsCableLift() const; friend void UpdateRotatingDefault(Vehicle& vehicle); friend void UpdateRotatingEnterprise(Vehicle& vehicle); @@ -278,7 +282,7 @@ struct Vehicle : EntityBase private: bool SoundCanPlay() const; uint16_t GetSoundPriority() const; - const rct_vehicle_info* GetMoveInfo() const; + const VehicleInfo* GetMoveInfo() const; uint16_t GetTrackProgress() const; OpenRCT2::Audio::VehicleSoundParams CreateSoundParam(uint16_t priority) const; void CableLiftUpdate(); @@ -322,19 +326,19 @@ private: void UpdateDoingCircusShow(); void UpdateCrossings() const; void UpdateSound(); - void GetLiftHillSound(Ride* curRide, SoundIdVolume& curSound); + void GetLiftHillSound(const Ride& curRide, SoundIdVolume& curSound); OpenRCT2::Audio::SoundId UpdateScreamSound(); OpenRCT2::Audio::SoundId ProduceScreamSound(const int32_t totalNumPeeps); void UpdateCrashSetup(); void UpdateCollisionSetup(); int32_t UpdateMotionDodgems(); - void UpdateAnimationAnimalFlying(); void UpdateAdditionalAnimation(); void CheckIfMissing(); bool CurrentTowerElementIsTop(); - bool UpdateTrackMotionForwards(CarEntry* carEntry, Ride* curRide, rct_ride_entry* rideEntry); - bool UpdateTrackMotionBackwards(CarEntry* carEntry, Ride* curRide, rct_ride_entry* rideEntry); - int32_t UpdateTrackMotionPoweredRideAcceleration(CarEntry* carEntry, uint32_t totalMass, const int32_t curAcceleration); + bool UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& curRide, const RideObjectEntry& rideEntry); + bool UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& curRide, const RideObjectEntry& rideEntry); + int32_t UpdateTrackMotionPoweredRideAcceleration( + const CarEntry* carEntry, uint32_t totalMass, const int32_t curAcceleration); int32_t NumPeepsUntilTrainTail() const; void InvalidateWindow(); void TestReset(); @@ -359,13 +363,13 @@ private: void CrashOnLand(); void SimulateCrash() const; void KillAllPassengersInTrain(); - void KillPassengers(Ride* curRide); + void KillPassengers(const Ride& curRide); void TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_seats); int32_t UpdateTrackMotionMiniGolfCalculateAcceleration(const CarEntry& carEntry); int32_t UpdateTrackMotionMiniGolf(int32_t* outStation); - void UpdateTrackMotionMiniGolfVehicle(Ride* curRide, rct_ride_entry* rideEntry, CarEntry* carEntry); - bool UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, Ride* curRide, rct_ride_entry* rideEntry); - bool UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, Ride* curRide, uint16_t* progress); + void UpdateTrackMotionMiniGolfVehicle(const Ride& curRide, const RideObjectEntry& rideEntry, const CarEntry* carEntry); + bool UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, const Ride& curRide, const RideObjectEntry& rideEntry); + bool UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, const Ride& curRide, uint16_t* progress); bool UpdateMotionCollisionDetection(const CoordsXYZ& loc, EntityId* otherVehicleIndex); void UpdateGoKartAttemptSwitchLanes(); void UpdateSceneryDoor() const; @@ -373,13 +377,15 @@ private: void UpdateLandscapeDoor() const; void UpdateLandscapeDoorBackwards() const; int32_t CalculateRiderBraking() const; + + void Loc6DCE02(const Ride& curRide); }; static_assert(sizeof(Vehicle) <= 512); void UpdateRotatingDefault(Vehicle& vehicle); void UpdateRotatingEnterprise(Vehicle& vehicle); -struct train_ref +struct TrainReference { Vehicle* head; Vehicle* tail; @@ -419,41 +425,29 @@ enum class MiniGolfAnimation : uint8_t Putt, }; -enum +namespace VehicleFlags { - CAR_ENTRY_ANIMATION_NONE, - CAR_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE, - CAR_ENTRY_ANIMATION_SWAN, - CAR_ENTRY_ANIMATION_CANOES, - CAR_ENTRY_ANIMATION_ROW_BOATS, - CAR_ENTRY_ANIMATION_WATER_TRICYCLES, - CAR_ENTRY_ANIMATION_OBSERVATION_TOWER, - CAR_ENTRY_ANIMATION_HELICARS, - CAR_ENTRY_ANIMATION_MONORAIL_CYCLES, - CAR_ENTRY_ANIMATION_MULTI_DIM_COASTER, - CAR_ENTRY_ANIMATION_ANIMAL_FLYING // OpenRCT2-specific feature -}; - -enum : uint32_t -{ - VEHICLE_UPDATE_FLAG_ON_LIFT_HILL = (1 << 0), - VEHICLE_UPDATE_FLAG_COLLISION_DISABLED = (1 << 1), - VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT = (1 << 2), - VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE = (1 << 3), // Shuttle is in reverse - VEHICLE_UPDATE_FLAG_TRAIN_READY_DEPART = (1 << 4), - VEHICLE_UPDATE_FLAG_TESTING = (1 << 5), - VEHICLE_UPDATE_FLAG_6 = (1 << 6), - VEHICLE_UPDATE_FLAG_ZERO_VELOCITY = (1 << 7), // Used on rides when safety cutout stops them on a lift - VEHICLE_UPDATE_FLAG_BROKEN_CAR = (1 << 8), - VEHICLE_UPDATE_FLAG_BROKEN_TRAIN = (1 << 9), - VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP = (1 << 10), - VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES = (1 << 11), // Used on rides where trains can run for extended periods of time, - // i.e. the Flying, Lay-down and Multi-dimension RCs. - VEHICLE_UPDATE_FLAG_12 = (1 << 12), - VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE = (1 << 13), // After passing a rotation toggle track piece this will enable - VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION = (1 << 14), // OpenRCT2 Flag: Used to override UpdateMotion to move the position of - // an individual car on a train -}; + constexpr uint32_t OnLiftHill = (1 << 0); + constexpr uint32_t CollisionDisabled = (1 << 1); + constexpr uint32_t WaitingOnAdjacentStation = (1 << 2); + constexpr uint32_t PoweredCarInReverse = (1 << 3); + constexpr uint32_t ReadyToDepart = (1 << 4); + constexpr uint32_t Testing = (1 << 5); + constexpr uint32_t CurrentlyColliding = (1 << 6); // When go-karts are colliding, they have a higher chance of changing + // lanes + constexpr uint32_t StoppedOnLift = (1 << 7); // Used on rides when safety cutout stops them on a lift + constexpr uint32_t CarIsBroken = (1 << 8); + constexpr uint32_t TrainIsBroken = (1 << 9); + constexpr uint32_t StoppedOnHoldingBrake = (1 << 10); + constexpr uint32_t CarIsInverted = (1 << 11); // Used on rides where trains can run for extended periods of time, + // i.e. the Flying, Lay-down and Multi-dimension RCs. + constexpr uint32_t ReverseInclineCompletedLap = (1 << 12); // Set when the vehicle travels backwards through the station for + // the first time + constexpr uint32_t SpinningIsLocked = (1 << 13); // After passing a rotation toggle track piece this will enable + constexpr uint32_t MoveSingleCar = (1 << 14); // OpenRCT2 Flag: Used to override UpdateMotion to move the position of + // an individual car on a train + constexpr uint32_t Crashed = (1 << 15); // Car displays as smoke plume +} // namespace VehicleFlags enum { @@ -524,14 +518,14 @@ enum #define VEHICLE_SEAT_PAIR_FLAG 0x80 #define VEHICLE_SEAT_NUM_MASK 0x7F -Vehicle* try_get_vehicle(EntityId spriteIndex); -void vehicle_update_all(); -void vehicle_sounds_update(); -uint16_t vehicle_get_move_info_size(VehicleTrackSubposition trackSubposition, track_type_t type, uint8_t direction); +Vehicle* TryGetVehicle(EntityId spriteIndex); +void VehicleUpdateAll(); +void VehicleSoundsUpdate(); +uint16_t VehicleGetMoveInfoSize(VehicleTrackSubposition trackSubposition, track_type_t type, uint8_t direction); -void RideUpdateMeasurementsSpecialElements_Default(Ride* ride, const track_type_t trackType); -void RideUpdateMeasurementsSpecialElements_MiniGolf(Ride* ride, const track_type_t trackType); -void RideUpdateMeasurementsSpecialElements_WaterCoaster(Ride* ride, const track_type_t trackType); +void RideUpdateMeasurementsSpecialElements_Default(Ride& ride, const track_type_t trackType); +void RideUpdateMeasurementsSpecialElements_MiniGolf(Ride& ride, const track_type_t trackType); +void RideUpdateMeasurementsSpecialElements_WaterCoaster(Ride& ride, const track_type_t trackType); extern Vehicle* gCurrentVehicle; extern StationIndex _vehicleStationIndex; diff --git a/src/openrct2/ride/VehicleColour.h b/src/openrct2/ride/VehicleColour.h index 1d64ba3967..4c8628aa6a 100644 --- a/src/openrct2/ride/VehicleColour.h +++ b/src/openrct2/ride/VehicleColour.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ride/VehicleData.cpp b/src/openrct2/ride/VehicleData.cpp index d164002010..34371aea4f 100644 --- a/src/openrct2/ride/VehicleData.cpp +++ b/src/openrct2/ride/VehicleData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -372,7 +372,7 @@ const uint8_t * Rotation3TimeToSpriteMaps[] = { }; /** rct2: 0x009A12EC */ -static constexpr const top_spin_time_to_sprite_map TopSpinTimeToSpriteMap_0[] = { +static constexpr const TopSpinTimeToSpriteMap TopSpinTimeToSpriteMap_0[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 2, 0 }, { 2, 0 }, { 2, 0 }, { 2, 0 }, @@ -458,7 +458,7 @@ static constexpr const top_spin_time_to_sprite_map TopSpinTimeToSpriteMap_0[] = }; /** rct2: 0x009A1751 */ -static constexpr const top_spin_time_to_sprite_map TopSpinTimeToSpriteMap_1[] = { +static constexpr const TopSpinTimeToSpriteMap TopSpinTimeToSpriteMap_1[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 2, 0 }, { 2, 0 }, { 2, 0 }, { 2, 0 }, @@ -563,7 +563,7 @@ static constexpr const top_spin_time_to_sprite_map TopSpinTimeToSpriteMap_1[] = }; /** rct2: 0x009A1CC6 */ -static constexpr const top_spin_time_to_sprite_map TopSpinTimeToSpriteMap_2[] = { +static constexpr const TopSpinTimeToSpriteMap TopSpinTimeToSpriteMap_2[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 2, 0 }, { 2, 0 }, { 2, 0 }, { 2, 0 }, @@ -703,7 +703,7 @@ static constexpr const top_spin_time_to_sprite_map TopSpinTimeToSpriteMap_2[] = }; /** rct2: 0x009A12E0 */ -const top_spin_time_to_sprite_map * TopSpinTimeToSpriteMaps[] = { +const TopSpinTimeToSpriteMap * TopSpinTimeToSpriteMaps[] = { TopSpinTimeToSpriteMap_0, TopSpinTimeToSpriteMap_1, TopSpinTimeToSpriteMap_2, diff --git a/src/openrct2/ride/VehicleData.h b/src/openrct2/ride/VehicleData.h index a3d0d13ff6..32927465fe 100644 --- a/src/openrct2/ride/VehicleData.h +++ b/src/openrct2/ride/VehicleData.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,13 +15,13 @@ extern const uint8_t* Rotation1TimeToSpriteMaps[]; extern const uint8_t* Rotation2TimeToSpriteMaps[]; extern const uint8_t* Rotation3TimeToSpriteMaps[]; -struct top_spin_time_to_sprite_map +struct TopSpinTimeToSpriteMap { uint8_t arm_rotation; uint8_t bank_rotation; }; -extern const top_spin_time_to_sprite_map* TopSpinTimeToSpriteMaps[]; +extern const TopSpinTimeToSpriteMap* TopSpinTimeToSpriteMaps[]; extern const uint8_t MotionSimulatorTimeToSpriteMap[]; extern const int32_t MotionSimulatorTimeToSpriteMapCount; diff --git a/src/openrct2/ride/VehiclePaint.cpp b/src/openrct2/ride/VehiclePaint.cpp index d7a51caac8..466fdf8c4d 100644 --- a/src/openrct2/ride/VehiclePaint.cpp +++ b/src/openrct2/ride/VehiclePaint.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,7 @@ #include "../entity/Yaw.hpp" #include "../interface/Viewport.h" #include "../paint/Paint.h" +#include "../ride/CarEntry.h" #include "../ride/RideData.h" #include "../ride/Vehicle.h" #include "Track.h" @@ -27,7 +28,7 @@ using namespace OpenRCT2::Entity::Yaw; #pragma region VehicleBoundboxes // 0x0098E52C: -const vehicle_boundbox VehicleBoundboxes[16][224] = { +const VehicleBoundBox VehicleBoundboxes[16][224] = { { // 0x0099123C: { -5, -2, -22, 10, 4, 14 }, { -3, -3, -22, 6, 6, 14 }, { -3, -3, -22, 6, 6, 14 }, { -3, -3, -22, 6, 6, 14 }, @@ -940,7 +941,7 @@ const vehicle_boundbox VehicleBoundboxes[16][224] = { static void PaintVehicleRiders( PaintSession& session, const Vehicle* vehicle, const CarEntry* carEntry, uint32_t baseImageId, int32_t z, - const vehicle_boundbox& bb) + const VehicleBoundBox& bb) { baseImageId += carEntry->NumCarImages; for (auto i = 0; i < 8; i++) @@ -971,7 +972,7 @@ static void PaintVehicleRiders( // 6D5214 static void vehicle_sprite_paint( - PaintSession& session, const Vehicle* vehicle, int32_t spriteNum, const vehicle_boundbox& bb, int32_t z, + PaintSession& session, const Vehicle* vehicle, int32_t spriteNum, const VehicleBoundBox& bb, int32_t z, const CarEntry* carEntry) { if (carEntry->draw_order >= std::size(VehicleBoundboxes)) @@ -995,15 +996,15 @@ static void vehicle_sprite_paint( imageId = ImageId(baseImageId).WithRemap(FilterPaletteID::Palette44); } PaintAddImageAsParent( - session, imageId, { 0, 0, z }, { bb.length_x, bb.length_y, bb.length_z }, - { bb.offset_x, bb.offset_y, bb.offset_z + z }); + session, imageId, { 0, 0, z }, + { { bb.offset_x, bb.offset_y, bb.offset_z + z }, { bb.length_x, bb.length_y, bb.length_z } }); auto* dpi = &session.DPI; if (dpi->zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && carEntry->no_seating_rows > 0) { PaintVehicleRiders(session, vehicle, carEntry, baseImageId, z, bb); } - vehicle_visual_splash_effect(session, z, vehicle, carEntry); + VehicleVisualSplashEffect(session, z, vehicle, carEntry); } // 6D520E @@ -1115,7 +1116,7 @@ static void VehiclePitchFlatBankedRight45( static void VehiclePitchFlatBankedLeft67( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1135,7 +1136,7 @@ static void VehiclePitchFlatBankedLeft67( static void VehiclePitchFlatBankedLeft90( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1155,7 +1156,7 @@ static void VehiclePitchFlatBankedLeft90( static void VehiclePitchFlatBankedLeft112( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1175,7 +1176,7 @@ static void VehiclePitchFlatBankedLeft112( static void VehiclePitchFlatBankedLeft135( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1195,7 +1196,7 @@ static void VehiclePitchFlatBankedLeft135( static void VehiclePitchFlatBankedLeft157( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1215,7 +1216,7 @@ static void VehiclePitchFlatBankedLeft157( static void VehiclePitchFlatBankedRight67( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1235,7 +1236,7 @@ static void VehiclePitchFlatBankedRight67( static void VehiclePitchFlatBankedRight90( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1255,7 +1256,7 @@ static void VehiclePitchFlatBankedRight90( static void VehiclePitchFlatBankedRight112( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1275,7 +1276,7 @@ static void VehiclePitchFlatBankedRight112( static void VehiclePitchFlatBankedRight135( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -1295,7 +1296,7 @@ static void VehiclePitchFlatBankedRight135( static void VehiclePitchFlatBankedRight157( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -2962,7 +2963,7 @@ static void VehiclePitchInverted( static void VehiclePitchDown75( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { if (vehicle->GetTrackType() != TrackElemType::Down90ToDown60 && (vehicle->GetTrackType()) != TrackElemType::Down60ToDown90) @@ -2986,7 +2987,7 @@ static void VehiclePitchDown75( static void VehiclePitchDown90( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { if (vehicle->GetTrackType() != TrackElemType::Down90 && (vehicle->GetTrackType()) != TrackElemType::Down90ToDown60 && (vehicle->GetTrackType()) != TrackElemType::Down60ToDown90) @@ -3014,7 +3015,7 @@ static void VehiclePitchDown90( static void VehiclePitchDown105( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -3034,7 +3035,7 @@ static void VehiclePitchDown105( static void VehiclePitchDown120( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -3054,7 +3055,7 @@ static void VehiclePitchDown120( static void VehiclePitchDown135( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -3074,7 +3075,7 @@ static void VehiclePitchDown135( static void VehiclePitchDown150( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -3094,7 +3095,7 @@ static void VehiclePitchDown150( static void VehiclePitchDown165( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -3119,7 +3120,7 @@ template void VehiclePitchCorkscrew( PaintSession& session, const Vehicle* vehicle, int32_t imageDirection, int32_t z, const CarEntry* carEntry) { - if (vehicle->HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (vehicle->HasFlag(VehicleFlags::CarIsInverted)) { carEntry--; } @@ -3514,7 +3515,7 @@ static void vehicle_visual_splash1_effect(PaintSession& session, int32_t z, cons { return; } - if (vehicle->TrainHead()->velocity <= 0x50000) + if (vehicle->TrainHead()->velocity <= 5.0_mph) { return; } @@ -3537,7 +3538,7 @@ static void vehicle_visual_splash2_effect(PaintSession& session, int32_t z, cons { return; } - if (vehicle->velocity <= 0x50000) + if (vehicle->velocity <= 5.0_mph) { return; } @@ -3560,7 +3561,7 @@ static void vehicle_visual_splash3_effect(PaintSession& session, int32_t z, cons { return; } - if (vehicle->velocity <= 0x50000) + if (vehicle->velocity <= 5.0_mph) { return; } @@ -3580,7 +3581,7 @@ static void vehicle_visual_splash4_effect(PaintSession& session, int32_t z, cons { return; } - if (vehicle2->velocity <= 0x50000) + if (vehicle2->velocity <= 5.0_mph) { return; } @@ -3608,7 +3609,7 @@ static void vehicle_visual_splash5_effect(PaintSession& session, int32_t z, cons { return; } - if (vehicle2->velocity <= 0x50000) + if (vehicle2->velocity <= 5.0_mph) { return; } @@ -3620,7 +3621,7 @@ static void vehicle_visual_splash5_effect(PaintSession& session, int32_t z, cons { return; } - if (!track_element_is_covered(vehicle->GetTrackType())) + if (!TrackElementIsCovered(vehicle->GetTrackType())) { return; } @@ -3629,7 +3630,7 @@ static void vehicle_visual_splash5_effect(PaintSession& session, int32_t z, cons PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 1, 1, 0 } }); } -void vehicle_visual_splash_effect(PaintSession& session, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) +void VehicleVisualSplashEffect(PaintSession& session, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { switch (carEntry->effect_visual) { @@ -3657,7 +3658,7 @@ void vehicle_visual_splash_effect(PaintSession& session, int32_t z, const Vehicl * * rct2: 0x006D45F8 */ -void vehicle_visual_default( +void VehicleVisualDefault( PaintSession& session, int32_t imageDirection, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { if (vehicle->Pitch < std::size(PaintFunctionsByPitch)) @@ -3670,15 +3671,15 @@ void Vehicle::Paint(PaintSession& session, int32_t imageDirection) const { const CarEntry* carEntry; - if (IsCrashedVehicle) + if (HasFlag(VehicleFlags::Crashed)) { PaintAddImageAsParent( - session, ImageId(SPR_WATER_PARTICLES_DENSE_0 + animation_frame), { 0, 0, z }, { 1, 1, 0 }, { 0, 0, z + 2 }); + session, ImageId(SPR_WATER_PARTICLES_DENSE_0 + animation_frame), { 0, 0, z }, { { 0, 0, z + 2 }, { 1, 1, 0 } }); return; } int32_t zOffset = 0; - if (ride_subtype == OBJECT_ENTRY_INDEX_NULL) + if (IsCableLift()) { carEntry = &CableLiftVehicle; } @@ -3691,7 +3692,7 @@ void Vehicle::Paint(PaintSession& session, int32_t imageDirection) const } auto carEntryIndex = vehicle_type; - if (HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES)) + if (HasFlag(VehicleFlags::CarIsInverted)) { carEntryIndex++; zOffset += 16; @@ -3707,63 +3708,37 @@ void Vehicle::Paint(PaintSession& session, int32_t imageDirection) const switch (carEntry->PaintStyle) { case VEHICLE_VISUAL_DEFAULT: - vehicle_visual_default(session, imageDirection, z + zOffset, this, carEntry); + VehicleVisualDefault(session, imageDirection, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_LAUNCHED_FREEFALL: - vehicle_visual_launched_freefall(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualLaunchedFreefall(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_OBSERVATION_TOWER: VehicleVisualObservationTower(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_RIVER_RAPIDS: - vehicle_visual_river_rapids(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualRiverRapids(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_MINI_GOLF_PLAYER: - vehicle_visual_mini_golf_player(session, x, imageDirection, y, z + zOffset, this); + VehicleVisualMiniGolfPlayer(session, x, imageDirection, y, z + zOffset, this); break; case VEHICLE_VISUAL_MINI_GOLF_BALL: VehicleVisualMiniGolfBall(session, x, imageDirection, y, z + zOffset, this); break; case VEHICLE_VISUAL_REVERSER: - vehicle_visual_reverser(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualReverser(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_SPLASH_BOATS_OR_WATER_COASTER: - vehicle_visual_splash_boats_or_water_coaster(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualSplashBoatsOrWaterCoaster(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_ROTO_DROP: - vehicle_visual_roto_drop(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualRotoDrop(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_VIRGINIA_REEL: - vehicle_visual_virginia_reel(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualVirginiaReel(session, x, imageDirection, y, z + zOffset, this, carEntry); break; case VEHICLE_VISUAL_SUBMARINE: - vehicle_visual_submarine(session, x, imageDirection, y, z + zOffset, this, carEntry); + VehicleVisualSubmarine(session, x, imageDirection, y, z + zOffset, this, carEntry); break; } } - -uint32_t CarEntry::NumRotationSprites(SpriteGroupType spriteGroup) const -{ - return NumSpritesPrecision(SpriteGroups[static_cast(spriteGroup)].spritePrecision); -} - -int32_t CarEntry::SpriteByYaw(int32_t yaw, SpriteGroupType spriteGroup) const -{ - return YawToPrecision(yaw, SpriteGroups[static_cast(spriteGroup)].spritePrecision); -} - -bool CarEntry::GroupEnabled(SpriteGroupType spriteGroup) const -{ - return SpriteGroups[static_cast(spriteGroup)].Enabled(); -} - -uint32_t CarEntry::GroupImageId(SpriteGroupType spriteGroup) const -{ - return SpriteGroups[static_cast(spriteGroup)].imageId; -} - -uint32_t CarEntry::SpriteOffset(SpriteGroupType spriteGroup, int32_t imageDirection, uint8_t rankIndex) const -{ - return ((SpriteByYaw(imageDirection, spriteGroup) + NumRotationSprites(spriteGroup) * rankIndex) * base_num_frames) - + GroupImageId(spriteGroup); -} diff --git a/src/openrct2/ride/VehiclePaint.h b/src/openrct2/ride/VehiclePaint.h index ab6ac4320c..9ed6dc936c 100644 --- a/src/openrct2/ride/VehiclePaint.h +++ b/src/openrct2/ride/VehiclePaint.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ struct PaintSession; struct CarEntry; struct Vehicle; -struct vehicle_boundbox +struct VehicleBoundBox { int8_t offset_x; int8_t offset_y; @@ -25,36 +25,36 @@ struct vehicle_boundbox uint8_t length_z; }; -extern const vehicle_boundbox VehicleBoundboxes[16][224]; +extern const VehicleBoundBox VehicleBoundboxes[16][224]; -void vehicle_visual_default( +void VehicleVisualDefault( PaintSession& session, int32_t imageDirection, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_roto_drop( +void VehicleVisualRotoDrop( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); void VehicleVisualObservationTower( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_river_rapids( +void VehicleVisualRiverRapids( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_reverser( +void VehicleVisualReverser( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_splash_boats_or_water_coaster( +void VehicleVisualSplashBoatsOrWaterCoaster( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_launched_freefall( +void VehicleVisualLaunchedFreefall( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_splash_effect(PaintSession& session, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_virginia_reel( +void VehicleVisualSplashEffect(PaintSession& session, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); +void VehicleVisualVirginiaReel( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_submarine( +void VehicleVisualSubmarine( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry); -void vehicle_visual_mini_golf_player( +void VehicleVisualMiniGolfPlayer( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle); void VehicleVisualMiniGolfBall( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle); diff --git a/src/openrct2/ride/VehicleRiderControl.cpp b/src/openrct2/ride/VehicleRiderControl.cpp index 5326039788..a051666c21 100644 --- a/src/openrct2/ride/VehicleRiderControl.cpp +++ b/src/openrct2/ride/VehicleRiderControl.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ride/VehicleSubpositionData.cpp b/src/openrct2/ride/VehicleSubpositionData.cpp index 58540c2a9a..64f0d1676f 100644 --- a/src/openrct2/ride/VehicleSubpositionData.cpp +++ b/src/openrct2/ride/VehicleSubpositionData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,8 +12,8 @@ #include "Vehicle.h" #define CREATE_VEHICLE_INFO(VAR, ...) \ - static constexpr const rct_vehicle_info VAR##_data[] = __VA_ARGS__; \ - static constexpr const rct_vehicle_info_list VAR = { static_cast(std::size(VAR##_data)), VAR##_data }; + static constexpr const VehicleInfo VAR##_data[] = __VA_ARGS__; \ + static constexpr const VehicleInfoList VAR = { static_cast(std::size(VAR##_data)), VAR##_data }; #define MINI_GOLF_STATE(STATE) \ { \ @@ -27508,7 +27508,7 @@ namespace RightLane CREATE_VEHICLE_INFO(TrackVehicleInfo_000000, { { 0, 0, 0, 0, 0, 0 } }) -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListDefault[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListDefault[] = { &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, // Flat &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, // EndStation &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, // BeginStation @@ -27805,7 +27805,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListDefault[] = { }; static_assert(std::size(TrackVehicleInfoListDefault) == VehicleTrackSubpositionSizeDefault); -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftGoingOut[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListChairliftGoingOut[] = { &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CFB6E, &TrackVehicleInfo_8CFC90, @@ -27924,7 +27924,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftGoing &TrackVehicleInfo_91C1BC, &TrackVehicleInfo_91C377, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftGoingBack[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListChairliftGoingBack[] = { &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8CDE26, &TrackVehicleInfo_8CDF48, &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, &TrackVehicleInfo_8D023A, &TrackVehicleInfo_8D035C, @@ -27995,7 +27995,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftGoing &TrackVehicleInfo_8CDBE2, &TrackVehicleInfo_8CDD04, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftEndBullwheel[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListChairliftEndBullwheel[] = { &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8C232A, &TrackVehicleInfo_8C244C, @@ -28066,7 +28066,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftEndBu &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftStartBullwheel[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListChairliftStartBullwheel[] = { &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8CE4B8, &TrackVehicleInfo_8CE6DF, &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, &TrackVehicleInfo_8C232A, &TrackVehicleInfo_8C244C, @@ -28137,7 +28137,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListChairliftStart &TrackVehicleInfo_8CE06A, &TrackVehicleInfo_8CE291, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsLeftLane[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListGoKartsLeftLane[] = { &TrackVehicleInfo_8FF2DA, &TrackVehicleInfo_8FF3FC, &TrackVehicleInfo_8FF51E, &TrackVehicleInfo_8FF640, // TrackElemType::Flat &TrackVehicleInfo_8FF2DA, &TrackVehicleInfo_8FF3FC, &TrackVehicleInfo_8FF51E, &TrackVehicleInfo_8FF640, // TrackElemType::EndStation &TrackVehicleInfo_8FF2DA, &TrackVehicleInfo_8FF3FC, &TrackVehicleInfo_8FF51E, &TrackVehicleInfo_8FF640, // TrackElemType::BeginStation @@ -28192,7 +28192,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsLeftLan &TrackVehicleInfo_901762, &TrackVehicleInfo_901884, &TrackVehicleInfo_9019AF, &TrackVehicleInfo_901AE3, // TrackElemType::RightQuarterTurn1Tile }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsRightLane[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListGoKartsRightLane[] = { &TrackVehicleInfo_901DE1, &TrackVehicleInfo_901F03, &TrackVehicleInfo_902025, &TrackVehicleInfo_902147, // TrackElemType::Flat &TrackVehicleInfo_901DE1, &TrackVehicleInfo_901F03, &TrackVehicleInfo_902025, &TrackVehicleInfo_902147, // TrackElemType::EndStation &TrackVehicleInfo_901DE1, &TrackVehicleInfo_901F03, &TrackVehicleInfo_902025, &TrackVehicleInfo_902147, // TrackElemType::BeginStation @@ -28247,7 +28247,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsRightLa &TrackVehicleInfo_904284, &TrackVehicleInfo_9042F2, &TrackVehicleInfo_904369, &TrackVehicleInfo_9043E9, // TrackElemType::RightQuarterTurn1Tile }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsMovingToRightLane[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListGoKartsMovingToRightLane[] = { &TrackVehicleInfo_8FF762, &TrackVehicleInfo_8FF884, &TrackVehicleInfo_8FF9A6, &TrackVehicleInfo_8FFAC8, &TrackVehicleInfo_8FF762, &TrackVehicleInfo_8FF884, &TrackVehicleInfo_8FF9A6, &TrackVehicleInfo_8FFAC8, &TrackVehicleInfo_8FF762, &TrackVehicleInfo_8FF884, &TrackVehicleInfo_8FF9A6, &TrackVehicleInfo_8FFAC8, &TrackVehicleInfo_8FF762, &TrackVehicleInfo_8FF884, &TrackVehicleInfo_8FF9A6, &TrackVehicleInfo_8FFAC8, &TrackVehicleInfo_900E52, &TrackVehicleInfo_900F74, @@ -28285,7 +28285,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsMovingT &TrackVehicleInfo_901762, &TrackVehicleInfo_901884, &TrackVehicleInfo_9019AF, &TrackVehicleInfo_901AE3, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsMovingToLeftLane[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListGoKartsMovingToLeftLane[] = { &TrackVehicleInfo_904460, &TrackVehicleInfo_904582, &TrackVehicleInfo_9046A4, &TrackVehicleInfo_9047C6, &TrackVehicleInfo_904460, &TrackVehicleInfo_904582, &TrackVehicleInfo_9046A4, &TrackVehicleInfo_9047C6, &TrackVehicleInfo_904460, &TrackVehicleInfo_904582, &TrackVehicleInfo_9046A4, &TrackVehicleInfo_9047C6, &TrackVehicleInfo_904460, &TrackVehicleInfo_904582, &TrackVehicleInfo_9046A4, &TrackVehicleInfo_9047C6, &TrackVehicleInfo_9034D1, &TrackVehicleInfo_9035F3, @@ -28323,7 +28323,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListGoKartsMovingT &TrackVehicleInfo_904284, &TrackVehicleInfo_9042F2, &TrackVehicleInfo_904369, &TrackVehicleInfo_9043E9, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfStartPathA9[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListMiniGolfStartPathA9[] = { &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938D7A, &TrackVehicleInfo_938E0C, @@ -28464,7 +28464,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfStartP &TrackVehicleInfo_94AE31, &TrackVehicleInfo_94DAEF, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfBallPathA10[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListMiniGolfBallPathA10[] = { &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938D7A, &TrackVehicleInfo_938E0C, @@ -28605,7 +28605,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfBallPa &TrackVehicleInfo_94B0DF, &TrackVehicleInfo_94DD9D, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfPathB11[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListMiniGolfPathB11[] = { &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938D7A, &TrackVehicleInfo_938E0C, @@ -28746,7 +28746,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfPathB1 &TrackVehicleInfo_94B37B, &TrackVehicleInfo_94E039, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfBallPathB12[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListMiniGolfBallPathB12[] = { &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938D7A, &TrackVehicleInfo_938E0C, @@ -28887,7 +28887,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfBallPa &TrackVehicleInfo_94B6B9, &TrackVehicleInfo_94E377, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfPathC13[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListMiniGolfPathC13[] = { &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938D7A, &TrackVehicleInfo_938E0C, @@ -29028,7 +29028,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfPathC1 &TrackVehicleInfo_94BA7E, &TrackVehicleInfo_94E73C, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfPathC14[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListMiniGolfPathC14[] = { &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938212, &TrackVehicleInfo_9382A4, &TrackVehicleInfo_938336, &TrackVehicleInfo_9383C8, &TrackVehicleInfo_938D7A, &TrackVehicleInfo_938E0C, @@ -29169,7 +29169,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListMiniGolfPathC1 &TrackVehicleInfo_94BE16, &TrackVehicleInfo_94EAD4, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListReverserRCFrontBogie[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListReverserRCFrontBogie[] = { &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8C232A, &TrackVehicleInfo_8C244C, @@ -29317,7 +29317,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListReverserRCFron &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, }; -static constexpr const rct_vehicle_info_list *TrackVehicleInfoListReverserRCRearBogie[] = { +static constexpr const VehicleInfoList *TrackVehicleInfoListReverserRCRearBogie[] = { &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8BE57A, &TrackVehicleInfo_8BE69C, &TrackVehicleInfo_8BE7BE, &TrackVehicleInfo_8BE8E0, &TrackVehicleInfo_8C232A, &TrackVehicleInfo_8C244C, @@ -29466,7 +29466,7 @@ static constexpr const rct_vehicle_info_list *TrackVehicleInfoListReverserRCRear }; // rct2: 0x008B8F30 -constexpr const rct_vehicle_info_list * const * gTrackVehicleInfo[static_cast(VehicleTrackSubposition::Count)] = { +constexpr const VehicleInfoList * const * gTrackVehicleInfo[static_cast(VehicleTrackSubposition::Count)] = { TrackVehicleInfoListDefault, // VehicleTrackSubposition::Default TrackVehicleInfoListChairliftGoingOut, // VehicleTrackSubposition::ChairliftGoingOut TrackVehicleInfoListChairliftGoingBack, // VehicleTrackSubposition::ChairliftGoingBack diff --git a/src/openrct2/ride/VehicleSubpositionData.h b/src/openrct2/ride/VehicleSubpositionData.h index ff668ae032..768b9a3bd8 100644 --- a/src/openrct2/ride/VehicleSubpositionData.h +++ b/src/openrct2/ride/VehicleSubpositionData.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ constexpr const size_t VehicleTrackSubpositionSizeDefault = TrackElemType::Count * NumOrthogonalDirections; -struct rct_vehicle_info; +struct VehicleInfo; enum class VehicleTrackSubposition : uint8_t { @@ -43,10 +43,10 @@ enum class VehicleTrackSubposition : uint8_t Count, }; -struct rct_vehicle_info_list +struct VehicleInfoList { uint16_t size; - const rct_vehicle_info* info; + const VehicleInfo* info; }; -extern const rct_vehicle_info_list* const* const gTrackVehicleInfo[EnumValue(VehicleTrackSubposition::Count)]; +extern const VehicleInfoList* const* const gTrackVehicleInfo[EnumValue(VehicleTrackSubposition::Count)]; diff --git a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp index 34928a8c67..86822e3d46 100644 --- a/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/ride/coaster/AirPoweredVerticalCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -164,7 +164,7 @@ enum SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 = 22333, }; -static ImageId air_powered_vertical_rc_get_support_colour(PaintSession& session) +static ImageId AirPoweredVerticalRCGetSupportColour(PaintSession& session) { auto colourFlags = session.TrackColours[SCHEME_SUPPORTS]; auto trackColour = session.TrackColours[SCHEME_TRACK]; @@ -176,7 +176,7 @@ static ImageId air_powered_vertical_rc_get_support_colour(PaintSession& session) } /** rct2: 0x008AFAD4 */ -static void air_powered_vertical_rc_track_flat( +static void AirPoweredVerticalRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -188,7 +188,7 @@ static void air_powered_vertical_rc_track_flat( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -198,7 +198,7 @@ static void air_powered_vertical_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_station( +static void AirPoweredVerticalRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -211,14 +211,14 @@ static void air_powered_vertical_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height - 2 }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 5, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -226,7 +226,7 @@ static void air_powered_vertical_rc_track_station( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_right_quarter_turn_5( +static void AirPoweredVerticalRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -261,10 +261,10 @@ static void air_powered_vertical_rc_track_right_quarter_turn_5( }, }; - track_paint_util_right_quarter_turn_5_tiles_paint_3( + TrackPaintUtilRightQuarterTurn5TilesPaint3( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_5_tiles_wooden_supports(session, height, direction, trackSequence); - track_paint_util_right_quarter_turn_5_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesWoodenSupports(session, height, direction, trackSequence); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); switch (trackSequence) { @@ -307,16 +307,16 @@ static void air_powered_vertical_rc_track_right_quarter_turn_5( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_left_quarter_turn_5( +static void AirPoweredVerticalRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - air_powered_vertical_rc_track_right_quarter_turn_5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + AirPoweredVerticalRCTrackRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AFB74 */ -static void air_powered_vertical_rc_track_flat_to_left_bank( +static void AirPoweredVerticalRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -328,12 +328,12 @@ static void air_powered_vertical_rc_track_flat_to_left_bank( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (direction == 0 || direction == 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -345,7 +345,7 @@ static void air_powered_vertical_rc_track_flat_to_left_bank( } /** rct2: 0x008AFB84 */ -static void air_powered_vertical_rc_track_flat_to_right_bank( +static void AirPoweredVerticalRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -357,12 +357,12 @@ static void air_powered_vertical_rc_track_flat_to_right_bank( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (direction == 2 || direction == 3) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -373,22 +373,22 @@ static void air_powered_vertical_rc_track_flat_to_right_bank( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_left_bank_to_flat( +static void AirPoweredVerticalRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - air_powered_vertical_rc_track_flat_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + AirPoweredVerticalRCTrackFlatToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AFBA4 */ -static void air_powered_vertical_rc_track_right_bank_to_flat( +static void AirPoweredVerticalRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - air_powered_vertical_rc_track_flat_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + AirPoweredVerticalRCTrackFlatToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( +static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -423,7 +423,7 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( }, }; - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); if (direction == 1 && trackSequence == 6) @@ -439,8 +439,8 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); } - track_paint_util_right_quarter_turn_5_tiles_wooden_supports(session, height, direction, trackSequence); - track_paint_util_right_quarter_turn_5_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn5TilesWoodenSupports(session, height, direction, trackSequence); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); switch (trackSequence) { @@ -483,17 +483,16 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_banked_left_quarter_turn_5( +static void AirPoweredVerticalRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - air_powered_vertical_rc_track_banked_right_quarter_turn_5( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + AirPoweredVerticalRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AFBD4 */ -static void air_powered_vertical_rc_track_left_bank( +static void AirPoweredVerticalRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -507,11 +506,11 @@ static void air_powered_vertical_rc_track_left_bank( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]); if (direction == 0 || direction == 1) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -522,14 +521,14 @@ static void air_powered_vertical_rc_track_left_bank( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_right_bank( +static void AirPoweredVerticalRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - air_powered_vertical_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + AirPoweredVerticalRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void air_powered_vertical_rc_track_brakes( +static void AirPoweredVerticalRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -541,7 +540,7 @@ static void air_powered_vertical_rc_track_brakes( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -551,7 +550,7 @@ static void air_powered_vertical_rc_track_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_vertical_slope_up( +static void AirPoweredVerticalRCTrackVerticalSlopeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -650,8 +649,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up( 48, 64, 128, 176, 208, 240, 240, }; - auto supportsImageId = air_powered_vertical_rc_get_support_colour(session).WithIndex( - supportImageIds[trackSequence][direction]); + auto supportsImageId = AirPoweredVerticalRCGetSupportColour(session).WithIndex(supportImageIds[trackSequence][direction]); auto trackImageId = session.TrackColours[SCHEME_TRACK].WithIndex(trackImageIds[trackSequence][direction]); int8_t bbHeight; bool isDirection03 = (direction == 0 || direction == 3); @@ -660,9 +658,9 @@ static void air_powered_vertical_rc_track_vertical_slope_up( case 0: bbHeight = bbHeights12[trackSequence]; PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 20, 32, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 20, 32, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 20, 32, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 20, 32, bbHeight } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -679,17 +677,17 @@ static void air_powered_vertical_rc_track_vertical_slope_up( bbHeight = bbHeights03[trackSequence]; PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); } else { bbHeight = bbHeights12[trackSequence]; PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -707,17 +705,17 @@ static void air_powered_vertical_rc_track_vertical_slope_up( { bbHeight = bbHeights03[trackSequence]; PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); } else { bbHeight = bbHeights12[trackSequence]; PaintAddImageAsParentRotated( - session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -738,12 +736,12 @@ static void air_powered_vertical_rc_track_vertical_slope_up( } PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } }); PaintAddImageAsChildRotated( - session, direction, supportsImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } }); } else { PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); @@ -752,16 +750,16 @@ static void air_powered_vertical_rc_track_vertical_slope_up( if (isDirection03) { PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 5, 20, 79 }, { 0, 6, height + 128 }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 5, 20, 79 }, { 0, 6, height + 128 }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } }); } else { PaintAddImageAsParentRotated( - session, direction, trackImageId, { 0, 0, height }, { 1, 20, 126 }, { 27, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } }); PaintAddImageAsChildRotated( - session, direction, supportsImageId, { 0, 0, height }, { 1, 20, 126 }, { 27, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -773,7 +771,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up( } } -static void air_powered_vertical_rc_track_vertical_up( +static void AirPoweredVerticalRCTrackVerticalUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -788,18 +786,20 @@ static void air_powered_vertical_rc_track_vertical_up( switch (trackSequence) { case 0: - imageId = air_powered_vertical_rc_get_support_colour(session).WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 26, 26, 79 }, { 3, 3, height }); + imageId = AirPoweredVerticalRCGetSupportColour(session).WithIndex(imageIds[direction][0]); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 79 } }); break; case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 2, 20, 79 }, { 0, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 2, 20, 79 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 2, 20, 79 }, { 30, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageId, { 0, 0, height }, { { 30, 6, height }, { 2, 20, 79 } }); } PaintUtilSetVerticalTunnel(session, height + 80); @@ -810,13 +810,13 @@ static void air_powered_vertical_rc_track_vertical_up( PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); } -static void air_powered_vertical_rc_track_vertical_top( +static void AirPoweredVerticalRCTrackVerticalTop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (direction == 2 || direction == 3) { - air_powered_vertical_rc_track_vertical_top(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + AirPoweredVerticalRCTrackVerticalTop(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); return; } @@ -843,28 +843,34 @@ static void air_powered_vertical_rc_track_vertical_top( switch (trackSequence) { case 0: - imageIdS = air_powered_vertical_rc_get_support_colour(session).WithIndex(imageIds[direction][0]); + imageIdS = AirPoweredVerticalRCGetSupportColour(session).WithIndex(imageIds[direction][0]); imageIdT = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); if (direction == 0) { - PaintAddImageAsParentRotated(session, direction, imageIdS, { 0, 0, height }, { 32, 20, 15 }, { 0, 6, height }); - PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 31, 20, 15 }, { 1, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdS, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 15 } }); + PaintAddImageAsChildRotated( + session, direction, imageIdT, { 0, 0, height }, { { 1, 6, height }, { 31, 20, 15 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageIdS, { 0, 0, height }, { 5, 20, 1 }, { 24, 6, height }); - PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 5, 20, 1 }, { 24, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdS, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } }); + PaintAddImageAsChildRotated( + session, direction, imageIdT, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } }); } break; case 1: imageIdT = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][2]); if (direction == 0) { - PaintAddImageAsParentRotated(session, direction, imageIdT, { 0, 0, height }, { 2, 20, 15 }, { 0, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdT, { 0, 0, height }, { { 0, 6, height }, { 2, 20, 15 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageIdT, { 0, 0, height }, { 2, 20, 1 }, { 33, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdT, { 0, 0, height }, { { 33, 6, height }, { 2, 20, 1 } }); } PaintUtilSetVerticalTunnel(session, height + 80); break; @@ -872,26 +878,32 @@ static void air_powered_vertical_rc_track_vertical_top( imageIdT = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][3]); if (direction == 0) { - PaintAddImageAsParentRotated(session, direction, imageIdT, { 0, 0, height }, { 2, 20, 1 }, { 33, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdT, { 0, 0, height }, { { 33, 6, height }, { 2, 20, 1 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageIdT, { 0, 0, height }, { 2, 20, 15 }, { 0, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdT, { 0, 0, height }, { { 0, 6, height }, { 2, 20, 15 } }); } PaintUtilSetVerticalTunnel(session, height + 80); break; case 3: - imageIdS = air_powered_vertical_rc_get_support_colour(session).WithIndex(imageIds[direction][4]); + imageIdS = AirPoweredVerticalRCGetSupportColour(session).WithIndex(imageIds[direction][4]); imageIdT = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][5]); if (direction == 0) { - PaintAddImageAsParentRotated(session, direction, imageIdS, { 0, 0, height }, { 5, 20, 1 }, { 24, 6, height }); - PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 5, 20, 1 }, { 24, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdS, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } }); + PaintAddImageAsChildRotated( + session, direction, imageIdT, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageIdS, { 0, 0, height }, { 32, 20, 15 }, { 0, 6, height }); - PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 32, 20, 15 }, { 0, 6, height }); + PaintAddImageAsParentRotated( + session, direction, imageIdS, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 15 } }); + PaintAddImageAsChildRotated( + session, direction, imageIdT, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 15 } }); } break; } @@ -900,22 +912,21 @@ static void air_powered_vertical_rc_track_vertical_top( PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); } -static void air_powered_vertical_rc_track_vertical_down( +static void AirPoweredVerticalRCTrackVerticalDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - air_powered_vertical_rc_track_vertical_up(session, ride, trackSequence ^ 1, (direction + 2) & 3, height, trackElement); + AirPoweredVerticalRCTrackVerticalUp(session, ride, trackSequence ^ 1, (direction + 2) & 3, height, trackElement); } -static void air_powered_vertical_rc_track_vertical_slope_down( +static void AirPoweredVerticalRCTrackVerticalSlopeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - air_powered_vertical_rc_track_vertical_slope_up( - session, ride, 6 - trackSequence, (direction + 2) & 3, height, trackElement); + AirPoweredVerticalRCTrackVerticalSlopeUp(session, ride, 6 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void air_powered_vertical_rc_track_booster( +static void AirPoweredVerticalRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -945,7 +956,7 @@ static void air_powered_vertical_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void air_powered_vertical_rc_track_onride_photo( +static void AirPoweredVerticalRCTrackOnridePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -957,63 +968,63 @@ static void air_powered_vertical_rc_track_onride_photo( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionAirPoweredVerticalRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return air_powered_vertical_rc_track_flat; + return AirPoweredVerticalRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return air_powered_vertical_rc_track_station; + return AirPoweredVerticalRCTrackStation; case TrackElemType::LeftQuarterTurn5Tiles: - return air_powered_vertical_rc_track_left_quarter_turn_5; + return AirPoweredVerticalRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return air_powered_vertical_rc_track_right_quarter_turn_5; + return AirPoweredVerticalRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return air_powered_vertical_rc_track_flat_to_left_bank; + return AirPoweredVerticalRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return air_powered_vertical_rc_track_flat_to_right_bank; + return AirPoweredVerticalRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return air_powered_vertical_rc_track_left_bank_to_flat; + return AirPoweredVerticalRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return air_powered_vertical_rc_track_right_bank_to_flat; + return AirPoweredVerticalRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return air_powered_vertical_rc_track_banked_left_quarter_turn_5; + return AirPoweredVerticalRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return air_powered_vertical_rc_track_banked_right_quarter_turn_5; + return AirPoweredVerticalRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBank: - return air_powered_vertical_rc_track_left_bank; + return AirPoweredVerticalRCTrackLeftBank; case TrackElemType::RightBank: - return air_powered_vertical_rc_track_right_bank; + return AirPoweredVerticalRCTrackRightBank; case TrackElemType::Brakes: - return air_powered_vertical_rc_track_brakes; + return AirPoweredVerticalRCTrackBrakes; case TrackElemType::ReverseFreefallSlope: - return air_powered_vertical_rc_track_vertical_slope_up; + return AirPoweredVerticalRCTrackVerticalSlopeUp; case TrackElemType::ReverseFreefallVertical: - return air_powered_vertical_rc_track_vertical_up; + return AirPoweredVerticalRCTrackVerticalUp; case TrackElemType::AirThrustTopCap: - return air_powered_vertical_rc_track_vertical_top; + return AirPoweredVerticalRCTrackVerticalTop; case TrackElemType::AirThrustVerticalDown: - return air_powered_vertical_rc_track_vertical_down; + return AirPoweredVerticalRCTrackVerticalDown; case TrackElemType::AirThrustVerticalDownToLevel: - return air_powered_vertical_rc_track_vertical_slope_down; + return AirPoweredVerticalRCTrackVerticalSlopeDown; case TrackElemType::Booster: - return air_powered_vertical_rc_track_booster; + return AirPoweredVerticalRCTrackBooster; case TrackElemType::OnRidePhoto: - return air_powered_vertical_rc_track_onride_photo; + return AirPoweredVerticalRCTrackOnridePhoto; } return nullptr; } diff --git a/src/openrct2/ride/coaster/AlpineCoaster.cpp b/src/openrct2/ride/coaster/AlpineCoaster.cpp index e8b5d10605..1645017f03 100644 --- a/src/openrct2/ride/coaster/AlpineCoaster.cpp +++ b/src/openrct2/ride/coaster/AlpineCoaster.cpp @@ -37,25 +37,25 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -70,16 +70,16 @@ namespace AlpineRC case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -107,19 +107,19 @@ namespace AlpineRC { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height - 2 }, - { 32, 28, 2 }, { 0, 2, height }); - track_paint_util_draw_station_metal_supports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 4, 7); + { { 0, 2, height }, { 32, 28, 2 } }); + TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -136,27 +136,27 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 10)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 11)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 8, height, @@ -170,25 +170,25 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 8, height, @@ -219,25 +219,25 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 3, height, @@ -251,25 +251,25 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 3, height, @@ -300,25 +300,25 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 6, height, @@ -332,25 +332,25 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 6, height, @@ -404,25 +404,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -446,25 +446,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 1)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 4)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 7)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 10)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -478,25 +478,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 2)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 8)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -539,25 +539,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -581,25 +581,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 1)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 6)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 11)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 16)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -616,25 +616,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 7)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 17)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -651,25 +651,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 3)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 8)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 13)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -686,25 +686,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 4)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -747,25 +747,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -786,25 +786,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 1)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 5)), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 9)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 13)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -821,25 +821,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 6)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 10)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 14)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -859,7 +859,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -867,7 +867,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 7)), - { 0, 0, height }, { 16, 18, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -875,7 +875,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 11)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -883,7 +883,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -911,25 +911,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -950,25 +950,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 17)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 25)), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 29)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -985,25 +985,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 22)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 26)), - { 0, 0, height }, { 28, 28, 3 }, { 4, 4, height }); + { 0, 0, height }, { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 30)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1023,7 +1023,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1031,7 +1031,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 23)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1039,7 +1039,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 27)), - { 0, 0, height }, { 16, 18, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1047,7 +1047,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE + 31)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1093,7 +1093,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1105,7 +1105,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1122,7 +1122,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1134,7 +1134,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1151,7 +1151,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1163,7 +1163,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1184,7 +1184,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1210,7 +1210,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1246,7 +1246,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1258,7 +1258,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1275,7 +1275,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1287,7 +1287,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1304,7 +1304,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1316,7 +1316,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1337,7 +1337,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1363,7 +1363,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1399,7 +1399,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1411,7 +1411,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1428,7 +1428,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1440,7 +1440,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1457,7 +1457,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1469,7 +1469,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1490,7 +1490,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1516,7 +1516,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1552,7 +1552,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1564,7 +1564,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1581,7 +1581,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1593,7 +1593,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1610,7 +1610,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1622,7 +1622,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1643,7 +1643,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1669,7 +1669,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1705,7 +1705,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1717,7 +1717,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1734,7 +1734,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1746,7 +1746,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1763,7 +1763,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1775,7 +1775,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1796,7 +1796,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1822,7 +1822,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1858,7 +1858,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1870,7 +1870,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1886,7 +1886,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1898,7 +1898,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1914,7 +1914,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1926,7 +1926,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1946,7 +1946,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1972,7 +1972,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2009,7 +2009,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2021,7 +2021,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2038,7 +2038,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2050,7 +2050,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2067,7 +2067,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2079,7 +2079,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2100,7 +2100,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2126,7 +2126,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2156,31 +2156,31 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 3)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -2201,33 +2201,33 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 9)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 10)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 11)), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -2263,36 +2263,36 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 12)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 13)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 14)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 15)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 16)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 17)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 3, height, @@ -2321,36 +2321,36 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 18)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 19)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 20)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 21)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 22)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 23)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 3, height, @@ -2379,36 +2379,36 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 24)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 25)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 26)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 27)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 28)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 29)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 6, height, @@ -2437,36 +2437,36 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 30)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 31)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 32)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 33)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 34)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 35)), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 6, height, @@ -2523,28 +2523,28 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 36)), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 37)), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 38)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION + 39)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -2576,7 +2576,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2590,11 +2590,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2608,7 +2608,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2626,7 +2626,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2659,7 +2659,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2673,7 +2673,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2687,11 +2687,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2709,7 +2709,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2742,7 +2742,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2756,11 +2756,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2774,7 +2774,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2792,7 +2792,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2825,7 +2825,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2839,7 +2839,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2853,11 +2853,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2875,7 +2875,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2908,7 +2908,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 14)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2922,11 +2922,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2940,7 +2940,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 13)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2958,7 +2958,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 12)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2991,7 +2991,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 19)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3005,7 +3005,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 15)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3019,11 +3019,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 17)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 18)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3041,7 +3041,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 16)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3074,7 +3074,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 24)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3088,11 +3088,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 20)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 21)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3106,7 +3106,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 23)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3124,7 +3124,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 22)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3157,7 +3157,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 29)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3171,7 +3171,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 25)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3185,11 +3185,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 27)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 28)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3207,7 +3207,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 26)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3240,7 +3240,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 26)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3253,11 +3253,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 27)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 28)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3270,7 +3270,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 25)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3287,7 +3287,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 29)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3321,7 +3321,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 22)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3334,7 +3334,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 23)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3347,11 +3347,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 20)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 21)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3368,7 +3368,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 24)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3402,7 +3402,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 16)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3416,11 +3416,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 17)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 18)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3434,7 +3434,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 15)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3452,7 +3452,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 19)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3485,7 +3485,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 12)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3499,7 +3499,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 13)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3513,11 +3513,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3535,7 +3535,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 14)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3568,7 +3568,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 33)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3582,7 +3582,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 30)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3596,7 +3596,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 32)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3614,7 +3614,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 31)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3647,7 +3647,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 31)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3661,7 +3661,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 32)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3675,7 +3675,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 30)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3693,7 +3693,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_BANK_TRANSITION_DIAGONAL + 33)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3726,29 +3726,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 4)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3772,25 +3772,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 5)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 8)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3804,29 +3804,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 3)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 6)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_CURVE_BANKED + 13)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3869,29 +3869,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 6)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3915,25 +3915,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 2)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 7)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 12)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 18)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3950,25 +3950,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 8)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 13)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3985,25 +3985,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 4)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 9)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 14)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 20)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4020,29 +4020,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 15)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 16)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_MEDIUM_CURVE_BANKED + 21)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4085,25 +4085,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 4)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4124,25 +4124,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 1)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 5)), - { 0, 0, height }, { 34, 16, 0 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 9)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 13)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4159,25 +4159,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 6)), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 10)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 14)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4197,7 +4197,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4205,7 +4205,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 7)), - { 0, 0, height }, { 16, 18, 0 }, { 0, 16, height + 27 }); + { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4213,7 +4213,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 11)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4221,7 +4221,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4249,25 +4249,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 24)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 28)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -4288,25 +4288,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 17)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 25)), - { 0, 0, height }, { 34, 16, 0 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 29)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4323,25 +4323,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 22)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 26)), - { 0, 0, height }, { 28, 28, 0 }, { 4, 4, height + 27 }); + { 0, 0, height }, { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 30)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4361,7 +4361,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4369,7 +4369,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 23)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4377,7 +4377,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 27)), - { 0, 0, height }, { 16, 18, 0 }, { 0, 16, height + 27 }); + { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4385,7 +4385,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_CURVE_BANKED + 31)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4646,25 +4646,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4700,13 +4700,13 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 11)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 16)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4723,19 +4723,19 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 7)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4758,7 +4758,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 3)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4776,7 +4776,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4793,25 +4793,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 4)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4846,25 +4846,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4888,13 +4888,13 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 26)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4929,19 +4929,19 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 27)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 32)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 37)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4958,7 +4958,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 23)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4976,7 +4976,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 38)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4993,25 +4993,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 24)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 29)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 34)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_GENTLE_MEDIUM_CURVE + 39)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5061,22 +5061,22 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5110,12 +5110,12 @@ namespace AlpineRC case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 2)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 6)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5131,12 +5131,12 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 2)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 6)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5166,22 +5166,22 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5215,22 +5215,22 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5250,14 +5250,14 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 9)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 13)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5295,14 +5295,14 @@ namespace AlpineRC case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 9)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 13)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5320,22 +5320,22 @@ namespace AlpineRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_S_BEND + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5370,29 +5370,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 4)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5417,25 +5417,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 5)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 8)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5449,29 +5449,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 3)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 6)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 13)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5498,29 +5498,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 0)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 1)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 4)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 7)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5550,25 +5550,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 5)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 8)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5582,29 +5582,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 13)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 6)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 10)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5635,29 +5635,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 21)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 25)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5682,25 +5682,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 22)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 26)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5714,29 +5714,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 16)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 20)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 23)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 27)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5763,29 +5763,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 17)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 21)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 24)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 25)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5815,25 +5815,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 22)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 26)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5847,29 +5847,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 19)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 20)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 23)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 27)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_SMALL_HELIX + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5926,29 +5926,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 6)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5973,25 +5973,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 2)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 7)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 12)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 18)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6008,25 +6008,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 8)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 13)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6043,25 +6043,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 4)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 9)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 14)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 20)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6078,29 +6078,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 15)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 16)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 21)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6127,29 +6127,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 17)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 0)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 1)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 6)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6179,25 +6179,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 2)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 7)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 12)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6214,25 +6214,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 8)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 13)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6249,25 +6249,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 20)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 4)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 9)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 14)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6284,29 +6284,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 10)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 16)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -6336,29 +6336,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 27)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 33)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 38)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 39)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -6383,25 +6383,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 23)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 28)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 34)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 40)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6418,25 +6418,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 24)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 29)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 35)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 41)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6453,25 +6453,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 25)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 30)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 36)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 42)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6488,7 +6488,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 26)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6496,11 +6496,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 31)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 32)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6508,7 +6508,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 37)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6516,7 +6516,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 43)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6542,29 +6542,29 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 27)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 33)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 38)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 39)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 22)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6594,25 +6594,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 28)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 34)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 40)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 23)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6629,25 +6629,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 29)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 35)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 41)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 24)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6664,25 +6664,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 30)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 36)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 42)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 25)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6699,11 +6699,11 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 31)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 32)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6711,7 +6711,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 37)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6719,7 +6719,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 43)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6727,7 +6727,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_LARGE_HELIX + 26)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6780,16 +6780,16 @@ namespace AlpineRC case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, direction & 1 ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -6824,7 +6824,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 3)), - { 0, 6, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -6863,25 +6863,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 1)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 4)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 6)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 8)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6932,7 +6932,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 14)), - { 0, 6, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -6965,25 +6965,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 10)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 12)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 15)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 17)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -7018,25 +7018,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 12)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 15)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 17)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 10)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -7073,7 +7073,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 14)), - { 6, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -7120,25 +7120,25 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 8)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 1)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 4)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 6)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -7181,7 +7181,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_ALPINE_TRACK_TURN_BANK_TRANSITION + 3)), - { 6, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( diff --git a/src/openrct2/ride/coaster/BobsleighCoaster.cpp b/src/openrct2/ride/coaster/BobsleighCoaster.cpp index 902f22f5eb..a73f301a01 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ static constexpr const uint32_t _BobsleighBlockBrakeImages[NumOrthogonalDirectio }; /** rct2: 0x006FE5B4 */ -static void bobsleigh_rc_track_flat( +static void BobsleighRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -42,23 +42,23 @@ static void bobsleigh_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14576), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14576), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14578), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14578), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14577), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14577), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14579), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14579), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -70,23 +70,23 @@ static void bobsleigh_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14574), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14574), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14575), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14575), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -97,7 +97,7 @@ static void bobsleigh_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void bobsleigh_rc_track_station( +static void BobsleighRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -110,19 +110,19 @@ static void bobsleigh_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x006FE5C4 */ -static void bobsleigh_rc_track_25_deg_up( +static void BobsleighRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -132,38 +132,38 @@ static void bobsleigh_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14634), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14634), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14638), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14638), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14635), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14635), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14639), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14639), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14636), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14636), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14640), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14640), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14637), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14637), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14641), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14641), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -174,38 +174,38 @@ static void bobsleigh_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14610), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14610), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14614), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14614), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14611), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14611), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14615), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14615), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14612), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14612), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14616), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14616), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14613), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14613), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14617), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14617), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -224,7 +224,7 @@ static void bobsleigh_rc_track_25_deg_up( } /** rct2: 0x006FE5D4 */ -static void bobsleigh_rc_track_flat_to_25_deg_up( +static void BobsleighRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -234,38 +234,38 @@ static void bobsleigh_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14618), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14618), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14622), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14622), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14619), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14619), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14623), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14623), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14620), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14620), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14624), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14624), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14621), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14621), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14625), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14625), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -276,38 +276,38 @@ static void bobsleigh_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14594), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14594), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14598), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14598), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14595), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14595), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14599), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14599), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14596), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14596), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14600), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14600), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14597), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14597), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14601), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14601), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -326,7 +326,7 @@ static void bobsleigh_rc_track_flat_to_25_deg_up( } /** rct2: 0x006FE5E4 */ -static void bobsleigh_rc_track_25_deg_up_to_flat( +static void BobsleighRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -336,38 +336,38 @@ static void bobsleigh_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14626), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14626), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14630), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14630), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14627), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14627), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14631), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14631), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14628), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14628), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14632), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14632), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14629), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14629), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14633), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14633), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -378,38 +378,38 @@ static void bobsleigh_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14602), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14602), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14606), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14606), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14603), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14603), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14607), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14607), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14604), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14604), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14608), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14608), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14605), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14605), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14609), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14609), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -428,31 +428,31 @@ static void bobsleigh_rc_track_25_deg_up_to_flat( } /** rct2: 0x006FE5F4 */ -static void bobsleigh_rc_track_25_deg_down( +static void BobsleighRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE604 */ -static void bobsleigh_rc_track_flat_to_25_deg_down( +static void BobsleighRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE614 */ -static void bobsleigh_rc_track_25_deg_down_to_flat( +static void BobsleighRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE624 */ -static void bobsleigh_rc_track_left_quarter_turn_5( +static void BobsleighRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -464,34 +464,34 @@ static void bobsleigh_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14707), { 0, 2, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14727), { 0, 2, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14712), { 0, 2, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14732), { 0, 2, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14717), { 0, 2, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14737), { 0, 2, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14702), { 0, 2, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14722), { 0, 2, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -512,34 +512,34 @@ static void bobsleigh_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14706), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14726), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14711), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14731), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14716), { 0, 16, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14736), { 0, 16, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14701), { 0, 16, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14721), { 0, 16, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -554,34 +554,34 @@ static void bobsleigh_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14705), { 0, 16, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14725), { 0, 16, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14710), { 16, 16, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14730), { 16, 16, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14715), { 16, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14735), { 16, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14700), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14720), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -597,34 +597,34 @@ static void bobsleigh_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14704), { 16, 0, height }, - { 16, 34, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 34, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14724), { 16, 0, height }, - { 16, 34, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 34, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14709), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14729), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14714), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14734), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14699), { 16, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14719), { 16, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -639,34 +639,34 @@ static void bobsleigh_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14703), { 2, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14723), { 2, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14708), { 2, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14728), { 2, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14713), { 2, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14733), { 2, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14698), { 2, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14718), { 2, 0, height }, - { 30, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 30, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -687,16 +687,16 @@ static void bobsleigh_rc_track_left_quarter_turn_5( } /** rct2: 0x006FE634 */ -static void bobsleigh_rc_track_right_quarter_turn_5( +static void BobsleighRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bobsleigh_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + BobsleighRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x006FE644 */ -static void bobsleigh_rc_track_flat_to_left_bank( +static void BobsleighRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -704,38 +704,38 @@ static void bobsleigh_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14642), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14642), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14646), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14646), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14643), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14643), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14647), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14647), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14644), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14644), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14648), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14648), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14645), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14645), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14649), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14649), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -746,7 +746,7 @@ static void bobsleigh_rc_track_flat_to_left_bank( } /** rct2: 0x006FE654 */ -static void bobsleigh_rc_track_flat_to_right_bank( +static void BobsleighRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -754,38 +754,38 @@ static void bobsleigh_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14650), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14650), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14654), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14654), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14651), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14651), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14655), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14655), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14652), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14652), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14656), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14656), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14653), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14653), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14657), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14657), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -796,7 +796,7 @@ static void bobsleigh_rc_track_flat_to_right_bank( } /** rct2: 0x006FE664 */ -static void bobsleigh_rc_track_left_bank_to_flat( +static void BobsleighRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -804,38 +804,38 @@ static void bobsleigh_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14652), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14652), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14656), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14656), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14653), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14653), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14657), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14657), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14650), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14650), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14654), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14654), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14651), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14651), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14655), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14655), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -846,7 +846,7 @@ static void bobsleigh_rc_track_left_bank_to_flat( } /** rct2: 0x006FE674 */ -static void bobsleigh_rc_track_right_bank_to_flat( +static void BobsleighRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -854,38 +854,38 @@ static void bobsleigh_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14644), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14644), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14648), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14648), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14645), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14645), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14649), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14649), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14642), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14642), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14646), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14646), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14643), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14643), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14647), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14647), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -896,7 +896,7 @@ static void bobsleigh_rc_track_right_bank_to_flat( } /** rct2: 0x006FE684 */ -static void bobsleigh_rc_track_banked_left_quarter_turn_5( +static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -908,34 +908,34 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14747), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14767), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14752), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14772), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14757), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14777), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14742), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14762), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -956,34 +956,34 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14746), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14766), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14751), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14771), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14756), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14776), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14741), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14761), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -998,34 +998,34 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14745), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14765), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14750), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14770), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14755), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14775), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14740), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14760), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1041,34 +1041,34 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14744), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14764), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14749), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14769), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14754), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14774), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14739), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14759), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1083,34 +1083,34 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14743), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14763), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14748), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14768), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14753), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14773), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14738), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14758), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1131,16 +1131,16 @@ static void bobsleigh_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x006FE694 */ -static void bobsleigh_rc_track_banked_right_quarter_turn_5( +static void BobsleighRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bobsleigh_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + BobsleighRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x006FE6A4 */ -static void bobsleigh_rc_track_left_bank_to_25_deg_up( +static void BobsleighRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1148,38 +1148,38 @@ static void bobsleigh_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14674), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14674), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14678), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14678), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14675), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14675), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14679), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14679), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14676), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14676), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14680), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14680), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14677), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14677), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14681), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14681), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1197,7 +1197,7 @@ static void bobsleigh_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x006FE6B4 */ -static void bobsleigh_rc_track_right_bank_to_25_deg_up( +static void BobsleighRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1205,38 +1205,38 @@ static void bobsleigh_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14682), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14682), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14686), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14686), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14683), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14683), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14687), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14687), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14684), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14684), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14688), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14688), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14685), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14685), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14689), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14689), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1254,7 +1254,7 @@ static void bobsleigh_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x006FE6C4 */ -static void bobsleigh_rc_track_25_deg_up_to_left_bank( +static void BobsleighRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1262,38 +1262,38 @@ static void bobsleigh_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14658), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14658), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14662), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14662), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14659), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14659), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14663), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14663), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14660), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14660), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14664), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14664), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14661), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14661), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14665), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14665), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1311,7 +1311,7 @@ static void bobsleigh_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x006FE6D4 */ -static void bobsleigh_rc_track_25_deg_up_to_right_bank( +static void BobsleighRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1319,38 +1319,38 @@ static void bobsleigh_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14666), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14666), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14670), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14670), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14667), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14667), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14671), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14671), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14668), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14668), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14672), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14672), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14669), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14669), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14673), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14673), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1368,39 +1368,39 @@ static void bobsleigh_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x006FE6E4 */ -static void bobsleigh_rc_track_left_bank_to_25_deg_down( +static void BobsleighRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE6F4 */ -static void bobsleigh_rc_track_right_bank_to_25_deg_down( +static void BobsleighRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE704 */ -static void bobsleigh_rc_track_25_deg_down_to_left_bank( +static void BobsleighRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE714 */ -static void bobsleigh_rc_track_25_deg_down_to_right_bank( +static void BobsleighRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE724 */ -static void bobsleigh_rc_track_left_bank( +static void BobsleighRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1408,38 +1408,38 @@ static void bobsleigh_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14690), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14690), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14694), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14694), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14691), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14691), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14695), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14695), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14692), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14692), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14696), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14696), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14693), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14693), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14697), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14697), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1450,15 +1450,15 @@ static void bobsleigh_rc_track_left_bank( } /** rct2: 0x006FE734 */ -static void bobsleigh_rc_track_right_bank( +static void BobsleighRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bobsleigh_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BobsleighRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x006FE744 */ -static void bobsleigh_rc_track_s_bend_left( +static void BobsleighRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1470,34 +1470,34 @@ static void bobsleigh_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14826), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14842), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14830), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14846), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14829), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14845), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14833), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14849), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1515,38 +1515,38 @@ static void bobsleigh_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14827), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14843), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14831), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14847), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14828), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14844), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14832), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14848), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1561,36 +1561,36 @@ static void bobsleigh_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14828), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14844), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14832), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14848), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14827), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14843), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14831), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14847), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1607,34 +1607,34 @@ static void bobsleigh_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14829), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14845), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14833), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14849), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14826), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14842), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14830), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14846), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1655,7 +1655,7 @@ static void bobsleigh_rc_track_s_bend_left( } /** rct2: 0x006FE754 */ -static void bobsleigh_rc_track_s_bend_right( +static void BobsleighRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1667,34 +1667,34 @@ static void bobsleigh_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14834), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14850), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14838), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14854), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14837), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14853), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14841), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14857), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1712,38 +1712,38 @@ static void bobsleigh_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14835), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14851), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14839), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14855), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14836), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14852), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14840), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14856), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1758,36 +1758,36 @@ static void bobsleigh_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14836), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14852), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14840), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14856), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14835), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14851), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14839), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14855), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1804,34 +1804,34 @@ static void bobsleigh_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14837), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14853), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14841), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14857), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14834), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14850), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14838), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14854), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1852,7 +1852,7 @@ static void bobsleigh_rc_track_s_bend_right( } /** rct2: 0x006FE794 */ -static void bobsleigh_rc_track_left_quarter_turn_3( +static void BobsleighRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1864,34 +1864,34 @@ static void bobsleigh_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14783), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14795), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14786), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14798), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14789), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14801), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14780), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14792), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1912,34 +1912,34 @@ static void bobsleigh_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14782), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14794), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14785), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14797), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14788), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14800), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14779), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14791), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1952,34 +1952,34 @@ static void bobsleigh_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14781), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14793), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14784), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14796), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14787), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14799), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14778), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14790), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2000,16 +2000,16 @@ static void bobsleigh_rc_track_left_quarter_turn_3( } /** rct2: 0x006FE7A4 */ -static void bobsleigh_rc_track_right_quarter_turn_3( +static void BobsleighRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bobsleigh_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + BobsleighRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x006FE7B4 */ -static void bobsleigh_rc_track_left_quarter_turn_3_bank( +static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2021,34 +2021,34 @@ static void bobsleigh_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14807), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14819), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14810), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14822), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14813), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14825), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14804), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14816), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2069,34 +2069,34 @@ static void bobsleigh_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14806), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14818), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14809), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14821), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14812), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14824), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14803), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14815), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2109,34 +2109,34 @@ static void bobsleigh_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14805), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14817), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14808), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14820), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14811), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14823), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14802), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14814), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2157,16 +2157,16 @@ static void bobsleigh_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x006FE7C4 */ -static void bobsleigh_rc_track_right_quarter_turn_3_bank( +static void BobsleighRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bobsleigh_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + BobsleighRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x006FE7D4 */ -static void bobsleigh_rc_track_left_half_banked_helix_up_small( +static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2178,34 +2178,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14887), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14899), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14890), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14902), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14893), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14905), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14884), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14896), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2227,34 +2227,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14886), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14898), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14889), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14901), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14892), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14904), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14883), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14895), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2267,34 +2267,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14885), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14897), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14888), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14900), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14891), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14903), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14882), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14894), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2318,34 +2318,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14884), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14896), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14887), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14899), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14890), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14902), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14893), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14905), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2372,34 +2372,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14883), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14895), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14886), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14898), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14889), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14901), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14892), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14904), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2412,34 +2412,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14882), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14894), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14885), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14897), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14888), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14900), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14891), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14903), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2456,7 +2456,7 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x006FE7E4 */ -static void bobsleigh_rc_track_right_half_banked_helix_up_small( +static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2468,34 +2468,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14858), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14870), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14861), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14873), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14864), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14876), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14867), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14879), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2517,34 +2517,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14859), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14871), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14862), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14874), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14865), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14877), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14868), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14880), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2557,34 +2557,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14860), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14872), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14863), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14875), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14866), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14878), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14869), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14881), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2608,34 +2608,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14861), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14873), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14864), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14876), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14867), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14879), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14858), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14870), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2662,34 +2662,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14862), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14874), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14865), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14877), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14868), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14880), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14859), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14871), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2702,34 +2702,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14863), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14875), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14866), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14878), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14869), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14881), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14860), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14872), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2746,7 +2746,7 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x006FE7F4 */ -static void bobsleigh_rc_track_left_half_banked_helix_down_small( +static void BobsleighRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2756,12 +2756,11 @@ static void bobsleigh_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bobsleigh_rc_track_right_half_banked_helix_up_small( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + BobsleighRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x006FE804 */ -static void bobsleigh_rc_track_right_half_banked_helix_down_small( +static void BobsleighRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2771,11 +2770,11 @@ static void bobsleigh_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bobsleigh_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + BobsleighRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x006FE814 */ -static void bobsleigh_rc_track_left_half_banked_helix_up_large( +static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2787,34 +2786,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14955), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14975), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14960), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14980), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14965), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14985), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14950), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14970), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2836,34 +2835,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14954), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14974), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14959), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14979), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14964), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14984), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14949), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14969), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2878,34 +2877,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14953), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14973), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14958), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14978), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14963), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14983), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14948), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14968), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2921,34 +2920,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14952), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14972), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14957), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14977), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14962), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14982), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14947), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14967), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2963,34 +2962,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14951), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14971), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14956), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14976), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14961), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14981), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14946), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14966), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3014,34 +3013,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14950), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14970), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14955), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14975), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14960), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14980), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14965), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14985), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3068,34 +3067,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14949), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14969), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14954), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14974), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14959), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14979), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14964), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14984), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3110,34 +3109,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14948), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14968), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14953), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14973), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14958), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14978), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14963), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14983), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3153,34 +3152,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14947), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14967), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14952), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14972), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14957), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14977), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14962), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14982), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3195,34 +3194,34 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14946), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14966), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14951), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14971), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14956), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14976), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14961), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14981), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3239,7 +3238,7 @@ static void bobsleigh_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x006FE824 */ -static void bobsleigh_rc_track_right_half_banked_helix_up_large( +static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3251,34 +3250,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14906), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14926), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14911), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14931), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14916), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14936), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14921), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14941), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3300,34 +3299,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14907), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14927), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14912), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14932), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14917), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14937), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14922), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14942), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3342,34 +3341,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14908), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14928), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14913), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14933), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14918), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14938), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14923), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14943), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3385,34 +3384,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14909), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14929), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14914), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14934), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14919), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14939), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14924), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14944), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3427,34 +3426,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14910), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14930), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14915), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14935), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14920), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14940), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14925), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14945), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3478,34 +3477,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14911), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14931), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14916), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14936), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14921), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14941), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14906), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14926), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3532,34 +3531,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14912), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14932), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14917), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14937), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14922), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14942), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14907), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14927), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3574,34 +3573,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14913), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14933), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14918), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14938), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14923), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14943), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14908), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14928), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3617,34 +3616,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14914), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14934), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14919), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14939), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14924), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14944), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14909), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14929), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3659,34 +3658,34 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14915), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14935), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14920), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14940), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14925), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14945), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14910), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14930), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3703,7 +3702,7 @@ static void bobsleigh_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x006FE834 */ -static void bobsleigh_rc_track_left_half_banked_helix_down_large( +static void BobsleighRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3713,12 +3712,11 @@ static void bobsleigh_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bobsleigh_rc_track_right_half_banked_helix_up_large( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + BobsleighRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x006FE844 */ -static void bobsleigh_rc_track_right_half_banked_helix_down_large( +static void BobsleighRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3728,11 +3726,11 @@ static void bobsleigh_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bobsleigh_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + BobsleighRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x006FE854 */ -static void bobsleigh_rc_track_brakes( +static void BobsleighRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3741,23 +3739,23 @@ static void bobsleigh_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14582), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14582), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14584), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14584), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14583), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14583), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14585), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14585), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3768,11 +3766,11 @@ static void bobsleigh_rc_track_brakes( } /** rct2: 0x006FE864 */ -static void bobsleigh_rc_track_block_brakes( +static void BobsleighRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); switch (direction) { case 0: @@ -3780,23 +3778,23 @@ static void bobsleigh_rc_track_block_brakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_BobsleighBlockBrakeImages[direction][isClosed]), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14590), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14590), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_BobsleighBlockBrakeImages[direction][isClosed]), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14591), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14591), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3806,7 +3804,7 @@ static void bobsleigh_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void bobsleigh_rc_track_on_ride_photo( +static void BobsleighRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3818,11 +3816,11 @@ static void bobsleigh_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14574), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14574), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -3830,11 +3828,11 @@ static void bobsleigh_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14575), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14575), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3842,11 +3840,11 @@ static void bobsleigh_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14574), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14574), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: @@ -3855,113 +3853,113 @@ static void bobsleigh_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14575), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14575), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionBobsleighRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return bobsleigh_rc_track_flat; + return BobsleighRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return bobsleigh_rc_track_station; + return BobsleighRCTrackStation; case TrackElemType::Up25: - return bobsleigh_rc_track_25_deg_up; + return BobsleighRCTrack25DegUp; case TrackElemType::FlatToUp25: - return bobsleigh_rc_track_flat_to_25_deg_up; + return BobsleighRCTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return bobsleigh_rc_track_25_deg_up_to_flat; + return BobsleighRCTrack25DegUpToFlat; case TrackElemType::Down25: - return bobsleigh_rc_track_25_deg_down; + return BobsleighRCTrack25DegDown; case TrackElemType::FlatToDown25: - return bobsleigh_rc_track_flat_to_25_deg_down; + return BobsleighRCTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return bobsleigh_rc_track_25_deg_down_to_flat; + return BobsleighRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return bobsleigh_rc_track_left_quarter_turn_5; + return BobsleighRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return bobsleigh_rc_track_right_quarter_turn_5; + return BobsleighRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return bobsleigh_rc_track_flat_to_left_bank; + return BobsleighRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return bobsleigh_rc_track_flat_to_right_bank; + return BobsleighRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return bobsleigh_rc_track_left_bank_to_flat; + return BobsleighRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return bobsleigh_rc_track_right_bank_to_flat; + return BobsleighRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return bobsleigh_rc_track_banked_left_quarter_turn_5; + return BobsleighRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return bobsleigh_rc_track_banked_right_quarter_turn_5; + return BobsleighRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return bobsleigh_rc_track_left_bank_to_25_deg_up; + return BobsleighRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return bobsleigh_rc_track_right_bank_to_25_deg_up; + return BobsleighRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return bobsleigh_rc_track_25_deg_up_to_left_bank; + return BobsleighRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return bobsleigh_rc_track_25_deg_up_to_right_bank; + return BobsleighRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return bobsleigh_rc_track_left_bank_to_25_deg_down; + return BobsleighRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return bobsleigh_rc_track_right_bank_to_25_deg_down; + return BobsleighRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return bobsleigh_rc_track_25_deg_down_to_left_bank; + return BobsleighRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return bobsleigh_rc_track_25_deg_down_to_right_bank; + return BobsleighRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return bobsleigh_rc_track_left_bank; + return BobsleighRCTrackLeftBank; case TrackElemType::RightBank: - return bobsleigh_rc_track_right_bank; + return BobsleighRCTrackRightBank; case TrackElemType::SBendLeft: - return bobsleigh_rc_track_s_bend_left; + return BobsleighRCTrackSBendLeft; case TrackElemType::SBendRight: - return bobsleigh_rc_track_s_bend_right; + return BobsleighRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return bobsleigh_rc_track_left_quarter_turn_3; + return BobsleighRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return bobsleigh_rc_track_right_quarter_turn_3; + return BobsleighRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return bobsleigh_rc_track_left_quarter_turn_3_bank; + return BobsleighRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return bobsleigh_rc_track_right_quarter_turn_3_bank; + return BobsleighRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftHalfBankedHelixUpSmall: - return bobsleigh_rc_track_left_half_banked_helix_up_small; + return BobsleighRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return bobsleigh_rc_track_right_half_banked_helix_up_small; + return BobsleighRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return bobsleigh_rc_track_left_half_banked_helix_down_small; + return BobsleighRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return bobsleigh_rc_track_right_half_banked_helix_down_small; + return BobsleighRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return bobsleigh_rc_track_left_half_banked_helix_up_large; + return BobsleighRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return bobsleigh_rc_track_right_half_banked_helix_up_large; + return BobsleighRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return bobsleigh_rc_track_left_half_banked_helix_down_large; + return BobsleighRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return bobsleigh_rc_track_right_half_banked_helix_down_large; + return BobsleighRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::Brakes: - return bobsleigh_rc_track_brakes; + return BobsleighRCTrackBrakes; case TrackElemType::BlockBrakes: - return bobsleigh_rc_track_block_brakes; + return BobsleighRCTrackBlockBrakes; case TrackElemType::OnRidePhoto: - return bobsleigh_rc_track_on_ride_photo; + return BobsleighRCTrackOnRidePhoto; } return nullptr; } diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp index deea224fa9..3846ca4826 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ static constexpr const uint32_t _BolligerMabillardBlockBrakeImages[NumOrthogonal }; template -static void bolliger_mabillard_track_flat( +static void BolligerMabillardTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -47,9 +47,9 @@ static void bolliger_mabillard_track_flat( }; PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -65,9 +65,9 @@ static void bolliger_mabillard_track_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -79,7 +79,7 @@ static void bolliger_mabillard_track_flat( } template -static void bolliger_mabillard_track_station( +static void BolligerMabillardTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -92,25 +92,24 @@ static void bolliger_mabillard_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_BolligerMabillardBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); - track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 9, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -118,7 +117,7 @@ static void bolliger_mabillard_track_station( } template -static void bolliger_mabillard_track_25_deg_up( +static void BolligerMabillardTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -128,26 +127,26 @@ static void bolliger_mabillard_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17498), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17498), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17499), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17499), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17500), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17500), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17501), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17501), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -158,26 +157,26 @@ static void bolliger_mabillard_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17204), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17204), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17205), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17205), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17206), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17206), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17207), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17207), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -196,7 +195,7 @@ static void bolliger_mabillard_track_25_deg_up( } template -static void bolliger_mabillard_track_60_deg_up( +static void BolligerMabillardTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -206,26 +205,26 @@ static void bolliger_mabillard_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17514), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17514), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17515), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17515), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17516), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17516), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17517), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17517), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -236,26 +235,26 @@ static void bolliger_mabillard_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17220), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17220), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17221), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17221), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17222), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17222), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17223), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17223), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -274,7 +273,7 @@ static void bolliger_mabillard_track_60_deg_up( } template -static void bolliger_mabillard_track_flat_to_25_deg_up( +static void BolligerMabillardTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -284,26 +283,26 @@ static void bolliger_mabillard_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17490), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17490), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17491), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17491), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17492), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17492), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17493), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17493), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -314,26 +313,26 @@ static void bolliger_mabillard_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17196), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17196), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17197), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17197), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17198), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17198), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17199), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17199), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -352,7 +351,7 @@ static void bolliger_mabillard_track_flat_to_25_deg_up( } template -static void bolliger_mabillard_track_25_deg_up_to_60_deg_up( +static void BolligerMabillardTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -362,32 +361,32 @@ static void bolliger_mabillard_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17502), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17502), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17503), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17503), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17506), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17506), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17504), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17504), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17507), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17507), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17505), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17505), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -398,32 +397,32 @@ static void bolliger_mabillard_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17208), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17208), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17209), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17209), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17212), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17212), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17210), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17210), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17213), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17213), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17211), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17211), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -442,7 +441,7 @@ static void bolliger_mabillard_track_25_deg_up_to_60_deg_up( } template -static void bolliger_mabillard_track_60_deg_up_to_25_deg_up( +static void BolligerMabillardTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -452,32 +451,32 @@ static void bolliger_mabillard_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17508), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17508), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17509), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17509), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17512), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17512), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17510), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17510), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17513), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17513), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17511), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17511), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -488,32 +487,32 @@ static void bolliger_mabillard_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17214), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17214), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17215), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17215), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17218), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17218), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17216), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17216), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17219), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17219), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17217), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17217), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -532,7 +531,7 @@ static void bolliger_mabillard_track_60_deg_up_to_25_deg_up( } template -static void bolliger_mabillard_track_25_deg_up_to_flat( +static void BolligerMabillardTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -542,26 +541,26 @@ static void bolliger_mabillard_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17494), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17494), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17495), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17495), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17496), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17496), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17497), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17497), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -572,26 +571,26 @@ static void bolliger_mabillard_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17200), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17200), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17201), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17201), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17202), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17202), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17203), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17203), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -610,59 +609,57 @@ static void bolliger_mabillard_track_25_deg_up_to_flat( } template -static void bolliger_mabillard_track_25_deg_down( +static void BolligerMabillardTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_60_deg_down( +static void BolligerMabillardTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_flat_to_25_deg_down( +static void BolligerMabillardTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_to_flat( + BolligerMabillardTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); +} + +template +static void BolligerMabillardTrack25DegDownTo60DegDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement) +{ + BolligerMabillardTrack60DegUpTo25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_down_to_60_deg_down( +static void BolligerMabillardTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_60_deg_up_to_25_deg_up( + BolligerMabillardTrack25DegUpTo60DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_60_deg_down_to_25_deg_down( +static void BolligerMabillardTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_to_60_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_down_to_flat( - PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, - const TrackElement& trackElement) -{ - bolliger_mabillard_track_flat_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); -} - -template -static void bolliger_mabillard_track_left_quarter_turn_5( +static void BolligerMabillardTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -674,22 +671,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17259), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17264), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17269), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17254), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -710,22 +707,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17258), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17263), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17268), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17253), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -740,22 +737,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17257), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17262), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17267), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17252), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -771,22 +768,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17256), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17261), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17266), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17251), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -801,22 +798,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17255), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17260), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17265), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17250), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -837,17 +834,17 @@ static void bolliger_mabillard_track_left_quarter_turn_5( } template -static void bolliger_mabillard_track_right_quarter_turn_5( +static void BolligerMabillardTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_left_quarter_turn_5( + BolligerMabillardTrackLeftQuarterTurn5( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_flat_to_left_bank( +static void BolligerMabillardTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -855,32 +852,32 @@ static void bolliger_mabillard_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -891,7 +888,7 @@ static void bolliger_mabillard_track_flat_to_left_bank( } template -static void bolliger_mabillard_track_flat_to_right_bank( +static void BolligerMabillardTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -899,32 +896,32 @@ static void bolliger_mabillard_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -935,7 +932,7 @@ static void bolliger_mabillard_track_flat_to_right_bank( } template -static void bolliger_mabillard_track_left_bank_to_flat( +static void BolligerMabillardTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -943,32 +940,32 @@ static void bolliger_mabillard_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -979,7 +976,7 @@ static void bolliger_mabillard_track_left_bank_to_flat( } template -static void bolliger_mabillard_track_right_bank_to_flat( +static void BolligerMabillardTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -987,32 +984,32 @@ static void bolliger_mabillard_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1023,7 +1020,7 @@ static void bolliger_mabillard_track_right_bank_to_flat( } template -static void bolliger_mabillard_track_banked_left_quarter_turn_5( +static void BolligerMabillardTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1035,28 +1032,28 @@ static void bolliger_mabillard_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17279), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17290), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17284), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17289), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17274), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1077,22 +1074,22 @@ static void bolliger_mabillard_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17278), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17283), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17288), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17273), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1107,22 +1104,22 @@ static void bolliger_mabillard_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17277), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17282), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17287), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17272), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1138,22 +1135,22 @@ static void bolliger_mabillard_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17276), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17281), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17286), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17271), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1168,25 +1165,25 @@ static void bolliger_mabillard_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17275), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17280), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17285), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17291), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17270), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1207,17 +1204,17 @@ static void bolliger_mabillard_track_banked_left_quarter_turn_5( } template -static void bolliger_mabillard_track_banked_right_quarter_turn_5( +static void BolligerMabillardTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_banked_left_quarter_turn_5( + BolligerMabillardTrackBankedLeftQuarterTurn5( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_bank_to_25_deg_up( +static void BolligerMabillardTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1225,32 +1222,32 @@ static void bolliger_mabillard_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17168), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17168), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17172), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17172), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17169), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17169), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17173), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17173), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17170), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17170), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17171), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17171), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1268,7 +1265,7 @@ static void bolliger_mabillard_track_left_bank_to_25_deg_up( } template -static void bolliger_mabillard_track_right_bank_to_25_deg_up( +static void BolligerMabillardTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1276,32 +1273,32 @@ static void bolliger_mabillard_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17174), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17174), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17175), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17175), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17176), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17176), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17178), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17178), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17177), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17177), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17179), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17179), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1319,7 +1316,7 @@ static void bolliger_mabillard_track_right_bank_to_25_deg_up( } template -static void bolliger_mabillard_track_25_deg_up_to_left_bank( +static void BolligerMabillardTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1327,32 +1324,32 @@ static void bolliger_mabillard_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17180), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17180), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17184), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17184), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17181), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17181), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17185), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17185), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17182), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17182), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17183), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17183), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1370,7 +1367,7 @@ static void bolliger_mabillard_track_25_deg_up_to_left_bank( } template -static void bolliger_mabillard_track_25_deg_up_to_right_bank( +static void BolligerMabillardTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1378,32 +1375,32 @@ static void bolliger_mabillard_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17186), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17186), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17187), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17187), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17188), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17188), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17190), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17190), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17189), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17189), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17191), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17191), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1421,43 +1418,43 @@ static void bolliger_mabillard_track_25_deg_up_to_right_bank( } template -static void bolliger_mabillard_track_left_bank_to_25_deg_down( +static void BolligerMabillardTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_to_right_bank( + BolligerMabillardTrack25DegUpToRightBank( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_bank_to_25_deg_down( +static void BolligerMabillardTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_to_left_bank( + BolligerMabillardTrack25DegUpToLeftBank( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_down_to_left_bank( +static void BolligerMabillardTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_bank_to_25_deg_up( + BolligerMabillardTrackRightBankTo25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_down_to_right_bank( +static void BolligerMabillardTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_bank_to_25_deg_up( + BolligerMabillardTrackLeftBankTo25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_bank( +static void BolligerMabillardTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1465,26 +1462,26 @@ static void bolliger_mabillard_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17192), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17192), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17193), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17193), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17194), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17194), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17195), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17195), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1495,15 +1492,15 @@ static void bolliger_mabillard_track_left_bank( } template -static void bolliger_mabillard_track_right_bank( +static void BolligerMabillardTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( +static void BolligerMabillardTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1515,22 +1512,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17344), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17349), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17354), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17359), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1561,12 +1558,12 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17355), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17360), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1581,17 +1578,17 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17346), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17351), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17356), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1612,7 +1609,7 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17347), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1627,7 +1624,7 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17362), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1642,22 +1639,22 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17348), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17353), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17358), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17363), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1678,7 +1675,7 @@ static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( } template -static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( +static void BolligerMabillardTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1690,22 +1687,22 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17324), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17329), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17334), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17339), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1726,12 +1723,12 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17325), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17330), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1761,17 +1758,17 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17331), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17336), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17341), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1787,7 +1784,7 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17327), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1802,7 +1799,7 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17342), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1817,22 +1814,22 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17328), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17333), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17338), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17343), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1853,27 +1850,27 @@ static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( } template -static void bolliger_mabillard_track_left_quarter_turn_5_25_deg_down( +static void BolligerMabillardTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_right_quarter_turn_5_25_deg_up( + BolligerMabillardTrackRightQuarterTurn525DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_quarter_turn_5_25_deg_down( +static void BolligerMabillardTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_left_quarter_turn_5_25_deg_up( + BolligerMabillardTrackLeftQuarterTurn525DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_s_bend_left( +static void BolligerMabillardTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1885,22 +1882,22 @@ static void bolliger_mabillard_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17308), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17312), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17311), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17315), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1930,12 +1927,12 @@ static void bolliger_mabillard_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17310), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17314), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1950,12 +1947,12 @@ static void bolliger_mabillard_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17310), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17314), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1982,22 +1979,22 @@ static void bolliger_mabillard_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17311), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17315), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17308), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17312), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2018,7 +2015,7 @@ static void bolliger_mabillard_track_s_bend_left( } template -static void bolliger_mabillard_track_s_bend_right( +static void BolligerMabillardTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2030,22 +2027,22 @@ static void bolliger_mabillard_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17316), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17320), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17319), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17323), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2063,13 +2060,13 @@ static void bolliger_mabillard_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17317), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, supportType, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17321), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, supportType, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2105,13 +2102,13 @@ static void bolliger_mabillard_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17317), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, supportType, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17321), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, supportType, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2127,22 +2124,22 @@ static void bolliger_mabillard_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17319), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17323), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17316), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17320), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2163,7 +2160,7 @@ static void bolliger_mabillard_track_s_bend_right( } template -static void bolliger_mabillard_track_left_vertical_loop( +static void BolligerMabillardTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2247,22 +2244,22 @@ static void bolliger_mabillard_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17596), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17604), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17599), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17607), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2341,22 +2338,22 @@ static void bolliger_mabillard_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17599), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17607), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17596), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17604), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2444,7 +2441,7 @@ static void bolliger_mabillard_track_left_vertical_loop( } template -static void bolliger_mabillard_track_right_vertical_loop( +static void BolligerMabillardTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2517,22 +2514,22 @@ static void bolliger_mabillard_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17623), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17615), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17620), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17612), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -2601,22 +2598,22 @@ static void bolliger_mabillard_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17620), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17612), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17623), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17615), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -2689,11 +2686,11 @@ static void bolliger_mabillard_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } template -static void bolliger_mabillard_track_left_quarter_turn_3( +static void BolligerMabillardTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2705,22 +2702,22 @@ static void bolliger_mabillard_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17229), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17232), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17235), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17226), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2741,22 +2738,22 @@ static void bolliger_mabillard_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17228), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17231), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17234), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17225), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2769,22 +2766,22 @@ static void bolliger_mabillard_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17227), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17230), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17233), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17224), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2805,17 +2802,17 @@ static void bolliger_mabillard_track_left_quarter_turn_3( } template -static void bolliger_mabillard_track_right_quarter_turn_3( +static void BolligerMabillardTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_left_quarter_turn_3( + BolligerMabillardTrackLeftQuarterTurn3( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_quarter_turn_3_bank( +static void BolligerMabillardTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2827,25 +2824,25 @@ static void bolliger_mabillard_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17241), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17248), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17244), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17247), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17238), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2866,22 +2863,22 @@ static void bolliger_mabillard_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17240), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17243), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17246), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17237), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2894,25 +2891,25 @@ static void bolliger_mabillard_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17239), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17242), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17245), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17249), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17236), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2933,17 +2930,17 @@ static void bolliger_mabillard_track_left_quarter_turn_3_bank( } template -static void bolliger_mabillard_track_right_quarter_turn_3_bank( +static void BolligerMabillardTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_left_quarter_turn_3_bank( + BolligerMabillardTrackLeftQuarterTurn3Bank( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_quarter_turn_3_25_deg_up( +static void BolligerMabillardTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3030,7 +3027,7 @@ static void bolliger_mabillard_track_left_quarter_turn_3_25_deg_up( } template -static void bolliger_mabillard_track_right_quarter_turn_3_25_deg_up( +static void BolligerMabillardTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3120,27 +3117,27 @@ static void bolliger_mabillard_track_right_quarter_turn_3_25_deg_up( } template -static void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down( +static void BolligerMabillardTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_right_quarter_turn_3_25_deg_up( + BolligerMabillardTrackRightQuarterTurn325DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down( +static void BolligerMabillardTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_left_quarter_turn_3_25_deg_up( + BolligerMabillardTrackLeftQuarterTurn325DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_half_banked_helix_up_small( +static void BolligerMabillardTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3152,25 +3149,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17399), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17406), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17402), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17405), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17396), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3192,22 +3189,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17398), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17401), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17404), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17395), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3220,25 +3217,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17397), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17400), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17403), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17407), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17394), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3262,25 +3259,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17396), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17399), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17406), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17402), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17405), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3307,22 +3304,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17395), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17398), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17401), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17404), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3335,25 +3332,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17394), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17397), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17400), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17403), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17407), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3370,7 +3367,7 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_small( } template -static void bolliger_mabillard_track_right_half_banked_helix_up_small( +static void BolligerMabillardTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3382,25 +3379,25 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17380), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17383), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17386), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17389), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17393), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3422,22 +3419,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17381), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17384), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17387), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17390), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3450,25 +3447,25 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17382), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17385), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17392), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17388), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17391), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3492,25 +3489,25 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17383), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17386), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17389), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17393), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17380), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3537,22 +3534,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17384), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17387), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17390), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17381), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3565,25 +3562,25 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17385), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17392), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17388), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17391), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17382), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3600,7 +3597,7 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_small( } template -static void bolliger_mabillard_track_left_half_banked_helix_down_small( +static void BolligerMabillardTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3610,12 +3607,12 @@ static void bolliger_mabillard_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_right_half_banked_helix_up_small( + BolligerMabillardTrackRightHalfBankedHelixUpSmall( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_half_banked_helix_down_small( +static void BolligerMabillardTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3625,12 +3622,12 @@ static void bolliger_mabillard_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_left_half_banked_helix_up_small( + BolligerMabillardTrackLeftHalfBankedHelixUpSmall( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_half_banked_helix_up_large( +static void BolligerMabillardTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3642,25 +3639,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17439), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17444), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17449), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17434), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3682,22 +3679,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17438), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17443), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17448), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17433), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3712,22 +3709,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17437), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17442), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17447), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17432), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3743,22 +3740,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17436), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17441), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17446), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17431), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3773,25 +3770,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17435), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17440), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17445), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17451), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17430), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3815,25 +3812,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17434), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17439), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17450), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17444), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17449), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3860,22 +3857,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17433), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17438), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17443), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17448), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3890,22 +3887,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17432), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17437), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17442), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17447), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3921,22 +3918,22 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17431), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17436), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17441), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17446), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3951,25 +3948,25 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17430), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17435), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17440), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17445), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17451), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3986,7 +3983,7 @@ static void bolliger_mabillard_track_left_half_banked_helix_up_large( } template -static void bolliger_mabillard_track_right_half_banked_helix_up_large( +static void BolligerMabillardTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3998,25 +3995,25 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17408), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17413), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17418), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17423), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17429), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4038,22 +4035,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17409), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17414), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17419), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17424), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4068,22 +4065,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17410), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17415), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17420), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17425), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4099,22 +4096,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17411), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17416), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17421), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17426), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4129,28 +4126,28 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17412), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17417), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17428), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17422), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17427), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4174,25 +4171,25 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17413), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17418), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17423), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17429), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17408), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4219,22 +4216,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17414), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17419), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17424), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17409), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4249,22 +4246,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17415), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17420), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17425), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17410), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4280,22 +4277,22 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17416), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17421), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17426), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17411), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4310,28 +4307,28 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17417), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17428), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17422), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17427), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17412), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4348,7 +4345,7 @@ static void bolliger_mabillard_track_right_half_banked_helix_up_large( } template -static void bolliger_mabillard_track_left_half_banked_helix_down_large( +static void BolligerMabillardTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4358,12 +4355,12 @@ static void bolliger_mabillard_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_right_half_banked_helix_up_large( + BolligerMabillardTrackRightHalfBankedHelixUpLarge( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_half_banked_helix_down_large( +static void BolligerMabillardTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4373,12 +4370,12 @@ static void bolliger_mabillard_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_left_half_banked_helix_up_large( + BolligerMabillardTrackLeftHalfBankedHelixUpLarge( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_quarter_turn_1_60_deg_up( +static void BolligerMabillardTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4386,44 +4383,44 @@ static void bolliger_mabillard_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17301), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17301), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17305), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17305), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17302), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17302), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17306), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17306), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17303), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17303), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17307), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17307), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17300), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17300), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17304), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17304), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } template -static void bolliger_mabillard_track_right_quarter_turn_1_60_deg_up( +static void BolligerMabillardTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4431,62 +4428,62 @@ static void bolliger_mabillard_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17292), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17292), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17296), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17296), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17293), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17293), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17297), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17297), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17294), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17294), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17298), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17298), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17295), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17295), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17299), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17299), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } template -static void bolliger_mabillard_track_left_quarter_turn_1_60_deg_down( +static void BolligerMabillardTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_quarter_turn_1_60_deg_up( + BolligerMabillardTrackRightQuarterTurn160DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_quarter_turn_1_60_deg_down( +static void BolligerMabillardTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_quarter_turn_1_60_deg_up( + BolligerMabillardTrackLeftQuarterTurn160DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_brakes( +static void BolligerMabillardTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4495,17 +4492,17 @@ static void bolliger_mabillard_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17148), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17148), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17149), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17149), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4516,7 +4513,7 @@ static void bolliger_mabillard_track_brakes( } template -static void bolliger_mabillard_track_25_deg_up_left_banked( +static void BolligerMabillardTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4524,26 +4521,26 @@ static void bolliger_mabillard_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17914), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17914), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17915), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17915), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17916), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17916), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17917), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17917), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4561,7 +4558,7 @@ static void bolliger_mabillard_track_25_deg_up_left_banked( } template -static void bolliger_mabillard_track_25_deg_up_right_banked( +static void BolligerMabillardTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4569,26 +4566,26 @@ static void bolliger_mabillard_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17918), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17918), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17919), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17919), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17920), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17920), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17921), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17921), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4606,7 +4603,7 @@ static void bolliger_mabillard_track_25_deg_up_right_banked( } template -static void bolliger_mabillard_track_on_ride_photo( +static void BolligerMabillardTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4618,8 +4615,8 @@ static void bolliger_mabillard_track_on_ride_photo( MetalASupportsPaintSetup(session, supportType, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, supportType, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4627,8 +4624,8 @@ static void bolliger_mabillard_track_on_ride_photo( MetalASupportsPaintSetup(session, supportType, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, supportType, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4636,8 +4633,8 @@ static void bolliger_mabillard_track_on_ride_photo( MetalASupportsPaintSetup(session, supportType, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, supportType, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4645,36 +4642,36 @@ static void bolliger_mabillard_track_on_ride_photo( MetalASupportsPaintSetup(session, supportType, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, supportType, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } template -static void bolliger_mabillard_track_25_deg_down_left_banked( +static void BolligerMabillardTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_right_banked( + BolligerMabillardTrack25DegUpRightBanked( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_down_right_banked( +static void BolligerMabillardTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_left_banked( + BolligerMabillardTrack25DegUpLeftBanked( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_90_deg_up( +static void BolligerMabillardTrack90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4686,22 +4683,22 @@ static void bolliger_mabillard_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17526), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17527), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17528), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17529), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -4715,15 +4712,15 @@ static void bolliger_mabillard_track_90_deg_up( } template -static void bolliger_mabillard_track_90_deg_down( +static void BolligerMabillardTrack90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_60_deg_up_to_90_deg_up( +static void BolligerMabillardTrack60DegUpTo90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4735,22 +4732,22 @@ static void bolliger_mabillard_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17518), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17519), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17520), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17521), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -4768,16 +4765,16 @@ static void bolliger_mabillard_track_60_deg_up_to_90_deg_up( } template -static void bolliger_mabillard_track_90_deg_down_to_60_deg_down( +static void BolligerMabillardTrack90DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_60_deg_up_to_90_deg_up( + BolligerMabillardTrack60DegUpTo90DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_90_deg_up_to_60_deg_up( +static void BolligerMabillardTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4785,23 +4782,23 @@ static void bolliger_mabillard_track_90_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17522), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17522), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17523), { 0, 0, height }, { 2, 20, 31 }, - { 24, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17523), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17524), { 0, 0, height }, { 2, 20, 31 }, - { 24, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17524), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17525), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17525), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } switch (direction) @@ -4819,7 +4816,7 @@ static void bolliger_mabillard_track_90_deg_up_to_60_deg_up( } template -static void bolliger_mabillard_track_60_deg_down_to_90_deg_down( +static void BolligerMabillardTrack60DegDownTo90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4831,22 +4828,22 @@ static void bolliger_mabillard_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17524), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17525), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17522), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17523), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; } if (direction == 0 || direction == 3) @@ -4863,7 +4860,7 @@ static void bolliger_mabillard_track_60_deg_down_to_90_deg_down( } template -static void bolliger_mabillard_track_left_eighth_to_diag( +static void BolligerMabillardTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4875,22 +4872,22 @@ static void bolliger_mabillard_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17546), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17550), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17554), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17558), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4908,22 +4905,22 @@ static void bolliger_mabillard_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17547), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17551), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17555), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17559), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4938,22 +4935,22 @@ static void bolliger_mabillard_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17548), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17552), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17556), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17560), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4972,25 +4969,25 @@ static void bolliger_mabillard_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17549), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17553), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup(session, supportType, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17557), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17561), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5004,7 +5001,7 @@ static void bolliger_mabillard_track_left_eighth_to_diag( } template -static void bolliger_mabillard_track_right_eighth_to_diag( +static void BolligerMabillardTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5016,22 +5013,22 @@ static void bolliger_mabillard_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17530), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17534), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17538), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17542), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5049,22 +5046,22 @@ static void bolliger_mabillard_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17531), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17535), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17539), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17543), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5079,22 +5076,22 @@ static void bolliger_mabillard_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17532), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17536), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17540), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17544), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5113,25 +5110,25 @@ static void bolliger_mabillard_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17533), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17537), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17541), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup(session, supportType, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17545), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5145,27 +5142,27 @@ static void bolliger_mabillard_track_right_eighth_to_diag( } template -static void bolliger_mabillard_track_left_eighth_to_orthogonal( +static void BolligerMabillardTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - bolliger_mabillard_track_right_eighth_to_diag( + BolligerMabillardTrackRightEighthToDiag( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_eighth_to_orthogonal( +static void BolligerMabillardTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - bolliger_mabillard_track_left_eighth_to_diag( + BolligerMabillardTrackLeftEighthToDiag( session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_eighth_bank_to_diag( +static void BolligerMabillardTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5177,22 +5174,22 @@ static void bolliger_mabillard_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17578), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17582), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17586), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17590), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5210,22 +5207,22 @@ static void bolliger_mabillard_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17579), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17583), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17587), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17591), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5240,22 +5237,22 @@ static void bolliger_mabillard_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17580), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17584), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17588), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17592), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5274,25 +5271,25 @@ static void bolliger_mabillard_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17581), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17585), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup(session, supportType, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17589), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17593), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5306,7 +5303,7 @@ static void bolliger_mabillard_track_left_eighth_bank_to_diag( } template -static void bolliger_mabillard_track_right_eighth_bank_to_diag( +static void BolligerMabillardTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5318,22 +5315,22 @@ static void bolliger_mabillard_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17562), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17566), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17570), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17574), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5351,22 +5348,22 @@ static void bolliger_mabillard_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17563), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17567), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17571), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17575), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5381,22 +5378,22 @@ static void bolliger_mabillard_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17564), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17568), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17572), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17576), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5415,25 +5412,25 @@ static void bolliger_mabillard_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17565), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17569), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17573), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup(session, supportType, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17577), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5447,27 +5444,27 @@ static void bolliger_mabillard_track_right_eighth_bank_to_diag( } template -static void bolliger_mabillard_track_left_eighth_bank_to_orthogonal( +static void BolligerMabillardTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - bolliger_mabillard_track_right_eighth_bank_to_diag( + BolligerMabillardTrackRightEighthBankToDiag( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_eighth_bank_to_orthogonal( +static void BolligerMabillardTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - bolliger_mabillard_track_left_eighth_bank_to_diag( + BolligerMabillardTrackLeftEighthBankToDiag( session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } template -static void bolliger_mabillard_track_diag_flat( +static void BolligerMabillardTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5481,7 +5478,7 @@ static void bolliger_mabillard_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17861), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5492,7 +5489,7 @@ static void bolliger_mabillard_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17791), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5508,7 +5505,7 @@ static void bolliger_mabillard_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17858), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5519,7 +5516,7 @@ static void bolliger_mabillard_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17788), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5535,7 +5532,7 @@ static void bolliger_mabillard_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17860), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5546,7 +5543,7 @@ static void bolliger_mabillard_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17790), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5565,7 +5562,7 @@ static void bolliger_mabillard_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17859), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5586,7 +5583,7 @@ static void bolliger_mabillard_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17789), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5605,7 +5602,7 @@ static void bolliger_mabillard_track_diag_flat( } template -static void bolliger_mabillard_track_diag_25_deg_up( +static void BolligerMabillardTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5619,7 +5616,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17873), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5630,7 +5627,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17803), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5646,7 +5643,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17870), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5657,7 +5654,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17800), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5673,7 +5670,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17872), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5684,7 +5681,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17802), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5703,7 +5700,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17871), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5724,7 +5721,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17801), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5743,7 +5740,7 @@ static void bolliger_mabillard_track_diag_25_deg_up( } template -static void bolliger_mabillard_track_diag_60_deg_up( +static void BolligerMabillardTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5757,7 +5754,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17885), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5768,7 +5765,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17815), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5784,7 +5781,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17882), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5795,7 +5792,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17812), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5811,7 +5808,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17884), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5822,7 +5819,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17814), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5841,7 +5838,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17883), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5862,7 +5859,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17813), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5881,7 +5878,7 @@ static void bolliger_mabillard_track_diag_60_deg_up( } template -static void bolliger_mabillard_track_diag_flat_to_25_deg_up( +static void BolligerMabillardTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5895,7 +5892,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17865), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5906,7 +5903,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17795), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5922,7 +5919,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17862), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5933,7 +5930,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17792), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5949,7 +5946,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17864), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5960,7 +5957,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17794), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5979,7 +5976,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17863), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6000,7 +5997,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17793), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6019,7 +6016,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_up( } template -static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( +static void BolligerMabillardTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6033,7 +6030,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17877), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6044,7 +6041,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17807), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6060,7 +6057,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17874), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6071,7 +6068,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17804), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6087,7 +6084,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17876), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6098,7 +6095,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17806), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6117,7 +6114,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17875), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6138,7 +6135,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17805), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6157,7 +6154,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up( } template -static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( +static void BolligerMabillardTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6171,7 +6168,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17881), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6182,7 +6179,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17811), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6198,7 +6195,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17878), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6209,7 +6206,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17808), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6225,7 +6222,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17880), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6236,7 +6233,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17810), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6255,7 +6252,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17879), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6276,7 +6273,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17809), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6295,7 +6292,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up( } template -static void bolliger_mabillard_track_diag_25_deg_up_to_flat( +static void BolligerMabillardTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6309,7 +6306,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17869), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6320,7 +6317,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17799), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6336,7 +6333,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17866), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6347,7 +6344,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17796), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6363,7 +6360,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17868), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6374,7 +6371,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17798), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6393,7 +6390,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17867), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6414,7 +6411,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17797), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6433,7 +6430,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_flat( } template -static void bolliger_mabillard_track_diag_25_deg_down( +static void BolligerMabillardTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6447,7 +6444,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17871), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6458,7 +6455,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17801), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6474,7 +6471,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17872), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6485,7 +6482,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17802), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6501,7 +6498,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17870), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6512,7 +6509,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17800), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6531,7 +6528,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17873), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6552,7 +6549,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17803), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6571,7 +6568,7 @@ static void bolliger_mabillard_track_diag_25_deg_down( } template -static void bolliger_mabillard_track_diag_60_deg_down( +static void BolligerMabillardTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6585,7 +6582,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17883), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6596,7 +6593,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17813), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6612,7 +6609,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17884), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6623,7 +6620,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17814), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6639,7 +6636,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17882), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6650,7 +6647,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17812), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6669,7 +6666,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17885), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6690,7 +6687,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17815), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6709,7 +6706,7 @@ static void bolliger_mabillard_track_diag_60_deg_down( } template -static void bolliger_mabillard_track_diag_flat_to_25_deg_down( +static void BolligerMabillardTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6723,7 +6720,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17867), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6734,7 +6731,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17797), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6749,7 +6746,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17868), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6760,7 +6757,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17798), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6775,7 +6772,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17866), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6786,7 +6783,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17796), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6804,7 +6801,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17869), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6825,7 +6822,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17799), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6845,7 +6842,7 @@ static void bolliger_mabillard_track_diag_flat_to_25_deg_down( } template -static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( +static void BolligerMabillardTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6859,7 +6856,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17879), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -6870,7 +6867,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17809), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -6886,7 +6883,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17880), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6897,7 +6894,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17810), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6913,7 +6910,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17878), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6924,7 +6921,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17808), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6943,7 +6940,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17881), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6964,7 +6961,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17811), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6983,7 +6980,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down( } template -static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( +static void BolligerMabillardTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6997,7 +6994,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17875), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7008,7 +7005,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17805), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7024,7 +7021,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17876), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7035,7 +7032,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17806), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7051,7 +7048,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17874), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7062,7 +7059,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17804), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7081,7 +7078,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17877), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7102,7 +7099,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17807), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7121,7 +7118,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down( } template -static void bolliger_mabillard_track_diag_25_deg_down_to_flat( +static void BolligerMabillardTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7135,7 +7132,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17863), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7146,7 +7143,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17793), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7162,7 +7159,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17864), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7173,7 +7170,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17794), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7189,7 +7186,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17862), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7200,7 +7197,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17792), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7219,7 +7216,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17865), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7240,7 +7237,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17795), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7259,7 +7256,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_flat( } template -static void bolliger_mabillard_track_diag_flat_to_60_deg_up( +static void BolligerMabillardTrackDiagFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7273,7 +7270,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17889), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7284,7 +7281,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17819), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7300,7 +7297,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17886), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7311,7 +7308,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17816), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7327,7 +7324,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17888), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7338,7 +7335,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17818), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7357,7 +7354,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17887), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7378,7 +7375,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17817), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7397,7 +7394,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_up( } template -static void bolliger_mabillard_track_diag_60_deg_up_to_flat( +static void BolligerMabillardTrackDiag60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7411,7 +7408,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17893), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7422,7 +7419,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17823), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7438,7 +7435,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17890), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7449,7 +7446,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17820), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7465,7 +7462,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17892), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7476,7 +7473,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17822), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7495,7 +7492,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17891), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7516,7 +7513,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17821), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7535,7 +7532,7 @@ static void bolliger_mabillard_track_diag_60_deg_up_to_flat( } template -static void bolliger_mabillard_track_diag_flat_to_60_deg_down( +static void BolligerMabillardTrackDiagFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7549,7 +7546,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17891), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7560,7 +7557,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17821), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7576,7 +7573,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17892), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7587,7 +7584,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17822), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7603,7 +7600,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17890), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7614,7 +7611,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17820), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7633,7 +7630,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17893), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7654,7 +7651,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17823), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7673,7 +7670,7 @@ static void bolliger_mabillard_track_diag_flat_to_60_deg_down( } template -static void bolliger_mabillard_track_diag_60_deg_down_to_flat( +static void BolligerMabillardTrackDiag60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7687,7 +7684,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17887), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7698,7 +7695,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17817), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7714,7 +7711,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17888), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7725,7 +7722,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17818), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7741,7 +7738,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17886), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7752,7 +7749,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17816), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -7771,7 +7768,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17889), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7792,7 +7789,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17819), { -16, -16, height }, - { 32, 32, 4 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup(session, supportType, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7811,7 +7808,7 @@ static void bolliger_mabillard_track_diag_60_deg_down_to_flat( } template -static void bolliger_mabillard_track_diag_flat_to_left_bank( +static void BolligerMabillardTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7823,7 +7820,7 @@ static void bolliger_mabillard_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17831), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7836,10 +7833,10 @@ static void bolliger_mabillard_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17828), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17832), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7852,7 +7849,7 @@ static void bolliger_mabillard_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17830), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7868,7 +7865,7 @@ static void bolliger_mabillard_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17829), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7886,7 +7883,7 @@ static void bolliger_mabillard_track_diag_flat_to_left_bank( } template -static void bolliger_mabillard_track_diag_flat_to_right_bank( +static void BolligerMabillardTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7898,7 +7895,7 @@ static void bolliger_mabillard_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17836), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7911,7 +7908,7 @@ static void bolliger_mabillard_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17833), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7924,10 +7921,10 @@ static void bolliger_mabillard_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17835), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17837), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7943,7 +7940,7 @@ static void bolliger_mabillard_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17834), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7961,7 +7958,7 @@ static void bolliger_mabillard_track_diag_flat_to_right_bank( } template -static void bolliger_mabillard_track_diag_left_bank_to_flat( +static void BolligerMabillardTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7973,7 +7970,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17834), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7986,10 +7983,10 @@ static void bolliger_mabillard_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17835), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17837), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8002,7 +7999,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17833), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8018,7 +8015,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17836), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8036,7 +8033,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_flat( } template -static void bolliger_mabillard_track_diag_right_bank_to_flat( +static void BolligerMabillardTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8048,7 +8045,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17829), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8061,7 +8058,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17830), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8074,10 +8071,10 @@ static void bolliger_mabillard_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17828), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17832), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8093,7 +8090,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17831), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8111,7 +8108,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_flat( } template -static void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( +static void BolligerMabillardTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8123,7 +8120,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17851), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8136,10 +8133,10 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17848), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17852), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8152,7 +8149,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17850), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8168,7 +8165,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17849), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8186,7 +8183,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_up( } template -static void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( +static void BolligerMabillardTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8198,7 +8195,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17856), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8211,7 +8208,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17853), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8224,10 +8221,10 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17855), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17857), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8243,7 +8240,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17854), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8261,7 +8258,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_up( } template -static void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( +static void BolligerMabillardTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8273,7 +8270,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17841), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8286,10 +8283,10 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17838), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17842), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8302,7 +8299,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17840), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8318,7 +8315,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17839), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8336,7 +8333,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_left_bank( } template -static void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( +static void BolligerMabillardTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8348,7 +8345,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17846), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8361,7 +8358,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17843), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8374,10 +8371,10 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17845), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17847), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8393,7 +8390,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17844), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8411,7 +8408,7 @@ static void bolliger_mabillard_track_diag_25_deg_up_to_right_bank( } template -static void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( +static void BolligerMabillardTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8423,7 +8420,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17844), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8435,10 +8432,10 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17845), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17847), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8450,7 +8447,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17843), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8465,7 +8462,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17846), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8484,7 +8481,7 @@ static void bolliger_mabillard_track_diag_left_bank_to_25_deg_down( } template -static void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( +static void BolligerMabillardTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8496,7 +8493,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17839), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8508,7 +8505,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17840), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8520,10 +8517,10 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17838), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17842), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8538,7 +8535,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17841), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8557,7 +8554,7 @@ static void bolliger_mabillard_track_diag_right_bank_to_25_deg_down( } template -static void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( +static void BolligerMabillardTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8569,7 +8566,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17854), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8582,10 +8579,10 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17855), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17857), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8598,7 +8595,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17853), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8614,7 +8611,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17856), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8632,7 +8629,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_left_bank( } template -static void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( +static void BolligerMabillardTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8644,7 +8641,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17849), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8657,7 +8654,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17850), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8670,10 +8667,10 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17848), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17852), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8689,7 +8686,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17851), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8707,7 +8704,7 @@ static void bolliger_mabillard_track_diag_25_deg_down_to_right_bank( } template -static void bolliger_mabillard_track_diag_left_bank( +static void BolligerMabillardTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8719,7 +8716,7 @@ static void bolliger_mabillard_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17827), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8732,7 +8729,7 @@ static void bolliger_mabillard_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17824), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8745,7 +8742,7 @@ static void bolliger_mabillard_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17826), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8761,7 +8758,7 @@ static void bolliger_mabillard_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17825), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8779,7 +8776,7 @@ static void bolliger_mabillard_track_diag_left_bank( } template -static void bolliger_mabillard_track_diag_right_bank( +static void BolligerMabillardTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8791,7 +8788,7 @@ static void bolliger_mabillard_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17825), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8804,7 +8801,7 @@ static void bolliger_mabillard_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17826), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8817,7 +8814,7 @@ static void bolliger_mabillard_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17824), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8833,7 +8830,7 @@ static void bolliger_mabillard_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17827), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup(session, supportType, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8851,7 +8848,7 @@ static void bolliger_mabillard_track_diag_right_bank( } template -static void bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up( +static void BolligerMabillardTrackLeftBankToLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8871,7 +8868,7 @@ static void bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up( { 32, 20, 3 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17731), { 0, 6, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -8941,7 +8938,7 @@ static void bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up( } template -static void bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up( +static void BolligerMabillardTrackRightBankToRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8966,7 +8963,7 @@ static void bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_u { 32, 20, 3 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17730), { 0, 6, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -9034,7 +9031,7 @@ static void bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_u } template -static void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank( +static void BolligerMabillardTrackLeftQuarterTurn325DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9096,7 +9093,7 @@ static void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_ban { 20, 32, 3 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17730), { 6, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -9127,7 +9124,7 @@ static void bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_ban } template -static void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank( +static void BolligerMabillardTrackRightQuarterTurn325DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9191,7 +9188,7 @@ static void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_b { 20, 32, 3 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17731), { 6, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -9217,11 +9214,11 @@ static void bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_b } template -static void bolliger_mabillard_track_block_brakes( +static void BolligerMabillardTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); switch (direction) { case 0: @@ -9229,17 +9226,17 @@ static void bolliger_mabillard_track_block_brakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_BolligerMabillardBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_BolligerMabillardBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9250,7 +9247,7 @@ static void bolliger_mabillard_track_block_brakes( } template -static void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( +static void BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9267,7 +9264,7 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18027), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( @@ -9306,12 +9303,12 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18026), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18028), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -9337,7 +9334,7 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( } template -static void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( +static void BolligerMabillardTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9359,7 +9356,7 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18018), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -9394,13 +9391,13 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18017), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18019), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup(session, supportType, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9427,27 +9424,27 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( } template -static void bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down( +static void BolligerMabillardTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up( + BolligerMabillardTrackRightBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down( +static void BolligerMabillardTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up( + BolligerMabillardTrackLeftBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( +static void BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9459,22 +9456,22 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17978), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17983), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17988), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17993), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9499,18 +9496,18 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17984), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17984), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17989), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17994), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9525,17 +9522,17 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17980), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17985), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17985), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17990), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -9556,22 +9553,22 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17981), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17986), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17986), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17991), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17996), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9586,22 +9583,22 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17982), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17987), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17992), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17997), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9622,7 +9619,7 @@ static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( } template -static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( +static void BolligerMabillardTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9634,22 +9631,22 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17958), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17963), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17968), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17973), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9670,17 +9667,17 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17959), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17964), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17969), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17969), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -9705,17 +9702,17 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17965), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17970), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17970), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17975), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9731,22 +9728,22 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17961), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17966), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17971), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17971), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17976), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9761,22 +9758,22 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17962), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17967), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17972), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17977), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9797,27 +9794,27 @@ static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( } template -static void bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down( +static void BolligerMabillardTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up( + BolligerMabillardTrackRightBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down( +static void BolligerMabillardTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up( + BolligerMabillardTrackLeftBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( +static void BolligerMabillardTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9825,29 +9822,29 @@ static void bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17922), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17922), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17923), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17923), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17930), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17930), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17924), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17924), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17925), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17925), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9865,7 +9862,7 @@ static void bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( } template -static void bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( +static void BolligerMabillardTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9873,29 +9870,29 @@ static void bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17926), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17926), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17927), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17927), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17928), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17928), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17931), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17931), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17929), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17929), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9913,7 +9910,7 @@ static void bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( } template -static void bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( +static void BolligerMabillardTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9921,29 +9918,29 @@ static void bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17932), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17932), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17933), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17933), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17940), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17940), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17934), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17934), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17935), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17935), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9961,7 +9958,7 @@ static void bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( } template -static void bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( +static void BolligerMabillardTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9969,29 +9966,29 @@ static void bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17936), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17936), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17937), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17937), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17938), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17938), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17941), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17941), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17939), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17939), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10009,43 +10006,43 @@ static void bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( } template -static void bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down( +static void BolligerMabillardTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up( + BolligerMabillardTrackRightBanked25DegUpTo25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down( +static void BolligerMabillardTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up( + BolligerMabillardTrackLeftBanked25DegUpTo25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down( +static void BolligerMabillardTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up( + BolligerMabillardTrack25DegUpToRightBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down( +static void BolligerMabillardTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up( + BolligerMabillardTrack25DegUpToLeftBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( +static void BolligerMabillardTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10053,26 +10050,26 @@ static void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17942), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17942), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17943), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17943), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17944), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17944), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17945), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17945), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10090,7 +10087,7 @@ static void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( } template -static void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up( +static void BolligerMabillardTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10098,26 +10095,26 @@ static void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17946), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17946), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17947), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17947), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17948), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17948), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17949), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17949), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10135,7 +10132,7 @@ static void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up } template -static void bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( +static void BolligerMabillardTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10143,26 +10140,26 @@ static void bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17950), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17950), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17951), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17951), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17952), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17952), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17953), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17953), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10180,7 +10177,7 @@ static void bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( } template -static void bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat( +static void BolligerMabillardTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10188,26 +10185,26 @@ static void bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17954), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17954), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17955), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17955), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17956), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17956), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17957), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17957), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10225,43 +10222,43 @@ static void bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat } template -static void bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down( +static void BolligerMabillardTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat( + BolligerMabillardTrackRightBanked25DegUpToRightBankedFlat( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down( +static void BolligerMabillardTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat( + BolligerMabillardTrackLeftBanked25DegUpToLeftBankedFlat( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat( +static void BolligerMabillardTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up( + BolligerMabillardTrackRightBankedFlatToRightBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat( +static void BolligerMabillardTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up( + BolligerMabillardTrackLeftBankedFlatToLeftBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_flat_to_left_banked_25_deg_up( +static void BolligerMabillardTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10269,29 +10266,29 @@ static void bolliger_mabillard_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17894), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17894), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17895), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17895), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17902), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17902), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17896), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17896), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17897), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17897), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10309,7 +10306,7 @@ static void bolliger_mabillard_track_flat_to_left_banked_25_deg_up( } template -static void bolliger_mabillard_track_flat_to_right_banked_25_deg_up( +static void BolligerMabillardTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10317,29 +10314,29 @@ static void bolliger_mabillard_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17898), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17898), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17899), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17899), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17900), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17900), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17903), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17903), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17901), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17901), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10357,7 +10354,7 @@ static void bolliger_mabillard_track_flat_to_right_banked_25_deg_up( } template -static void bolliger_mabillard_track_left_banked_25_deg_up_to_flat( +static void BolligerMabillardTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10365,29 +10362,29 @@ static void bolliger_mabillard_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17904), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17904), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17905), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17905), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17912), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17912), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17906), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17906), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17907), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17907), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10405,7 +10402,7 @@ static void bolliger_mabillard_track_left_banked_25_deg_up_to_flat( } template -static void bolliger_mabillard_track_right_banked_25_deg_up_to_flat( +static void BolligerMabillardTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10413,29 +10410,29 @@ static void bolliger_mabillard_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17908), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17908), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17909), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17909), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17910), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17910), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17913), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17913), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17911), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17911), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10453,43 +10450,43 @@ static void bolliger_mabillard_track_right_banked_25_deg_up_to_flat( } template -static void bolliger_mabillard_track_flat_to_left_banked_25_deg_down( +static void BolligerMabillardTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_banked_25_deg_up_to_flat( + BolligerMabillardTrackRightBanked25DegUpToFlat( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_flat_to_right_banked_25_deg_down( +static void BolligerMabillardTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_banked_25_deg_up_to_flat( + BolligerMabillardTrackLeftBanked25DegUpToFlat( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_banked_25_deg_down_to_flat( +static void BolligerMabillardTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_flat_to_right_banked_25_deg_up( + BolligerMabillardTrackFlatToRightBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_banked_25_deg_down_to_flat( +static void BolligerMabillardTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_flat_to_left_banked_25_deg_up( + BolligerMabillardTrackFlatToLeftBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( +static void BolligerMabillardTrackLeftQuarterTurn190DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10501,28 +10498,28 @@ static void bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17998), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17999), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18007), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18008), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18001), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18009), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -10536,7 +10533,7 @@ static void bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( } template -static void bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( +static void BolligerMabillardTrackRightQuarterTurn190DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10548,28 +10545,28 @@ static void bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18002), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18010), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18011), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18004), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18012), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18005), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -10583,26 +10580,26 @@ static void bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( } template -static void bolliger_mabillard_track_left_quarter_turn_1_90_deg_down( +static void BolligerMabillardTrackLeftQuarterTurn190DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_quarter_turn_1_90_deg_up( + BolligerMabillardTrackRightQuarterTurn190DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_quarter_turn_1_90_deg_down( +static void BolligerMabillardTrackRightQuarterTurn190DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_quarter_turn_1_90_deg_up( + BolligerMabillardTrackLeftQuarterTurn190DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /* The following track elements used to be specific to the Vertical Roller Coaster */ template -static void bolliger_mabillard_track_flat_to_60_deg_up( +static void BolligerMabillardTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10612,29 +10609,29 @@ static void bolliger_mabillard_track_flat_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17464), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17464), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17465), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17465), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17468), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17468), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17466), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17466), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17469), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17469), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17467), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17467), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10645,29 +10642,29 @@ static void bolliger_mabillard_track_flat_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17452), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17452), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17453), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17453), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17456), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17456), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17454), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17454), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17457), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17457), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17455), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17455), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10686,7 +10683,7 @@ static void bolliger_mabillard_track_flat_to_60_deg_up( } template -static void bolliger_mabillard_track_60_deg_up_to_flat( +static void BolligerMabillardTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10696,29 +10693,29 @@ static void bolliger_mabillard_track_60_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17470), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17470), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17471), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17471), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17474), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17474), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17472), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17472), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17475), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17475), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17473), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17473), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10729,29 +10726,29 @@ static void bolliger_mabillard_track_60_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17458), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17458), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17459), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17459), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17462), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17462), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17460), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17460), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17463), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17463), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17461), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17461), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10770,25 +10767,23 @@ static void bolliger_mabillard_track_60_deg_up_to_flat( } template -static void bolliger_mabillard_track_flat_to_60_deg_down( +static void BolligerMabillardTrackFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_60_deg_up_to_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_60_deg_down_to_flat( +static void BolligerMabillardTrack60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_flat_to_60_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + BolligerMabillardTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_brake_for_drop( +static void BolligerMabillardTrackBrakeForDrop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10796,29 +10791,29 @@ static void bolliger_mabillard_track_brake_for_drop( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17482), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17482), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17485), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17485), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17483), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17483), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17480), { 0, 0, height }, { 32, 27, 4 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17480), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 4 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17481), { 0, 0, height }, { 1, 24, 43 }, - { 29, 4, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17481), { 0, 0, height }, + { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17484), { 0, 0, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17484), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10837,7 +10832,7 @@ static void bolliger_mabillard_track_brake_for_drop( /* The following track elements used to be specific to the Steel Twister */ template -static void bolliger_mabillard_track_half_loop_up( +static void BolligerMabillardTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10882,19 +10877,19 @@ static void bolliger_mabillard_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17627), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, supportType, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17635), { 0, 14, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup(session, supportType, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17632), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup(session, supportType, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10918,7 +10913,7 @@ static void bolliger_mabillard_track_half_loop_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17636), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -10928,7 +10923,7 @@ static void bolliger_mabillard_track_half_loop_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17639), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10973,15 +10968,15 @@ static void bolliger_mabillard_track_half_loop_up( } template -static void bolliger_mabillard_track_half_loop_down( +static void BolligerMabillardTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_half_loop_up(session, ride, 3 - trackSequence, direction, height, trackElement); + BolligerMabillardTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } template -static void bolliger_mabillard_track_left_corkscrew_up( +static void BolligerMabillardTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10993,26 +10988,26 @@ static void bolliger_mabillard_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17690), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17693), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17696), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17699), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - track_paint_util_left_corkscrew_up_supports(session, direction, height); + TrackPaintUtilLeftCorkscrewUpSupports(session, direction, height); if (direction == 0 || direction == 3) { @@ -11026,22 +11021,22 @@ static void bolliger_mabillard_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17691), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17694), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17697), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17700), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11053,22 +11048,22 @@ static void bolliger_mabillard_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17692), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17695), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17698), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17701), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -11092,7 +11087,7 @@ static void bolliger_mabillard_track_left_corkscrew_up( } template -static void bolliger_mabillard_track_right_corkscrew_up( +static void BolligerMabillardTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11104,22 +11099,22 @@ static void bolliger_mabillard_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17702), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17705), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17708), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17711), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -11138,22 +11133,22 @@ static void bolliger_mabillard_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17703), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17706), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17709), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17712), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11165,22 +11160,22 @@ static void bolliger_mabillard_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17704), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17707), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17710), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17713), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -11204,25 +11199,25 @@ static void bolliger_mabillard_track_right_corkscrew_up( } template -static void bolliger_mabillard_track_left_corkscrew_down( +static void BolligerMabillardTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_corkscrew_up( + BolligerMabillardTrackRightCorkscrewUp( session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_corkscrew_down( +static void BolligerMabillardTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_corkscrew_up( + BolligerMabillardTrackLeftCorkscrewUp( session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } template -static void bolliger_mabillard_track_flat_to_60_deg_up_long_base( +static void BolligerMabillardTrackFlatTo60DegUpLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11234,25 +11229,25 @@ static void bolliger_mabillard_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18030), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18034), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18038), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18042), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11270,25 +11265,25 @@ static void bolliger_mabillard_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18031), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18035), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18039), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18043), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11302,25 +11297,25 @@ static void bolliger_mabillard_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18032), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18036), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18040), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18044), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11334,25 +11329,25 @@ static void bolliger_mabillard_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18033), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18037), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18041), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18045), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11374,7 +11369,7 @@ static void bolliger_mabillard_track_flat_to_60_deg_up_long_base( /** rct2: 0x008AC104 */ template -static void bolliger_mabillard_track_60_deg_up_to_flat_long_base( +static void BolligerMabillardTrack60DegUpToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11386,25 +11381,25 @@ static void bolliger_mabillard_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18046), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18050), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18054), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18058), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11422,25 +11417,25 @@ static void bolliger_mabillard_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18047), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18051), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18055), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18059), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11454,25 +11449,25 @@ static void bolliger_mabillard_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18048), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18052), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18056), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18060), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11486,25 +11481,25 @@ static void bolliger_mabillard_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18049), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18053), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18057), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18061), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -11525,25 +11520,25 @@ static void bolliger_mabillard_track_60_deg_up_to_flat_long_base( } template -static void bolliger_mabillard_track_60_deg_down_to_flat_long_base( +static void BolligerMabillardTrack60DegDownToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_flat_to_60_deg_up_long_base( + BolligerMabillardTrackFlatTo60DegUpLongBase( session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_flat_to_60_deg_down_long_base( +static void BolligerMabillardTrackFlatTo60DegDownLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_60_deg_up_to_flat_long_base( + BolligerMabillardTrack60DegUpToFlatLongBase( session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_left_barrel_roll_up_to_down( +static void BolligerMabillardTrackLeftBarrelRollUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11555,37 +11550,37 @@ static void bolliger_mabillard_track_left_barrel_roll_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17642), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17666), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 2, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17645), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17669), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 3, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17648), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17672), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17651), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17675), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 0, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -11604,34 +11599,34 @@ static void bolliger_mabillard_track_left_barrel_roll_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17643), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17667), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17646), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17670), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17649), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17673), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17652), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17676), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11646,34 +11641,34 @@ static void bolliger_mabillard_track_left_barrel_roll_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17644), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17668), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17647), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17671), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17650), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17674), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17653), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17677), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -11694,7 +11689,7 @@ static void bolliger_mabillard_track_left_barrel_roll_up_to_down( } template -static void bolliger_mabillard_track_right_barrel_roll_up_to_down( +static void BolligerMabillardTrackRightBarrelRollUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11706,37 +11701,37 @@ static void bolliger_mabillard_track_right_barrel_roll_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17654), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17678), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 0, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17657), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17681), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 2, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17660), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17684), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 3, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17663), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17687), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup(session, supportType, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -11755,34 +11750,34 @@ static void bolliger_mabillard_track_right_barrel_roll_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17655), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17679), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17658), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17682), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17661), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17685), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17664), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17688), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11797,34 +11792,34 @@ static void bolliger_mabillard_track_right_barrel_roll_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17656), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17680), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17659), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17683), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17662), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17686), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17665), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17689), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -11845,25 +11840,25 @@ static void bolliger_mabillard_track_right_barrel_roll_up_to_down( } template -static void bolliger_mabillard_track_left_barrel_roll_down_to_up( +static void BolligerMabillardTrackLeftBarrelRollDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_barrel_roll_up_to_down( + BolligerMabillardTrackLeftBarrelRollUpToDown( session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_right_barrel_roll_down_to_up( +static void BolligerMabillardTrackRightBarrelRollDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_barrel_roll_up_to_down( + BolligerMabillardTrackRightBarrelRollUpToDown( session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } template -static void bolliger_mabillard_track_powered_lift( +static void BolligerMabillardTrackPoweredLift( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11871,23 +11866,23 @@ static void bolliger_mabillard_track_powered_lift( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17476), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17476), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17477), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17477), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17478), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17478), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17479), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17479), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -11905,7 +11900,7 @@ static void bolliger_mabillard_track_powered_lift( } template -static void bolliger_mabillard_track_left_large_half_loop_up( +static void BolligerMabillardTrackLeftLargeHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11917,22 +11912,22 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17732), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17739), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17746), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17753), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -11950,22 +11945,22 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17733), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17740), { 0, 0, height }, - { 32, 20, 9 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 9 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17747), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17754), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -11979,22 +11974,22 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17734), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17741), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 70 }); + { { 0, 0, height + 70 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17748), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 70 }); + { { 0, 16, height + 70 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17755), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12009,25 +12004,25 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17735), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 5, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17742), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 200 }); + { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup(session, supportType, 6, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17749), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 200 }); + { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup(session, supportType, 8, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17756), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 7, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12043,22 +12038,22 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17736), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17743), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 110 }); + { { 0, 16, height + 110 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17750), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 100 }); + { { 0, 0, height + 100 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17757), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12071,22 +12066,22 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17737), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17744), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 200 }); + { { 0, 16, height + 200 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17751), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 200 }); + { { 0, 0, height + 200 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17758), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12101,22 +12096,22 @@ static void bolliger_mabillard_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17738), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17745), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17752), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17759), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; } if (direction == 0 || direction == 3) @@ -12133,7 +12128,7 @@ static void bolliger_mabillard_track_left_large_half_loop_up( } template -static void bolliger_mabillard_track_right_large_half_loop_up( +static void BolligerMabillardTrackRightLargeHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12145,22 +12140,22 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17781), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17774), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17767), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17760), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -12178,22 +12173,22 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17782), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17775), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17768), { 0, 0, height }, - { 32, 20, 9 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 9 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17761), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -12207,22 +12202,22 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17783), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17776), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 70 }); + { { 0, 16, height + 70 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17769), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 70 }); + { { 0, 0, height + 70 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17762), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12237,25 +12232,25 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17784), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 8, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17777), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 200 }); + { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup(session, supportType, 7, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17770), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 200 }); + { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup(session, supportType, 5, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17763), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup(session, supportType, 6, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12271,22 +12266,22 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17785), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17778), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 100 }); + { { 0, 0, height + 100 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17771), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 110 }); + { { 0, 16, height + 110 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17764), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12299,22 +12294,22 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17786), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17779), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 200 }); + { { 0, 0, height + 200 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17772), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 200 }); + { { 0, 16, height + 200 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17765), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12329,22 +12324,22 @@ static void bolliger_mabillard_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17787), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17780), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17773), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17766), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; } if (direction == 0 || direction == 3) @@ -12361,25 +12356,23 @@ static void bolliger_mabillard_track_right_large_half_loop_up( } template -static void bolliger_mabillard_track_right_large_half_loop_down( +static void BolligerMabillardTrackRightLargeHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_right_large_half_loop_up( - session, ride, 6 - trackSequence, direction, height, trackElement); + BolligerMabillardTrackRightLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } template -static void bolliger_mabillard_track_left_large_half_loop_down( +static void BolligerMabillardTrackLeftLargeHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_left_large_half_loop_up( - session, ride, 6 - trackSequence, direction, height, trackElement); + BolligerMabillardTrackLeftLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } template -static void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( +static void BolligerMabillardTrack90DegToInvertedFlatQuarterLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12391,22 +12384,22 @@ static void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18062), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18065), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18068), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18071), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12419,22 +12412,22 @@ static void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18063), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18066), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18069), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18072), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12447,22 +12440,22 @@ static void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18064), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18067), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18070), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18073), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12477,16 +12470,16 @@ static void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( } template -static void bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down( +static void BolligerMabillardTrackInvertedFlatTo90DegQuarterLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up( + BolligerMabillardTrack90DegToInvertedFlatQuarterLoopUp( session, ride, 2 - trackSequence, direction, height, trackElement); } template -void bolliger_mabillard_track_booster( +void BolligerMabillardTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12502,16 +12495,16 @@ void bolliger_mabillard_track_booster( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_BM_BOOSTER_NE_SW), - { ne_sw_offsetX, ne_sw_offsetY, height }, { 32, 20, 3 }, { 0, 6, height }); + { ne_sw_offsetX, ne_sw_offsetY, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_BM_BOOSTER_NW_SE), - { nw_se_offsetX, nw_se_offsetY, height }, { 32, 20, 3 }, { 0, 6, height }); + { nw_se_offsetX, nw_se_offsetY, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -12522,7 +12515,7 @@ void bolliger_mabillard_track_booster( } template -static void bolliger_mabillard_track_left_twist_down_to_up( +static void BolligerMabillardTrackLeftTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12534,22 +12527,22 @@ static void bolliger_mabillard_track_left_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27430), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27436), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27429), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27435), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height - 5, session.TrackColours[SCHEME_SUPPORTS]); @@ -12638,7 +12631,7 @@ static void bolliger_mabillard_track_left_twist_down_to_up( } template -static void bolliger_mabillard_track_right_twist_down_to_up( +static void BolligerMabillardTrackRightTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12650,22 +12643,22 @@ static void bolliger_mabillard_track_right_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27442), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27448), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27441), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27447), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height - 5, session.TrackColours[SCHEME_SUPPORTS]); @@ -12754,7 +12747,7 @@ static void bolliger_mabillard_track_right_twist_down_to_up( } template -static void bolliger_mabillard_track_left_twist_up_to_down( +static void BolligerMabillardTrackLeftTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12832,22 +12825,22 @@ static void bolliger_mabillard_track_left_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27429), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27435), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27430), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27436), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height - 5, session.TrackColours[SCHEME_SUPPORTS]); @@ -12870,7 +12863,7 @@ static void bolliger_mabillard_track_left_twist_up_to_down( } template -static void bolliger_mabillard_track_right_twist_up_to_down( +static void BolligerMabillardTrackRightTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12948,22 +12941,22 @@ static void bolliger_mabillard_track_right_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27441), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27447), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27442), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27448), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 0, height + 6 }); + { { 0, 0, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, supportType, 4, 0, height - 5, session.TrackColours[SCHEME_SUPPORTS]); @@ -12985,381 +12978,381 @@ static void bolliger_mabillard_track_right_twist_up_to_down( } } -template TRACK_PAINT_FUNCTION get_track_paint_function_bolliger_mabillard(int32_t trackType) +template TRACK_PAINT_FUNCTION GetTrackPaintFunctionBolligerMabillard(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return bolliger_mabillard_track_flat; + return BolligerMabillardTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return bolliger_mabillard_track_station; + return BolligerMabillardTrackStation; case TrackElemType::Up25: - return bolliger_mabillard_track_25_deg_up; + return BolligerMabillardTrack25DegUp; case TrackElemType::Up60: - return bolliger_mabillard_track_60_deg_up; + return BolligerMabillardTrack60DegUp; case TrackElemType::FlatToUp25: - return bolliger_mabillard_track_flat_to_25_deg_up; + return BolligerMabillardTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return bolliger_mabillard_track_25_deg_up_to_60_deg_up; + return BolligerMabillardTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return bolliger_mabillard_track_60_deg_up_to_25_deg_up; + return BolligerMabillardTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return bolliger_mabillard_track_25_deg_up_to_flat; + return BolligerMabillardTrack25DegUpToFlat; case TrackElemType::Down25: - return bolliger_mabillard_track_25_deg_down; + return BolligerMabillardTrack25DegDown; case TrackElemType::Down60: - return bolliger_mabillard_track_60_deg_down; + return BolligerMabillardTrack60DegDown; case TrackElemType::FlatToDown25: - return bolliger_mabillard_track_flat_to_25_deg_down; + return BolligerMabillardTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return bolliger_mabillard_track_25_deg_down_to_60_deg_down; + return BolligerMabillardTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return bolliger_mabillard_track_60_deg_down_to_25_deg_down; + return BolligerMabillardTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return bolliger_mabillard_track_25_deg_down_to_flat; + return BolligerMabillardTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return bolliger_mabillard_track_left_quarter_turn_5; + return BolligerMabillardTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return bolliger_mabillard_track_right_quarter_turn_5; + return BolligerMabillardTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return bolliger_mabillard_track_flat_to_left_bank; + return BolligerMabillardTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return bolliger_mabillard_track_flat_to_right_bank; + return BolligerMabillardTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return bolliger_mabillard_track_left_bank_to_flat; + return BolligerMabillardTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return bolliger_mabillard_track_right_bank_to_flat; + return BolligerMabillardTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return bolliger_mabillard_track_banked_left_quarter_turn_5; + return BolligerMabillardTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return bolliger_mabillard_track_banked_right_quarter_turn_5; + return BolligerMabillardTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return bolliger_mabillard_track_left_bank_to_25_deg_up; + return BolligerMabillardTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return bolliger_mabillard_track_right_bank_to_25_deg_up; + return BolligerMabillardTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return bolliger_mabillard_track_25_deg_up_to_left_bank; + return BolligerMabillardTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return bolliger_mabillard_track_25_deg_up_to_right_bank; + return BolligerMabillardTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return bolliger_mabillard_track_left_bank_to_25_deg_down; + return BolligerMabillardTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return bolliger_mabillard_track_right_bank_to_25_deg_down; + return BolligerMabillardTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return bolliger_mabillard_track_25_deg_down_to_left_bank; + return BolligerMabillardTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return bolliger_mabillard_track_25_deg_down_to_right_bank; + return BolligerMabillardTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return bolliger_mabillard_track_left_bank; + return BolligerMabillardTrackLeftBank; case TrackElemType::RightBank: - return bolliger_mabillard_track_right_bank; + return BolligerMabillardTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return bolliger_mabillard_track_left_quarter_turn_5_25_deg_up; + return BolligerMabillardTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return bolliger_mabillard_track_right_quarter_turn_5_25_deg_up; + return BolligerMabillardTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return bolliger_mabillard_track_left_quarter_turn_5_25_deg_down; + return BolligerMabillardTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return bolliger_mabillard_track_right_quarter_turn_5_25_deg_down; + return BolligerMabillardTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return bolliger_mabillard_track_s_bend_left; + return BolligerMabillardTrackSBendLeft; case TrackElemType::SBendRight: - return bolliger_mabillard_track_s_bend_right; + return BolligerMabillardTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return bolliger_mabillard_track_left_vertical_loop; + return BolligerMabillardTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return bolliger_mabillard_track_right_vertical_loop; + return BolligerMabillardTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return bolliger_mabillard_track_left_quarter_turn_3; + return BolligerMabillardTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return bolliger_mabillard_track_right_quarter_turn_3; + return BolligerMabillardTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return bolliger_mabillard_track_left_quarter_turn_3_bank; + return BolligerMabillardTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return bolliger_mabillard_track_right_quarter_turn_3_bank; + return BolligerMabillardTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return bolliger_mabillard_track_left_quarter_turn_3_25_deg_up; + return BolligerMabillardTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return bolliger_mabillard_track_right_quarter_turn_3_25_deg_up; + return BolligerMabillardTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return bolliger_mabillard_track_left_quarter_turn_3_25_deg_down; + return BolligerMabillardTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return bolliger_mabillard_track_right_quarter_turn_3_25_deg_down; + return BolligerMabillardTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return bolliger_mabillard_track_left_half_banked_helix_up_small; + return BolligerMabillardTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return bolliger_mabillard_track_right_half_banked_helix_up_small; + return BolligerMabillardTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return bolliger_mabillard_track_left_half_banked_helix_down_small; + return BolligerMabillardTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return bolliger_mabillard_track_right_half_banked_helix_down_small; + return BolligerMabillardTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return bolliger_mabillard_track_left_half_banked_helix_up_large; + return BolligerMabillardTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return bolliger_mabillard_track_right_half_banked_helix_up_large; + return BolligerMabillardTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return bolliger_mabillard_track_left_half_banked_helix_down_large; + return BolligerMabillardTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return bolliger_mabillard_track_right_half_banked_helix_down_large; + return BolligerMabillardTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return bolliger_mabillard_track_left_quarter_turn_1_60_deg_up; + return BolligerMabillardTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return bolliger_mabillard_track_right_quarter_turn_1_60_deg_up; + return BolligerMabillardTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return bolliger_mabillard_track_left_quarter_turn_1_60_deg_down; + return BolligerMabillardTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return bolliger_mabillard_track_right_quarter_turn_1_60_deg_down; + return BolligerMabillardTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return bolliger_mabillard_track_brakes; + return BolligerMabillardTrackBrakes; case TrackElemType::Up25LeftBanked: - return bolliger_mabillard_track_25_deg_up_left_banked; + return BolligerMabillardTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return bolliger_mabillard_track_25_deg_up_right_banked; + return BolligerMabillardTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return bolliger_mabillard_track_on_ride_photo; + return BolligerMabillardTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return bolliger_mabillard_track_25_deg_down_left_banked; + return BolligerMabillardTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return bolliger_mabillard_track_25_deg_down_right_banked; + return BolligerMabillardTrack25DegDownRightBanked; case TrackElemType::Up90: - return bolliger_mabillard_track_90_deg_up; + return BolligerMabillardTrack90DegUp; case TrackElemType::Down90: - return bolliger_mabillard_track_90_deg_down; + return BolligerMabillardTrack90DegDown; case TrackElemType::Up60ToUp90: - return bolliger_mabillard_track_60_deg_up_to_90_deg_up; + return BolligerMabillardTrack60DegUpTo90DegUp; case TrackElemType::Down90ToDown60: - return bolliger_mabillard_track_90_deg_down_to_60_deg_down; + return BolligerMabillardTrack90DegDownTo60DegDown; case TrackElemType::Up90ToUp60: - return bolliger_mabillard_track_90_deg_up_to_60_deg_up; + return BolligerMabillardTrack90DegUpTo60DegUp; case TrackElemType::Down60ToDown90: - return bolliger_mabillard_track_60_deg_down_to_90_deg_down; + return BolligerMabillardTrack60DegDownTo90DegDown; case TrackElemType::LeftEighthToDiag: - return bolliger_mabillard_track_left_eighth_to_diag; + return BolligerMabillardTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return bolliger_mabillard_track_right_eighth_to_diag; + return BolligerMabillardTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return bolliger_mabillard_track_left_eighth_to_orthogonal; + return BolligerMabillardTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return bolliger_mabillard_track_right_eighth_to_orthogonal; + return BolligerMabillardTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return bolliger_mabillard_track_left_eighth_bank_to_diag; + return BolligerMabillardTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return bolliger_mabillard_track_right_eighth_bank_to_diag; + return BolligerMabillardTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return bolliger_mabillard_track_left_eighth_bank_to_orthogonal; + return BolligerMabillardTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return bolliger_mabillard_track_right_eighth_bank_to_orthogonal; + return BolligerMabillardTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return bolliger_mabillard_track_diag_flat; + return BolligerMabillardTrackDiagFlat; case TrackElemType::DiagUp25: - return bolliger_mabillard_track_diag_25_deg_up; + return BolligerMabillardTrackDiag25DegUp; case TrackElemType::DiagUp60: - return bolliger_mabillard_track_diag_60_deg_up; + return BolligerMabillardTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return bolliger_mabillard_track_diag_flat_to_25_deg_up; + return BolligerMabillardTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return bolliger_mabillard_track_diag_25_deg_up_to_60_deg_up; + return BolligerMabillardTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return bolliger_mabillard_track_diag_60_deg_up_to_25_deg_up; + return BolligerMabillardTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return bolliger_mabillard_track_diag_25_deg_up_to_flat; + return BolligerMabillardTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return bolliger_mabillard_track_diag_25_deg_down; + return BolligerMabillardTrackDiag25DegDown; case TrackElemType::DiagDown60: - return bolliger_mabillard_track_diag_60_deg_down; + return BolligerMabillardTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return bolliger_mabillard_track_diag_flat_to_25_deg_down; + return BolligerMabillardTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return bolliger_mabillard_track_diag_25_deg_down_to_60_deg_down; + return BolligerMabillardTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return bolliger_mabillard_track_diag_60_deg_down_to_25_deg_down; + return BolligerMabillardTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return bolliger_mabillard_track_diag_25_deg_down_to_flat; + return BolligerMabillardTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return bolliger_mabillard_track_diag_flat_to_left_bank; + return BolligerMabillardTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return bolliger_mabillard_track_diag_flat_to_right_bank; + return BolligerMabillardTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return bolliger_mabillard_track_diag_left_bank_to_flat; + return BolligerMabillardTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return bolliger_mabillard_track_diag_right_bank_to_flat; + return BolligerMabillardTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return bolliger_mabillard_track_diag_left_bank_to_25_deg_up; + return BolligerMabillardTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return bolliger_mabillard_track_diag_right_bank_to_25_deg_up; + return BolligerMabillardTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return bolliger_mabillard_track_diag_25_deg_up_to_left_bank; + return BolligerMabillardTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return bolliger_mabillard_track_diag_25_deg_up_to_right_bank; + return BolligerMabillardTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return bolliger_mabillard_track_diag_left_bank_to_25_deg_down; + return BolligerMabillardTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return bolliger_mabillard_track_diag_right_bank_to_25_deg_down; + return BolligerMabillardTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return bolliger_mabillard_track_diag_25_deg_down_to_left_bank; + return BolligerMabillardTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return bolliger_mabillard_track_diag_25_deg_down_to_right_bank; + return BolligerMabillardTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return bolliger_mabillard_track_diag_left_bank; + return BolligerMabillardTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return bolliger_mabillard_track_diag_right_bank; + return BolligerMabillardTrackDiagRightBank; case TrackElemType::LeftBankToLeftQuarterTurn3TilesUp25: - return bolliger_mabillard_track_left_bank_to_left_quarter_turn_3_25_deg_up; + return BolligerMabillardTrackLeftBankToLeftQuarterTurn325DegUp; case TrackElemType::RightBankToRightQuarterTurn3TilesUp25: - return bolliger_mabillard_track_right_bank_to_right_quarter_turn_3_25_deg_up; + return BolligerMabillardTrackRightBankToRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25ToLeftBank: - return bolliger_mabillard_track_left_quarter_turn_3_25_deg_down_to_left_bank; + return BolligerMabillardTrackLeftQuarterTurn325DegDownToLeftBank; case TrackElemType::RightQuarterTurn3TilesDown25ToRightBank: - return bolliger_mabillard_track_right_quarter_turn_3_25_deg_down_to_right_bank; + return BolligerMabillardTrackRightQuarterTurn325DegDownToRightBank; case TrackElemType::BlockBrakes: - return bolliger_mabillard_track_block_brakes; + return BolligerMabillardTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_up; + return BolligerMabillardTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_up; + return BolligerMabillardTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return bolliger_mabillard_track_left_banked_quarter_turn_3_25_deg_down; + return BolligerMabillardTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return bolliger_mabillard_track_right_banked_quarter_turn_3_25_deg_down; + return BolligerMabillardTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_up; + return BolligerMabillardTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_up; + return BolligerMabillardTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return bolliger_mabillard_track_left_banked_quarter_turn_5_25_deg_down; + return BolligerMabillardTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return bolliger_mabillard_track_right_banked_quarter_turn_5_25_deg_down; + return BolligerMabillardTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return bolliger_mabillard_track_25_deg_up_to_left_banked_25_deg_up; + return BolligerMabillardTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return bolliger_mabillard_track_25_deg_up_to_right_banked_25_deg_up; + return BolligerMabillardTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return bolliger_mabillard_track_left_banked_25_deg_up_to_25_deg_up; + return BolligerMabillardTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return bolliger_mabillard_track_right_banked_25_deg_up_to_25_deg_up; + return BolligerMabillardTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return bolliger_mabillard_track_25_deg_down_to_left_banked_25_deg_down; + return BolligerMabillardTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return bolliger_mabillard_track_25_deg_down_to_right_banked_25_deg_down; + return BolligerMabillardTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return bolliger_mabillard_track_left_banked_25_deg_down_to_25_deg_down; + return BolligerMabillardTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return bolliger_mabillard_track_right_banked_25_deg_down_to_25_deg_down; + return BolligerMabillardTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_up; + return BolligerMabillardTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_up; + return BolligerMabillardTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return bolliger_mabillard_track_left_banked_25_deg_up_to_left_banked_flat; + return BolligerMabillardTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return bolliger_mabillard_track_right_banked_25_deg_up_to_right_banked_flat; + return BolligerMabillardTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return bolliger_mabillard_track_left_banked_flat_to_left_banked_25_deg_down; + return BolligerMabillardTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return bolliger_mabillard_track_right_banked_flat_to_right_banked_25_deg_down; + return BolligerMabillardTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return bolliger_mabillard_track_left_banked_25_deg_down_to_left_banked_flat; + return BolligerMabillardTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return bolliger_mabillard_track_right_banked_25_deg_down_to_right_banked_flat; + return BolligerMabillardTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return bolliger_mabillard_track_flat_to_left_banked_25_deg_up; + return BolligerMabillardTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return bolliger_mabillard_track_flat_to_right_banked_25_deg_up; + return BolligerMabillardTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return bolliger_mabillard_track_left_banked_25_deg_up_to_flat; + return BolligerMabillardTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return bolliger_mabillard_track_right_banked_25_deg_up_to_flat; + return BolligerMabillardTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return bolliger_mabillard_track_flat_to_left_banked_25_deg_down; + return BolligerMabillardTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return bolliger_mabillard_track_flat_to_right_banked_25_deg_down; + return BolligerMabillardTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return bolliger_mabillard_track_left_banked_25_deg_down_to_flat; + return BolligerMabillardTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return bolliger_mabillard_track_right_banked_25_deg_down_to_flat; + return BolligerMabillardTrackRightBanked25DegDownToFlat; case TrackElemType::LeftQuarterTurn1TileUp90: - return bolliger_mabillard_track_left_quarter_turn_1_90_deg_up; + return BolligerMabillardTrackLeftQuarterTurn190DegUp; case TrackElemType::RightQuarterTurn1TileUp90: - return bolliger_mabillard_track_right_quarter_turn_1_90_deg_up; + return BolligerMabillardTrackRightQuarterTurn190DegUp; case TrackElemType::LeftQuarterTurn1TileDown90: - return bolliger_mabillard_track_left_quarter_turn_1_90_deg_down; + return BolligerMabillardTrackLeftQuarterTurn190DegDown; case TrackElemType::RightQuarterTurn1TileDown90: - return bolliger_mabillard_track_right_quarter_turn_1_90_deg_down; + return BolligerMabillardTrackRightQuarterTurn190DegDown; /* The following track elements used to be specific to the vertical RC */ case TrackElemType::FlatToUp60: - return bolliger_mabillard_track_flat_to_60_deg_up; + return BolligerMabillardTrackFlatTo60DegUp; case TrackElemType::Up60ToFlat: - return bolliger_mabillard_track_60_deg_up_to_flat; + return BolligerMabillardTrack60DegUpToFlat; case TrackElemType::FlatToDown60: - return bolliger_mabillard_track_flat_to_60_deg_down; + return BolligerMabillardTrackFlatTo60DegDown; case TrackElemType::Down60ToFlat: - return bolliger_mabillard_track_60_deg_down_to_flat; + return BolligerMabillardTrack60DegDownToFlat; case TrackElemType::BrakeForDrop: - return bolliger_mabillard_track_brake_for_drop; + return BolligerMabillardTrackBrakeForDrop; case TrackElemType::DiagFlatToUp60: - return bolliger_mabillard_track_diag_flat_to_60_deg_up; + return BolligerMabillardTrackDiagFlatTo60DegUp; case TrackElemType::DiagUp60ToFlat: - return bolliger_mabillard_track_diag_60_deg_up_to_flat; + return BolligerMabillardTrackDiag60DegUpToFlat; case TrackElemType::DiagFlatToDown60: - return bolliger_mabillard_track_diag_flat_to_60_deg_down; + return BolligerMabillardTrackDiagFlatTo60DegDown; case TrackElemType::DiagDown60ToFlat: - return bolliger_mabillard_track_diag_60_deg_down_to_flat; + return BolligerMabillardTrackDiag60DegDownToFlat; /* The following track elements used to be specific to the Twister RC */ case TrackElemType::HalfLoopUp: - return bolliger_mabillard_track_half_loop_up; + return BolligerMabillardTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return bolliger_mabillard_track_half_loop_down; + return BolligerMabillardTrackHalfLoopDown; case TrackElemType::LeftCorkscrewUp: - return bolliger_mabillard_track_left_corkscrew_up; + return BolligerMabillardTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return bolliger_mabillard_track_right_corkscrew_up; + return BolligerMabillardTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return bolliger_mabillard_track_left_corkscrew_down; + return BolligerMabillardTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return bolliger_mabillard_track_right_corkscrew_down; + return BolligerMabillardTrackRightCorkscrewDown; case TrackElemType::FlatToUp60LongBase: - return bolliger_mabillard_track_flat_to_60_deg_up_long_base; + return BolligerMabillardTrackFlatTo60DegUpLongBase; case TrackElemType::Up60ToFlatLongBase: - return bolliger_mabillard_track_60_deg_up_to_flat_long_base; + return BolligerMabillardTrack60DegUpToFlatLongBase; case TrackElemType::Down60ToFlatLongBase: - return bolliger_mabillard_track_60_deg_down_to_flat_long_base; + return BolligerMabillardTrack60DegDownToFlatLongBase; case TrackElemType::FlatToDown60LongBase: - return bolliger_mabillard_track_flat_to_60_deg_down_long_base; + return BolligerMabillardTrackFlatTo60DegDownLongBase; case TrackElemType::LeftBarrelRollUpToDown: - return bolliger_mabillard_track_left_barrel_roll_up_to_down; + return BolligerMabillardTrackLeftBarrelRollUpToDown; case TrackElemType::RightBarrelRollUpToDown: - return bolliger_mabillard_track_right_barrel_roll_up_to_down; + return BolligerMabillardTrackRightBarrelRollUpToDown; case TrackElemType::LeftBarrelRollDownToUp: - return bolliger_mabillard_track_left_barrel_roll_down_to_up; + return BolligerMabillardTrackLeftBarrelRollDownToUp; case TrackElemType::RightBarrelRollDownToUp: - return bolliger_mabillard_track_right_barrel_roll_down_to_up; + return BolligerMabillardTrackRightBarrelRollDownToUp; case TrackElemType::PoweredLift: - return bolliger_mabillard_track_powered_lift; + return BolligerMabillardTrackPoweredLift; case TrackElemType::LeftLargeHalfLoopUp: - return bolliger_mabillard_track_left_large_half_loop_up; + return BolligerMabillardTrackLeftLargeHalfLoopUp; case TrackElemType::RightLargeHalfLoopUp: - return bolliger_mabillard_track_right_large_half_loop_up; + return BolligerMabillardTrackRightLargeHalfLoopUp; case TrackElemType::RightLargeHalfLoopDown: - return bolliger_mabillard_track_right_large_half_loop_down; + return BolligerMabillardTrackRightLargeHalfLoopDown; case TrackElemType::LeftLargeHalfLoopDown: - return bolliger_mabillard_track_left_large_half_loop_down; + return BolligerMabillardTrackLeftLargeHalfLoopDown; case TrackElemType::Up90ToInvertedFlatQuarterLoop: - return bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up; + return BolligerMabillardTrack90DegToInvertedFlatQuarterLoopUp; case TrackElemType::InvertedFlatToDown90QuarterLoop: - return bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down; + return BolligerMabillardTrackInvertedFlatTo90DegQuarterLoopDown; case TrackElemType::Booster: - return bolliger_mabillard_track_booster; + return BolligerMabillardTrackBooster; case TrackElemType::LeftTwistDownToUp: - return bolliger_mabillard_track_left_twist_down_to_up; + return BolligerMabillardTrackLeftTwistDownToUp; case TrackElemType::RightTwistDownToUp: - return bolliger_mabillard_track_right_twist_down_to_up; + return BolligerMabillardTrackRightTwistDownToUp; case TrackElemType::LeftTwistUpToDown: - return bolliger_mabillard_track_left_twist_up_to_down; + return BolligerMabillardTrackLeftTwistUpToDown; case TrackElemType::RightTwistUpToDown: - return bolliger_mabillard_track_right_twist_up_to_down; + return BolligerMabillardTrackRightTwistUpToDown; } return nullptr; } diff --git a/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp index 77f8ee3db8..b102c878ce 100644 --- a/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ClassicWoodenRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -227,12 +227,12 @@ enum SPR_CLASSIC_WOODEN_RC_ORTHO_TO_DIAG_LEFT_BANKED_FRONT_3_SEQ_4 = SPR_CSG_BEGIN + 65446, }; -static void classic_wooden_rc_track_flat_to_left_bank( +static void ClassicWoodenRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_FLAT_TO_LEFT_BANK_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -250,19 +250,19 @@ static void classic_wooden_rc_track_flat_to_left_bank( { SPR_CLASSIC_WOODEN_RC_FLAT_TO_LEFT_BANK_FRONT_SE_NW, 0, { 0, 0, 0 }, { 26, 0, 5 }, { 1, 32, 9 } }, } } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_flat_to_right_bank( +static void ClassicWoodenRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_FLAT_TO_RIGHT_BANK_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -283,33 +283,33 @@ static void classic_wooden_rc_track_flat_to_right_bank( }, } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_left_bank_to_flat( +static void ClassicWoodenRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_flat_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackFlatToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_right_bank_to_flat( +static void ClassicWoodenRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_flat_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackFlatToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_left_bank( +static void ClassicWoodenRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_LEFT_BANK_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -330,25 +330,25 @@ static void classic_wooden_rc_track_left_bank( }, } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_right_bank( +static void ClassicWoodenRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_left_bank_to_25_deg_up( +static void ClassicWoodenRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_LEFT_BANK_TO_25_UP_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -369,8 +369,8 @@ static void classic_wooden_rc_track_left_bank_to_25_deg_up( }, } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) { @@ -384,11 +384,11 @@ static void classic_wooden_rc_track_left_bank_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void classic_wooden_rc_track_right_bank_to_25_deg_up( +static void ClassicWoodenRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_RIGHT_BANK_TO_25_UP_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -410,8 +410,8 @@ static void classic_wooden_rc_track_right_bank_to_25_deg_up( } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) { @@ -425,11 +425,11 @@ static void classic_wooden_rc_track_right_bank_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void classic_wooden_rc_track_25_deg_up_to_left_bank( +static void ClassicWoodenRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_25_UP_TO_LEFT_BANK_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -451,8 +451,8 @@ static void classic_wooden_rc_track_25_deg_up_to_left_bank( } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) { @@ -466,11 +466,11 @@ static void classic_wooden_rc_track_25_deg_up_to_left_bank( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void classic_wooden_rc_track_25_deg_up_to_right_bank( +static void ClassicWoodenRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][1][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][1][2] = { { { { SPR_CLASSIC_WOODEN_RC_25_UP_TO_RIGHT_BANK_SW_NE, 0, { 0, 0, 0 }, { 0, 3, 0 }, { 32, 25, 2 } }, {}, @@ -492,8 +492,8 @@ static void classic_wooden_rc_track_25_deg_up_to_right_bank( } }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) { @@ -507,39 +507,39 @@ static void classic_wooden_rc_track_25_deg_up_to_right_bank( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void classic_wooden_rc_track_left_bank_to_25_deg_down( +static void ClassicWoodenRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_right_bank_to_25_deg_down( +static void ClassicWoodenRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_25_deg_down_to_left_bank( +static void ClassicWoodenRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_25_deg_down_to_right_bank( +static void ClassicWoodenRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_banked_right_quarter_turn_5( +static void ClassicWoodenRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][7][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][7][2] = { { { { SPR_CLASSIC_WOODEN_RC_BANKED_QUARTER_TURN_5_SW_SE_SEQ_0, 0, { 0, 2, 0 }, { 0, 2, 0 }, { 32, 32, 2 } }, @@ -690,9 +690,9 @@ static void classic_wooden_rc_track_banked_right_quarter_turn_5( SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); - track_paint_util_right_quarter_turn_5_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); if (supportType[direction][trackSequence] != -1) { @@ -703,20 +703,19 @@ static void classic_wooden_rc_track_banked_right_quarter_turn_5( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_banked_left_quarter_turn_5( +static void ClassicWoodenRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - classic_wooden_rc_track_banked_right_quarter_turn_5( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + ClassicWoodenRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } -static void classic_wooden_rc_track_right_quarter_turn_3_bank( +static void ClassicWoodenRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { { SPR_CLASSIC_WOODEN_RC_BANKED_QUARTER_TURN_3_SW_SE_SEQ_0, 0, { 0, 6, 0 }, { 0, 6, 0 }, { 32, 20, 2 } }, @@ -809,9 +808,9 @@ static void classic_wooden_rc_track_right_quarter_turn_3_bank( SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, }; - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); if (supportType[direction][trackSequence] != -1) { @@ -823,19 +822,19 @@ static void classic_wooden_rc_track_right_quarter_turn_3_bank( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_left_quarter_turn_3_bank( +static void ClassicWoodenRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - classic_wooden_rc_track_right_quarter_turn_3_bank(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + ClassicWoodenRCTrackRightQuarterTurn3Bank(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } -static void classic_wooden_rc_track_left_eighth_bank_to_diag( +static void ClassicWoodenRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][5][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][5][2] = { { { { SPR_CLASSIC_WOODEN_RC_ORTHO_TO_DIAG_LEFT_BANKED_0_SEQ_0, 0, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, @@ -955,18 +954,18 @@ static void classic_wooden_rc_track_left_eighth_bank_to_diag( WoodenASupportsPaintSetup( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + 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); } -static void classic_wooden_rc_track_right_eighth_bank_to_diag( +static void ClassicWoodenRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][5][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][5][2] = { { { { SPR_CLASSIC_WOODEN_RC_ORTHO_TO_DIAG_RIGHT_BANKED_0_SEQ_0, 0, { 0, 0, 0 }, { 0, 0, 0 }, { 32, 32, 2 } }, @@ -1094,34 +1093,34 @@ static void classic_wooden_rc_track_right_eighth_bank_to_diag( WoodenASupportsPaintSetup( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + 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); } -static void classic_wooden_rc_track_left_eighth_bank_to_orthogonal( +static void ClassicWoodenRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - classic_wooden_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_right_eighth_bank_to_orthogonal( +static void ClassicWoodenRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - classic_wooden_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + ClassicWoodenRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_flat_to_left_bank( +static void ClassicWoodenRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1209,17 +1208,17 @@ static void classic_wooden_rc_track_diag_flat_to_left_bank( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_diag_flat_to_right_bank( +static void ClassicWoodenRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1307,32 +1306,31 @@ static void classic_wooden_rc_track_diag_flat_to_right_bank( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_diag_left_bank_to_flat( +static void ClassicWoodenRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_flat_to_right_bank( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiagFlatToRightBank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_right_bank_to_flat( +static void ClassicWoodenRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_flat_to_left_bank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiagFlatToLeftBank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_left_bank( +static void ClassicWoodenRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1420,24 +1418,24 @@ static void classic_wooden_rc_track_diag_left_bank( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void classic_wooden_rc_track_diag_right_bank( +static void ClassicWoodenRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_left_bank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiagLeftBank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_left_bank_to_25_deg_up( +static void ClassicWoodenRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1525,17 +1523,17 @@ static void classic_wooden_rc_track_diag_left_bank_to_25_deg_up( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void classic_wooden_rc_track_diag_right_bank_to_25_deg_up( +static void ClassicWoodenRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1623,17 +1621,17 @@ static void classic_wooden_rc_track_diag_right_bank_to_25_deg_up( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void classic_wooden_rc_track_diag_25_deg_up_to_left_bank( +static void ClassicWoodenRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1721,17 +1719,17 @@ static void classic_wooden_rc_track_diag_25_deg_up_to_left_bank( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void classic_wooden_rc_track_diag_25_deg_up_to_right_bank( +static void ClassicWoodenRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[4][4][2] = { + static constexpr const SpriteBoundBox2 imageIds[4][4][2] = { { { {}, @@ -1819,129 +1817,125 @@ static void classic_wooden_rc_track_diag_25_deg_up_to_right_bank( session, supportType[direction][trackSequence], 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][0], height); - wooden_rc_track_paint_bb(session, &imageIds[direction][trackSequence][1], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); + WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][1], height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void classic_wooden_rc_track_diag_left_bank_to_25_deg_down( +static void ClassicWoodenRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_25_deg_up_to_right_bank( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiag25DegUpToRightBank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_right_bank_to_25_deg_down( +static void ClassicWoodenRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_25_deg_up_to_left_bank( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiag25DegUpToLeftBank(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_25_deg_down_to_left_bank( +static void ClassicWoodenRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_right_bank_to_25_deg_up( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiagRightBankTo25DegUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void classic_wooden_rc_track_diag_25_deg_down_to_right_bank( +static void ClassicWoodenRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, Direction direction, int32_t height, const TrackElement& trackElement) { - classic_wooden_rc_track_diag_left_bank_to_25_deg_up( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + ClassicWoodenRCTrackDiagLeftBankTo25DegUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } // Stylistically, this coaster is _very_ similar to the regular Wooden Roller Coaster. // The only difference is to which parts the colours are applied, and the degree of the banking. // As such, all non-banked pieces are simply drawn as regular wooden roller coaster pieces with a different paint scheme. -TRACK_PAINT_FUNCTION get_track_paint_function_classic_wooden_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionClassicWoodenRC(int32_t trackType) { - if (!is_csg_loaded()) + if (!IsCsgLoaded()) { - return get_track_paint_function_classic_wooden_rc_fallback(trackType); + return GetTrackPaintFunctionClassicWoodenRCFallback(trackType); } switch (trackType) { case TrackElemType::FlatToLeftBank: - return classic_wooden_rc_track_flat_to_left_bank; + return ClassicWoodenRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return classic_wooden_rc_track_flat_to_right_bank; + return ClassicWoodenRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return classic_wooden_rc_track_left_bank_to_flat; + return ClassicWoodenRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return classic_wooden_rc_track_right_bank_to_flat; + return ClassicWoodenRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return classic_wooden_rc_track_banked_left_quarter_turn_5; + return ClassicWoodenRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return classic_wooden_rc_track_banked_right_quarter_turn_5; + return ClassicWoodenRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return classic_wooden_rc_track_left_bank_to_25_deg_up; + return ClassicWoodenRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return classic_wooden_rc_track_right_bank_to_25_deg_up; + return ClassicWoodenRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return classic_wooden_rc_track_25_deg_up_to_left_bank; + return ClassicWoodenRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return classic_wooden_rc_track_25_deg_up_to_right_bank; + return ClassicWoodenRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return classic_wooden_rc_track_left_bank_to_25_deg_down; + return ClassicWoodenRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return classic_wooden_rc_track_right_bank_to_25_deg_down; + return ClassicWoodenRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return classic_wooden_rc_track_25_deg_down_to_left_bank; + return ClassicWoodenRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return classic_wooden_rc_track_25_deg_down_to_right_bank; + return ClassicWoodenRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return classic_wooden_rc_track_left_bank; + return ClassicWoodenRCTrackLeftBank; case TrackElemType::RightBank: - return classic_wooden_rc_track_right_bank; + return ClassicWoodenRCTrackRightBank; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return classic_wooden_rc_track_left_quarter_turn_3_bank; + return ClassicWoodenRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return classic_wooden_rc_track_right_quarter_turn_3_bank; + return ClassicWoodenRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftEighthBankToDiag: - return classic_wooden_rc_track_left_eighth_bank_to_diag; + return ClassicWoodenRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return classic_wooden_rc_track_right_eighth_bank_to_diag; + return ClassicWoodenRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return classic_wooden_rc_track_left_eighth_bank_to_orthogonal; + return ClassicWoodenRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return classic_wooden_rc_track_right_eighth_bank_to_orthogonal; + return ClassicWoodenRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlatToLeftBank: - return classic_wooden_rc_track_diag_flat_to_left_bank; + return ClassicWoodenRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return classic_wooden_rc_track_diag_flat_to_right_bank; + return ClassicWoodenRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return classic_wooden_rc_track_diag_left_bank_to_flat; + return ClassicWoodenRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return classic_wooden_rc_track_diag_right_bank_to_flat; + return ClassicWoodenRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return classic_wooden_rc_track_diag_left_bank_to_25_deg_up; + return ClassicWoodenRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return classic_wooden_rc_track_diag_right_bank_to_25_deg_up; + return ClassicWoodenRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return classic_wooden_rc_track_diag_25_deg_up_to_left_bank; + return ClassicWoodenRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return classic_wooden_rc_track_diag_25_deg_up_to_right_bank; + return ClassicWoodenRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return classic_wooden_rc_track_diag_left_bank_to_25_deg_down; + return ClassicWoodenRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return classic_wooden_rc_track_diag_right_bank_to_25_deg_down; + return ClassicWoodenRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return classic_wooden_rc_track_diag_25_deg_down_to_left_bank; + return ClassicWoodenRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return classic_wooden_rc_track_diag_25_deg_down_to_right_bank; + return ClassicWoodenRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return classic_wooden_rc_track_diag_left_bank; + return ClassicWoodenRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return classic_wooden_rc_track_diag_right_bank; + return ClassicWoodenRCTrackDiagRightBank; } - return get_track_paint_function_classic_wooden_rc_fallback(trackType); + return GetTrackPaintFunctionClassicWoodenRCFallback(trackType); } diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index a570ca3793..4165021434 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008AE6E0 */ -static void compact_inverted_rc_track_flat( +static void CompactInvertedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -31,13 +31,13 @@ static void compact_inverted_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26557), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26558), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -49,20 +49,20 @@ static void compact_inverted_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -73,7 +73,7 @@ static void compact_inverted_rc_track_flat( } /** rct2: 0x008AE950, 0x008AE960, 0x008AE970 */ -static void compact_inverted_rc_track_station( +static void CompactInvertedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -86,22 +86,22 @@ static void compact_inverted_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008AE6F0 */ -static void compact_inverted_rc_track_25_deg_up( +static void CompactInvertedRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -112,22 +112,22 @@ static void compact_inverted_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26621), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26622), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26623), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26624), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } } @@ -138,29 +138,29 @@ static void compact_inverted_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26569), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26570), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26571), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26572), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -195,7 +195,7 @@ static void compact_inverted_rc_track_25_deg_up( } /** rct2: 0x008AE700 */ -static void compact_inverted_rc_track_60_deg_up( +static void CompactInvertedRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -206,22 +206,22 @@ static void compact_inverted_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26637), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 93 }); + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26638), { 0, 0, height + 29 }, - { 32, 2, 81 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26639), { 0, 0, height + 29 }, - { 32, 2, 81 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26640), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 93 }); + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; } } @@ -232,22 +232,22 @@ static void compact_inverted_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26585), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 93 }); + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26586), { 0, 0, height + 29 }, - { 32, 2, 81 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26587), { 0, 0, height + 29 }, - { 32, 2, 81 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26588), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 93 }); + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; } } @@ -265,7 +265,7 @@ static void compact_inverted_rc_track_60_deg_up( } /** rct2: 0x008AE710 */ -static void compact_inverted_rc_track_flat_to_25_deg_up( +static void CompactInvertedRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -276,22 +276,22 @@ static void compact_inverted_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26613), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26614), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26615), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26616), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -302,29 +302,29 @@ static void compact_inverted_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26561), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26562), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26563), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26564), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -359,7 +359,7 @@ static void compact_inverted_rc_track_flat_to_25_deg_up( } /** rct2: 0x008AE720 */ -static void compact_inverted_rc_track_25_deg_up_to_60_deg_up( +static void CompactInvertedRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -370,28 +370,28 @@ static void compact_inverted_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26625), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26629), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26626), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26630), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26627), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26628), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } @@ -402,28 +402,28 @@ static void compact_inverted_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26573), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26577), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26574), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26578), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26575), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26576), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } @@ -441,7 +441,7 @@ static void compact_inverted_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008AE730 */ -static void compact_inverted_rc_track_60_deg_up_to_25_deg_up( +static void CompactInvertedRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -452,28 +452,28 @@ static void compact_inverted_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26631), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26635), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26632), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26636), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26633), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26634), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } @@ -484,35 +484,35 @@ static void compact_inverted_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26579), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26583), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26580), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26584), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26581), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26582), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -547,7 +547,7 @@ static void compact_inverted_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008AE740 */ -static void compact_inverted_rc_track_25_deg_up_to_flat( +static void CompactInvertedRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -558,22 +558,22 @@ static void compact_inverted_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26617), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26618), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26619), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26620), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -584,29 +584,29 @@ static void compact_inverted_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26565), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26566), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26567), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26568), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -641,55 +641,55 @@ static void compact_inverted_rc_track_25_deg_up_to_flat( } /** rct2: 0x008AE750 */ -static void compact_inverted_rc_track_25_deg_down( +static void CompactInvertedRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE760 */ -static void compact_inverted_rc_track_60_deg_down( +static void CompactInvertedRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE770 */ -static void compact_inverted_rc_track_flat_to_25_deg_down( +static void CompactInvertedRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE780 */ -static void compact_inverted_rc_track_25_deg_down_to_60_deg_down( +static void CompactInvertedRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE790 */ -static void compact_inverted_rc_track_60_deg_down_to_25_deg_down( +static void CompactInvertedRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE7A0 */ -static void compact_inverted_rc_track_25_deg_down_to_flat( +static void CompactInvertedRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE7B0 */ -static void compact_inverted_rc_track_left_quarter_turn_5( +static void CompactInvertedRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -701,22 +701,22 @@ static void compact_inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26694), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26699), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26704), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26689), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -751,12 +751,12 @@ static void compact_inverted_rc_track_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26703), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26688), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -771,17 +771,17 @@ static void compact_inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26692), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26697), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26702), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -802,7 +802,7 @@ static void compact_inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26691), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -817,7 +817,7 @@ static void compact_inverted_rc_track_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26686), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -832,22 +832,22 @@ static void compact_inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26690), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26695), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26700), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26685), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -872,16 +872,16 @@ static void compact_inverted_rc_track_left_quarter_turn_5( } /** rct2: 0x008AE7C0 */ -static void compact_inverted_rc_track_right_quarter_turn_5( +static void CompactInvertedRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - compact_inverted_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AE7D0 */ -static void compact_inverted_rc_track_flat_to_left_bank( +static void CompactInvertedRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -889,23 +889,23 @@ static void compact_inverted_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26657), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26657), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26658), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26658), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26659), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26659), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26660), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26660), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -913,7 +913,7 @@ static void compact_inverted_rc_track_flat_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -924,7 +924,7 @@ static void compact_inverted_rc_track_flat_to_left_bank( } /** rct2: 0x008AE7E0 */ -static void compact_inverted_rc_track_flat_to_right_bank( +static void CompactInvertedRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -932,23 +932,23 @@ static void compact_inverted_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26661), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26661), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26662), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26662), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26663), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26663), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26664), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26664), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -956,7 +956,7 @@ static void compact_inverted_rc_track_flat_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -967,7 +967,7 @@ static void compact_inverted_rc_track_flat_to_right_bank( } /** rct2: 0x008AE7F0 */ -static void compact_inverted_rc_track_left_bank_to_flat( +static void CompactInvertedRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -975,23 +975,23 @@ static void compact_inverted_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26663), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26663), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26664), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26664), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26661), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26661), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26662), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26662), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -999,7 +999,7 @@ static void compact_inverted_rc_track_left_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -1010,7 +1010,7 @@ static void compact_inverted_rc_track_left_bank_to_flat( } /** rct2: 0x008AE800 */ -static void compact_inverted_rc_track_right_bank_to_flat( +static void CompactInvertedRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1018,23 +1018,23 @@ static void compact_inverted_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26659), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26659), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26660), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26660), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26657), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26657), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26658), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26658), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1042,7 +1042,7 @@ static void compact_inverted_rc_track_right_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -1053,7 +1053,7 @@ static void compact_inverted_rc_track_right_bank_to_flat( } /** rct2: 0x008AE810 */ -static void compact_inverted_rc_track_banked_left_quarter_turn_5( +static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1065,22 +1065,22 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26738), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26743), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26748), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26733), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1115,12 +1115,12 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26747), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26732), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1135,17 +1135,17 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26736), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26741), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26746), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1166,7 +1166,7 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26735), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1181,7 +1181,7 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26730), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1196,22 +1196,22 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26734), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26739), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26744), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26729), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -1236,17 +1236,16 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008AE820 */ -static void compact_inverted_rc_track_banked_right_quarter_turn_5( +static void CompactInvertedRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - compact_inverted_rc_track_banked_left_quarter_turn_5( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AE830 */ -static void compact_inverted_rc_track_left_bank_to_25_deg_up( +static void CompactInvertedRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1254,23 +1253,23 @@ static void compact_inverted_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26665), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26665), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26666), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26666), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26667), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26667), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26668), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26668), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1278,7 +1277,7 @@ static void compact_inverted_rc_track_left_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1313,7 +1312,7 @@ static void compact_inverted_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008AE840 */ -static void compact_inverted_rc_track_right_bank_to_25_deg_up( +static void CompactInvertedRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1321,23 +1320,23 @@ static void compact_inverted_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26669), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26669), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26670), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26670), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26671), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26671), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26672), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26672), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1345,7 +1344,7 @@ static void compact_inverted_rc_track_right_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1380,7 +1379,7 @@ static void compact_inverted_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008AE850 */ -static void compact_inverted_rc_track_25_deg_up_to_left_bank( +static void CompactInvertedRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1388,23 +1387,23 @@ static void compact_inverted_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26673), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26673), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26674), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26674), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26675), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26675), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26676), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26676), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1412,7 +1411,7 @@ static void compact_inverted_rc_track_25_deg_up_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1447,7 +1446,7 @@ static void compact_inverted_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008AE860 */ -static void compact_inverted_rc_track_25_deg_up_to_right_bank( +static void CompactInvertedRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1455,23 +1454,23 @@ static void compact_inverted_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26677), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26677), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26678), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26678), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26679), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26679), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26680), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26680), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1479,7 +1478,7 @@ static void compact_inverted_rc_track_25_deg_up_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1514,39 +1513,39 @@ static void compact_inverted_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008AE870 */ -static void compact_inverted_rc_track_left_bank_to_25_deg_down( +static void CompactInvertedRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE880 */ -static void compact_inverted_rc_track_right_bank_to_25_deg_down( +static void CompactInvertedRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE890 */ -static void compact_inverted_rc_track_25_deg_down_to_left_bank( +static void CompactInvertedRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE8A0 */ -static void compact_inverted_rc_track_25_deg_down_to_right_bank( +static void CompactInvertedRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE8B0 */ -static void compact_inverted_rc_track_left_bank( +static void CompactInvertedRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1554,23 +1553,23 @@ static void compact_inverted_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26681), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26681), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26682), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26682), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26683), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26683), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26684), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26684), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1578,7 +1577,7 @@ static void compact_inverted_rc_track_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -1589,15 +1588,15 @@ static void compact_inverted_rc_track_left_bank( } /** rct2: 0x008AE8C0 */ -static void compact_inverted_rc_track_right_bank( +static void CompactInvertedRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AE8D0 */ -static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up( +static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1780,7 +1779,7 @@ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008AE8E0 */ -static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up( +static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1963,27 +1962,25 @@ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008AE8F0 */ -static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_down( +static void CompactInvertedRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - compact_inverted_rc_track_right_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CompactInvertedRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AE900 */ -static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_down( +static void CompactInvertedRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - compact_inverted_rc_track_left_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AE910 */ -static void compact_inverted_rc_track_s_bend_left( +static void CompactInvertedRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1995,22 +1992,22 @@ static void compact_inverted_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26641), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26645), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26644), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26648), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2041,12 +2038,12 @@ static void compact_inverted_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26643), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26647), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; } @@ -2074,12 +2071,12 @@ static void compact_inverted_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26643), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26647), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2117,22 +2114,22 @@ static void compact_inverted_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26644), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26648), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26641), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26645), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2156,7 +2153,7 @@ static void compact_inverted_rc_track_s_bend_left( } /** rct2: 0x008AE920 */ -static void compact_inverted_rc_track_s_bend_right( +static void CompactInvertedRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2168,22 +2165,22 @@ static void compact_inverted_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26649), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26653), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26652), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26656), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2204,12 +2201,12 @@ static void compact_inverted_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26650), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26654), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2257,12 +2254,12 @@ static void compact_inverted_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26650), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26654), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; } @@ -2290,22 +2287,22 @@ static void compact_inverted_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26652), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26656), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26649), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26653), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2329,7 +2326,7 @@ static void compact_inverted_rc_track_s_bend_right( } /** rct2: 0x008AE930 */ -static void compact_inverted_rc_track_left_vertical_loop( +static void CompactInvertedRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2341,22 +2338,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27017), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27025), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27024), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27032), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; } @@ -2398,22 +2395,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27018), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27026), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27023), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27031), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2425,22 +2422,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27019), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27027), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27022), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27030), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2453,22 +2450,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27020), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27028), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27021), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27029), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2489,22 +2486,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27021), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27029), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27020), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27028), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2519,22 +2516,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27022), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27030), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27019), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27027), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2547,22 +2544,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27023), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27031), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27018), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27026), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2574,22 +2571,22 @@ static void compact_inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27024), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27032), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27017), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27025), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } @@ -2634,7 +2631,7 @@ static void compact_inverted_rc_track_left_vertical_loop( } /** rct2: 0x008AE940 */ -static void compact_inverted_rc_track_right_vertical_loop( +static void CompactInvertedRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2646,22 +2643,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27048), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27040), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27041), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27033), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } @@ -2703,22 +2700,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27047), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27039), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27042), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27034), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2730,22 +2727,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27046), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27038), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27043), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27035), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2758,22 +2755,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27045), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27037), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27044), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27036), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2794,22 +2791,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27044), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27036), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27045), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27037), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2824,22 +2821,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27043), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27035), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27046), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27038), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2852,22 +2849,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27042), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27034), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27047), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27039), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2879,22 +2876,22 @@ static void compact_inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27041), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27033), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27048), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27040), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } @@ -2939,7 +2936,7 @@ static void compact_inverted_rc_track_right_vertical_loop( } /** rct2: 0x008AE980 */ -static void compact_inverted_rc_track_left_quarter_turn_3( +static void CompactInvertedRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2951,22 +2948,22 @@ static void compact_inverted_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26710), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26713), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26716), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26707), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2991,7 +2988,7 @@ static void compact_inverted_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26709), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -3001,12 +2998,12 @@ static void compact_inverted_rc_track_left_quarter_turn_3( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26715), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26706), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3019,22 +3016,22 @@ static void compact_inverted_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26708), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26711), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26714), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26705), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -3059,16 +3056,16 @@ static void compact_inverted_rc_track_left_quarter_turn_3( } /** rct2: 0x008AE990 */ -static void compact_inverted_rc_track_right_quarter_turn_3( +static void CompactInvertedRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - compact_inverted_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AE9A0 */ -static void compact_inverted_rc_track_left_quarter_turn_3_bank( +static void CompactInvertedRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3080,22 +3077,22 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26722), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26725), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26728), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26719), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -3120,22 +3117,22 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26721), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26724), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26727), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26718), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3148,22 +3145,22 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26720), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26723), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26726), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26717), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -3188,16 +3185,16 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008AE9B0 */ -static void compact_inverted_rc_track_right_quarter_turn_3_bank( +static void CompactInvertedRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - compact_inverted_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AE9C0 */ -static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up( +static void CompactInvertedRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3292,7 +3289,7 @@ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008AE9D0 */ -static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up( +static void CompactInvertedRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3387,27 +3384,25 @@ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008AE9E0 */ -static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_down( +static void CompactInvertedRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - compact_inverted_rc_track_right_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CompactInvertedRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AE9F0 */ -static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_down( +static void CompactInvertedRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - compact_inverted_rc_track_left_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AEA00 */ -static void compact_inverted_rc_track_left_twist_down_to_up( +static void CompactInvertedRCTrackLeftTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3526,7 +3521,7 @@ static void compact_inverted_rc_track_left_twist_down_to_up( } /** rct2: 0x008AEA10 */ -static void compact_inverted_rc_track_right_twist_down_to_up( +static void CompactInvertedRCTrackRightTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3645,7 +3640,7 @@ static void compact_inverted_rc_track_right_twist_down_to_up( } /** rct2: 0x008AEA20 */ -static void compact_inverted_rc_track_left_twist_up_to_down( +static void CompactInvertedRCTrackLeftTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3764,7 +3759,7 @@ static void compact_inverted_rc_track_left_twist_up_to_down( } /** rct2: 0x008AEA30 */ -static void compact_inverted_rc_track_right_twist_up_to_down( +static void CompactInvertedRCTrackRightTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3883,7 +3878,7 @@ static void compact_inverted_rc_track_right_twist_up_to_down( } /** rct2: 0x008AEA40 */ -static void compact_inverted_rc_track_half_loop_up( +static void CompactInvertedRCTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3895,22 +3890,22 @@ static void compact_inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27073), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27081), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27080), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27088), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } @@ -3948,22 +3943,22 @@ static void compact_inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27074), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27082), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27079), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27087), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3975,22 +3970,22 @@ static void compact_inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27075), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27083), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27078), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27086), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4005,22 +4000,22 @@ static void compact_inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27076), { 0, 0, height + 34 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27084), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27077), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27085), { 0, 16, height + 34 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -4035,15 +4030,15 @@ static void compact_inverted_rc_track_half_loop_up( } /** rct2: 0x008AEA50 */ -static void compact_inverted_rc_track_half_loop_down( +static void CompactInvertedRCTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_half_loop_up(session, ride, 3 - trackSequence, direction, height, trackElement); + CompactInvertedRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } /** rct2: 0x008AEA60 */ -static void compact_inverted_rc_track_left_corkscrew_up( +static void CompactInvertedRCTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4055,22 +4050,22 @@ static void compact_inverted_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27049), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27052), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27055), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27058), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; } @@ -4094,22 +4089,22 @@ static void compact_inverted_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27050), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27053), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27056), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27059), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4121,22 +4116,22 @@ static void compact_inverted_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27051), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27054), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27057), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27060), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4161,7 +4156,7 @@ static void compact_inverted_rc_track_left_corkscrew_up( } /** rct2: 0x008AEA70 */ -static void compact_inverted_rc_track_right_corkscrew_up( +static void CompactInvertedRCTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4173,22 +4168,22 @@ static void compact_inverted_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27061), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27064), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27067), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27070), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; } @@ -4212,22 +4207,22 @@ static void compact_inverted_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27062), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27065), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27068), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27071), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4239,22 +4234,22 @@ static void compact_inverted_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27063), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27066), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27069), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27072), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4279,23 +4274,23 @@ static void compact_inverted_rc_track_right_corkscrew_up( } /** rct2: 0x008AEA80 */ -static void compact_inverted_rc_track_left_corkscrew_down( +static void CompactInvertedRCTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_right_corkscrew_up(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + CompactInvertedRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AEA90 */ -static void compact_inverted_rc_track_right_corkscrew_down( +static void CompactInvertedRCTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_left_corkscrew_up(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AEAD0 */ -static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_up( +static void CompactInvertedRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4303,44 +4298,44 @@ static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26910), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26910), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26906), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26906), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26911), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26911), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26907), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26907), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26912), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26912), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26908), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26908), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26909), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26909), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26905), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26905), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008AEAB0 */ -static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_up( +static void CompactInvertedRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4348,63 +4343,60 @@ static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26901), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26901), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26897), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26897), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26902), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26902), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26898), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26898), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26903), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26903), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26899), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26899), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26904), { 0, 0, height + 5 }, { 28, 28, 3 }, - { 2, 2, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26904), { 0, 0, height + 5 }, + { { 2, 2, height + 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26900), { 0, 0, height + 5 }, { 28, 28, 1 }, - { 2, 2, height + 104 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26900), { 0, 0, height + 5 }, + { { 2, 2, height + 104 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel( - session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008AEAC0 */ -static void compact_inverted_rc_track_left_quarter_turn_1_60_deg_down( +static void CompactInvertedRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_right_quarter_turn_1_60_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CompactInvertedRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AEAE0 */ -static void compact_inverted_rc_track_right_quarter_turn_1_60_deg_down( +static void CompactInvertedRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_left_quarter_turn_1_60_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CompactInvertedRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AEAA0 */ -static void compact_inverted_rc_track_brakes( +static void CompactInvertedRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4413,20 +4405,20 @@ static void compact_inverted_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26559), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26559), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26560), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26560), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -4437,7 +4429,7 @@ static void compact_inverted_rc_track_brakes( } /** rct2: 0x008AEAF0 */ -static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( +static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4449,22 +4441,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27118), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27123), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27128), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27113), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; } @@ -4489,22 +4481,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27117), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27122), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27127), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27112), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4519,22 +4511,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27116), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27121), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27126), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27111), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4550,22 +4542,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27115), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27120), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27125), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27110), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4580,22 +4572,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27114), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27119), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27124), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27109), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; } @@ -4620,7 +4612,7 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up( } /** rct2: 0x008AEB00 */ -static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( +static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4632,22 +4624,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27089), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27094), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27099), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27104), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; } @@ -4672,22 +4664,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27090), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27095), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27100), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27105), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4702,22 +4694,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27091), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27096), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27101), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27106), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4733,22 +4725,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27092), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27097), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27102), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27107), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4763,22 +4755,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27093), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27098), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27103), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27108), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; } @@ -4803,7 +4795,7 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up( } /** rct2: 0x008AEB10 */ -static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( +static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4815,22 +4807,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27098), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27103), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27108), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27093), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; } @@ -4855,22 +4847,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27097), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27102), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27107), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27092), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4885,22 +4877,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27096), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27101), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27106), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27091), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4916,22 +4908,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27095), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27100), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27105), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27090), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4946,22 +4938,22 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27094), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27099), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27104), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27089), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; } @@ -4986,7 +4978,7 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down( } /** rct2: 0x008AEB20 */ -static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( +static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4998,22 +4990,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27109), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27114), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27119), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27124), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; } @@ -5038,22 +5030,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27110), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27115), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27120), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27125), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5068,22 +5060,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27111), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27116), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27121), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27126), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5099,22 +5091,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27112), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27117), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27122), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27127), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5129,22 +5121,22 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27113), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27118), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27123), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27128), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; } @@ -5169,7 +5161,7 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down( } /** rct2: 0x008AEB30 */ -static void compact_inverted_rc_track_on_ride_photo( +static void CompactInvertedRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5183,8 +5175,8 @@ static void compact_inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -5194,8 +5186,8 @@ static void compact_inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5205,8 +5197,8 @@ static void compact_inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -5216,18 +5208,18 @@ static void compact_inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); } /** rct2: 0x008AEDB0 */ -static void compact_inverted_rc_track_90_deg_up( +static void CompactInvertedRCTrack90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5241,22 +5233,22 @@ static void compact_inverted_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26609), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26610), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26611), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26612), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } @@ -5267,22 +5259,22 @@ static void compact_inverted_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26605), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26606), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26607), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26608), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } @@ -5297,15 +5289,15 @@ static void compact_inverted_rc_track_90_deg_up( } /** rct2: 0x008AEDC0 */ -static void compact_inverted_rc_track_90_deg_down( +static void CompactInvertedRCTrack90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AED70 */ -static void compact_inverted_rc_track_60_deg_up_to_90_deg_up( +static void CompactInvertedRCTrack60DegUpTo90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5319,22 +5311,22 @@ static void compact_inverted_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26597), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26598), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26599), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26600), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } } @@ -5345,22 +5337,22 @@ static void compact_inverted_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26589), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26590), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26591), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26592), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } } @@ -5379,15 +5371,15 @@ static void compact_inverted_rc_track_60_deg_up_to_90_deg_up( } /** rct2: 0x008AED80 */ -static void compact_inverted_rc_track_90_deg_down_to_60_deg_down( +static void CompactInvertedRCTrack90DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - compact_inverted_rc_track_60_deg_up_to_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AED90 */ -static void compact_inverted_rc_track_90_deg_up_to_60_deg_up( +static void CompactInvertedRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5398,22 +5390,22 @@ static void compact_inverted_rc_track_90_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26601), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26602), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26603), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26604), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } } @@ -5424,22 +5416,22 @@ static void compact_inverted_rc_track_90_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26593), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26594), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26595), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26596), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } } @@ -5458,7 +5450,7 @@ static void compact_inverted_rc_track_90_deg_up_to_60_deg_up( } /** rct2: 0x008AEDA0 */ -static void compact_inverted_rc_track_60_deg_down_to_90_deg_down( +static void CompactInvertedRCTrack60DegDownTo90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5472,22 +5464,22 @@ static void compact_inverted_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26603), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26604), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26601), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26602), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; } } @@ -5498,22 +5490,22 @@ static void compact_inverted_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26595), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26596), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26593), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26594), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; } } @@ -5531,7 +5523,7 @@ static void compact_inverted_rc_track_60_deg_down_to_90_deg_down( } /** rct2: 0x008AEB40 */ -static void compact_inverted_rc_track_left_eighth_to_diag( +static void CompactInvertedRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5543,22 +5535,22 @@ static void compact_inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26765), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26769), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26773), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26777), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5579,22 +5571,22 @@ static void compact_inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26766), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26770), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26774), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26778), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5609,22 +5601,22 @@ static void compact_inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26767), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26771), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26775), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26779), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5643,22 +5635,22 @@ static void compact_inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26768), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26772), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26776), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26780), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; } @@ -5692,7 +5684,7 @@ static void compact_inverted_rc_track_left_eighth_to_diag( } /** rct2: 0x008AEB50 */ -static void compact_inverted_rc_track_right_eighth_to_diag( +static void CompactInvertedRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5704,22 +5696,22 @@ static void compact_inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26749), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26753), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26757), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26761), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5740,22 +5732,22 @@ static void compact_inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26750), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26754), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26758), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26762), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5770,22 +5762,22 @@ static void compact_inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26751), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26755), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26759), { 0, 0, height + 29 }, - { 28, 28, 3 }, { 4, 4, height + 29 }); + { { 4, 4, height + 29 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26763), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5804,22 +5796,22 @@ static void compact_inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26752), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26756), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26760), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26764), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } @@ -5853,25 +5845,25 @@ static void compact_inverted_rc_track_right_eighth_to_diag( } /** rct2: 0x008AEB60 */ -static void compact_inverted_rc_track_left_eighth_to_orthogonal( +static void CompactInvertedRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - compact_inverted_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AEB70 */ -static void compact_inverted_rc_track_right_eighth_to_orthogonal( +static void CompactInvertedRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - compact_inverted_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + CompactInvertedRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008AED30 */ -static void compact_inverted_rc_track_left_eighth_bank_to_diag( +static void CompactInvertedRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5883,22 +5875,22 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26853), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26857), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26861), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26865), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5919,22 +5911,22 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26854), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26858), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26862), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26866), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5949,22 +5941,22 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26855), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26859), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26863), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26867), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5983,22 +5975,22 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26856), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26860), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26864), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26868), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; } @@ -6033,7 +6025,7 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008AED40 */ -static void compact_inverted_rc_track_right_eighth_bank_to_diag( +static void CompactInvertedRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6045,22 +6037,22 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26837), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26841), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26845), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26849), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -6081,22 +6073,22 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26838), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26842), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26846), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26850), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6111,22 +6103,22 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26839), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26843), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26847), { 0, 0, height + 29 }, - { 28, 28, 3 }, { 4, 4, height + 29 }); + { { 4, 4, height + 29 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26851), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6145,22 +6137,22 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26840), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26844), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26848), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26852), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } @@ -6195,26 +6187,25 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008AED50 */ -static void compact_inverted_rc_track_left_eighth_bank_to_orthogonal( +static void CompactInvertedRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - compact_inverted_rc_track_right_eighth_bank_to_diag( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CompactInvertedRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AED60 */ -static void compact_inverted_rc_track_right_eighth_bank_to_orthogonal( +static void CompactInvertedRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - compact_inverted_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + CompactInvertedRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008AEB80 */ -static void compact_inverted_rc_track_diag_flat( +static void CompactInvertedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6228,7 +6219,7 @@ static void compact_inverted_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26812), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6239,7 +6230,7 @@ static void compact_inverted_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26784), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6255,7 +6246,7 @@ static void compact_inverted_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26809), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6266,7 +6257,7 @@ static void compact_inverted_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26781), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6282,7 +6273,7 @@ static void compact_inverted_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26811), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6293,7 +6284,7 @@ static void compact_inverted_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26783), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6309,7 +6300,7 @@ static void compact_inverted_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26810), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6320,7 +6311,7 @@ static void compact_inverted_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26782), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6353,7 +6344,7 @@ static void compact_inverted_rc_track_diag_flat( } /** rct2: 0x008AEBB0 */ -static void compact_inverted_rc_track_diag_25_deg_up( +static void CompactInvertedRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6367,7 +6358,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26824), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6378,7 +6369,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26796), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6394,7 +6385,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26821), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6405,7 +6396,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26793), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6421,7 +6412,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26823), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6432,7 +6423,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26795), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6448,7 +6439,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26822), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6459,7 +6450,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26794), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6492,7 +6483,7 @@ static void compact_inverted_rc_track_diag_25_deg_up( } /** rct2: 0x008AEC10 */ -static void compact_inverted_rc_track_diag_60_deg_up( +static void CompactInvertedRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6504,7 +6495,7 @@ static void compact_inverted_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26808), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6517,7 +6508,7 @@ static void compact_inverted_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26805), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6530,7 +6521,7 @@ static void compact_inverted_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26807), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6543,7 +6534,7 @@ static void compact_inverted_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26806), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -6575,7 +6566,7 @@ static void compact_inverted_rc_track_diag_60_deg_up( } /** rct2: 0x008AEB90 */ -static void compact_inverted_rc_track_diag_flat_to_25_deg_up( +static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6589,7 +6580,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26816), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6600,7 +6591,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26788), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6616,7 +6607,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26813), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6627,7 +6618,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26785), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6643,7 +6634,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26815), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6654,7 +6645,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26787), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6670,7 +6661,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26814), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6681,7 +6672,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26786), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6714,7 +6705,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008AEBF0 */ -static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( +static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6726,7 +6717,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26800), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6739,7 +6730,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26797), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6752,7 +6743,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26799), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6765,7 +6756,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26798), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -6797,7 +6788,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008AEC00 */ -static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( +static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6809,7 +6800,7 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26804), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6822,7 +6813,7 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26801), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6835,7 +6826,7 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26803), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6848,7 +6839,7 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26802), { -16, -16, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 61 }); + { { 0, 0, height + 61 }, { 16, 16, 3 } }); break; } @@ -6880,7 +6871,7 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008AEBA0 */ -static void compact_inverted_rc_track_diag_25_deg_up_to_flat( +static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6894,7 +6885,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26820), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6905,7 +6896,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26792), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6921,7 +6912,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26817), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6932,7 +6923,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26789), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6948,7 +6939,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26819), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6959,7 +6950,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26791), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6975,7 +6966,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26818), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6986,7 +6977,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26790), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7019,7 +7010,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008AEBE0 */ -static void compact_inverted_rc_track_diag_25_deg_down( +static void CompactInvertedRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7033,7 +7024,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26822), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7044,7 +7035,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26794), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7060,7 +7051,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26823), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7071,7 +7062,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26795), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7087,7 +7078,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26821), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7098,7 +7089,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26793), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7114,7 +7105,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26824), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7125,7 +7116,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26796), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -7158,7 +7149,7 @@ static void compact_inverted_rc_track_diag_25_deg_down( } /** rct2: 0x008AEC40 */ -static void compact_inverted_rc_track_diag_60_deg_down( +static void CompactInvertedRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7170,7 +7161,7 @@ static void compact_inverted_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26806), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7183,7 +7174,7 @@ static void compact_inverted_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26807), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7196,7 +7187,7 @@ static void compact_inverted_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26805), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7209,7 +7200,7 @@ static void compact_inverted_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26808), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } @@ -7241,7 +7232,7 @@ static void compact_inverted_rc_track_diag_60_deg_down( } /** rct2: 0x008AEBC0 */ -static void compact_inverted_rc_track_diag_flat_to_25_deg_down( +static void CompactInvertedRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7255,7 +7246,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26818), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7266,7 +7257,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26790), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7281,7 +7272,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26819), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7292,7 +7283,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26791), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7307,7 +7298,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26817), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7318,7 +7309,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26789), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7333,7 +7324,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26820), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7344,7 +7335,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26792), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7377,7 +7368,7 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008AEC20 */ -static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( +static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7389,7 +7380,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26802), { -16, -16, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 61 }); + { { 0, 0, height + 61 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7402,7 +7393,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26803), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7415,7 +7406,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26801), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7428,7 +7419,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26804), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -7460,7 +7451,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008AEC30 */ -static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( +static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7472,7 +7463,7 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26798), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7485,7 +7476,7 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26799), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7498,7 +7489,7 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26797), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7511,7 +7502,7 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26800), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -7543,7 +7534,7 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008AEBD0 */ -static void compact_inverted_rc_track_diag_25_deg_down_to_flat( +static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7557,7 +7548,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26814), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7568,7 +7559,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26786), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7584,7 +7575,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26815), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7595,7 +7586,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26787), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7611,7 +7602,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26813), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7622,7 +7613,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26785), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7638,7 +7629,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26816), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7649,7 +7640,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26788), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7682,7 +7673,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008AEC70 */ -static void compact_inverted_rc_track_diag_flat_to_left_bank( +static void CompactInvertedRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7694,7 +7685,7 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26876), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7707,7 +7698,7 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26873), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7720,7 +7711,7 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26875), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7733,7 +7724,7 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26874), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7766,7 +7757,7 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008AEC80 */ -static void compact_inverted_rc_track_diag_flat_to_right_bank( +static void CompactInvertedRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7778,7 +7769,7 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26880), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7791,7 +7782,7 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26877), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7804,7 +7795,7 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26879), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7817,7 +7808,7 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26878), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7850,7 +7841,7 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008AEC90 */ -static void compact_inverted_rc_track_diag_left_bank_to_flat( +static void CompactInvertedRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7862,7 +7853,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26878), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7875,7 +7866,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26879), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7888,7 +7879,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26877), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7901,7 +7892,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26880), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7934,7 +7925,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008AECA0 */ -static void compact_inverted_rc_track_diag_right_bank_to_flat( +static void CompactInvertedRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7946,7 +7937,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26874), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7959,7 +7950,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26875), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7972,7 +7963,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26873), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7985,7 +7976,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26876), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -8018,7 +8009,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008AECD0 */ -static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( +static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8030,7 +8021,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26892), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8043,7 +8034,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26889), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8056,7 +8047,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26891), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8069,7 +8060,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26890), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8101,7 +8092,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008AECE0 */ -static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( +static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8113,7 +8104,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26896), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8126,7 +8117,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26893), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8139,7 +8130,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26895), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8152,7 +8143,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26894), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8184,7 +8175,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008AECB0 */ -static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( +static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8196,7 +8187,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26884), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8209,7 +8200,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26881), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8222,7 +8213,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26883), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8235,7 +8226,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26882), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8267,7 +8258,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008AECC0 */ -static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( +static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8279,7 +8270,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26888), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8292,7 +8283,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26885), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8305,7 +8296,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26887), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8318,7 +8309,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26886), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8350,7 +8341,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008AECF0 */ -static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( +static void CompactInvertedRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8362,7 +8353,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26886), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8374,7 +8365,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26887), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8386,7 +8377,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26885), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8398,7 +8389,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26888), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8430,7 +8421,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008AED00 */ -static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( +static void CompactInvertedRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8442,7 +8433,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26882), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8454,7 +8445,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26883), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8466,7 +8457,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26881), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8478,7 +8469,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26884), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8510,7 +8501,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008AED10 */ -static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( +static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8522,7 +8513,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26894), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8535,7 +8526,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26895), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8548,7 +8539,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26893), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8561,7 +8552,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26896), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8593,7 +8584,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008AED20 */ -static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( +static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8605,7 +8596,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26890), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8618,7 +8609,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26891), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8631,7 +8622,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26889), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8644,7 +8635,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26892), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8676,7 +8667,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008AEC50 */ -static void compact_inverted_rc_track_diag_left_bank( +static void CompactInvertedRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8688,7 +8679,7 @@ static void compact_inverted_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26872), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8701,7 +8692,7 @@ static void compact_inverted_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26869), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8714,7 +8705,7 @@ static void compact_inverted_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26871), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8727,7 +8718,7 @@ static void compact_inverted_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26870), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -8760,7 +8751,7 @@ static void compact_inverted_rc_track_diag_left_bank( } /** rct2: 0x008AEC60 */ -static void compact_inverted_rc_track_diag_right_bank( +static void CompactInvertedRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8772,7 +8763,7 @@ static void compact_inverted_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26870), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8785,7 +8776,7 @@ static void compact_inverted_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26871), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8798,7 +8789,7 @@ static void compact_inverted_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26869), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8811,7 +8802,7 @@ static void compact_inverted_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26872), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -8844,7 +8835,7 @@ static void compact_inverted_rc_track_diag_right_bank( } /** rct2: 0x008AEAA0 */ -static void compact_inverted_rc_track_block_brakes( +static void CompactInvertedRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8853,20 +8844,20 @@ static void compact_inverted_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26559), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26559), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26560), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26560), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 38, session.TrackColours[SCHEME_SUPPORTS]); @@ -8876,232 +8867,232 @@ static void compact_inverted_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionCompactInvertedRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return compact_inverted_rc_track_flat; + return CompactInvertedRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return compact_inverted_rc_track_station; + return CompactInvertedRCTrackStation; case TrackElemType::Up25: - return compact_inverted_rc_track_25_deg_up; + return CompactInvertedRCTrack25DegUp; case TrackElemType::Up60: - return compact_inverted_rc_track_60_deg_up; + return CompactInvertedRCTrack60DegUp; case TrackElemType::FlatToUp25: - return compact_inverted_rc_track_flat_to_25_deg_up; + return CompactInvertedRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return compact_inverted_rc_track_25_deg_up_to_60_deg_up; + return CompactInvertedRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return compact_inverted_rc_track_60_deg_up_to_25_deg_up; + return CompactInvertedRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return compact_inverted_rc_track_25_deg_up_to_flat; + return CompactInvertedRCTrack25DegUpToFlat; case TrackElemType::Down25: - return compact_inverted_rc_track_25_deg_down; + return CompactInvertedRCTrack25DegDown; case TrackElemType::Down60: - return compact_inverted_rc_track_60_deg_down; + return CompactInvertedRCTrack60DegDown; case TrackElemType::FlatToDown25: - return compact_inverted_rc_track_flat_to_25_deg_down; + return CompactInvertedRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return compact_inverted_rc_track_25_deg_down_to_60_deg_down; + return CompactInvertedRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return compact_inverted_rc_track_60_deg_down_to_25_deg_down; + return CompactInvertedRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return compact_inverted_rc_track_25_deg_down_to_flat; + return CompactInvertedRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return compact_inverted_rc_track_left_quarter_turn_5; + return CompactInvertedRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return compact_inverted_rc_track_right_quarter_turn_5; + return CompactInvertedRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return compact_inverted_rc_track_flat_to_left_bank; + return CompactInvertedRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return compact_inverted_rc_track_flat_to_right_bank; + return CompactInvertedRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return compact_inverted_rc_track_left_bank_to_flat; + return CompactInvertedRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return compact_inverted_rc_track_right_bank_to_flat; + return CompactInvertedRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return compact_inverted_rc_track_banked_left_quarter_turn_5; + return CompactInvertedRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return compact_inverted_rc_track_banked_right_quarter_turn_5; + return CompactInvertedRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return compact_inverted_rc_track_left_bank_to_25_deg_up; + return CompactInvertedRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return compact_inverted_rc_track_right_bank_to_25_deg_up; + return CompactInvertedRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return compact_inverted_rc_track_25_deg_up_to_left_bank; + return CompactInvertedRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return compact_inverted_rc_track_25_deg_up_to_right_bank; + return CompactInvertedRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return compact_inverted_rc_track_left_bank_to_25_deg_down; + return CompactInvertedRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return compact_inverted_rc_track_right_bank_to_25_deg_down; + return CompactInvertedRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return compact_inverted_rc_track_25_deg_down_to_left_bank; + return CompactInvertedRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return compact_inverted_rc_track_25_deg_down_to_right_bank; + return CompactInvertedRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return compact_inverted_rc_track_left_bank; + return CompactInvertedRCTrackLeftBank; case TrackElemType::RightBank: - return compact_inverted_rc_track_right_bank; + return CompactInvertedRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return compact_inverted_rc_track_left_quarter_turn_5_25_deg_up; + return CompactInvertedRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return compact_inverted_rc_track_right_quarter_turn_5_25_deg_up; + return CompactInvertedRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return compact_inverted_rc_track_left_quarter_turn_5_25_deg_down; + return CompactInvertedRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return compact_inverted_rc_track_right_quarter_turn_5_25_deg_down; + return CompactInvertedRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return compact_inverted_rc_track_s_bend_left; + return CompactInvertedRCTrackSBendLeft; case TrackElemType::SBendRight: - return compact_inverted_rc_track_s_bend_right; + return CompactInvertedRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return compact_inverted_rc_track_left_vertical_loop; + return CompactInvertedRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return compact_inverted_rc_track_right_vertical_loop; + return CompactInvertedRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return compact_inverted_rc_track_left_quarter_turn_3; + return CompactInvertedRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return compact_inverted_rc_track_right_quarter_turn_3; + return CompactInvertedRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return compact_inverted_rc_track_left_quarter_turn_3_bank; + return CompactInvertedRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return compact_inverted_rc_track_right_quarter_turn_3_bank; + return CompactInvertedRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return compact_inverted_rc_track_left_quarter_turn_3_25_deg_up; + return CompactInvertedRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return compact_inverted_rc_track_right_quarter_turn_3_25_deg_up; + return CompactInvertedRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return compact_inverted_rc_track_left_quarter_turn_3_25_deg_down; + return CompactInvertedRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return compact_inverted_rc_track_right_quarter_turn_3_25_deg_down; + return CompactInvertedRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftTwistDownToUp: - return compact_inverted_rc_track_left_twist_down_to_up; + return CompactInvertedRCTrackLeftTwistDownToUp; case TrackElemType::RightTwistDownToUp: - return compact_inverted_rc_track_right_twist_down_to_up; + return CompactInvertedRCTrackRightTwistDownToUp; case TrackElemType::LeftTwistUpToDown: - return compact_inverted_rc_track_left_twist_up_to_down; + return CompactInvertedRCTrackLeftTwistUpToDown; case TrackElemType::RightTwistUpToDown: - return compact_inverted_rc_track_right_twist_up_to_down; + return CompactInvertedRCTrackRightTwistUpToDown; case TrackElemType::HalfLoopUp: - return compact_inverted_rc_track_half_loop_up; + return CompactInvertedRCTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return compact_inverted_rc_track_half_loop_down; + return CompactInvertedRCTrackHalfLoopDown; case TrackElemType::LeftCorkscrewUp: - return compact_inverted_rc_track_left_corkscrew_up; + return CompactInvertedRCTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return compact_inverted_rc_track_right_corkscrew_up; + return CompactInvertedRCTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return compact_inverted_rc_track_left_corkscrew_down; + return CompactInvertedRCTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return compact_inverted_rc_track_right_corkscrew_down; + return CompactInvertedRCTrackRightCorkscrewDown; case TrackElemType::LeftQuarterTurn1TileUp60: - return compact_inverted_rc_track_left_quarter_turn_1_60_deg_up; + return CompactInvertedRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return compact_inverted_rc_track_right_quarter_turn_1_60_deg_up; + return CompactInvertedRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return compact_inverted_rc_track_left_quarter_turn_1_60_deg_down; + return CompactInvertedRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return compact_inverted_rc_track_right_quarter_turn_1_60_deg_down; + return CompactInvertedRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return compact_inverted_rc_track_brakes; + return CompactInvertedRCTrackBrakes; case TrackElemType::LeftQuarterBankedHelixLargeUp: - return compact_inverted_rc_track_left_quarter_banked_helix_large_up; + return CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp; case TrackElemType::RightQuarterBankedHelixLargeUp: - return compact_inverted_rc_track_right_quarter_banked_helix_large_up; + return CompactInvertedRCTrackRightQuarterBankedHelixLargeUp; case TrackElemType::LeftQuarterBankedHelixLargeDown: - return compact_inverted_rc_track_left_quarter_banked_helix_large_down; + return CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown; case TrackElemType::RightQuarterBankedHelixLargeDown: - return compact_inverted_rc_track_right_quarter_banked_helix_large_down; + return CompactInvertedRCTrackRightQuarterBankedHelixLargeDown; case TrackElemType::OnRidePhoto: - return compact_inverted_rc_track_on_ride_photo; + return CompactInvertedRCTrackOnRidePhoto; case TrackElemType::Up90: - return compact_inverted_rc_track_90_deg_up; + return CompactInvertedRCTrack90DegUp; case TrackElemType::Down90: - return compact_inverted_rc_track_90_deg_down; + return CompactInvertedRCTrack90DegDown; case TrackElemType::Up60ToUp90: - return compact_inverted_rc_track_60_deg_up_to_90_deg_up; + return CompactInvertedRCTrack60DegUpTo90DegUp; case TrackElemType::Down90ToDown60: - return compact_inverted_rc_track_90_deg_down_to_60_deg_down; + return CompactInvertedRCTrack90DegDownTo60DegDown; case TrackElemType::Up90ToUp60: - return compact_inverted_rc_track_90_deg_up_to_60_deg_up; + return CompactInvertedRCTrack90DegUpTo60DegUp; case TrackElemType::Down60ToDown90: - return compact_inverted_rc_track_60_deg_down_to_90_deg_down; + return CompactInvertedRCTrack60DegDownTo90DegDown; case TrackElemType::LeftEighthToDiag: - return compact_inverted_rc_track_left_eighth_to_diag; + return CompactInvertedRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return compact_inverted_rc_track_right_eighth_to_diag; + return CompactInvertedRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return compact_inverted_rc_track_left_eighth_to_orthogonal; + return CompactInvertedRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return compact_inverted_rc_track_right_eighth_to_orthogonal; + return CompactInvertedRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return compact_inverted_rc_track_left_eighth_bank_to_diag; + return CompactInvertedRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return compact_inverted_rc_track_right_eighth_bank_to_diag; + return CompactInvertedRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return compact_inverted_rc_track_left_eighth_bank_to_orthogonal; + return CompactInvertedRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return compact_inverted_rc_track_right_eighth_bank_to_orthogonal; + return CompactInvertedRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return compact_inverted_rc_track_diag_flat; + return CompactInvertedRCTrackDiagFlat; case TrackElemType::DiagUp25: - return compact_inverted_rc_track_diag_25_deg_up; + return CompactInvertedRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return compact_inverted_rc_track_diag_60_deg_up; + return CompactInvertedRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return compact_inverted_rc_track_diag_flat_to_25_deg_up; + return CompactInvertedRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up; + return CompactInvertedRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up; + return CompactInvertedRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return compact_inverted_rc_track_diag_25_deg_up_to_flat; + return CompactInvertedRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return compact_inverted_rc_track_diag_25_deg_down; + return CompactInvertedRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return compact_inverted_rc_track_diag_60_deg_down; + return CompactInvertedRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return compact_inverted_rc_track_diag_flat_to_25_deg_down; + return CompactInvertedRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down; + return CompactInvertedRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down; + return CompactInvertedRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return compact_inverted_rc_track_diag_25_deg_down_to_flat; + return CompactInvertedRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return compact_inverted_rc_track_diag_flat_to_left_bank; + return CompactInvertedRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return compact_inverted_rc_track_diag_flat_to_right_bank; + return CompactInvertedRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return compact_inverted_rc_track_diag_left_bank_to_flat; + return CompactInvertedRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return compact_inverted_rc_track_diag_right_bank_to_flat; + return CompactInvertedRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return compact_inverted_rc_track_diag_left_bank_to_25_deg_up; + return CompactInvertedRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return compact_inverted_rc_track_diag_right_bank_to_25_deg_up; + return CompactInvertedRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return compact_inverted_rc_track_diag_25_deg_up_to_left_bank; + return CompactInvertedRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return compact_inverted_rc_track_diag_25_deg_up_to_right_bank; + return CompactInvertedRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return compact_inverted_rc_track_diag_left_bank_to_25_deg_down; + return CompactInvertedRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return compact_inverted_rc_track_diag_right_bank_to_25_deg_down; + return CompactInvertedRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return compact_inverted_rc_track_diag_25_deg_down_to_left_bank; + return CompactInvertedRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return compact_inverted_rc_track_diag_25_deg_down_to_right_bank; + return CompactInvertedRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return compact_inverted_rc_track_diag_left_bank; + return CompactInvertedRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return compact_inverted_rc_track_diag_right_bank; + return CompactInvertedRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return compact_inverted_rc_track_block_brakes; + return CompactInvertedRCTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index f9e020ca5d..2453f27fdf 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ static constexpr const uint32_t _CorkscrewRCBlockBrakeImages[NumOrthogonalDirect }; /** rct2: 0x008A7AF8 */ -static void corkscrew_rc_track_flat( +static void CorkscrewRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -41,26 +41,26 @@ static void corkscrew_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16226), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16226), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16227), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16227), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16228), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16228), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16229), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16229), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -72,17 +72,17 @@ static void corkscrew_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -94,7 +94,7 @@ static void corkscrew_rc_track_flat( } /** rct2: 0x008A7D68, 0x008A7D78, 0x008A7D88 */ -static void corkscrew_rc_track_station( +static void CorkscrewRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -107,29 +107,29 @@ static void corkscrew_rc_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_CorkscrewRCBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A7B08 */ -static void corkscrew_rc_track_25_deg_up( +static void CorkscrewRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -139,26 +139,26 @@ static void corkscrew_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16314), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16314), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16315), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16315), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16316), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16316), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16317), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16317), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -169,26 +169,26 @@ static void corkscrew_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16286), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16286), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16287), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16287), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16288), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16288), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16289), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16289), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -207,7 +207,7 @@ static void corkscrew_rc_track_25_deg_up( } /** rct2: 0x008A7B18 */ -static void corkscrew_rc_track_60_deg_up( +static void CorkscrewRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -217,26 +217,26 @@ static void corkscrew_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16330), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16330), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16331), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16331), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16332), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16332), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16333), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16333), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -247,26 +247,26 @@ static void corkscrew_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16302), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16302), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16303), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16303), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16304), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16304), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16305), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16305), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -285,7 +285,7 @@ static void corkscrew_rc_track_60_deg_up( } /** rct2: 0x008A7B28 */ -static void corkscrew_rc_track_flat_to_25_deg_up( +static void CorkscrewRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -295,26 +295,26 @@ static void corkscrew_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16306), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16306), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16307), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16307), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16308), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16308), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16309), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16309), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -325,26 +325,26 @@ static void corkscrew_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16278), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16278), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16279), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16279), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16280), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16280), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16281), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16281), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -363,7 +363,7 @@ static void corkscrew_rc_track_flat_to_25_deg_up( } /** rct2: 0x008A7B38 */ -static void corkscrew_rc_track_25_deg_up_to_60_deg_up( +static void CorkscrewRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -373,32 +373,32 @@ static void corkscrew_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16318), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16318), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16319), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16319), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16322), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16322), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16320), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16320), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16323), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16323), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16321), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16321), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -409,32 +409,32 @@ static void corkscrew_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16290), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16290), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16291), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16291), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16294), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16294), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16292), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16292), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16295), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16295), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16293), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16293), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -453,7 +453,7 @@ static void corkscrew_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008A7B48 */ -static void corkscrew_rc_track_60_deg_up_to_25_deg_up( +static void CorkscrewRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -463,32 +463,32 @@ static void corkscrew_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16324), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16324), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16325), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16325), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16328), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16328), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16326), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16326), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16329), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16329), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16327), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16327), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -499,32 +499,32 @@ static void corkscrew_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16296), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16296), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16297), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16297), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16300), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16300), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16298), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16298), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16301), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16301), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16299), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16299), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -543,7 +543,7 @@ static void corkscrew_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008A7B58 */ -static void corkscrew_rc_track_25_deg_up_to_flat( +static void CorkscrewRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -553,26 +553,26 @@ static void corkscrew_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16310), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16310), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16311), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16311), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16312), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16312), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16313), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16313), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -583,26 +583,26 @@ static void corkscrew_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16282), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16282), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16283), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16283), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16284), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16284), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16285), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16285), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -621,55 +621,55 @@ static void corkscrew_rc_track_25_deg_up_to_flat( } /** rct2: 0x008A7B68 */ -static void corkscrew_rc_track_25_deg_down( +static void CorkscrewRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7B78 */ -static void corkscrew_rc_track_60_deg_down( +static void CorkscrewRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7B88 */ -static void corkscrew_rc_track_flat_to_25_deg_down( +static void CorkscrewRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7B98 */ -static void corkscrew_rc_track_25_deg_down_to_60_deg_down( +static void CorkscrewRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7BA8 */ -static void corkscrew_rc_track_60_deg_down_to_25_deg_down( +static void CorkscrewRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7BB8 */ -static void corkscrew_rc_track_25_deg_down_to_flat( +static void CorkscrewRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7BC8 */ -static void corkscrew_rc_track_left_quarter_turn_5( +static void CorkscrewRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -681,22 +681,22 @@ static void corkscrew_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16343), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16348), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16353), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16338), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -717,22 +717,22 @@ static void corkscrew_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16342), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16347), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16352), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16337), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -747,22 +747,22 @@ static void corkscrew_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16341), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16346), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16351), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16336), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -778,22 +778,22 @@ static void corkscrew_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16340), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16345), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16350), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16335), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -808,22 +808,22 @@ static void corkscrew_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16339), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16344), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16349), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16334), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -844,16 +844,16 @@ static void corkscrew_rc_track_left_quarter_turn_5( } /** rct2: 0x008A7BD8 */ -static void corkscrew_rc_track_right_quarter_turn_5( +static void CorkscrewRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - corkscrew_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7BE8 */ -static void corkscrew_rc_track_flat_to_left_bank( +static void CorkscrewRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -861,32 +861,32 @@ static void corkscrew_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -897,7 +897,7 @@ static void corkscrew_rc_track_flat_to_left_bank( } /** rct2: 0x008A7BF8 */ -static void corkscrew_rc_track_flat_to_right_bank( +static void CorkscrewRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -905,32 +905,32 @@ static void corkscrew_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -941,7 +941,7 @@ static void corkscrew_rc_track_flat_to_right_bank( } /** rct2: 0x008A7C08 */ -static void corkscrew_rc_track_left_bank_to_flat( +static void CorkscrewRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -949,32 +949,32 @@ static void corkscrew_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -985,7 +985,7 @@ static void corkscrew_rc_track_left_bank_to_flat( } /** rct2: 0x008A7C18 */ -static void corkscrew_rc_track_right_bank_to_flat( +static void CorkscrewRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -993,32 +993,32 @@ static void corkscrew_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1029,7 +1029,7 @@ static void corkscrew_rc_track_right_bank_to_flat( } /** rct2: 0x008A7C28 */ -static void corkscrew_rc_track_banked_left_quarter_turn_5( +static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1041,25 +1041,25 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16363), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16374), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16368), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16373), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16358), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1080,22 +1080,22 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16362), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16367), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16372), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16357), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1110,22 +1110,22 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16361), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16366), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16371), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16356), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1141,22 +1141,22 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16360), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16365), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16370), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16355), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1171,25 +1171,25 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16359), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16364), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16369), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16375), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16354), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1210,16 +1210,16 @@ static void corkscrew_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008A7C38 */ -static void corkscrew_rc_track_banked_right_quarter_turn_5( +static void CorkscrewRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - corkscrew_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7C48 */ -static void corkscrew_rc_track_left_bank_to_25_deg_up( +static void CorkscrewRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1227,32 +1227,32 @@ static void corkscrew_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16250), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16250), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16254), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16254), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16251), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16251), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16255), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16255), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16252), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16252), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16253), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16253), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1270,7 +1270,7 @@ static void corkscrew_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008A7C58 */ -static void corkscrew_rc_track_right_bank_to_25_deg_up( +static void CorkscrewRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1278,32 +1278,32 @@ static void corkscrew_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16256), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16256), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16257), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16257), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16258), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16258), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16260), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16260), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16259), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16259), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16261), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16261), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1321,7 +1321,7 @@ static void corkscrew_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008A7C68 */ -static void corkscrew_rc_track_25_deg_up_to_left_bank( +static void CorkscrewRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1329,32 +1329,32 @@ static void corkscrew_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16262), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16262), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16266), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16266), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16263), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16263), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16267), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16267), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16264), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16264), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16265), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16265), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1372,7 +1372,7 @@ static void corkscrew_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008A7C78 */ -static void corkscrew_rc_track_25_deg_up_to_right_bank( +static void CorkscrewRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1380,32 +1380,32 @@ static void corkscrew_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16268), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16268), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16269), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16269), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16270), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16270), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16272), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16272), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16271), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16271), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16273), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16273), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1423,39 +1423,39 @@ static void corkscrew_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008A7C88 */ -static void corkscrew_rc_track_left_bank_to_25_deg_down( +static void CorkscrewRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7C98 */ -static void corkscrew_rc_track_right_bank_to_25_deg_down( +static void CorkscrewRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CA8 */ -static void corkscrew_rc_track_25_deg_down_to_left_bank( +static void CorkscrewRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CB8 */ -static void corkscrew_rc_track_25_deg_down_to_right_bank( +static void CorkscrewRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CC8 */ -static void corkscrew_rc_track_left_bank( +static void CorkscrewRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1463,26 +1463,26 @@ static void corkscrew_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16274), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16274), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16275), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16275), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16276), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16276), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16277), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16277), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1493,15 +1493,15 @@ static void corkscrew_rc_track_left_bank( } /** rct2: 0x008A7CD8 */ -static void corkscrew_rc_track_right_bank( +static void CorkscrewRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7CE8 */ -static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( +static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1513,22 +1513,22 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16510), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16515), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16520), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16525), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1559,12 +1559,12 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16521), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16526), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1579,17 +1579,17 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16512), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16517), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16522), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1610,7 +1610,7 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16513), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1625,7 +1625,7 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16528), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1640,22 +1640,22 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16514), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16519), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16524), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16529), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1676,7 +1676,7 @@ static void corkscrew_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008A7CF8 */ -static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( +static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1688,22 +1688,22 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16490), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16495), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16500), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16505), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1724,12 +1724,12 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16491), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16496), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1759,17 +1759,17 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16497), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16502), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16507), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1785,7 +1785,7 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16493), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1800,7 +1800,7 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16508), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1815,22 +1815,22 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16494), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16499), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16504), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16509), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1851,25 +1851,25 @@ static void corkscrew_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008A7D08 */ -static void corkscrew_rc_track_left_quarter_turn_5_25_deg_down( +static void CorkscrewRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - corkscrew_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7D18 */ -static void corkscrew_rc_track_right_quarter_turn_5_25_deg_down( +static void CorkscrewRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - corkscrew_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7D28 */ -static void corkscrew_rc_track_s_bend_left( +static void CorkscrewRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1881,22 +1881,22 @@ static void corkscrew_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16402), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16406), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16405), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16409), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1928,12 +1928,12 @@ static void corkscrew_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16404), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16408), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1948,12 +1948,12 @@ static void corkscrew_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16404), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16408), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1982,22 +1982,22 @@ static void corkscrew_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16405), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16409), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16402), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16406), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2018,7 +2018,7 @@ static void corkscrew_rc_track_s_bend_left( } /** rct2: 0x008A7D38 */ -static void corkscrew_rc_track_s_bend_right( +static void CorkscrewRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2030,22 +2030,22 @@ static void corkscrew_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16410), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16414), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16413), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16417), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2063,14 +2063,14 @@ static void corkscrew_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16411), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16415), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2107,14 +2107,14 @@ static void corkscrew_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16411), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16415), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2131,22 +2131,22 @@ static void corkscrew_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16413), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16417), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16410), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16414), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2167,7 +2167,7 @@ static void corkscrew_rc_track_s_bend_right( } /** rct2: 0x008A7D48 */ -static void corkscrew_rc_track_left_vertical_loop( +static void CorkscrewRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2259,22 +2259,22 @@ static void corkscrew_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16564), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16572), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16567), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16575), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2353,22 +2353,22 @@ static void corkscrew_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16567), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16575), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16564), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16572), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2464,7 +2464,7 @@ static void corkscrew_rc_track_left_vertical_loop( } /** rct2: 0x008A7D58 */ -static void corkscrew_rc_track_right_vertical_loop( +static void CorkscrewRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2541,22 +2541,22 @@ static void corkscrew_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16591), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16583), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16588), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16580), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -2625,22 +2625,22 @@ static void corkscrew_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16588), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16580), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16591), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16583), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -2717,11 +2717,11 @@ static void corkscrew_rc_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } /** rct2: 0x008A7D98 */ -static void corkscrew_rc_track_left_quarter_turn_3( +static void CorkscrewRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2733,22 +2733,22 @@ static void corkscrew_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16381), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16384), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16387), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16378), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2769,22 +2769,22 @@ static void corkscrew_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16380), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16383), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16386), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16377), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2797,22 +2797,22 @@ static void corkscrew_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16379), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16382), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16385), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16376), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2833,16 +2833,16 @@ static void corkscrew_rc_track_left_quarter_turn_3( } /** rct2: 0x008A7DA8 */ -static void corkscrew_rc_track_right_quarter_turn_3( +static void CorkscrewRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - corkscrew_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7DB8 */ -static void corkscrew_rc_track_left_quarter_turn_3_bank( +static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2854,25 +2854,25 @@ static void corkscrew_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16393), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16400), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16396), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16399), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16390), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2893,22 +2893,22 @@ static void corkscrew_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16392), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16395), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16398), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16389), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2921,25 +2921,25 @@ static void corkscrew_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16391), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16394), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16397), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16401), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16388), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2960,16 +2960,16 @@ static void corkscrew_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008A7DC8 */ -static void corkscrew_rc_track_right_quarter_turn_3_bank( +static void CorkscrewRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - corkscrew_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7DD8 */ -static void corkscrew_rc_track_left_quarter_turn_3_25_deg_up( +static void CorkscrewRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3056,7 +3056,7 @@ static void corkscrew_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008A7DE8 */ -static void corkscrew_rc_track_right_quarter_turn_3_25_deg_up( +static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3150,25 +3150,25 @@ static void corkscrew_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008A7DF8 */ -static void corkscrew_rc_track_left_quarter_turn_3_25_deg_down( +static void CorkscrewRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - corkscrew_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7E08 */ -static void corkscrew_rc_track_right_quarter_turn_3_25_deg_down( +static void CorkscrewRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - corkscrew_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7E18 */ -static void corkscrew_rc_track_half_loop_up( +static void CorkscrewRCTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3213,21 +3213,21 @@ static void corkscrew_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16595), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16603), { 0, 14, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16600), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3253,7 +3253,7 @@ static void corkscrew_rc_track_half_loop_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16604), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3263,7 +3263,7 @@ static void corkscrew_rc_track_half_loop_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16607), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3308,15 +3308,15 @@ static void corkscrew_rc_track_half_loop_up( } /** rct2: 0x008A7E28 */ -static void corkscrew_rc_track_half_loop_down( +static void CorkscrewRCTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_half_loop_up(session, ride, 3 - trackSequence, direction, height, trackElement); + CorkscrewRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A7E38 */ -static void corkscrew_rc_track_left_corkscrew_up( +static void CorkscrewRCTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3328,26 +3328,26 @@ static void corkscrew_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16610), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16613), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16616), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16619), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - track_paint_util_left_corkscrew_up_supports(session, direction, height); + TrackPaintUtilLeftCorkscrewUpSupports(session, direction, height); if (direction == 0 || direction == 3) { @@ -3361,22 +3361,22 @@ static void corkscrew_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16611), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16614), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16617), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16620), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3388,22 +3388,22 @@ static void corkscrew_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16612), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16615), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16618), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16621), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -3427,7 +3427,7 @@ static void corkscrew_rc_track_left_corkscrew_up( } /** rct2: 0x008A7E48 */ -static void corkscrew_rc_track_right_corkscrew_up( +static void CorkscrewRCTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3439,22 +3439,22 @@ static void corkscrew_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16622), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16625), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16628), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16631), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3473,22 +3473,22 @@ static void corkscrew_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16623), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16626), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16629), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16632), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3500,22 +3500,22 @@ static void corkscrew_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16624), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16627), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16630), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16633), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -3539,23 +3539,23 @@ static void corkscrew_rc_track_right_corkscrew_up( } /** rct2: 0x008A7E58 */ -static void corkscrew_rc_track_left_corkscrew_down( +static void CorkscrewRCTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_right_corkscrew_up(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7E68 */ -static void corkscrew_rc_track_right_corkscrew_down( +static void CorkscrewRCTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_left_corkscrew_up(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7E78 */ -static void corkscrew_rc_track_left_half_banked_helix_up_small( +static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3567,25 +3567,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16481), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16488), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16484), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16487), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16478), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3607,22 +3607,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16480), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16483), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16486), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16477), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3635,25 +3635,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16479), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16482), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16485), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16489), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16476), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3677,25 +3677,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16478), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16481), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16488), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16484), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16487), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3722,22 +3722,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16477), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16480), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16483), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16486), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3750,25 +3750,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16476), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16479), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16482), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16485), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16489), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3785,7 +3785,7 @@ static void corkscrew_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x008A7E88 */ -static void corkscrew_rc_track_right_half_banked_helix_up_small( +static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3797,25 +3797,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16462), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16465), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16468), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16471), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16475), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3837,22 +3837,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16463), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16466), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16469), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16472), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3865,25 +3865,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16464), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16467), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16474), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16470), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16473), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3907,25 +3907,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16465), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16468), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16471), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16475), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16462), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3952,22 +3952,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16466), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16469), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16472), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16463), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3980,25 +3980,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16467), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16474), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16470), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16473), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16464), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4015,7 +4015,7 @@ static void corkscrew_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x008A7E98 */ -static void corkscrew_rc_track_left_half_banked_helix_down_small( +static void CorkscrewRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4025,12 +4025,11 @@ static void corkscrew_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - corkscrew_rc_track_right_half_banked_helix_up_small( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7EA8 */ -static void corkscrew_rc_track_right_half_banked_helix_down_small( +static void CorkscrewRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4040,11 +4039,11 @@ static void corkscrew_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - corkscrew_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7EB8 */ -static void corkscrew_rc_track_left_half_banked_helix_up_large( +static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4056,25 +4055,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16449), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16460), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16454), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16459), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16444), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4096,22 +4095,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16448), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16453), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16458), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16443), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4126,22 +4125,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16447), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16452), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16457), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16442), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4157,22 +4156,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16446), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16451), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16456), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16441), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4187,25 +4186,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16445), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16450), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16455), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16461), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16440), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4229,25 +4228,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16444), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16449), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16460), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16454), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16459), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4274,22 +4273,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16443), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16448), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16453), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16458), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4304,22 +4303,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16442), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16447), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16452), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16457), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4335,22 +4334,22 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16441), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16446), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16451), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16456), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4365,25 +4364,25 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16440), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16445), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16455), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16461), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4400,7 +4399,7 @@ static void corkscrew_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x008A7EC8 */ -static void corkscrew_rc_track_right_half_banked_helix_up_large( +static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4412,25 +4411,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16418), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16423), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16428), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16433), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16439), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4452,22 +4451,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16419), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16424), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16429), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16434), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4482,22 +4481,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16420), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16425), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16430), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16435), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4513,22 +4512,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16421), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16426), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16431), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16436), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4543,25 +4542,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16422), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16427), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16438), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16432), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16437), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4585,25 +4584,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16423), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16428), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16433), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16439), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16418), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4630,22 +4629,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16424), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16429), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16434), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16419), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4660,22 +4659,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16425), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16430), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16435), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16420), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4691,22 +4690,22 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16426), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16431), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16436), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16421), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4721,25 +4720,25 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16427), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16438), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16432), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16437), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16422), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4756,7 +4755,7 @@ static void corkscrew_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x008A7ED8 */ -static void corkscrew_rc_track_left_half_banked_helix_down_large( +static void CorkscrewRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4766,12 +4765,11 @@ static void corkscrew_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - corkscrew_rc_track_right_half_banked_helix_up_large( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7EE8 */ -static void corkscrew_rc_track_right_half_banked_helix_down_large( +static void CorkscrewRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4781,11 +4779,11 @@ static void corkscrew_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - corkscrew_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7F18 */ -static void corkscrew_rc_track_left_quarter_turn_1_60_deg_up( +static void CorkscrewRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4793,44 +4791,44 @@ static void corkscrew_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16555), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16555), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16559), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16559), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16556), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16556), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16560), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16560), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16557), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16557), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16561), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16561), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16554), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16554), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16558), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16558), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A7EF8 */ -static void corkscrew_rc_track_right_quarter_turn_1_60_deg_up( +static void CorkscrewRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4838,60 +4836,60 @@ static void corkscrew_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16546), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16546), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16550), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16550), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16547), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16547), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16551), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16551), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16548), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16548), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16552), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16552), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16549), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16549), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16553), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16553), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A7F08 */ -static void corkscrew_rc_track_left_quarter_turn_1_60_deg_down( +static void CorkscrewRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + CorkscrewRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7F28 */ -static void corkscrew_rc_track_right_quarter_turn_1_60_deg_down( +static void CorkscrewRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + CorkscrewRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7F38 */ -static void corkscrew_rc_track_brakes( +static void CorkscrewRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4900,17 +4898,17 @@ static void corkscrew_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16230), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16230), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16231), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16231), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4921,7 +4919,7 @@ static void corkscrew_rc_track_brakes( } /** rct2: 0x008A7F48 */ -static void corkscrew_rc_track_on_ride_photo( +static void CorkscrewRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4933,8 +4931,8 @@ static void corkscrew_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4942,8 +4940,8 @@ static void corkscrew_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4951,8 +4949,8 @@ static void corkscrew_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4960,18 +4958,18 @@ static void corkscrew_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008A8198 */ -static void corkscrew_rc_track_flat_to_60_deg_up_long_base( +static void CorkscrewRCTrackFlatTo60DegUpLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4983,25 +4981,25 @@ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16788), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16792), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16796), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16800), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5019,25 +5017,25 @@ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16789), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16793), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16797), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16801), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5051,25 +5049,25 @@ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16790), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16794), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16798), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16802), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5083,25 +5081,25 @@ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16791), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16795), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16799), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16803), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5122,7 +5120,7 @@ static void corkscrew_rc_track_flat_to_60_deg_up_long_base( } /** rct2: 0x008A81A8 */ -static void corkscrew_rc_track_60_deg_up_to_flat_long_base( +static void CorkscrewRCTrack60DegUpToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5134,25 +5132,25 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16804), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16808), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16812), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16816), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5170,25 +5168,25 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16805), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16809), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16813), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16817), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5202,25 +5200,25 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16806), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16810), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16814), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16818), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5234,25 +5232,25 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16807), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16811), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16815), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16819), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5273,23 +5271,23 @@ static void corkscrew_rc_track_60_deg_up_to_flat_long_base( } /** rct2: 0x008A81B8 */ -static void corkscrew_rc_track_60_deg_down_to_flat_long_base( +static void CorkscrewRCTrack60DegDownToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_flat_to_60_deg_up_long_base(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackFlatTo60DegUpLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A81C8 */ -static void corkscrew_rc_track_flat_to_60_deg_down_long_base( +static void CorkscrewRCTrackFlatTo60DegDownLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - corkscrew_rc_track_60_deg_up_to_flat_long_base(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrack60DegUpToFlatLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7F68 */ -static void corkscrew_rc_track_left_eighth_to_diag( +static void CorkscrewRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5301,22 +5299,22 @@ static void corkscrew_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16740), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16744), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16748), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16752), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5334,22 +5332,22 @@ static void corkscrew_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16741), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16745), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16749), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16753), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5364,22 +5362,22 @@ static void corkscrew_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16742), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16746), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16750), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16754), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5398,28 +5396,28 @@ static void corkscrew_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16743), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16747), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16751), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16755), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5434,7 +5432,7 @@ static void corkscrew_rc_track_left_eighth_to_diag( } /** rct2: 0x008A7F78 */ -static void corkscrew_rc_track_right_eighth_to_diag( +static void CorkscrewRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5446,22 +5444,22 @@ static void corkscrew_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16724), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16728), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16732), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16736), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5479,22 +5477,22 @@ static void corkscrew_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16725), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16729), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16733), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16737), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5509,22 +5507,22 @@ static void corkscrew_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16726), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16730), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16734), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16738), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5543,28 +5541,28 @@ static void corkscrew_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16727), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16731), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16735), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16739), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5579,25 +5577,25 @@ static void corkscrew_rc_track_right_eighth_to_diag( } /** rct2: 0x008A7F88 */ -static void corkscrew_rc_track_left_eighth_to_orthogonal( +static void CorkscrewRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - corkscrew_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7F98 */ -static void corkscrew_rc_track_right_eighth_to_orthogonal( +static void CorkscrewRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - corkscrew_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + CorkscrewRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A7FA8 */ -static void corkscrew_rc_track_left_eighth_bank_to_diag( +static void CorkscrewRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5609,22 +5607,22 @@ static void corkscrew_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16772), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16776), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16780), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16784), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5642,22 +5640,22 @@ static void corkscrew_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16773), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16777), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16781), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16785), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5672,22 +5670,22 @@ static void corkscrew_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16774), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16778), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16782), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16786), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5706,28 +5704,28 @@ static void corkscrew_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16775), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16779), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16783), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16787), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5742,7 +5740,7 @@ static void corkscrew_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008A7FB8 */ -static void corkscrew_rc_track_right_eighth_bank_to_diag( +static void CorkscrewRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5754,22 +5752,22 @@ static void corkscrew_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16756), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16760), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16764), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16768), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5787,22 +5785,22 @@ static void corkscrew_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16757), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16761), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16765), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16769), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5817,22 +5815,22 @@ static void corkscrew_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16758), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16762), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16766), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16770), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5851,28 +5849,28 @@ static void corkscrew_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16759), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16763), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16767), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16771), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5887,25 +5885,25 @@ static void corkscrew_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008A7FC8 */ -static void corkscrew_rc_track_left_eighth_bank_to_orthogonal( +static void CorkscrewRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - corkscrew_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + CorkscrewRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7FD8 */ -static void corkscrew_rc_track_right_eighth_bank_to_orthogonal( +static void CorkscrewRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - corkscrew_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + CorkscrewRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A7F58 */ -static void corkscrew_rc_track_diag_flat( +static void CorkscrewRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5919,7 +5917,7 @@ static void corkscrew_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16699), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5930,7 +5928,7 @@ static void corkscrew_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16637), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5946,7 +5944,7 @@ static void corkscrew_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16696), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5957,7 +5955,7 @@ static void corkscrew_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16634), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5973,7 +5971,7 @@ static void corkscrew_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16698), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5984,7 +5982,7 @@ static void corkscrew_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16636), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6004,7 +6002,7 @@ static void corkscrew_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16697), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6029,7 +6027,7 @@ static void corkscrew_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16635), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6051,7 +6049,7 @@ static void corkscrew_rc_track_diag_flat( } /** rct2: 0x008A8008 */ -static void corkscrew_rc_track_diag_25_deg_up( +static void CorkscrewRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6065,7 +6063,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16711), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6076,7 +6074,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16649), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6092,7 +6090,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16708), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6103,7 +6101,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16646), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6119,7 +6117,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16710), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6130,7 +6128,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16648), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6150,7 +6148,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16709), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6175,7 +6173,7 @@ static void corkscrew_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16647), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6197,7 +6195,7 @@ static void corkscrew_rc_track_diag_25_deg_up( } /** rct2: 0x008A8068 */ -static void corkscrew_rc_track_diag_60_deg_up( +static void CorkscrewRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6211,7 +6209,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16723), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6222,7 +6220,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16661), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6238,7 +6236,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16720), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6249,7 +6247,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16658), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6265,7 +6263,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16722), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6276,7 +6274,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16660), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6296,7 +6294,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16721), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6321,7 +6319,7 @@ static void corkscrew_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16659), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6343,7 +6341,7 @@ static void corkscrew_rc_track_diag_60_deg_up( } /** rct2: 0x008A7FE8 */ -static void corkscrew_rc_track_diag_flat_to_25_deg_up( +static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6357,7 +6355,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16703), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6368,7 +6366,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16641), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6384,7 +6382,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16700), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6395,7 +6393,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16638), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6411,7 +6409,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16702), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6422,7 +6420,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16640), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6442,7 +6440,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16701), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6467,7 +6465,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16639), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6489,7 +6487,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A8048 */ -static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( +static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6503,7 +6501,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16715), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6514,7 +6512,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16653), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6530,7 +6528,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16712), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6541,7 +6539,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16650), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6557,7 +6555,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16714), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6568,7 +6566,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16652), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6588,7 +6586,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16713), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6613,7 +6611,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16651), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6635,7 +6633,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008A8058 */ -static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( +static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6649,7 +6647,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16719), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6660,7 +6658,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16657), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6676,7 +6674,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16716), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6687,7 +6685,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16654), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6703,7 +6701,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16718), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6714,7 +6712,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16656), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6734,7 +6732,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16717), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6759,7 +6757,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16655), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6781,7 +6779,7 @@ static void corkscrew_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008A7FF8 */ -static void corkscrew_rc_track_diag_25_deg_up_to_flat( +static void CorkscrewRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6795,7 +6793,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16707), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6806,7 +6804,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16645), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6822,7 +6820,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16704), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6833,7 +6831,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16642), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6849,7 +6847,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16706), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6860,7 +6858,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16644), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6880,7 +6878,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16705), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6905,7 +6903,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16643), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6927,7 +6925,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A8038 */ -static void corkscrew_rc_track_diag_25_deg_down( +static void CorkscrewRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6941,7 +6939,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16709), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6952,7 +6950,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16647), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6968,7 +6966,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16710), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6979,7 +6977,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16648), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6995,7 +6993,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16708), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7006,7 +7004,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16646), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7026,7 +7024,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16711), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7051,7 +7049,7 @@ static void corkscrew_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16649), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7073,7 +7071,7 @@ static void corkscrew_rc_track_diag_25_deg_down( } /** rct2: 0x008A8098 */ -static void corkscrew_rc_track_diag_60_deg_down( +static void CorkscrewRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7087,7 +7085,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16721), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7098,7 +7096,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16659), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7114,7 +7112,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16722), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7125,7 +7123,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16660), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7141,7 +7139,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16720), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7152,7 +7150,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16658), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7172,7 +7170,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16723), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7197,7 +7195,7 @@ static void corkscrew_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16661), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7219,7 +7217,7 @@ static void corkscrew_rc_track_diag_60_deg_down( } /** rct2: 0x008A8018 */ -static void corkscrew_rc_track_diag_flat_to_25_deg_down( +static void CorkscrewRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7233,7 +7231,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16705), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7244,7 +7242,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16643), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7259,7 +7257,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16706), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7270,7 +7268,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16644), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7285,7 +7283,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16704), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7296,7 +7294,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16642), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7315,7 +7313,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16707), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7340,7 +7338,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16645), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7363,7 +7361,7 @@ static void corkscrew_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A8078 */ -static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( +static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7377,7 +7375,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16717), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -7388,7 +7386,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16655), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -7404,7 +7402,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16718), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7415,7 +7413,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16656), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7431,7 +7429,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16716), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7442,7 +7440,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16654), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7462,7 +7460,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16719), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7487,7 +7485,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16657), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7509,7 +7507,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008A8088 */ -static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( +static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7523,7 +7521,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16713), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7534,7 +7532,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16651), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7550,7 +7548,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16714), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7561,7 +7559,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16652), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7577,7 +7575,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16712), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7588,7 +7586,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16650), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7608,7 +7606,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16715), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7633,7 +7631,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16653), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7655,7 +7653,7 @@ static void corkscrew_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008A8028 */ -static void corkscrew_rc_track_diag_25_deg_down_to_flat( +static void CorkscrewRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7669,7 +7667,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16701), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7680,7 +7678,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16639), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7696,7 +7694,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16702), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7707,7 +7705,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16640), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7723,7 +7721,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16700), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7734,7 +7732,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16638), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7754,7 +7752,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16703), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7779,7 +7777,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16641), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7801,7 +7799,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A80C8 */ -static void corkscrew_rc_track_diag_flat_to_left_bank( +static void CorkscrewRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7813,7 +7811,7 @@ static void corkscrew_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16669), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7826,10 +7824,10 @@ static void corkscrew_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16666), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16670), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7842,7 +7840,7 @@ static void corkscrew_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16668), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7859,7 +7857,7 @@ static void corkscrew_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16667), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7880,7 +7878,7 @@ static void corkscrew_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008A80D8 */ -static void corkscrew_rc_track_diag_flat_to_right_bank( +static void CorkscrewRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7892,7 +7890,7 @@ static void corkscrew_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16674), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7905,7 +7903,7 @@ static void corkscrew_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16671), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7918,10 +7916,10 @@ static void corkscrew_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16673), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16675), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7938,7 +7936,7 @@ static void corkscrew_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16672), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7959,7 +7957,7 @@ static void corkscrew_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008A80E8 */ -static void corkscrew_rc_track_diag_left_bank_to_flat( +static void CorkscrewRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7971,7 +7969,7 @@ static void corkscrew_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16672), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7984,10 +7982,10 @@ static void corkscrew_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16673), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16675), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8000,7 +7998,7 @@ static void corkscrew_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16671), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8017,7 +8015,7 @@ static void corkscrew_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16674), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8038,7 +8036,7 @@ static void corkscrew_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008A80F8 */ -static void corkscrew_rc_track_diag_right_bank_to_flat( +static void CorkscrewRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8050,7 +8048,7 @@ static void corkscrew_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16667), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8063,7 +8061,7 @@ static void corkscrew_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16668), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8076,10 +8074,10 @@ static void corkscrew_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16666), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16670), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8096,7 +8094,7 @@ static void corkscrew_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16669), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8117,7 +8115,7 @@ static void corkscrew_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008A8128 */ -static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( +static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8129,7 +8127,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16689), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8142,10 +8140,10 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16686), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16690), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8158,7 +8156,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16688), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8175,7 +8173,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16687), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8196,7 +8194,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008A8138 */ -static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( +static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8208,7 +8206,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16694), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8221,7 +8219,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16691), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8234,10 +8232,10 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16693), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16695), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8254,7 +8252,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16692), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8275,7 +8273,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008A8108 */ -static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( +static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8287,7 +8285,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16679), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8300,10 +8298,10 @@ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16676), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16680), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8316,7 +8314,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16678), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8333,7 +8331,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16677), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8354,7 +8352,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008A8118 */ -static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( +static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8366,7 +8364,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16684), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8379,7 +8377,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16681), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8392,10 +8390,10 @@ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16683), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16685), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8412,7 +8410,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16682), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8433,7 +8431,7 @@ static void corkscrew_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008A8148 */ -static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( +static void CorkscrewRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8445,7 +8443,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16682), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8457,10 +8455,10 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16683), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16685), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8472,7 +8470,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16681), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8488,7 +8486,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16684), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8510,7 +8508,7 @@ static void corkscrew_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008A8158 */ -static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( +static void CorkscrewRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8522,7 +8520,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16677), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8534,7 +8532,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16678), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8546,10 +8544,10 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16676), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16680), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8565,7 +8563,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16679), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8587,7 +8585,7 @@ static void corkscrew_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008A8168 */ -static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( +static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8599,7 +8597,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16692), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8612,10 +8610,10 @@ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16693), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16695), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8628,7 +8626,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16691), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8645,7 +8643,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16694), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8666,7 +8664,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008A8178 */ -static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( +static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8678,7 +8676,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16687), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8691,7 +8689,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16688), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8704,10 +8702,10 @@ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16686), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16690), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8724,7 +8722,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16689), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8745,7 +8743,7 @@ static void corkscrew_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008A80A8 */ -static void corkscrew_rc_track_diag_left_bank( +static void CorkscrewRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8757,7 +8755,7 @@ static void corkscrew_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16665), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8770,7 +8768,7 @@ static void corkscrew_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16662), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8783,7 +8781,7 @@ static void corkscrew_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16664), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8800,7 +8798,7 @@ static void corkscrew_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16663), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8821,7 +8819,7 @@ static void corkscrew_rc_track_diag_left_bank( } /** rct2: 0x008A80B8 */ -static void corkscrew_rc_track_diag_right_bank( +static void CorkscrewRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8833,7 +8831,7 @@ static void corkscrew_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16663), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8846,7 +8844,7 @@ static void corkscrew_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16664), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8859,7 +8857,7 @@ static void corkscrew_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16662), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8876,7 +8874,7 @@ static void corkscrew_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16665), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8897,14 +8895,14 @@ static void corkscrew_rc_track_diag_right_bank( } /** rct2: 0x008A8188 */ -static void corkscrew_rc_track_block_brakes( +static void CorkscrewRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_CorkscrewRCBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight( @@ -8912,13 +8910,13 @@ static void corkscrew_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void corkscrew_rc_track_booster( +static void CorkscrewRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - if (!is_csg_loaded()) + if (!IsCsgLoaded()) { - corkscrew_rc_track_brakes(session, ride, trackSequence, direction, height, trackElement); + CorkscrewRCTrackBrakes(session, ride, trackSequence, direction, height, trackElement); return; } @@ -8933,22 +8931,22 @@ static void corkscrew_rc_track_booster( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(sprite_ne_sw_behind), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(sprite_ne_sw_after), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(sprite_nw_se_behind), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(sprite_nw_se_after), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8958,7 +8956,7 @@ static void corkscrew_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void corkscrew_rc_track_left_twist_down_to_up( +static void CorkscrewRCTrackLeftTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9075,7 +9073,7 @@ static void corkscrew_rc_track_left_twist_down_to_up( } } -static void corkscrew_rc_track_right_twist_down_to_up( +static void CorkscrewRCTrackRightTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9192,7 +9190,7 @@ static void corkscrew_rc_track_right_twist_down_to_up( } } -static void corkscrew_rc_track_left_twist_up_to_down( +static void CorkscrewRCTrackLeftTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9309,7 +9307,7 @@ static void corkscrew_rc_track_left_twist_up_to_down( } } -static void corkscrew_rc_track_right_twist_up_to_down( +static void CorkscrewRCTrackRightTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9426,239 +9424,239 @@ static void corkscrew_rc_track_right_twist_up_to_down( } } -TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionCorkscrewRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return corkscrew_rc_track_flat; + return CorkscrewRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return corkscrew_rc_track_station; + return CorkscrewRCTrackStation; case TrackElemType::Up25: - return corkscrew_rc_track_25_deg_up; + return CorkscrewRCTrack25DegUp; case TrackElemType::Up60: - return corkscrew_rc_track_60_deg_up; + return CorkscrewRCTrack60DegUp; case TrackElemType::FlatToUp25: - return corkscrew_rc_track_flat_to_25_deg_up; + return CorkscrewRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return corkscrew_rc_track_25_deg_up_to_60_deg_up; + return CorkscrewRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return corkscrew_rc_track_60_deg_up_to_25_deg_up; + return CorkscrewRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return corkscrew_rc_track_25_deg_up_to_flat; + return CorkscrewRCTrack25DegUpToFlat; case TrackElemType::Down25: - return corkscrew_rc_track_25_deg_down; + return CorkscrewRCTrack25DegDown; case TrackElemType::Down60: - return corkscrew_rc_track_60_deg_down; + return CorkscrewRCTrack60DegDown; case TrackElemType::FlatToDown25: - return corkscrew_rc_track_flat_to_25_deg_down; + return CorkscrewRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return corkscrew_rc_track_25_deg_down_to_60_deg_down; + return CorkscrewRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return corkscrew_rc_track_60_deg_down_to_25_deg_down; + return CorkscrewRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return corkscrew_rc_track_25_deg_down_to_flat; + return CorkscrewRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return corkscrew_rc_track_left_quarter_turn_5; + return CorkscrewRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return corkscrew_rc_track_right_quarter_turn_5; + return CorkscrewRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return corkscrew_rc_track_flat_to_left_bank; + return CorkscrewRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return corkscrew_rc_track_flat_to_right_bank; + return CorkscrewRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return corkscrew_rc_track_left_bank_to_flat; + return CorkscrewRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return corkscrew_rc_track_right_bank_to_flat; + return CorkscrewRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return corkscrew_rc_track_banked_left_quarter_turn_5; + return CorkscrewRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return corkscrew_rc_track_banked_right_quarter_turn_5; + return CorkscrewRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return corkscrew_rc_track_left_bank_to_25_deg_up; + return CorkscrewRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return corkscrew_rc_track_right_bank_to_25_deg_up; + return CorkscrewRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return corkscrew_rc_track_25_deg_up_to_left_bank; + return CorkscrewRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return corkscrew_rc_track_25_deg_up_to_right_bank; + return CorkscrewRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return corkscrew_rc_track_left_bank_to_25_deg_down; + return CorkscrewRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return corkscrew_rc_track_right_bank_to_25_deg_down; + return CorkscrewRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return corkscrew_rc_track_25_deg_down_to_left_bank; + return CorkscrewRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return corkscrew_rc_track_25_deg_down_to_right_bank; + return CorkscrewRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return corkscrew_rc_track_left_bank; + return CorkscrewRCTrackLeftBank; case TrackElemType::RightBank: - return corkscrew_rc_track_right_bank; + return CorkscrewRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return corkscrew_rc_track_left_quarter_turn_5_25_deg_up; + return CorkscrewRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return corkscrew_rc_track_right_quarter_turn_5_25_deg_up; + return CorkscrewRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return corkscrew_rc_track_left_quarter_turn_5_25_deg_down; + return CorkscrewRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return corkscrew_rc_track_right_quarter_turn_5_25_deg_down; + return CorkscrewRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return corkscrew_rc_track_s_bend_left; + return CorkscrewRCTrackSBendLeft; case TrackElemType::SBendRight: - return corkscrew_rc_track_s_bend_right; + return CorkscrewRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return corkscrew_rc_track_left_vertical_loop; + return CorkscrewRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return corkscrew_rc_track_right_vertical_loop; + return CorkscrewRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return corkscrew_rc_track_left_quarter_turn_3; + return CorkscrewRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return corkscrew_rc_track_right_quarter_turn_3; + return CorkscrewRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return corkscrew_rc_track_left_quarter_turn_3_bank; + return CorkscrewRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return corkscrew_rc_track_right_quarter_turn_3_bank; + return CorkscrewRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return corkscrew_rc_track_left_quarter_turn_3_25_deg_up; + return CorkscrewRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return corkscrew_rc_track_right_quarter_turn_3_25_deg_up; + return CorkscrewRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return corkscrew_rc_track_left_quarter_turn_3_25_deg_down; + return CorkscrewRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return corkscrew_rc_track_right_quarter_turn_3_25_deg_down; + return CorkscrewRCTrackRightQuarterTurn325DegDown; case TrackElemType::HalfLoopUp: - return corkscrew_rc_track_half_loop_up; + return CorkscrewRCTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return corkscrew_rc_track_half_loop_down; + return CorkscrewRCTrackHalfLoopDown; case TrackElemType::LeftCorkscrewUp: - return corkscrew_rc_track_left_corkscrew_up; + return CorkscrewRCTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return corkscrew_rc_track_right_corkscrew_up; + return CorkscrewRCTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return corkscrew_rc_track_left_corkscrew_down; + return CorkscrewRCTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return corkscrew_rc_track_right_corkscrew_down; + return CorkscrewRCTrackRightCorkscrewDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return corkscrew_rc_track_left_half_banked_helix_up_small; + return CorkscrewRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return corkscrew_rc_track_right_half_banked_helix_up_small; + return CorkscrewRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return corkscrew_rc_track_left_half_banked_helix_down_small; + return CorkscrewRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return corkscrew_rc_track_right_half_banked_helix_down_small; + return CorkscrewRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return corkscrew_rc_track_left_half_banked_helix_up_large; + return CorkscrewRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return corkscrew_rc_track_right_half_banked_helix_up_large; + return CorkscrewRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return corkscrew_rc_track_left_half_banked_helix_down_large; + return CorkscrewRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return corkscrew_rc_track_right_half_banked_helix_down_large; + return CorkscrewRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return corkscrew_rc_track_left_quarter_turn_1_60_deg_up; + return CorkscrewRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return corkscrew_rc_track_right_quarter_turn_1_60_deg_up; + return CorkscrewRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return corkscrew_rc_track_left_quarter_turn_1_60_deg_down; + return CorkscrewRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return corkscrew_rc_track_right_quarter_turn_1_60_deg_down; + return CorkscrewRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return corkscrew_rc_track_brakes; + return CorkscrewRCTrackBrakes; case TrackElemType::OnRidePhoto: - return corkscrew_rc_track_on_ride_photo; + return CorkscrewRCTrackOnRidePhoto; case TrackElemType::FlatToUp60LongBase: - return corkscrew_rc_track_flat_to_60_deg_up_long_base; + return CorkscrewRCTrackFlatTo60DegUpLongBase; case TrackElemType::Up60ToFlatLongBase: - return corkscrew_rc_track_60_deg_up_to_flat_long_base; + return CorkscrewRCTrack60DegUpToFlatLongBase; case TrackElemType::Down60ToFlatLongBase: - return corkscrew_rc_track_60_deg_down_to_flat_long_base; + return CorkscrewRCTrack60DegDownToFlatLongBase; case TrackElemType::FlatToDown60LongBase: - return corkscrew_rc_track_flat_to_60_deg_down_long_base; + return CorkscrewRCTrackFlatTo60DegDownLongBase; case TrackElemType::LeftEighthToDiag: - return corkscrew_rc_track_left_eighth_to_diag; + return CorkscrewRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return corkscrew_rc_track_right_eighth_to_diag; + return CorkscrewRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return corkscrew_rc_track_left_eighth_to_orthogonal; + return CorkscrewRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return corkscrew_rc_track_right_eighth_to_orthogonal; + return CorkscrewRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return corkscrew_rc_track_left_eighth_bank_to_diag; + return CorkscrewRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return corkscrew_rc_track_right_eighth_bank_to_diag; + return CorkscrewRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return corkscrew_rc_track_left_eighth_bank_to_orthogonal; + return CorkscrewRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return corkscrew_rc_track_right_eighth_bank_to_orthogonal; + return CorkscrewRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return corkscrew_rc_track_diag_flat; + return CorkscrewRCTrackDiagFlat; case TrackElemType::DiagUp25: - return corkscrew_rc_track_diag_25_deg_up; + return CorkscrewRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return corkscrew_rc_track_diag_60_deg_up; + return CorkscrewRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return corkscrew_rc_track_diag_flat_to_25_deg_up; + return CorkscrewRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return corkscrew_rc_track_diag_25_deg_up_to_60_deg_up; + return CorkscrewRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return corkscrew_rc_track_diag_60_deg_up_to_25_deg_up; + return CorkscrewRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return corkscrew_rc_track_diag_25_deg_up_to_flat; + return CorkscrewRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return corkscrew_rc_track_diag_25_deg_down; + return CorkscrewRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return corkscrew_rc_track_diag_60_deg_down; + return CorkscrewRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return corkscrew_rc_track_diag_flat_to_25_deg_down; + return CorkscrewRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return corkscrew_rc_track_diag_25_deg_down_to_60_deg_down; + return CorkscrewRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return corkscrew_rc_track_diag_60_deg_down_to_25_deg_down; + return CorkscrewRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return corkscrew_rc_track_diag_25_deg_down_to_flat; + return CorkscrewRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return corkscrew_rc_track_diag_flat_to_left_bank; + return CorkscrewRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return corkscrew_rc_track_diag_flat_to_right_bank; + return CorkscrewRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return corkscrew_rc_track_diag_left_bank_to_flat; + return CorkscrewRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return corkscrew_rc_track_diag_right_bank_to_flat; + return CorkscrewRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return corkscrew_rc_track_diag_left_bank_to_25_deg_up; + return CorkscrewRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return corkscrew_rc_track_diag_right_bank_to_25_deg_up; + return CorkscrewRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return corkscrew_rc_track_diag_25_deg_up_to_left_bank; + return CorkscrewRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return corkscrew_rc_track_diag_25_deg_up_to_right_bank; + return CorkscrewRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return corkscrew_rc_track_diag_left_bank_to_25_deg_down; + return CorkscrewRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return corkscrew_rc_track_diag_right_bank_to_25_deg_down; + return CorkscrewRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return corkscrew_rc_track_diag_25_deg_down_to_left_bank; + return CorkscrewRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return corkscrew_rc_track_diag_25_deg_down_to_right_bank; + return CorkscrewRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return corkscrew_rc_track_diag_left_bank; + return CorkscrewRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return corkscrew_rc_track_diag_right_bank; + return CorkscrewRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return corkscrew_rc_track_block_brakes; + return CorkscrewRCTrackBlockBrakes; case TrackElemType::Booster: - return corkscrew_rc_track_booster; + return CorkscrewRCTrackBooster; case TrackElemType::LeftTwistDownToUp: - return corkscrew_rc_track_left_twist_down_to_up; + return CorkscrewRCTrackLeftTwistDownToUp; case TrackElemType::RightTwistDownToUp: - return corkscrew_rc_track_right_twist_down_to_up; + return CorkscrewRCTrackRightTwistDownToUp; case TrackElemType::LeftTwistUpToDown: - return corkscrew_rc_track_left_twist_up_to_down; + return CorkscrewRCTrackLeftTwistUpToDown; case TrackElemType::RightTwistUpToDown: - return corkscrew_rc_track_right_twist_up_to_down; + return CorkscrewRCTrackRightTwistUpToDown; } return nullptr; } diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index 7369a76ff9..6247b6ae37 100644 --- a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,7 +20,7 @@ #include "BolligerMabillardTrack.hpp" /** rct2: 0x007C6FF4 */ -static void flying_rc_track_flat( +static void FlyingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -33,25 +33,25 @@ static void flying_rc_track_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17486), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17487), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17488), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17489), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -65,16 +65,16 @@ static void flying_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -95,13 +95,13 @@ static void flying_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27131), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27132), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } } @@ -113,20 +113,20 @@ static void flying_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -138,7 +138,7 @@ static void flying_rc_track_flat( } /** rct2: 0x007C7244, 0x007C7254, 0x007C7264 */ -static void flying_rc_track_station( +static void FlyingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -152,15 +152,15 @@ static void flying_rc_track_station( }; PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); } else { @@ -175,19 +175,19 @@ static void flying_rc_track_station( { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); } PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -196,7 +196,7 @@ static void flying_rc_track_station( } /** rct2: 0x007C7004 */ -static void flying_rc_track_25_deg_up( +static void FlyingRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -209,22 +209,22 @@ static void flying_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17498), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17499), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17500), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17501), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } @@ -235,26 +235,26 @@ static void flying_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17204), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17205), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17206), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17207), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -280,22 +280,22 @@ static void flying_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27249), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27250), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27251), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27252), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } } @@ -306,29 +306,29 @@ static void flying_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27221), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27222), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27223), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27224), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -364,7 +364,7 @@ static void flying_rc_track_25_deg_up( } /** rct2: 0x007C7014 */ -static void flying_rc_track_60_deg_up( +static void FlyingRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -374,26 +374,26 @@ static void flying_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17220), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17220), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17221), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17221), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17222), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17222), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17223), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17223), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -417,22 +417,22 @@ static void flying_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27237), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27238), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27239), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27240), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -450,7 +450,7 @@ static void flying_rc_track_60_deg_up( } /** rct2: 0x007C7024 */ -static void flying_rc_track_flat_to_25_deg_up( +static void FlyingRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -463,22 +463,22 @@ static void flying_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17490), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17491), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17492), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17493), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } @@ -489,26 +489,26 @@ static void flying_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17196), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17197), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17198), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17199), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -534,22 +534,22 @@ static void flying_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27241), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27242), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27243), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27244), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } @@ -560,29 +560,29 @@ static void flying_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27213), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27214), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27215), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27216), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -618,7 +618,7 @@ static void flying_rc_track_flat_to_25_deg_up( } /** rct2: 0x007C7034 */ -static void flying_rc_track_25_deg_up_to_60_deg_up( +static void FlyingRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -628,32 +628,32 @@ static void flying_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17208), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17208), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17209), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17209), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17212), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17212), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17210), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17210), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17213), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17213), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17211), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17211), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -677,28 +677,28 @@ static void flying_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27225), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27229), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27226), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27230), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27227), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27228), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -716,7 +716,7 @@ static void flying_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x007C7044 */ -static void flying_rc_track_60_deg_up_to_25_deg_up( +static void FlyingRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -726,32 +726,32 @@ static void flying_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17214), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17214), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17215), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17215), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17218), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17218), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17216), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17216), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17219), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17219), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17217), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17217), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -775,34 +775,34 @@ static void flying_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27231), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27235), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27232), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27236), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27233), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27234), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -838,7 +838,7 @@ static void flying_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x007C7054 */ -static void flying_rc_track_25_deg_up_to_flat( +static void FlyingRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -851,22 +851,22 @@ static void flying_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17494), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17495), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17496), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17497), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } @@ -877,26 +877,26 @@ static void flying_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17200), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17201), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17202), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17203), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -922,22 +922,22 @@ static void flying_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27245), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27246), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27247), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27248), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } @@ -948,29 +948,29 @@ static void flying_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27217), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27218), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27219), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27220), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1006,55 +1006,55 @@ static void flying_rc_track_25_deg_up_to_flat( } /** rct2: 0x007C7064 */ -static void flying_rc_track_25_deg_down( +static void FlyingRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7074 */ -static void flying_rc_track_60_deg_down( +static void FlyingRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7084 */ -static void flying_rc_track_flat_to_25_deg_down( +static void FlyingRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7094 */ -static void flying_rc_track_25_deg_down_to_60_deg_down( +static void FlyingRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C70A4 */ -static void flying_rc_track_60_deg_down_to_25_deg_down( +static void FlyingRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C70B4 */ -static void flying_rc_track_25_deg_down_to_flat( +static void FlyingRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C70C4 */ -static void flying_rc_track_left_quarter_turn_5( +static void FlyingRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1068,22 +1068,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17259), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17264), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17269), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17254), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -1105,22 +1105,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17258), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17263), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17268), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17253), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1136,22 +1136,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17257), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17262), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17267), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17252), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1167,22 +1167,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17256), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17261), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17266), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17251), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1198,22 +1198,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17255), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17260), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17265), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17250), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -1243,22 +1243,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27142), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27147), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27152), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27137), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1283,22 +1283,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27141), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27146), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27151), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27136), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1314,22 +1314,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27140), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27145), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27150), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27135), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1345,22 +1345,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27139), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27144), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27149), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27134), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1376,22 +1376,22 @@ static void flying_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27138), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27143), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27148), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27133), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -1417,16 +1417,16 @@ static void flying_rc_track_left_quarter_turn_5( } /** rct2: 0x007C70D4 */ -static void flying_rc_track_right_quarter_turn_5( +static void FlyingRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C70E4 */ -static void flying_rc_track_flat_to_left_bank( +static void FlyingRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1436,32 +1436,32 @@ static void flying_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1478,22 +1478,22 @@ static void flying_rc_track_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27269), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27270), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27271), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27272), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1501,7 +1501,7 @@ static void flying_rc_track_flat_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -1513,7 +1513,7 @@ static void flying_rc_track_flat_to_left_bank( } /** rct2: 0x007C70F4 */ -static void flying_rc_track_flat_to_right_bank( +static void FlyingRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1523,32 +1523,32 @@ static void flying_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1565,22 +1565,22 @@ static void flying_rc_track_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27273), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27274), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27275), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27276), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1588,7 +1588,7 @@ static void flying_rc_track_flat_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -1600,7 +1600,7 @@ static void flying_rc_track_flat_to_right_bank( } /** rct2: 0x007C7104 */ -static void flying_rc_track_left_bank_to_flat( +static void FlyingRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1610,32 +1610,32 @@ static void flying_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17162), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17166), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17163), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17167), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17160), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17161), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1652,22 +1652,22 @@ static void flying_rc_track_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27275), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27276), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27273), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27274), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1675,7 +1675,7 @@ static void flying_rc_track_left_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -1687,7 +1687,7 @@ static void flying_rc_track_left_bank_to_flat( } /** rct2: 0x007C7114 */ -static void flying_rc_track_right_bank_to_flat( +static void FlyingRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1697,32 +1697,32 @@ static void flying_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17158), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17159), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17156), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17164), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17157), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17165), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1739,22 +1739,22 @@ static void flying_rc_track_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27271), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27272), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27269), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27270), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1762,7 +1762,7 @@ static void flying_rc_track_right_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -1774,7 +1774,7 @@ static void flying_rc_track_right_bank_to_flat( } /** rct2: 0x007C7124 */ -static void flying_rc_track_banked_left_quarter_turn_5( +static void FlyingRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1788,25 +1788,25 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17279), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17290), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17284), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17289), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17274), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -1828,22 +1828,22 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17278), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17283), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17288), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17273), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1859,22 +1859,22 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17277), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17282), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17287), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17272), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1890,22 +1890,22 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17276), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17281), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17286), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17271), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1921,25 +1921,25 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17275), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17280), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17285), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17291), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17270), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -1969,22 +1969,22 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27162), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27167), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27172), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27157), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } @@ -2019,12 +2019,12 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27171), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27156), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2040,17 +2040,17 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27160), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27165), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 24 }); + { { 16, 16, height + 24 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27170), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -2071,7 +2071,7 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27159), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -2086,7 +2086,7 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27154), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2102,22 +2102,22 @@ static void flying_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27158), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27163), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27168), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27153), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -2143,16 +2143,16 @@ static void flying_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x007C7134 */ -static void flying_rc_track_banked_right_quarter_turn_5( +static void FlyingRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C7144 */ -static void flying_rc_track_left_bank_to_25_deg_up( +static void FlyingRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2162,32 +2162,32 @@ static void flying_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17168), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17168), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17172), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17172), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17169), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17169), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17173), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17173), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17170), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17170), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17171), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17171), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2211,22 +2211,22 @@ static void flying_rc_track_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27277), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27278), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27279), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27280), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2234,7 +2234,7 @@ static void flying_rc_track_left_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2270,7 +2270,7 @@ static void flying_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x007C7154 */ -static void flying_rc_track_right_bank_to_25_deg_up( +static void FlyingRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2280,32 +2280,32 @@ static void flying_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17174), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17174), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17175), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17175), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17176), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17176), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17178), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17178), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17177), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17177), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17179), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17179), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2329,22 +2329,22 @@ static void flying_rc_track_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27281), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27282), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27283), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27284), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2352,7 +2352,7 @@ static void flying_rc_track_right_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2388,7 +2388,7 @@ static void flying_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x007C7164 */ -static void flying_rc_track_25_deg_up_to_left_bank( +static void FlyingRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2398,32 +2398,32 @@ static void flying_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17180), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17180), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17184), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17184), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17181), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17181), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17185), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17185), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17182), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17182), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17183), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17183), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2447,22 +2447,22 @@ static void flying_rc_track_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27285), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27286), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27287), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27288), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2470,7 +2470,7 @@ static void flying_rc_track_25_deg_up_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2506,7 +2506,7 @@ static void flying_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x007C7174 */ -static void flying_rc_track_25_deg_up_to_right_bank( +static void FlyingRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2516,32 +2516,32 @@ static void flying_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17186), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17186), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17187), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17187), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17188), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17188), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17190), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17190), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17189), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17189), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17191), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17191), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2565,22 +2565,22 @@ static void flying_rc_track_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27289), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27290), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27291), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27292), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2588,7 +2588,7 @@ static void flying_rc_track_25_deg_up_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2624,39 +2624,39 @@ static void flying_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x007C7184 */ -static void flying_rc_track_left_bank_to_25_deg_down( +static void FlyingRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7194 */ -static void flying_rc_track_right_bank_to_25_deg_down( +static void FlyingRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C71A4 */ -static void flying_rc_track_25_deg_down_to_left_bank( +static void FlyingRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C71B4 */ -static void flying_rc_track_25_deg_down_to_right_bank( +static void FlyingRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C71C4 */ -static void flying_rc_track_left_bank( +static void FlyingRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2666,26 +2666,26 @@ static void flying_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17192), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17192), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17193), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17193), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17194), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17194), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17195), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17195), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2702,22 +2702,22 @@ static void flying_rc_track_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27293), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27294), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27295), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27296), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -2725,7 +2725,7 @@ static void flying_rc_track_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -2737,15 +2737,15 @@ static void flying_rc_track_left_bank( } /** rct2: 0x007C71D4 */ -static void flying_rc_track_right_bank( +static void FlyingRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C71E4 */ -static void flying_rc_track_left_quarter_turn_5_25_deg_up( +static void FlyingRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2759,22 +2759,22 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17344), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17349), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17354), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17359), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -2806,12 +2806,12 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17355), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17360), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2827,17 +2827,17 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17346), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17351), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17356), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -2858,7 +2858,7 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17347), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -2873,7 +2873,7 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17362), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2889,22 +2889,22 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17348), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17353), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17358), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17363), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3108,7 +3108,7 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x007C71F4 */ -static void flying_rc_track_right_quarter_turn_5_25_deg_up( +static void FlyingRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3122,22 +3122,22 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17324), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17329), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17334), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17339), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3159,12 +3159,12 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17325), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17330), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3195,17 +3195,17 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17331), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17336), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17341), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3221,7 +3221,7 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17327), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -3236,7 +3236,7 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17342), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3252,22 +3252,22 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17328), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17333), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17338), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17343), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3471,25 +3471,25 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x007C7204 */ -static void flying_rc_track_left_quarter_turn_5_25_deg_down( +static void FlyingRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C7214 */ -static void flying_rc_track_right_quarter_turn_5_25_deg_down( +static void FlyingRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C7224 */ -static void flying_rc_track_s_bend_left( +static void FlyingRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3503,22 +3503,22 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17308), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17312), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17311), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17315), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3551,12 +3551,12 @@ static void flying_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17310), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17314), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3572,12 +3572,12 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17310), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17314), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3607,22 +3607,22 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17311), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17315), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17308), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17312), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3652,22 +3652,22 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27253), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27257), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27256), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27260), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3688,22 +3688,22 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27254), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27258), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27255), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27259), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; } @@ -3732,22 +3732,22 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27255), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27259), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27254), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27258), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; } @@ -3776,22 +3776,22 @@ static void flying_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27256), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27260), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27253), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27257), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3816,7 +3816,7 @@ static void flying_rc_track_s_bend_left( } /** rct2: 0x007C7234 */ -static void flying_rc_track_s_bend_right( +static void FlyingRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3830,22 +3830,22 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17316), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17320), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17319), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17323), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3864,14 +3864,14 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17317), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17321), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3909,14 +3909,14 @@ static void flying_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17317), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17321), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3934,22 +3934,22 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17319), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17323), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17316), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17320), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3979,22 +3979,22 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27261), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27265), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27264), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27268), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4015,22 +4015,22 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27262), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27266), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27263), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27267), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; } @@ -4059,22 +4059,22 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27263), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27267), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27262), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27266), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; } @@ -4103,22 +4103,22 @@ static void flying_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27264), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27268), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27261), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27265), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4143,7 +4143,7 @@ static void flying_rc_track_s_bend_right( } /** rct2: 0x007C7274 */ -static void flying_rc_track_left_quarter_turn_3( +static void FlyingRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4157,22 +4157,22 @@ static void flying_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17229), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17232), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17235), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17226), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4194,22 +4194,22 @@ static void flying_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17228), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17231), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17234), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17225), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4222,22 +4222,22 @@ static void flying_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17227), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17230), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17233), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17224), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4267,22 +4267,22 @@ static void flying_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27392), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27395), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27398), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27389), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4307,22 +4307,22 @@ static void flying_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27391), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27394), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27397), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27388), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4335,22 +4335,22 @@ static void flying_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27390), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27393), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27396), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27387), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -4376,16 +4376,16 @@ static void flying_rc_track_left_quarter_turn_3( } /** rct2: 0x007C7284 */ -static void flying_rc_track_right_quarter_turn_3( +static void FlyingRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C7294 */ -static void flying_rc_track_left_quarter_turn_3_bank( +static void FlyingRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4399,25 +4399,25 @@ static void flying_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17241), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17248), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17244), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17247), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17238), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4439,22 +4439,22 @@ static void flying_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17240), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17243), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17246), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17237), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4467,25 +4467,25 @@ static void flying_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17239), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17242), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17245), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17249), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17236), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4515,22 +4515,22 @@ static void flying_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27404), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27407), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27410), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27401), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4555,22 +4555,22 @@ static void flying_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27403), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27406), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27409), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27400), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4583,22 +4583,22 @@ static void flying_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27402), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27405), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27408), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27399), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -4624,16 +4624,16 @@ static void flying_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x007C72A4 */ -static void flying_rc_track_right_quarter_turn_3_bank( +static void FlyingRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C72B4 */ -static void flying_rc_track_left_quarter_turn_3_25_deg_up( +static void FlyingRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4816,7 +4816,7 @@ static void flying_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x007C72C4 */ -static void flying_rc_track_right_quarter_turn_3_25_deg_up( +static void FlyingRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5005,25 +5005,25 @@ static void flying_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x007C72D4 */ -static void flying_rc_track_left_quarter_turn_3_25_deg_down( +static void FlyingRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C72E4 */ -static void flying_rc_track_right_quarter_turn_3_25_deg_down( +static void FlyingRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C7314 */ -static void flying_rc_track_left_half_banked_helix_up_small( +static void FlyingRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5035,25 +5035,25 @@ static void flying_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17399), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17406), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17402), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17405), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17396), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5076,22 +5076,22 @@ static void flying_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17398), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17401), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17404), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17395), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5104,25 +5104,25 @@ static void flying_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17397), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17400), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17403), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17407), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17394), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5147,25 +5147,25 @@ static void flying_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17396), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17399), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17406), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17402), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17405), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5193,22 +5193,22 @@ static void flying_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17395), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17398), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17401), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17404), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5221,25 +5221,25 @@ static void flying_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17394), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17397), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17400), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17403), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17407), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5257,7 +5257,7 @@ static void flying_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x007C7324 */ -static void flying_rc_track_right_half_banked_helix_up_small( +static void FlyingRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5269,25 +5269,25 @@ static void flying_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17380), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17383), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17386), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17389), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17393), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5310,22 +5310,22 @@ static void flying_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17381), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17384), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17387), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17390), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5338,25 +5338,25 @@ static void flying_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17382), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17385), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17392), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17388), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17391), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5381,25 +5381,25 @@ static void flying_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17383), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17386), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17389), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17393), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17380), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5427,22 +5427,22 @@ static void flying_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17384), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17387), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17390), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17381), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5455,25 +5455,25 @@ static void flying_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17385), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17392), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17388), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17391), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17382), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5491,7 +5491,7 @@ static void flying_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x007C7334 */ -static void flying_rc_track_left_half_banked_helix_down_small( +static void FlyingRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5501,11 +5501,11 @@ static void flying_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C7344 */ -static void flying_rc_track_right_half_banked_helix_down_small( +static void FlyingRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5515,11 +5515,11 @@ static void flying_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C7354 */ -static void flying_rc_track_left_half_banked_helix_up_large( +static void FlyingRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5531,25 +5531,25 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17439), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17444), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17449), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17434), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5572,22 +5572,22 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17438), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17443), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17448), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17433), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5602,22 +5602,22 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17437), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17442), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17447), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17432), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5633,22 +5633,22 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17436), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17441), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17446), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17431), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5663,25 +5663,25 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17435), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17440), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17445), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17451), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17430), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5706,25 +5706,25 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17434), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17439), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17450), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17444), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17449), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5752,22 +5752,22 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17433), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17438), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17443), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17448), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5782,22 +5782,22 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17432), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17437), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17442), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17447), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5813,22 +5813,22 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17431), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17436), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17441), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17446), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5843,25 +5843,25 @@ static void flying_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17430), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17435), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17440), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17445), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17451), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5879,7 +5879,7 @@ static void flying_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x007C7364 */ -static void flying_rc_track_right_half_banked_helix_up_large( +static void FlyingRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5891,25 +5891,25 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17408), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17413), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17418), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17423), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17429), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5932,22 +5932,22 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17409), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17414), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17419), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17424), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5962,22 +5962,22 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17410), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17415), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17420), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17425), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5993,22 +5993,22 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17411), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17416), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17421), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17426), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6023,25 +6023,25 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17412), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17417), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17428), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17422), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17427), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6066,25 +6066,25 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17413), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17418), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17423), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17429), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17408), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6112,22 +6112,22 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17414), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17419), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17424), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17409), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6142,22 +6142,22 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17415), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17420), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17425), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17410), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6173,22 +6173,22 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17416), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17421), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17426), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17411), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6203,25 +6203,25 @@ static void flying_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17417), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17428), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17422), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17427), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17412), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -6239,7 +6239,7 @@ static void flying_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x007C7374 */ -static void flying_rc_track_left_half_banked_helix_down_large( +static void FlyingRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6249,11 +6249,11 @@ static void flying_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C7384 */ -static void flying_rc_track_right_half_banked_helix_down_large( +static void FlyingRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6263,11 +6263,11 @@ static void flying_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C73B4 */ -static void flying_rc_track_left_quarter_turn_1_60_deg_up( +static void FlyingRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6277,35 +6277,35 @@ static void flying_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17301), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17301), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17305), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17305), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17302), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17302), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17306), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17306), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17303), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17303), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17307), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17307), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17300), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17300), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17304), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17304), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } } @@ -6316,45 +6316,45 @@ static void flying_rc_track_left_quarter_turn_1_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27352), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27348), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27353), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27349), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27354), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27350), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27351), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27347), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; } } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x007C7394 */ -static void flying_rc_track_right_quarter_turn_1_60_deg_up( +static void FlyingRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6364,35 +6364,35 @@ static void flying_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17292), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17292), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17296), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17296), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17293), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17293), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17297), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17297), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17294), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17294), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17298), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17298), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17295), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17295), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17299), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17299), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } } @@ -6403,60 +6403,60 @@ static void flying_rc_track_right_quarter_turn_1_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27343), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27339), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27344), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27340), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27345), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27341), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27346), { 0, 0, height - 5 }, - { 28, 28, 3 }, { 2, 2, height - 5 }); + { { 2, 2, height - 5 }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27342), { 0, 0, height - 5 }, - { 28, 28, 1 }, { 2, 2, height + 94 }); + { { 2, 2, height + 94 }, { 28, 28, 1 } }); break; } } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x007C73A4 */ -static void flying_rc_track_left_quarter_turn_1_60_deg_down( +static void FlyingRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C73C4 */ -static void flying_rc_track_right_quarter_turn_1_60_deg_down( +static void FlyingRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C73D4 */ -static void flying_rc_track_brakes( +static void FlyingRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6467,17 +6467,17 @@ static void flying_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17148), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17148), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17149), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17149), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6495,19 +6495,19 @@ static void flying_rc_track_brakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27337), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27338), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -6518,25 +6518,25 @@ static void flying_rc_track_brakes( } } -static void flying_rc_track_booster( +static void FlyingRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (!trackElement.IsInverted()) { - bolliger_mabillard_track_booster( + BolligerMabillardTrackBooster( session, ride, trackSequence, direction, height, trackElement); } else { const auto imageId = (direction & 1) ? SPR_G2_BM_INVERT_BOOSTER_2 : SPR_G2_BM_INVERT_BOOSTER_1; PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { 0, 0, height + 24 }, { 32, 20, 1 }, - { 0, 6, height + 22 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -6548,7 +6548,7 @@ static void flying_rc_track_booster( } /** rct2: 0x007C7674 */ -static void flying_rc_track_left_quarter_banked_helix_large_up( +static void FlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6560,22 +6560,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27202), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27207), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27212), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27197), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; } @@ -6600,22 +6600,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27201), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27206), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27211), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27196), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6630,22 +6630,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27200), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27205), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27210), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27195), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6661,22 +6661,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27199), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27204), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27209), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27194), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6691,22 +6691,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27198), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27203), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27208), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27193), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; } @@ -6731,7 +6731,7 @@ static void flying_rc_track_left_quarter_banked_helix_large_up( } /** rct2: 0x007C7684 */ -static void flying_rc_track_right_quarter_banked_helix_large_up( +static void FlyingRCTrackRightQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6743,22 +6743,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27173), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27178), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27183), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27188), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; } @@ -6783,22 +6783,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27174), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27179), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27184), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27189), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6813,22 +6813,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27175), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27180), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27185), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27190), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6844,22 +6844,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27176), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27181), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27186), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27191), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6874,22 +6874,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27177), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27182), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27187), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27192), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; } @@ -6914,7 +6914,7 @@ static void flying_rc_track_right_quarter_banked_helix_large_up( } /** rct2: 0x007C7694 */ -static void flying_rc_track_left_quarter_banked_helix_large_down( +static void FlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6926,22 +6926,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27182), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27187), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27192), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27177), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; } @@ -6966,22 +6966,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27181), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27186), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27191), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27176), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6996,22 +6996,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27180), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27185), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27190), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27175), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7027,22 +7027,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27179), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27184), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27189), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27174), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7057,22 +7057,22 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27178), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27183), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27188), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27173), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; } @@ -7097,7 +7097,7 @@ static void flying_rc_track_left_quarter_banked_helix_large_down( } /** rct2: 0x007C76A4 */ -static void flying_rc_track_right_quarter_banked_helix_large_down( +static void FlyingRCTrackRightQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7109,22 +7109,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27193), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27198), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27203), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27208), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; } @@ -7149,22 +7149,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27194), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27199), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27204), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27209), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7179,22 +7179,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27195), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27200), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27205), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27210), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7210,22 +7210,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27196), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27201), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27206), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27211), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7240,22 +7240,22 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27197), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27202), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27207), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27212), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; } @@ -7280,7 +7280,7 @@ static void flying_rc_track_right_quarter_banked_helix_large_down( } /** rct2: 0x007C78B4 */ -static void flying_rc_track_25_deg_up_left_banked( +static void FlyingRCTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7290,26 +7290,26 @@ static void flying_rc_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17914), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17914), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17915), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17915), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17916), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17916), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17917), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17917), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7333,28 +7333,28 @@ static void flying_rc_track_25_deg_up_left_banked( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27711), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27712), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27713), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27714), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -7390,7 +7390,7 @@ static void flying_rc_track_25_deg_up_left_banked( } /** rct2: 0x007C78C4 */ -static void flying_rc_track_25_deg_up_right_banked( +static void FlyingRCTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7400,26 +7400,26 @@ static void flying_rc_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17918), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17918), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17919), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17919), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17920), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17920), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17921), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17921), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7443,28 +7443,28 @@ static void flying_rc_track_25_deg_up_right_banked( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27715), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27716), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27717), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27718), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -7500,7 +7500,7 @@ static void flying_rc_track_25_deg_up_right_banked( } /** rct2: 0x007C73E4 */ -static void flying_rc_track_on_ride_photo( +static void FlyingRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7516,8 +7516,8 @@ static void flying_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -7527,8 +7527,8 @@ static void flying_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -7538,8 +7538,8 @@ static void flying_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7549,11 +7549,11 @@ static void flying_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -7571,7 +7571,7 @@ static void flying_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -7582,7 +7582,7 @@ static void flying_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -7593,7 +7593,7 @@ static void flying_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7604,10 +7604,10 @@ static void flying_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); @@ -7615,23 +7615,23 @@ static void flying_rc_track_on_ride_photo( } /** rct2: 0x007C78D4 */ -static void flying_rc_track_25_deg_down_left_banked( +static void FlyingRCTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_right_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpRightBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C78E4 */ -static void flying_rc_track_25_deg_down_right_banked( +static void FlyingRCTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_left_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpLeftBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7404 */ -static void flying_rc_track_left_eighth_to_diag( +static void FlyingRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7645,22 +7645,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17546), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17550), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17554), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17558), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -7679,22 +7679,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17547), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17551), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17555), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17559), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7710,22 +7710,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17548), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17552), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17556), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17560), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7744,28 +7744,28 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17549), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17553), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17557), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17561), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7789,22 +7789,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27507), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27511), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27515), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27519), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -7825,22 +7825,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27508), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27512), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27516), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27520), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7856,22 +7856,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27509), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27513), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27517), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27521), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7890,22 +7890,22 @@ static void flying_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27510), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27514), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27518), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27522), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; } @@ -7941,7 +7941,7 @@ static void flying_rc_track_left_eighth_to_diag( } /** rct2: 0x007C7414 */ -static void flying_rc_track_right_eighth_to_diag( +static void FlyingRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7955,22 +7955,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17530), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17534), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17538), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17542), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -7989,22 +7989,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17531), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17535), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17539), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17543), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8020,22 +8020,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17532), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17536), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17540), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17544), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8054,28 +8054,28 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17533), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17537), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17541), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17545), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8099,22 +8099,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27491), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27495), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27499), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27503), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -8135,22 +8135,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27492), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27496), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27500), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27504), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8166,22 +8166,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27493), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27497), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27501), { 0, 0, height + 24 }, - { 28, 28, 3 }, { 4, 4, height + 22 }); + { { 4, 4, height + 22 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27505), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8200,22 +8200,22 @@ static void flying_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27494), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27498), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27502), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27506), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } @@ -8251,25 +8251,25 @@ static void flying_rc_track_right_eighth_to_diag( } /** rct2: 0x007C7424 */ -static void flying_rc_track_left_eighth_to_orthogonal( +static void FlyingRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - flying_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7434 */ -static void flying_rc_track_right_eighth_to_orthogonal( +static void FlyingRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - flying_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + FlyingRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x007C7444 */ -static void flying_rc_track_left_eighth_bank_to_diag( +static void FlyingRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8283,22 +8283,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17578), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17582), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17586), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17590), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -8317,22 +8317,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17579), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17583), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17587), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17591), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8348,22 +8348,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17580), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17584), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17588), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17592), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8382,28 +8382,28 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17581), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17585), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17589), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17593), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8427,22 +8427,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27539), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27543), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27547), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27551), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -8463,22 +8463,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27540), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27544), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27548), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27552), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8494,22 +8494,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27541), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27545), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27549), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27553), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8528,22 +8528,22 @@ static void flying_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27542), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27546), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27550), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27554), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; } @@ -8579,7 +8579,7 @@ static void flying_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x007C7454 */ -static void flying_rc_track_right_eighth_bank_to_diag( +static void FlyingRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8593,22 +8593,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17562), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17566), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17570), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17574), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -8627,22 +8627,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17563), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17567), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17571), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17575), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8658,22 +8658,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17564), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17568), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17572), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17576), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8692,28 +8692,28 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17565), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17569), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17573), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17577), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8737,22 +8737,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27523), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27527), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27531), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27535), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -8773,22 +8773,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27524), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27528), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27532), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27536), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8804,22 +8804,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27525), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27529), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27533), { 0, 0, height + 24 }, - { 28, 28, 3 }, { 4, 4, height + 22 }); + { { 4, 4, height + 22 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27537), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8838,22 +8838,22 @@ static void flying_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27526), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27530), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27534), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27538), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } @@ -8889,25 +8889,25 @@ static void flying_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x007C7464 */ -static void flying_rc_track_left_eighth_bank_to_orthogonal( +static void FlyingRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - flying_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7474 */ -static void flying_rc_track_right_eighth_bank_to_orthogonal( +static void FlyingRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - flying_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + FlyingRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x007C73F4 */ -static void flying_rc_track_diag_flat( +static void FlyingRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8923,7 +8923,7 @@ static void flying_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17861), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8934,7 +8934,7 @@ static void flying_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17791), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8950,7 +8950,7 @@ static void flying_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17858), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8961,7 +8961,7 @@ static void flying_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17788), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8977,7 +8977,7 @@ static void flying_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17860), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8988,7 +8988,7 @@ static void flying_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17790), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9008,7 +9008,7 @@ static void flying_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17859), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9033,7 +9033,7 @@ static void flying_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17789), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9065,7 +9065,7 @@ static void flying_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27614), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9076,7 +9076,7 @@ static void flying_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27558), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9092,7 +9092,7 @@ static void flying_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27611), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9103,7 +9103,7 @@ static void flying_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27555), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9119,7 +9119,7 @@ static void flying_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27613), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9130,7 +9130,7 @@ static void flying_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27557), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9146,7 +9146,7 @@ static void flying_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27612), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9157,7 +9157,7 @@ static void flying_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27556), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -9191,7 +9191,7 @@ static void flying_rc_track_diag_flat( } /** rct2: 0x007C74A4 */ -static void flying_rc_track_diag_25_deg_up( +static void FlyingRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9207,7 +9207,7 @@ static void flying_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17873), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9218,7 +9218,7 @@ static void flying_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17803), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9234,7 +9234,7 @@ static void flying_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17870), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9245,7 +9245,7 @@ static void flying_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17800), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9261,7 +9261,7 @@ static void flying_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17872), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9272,7 +9272,7 @@ static void flying_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17802), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9292,7 +9292,7 @@ static void flying_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17871), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9317,7 +9317,7 @@ static void flying_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17801), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9349,7 +9349,7 @@ static void flying_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27626), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9360,7 +9360,7 @@ static void flying_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27570), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9376,7 +9376,7 @@ static void flying_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27623), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9387,7 +9387,7 @@ static void flying_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27567), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9403,7 +9403,7 @@ static void flying_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27625), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9414,7 +9414,7 @@ static void flying_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27569), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9430,7 +9430,7 @@ static void flying_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27624), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9441,7 +9441,7 @@ static void flying_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27568), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9475,7 +9475,7 @@ static void flying_rc_track_diag_25_deg_up( } /** rct2: 0x007C7504 */ -static void flying_rc_track_diag_60_deg_up( +static void FlyingRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9491,7 +9491,7 @@ static void flying_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17885), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9502,7 +9502,7 @@ static void flying_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17815), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9518,7 +9518,7 @@ static void flying_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17882), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9529,7 +9529,7 @@ static void flying_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17812), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9545,7 +9545,7 @@ static void flying_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17884), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9556,7 +9556,7 @@ static void flying_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17814), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9576,7 +9576,7 @@ static void flying_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17883), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9601,7 +9601,7 @@ static void flying_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17813), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9631,7 +9631,7 @@ static void flying_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27582), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9644,7 +9644,7 @@ static void flying_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27579), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9657,7 +9657,7 @@ static void flying_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27581), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9670,7 +9670,7 @@ static void flying_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27580), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 3 } }); break; } @@ -9703,7 +9703,7 @@ static void flying_rc_track_diag_60_deg_up( } /** rct2: 0x007C7484 */ -static void flying_rc_track_diag_flat_to_25_deg_up( +static void FlyingRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9719,7 +9719,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17865), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9730,7 +9730,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17795), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9746,7 +9746,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17862), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9757,7 +9757,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17792), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9773,7 +9773,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17864), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9784,7 +9784,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17794), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9804,7 +9804,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17863), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9829,7 +9829,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17793), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9861,7 +9861,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27618), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9872,7 +9872,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27562), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9888,7 +9888,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27615), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9899,7 +9899,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27559), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9915,7 +9915,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27617), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9926,7 +9926,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27561), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9942,7 +9942,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27616), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9953,7 +9953,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27560), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9987,7 +9987,7 @@ static void flying_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x007C74E4 */ -static void flying_rc_track_diag_25_deg_up_to_60_deg_up( +static void FlyingRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10003,7 +10003,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17877), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10014,7 +10014,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17807), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10030,7 +10030,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17874), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10041,7 +10041,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17804), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10057,7 +10057,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17876), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10068,7 +10068,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17806), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10088,7 +10088,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17875), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10113,7 +10113,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17805), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10143,7 +10143,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27574), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10156,7 +10156,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27571), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10169,7 +10169,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27573), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10182,7 +10182,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27572), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -10215,7 +10215,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x007C74F4 */ -static void flying_rc_track_diag_60_deg_up_to_25_deg_up( +static void FlyingRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10231,7 +10231,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17881), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10242,7 +10242,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17811), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10258,7 +10258,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17878), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10269,7 +10269,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17808), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10285,7 +10285,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17880), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10296,7 +10296,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17810), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10316,7 +10316,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17879), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10341,7 +10341,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17809), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10371,7 +10371,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27578), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10384,7 +10384,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27575), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10397,7 +10397,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27577), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10410,7 +10410,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27576), { -16, -16, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 56 }); + { { 0, 0, height + 56 }, { 16, 16, 3 } }); break; } @@ -10443,7 +10443,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x007C7494 */ -static void flying_rc_track_diag_25_deg_up_to_flat( +static void FlyingRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10459,7 +10459,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17869), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10470,7 +10470,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17799), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10486,7 +10486,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17866), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10497,7 +10497,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17796), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10513,7 +10513,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17868), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10524,7 +10524,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17798), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10544,7 +10544,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17867), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10569,7 +10569,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17797), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10601,7 +10601,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27622), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10612,7 +10612,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27566), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10628,7 +10628,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27619), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10639,7 +10639,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27563), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10655,7 +10655,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27621), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10666,7 +10666,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27565), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10682,7 +10682,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27620), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10693,7 +10693,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27564), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10727,7 +10727,7 @@ static void flying_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x007C74D4 */ -static void flying_rc_track_diag_25_deg_down( +static void FlyingRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10743,7 +10743,7 @@ static void flying_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17871), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10754,7 +10754,7 @@ static void flying_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17801), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10770,7 +10770,7 @@ static void flying_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17872), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10781,7 +10781,7 @@ static void flying_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17802), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10797,7 +10797,7 @@ static void flying_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17870), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10808,7 +10808,7 @@ static void flying_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17800), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10828,7 +10828,7 @@ static void flying_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17873), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10853,7 +10853,7 @@ static void flying_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17803), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10883,7 +10883,7 @@ static void flying_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27568), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10896,7 +10896,7 @@ static void flying_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27569), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10909,7 +10909,7 @@ static void flying_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27567), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10922,7 +10922,7 @@ static void flying_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27570), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -10955,7 +10955,7 @@ static void flying_rc_track_diag_25_deg_down( } /** rct2: 0x007C7534 */ -static void flying_rc_track_diag_60_deg_down( +static void FlyingRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10971,7 +10971,7 @@ static void flying_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17883), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10982,7 +10982,7 @@ static void flying_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17813), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10998,7 +10998,7 @@ static void flying_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17884), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11009,7 +11009,7 @@ static void flying_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17814), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11025,7 +11025,7 @@ static void flying_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17882), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11036,7 +11036,7 @@ static void flying_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17812), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11056,7 +11056,7 @@ static void flying_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17885), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11081,7 +11081,7 @@ static void flying_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17815), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11111,7 +11111,7 @@ static void flying_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27580), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11124,7 +11124,7 @@ static void flying_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27581), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11137,7 +11137,7 @@ static void flying_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27579), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11150,7 +11150,7 @@ static void flying_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27582), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } @@ -11183,7 +11183,7 @@ static void flying_rc_track_diag_60_deg_down( } /** rct2: 0x007C74B4 */ -static void flying_rc_track_diag_flat_to_25_deg_down( +static void FlyingRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11199,7 +11199,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17867), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11210,7 +11210,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17797), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11225,7 +11225,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17868), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11236,7 +11236,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17798), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11251,7 +11251,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17866), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11262,7 +11262,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17796), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11281,7 +11281,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17869), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11306,7 +11306,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17799), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11335,7 +11335,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27564), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11347,7 +11347,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27565), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11359,7 +11359,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27563), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11371,7 +11371,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27566), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -11404,7 +11404,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x007C7514 */ -static void flying_rc_track_diag_25_deg_down_to_60_deg_down( +static void FlyingRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11420,7 +11420,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17879), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -11431,7 +11431,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17809), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -11447,7 +11447,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17880), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11458,7 +11458,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17810), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11474,7 +11474,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17878), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11485,7 +11485,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17808), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11505,7 +11505,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17881), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11530,7 +11530,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17811), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11560,7 +11560,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27576), { -16, -16, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 56 }); + { { 0, 0, height + 56 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11573,7 +11573,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27577), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11586,7 +11586,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27575), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11599,7 +11599,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27578), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -11632,7 +11632,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x007C7524 */ -static void flying_rc_track_diag_60_deg_down_to_25_deg_down( +static void FlyingRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11648,7 +11648,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17875), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11659,7 +11659,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17805), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11675,7 +11675,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17876), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11686,7 +11686,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17806), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11702,7 +11702,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17874), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11713,7 +11713,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17804), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11733,7 +11733,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17877), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11758,7 +11758,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17807), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11788,7 +11788,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27572), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11801,7 +11801,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27573), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11814,7 +11814,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27571), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11827,7 +11827,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27574), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -11860,7 +11860,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x007C74C4 */ -static void flying_rc_track_diag_25_deg_down_to_flat( +static void FlyingRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11876,7 +11876,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17863), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11887,7 +11887,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17793), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11903,7 +11903,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17864), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11914,7 +11914,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17794), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11930,7 +11930,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17862), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11941,7 +11941,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17792), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11961,7 +11961,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17865), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11986,7 +11986,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17795), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12016,7 +12016,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27560), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12029,7 +12029,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27561), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12042,7 +12042,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27559), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12055,7 +12055,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27562), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -12088,7 +12088,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x007C7564 */ -static void flying_rc_track_diag_flat_to_left_bank( +static void FlyingRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12102,7 +12102,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17831), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12115,10 +12115,10 @@ static void flying_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17828), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17832), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12131,7 +12131,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17830), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12148,7 +12148,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17829), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12177,7 +12177,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27590), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12190,7 +12190,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27587), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12203,7 +12203,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27589), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12216,7 +12216,7 @@ static void flying_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27588), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12250,7 +12250,7 @@ static void flying_rc_track_diag_flat_to_left_bank( } /** rct2: 0x007C7574 */ -static void flying_rc_track_diag_flat_to_right_bank( +static void FlyingRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12264,7 +12264,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17836), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12277,7 +12277,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17833), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12290,10 +12290,10 @@ static void flying_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17835), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17837), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12310,7 +12310,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17834), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12339,7 +12339,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27594), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12352,7 +12352,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27591), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12365,7 +12365,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27593), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12378,7 +12378,7 @@ static void flying_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27592), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12412,7 +12412,7 @@ static void flying_rc_track_diag_flat_to_right_bank( } /** rct2: 0x007C7584 */ -static void flying_rc_track_diag_left_bank_to_flat( +static void FlyingRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12426,7 +12426,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17834), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12439,10 +12439,10 @@ static void flying_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17835), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17837), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12455,7 +12455,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17833), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12472,7 +12472,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17836), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12501,7 +12501,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27592), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12514,7 +12514,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27593), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12527,7 +12527,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27591), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12540,7 +12540,7 @@ static void flying_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27594), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12574,7 +12574,7 @@ static void flying_rc_track_diag_left_bank_to_flat( } /** rct2: 0x007C7594 */ -static void flying_rc_track_diag_right_bank_to_flat( +static void FlyingRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12588,7 +12588,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17829), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12601,7 +12601,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17830), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12614,10 +12614,10 @@ static void flying_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17828), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17832), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12634,7 +12634,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17831), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12663,7 +12663,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27588), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12676,7 +12676,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27589), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12689,7 +12689,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27587), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12702,7 +12702,7 @@ static void flying_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27590), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12736,7 +12736,7 @@ static void flying_rc_track_diag_right_bank_to_flat( } /** rct2: 0x007C75C4 */ -static void flying_rc_track_diag_left_bank_to_25_deg_up( +static void FlyingRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12750,7 +12750,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17851), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12763,10 +12763,10 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17848), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17852), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12779,7 +12779,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17850), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12796,7 +12796,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17849), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12825,7 +12825,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27606), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12838,7 +12838,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27603), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12851,7 +12851,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27605), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12864,7 +12864,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27604), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -12897,7 +12897,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x007C75D4 */ -static void flying_rc_track_diag_right_bank_to_25_deg_up( +static void FlyingRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12911,7 +12911,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17856), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12924,7 +12924,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17853), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12937,10 +12937,10 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17855), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17857), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12957,7 +12957,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17854), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12986,7 +12986,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27610), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12999,7 +12999,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27607), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13012,7 +13012,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27609), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13025,7 +13025,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27608), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13058,7 +13058,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x007C75A4 */ -static void flying_rc_track_diag_25_deg_up_to_left_bank( +static void FlyingRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13072,7 +13072,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17841), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13085,10 +13085,10 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17838), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17842), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13101,7 +13101,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17840), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13118,7 +13118,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17839), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13147,7 +13147,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27598), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13160,7 +13160,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27595), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13173,7 +13173,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27597), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13186,7 +13186,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27596), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13219,7 +13219,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x007C75B4 */ -static void flying_rc_track_diag_25_deg_up_to_right_bank( +static void FlyingRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13233,7 +13233,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17846), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13246,7 +13246,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17843), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13259,10 +13259,10 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17845), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17847), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13279,7 +13279,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17844), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13308,7 +13308,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27602), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13321,7 +13321,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27599), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13334,7 +13334,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27601), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13347,7 +13347,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27600), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13380,7 +13380,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x007C75E4 */ -static void flying_rc_track_diag_left_bank_to_25_deg_down( +static void FlyingRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13394,7 +13394,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17844), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13406,10 +13406,10 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17845), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17847), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13421,7 +13421,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17843), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13437,7 +13437,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17846), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13465,7 +13465,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27600), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13477,7 +13477,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27601), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13489,7 +13489,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27599), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13501,7 +13501,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27602), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13534,7 +13534,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x007C75F4 */ -static void flying_rc_track_diag_right_bank_to_25_deg_down( +static void FlyingRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13548,7 +13548,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17839), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13560,7 +13560,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17840), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13572,10 +13572,10 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17838), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17842), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13591,7 +13591,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17841), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13619,7 +13619,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27596), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13631,7 +13631,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27597), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13643,7 +13643,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27595), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13655,7 +13655,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27598), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13688,7 +13688,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x007C7604 */ -static void flying_rc_track_diag_25_deg_down_to_left_bank( +static void FlyingRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13702,7 +13702,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17854), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13715,10 +13715,10 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17855), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17857), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13731,7 +13731,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17853), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13748,7 +13748,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17856), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13777,7 +13777,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27608), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13790,7 +13790,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27609), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13803,7 +13803,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27607), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13816,7 +13816,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27610), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13849,7 +13849,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x007C7614 */ -static void flying_rc_track_diag_25_deg_down_to_right_bank( +static void FlyingRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13863,7 +13863,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17849), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13876,7 +13876,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17850), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13889,10 +13889,10 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17848), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17852), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13909,7 +13909,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17851), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13938,7 +13938,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27604), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13951,7 +13951,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27605), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13964,7 +13964,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27603), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13977,7 +13977,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27606), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -14010,7 +14010,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x007C7544 */ -static void flying_rc_track_diag_left_bank( +static void FlyingRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14024,7 +14024,7 @@ static void flying_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17827), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14037,7 +14037,7 @@ static void flying_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17824), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14050,7 +14050,7 @@ static void flying_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17826), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14067,7 +14067,7 @@ static void flying_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17825), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14096,7 +14096,7 @@ static void flying_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27586), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14109,7 +14109,7 @@ static void flying_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27583), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14122,7 +14122,7 @@ static void flying_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27585), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14135,7 +14135,7 @@ static void flying_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27584), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -14169,7 +14169,7 @@ static void flying_rc_track_diag_left_bank( } /** rct2: 0x007C7554 */ -static void flying_rc_track_diag_right_bank( +static void FlyingRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14183,7 +14183,7 @@ static void flying_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17825), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14196,7 +14196,7 @@ static void flying_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17826), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14209,7 +14209,7 @@ static void flying_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17824), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14226,7 +14226,7 @@ static void flying_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17827), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14255,7 +14255,7 @@ static void flying_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27584), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14268,7 +14268,7 @@ static void flying_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27585), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14281,7 +14281,7 @@ static void flying_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27583), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14294,7 +14294,7 @@ static void flying_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27586), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -14328,7 +14328,7 @@ static void flying_rc_track_diag_right_bank( } /** rct2: 0x007C7624 */ -static void flying_rc_track_left_flyer_twist_up( +static void FlyingRCTrackLeftFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14340,22 +14340,22 @@ static void flying_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27430), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27436), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27429), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27435), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -14376,7 +14376,7 @@ static void flying_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27431), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -14406,7 +14406,7 @@ static void flying_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27432), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -14447,7 +14447,7 @@ static void flying_rc_track_left_flyer_twist_up( } /** rct2: 0x007C7634 */ -static void flying_rc_track_right_flyer_twist_up( +static void FlyingRCTrackRightFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14459,22 +14459,22 @@ static void flying_rc_track_right_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27442), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27448), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27441), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27447), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -14566,7 +14566,7 @@ static void flying_rc_track_right_flyer_twist_up( } /** rct2: 0x007C7644 */ -static void flying_rc_track_left_flyer_twist_down( +static void FlyingRCTrackLeftFlyerTwistDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14588,7 +14588,7 @@ static void flying_rc_track_left_flyer_twist_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27432), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -14626,7 +14626,7 @@ static void flying_rc_track_left_flyer_twist_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27431), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -14646,22 +14646,22 @@ static void flying_rc_track_left_flyer_twist_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27429), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27435), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27430), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27436), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -14685,7 +14685,7 @@ static void flying_rc_track_left_flyer_twist_down( } /** rct2: 0x007C7654 */ -static void flying_rc_track_right_flyer_twist_down( +static void FlyingRCTrackRightFlyerTwistDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14765,22 +14765,22 @@ static void flying_rc_track_right_flyer_twist_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27441), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27447), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27442), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27448), { 0, 6, height - 5 }, - { 32, 20, 3 }, { 0, 6, height + 6 }); + { { 0, 6, height + 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -14804,7 +14804,7 @@ static void flying_rc_track_right_flyer_twist_down( } /** rct2: 0x007C72F4 */ -static void flying_rc_track_flyer_half_loop_up( +static void FlyingRCTrackFlyerHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14850,21 +14850,21 @@ static void flying_rc_track_flyer_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17627), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17635), { 0, 14, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17632), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14890,7 +14890,7 @@ static void flying_rc_track_flyer_half_loop_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17636), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -14900,7 +14900,7 @@ static void flying_rc_track_flyer_half_loop_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17639), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14945,7 +14945,7 @@ static void flying_rc_track_flyer_half_loop_up( } /** rct2: 0x007C7304 */ -static void flying_rc_track_flyer_half_loop_down( +static void FlyingRCTrackFlyerHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14994,7 +14994,7 @@ static void flying_rc_track_flyer_half_loop_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17636), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -15004,7 +15004,7 @@ static void flying_rc_track_flyer_half_loop_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17639), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15019,21 +15019,21 @@ static void flying_rc_track_flyer_half_loop_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17627), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17635), { 0, 14, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17632), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -15086,7 +15086,7 @@ static void flying_rc_track_flyer_half_loop_down( } /** rct2: 0x007C7664 */ -static void flying_rc_track_block_brakes( +static void FlyingRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15097,14 +15097,14 @@ static void flying_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17150), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17150), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17151), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17151), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -15121,19 +15121,19 @@ static void flying_rc_track_block_brakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27337), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27338), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 39, session.TrackColours[SCHEME_SUPPORTS]); @@ -15145,7 +15145,7 @@ static void flying_rc_track_block_brakes( } /** rct2: 0x007C76B4 */ -static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up( +static void FlyingRCTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15164,7 +15164,7 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18027), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( @@ -15204,12 +15204,12 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18026), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18028), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -15328,7 +15328,7 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x007C76C4 */ -static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up( +static void FlyingRCTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15352,7 +15352,7 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18018), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -15389,14 +15389,14 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18017), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18019), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -15517,27 +15517,25 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x007C76D4 */ -static void flying_rc_track_left_banked_quarter_turn_3_25_deg_down( +static void FlyingRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_right_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C76E4 */ -static void flying_rc_track_right_banked_quarter_turn_3_25_deg_down( +static void FlyingRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - flying_rc_track_left_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C76F4 */ -static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( +static void FlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15551,22 +15549,22 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17978), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17983), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17988), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17993), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -15593,17 +15591,17 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17984), { 0, 0, height }, - { 1, 1, 34 }, { 30, 30, height }); + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17989), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17994), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15619,17 +15617,17 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17980), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17985), { 0, 0, height }, - { 1, 1, 34 }, { 30, 30, height }); + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17990), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -15650,22 +15648,22 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17981), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17986), { 0, 0, height }, - { 1, 1, 34 }, { 30, 30, height }); + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17991), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17996), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15681,22 +15679,22 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17982), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17987), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17992), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17997), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -15900,7 +15898,7 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x007C7704 */ -static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( +static void FlyingRCTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15914,22 +15912,22 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17958), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17963), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17968), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17973), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -15951,17 +15949,17 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17959), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17964), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17969), { 0, 0, height }, - { 1, 1, 34 }, { 30, 30, height }); + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -15987,17 +15985,17 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17965), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17970), { 0, 0, height }, - { 1, 1, 34 }, { 30, 30, height }); + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17975), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -16013,22 +16011,22 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17961), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17966), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17971), { 0, 0, height }, - { 1, 1, 34 }, { 30, 30, height }); + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17976), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -16044,22 +16042,22 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17962), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17967), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17972), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17977), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -16263,27 +16261,25 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x007C7714 */ -static void flying_rc_track_left_banked_quarter_turn_5_25_deg_down( +static void FlyingRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_right_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + FlyingRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x007C7724 */ -static void flying_rc_track_right_banked_quarter_turn_5_25_deg_down( +static void FlyingRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - flying_rc_track_left_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + FlyingRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007C7734 */ -static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up( +static void FlyingRCTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16293,29 +16289,29 @@ static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17922), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17922), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17923), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17923), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17930), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17930), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17924), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17924), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17925), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17925), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -16339,28 +16335,28 @@ static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27719), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27720), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27721), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27722), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -16396,7 +16392,7 @@ static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up( } /** rct2: 0x007C7744 */ -static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up( +static void FlyingRCTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16406,29 +16402,29 @@ static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17926), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17926), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17927), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17927), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17928), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17928), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17931), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17931), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17929), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17929), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -16452,28 +16448,28 @@ static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27723), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27724), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27725), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27726), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -16509,7 +16505,7 @@ static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up( } /** rct2: 0x007C7754 */ -static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up( +static void FlyingRCTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16519,29 +16515,29 @@ static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17932), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17932), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17933), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17933), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17940), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17940), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17934), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17934), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17935), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17935), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -16565,28 +16561,28 @@ static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27727), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27728), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27729), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27730), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -16622,7 +16618,7 @@ static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x007C7764 */ -static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up( +static void FlyingRCTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16632,29 +16628,29 @@ static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17936), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17936), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17937), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17937), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17938), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17938), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17941), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17941), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17939), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17939), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -16678,28 +16674,28 @@ static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27731), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27732), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27733), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27734), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -16735,41 +16731,39 @@ static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x007C7774 */ -static void flying_rc_track_25_deg_down_to_left_banked_25_deg_down( +static void FlyingRCTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_banked_25_deg_up_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7784 */ -static void flying_rc_track_25_deg_down_to_right_banked_25_deg_down( +static void FlyingRCTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_banked_25_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackLeftBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7794 */ -static void flying_rc_track_left_banked_25_deg_down_to_25_deg_down( +static void FlyingRCTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C77A4 */ -static void flying_rc_track_right_banked_25_deg_down_to_25_deg_down( +static void FlyingRCTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_25_deg_up_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack25DegUpToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C77B4 */ -static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( +static void FlyingRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16779,26 +16773,26 @@ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17942), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17942), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17943), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17943), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17944), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17944), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17945), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17945), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -16822,28 +16816,28 @@ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27735), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27736), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27737), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27738), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -16879,7 +16873,7 @@ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( } /** rct2: 0x007C77C4 */ -static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( +static void FlyingRCTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16889,26 +16883,26 @@ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17946), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17946), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17947), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17947), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17948), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17948), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17949), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17949), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -16932,28 +16926,28 @@ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27739), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27740), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27741), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27742), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -16989,7 +16983,7 @@ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( } /** rct2: 0x007C77F4 */ -static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( +static void FlyingRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -16999,26 +16993,26 @@ static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17950), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17950), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17951), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17951), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17952), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17952), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17953), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17953), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -17042,28 +17036,28 @@ static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27743), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27744), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27745), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27746), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -17099,7 +17093,7 @@ static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( } /** rct2: 0x007C7804 */ -static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( +static void FlyingRCTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17109,26 +17103,26 @@ static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17954), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17954), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17955), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17955), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17956), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17956), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17957), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17957), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -17152,28 +17146,28 @@ static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27747), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27748), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27749), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27750), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -17209,43 +17203,39 @@ static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( } /** rct2: 0x007C7814 */ -static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_down( +static void FlyingRCTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_banked_25_deg_up_to_right_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightBanked25DegUpToRightBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7824 */ -static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_down( +static void FlyingRCTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_banked_25_deg_up_to_left_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackLeftBanked25DegUpToLeftBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C77D4 */ -static void flying_rc_track_left_banked_25_deg_down_to_left_banked_flat( +static void FlyingRCTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_banked_flat_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightBankedFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C77E4 */ -static void flying_rc_track_right_banked_25_deg_down_to_right_banked_flat( +static void FlyingRCTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_banked_flat_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackLeftBankedFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7834 */ -static void flying_rc_track_flat_to_left_banked_25_deg_up( +static void FlyingRCTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17255,29 +17245,29 @@ static void flying_rc_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17894), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17894), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17895), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17895), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17902), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17902), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17896), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17896), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17897), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17897), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -17301,28 +17291,28 @@ static void flying_rc_track_flat_to_left_banked_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27695), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27696), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27697), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27698), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -17358,7 +17348,7 @@ static void flying_rc_track_flat_to_left_banked_25_deg_up( } /** rct2: 0x007C7844 */ -static void flying_rc_track_flat_to_right_banked_25_deg_up( +static void FlyingRCTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17368,29 +17358,29 @@ static void flying_rc_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17898), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17898), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17899), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17899), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17900), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17900), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17903), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17903), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17901), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17901), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -17414,28 +17404,28 @@ static void flying_rc_track_flat_to_right_banked_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27699), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27700), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27701), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27702), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -17471,7 +17461,7 @@ static void flying_rc_track_flat_to_right_banked_25_deg_up( } /** rct2: 0x007C7854 */ -static void flying_rc_track_left_banked_25_deg_up_to_flat( +static void FlyingRCTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17481,29 +17471,29 @@ static void flying_rc_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17904), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17904), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17905), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17905), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17912), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17912), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17906), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17906), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17907), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17907), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -17527,28 +17517,28 @@ static void flying_rc_track_left_banked_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27703), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27704), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27705), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27706), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -17584,7 +17574,7 @@ static void flying_rc_track_left_banked_25_deg_up_to_flat( } /** rct2: 0x007C7864 */ -static void flying_rc_track_right_banked_25_deg_up_to_flat( +static void FlyingRCTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17594,29 +17584,29 @@ static void flying_rc_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17908), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17908), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17909), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17909), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17910), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17910), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17913), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17913), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17911), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17911), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -17640,28 +17630,28 @@ static void flying_rc_track_right_banked_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27707), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27708), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27709), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27710), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -17697,38 +17687,38 @@ static void flying_rc_track_right_banked_25_deg_up_to_flat( } /** rct2: 0x007C7874 */ -static void flying_rc_track_flat_to_left_banked_25_deg_down( +static void FlyingRCTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackRightBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7884 */ -static void flying_rc_track_flat_to_right_banked_25_deg_down( +static void FlyingRCTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackLeftBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C7894 */ -static void flying_rc_track_left_banked_25_deg_down_to_flat( +static void FlyingRCTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_flat_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007C78A4 */ -static void flying_rc_track_right_banked_25_deg_down_to_flat( +static void FlyingRCTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_flat_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrackFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void flying_rc_track_90_deg_up( +static void FlyingRCTrack90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17744,22 +17734,22 @@ static void flying_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17526), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17527), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17528), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17529), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -17772,14 +17762,14 @@ static void flying_rc_track_90_deg_up( } } -static void flying_rc_track_90_deg_down( +static void FlyingRCTrack90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void flying_rc_track_60_deg_up_to_90_deg_up( +static void FlyingRCTrack60DegUpTo90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17793,22 +17783,22 @@ static void flying_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17518), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17519), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17520), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17521), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -17825,14 +17815,14 @@ static void flying_rc_track_60_deg_up_to_90_deg_up( } } -static void flying_rc_track_90_deg_down_to_60_deg_down( +static void FlyingRCTrack90DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_60_deg_up_to_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + FlyingRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void flying_rc_track_90_deg_up_to_60_deg_up( +static void FlyingRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17842,23 +17832,23 @@ static void flying_rc_track_90_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17522), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17522), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17523), { 0, 0, height }, { 2, 20, 31 }, - { 24, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17523), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17524), { 0, 0, height }, { 2, 20, 31 }, - { 24, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17524), { 0, 0, height }, + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17525), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17525), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } switch (direction) @@ -17875,7 +17865,7 @@ static void flying_rc_track_90_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); } -static void flying_rc_track_60_deg_down_to_90_deg_down( +static void FlyingRCTrack60DegDownTo90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17889,22 +17879,22 @@ static void flying_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17524), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17525), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17522), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17523), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; } if (direction == 0 || direction == 3) @@ -17920,7 +17910,7 @@ static void flying_rc_track_60_deg_down_to_90_deg_down( } } -static void flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up( +static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -17932,22 +17922,22 @@ static void flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18062), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18065), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18068), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18071), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -17960,22 +17950,22 @@ static void flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18063), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18066), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18069), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18072), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -17988,22 +17978,22 @@ static void flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18064), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18067), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18070), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18073), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -18017,53 +18007,53 @@ static void flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up( } } -static void flying_rc_track_inverted_flat_to_90_deg_quarter_loop_down( +static void FlyingRCTrackInvertedFlatTo90DegQuarterLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up(session, ride, 2 - trackSequence, direction, height, trackElement); + FlyingRCTrack90DegToInvertedFlatQuarterLoopUp(session, ride, 2 - trackSequence, direction, height, trackElement); } -static void flying_rc_track_flat_to_60_deg_up_long_base( +static void FlyingRCTrackFlatTo60DegUpLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (trackElement.IsInverted()) return; - bolliger_mabillard_track_flat_to_60_deg_up_long_base( + BolligerMabillardTrackFlatTo60DegUpLongBase( session, ride, trackSequence, direction, height, trackElement); } -static void flying_rc_track_60_deg_up_to_flat_long_base( +static void FlyingRCTrack60DegUpToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (trackElement.IsInverted()) return; - bolliger_mabillard_track_60_deg_up_to_flat_long_base( + BolligerMabillardTrack60DegUpToFlatLongBase( session, ride, trackSequence, direction, height, trackElement); } -static void flying_rc_track_60_deg_down_to_flat_long_base( +static void FlyingRCTrack60DegDownToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (trackElement.IsInverted()) return; - bolliger_mabillard_track_flat_to_60_deg_up_long_base( + BolligerMabillardTrackFlatTo60DegUpLongBase( session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void flying_rc_track_flat_to_60_deg_down_long_base( +static void FlyingRCTrackFlatTo60DegDownLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (trackElement.IsInverted()) return; - bolliger_mabillard_track_60_deg_up_to_flat_long_base( + BolligerMabillardTrack60DegUpToFlatLongBase( session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void flying_rc_track_half_loop_inverted_up( +static void FlyingRCTrackHalfLoopInvertedUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -18075,22 +18065,22 @@ static void flying_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27451), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27459), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27458), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27466), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } @@ -18128,22 +18118,22 @@ static void flying_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27452), { 0, 0, height + 24 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27460), { 0, 14, height + 24 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27457), { 0, 6, height + 24 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27465), { 0, 6, height + 24 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -18155,22 +18145,22 @@ static void flying_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27453), { 16, 0, height - 3 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27461), { 12, 0, height - 3 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27456), { 10, 16, height - 3 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27464), { 16, 16, height - 3 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18185,22 +18175,22 @@ static void flying_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27454), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27462), { 0, 0, height + 29 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27455), { 0, 16, height + 29 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27463), { 0, 16, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -18214,14 +18204,14 @@ static void flying_rc_track_half_loop_inverted_up( } } -static void flying_rc_track_half_loop_uninverted_down( +static void FlyingRCTrackHalfLoopUninvertedDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_half_loop_inverted_up(session, ride, 3 - trackSequence, direction, height, trackElement); + FlyingRCTrackHalfLoopInvertedUp(session, ride, 3 - trackSequence, direction, height, trackElement); } -static void flying_rc_track_left_flying_large_half_loop_inverted_up( +static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -18233,22 +18223,22 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27639), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27646), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27653), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27660), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -18265,22 +18255,22 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27640), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27647), { 0, 0, height - 4 }, - { 32, 20, 9 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 9 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27654), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27661), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18293,22 +18283,22 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27641), { 0, 0, height - 4 }, - { 24, 16, 3 }, { 8, 0, height + 40 }); + { { 8, 0, height + 40 }, { 24, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27648), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27655), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27662), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 16, height + 70 }); + { { 30, 16, height + 70 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18323,22 +18313,22 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27642), { 0, 0, height - 4 }, - { 8, 16, 3 }, { 24, 0, height + 29 }); + { { 24, 0, height + 29 }, { 8, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27649), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27656), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27663), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 16, height + 100 }); + { { 30, 16, height + 100 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18353,22 +18343,22 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27643), { 0, 0, height - 4 }, - { 2, 2, 3 }, { 30, 30, height + 80 }); + { { 30, 30, height + 80 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27650), { 0, 0, height - 4 }, - { 16, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27657), { 0, 0, height - 4 }, - { 16, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27664), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 0, height + 90 }); + { { 30, 0, height + 90 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18381,22 +18371,22 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27644), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 16, height }); + { { 30, 16, height }, { 2, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27651), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27658), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27665), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 0, height + 140 }); + { { 30, 0, height + 140 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18411,28 +18401,28 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27645), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27652), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27659), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27666), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -18450,7 +18440,7 @@ static void flying_rc_track_left_flying_large_half_loop_inverted_up( } } -static void flying_rc_track_right_flying_large_half_loop_inverted_up( +static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -18462,22 +18452,22 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27688), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27681), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27674), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27667), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -18494,22 +18484,22 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27689), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27682), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27675), { 0, 0, height - 4 }, - { 32, 20, 19 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 19 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27668), { 0, 0, height - 4 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18522,22 +18512,22 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27690), { 0, 0, height - 4 }, - { 32, 16, 3 }, { 0, 16, height + 70 }); + { { 0, 16, height + 70 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27683), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27676), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27669), { 0, 0, height - 4 }, - { 32, 16, 3 }, { 0, 0, height + 70 }); + { { 0, 0, height + 70 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18552,22 +18542,22 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27691), { 0, 0, height - 4 }, - { 32, 16, 3 }, { 0, 16, height + 100 }); + { { 0, 16, height + 100 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27684), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27677), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27670), { 0, 0, height - 4 }, - { 32, 16, 3 }, { 0, 0, height + 100 }); + { { 0, 0, height + 100 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18582,22 +18572,22 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27692), { 0, 0, height - 4 }, - { 16, 16, 3 }, { 16, 7, height + 90 }); + { { 16, 7, height + 90 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27685), { 0, 0, height - 4 }, - { 16, 16, 0 }, { 0, -7, height }); + { { 0, -7, height }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27678), { 0, 0, height - 4 }, - { 16, 16, 0 }, { -7, 16, height }); + { { -7, 16, height }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27671), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 23, height + 110 }); + { { 30, 23, height + 110 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18610,22 +18600,22 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27693), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 7, height + 140 }); + { { 30, 7, height + 140 }, { 2, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27686), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27679), { 0, 0, height - 4 }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27672), { 0, 0, height - 4 }, - { 2, 16, 3 }, { 30, 16, height + 140 }); + { { 30, 16, height + 140 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -18640,28 +18630,28 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27694), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27687), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27680), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27673), { 0, 0, height - 4 }, - { 32, 24, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 24, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 24, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -18679,358 +18669,358 @@ static void flying_rc_track_right_flying_large_half_loop_inverted_up( } } -static void flying_rc_track_left_flying_large_half_loop_uninverted_down( +static void FlyingRCTrackLeftFlyingLargeHalfLoopUninvertedDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_left_flying_large_half_loop_inverted_up(session, ride, 6 - trackSequence, direction, height, trackElement); + FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp(session, ride, 6 - trackSequence, direction, height, trackElement); } -static void flying_rc_track_right_flying_large_half_loop_uninverted_down( +static void FlyingRCTrackRightFlyingLargeHalfLoopUninvertedDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - flying_rc_track_right_flying_large_half_loop_inverted_up(session, ride, 6 - trackSequence, direction, height, trackElement); + FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp(session, ride, 6 - trackSequence, direction, height, trackElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return flying_rc_track_flat; + return FlyingRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return flying_rc_track_station; + return FlyingRCTrackStation; case TrackElemType::Up25: - return flying_rc_track_25_deg_up; + return FlyingRCTrack25DegUp; case TrackElemType::Up60: - return flying_rc_track_60_deg_up; + return FlyingRCTrack60DegUp; case TrackElemType::FlatToUp25: - return flying_rc_track_flat_to_25_deg_up; + return FlyingRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return flying_rc_track_25_deg_up_to_60_deg_up; + return FlyingRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return flying_rc_track_60_deg_up_to_25_deg_up; + return FlyingRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return flying_rc_track_25_deg_up_to_flat; + return FlyingRCTrack25DegUpToFlat; case TrackElemType::Down25: - return flying_rc_track_25_deg_down; + return FlyingRCTrack25DegDown; case TrackElemType::Down60: - return flying_rc_track_60_deg_down; + return FlyingRCTrack60DegDown; case TrackElemType::FlatToDown25: - return flying_rc_track_flat_to_25_deg_down; + return FlyingRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return flying_rc_track_25_deg_down_to_60_deg_down; + return FlyingRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return flying_rc_track_60_deg_down_to_25_deg_down; + return FlyingRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return flying_rc_track_25_deg_down_to_flat; + return FlyingRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return flying_rc_track_left_quarter_turn_5; + return FlyingRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return flying_rc_track_right_quarter_turn_5; + return FlyingRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return flying_rc_track_flat_to_left_bank; + return FlyingRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return flying_rc_track_flat_to_right_bank; + return FlyingRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return flying_rc_track_left_bank_to_flat; + return FlyingRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return flying_rc_track_right_bank_to_flat; + return FlyingRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return flying_rc_track_banked_left_quarter_turn_5; + return FlyingRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return flying_rc_track_banked_right_quarter_turn_5; + return FlyingRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return flying_rc_track_left_bank_to_25_deg_up; + return FlyingRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return flying_rc_track_right_bank_to_25_deg_up; + return FlyingRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return flying_rc_track_25_deg_up_to_left_bank; + return FlyingRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return flying_rc_track_25_deg_up_to_right_bank; + return FlyingRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return flying_rc_track_left_bank_to_25_deg_down; + return FlyingRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return flying_rc_track_right_bank_to_25_deg_down; + return FlyingRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return flying_rc_track_25_deg_down_to_left_bank; + return FlyingRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return flying_rc_track_25_deg_down_to_right_bank; + return FlyingRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return flying_rc_track_left_bank; + return FlyingRCTrackLeftBank; case TrackElemType::RightBank: - return flying_rc_track_right_bank; + return FlyingRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return flying_rc_track_left_quarter_turn_5_25_deg_up; + return FlyingRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return flying_rc_track_right_quarter_turn_5_25_deg_up; + return FlyingRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return flying_rc_track_left_quarter_turn_5_25_deg_down; + return FlyingRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return flying_rc_track_right_quarter_turn_5_25_deg_down; + return FlyingRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return flying_rc_track_s_bend_left; + return FlyingRCTrackSBendLeft; case TrackElemType::SBendRight: - return flying_rc_track_s_bend_right; + return FlyingRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return flying_rc_track_left_quarter_turn_3; + return FlyingRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return flying_rc_track_right_quarter_turn_3; + return FlyingRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return flying_rc_track_left_quarter_turn_3_bank; + return FlyingRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return flying_rc_track_right_quarter_turn_3_bank; + return FlyingRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return flying_rc_track_left_quarter_turn_3_25_deg_up; + return FlyingRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return flying_rc_track_right_quarter_turn_3_25_deg_up; + return FlyingRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return flying_rc_track_left_quarter_turn_3_25_deg_down; + return FlyingRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return flying_rc_track_right_quarter_turn_3_25_deg_down; + return FlyingRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return flying_rc_track_left_half_banked_helix_up_small; + return FlyingRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return flying_rc_track_right_half_banked_helix_up_small; + return FlyingRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return flying_rc_track_left_half_banked_helix_down_small; + return FlyingRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return flying_rc_track_right_half_banked_helix_down_small; + return FlyingRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return flying_rc_track_left_half_banked_helix_up_large; + return FlyingRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return flying_rc_track_right_half_banked_helix_up_large; + return FlyingRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return flying_rc_track_left_half_banked_helix_down_large; + return FlyingRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return flying_rc_track_right_half_banked_helix_down_large; + return FlyingRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return flying_rc_track_left_quarter_turn_1_60_deg_up; + return FlyingRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return flying_rc_track_right_quarter_turn_1_60_deg_up; + return FlyingRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return flying_rc_track_left_quarter_turn_1_60_deg_down; + return FlyingRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return flying_rc_track_right_quarter_turn_1_60_deg_down; + return FlyingRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return flying_rc_track_brakes; + return FlyingRCTrackBrakes; case TrackElemType::LeftQuarterBankedHelixLargeUp: - return flying_rc_track_left_quarter_banked_helix_large_up; + return FlyingRCTrackLeftQuarterBankedHelixLargeUp; case TrackElemType::RightQuarterBankedHelixLargeUp: - return flying_rc_track_right_quarter_banked_helix_large_up; + return FlyingRCTrackRightQuarterBankedHelixLargeUp; case TrackElemType::LeftQuarterBankedHelixLargeDown: - return flying_rc_track_left_quarter_banked_helix_large_down; + return FlyingRCTrackLeftQuarterBankedHelixLargeDown; case TrackElemType::RightQuarterBankedHelixLargeDown: - return flying_rc_track_right_quarter_banked_helix_large_down; + return FlyingRCTrackRightQuarterBankedHelixLargeDown; case TrackElemType::Up25LeftBanked: - return flying_rc_track_25_deg_up_left_banked; + return FlyingRCTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return flying_rc_track_25_deg_up_right_banked; + return FlyingRCTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return flying_rc_track_on_ride_photo; + return FlyingRCTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return flying_rc_track_25_deg_down_left_banked; + return FlyingRCTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return flying_rc_track_25_deg_down_right_banked; + return FlyingRCTrack25DegDownRightBanked; case TrackElemType::LeftEighthToDiag: - return flying_rc_track_left_eighth_to_diag; + return FlyingRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return flying_rc_track_right_eighth_to_diag; + return FlyingRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return flying_rc_track_left_eighth_to_orthogonal; + return FlyingRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return flying_rc_track_right_eighth_to_orthogonal; + return FlyingRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return flying_rc_track_left_eighth_bank_to_diag; + return FlyingRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return flying_rc_track_right_eighth_bank_to_diag; + return FlyingRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return flying_rc_track_left_eighth_bank_to_orthogonal; + return FlyingRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return flying_rc_track_right_eighth_bank_to_orthogonal; + return FlyingRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return flying_rc_track_diag_flat; + return FlyingRCTrackDiagFlat; case TrackElemType::DiagUp25: - return flying_rc_track_diag_25_deg_up; + return FlyingRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return flying_rc_track_diag_60_deg_up; + return FlyingRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return flying_rc_track_diag_flat_to_25_deg_up; + return FlyingRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return flying_rc_track_diag_25_deg_up_to_60_deg_up; + return FlyingRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return flying_rc_track_diag_60_deg_up_to_25_deg_up; + return FlyingRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return flying_rc_track_diag_25_deg_up_to_flat; + return FlyingRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return flying_rc_track_diag_25_deg_down; + return FlyingRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return flying_rc_track_diag_60_deg_down; + return FlyingRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return flying_rc_track_diag_flat_to_25_deg_down; + return FlyingRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return flying_rc_track_diag_25_deg_down_to_60_deg_down; + return FlyingRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return flying_rc_track_diag_60_deg_down_to_25_deg_down; + return FlyingRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return flying_rc_track_diag_25_deg_down_to_flat; + return FlyingRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return flying_rc_track_diag_flat_to_left_bank; + return FlyingRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return flying_rc_track_diag_flat_to_right_bank; + return FlyingRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return flying_rc_track_diag_left_bank_to_flat; + return FlyingRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return flying_rc_track_diag_right_bank_to_flat; + return FlyingRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return flying_rc_track_diag_left_bank_to_25_deg_up; + return FlyingRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return flying_rc_track_diag_right_bank_to_25_deg_up; + return FlyingRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return flying_rc_track_diag_25_deg_up_to_left_bank; + return FlyingRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return flying_rc_track_diag_25_deg_up_to_right_bank; + return FlyingRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return flying_rc_track_diag_left_bank_to_25_deg_down; + return FlyingRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return flying_rc_track_diag_right_bank_to_25_deg_down; + return FlyingRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return flying_rc_track_diag_25_deg_down_to_left_bank; + return FlyingRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return flying_rc_track_diag_25_deg_down_to_right_bank; + return FlyingRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return flying_rc_track_diag_left_bank; + return FlyingRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return flying_rc_track_diag_right_bank; + return FlyingRCTrackDiagRightBank; case TrackElemType::LeftFlyerTwistUp: - return flying_rc_track_left_flyer_twist_up; + return FlyingRCTrackLeftFlyerTwistUp; case TrackElemType::RightFlyerTwistUp: - return flying_rc_track_right_flyer_twist_up; + return FlyingRCTrackRightFlyerTwistUp; case TrackElemType::LeftFlyerTwistDown: - return flying_rc_track_left_flyer_twist_down; + return FlyingRCTrackLeftFlyerTwistDown; case TrackElemType::RightFlyerTwistDown: - return flying_rc_track_right_flyer_twist_down; + return FlyingRCTrackRightFlyerTwistDown; case TrackElemType::FlyerHalfLoopUninvertedUp: - return flying_rc_track_flyer_half_loop_up; + return FlyingRCTrackFlyerHalfLoopUp; case TrackElemType::FlyerHalfLoopInvertedDown: - return flying_rc_track_flyer_half_loop_down; + return FlyingRCTrackFlyerHalfLoopDown; case TrackElemType::BlockBrakes: - return flying_rc_track_block_brakes; + return FlyingRCTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return flying_rc_track_left_banked_quarter_turn_3_25_deg_up; + return FlyingRCTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return flying_rc_track_right_banked_quarter_turn_3_25_deg_up; + return FlyingRCTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return flying_rc_track_left_banked_quarter_turn_3_25_deg_down; + return FlyingRCTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return flying_rc_track_right_banked_quarter_turn_3_25_deg_down; + return FlyingRCTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return flying_rc_track_left_banked_quarter_turn_5_25_deg_up; + return FlyingRCTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return flying_rc_track_right_banked_quarter_turn_5_25_deg_up; + return FlyingRCTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return flying_rc_track_left_banked_quarter_turn_5_25_deg_down; + return FlyingRCTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return flying_rc_track_right_banked_quarter_turn_5_25_deg_down; + return FlyingRCTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return flying_rc_track_25_deg_up_to_left_banked_25_deg_up; + return FlyingRCTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return flying_rc_track_25_deg_up_to_right_banked_25_deg_up; + return FlyingRCTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return flying_rc_track_left_banked_25_deg_up_to_25_deg_up; + return FlyingRCTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return flying_rc_track_right_banked_25_deg_up_to_25_deg_up; + return FlyingRCTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return flying_rc_track_25_deg_down_to_left_banked_25_deg_down; + return FlyingRCTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return flying_rc_track_25_deg_down_to_right_banked_25_deg_down; + return FlyingRCTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return flying_rc_track_left_banked_25_deg_down_to_25_deg_down; + return FlyingRCTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return flying_rc_track_right_banked_25_deg_down_to_25_deg_down; + return FlyingRCTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return flying_rc_track_left_banked_flat_to_left_banked_25_deg_up; + return FlyingRCTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return flying_rc_track_right_banked_flat_to_right_banked_25_deg_up; + return FlyingRCTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return flying_rc_track_left_banked_25_deg_up_to_left_banked_flat; + return FlyingRCTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return flying_rc_track_right_banked_25_deg_up_to_right_banked_flat; + return FlyingRCTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return flying_rc_track_left_banked_flat_to_left_banked_25_deg_down; + return FlyingRCTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return flying_rc_track_right_banked_flat_to_right_banked_25_deg_down; + return FlyingRCTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return flying_rc_track_left_banked_25_deg_down_to_left_banked_flat; + return FlyingRCTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return flying_rc_track_right_banked_25_deg_down_to_right_banked_flat; + return FlyingRCTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return flying_rc_track_flat_to_left_banked_25_deg_up; + return FlyingRCTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return flying_rc_track_flat_to_right_banked_25_deg_up; + return FlyingRCTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return flying_rc_track_left_banked_25_deg_up_to_flat; + return FlyingRCTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return flying_rc_track_right_banked_25_deg_up_to_flat; + return FlyingRCTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return flying_rc_track_flat_to_left_banked_25_deg_down; + return FlyingRCTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return flying_rc_track_flat_to_right_banked_25_deg_down; + return FlyingRCTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return flying_rc_track_left_banked_25_deg_down_to_flat; + return FlyingRCTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return flying_rc_track_right_banked_25_deg_down_to_flat; + return FlyingRCTrackRightBanked25DegDownToFlat; // OpenRCT2-specific paint code case TrackElemType::Booster: - return flying_rc_track_booster; + return FlyingRCTrackBooster; case TrackElemType::Up60ToUp90: - return flying_rc_track_60_deg_up_to_90_deg_up; + return FlyingRCTrack60DegUpTo90DegUp; case TrackElemType::Up90: - return flying_rc_track_90_deg_up; + return FlyingRCTrack90DegUp; case TrackElemType::Up90ToUp60: - return flying_rc_track_90_deg_up_to_60_deg_up; + return FlyingRCTrack90DegUpTo60DegUp; case TrackElemType::Down60ToDown90: - return flying_rc_track_60_deg_down_to_90_deg_down; + return FlyingRCTrack60DegDownTo90DegDown; case TrackElemType::Down90: - return flying_rc_track_90_deg_down; + return FlyingRCTrack90DegDown; case TrackElemType::Down90ToDown60: - return flying_rc_track_90_deg_down_to_60_deg_down; + return FlyingRCTrack90DegDownTo60DegDown; case TrackElemType::MultiDimInvertedFlatToDown90QuarterLoop: - return flying_rc_track_inverted_flat_to_90_deg_quarter_loop_down; + return FlyingRCTrackInvertedFlatTo90DegQuarterLoopDown; case TrackElemType::MultiDimUp90ToInvertedFlatQuarterLoop: - return flying_rc_track_90_deg_to_inverted_flat_quarter_loop_up; + return FlyingRCTrack90DegToInvertedFlatQuarterLoopUp; case TrackElemType::FlatToUp60LongBase: - return flying_rc_track_flat_to_60_deg_up_long_base; + return FlyingRCTrackFlatTo60DegUpLongBase; case TrackElemType::Up60ToFlatLongBase: - return flying_rc_track_60_deg_up_to_flat_long_base; + return FlyingRCTrack60DegUpToFlatLongBase; case TrackElemType::FlatToDown60LongBase: - return flying_rc_track_flat_to_60_deg_down_long_base; + return FlyingRCTrackFlatTo60DegDownLongBase; case TrackElemType::Down60ToFlatLongBase: - return flying_rc_track_60_deg_down_to_flat_long_base; + return FlyingRCTrack60DegDownToFlatLongBase; // OpenRCT2-specific track elements case TrackElemType::LeftFlyerLargeHalfLoopUninvertedUp: - return bolliger_mabillard_track_left_large_half_loop_up; + return BolligerMabillardTrackLeftLargeHalfLoopUp; case TrackElemType::RightFlyerLargeHalfLoopUninvertedUp: - return bolliger_mabillard_track_right_large_half_loop_up; + return BolligerMabillardTrackRightLargeHalfLoopUp; case TrackElemType::RightFlyerLargeHalfLoopInvertedDown: - return bolliger_mabillard_track_right_large_half_loop_down; + return BolligerMabillardTrackRightLargeHalfLoopDown; case TrackElemType::LeftFlyerLargeHalfLoopInvertedDown: - return bolliger_mabillard_track_left_large_half_loop_down; + return BolligerMabillardTrackLeftLargeHalfLoopDown; case TrackElemType::FlyerHalfLoopInvertedUp: - return flying_rc_track_half_loop_inverted_up; + return FlyingRCTrackHalfLoopInvertedUp; case TrackElemType::FlyerHalfLoopUninvertedDown: - return flying_rc_track_half_loop_uninverted_down; + return FlyingRCTrackHalfLoopUninvertedDown; case TrackElemType::LeftFlyerLargeHalfLoopInvertedUp: - return flying_rc_track_left_flying_large_half_loop_inverted_up; + return FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp; case TrackElemType::RightFlyerLargeHalfLoopInvertedUp: - return flying_rc_track_right_flying_large_half_loop_inverted_up; + return FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp; case TrackElemType::LeftFlyerLargeHalfLoopUninvertedDown: - return flying_rc_track_left_flying_large_half_loop_uninverted_down; + return FlyingRCTrackLeftFlyingLargeHalfLoopUninvertedDown; case TrackElemType::RightFlyerLargeHalfLoopUninvertedDown: - return flying_rc_track_right_flying_large_half_loop_uninverted_down; + return FlyingRCTrackRightFlyingLargeHalfLoopUninvertedDown; } - return get_track_paint_function_bolliger_mabillard(trackType); + return GetTrackPaintFunctionBolligerMabillard(trackType); } diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index 9a87815fdc..e791c4072a 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,7 @@ static constexpr const uint32_t _GigaCoasterBrakeImages[NumOrthogonalDirections] }; /** rct2: 0x008AD674 */ -static void giga_rc_track_flat( +static void GigaRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -51,17 +51,17 @@ static void giga_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18692), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18692), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18693), { 0, 0, height }, { 20, 32, 3 }, - { 6, 0, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18693), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -72,26 +72,26 @@ static void giga_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18382), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18382), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18383), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18383), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18384), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18384), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18385), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18385), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -103,17 +103,17 @@ static void giga_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -124,7 +124,7 @@ static void giga_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void giga_rc_track_station( +static void GigaRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -137,29 +137,29 @@ static void giga_rc_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_GigaCoasterBrakeImages[direction][isClosed][0]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008AD684 */ -static void giga_rc_track_25_deg_up( +static void GigaRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -169,26 +169,26 @@ static void giga_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18702), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18702), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18703), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18703), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18704), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18704), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18705), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18705), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -199,26 +199,26 @@ static void giga_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18394), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18394), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18395), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18395), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18396), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18396), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18397), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18397), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -229,26 +229,26 @@ static void giga_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18134), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18134), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18135), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18135), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18136), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18136), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18137), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18137), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -267,7 +267,7 @@ static void giga_rc_track_25_deg_up( } /** rct2: 0x008AD694 */ -static void giga_rc_track_60_deg_up( +static void GigaRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -277,26 +277,26 @@ static void giga_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18718), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18718), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18719), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18719), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18720), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18720), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18721), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18721), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -307,26 +307,26 @@ static void giga_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18150), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18150), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18151), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18151), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18152), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18152), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18153), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18153), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -345,7 +345,7 @@ static void giga_rc_track_60_deg_up( } /** rct2: 0x008AD6A4 */ -static void giga_rc_track_flat_to_25_deg_up( +static void GigaRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -355,26 +355,26 @@ static void giga_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18694), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18694), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18695), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18695), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18696), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18696), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18697), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18697), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -385,26 +385,26 @@ static void giga_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18386), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18386), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18387), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18387), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18388), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18388), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18389), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18389), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -415,26 +415,26 @@ static void giga_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18126), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18126), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18127), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18127), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18128), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18128), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18129), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18129), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -453,7 +453,7 @@ static void giga_rc_track_flat_to_25_deg_up( } /** rct2: 0x008AD6B4 */ -static void giga_rc_track_25_deg_up_to_60_deg_up( +static void GigaRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -463,32 +463,32 @@ static void giga_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18706), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18706), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18707), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18707), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18710), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18710), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18708), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18708), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18711), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18711), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18709), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18709), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -499,32 +499,32 @@ static void giga_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18138), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18138), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18139), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18139), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18142), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18142), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18140), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18140), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18143), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18143), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18141), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18141), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -543,7 +543,7 @@ static void giga_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008AD6C4 */ -static void giga_rc_track_60_deg_up_to_25_deg_up( +static void GigaRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -553,32 +553,32 @@ static void giga_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18712), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18712), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18713), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18713), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18716), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18716), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18714), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18714), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18717), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18717), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18715), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18715), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -589,32 +589,32 @@ static void giga_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18144), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18144), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18145), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18145), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18148), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18148), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18146), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18146), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18149), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18149), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18147), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18147), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -633,7 +633,7 @@ static void giga_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008AD6D4 */ -static void giga_rc_track_25_deg_up_to_flat( +static void GigaRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -643,26 +643,26 @@ static void giga_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18698), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18698), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18699), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18699), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18700), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18700), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18701), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18701), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -673,26 +673,26 @@ static void giga_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18390), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18390), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18391), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18391), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18392), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18392), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18393), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18393), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -703,26 +703,26 @@ static void giga_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18130), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18130), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18131), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18131), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18132), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18132), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18133), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18133), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -741,55 +741,55 @@ static void giga_rc_track_25_deg_up_to_flat( } /** rct2: 0x008AD6E4 */ -static void giga_rc_track_25_deg_down( +static void GigaRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD6F4 */ -static void giga_rc_track_60_deg_down( +static void GigaRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD704 */ -static void giga_rc_track_flat_to_25_deg_down( +static void GigaRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD714 */ -static void giga_rc_track_25_deg_down_to_60_deg_down( +static void GigaRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD724 */ -static void giga_rc_track_60_deg_down_to_25_deg_down( +static void GigaRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD734 */ -static void giga_rc_track_25_deg_down_to_flat( +static void GigaRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD744 */ -static void giga_rc_track_left_quarter_turn_5( +static void GigaRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -801,22 +801,22 @@ static void giga_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18189), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18194), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18199), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18184), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -837,22 +837,22 @@ static void giga_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18188), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18193), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18198), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18183), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -867,22 +867,22 @@ static void giga_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18187), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18192), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18197), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18182), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -898,22 +898,22 @@ static void giga_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18186), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18191), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18196), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18181), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -928,22 +928,22 @@ static void giga_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18185), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18190), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18195), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18180), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -964,16 +964,16 @@ static void giga_rc_track_left_quarter_turn_5( } /** rct2: 0x008AD754 */ -static void giga_rc_track_right_quarter_turn_5( +static void GigaRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD764 */ -static void giga_rc_track_flat_to_left_bank( +static void GigaRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -981,32 +981,32 @@ static void giga_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18086), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18086), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18094), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18094), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18087), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18087), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18095), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18095), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18088), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18088), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18089), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18089), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1017,7 +1017,7 @@ static void giga_rc_track_flat_to_left_bank( } /** rct2: 0x008AD774 */ -static void giga_rc_track_flat_to_right_bank( +static void GigaRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1025,32 +1025,32 @@ static void giga_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18090), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18090), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18091), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18091), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18092), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18092), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18096), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18096), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18093), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18093), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18097), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18097), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1061,7 +1061,7 @@ static void giga_rc_track_flat_to_right_bank( } /** rct2: 0x008AD784 */ -static void giga_rc_track_left_bank_to_flat( +static void GigaRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1069,32 +1069,32 @@ static void giga_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18092), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18092), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18096), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18096), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18093), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18093), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18097), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18097), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18090), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18090), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18091), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18091), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1105,7 +1105,7 @@ static void giga_rc_track_left_bank_to_flat( } /** rct2: 0x008AD794 */ -static void giga_rc_track_right_bank_to_flat( +static void GigaRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1113,32 +1113,32 @@ static void giga_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18088), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18088), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18089), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18089), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18086), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18086), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18094), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18094), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18087), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18087), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18095), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18095), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1149,7 +1149,7 @@ static void giga_rc_track_right_bank_to_flat( } /** rct2: 0x008AD7A4 */ -static void giga_rc_track_banked_left_quarter_turn_5( +static void GigaRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1161,25 +1161,25 @@ static void giga_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18209), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18220), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18214), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18219), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18204), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1200,22 +1200,22 @@ static void giga_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18208), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18213), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18218), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18203), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1230,22 +1230,22 @@ static void giga_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18207), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18212), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18217), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18202), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1261,22 +1261,22 @@ static void giga_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18206), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18211), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18216), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18201), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1291,25 +1291,25 @@ static void giga_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18205), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18210), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18215), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18221), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18200), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1330,16 +1330,16 @@ static void giga_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008AD7B4 */ -static void giga_rc_track_banked_right_quarter_turn_5( +static void GigaRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD7C4 */ -static void giga_rc_track_left_bank_to_25_deg_up( +static void GigaRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1347,32 +1347,32 @@ static void giga_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18098), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18098), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18102), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18102), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18099), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18099), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18103), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18103), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18100), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18100), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18101), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18101), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1390,7 +1390,7 @@ static void giga_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008AD7D4 */ -static void giga_rc_track_right_bank_to_25_deg_up( +static void GigaRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1398,32 +1398,32 @@ static void giga_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18104), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18104), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18105), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18105), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18106), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18106), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18108), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18108), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18107), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18107), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18109), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18109), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1441,7 +1441,7 @@ static void giga_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008AD7E4 */ -static void giga_rc_track_25_deg_up_to_left_bank( +static void GigaRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1449,32 +1449,32 @@ static void giga_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18110), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18110), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18114), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18114), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18111), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18111), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18115), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18115), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18112), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18112), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18113), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18113), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1492,7 +1492,7 @@ static void giga_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008AD7F4 */ -static void giga_rc_track_25_deg_up_to_right_bank( +static void GigaRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1500,32 +1500,32 @@ static void giga_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18116), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18116), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18117), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18117), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18118), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18118), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18120), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18120), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18119), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18119), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18121), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18121), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1543,39 +1543,39 @@ static void giga_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008AD804 */ -static void giga_rc_track_left_bank_to_25_deg_down( +static void GigaRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD814 */ -static void giga_rc_track_right_bank_to_25_deg_down( +static void GigaRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD824 */ -static void giga_rc_track_25_deg_down_to_left_bank( +static void GigaRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD834 */ -static void giga_rc_track_25_deg_down_to_right_bank( +static void GigaRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD844 */ -static void giga_rc_track_left_bank( +static void GigaRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1583,26 +1583,26 @@ static void giga_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18122), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18122), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18123), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18123), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18124), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18124), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18125), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18125), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1613,15 +1613,15 @@ static void giga_rc_track_left_bank( } /** rct2: 0x008AD854 */ -static void giga_rc_track_right_bank( +static void GigaRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AD864 */ -static void giga_rc_track_left_quarter_turn_5_25_deg_up( +static void GigaRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1633,22 +1633,22 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18274), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18279), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18284), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18289), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1679,12 +1679,12 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18285), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18290), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1699,17 +1699,17 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18276), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18281), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18286), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1730,7 +1730,7 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18277), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1745,7 +1745,7 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18292), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1760,22 +1760,22 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18278), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18283), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18288), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18293), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1796,7 +1796,7 @@ static void giga_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008AD874 */ -static void giga_rc_track_right_quarter_turn_5_25_deg_up( +static void GigaRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1808,22 +1808,22 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18254), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18259), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18264), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18269), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1844,12 +1844,12 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18255), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18260), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1879,17 +1879,17 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18261), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18266), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18271), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1905,7 +1905,7 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18257), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1920,7 +1920,7 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18272), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1935,22 +1935,22 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18258), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18263), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18268), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18273), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1971,25 +1971,25 @@ static void giga_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008AD884 */ -static void giga_rc_track_left_quarter_turn_5_25_deg_down( +static void GigaRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AD894 */ -static void giga_rc_track_right_quarter_turn_5_25_deg_down( +static void GigaRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD8A4 */ -static void giga_rc_track_s_bend_left( +static void GigaRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2001,22 +2001,22 @@ static void giga_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18238), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18242), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18241), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18245), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2048,12 +2048,12 @@ static void giga_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18240), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18244), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2068,12 +2068,12 @@ static void giga_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18240), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18244), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2102,22 +2102,22 @@ static void giga_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18241), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18245), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18238), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18242), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2138,7 +2138,7 @@ static void giga_rc_track_s_bend_left( } /** rct2: 0x008AD8B4 */ -static void giga_rc_track_s_bend_right( +static void GigaRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2150,22 +2150,22 @@ static void giga_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18246), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18250), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18249), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18253), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2183,14 +2183,14 @@ static void giga_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18247), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18251), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2227,14 +2227,14 @@ static void giga_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18247), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18251), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2251,22 +2251,22 @@ static void giga_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18249), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18253), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18246), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18250), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2287,7 +2287,7 @@ static void giga_rc_track_s_bend_right( } /** rct2: 0x008AD8F4 */ -static void giga_rc_track_left_quarter_turn_3( +static void GigaRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2299,22 +2299,22 @@ static void giga_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18159), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18162), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18165), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18156), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2335,22 +2335,22 @@ static void giga_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18158), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18161), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18164), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18155), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2363,22 +2363,22 @@ static void giga_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18157), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18160), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18163), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18154), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2399,16 +2399,16 @@ static void giga_rc_track_left_quarter_turn_3( } /** rct2: 0x008AD904 */ -static void giga_rc_track_right_quarter_turn_3( +static void GigaRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD914 */ -static void giga_rc_track_left_quarter_turn_3_bank( +static void GigaRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2420,25 +2420,25 @@ static void giga_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18171), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18178), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18174), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18177), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18168), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2459,22 +2459,22 @@ static void giga_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18170), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18173), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18176), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18167), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2487,25 +2487,25 @@ static void giga_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18169), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18172), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18175), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18179), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18166), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2526,16 +2526,16 @@ static void giga_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008AD924 */ -static void giga_rc_track_right_quarter_turn_3_bank( +static void GigaRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD934 */ -static void giga_rc_track_left_quarter_turn_3_25_deg_up( +static void GigaRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2622,7 +2622,7 @@ static void giga_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008AD944 */ -static void giga_rc_track_right_quarter_turn_3_25_deg_up( +static void GigaRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2716,25 +2716,25 @@ static void giga_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008AD954 */ -static void giga_rc_track_left_quarter_turn_3_25_deg_down( +static void GigaRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AD964 */ -static void giga_rc_track_right_quarter_turn_3_25_deg_down( +static void GigaRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD974 */ -static void giga_rc_track_left_half_banked_helix_up_small( +static void GigaRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2746,25 +2746,25 @@ static void giga_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18329), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18336), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18332), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18335), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18326), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2786,22 +2786,22 @@ static void giga_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18328), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18331), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18334), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18325), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2814,25 +2814,25 @@ static void giga_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18327), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18330), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18333), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18337), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18324), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2856,25 +2856,25 @@ static void giga_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18326), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18329), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18336), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18332), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18335), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2901,22 +2901,22 @@ static void giga_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18325), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18328), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18331), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18334), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2929,25 +2929,25 @@ static void giga_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18324), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18327), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18330), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18333), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18337), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2964,7 +2964,7 @@ static void giga_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x008AD984 */ -static void giga_rc_track_right_half_banked_helix_up_small( +static void GigaRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2976,25 +2976,25 @@ static void giga_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18310), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18313), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18316), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18319), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18323), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3016,22 +3016,22 @@ static void giga_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18311), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18314), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18317), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18320), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3044,25 +3044,25 @@ static void giga_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18312), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18315), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18322), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18318), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18321), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3086,25 +3086,25 @@ static void giga_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18313), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18316), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18319), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18323), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18310), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3131,22 +3131,22 @@ static void giga_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18314), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18317), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18320), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18311), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3159,25 +3159,25 @@ static void giga_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18315), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18322), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18318), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18321), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18312), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3194,7 +3194,7 @@ static void giga_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x008AD994 */ -static void giga_rc_track_left_half_banked_helix_down_small( +static void GigaRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3204,11 +3204,11 @@ static void giga_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AD9A4 */ -static void giga_rc_track_right_half_banked_helix_down_small( +static void GigaRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3218,11 +3218,11 @@ static void giga_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AD9B4 */ -static void giga_rc_track_left_half_banked_helix_up_large( +static void GigaRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3234,25 +3234,25 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18369), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18380), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18374), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18379), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18364), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3274,22 +3274,22 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18368), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18373), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18378), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18363), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3304,22 +3304,22 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18367), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18372), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18377), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18362), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3335,22 +3335,22 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18366), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18371), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18376), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18361), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3365,25 +3365,25 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18365), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18370), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18375), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18381), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18360), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3407,25 +3407,25 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18364), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18369), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18380), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18374), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18379), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3452,22 +3452,22 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18363), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18368), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18373), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18378), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3482,22 +3482,22 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18362), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18367), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18372), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18377), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3513,22 +3513,22 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18361), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18366), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18371), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18376), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3543,25 +3543,25 @@ static void giga_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18360), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18365), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18370), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18375), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18381), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3578,7 +3578,7 @@ static void giga_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x008AD9C4 */ -static void giga_rc_track_right_half_banked_helix_up_large( +static void GigaRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3590,25 +3590,25 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18338), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18343), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18348), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18353), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18359), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3630,22 +3630,22 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18339), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18344), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18349), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18354), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3660,22 +3660,22 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18340), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18345), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18350), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18355), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3691,22 +3691,22 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18341), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18346), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18351), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18356), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3721,31 +3721,31 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18342), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18347), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18358), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18352), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18357), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3770,25 +3770,25 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18343), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18348), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18353), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18359), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18338), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3815,22 +3815,22 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18344), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18349), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18354), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18339), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3845,22 +3845,22 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18345), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18350), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18355), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18340), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3876,22 +3876,22 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18346), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18351), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18356), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18341), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3906,31 +3906,31 @@ static void giga_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18347), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18358), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18352), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18357), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18342), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3948,7 +3948,7 @@ static void giga_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x008AD9D4 */ -static void giga_rc_track_left_half_banked_helix_down_large( +static void GigaRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3958,11 +3958,11 @@ static void giga_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AD9E4 */ -static void giga_rc_track_right_half_banked_helix_down_large( +static void GigaRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3972,11 +3972,11 @@ static void giga_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ADA14 */ -static void giga_rc_track_left_quarter_turn_1_60_deg_up( +static void GigaRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3984,44 +3984,44 @@ static void giga_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18231), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18231), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18235), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18235), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18232), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18232), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18236), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18236), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18233), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18233), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18237), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18237), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18230), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18230), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18234), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18234), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008AD9F4 */ -static void giga_rc_track_right_quarter_turn_1_60_deg_up( +static void GigaRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4029,60 +4029,60 @@ static void giga_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18222), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18222), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18226), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18226), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18223), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18223), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18227), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18227), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18224), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18224), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18228), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18228), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18225), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18225), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18229), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18229), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008ADA04 */ -static void giga_rc_track_left_quarter_turn_1_60_deg_down( +static void GigaRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ADA24 */ -static void giga_rc_track_right_quarter_turn_1_60_deg_down( +static void GigaRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ADA34 */ -static void giga_rc_track_brakes( +static void GigaRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4092,22 +4092,22 @@ static void giga_rc_track_brakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(GIGA_COASTER_BRAKE_SW_NE_CLOSED_1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(GIGA_COASTER_BRAKE_SW_NE_CLOSED_2), - { 0, 0, height }, { 32, 1, 11 }, { 0, 27, height + 5 }); + { 0, 0, height }, { { 0, 27, height + 5 }, { 32, 1, 11 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(GIGA_COASTER_BRAKE_NW_SE_CLOSED_1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(GIGA_COASTER_BRAKE_NW_SE_CLOSED_2), - { 0, 0, height }, { 32, 1, 11 }, { 0, 27, height + 5 }); + { 0, 0, height }, { { 0, 27, height + 5 }, { 32, 1, 11 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4118,7 +4118,7 @@ static void giga_rc_track_brakes( } /** rct2: 0x008ADC84 */ -static void giga_rc_track_25_deg_up_left_banked( +static void GigaRCTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4126,26 +4126,26 @@ static void giga_rc_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18560), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18560), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18561), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18561), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18562), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18562), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18563), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18563), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4163,7 +4163,7 @@ static void giga_rc_track_25_deg_up_left_banked( } /** rct2: 0x008ADC94 */ -static void giga_rc_track_25_deg_up_right_banked( +static void GigaRCTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4171,26 +4171,26 @@ static void giga_rc_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18564), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18564), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18565), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18565), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18566), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18566), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18567), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18567), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4208,7 +4208,7 @@ static void giga_rc_track_25_deg_up_right_banked( } /** rct2: 0x008ADA44 */ -static void giga_rc_track_on_ride_photo( +static void GigaRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4220,8 +4220,8 @@ static void giga_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4229,8 +4229,8 @@ static void giga_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4238,8 +4238,8 @@ static void giga_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4247,34 +4247,34 @@ static void giga_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008ADCA4 */ -static void giga_rc_track_25_deg_down_left_banked( +static void GigaRCTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_right_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpRightBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADCB4 */ -static void giga_rc_track_25_deg_down_right_banked( +static void GigaRCTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_left_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpLeftBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADED4 */ -static void giga_rc_track_flat_to_60_deg_up_long_base( +static void GigaRCTrackFlatTo60DegUpLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4288,25 +4288,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18722), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18726), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18730), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18734), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4319,25 +4319,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18660), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18664), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18668), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18672), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4359,25 +4359,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18723), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18727), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18731), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18735), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4390,25 +4390,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18661), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18665), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18669), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18673), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4426,25 +4426,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18724), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18728), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18732), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18736), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4457,25 +4457,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18662), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18666), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18670), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18674), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4493,25 +4493,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18725), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18729), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18733), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18737), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4524,25 +4524,25 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18663), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18667), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18671), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18675), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4565,7 +4565,7 @@ static void giga_rc_track_flat_to_60_deg_up_long_base( } /** rct2: 0x008ADEE4 */ -static void giga_rc_track_60_deg_up_to_flat_long_base( +static void GigaRCTrack60DegUpToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4577,25 +4577,25 @@ static void giga_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18676), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18680), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18684), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18688), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4613,25 +4613,25 @@ static void giga_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18677), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18681), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18685), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18689), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4645,25 +4645,25 @@ static void giga_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18678), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18682), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18686), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18690), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4677,25 +4677,25 @@ static void giga_rc_track_60_deg_up_to_flat_long_base( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18679), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18683), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18687), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18691), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4716,23 +4716,23 @@ static void giga_rc_track_60_deg_up_to_flat_long_base( } /** rct2: 0x008ADEF4 */ -static void giga_rc_track_60_deg_down_to_flat_long_base( +static void GigaRCTrack60DegDownToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_flat_to_60_deg_up_long_base(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackFlatTo60DegUpLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADF04 */ -static void giga_rc_track_flat_to_60_deg_down_long_base( +static void GigaRCTrackFlatTo60DegDownLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_60_deg_up_to_flat_long_base(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack60DegUpToFlatLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADF14 */ -static void giga_rc_track_cable_lift_hill( +static void GigaRCTrackCableLiftHill( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4744,25 +4744,25 @@ static void giga_rc_track_cable_lift_hill( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18698), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18699), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18700), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18701), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4784,25 +4784,25 @@ static void giga_rc_track_cable_lift_hill( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18700), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18701), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18698), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18699), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4824,31 +4824,31 @@ static void giga_rc_track_cable_lift_hill( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18714), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18717), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18715), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18712), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18713), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18716), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4870,25 +4870,25 @@ static void giga_rc_track_cable_lift_hill( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18720), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18721), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18718), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18719), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4908,7 +4908,7 @@ static void giga_rc_track_cable_lift_hill( } /** rct2: 0x008ADA64 */ -static void giga_rc_track_left_eighth_to_diag( +static void GigaRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4920,22 +4920,22 @@ static void giga_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18414), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18418), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18422), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18426), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4953,22 +4953,22 @@ static void giga_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18415), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18419), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18423), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18427), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4983,22 +4983,22 @@ static void giga_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18416), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18420), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18424), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18428), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5017,28 +5017,28 @@ static void giga_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18417), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18421), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18425), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18429), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5053,7 +5053,7 @@ static void giga_rc_track_left_eighth_to_diag( } /** rct2: 0x008ADA74 */ -static void giga_rc_track_right_eighth_to_diag( +static void GigaRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5065,22 +5065,22 @@ static void giga_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18398), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18402), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18406), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18410), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5098,22 +5098,22 @@ static void giga_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18399), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18403), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18407), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18411), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5128,22 +5128,22 @@ static void giga_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18400), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18404), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18408), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18412), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5162,28 +5162,28 @@ static void giga_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18401), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18405), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18409), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18413), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5198,25 +5198,25 @@ static void giga_rc_track_right_eighth_to_diag( } /** rct2: 0x008ADA84 */ -static void giga_rc_track_left_eighth_to_orthogonal( +static void GigaRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - giga_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADA94 */ -static void giga_rc_track_right_eighth_to_orthogonal( +static void GigaRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - giga_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + GigaRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008ADAA4 */ -static void giga_rc_track_left_eighth_bank_to_diag( +static void GigaRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5228,22 +5228,22 @@ static void giga_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18446), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18454), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18458), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5261,22 +5261,22 @@ static void giga_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18447), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18451), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18455), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18459), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5291,22 +5291,22 @@ static void giga_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18448), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18452), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18456), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18460), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5325,28 +5325,28 @@ static void giga_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18449), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18453), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18457), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18461), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5361,7 +5361,7 @@ static void giga_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008ADAB4 */ -static void giga_rc_track_right_eighth_bank_to_diag( +static void GigaRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5373,22 +5373,22 @@ static void giga_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18430), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18434), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18438), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18442), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5406,22 +5406,22 @@ static void giga_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18431), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18435), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18439), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18443), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5436,22 +5436,22 @@ static void giga_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18432), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18436), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18440), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18444), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5470,28 +5470,28 @@ static void giga_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18433), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18437), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18441), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18445), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5506,25 +5506,25 @@ static void giga_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008ADAC4 */ -static void giga_rc_track_left_eighth_bank_to_orthogonal( +static void GigaRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - giga_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADAD4 */ -static void giga_rc_track_right_eighth_bank_to_orthogonal( +static void GigaRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - giga_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + GigaRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008ADA54 */ -static void giga_rc_track_diag_flat( +static void GigaRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5538,7 +5538,7 @@ static void giga_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18527), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5549,7 +5549,7 @@ static void giga_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18465), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5565,7 +5565,7 @@ static void giga_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18524), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5576,7 +5576,7 @@ static void giga_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18462), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5592,7 +5592,7 @@ static void giga_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18526), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5603,7 +5603,7 @@ static void giga_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18464), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5623,7 +5623,7 @@ static void giga_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18525), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5648,7 +5648,7 @@ static void giga_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18463), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5670,7 +5670,7 @@ static void giga_rc_track_diag_flat( } /** rct2: 0x008ADB04 */ -static void giga_rc_track_diag_25_deg_up( +static void GigaRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5684,7 +5684,7 @@ static void giga_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18539), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5695,7 +5695,7 @@ static void giga_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18477), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5711,7 +5711,7 @@ static void giga_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18536), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5722,7 +5722,7 @@ static void giga_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18474), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5738,7 +5738,7 @@ static void giga_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18538), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5749,7 +5749,7 @@ static void giga_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18476), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5769,7 +5769,7 @@ static void giga_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18537), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5794,7 +5794,7 @@ static void giga_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18475), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5816,7 +5816,7 @@ static void giga_rc_track_diag_25_deg_up( } /** rct2: 0x008ADB64 */ -static void giga_rc_track_diag_60_deg_up( +static void GigaRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5828,7 +5828,7 @@ static void giga_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18489), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5841,7 +5841,7 @@ static void giga_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18486), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5854,7 +5854,7 @@ static void giga_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18488), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5871,7 +5871,7 @@ static void giga_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18487), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5892,7 +5892,7 @@ static void giga_rc_track_diag_60_deg_up( } /** rct2: 0x008ADAE4 */ -static void giga_rc_track_diag_flat_to_25_deg_up( +static void GigaRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5906,7 +5906,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18531), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5917,7 +5917,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18469), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5933,7 +5933,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18528), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5944,7 +5944,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18466), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5960,7 +5960,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18530), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5971,7 +5971,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18468), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5991,7 +5991,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18529), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6016,7 +6016,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18467), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6038,7 +6038,7 @@ static void giga_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008ADB44 */ -static void giga_rc_track_diag_25_deg_up_to_60_deg_up( +static void GigaRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6050,7 +6050,7 @@ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18481), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6063,7 +6063,7 @@ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18478), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6076,7 +6076,7 @@ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18480), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6093,7 +6093,7 @@ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18479), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6114,7 +6114,7 @@ static void giga_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008ADB54 */ -static void giga_rc_track_diag_60_deg_up_to_25_deg_up( +static void GigaRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6126,7 +6126,7 @@ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18485), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6139,7 +6139,7 @@ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18482), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6152,7 +6152,7 @@ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18484), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6169,7 +6169,7 @@ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18483), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6190,7 +6190,7 @@ static void giga_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008ADAF4 */ -static void giga_rc_track_diag_25_deg_up_to_flat( +static void GigaRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6204,7 +6204,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18535), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6215,7 +6215,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18473), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6231,7 +6231,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18532), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6242,7 +6242,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18470), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6258,7 +6258,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18534), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6269,7 +6269,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18472), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6289,7 +6289,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18533), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6314,7 +6314,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18471), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6336,7 +6336,7 @@ static void giga_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008ADB34 */ -static void giga_rc_track_diag_25_deg_down( +static void GigaRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6350,7 +6350,7 @@ static void giga_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18537), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6361,7 +6361,7 @@ static void giga_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18475), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6377,7 +6377,7 @@ static void giga_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18538), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6388,7 +6388,7 @@ static void giga_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18476), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6404,7 +6404,7 @@ static void giga_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18536), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6415,7 +6415,7 @@ static void giga_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18474), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6435,7 +6435,7 @@ static void giga_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18539), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6460,7 +6460,7 @@ static void giga_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18477), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6482,7 +6482,7 @@ static void giga_rc_track_diag_25_deg_down( } /** rct2: 0x008ADB94 */ -static void giga_rc_track_diag_60_deg_down( +static void GigaRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6494,7 +6494,7 @@ static void giga_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18487), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6507,7 +6507,7 @@ static void giga_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18488), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6520,7 +6520,7 @@ static void giga_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18486), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6537,7 +6537,7 @@ static void giga_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18489), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6558,7 +6558,7 @@ static void giga_rc_track_diag_60_deg_down( } /** rct2: 0x008ADB14 */ -static void giga_rc_track_diag_flat_to_25_deg_down( +static void GigaRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6572,7 +6572,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18533), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6583,7 +6583,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18471), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6598,7 +6598,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18534), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6609,7 +6609,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18472), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6624,7 +6624,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18532), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6635,7 +6635,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18470), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6654,7 +6654,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18535), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6679,7 +6679,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18473), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6702,7 +6702,7 @@ static void giga_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008ADB74 */ -static void giga_rc_track_diag_25_deg_down_to_60_deg_down( +static void GigaRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6714,7 +6714,7 @@ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18483), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6727,7 +6727,7 @@ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18484), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6740,7 +6740,7 @@ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18482), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6757,7 +6757,7 @@ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18485), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6778,7 +6778,7 @@ static void giga_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008ADB84 */ -static void giga_rc_track_diag_60_deg_down_to_25_deg_down( +static void GigaRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6790,7 +6790,7 @@ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18479), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6803,7 +6803,7 @@ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18480), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6816,7 +6816,7 @@ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18478), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6833,7 +6833,7 @@ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18481), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6854,7 +6854,7 @@ static void giga_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008ADB24 */ -static void giga_rc_track_diag_25_deg_down_to_flat( +static void GigaRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6868,7 +6868,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18529), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6879,7 +6879,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18467), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6895,7 +6895,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18530), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6906,7 +6906,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18468), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6922,7 +6922,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18528), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6933,7 +6933,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18466), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6953,7 +6953,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18531), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6978,7 +6978,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18469), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7000,7 +7000,7 @@ static void giga_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008ADBC4 */ -static void giga_rc_track_diag_flat_to_left_bank( +static void GigaRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7012,7 +7012,7 @@ static void giga_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18497), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7025,10 +7025,10 @@ static void giga_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18494), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18498), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7041,7 +7041,7 @@ static void giga_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18496), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7058,7 +7058,7 @@ static void giga_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18495), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7079,7 +7079,7 @@ static void giga_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008ADBD4 */ -static void giga_rc_track_diag_flat_to_right_bank( +static void GigaRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7091,7 +7091,7 @@ static void giga_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18502), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7104,7 +7104,7 @@ static void giga_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18499), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7117,10 +7117,10 @@ static void giga_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18501), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18503), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7137,7 +7137,7 @@ static void giga_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18500), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7158,7 +7158,7 @@ static void giga_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008ADBE4 */ -static void giga_rc_track_diag_left_bank_to_flat( +static void GigaRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7170,7 +7170,7 @@ static void giga_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18500), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7183,10 +7183,10 @@ static void giga_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18501), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18503), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7199,7 +7199,7 @@ static void giga_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18499), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7216,7 +7216,7 @@ static void giga_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18502), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7237,7 +7237,7 @@ static void giga_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008ADBF4 */ -static void giga_rc_track_diag_right_bank_to_flat( +static void GigaRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7249,7 +7249,7 @@ static void giga_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18495), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7262,7 +7262,7 @@ static void giga_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18496), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7275,10 +7275,10 @@ static void giga_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18494), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18498), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7295,7 +7295,7 @@ static void giga_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18497), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7316,7 +7316,7 @@ static void giga_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008ADC24 */ -static void giga_rc_track_diag_left_bank_to_25_deg_up( +static void GigaRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7328,7 +7328,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18517), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7341,10 +7341,10 @@ static void giga_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18514), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18518), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7357,7 +7357,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18516), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7374,7 +7374,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18515), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7395,7 +7395,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008ADC34 */ -static void giga_rc_track_diag_right_bank_to_25_deg_up( +static void GigaRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7407,7 +7407,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18522), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7420,7 +7420,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18519), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7433,10 +7433,10 @@ static void giga_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18521), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18523), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7453,7 +7453,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18520), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7474,7 +7474,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008ADC04 */ -static void giga_rc_track_diag_25_deg_up_to_left_bank( +static void GigaRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7486,7 +7486,7 @@ static void giga_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18507), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7499,10 +7499,10 @@ static void giga_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18504), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18508), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7515,7 +7515,7 @@ static void giga_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18506), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7532,7 +7532,7 @@ static void giga_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18505), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7553,7 +7553,7 @@ static void giga_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008ADC14 */ -static void giga_rc_track_diag_25_deg_up_to_right_bank( +static void GigaRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7565,7 +7565,7 @@ static void giga_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18512), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7578,7 +7578,7 @@ static void giga_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18509), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7591,10 +7591,10 @@ static void giga_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18511), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18513), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7611,7 +7611,7 @@ static void giga_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18510), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7632,7 +7632,7 @@ static void giga_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008ADC44 */ -static void giga_rc_track_diag_left_bank_to_25_deg_down( +static void GigaRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7644,7 +7644,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18510), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7656,10 +7656,10 @@ static void giga_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18511), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18513), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7671,7 +7671,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18509), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7687,7 +7687,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18512), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7709,7 +7709,7 @@ static void giga_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008ADC54 */ -static void giga_rc_track_diag_right_bank_to_25_deg_down( +static void GigaRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7721,7 +7721,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18505), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7733,7 +7733,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18506), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7745,10 +7745,10 @@ static void giga_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18504), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18508), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7764,7 +7764,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18507), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7786,7 +7786,7 @@ static void giga_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008ADC64 */ -static void giga_rc_track_diag_25_deg_down_to_left_bank( +static void GigaRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7798,7 +7798,7 @@ static void giga_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18520), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7811,10 +7811,10 @@ static void giga_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18521), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18523), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7827,7 +7827,7 @@ static void giga_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18519), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7844,7 +7844,7 @@ static void giga_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18522), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7865,7 +7865,7 @@ static void giga_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008ADC74 */ -static void giga_rc_track_diag_25_deg_down_to_right_bank( +static void GigaRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7877,7 +7877,7 @@ static void giga_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18515), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7890,7 +7890,7 @@ static void giga_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18516), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7903,10 +7903,10 @@ static void giga_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18514), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18518), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7923,7 +7923,7 @@ static void giga_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18517), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7944,7 +7944,7 @@ static void giga_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008ADBA4 */ -static void giga_rc_track_diag_left_bank( +static void GigaRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7956,7 +7956,7 @@ static void giga_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18493), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7969,7 +7969,7 @@ static void giga_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18490), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7982,7 +7982,7 @@ static void giga_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18492), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7999,7 +7999,7 @@ static void giga_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18491), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8020,7 +8020,7 @@ static void giga_rc_track_diag_left_bank( } /** rct2: 0x008ADBB4 */ -static void giga_rc_track_diag_right_bank( +static void GigaRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8032,7 +8032,7 @@ static void giga_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18491), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8045,7 +8045,7 @@ static void giga_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18492), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8058,7 +8058,7 @@ static void giga_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18490), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8075,7 +8075,7 @@ static void giga_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18493), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8096,19 +8096,19 @@ static void giga_rc_track_diag_right_bank( } /** rct2: 0x008ADEC4 */ -static void giga_rc_track_block_brakes( +static void GigaRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_GigaCoasterBrakeImages[direction][isClosed][0]), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_GigaCoasterBrakeImages[direction][isClosed][1]), - { 0, 0, height }, { 32, 1, 11 }, { 0, 27, height + 5 }); + { 0, 0, height }, { { 0, 27, height + 5 }, { 32, 1, 11 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8119,7 +8119,7 @@ static void giga_rc_track_block_brakes( } /** rct2: 0x008ADCC4 */ -static void giga_rc_track_left_banked_quarter_turn_3_25_deg_up( +static void GigaRCTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8136,7 +8136,7 @@ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18657), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( @@ -8175,12 +8175,12 @@ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18656), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18658), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8206,7 +8206,7 @@ static void giga_rc_track_left_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008ADCD4 */ -static void giga_rc_track_right_banked_quarter_turn_3_25_deg_up( +static void GigaRCTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8228,7 +8228,7 @@ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18648), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8264,14 +8264,14 @@ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18647), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18649), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8300,26 +8300,25 @@ static void giga_rc_track_right_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008ADCE4 */ -static void giga_rc_track_left_banked_quarter_turn_3_25_deg_down( +static void GigaRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_right_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ADCF4 */ -static void giga_rc_track_right_banked_quarter_turn_3_25_deg_down( +static void GigaRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - giga_rc_track_left_banked_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ADD04 */ -static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( +static void GigaRCTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8331,22 +8330,22 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18624), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18629), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18634), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18639), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8371,18 +8370,18 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18630), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18630), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18635), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18640), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8397,17 +8396,17 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18626), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18631), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18631), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18636), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8428,22 +8427,22 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18627), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18632), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18632), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18637), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18642), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8458,22 +8457,22 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18628), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18633), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18638), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18643), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8494,7 +8493,7 @@ static void giga_rc_track_left_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008ADD14 */ -static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( +static void GigaRCTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8506,22 +8505,22 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18604), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18609), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18614), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18619), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8542,17 +8541,17 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18605), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18610), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18615), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18615), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8577,17 +8576,17 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18611), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18616), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18616), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18621), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8603,22 +8602,22 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18607), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18612), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18617), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18617), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18622), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8633,22 +8632,22 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18608), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18613), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18618), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18623), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8669,26 +8668,25 @@ static void giga_rc_track_right_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008ADD24 */ -static void giga_rc_track_left_banked_quarter_turn_5_25_deg_down( +static void GigaRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_right_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + GigaRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ADD34 */ -static void giga_rc_track_right_banked_quarter_turn_5_25_deg_down( +static void GigaRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - giga_rc_track_left_banked_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + GigaRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ADD44 */ -static void giga_rc_track_25_deg_up_to_left_banked_25_deg_up( +static void GigaRCTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8696,29 +8694,29 @@ static void giga_rc_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18568), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18568), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18569), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18569), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18576), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18576), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18570), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18570), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18571), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18571), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8736,7 +8734,7 @@ static void giga_rc_track_25_deg_up_to_left_banked_25_deg_up( } /** rct2: 0x008ADD54 */ -static void giga_rc_track_25_deg_up_to_right_banked_25_deg_up( +static void GigaRCTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8744,29 +8742,29 @@ static void giga_rc_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18572), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18572), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18573), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18573), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18574), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18574), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18577), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18577), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18575), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18575), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8784,7 +8782,7 @@ static void giga_rc_track_25_deg_up_to_right_banked_25_deg_up( } /** rct2: 0x008ADD64 */ -static void giga_rc_track_left_banked_25_deg_up_to_25_deg_up( +static void GigaRCTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8792,29 +8790,29 @@ static void giga_rc_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18578), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18578), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18579), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18579), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18586), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18586), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18580), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18580), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18581), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18581), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8832,7 +8830,7 @@ static void giga_rc_track_left_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008ADD74 */ -static void giga_rc_track_right_banked_25_deg_up_to_25_deg_up( +static void GigaRCTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8840,29 +8838,29 @@ static void giga_rc_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18582), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18582), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18583), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18583), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18584), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18584), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18587), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18587), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18585), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18585), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8880,39 +8878,39 @@ static void giga_rc_track_right_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008ADD84 */ -static void giga_rc_track_25_deg_down_to_left_banked_25_deg_down( +static void GigaRCTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_right_banked_25_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADD94 */ -static void giga_rc_track_25_deg_down_to_right_banked_25_deg_down( +static void GigaRCTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_banked_25_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADDA4 */ -static void giga_rc_track_left_banked_25_deg_down_to_25_deg_down( +static void GigaRCTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADDB4 */ -static void giga_rc_track_right_banked_25_deg_down_to_25_deg_down( +static void GigaRCTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_25_deg_up_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrack25DegUpToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADDC4 */ -static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_up( +static void GigaRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8920,26 +8918,26 @@ static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18588), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18588), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18589), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18589), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18590), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18590), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18591), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18591), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8957,7 +8955,7 @@ static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_up( } /** rct2: 0x008ADDD4 */ -static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_up( +static void GigaRCTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8965,26 +8963,26 @@ static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18592), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18592), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18593), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18593), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18594), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18594), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18595), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18595), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9002,7 +9000,7 @@ static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_up( } /** rct2: 0x008ADE04 */ -static void giga_rc_track_left_banked_25_deg_up_to_left_banked_flat( +static void GigaRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9010,26 +9008,26 @@ static void giga_rc_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18596), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18596), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18597), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18597), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18598), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18598), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18599), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18599), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9047,7 +9045,7 @@ static void giga_rc_track_left_banked_25_deg_up_to_left_banked_flat( } /** rct2: 0x008ADE14 */ -static void giga_rc_track_right_banked_25_deg_up_to_right_banked_flat( +static void GigaRCTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9055,26 +9053,26 @@ static void giga_rc_track_right_banked_25_deg_up_to_right_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18600), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18600), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18601), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18601), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18602), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18602), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18603), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18603), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9092,43 +9090,39 @@ static void giga_rc_track_right_banked_25_deg_up_to_right_banked_flat( } /** rct2: 0x008ADE24 */ -static void giga_rc_track_left_banked_flat_to_left_banked_25_deg_down( +static void GigaRCTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_right_banked_25_deg_up_to_right_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightBanked25DegUpToRightBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADE34 */ -static void giga_rc_track_right_banked_flat_to_right_banked_25_deg_down( +static void GigaRCTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_banked_25_deg_up_to_left_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBanked25DegUpToLeftBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADDE4 */ -static void giga_rc_track_left_banked_25_deg_down_to_left_banked_flat( +static void GigaRCTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_right_banked_flat_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightBankedFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADDF4 */ -static void giga_rc_track_right_banked_25_deg_down_to_right_banked_flat( +static void GigaRCTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_banked_flat_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBankedFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADE44 */ -static void giga_rc_track_flat_to_left_banked_25_deg_up( +static void GigaRCTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9136,29 +9130,29 @@ static void giga_rc_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18540), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18540), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18541), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18541), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18548), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18548), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18542), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18542), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18543), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18543), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9176,7 +9170,7 @@ static void giga_rc_track_flat_to_left_banked_25_deg_up( } /** rct2: 0x008ADE54 */ -static void giga_rc_track_flat_to_right_banked_25_deg_up( +static void GigaRCTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9184,29 +9178,29 @@ static void giga_rc_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18544), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18544), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18545), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18545), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18546), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18546), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18549), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18549), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18547), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18547), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9224,7 +9218,7 @@ static void giga_rc_track_flat_to_right_banked_25_deg_up( } /** rct2: 0x008ADE64 */ -static void giga_rc_track_left_banked_25_deg_up_to_flat( +static void GigaRCTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9232,29 +9226,29 @@ static void giga_rc_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18550), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18550), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18551), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18551), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18558), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18558), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18552), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18552), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18553), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18553), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9272,7 +9266,7 @@ static void giga_rc_track_left_banked_25_deg_up_to_flat( } /** rct2: 0x008ADE74 */ -static void giga_rc_track_right_banked_25_deg_up_to_flat( +static void GigaRCTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9280,29 +9274,29 @@ static void giga_rc_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18554), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18554), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18555), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18555), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18556), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18556), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18559), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18559), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18557), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18557), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9320,38 +9314,38 @@ static void giga_rc_track_right_banked_25_deg_up_to_flat( } /** rct2: 0x008ADE84 */ -static void giga_rc_track_flat_to_left_banked_25_deg_down( +static void GigaRCTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_right_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackRightBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADE94 */ -static void giga_rc_track_flat_to_right_banked_25_deg_down( +static void GigaRCTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_left_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackLeftBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADEA4 */ -static void giga_rc_track_left_banked_25_deg_down_to_flat( +static void GigaRCTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_flat_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ADEB4 */ -static void giga_rc_track_right_banked_25_deg_down_to_flat( +static void GigaRCTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - giga_rc_track_flat_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + GigaRCTrackFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void giga_rc_track_booster( +static void GigaRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9367,16 +9361,16 @@ static void giga_rc_track_booster( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_RC_BOOSTER_NE_SW), - { ne_sw_offsetX, ne_sw_offsetY, height }, { 32, 20, 3 }, { 0, 6, height }); + { ne_sw_offsetX, ne_sw_offsetY, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_GIGA_RC_BOOSTER_NW_SE), - { nw_se_offsetX, nw_se_offsetY, height }, { 32, 20, 3 }, { 0, 6, height }); + { nw_se_offsetX, nw_se_offsetY, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9386,289 +9380,289 @@ static void giga_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionGigaRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return giga_rc_track_flat; + return GigaRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return giga_rc_track_station; + return GigaRCTrackStation; case TrackElemType::Up25: - return giga_rc_track_25_deg_up; + return GigaRCTrack25DegUp; case TrackElemType::Up60: - return giga_rc_track_60_deg_up; + return GigaRCTrack60DegUp; case TrackElemType::FlatToUp25: - return giga_rc_track_flat_to_25_deg_up; + return GigaRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return giga_rc_track_25_deg_up_to_60_deg_up; + return GigaRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return giga_rc_track_60_deg_up_to_25_deg_up; + return GigaRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return giga_rc_track_25_deg_up_to_flat; + return GigaRCTrack25DegUpToFlat; case TrackElemType::Down25: - return giga_rc_track_25_deg_down; + return GigaRCTrack25DegDown; case TrackElemType::Down60: - return giga_rc_track_60_deg_down; + return GigaRCTrack60DegDown; case TrackElemType::FlatToDown25: - return giga_rc_track_flat_to_25_deg_down; + return GigaRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return giga_rc_track_25_deg_down_to_60_deg_down; + return GigaRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return giga_rc_track_60_deg_down_to_25_deg_down; + return GigaRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return giga_rc_track_25_deg_down_to_flat; + return GigaRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return giga_rc_track_left_quarter_turn_5; + return GigaRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return giga_rc_track_right_quarter_turn_5; + return GigaRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return giga_rc_track_flat_to_left_bank; + return GigaRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return giga_rc_track_flat_to_right_bank; + return GigaRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return giga_rc_track_left_bank_to_flat; + return GigaRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return giga_rc_track_right_bank_to_flat; + return GigaRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return giga_rc_track_banked_left_quarter_turn_5; + return GigaRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return giga_rc_track_banked_right_quarter_turn_5; + return GigaRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return giga_rc_track_left_bank_to_25_deg_up; + return GigaRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return giga_rc_track_right_bank_to_25_deg_up; + return GigaRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return giga_rc_track_25_deg_up_to_left_bank; + return GigaRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return giga_rc_track_25_deg_up_to_right_bank; + return GigaRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return giga_rc_track_left_bank_to_25_deg_down; + return GigaRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return giga_rc_track_right_bank_to_25_deg_down; + return GigaRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return giga_rc_track_25_deg_down_to_left_bank; + return GigaRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return giga_rc_track_25_deg_down_to_right_bank; + return GigaRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return giga_rc_track_left_bank; + return GigaRCTrackLeftBank; case TrackElemType::RightBank: - return giga_rc_track_right_bank; + return GigaRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return giga_rc_track_left_quarter_turn_5_25_deg_up; + return GigaRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return giga_rc_track_right_quarter_turn_5_25_deg_up; + return GigaRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return giga_rc_track_left_quarter_turn_5_25_deg_down; + return GigaRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return giga_rc_track_right_quarter_turn_5_25_deg_down; + return GigaRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return giga_rc_track_s_bend_left; + return GigaRCTrackSBendLeft; case TrackElemType::SBendRight: - return giga_rc_track_s_bend_right; + return GigaRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return giga_rc_track_left_quarter_turn_3; + return GigaRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return giga_rc_track_right_quarter_turn_3; + return GigaRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return giga_rc_track_left_quarter_turn_3_bank; + return GigaRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return giga_rc_track_right_quarter_turn_3_bank; + return GigaRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return giga_rc_track_left_quarter_turn_3_25_deg_up; + return GigaRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return giga_rc_track_right_quarter_turn_3_25_deg_up; + return GigaRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return giga_rc_track_left_quarter_turn_3_25_deg_down; + return GigaRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return giga_rc_track_right_quarter_turn_3_25_deg_down; + return GigaRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return giga_rc_track_left_half_banked_helix_up_small; + return GigaRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return giga_rc_track_right_half_banked_helix_up_small; + return GigaRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return giga_rc_track_left_half_banked_helix_down_small; + return GigaRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return giga_rc_track_right_half_banked_helix_down_small; + return GigaRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return giga_rc_track_left_half_banked_helix_up_large; + return GigaRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return giga_rc_track_right_half_banked_helix_up_large; + return GigaRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return giga_rc_track_left_half_banked_helix_down_large; + return GigaRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return giga_rc_track_right_half_banked_helix_down_large; + return GigaRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return giga_rc_track_left_quarter_turn_1_60_deg_up; + return GigaRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return giga_rc_track_right_quarter_turn_1_60_deg_up; + return GigaRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return giga_rc_track_left_quarter_turn_1_60_deg_down; + return GigaRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return giga_rc_track_right_quarter_turn_1_60_deg_down; + return GigaRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return giga_rc_track_brakes; + return GigaRCTrackBrakes; case TrackElemType::Up25LeftBanked: - return giga_rc_track_25_deg_up_left_banked; + return GigaRCTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return giga_rc_track_25_deg_up_right_banked; + return GigaRCTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return giga_rc_track_on_ride_photo; + return GigaRCTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return giga_rc_track_25_deg_down_left_banked; + return GigaRCTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return giga_rc_track_25_deg_down_right_banked; + return GigaRCTrack25DegDownRightBanked; case TrackElemType::FlatToUp60LongBase: - return giga_rc_track_flat_to_60_deg_up_long_base; + return GigaRCTrackFlatTo60DegUpLongBase; case TrackElemType::Up60ToFlatLongBase: - return giga_rc_track_60_deg_up_to_flat_long_base; + return GigaRCTrack60DegUpToFlatLongBase; case TrackElemType::Down60ToFlatLongBase: - return giga_rc_track_60_deg_down_to_flat_long_base; + return GigaRCTrack60DegDownToFlatLongBase; case TrackElemType::FlatToDown60LongBase: - return giga_rc_track_flat_to_60_deg_down_long_base; + return GigaRCTrackFlatTo60DegDownLongBase; case TrackElemType::CableLiftHill: - return giga_rc_track_cable_lift_hill; + return GigaRCTrackCableLiftHill; case TrackElemType::LeftEighthToDiag: - return giga_rc_track_left_eighth_to_diag; + return GigaRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return giga_rc_track_right_eighth_to_diag; + return GigaRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return giga_rc_track_left_eighth_to_orthogonal; + return GigaRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return giga_rc_track_right_eighth_to_orthogonal; + return GigaRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return giga_rc_track_left_eighth_bank_to_diag; + return GigaRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return giga_rc_track_right_eighth_bank_to_diag; + return GigaRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return giga_rc_track_left_eighth_bank_to_orthogonal; + return GigaRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return giga_rc_track_right_eighth_bank_to_orthogonal; + return GigaRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return giga_rc_track_diag_flat; + return GigaRCTrackDiagFlat; case TrackElemType::DiagUp25: - return giga_rc_track_diag_25_deg_up; + return GigaRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return giga_rc_track_diag_60_deg_up; + return GigaRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return giga_rc_track_diag_flat_to_25_deg_up; + return GigaRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return giga_rc_track_diag_25_deg_up_to_60_deg_up; + return GigaRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return giga_rc_track_diag_60_deg_up_to_25_deg_up; + return GigaRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return giga_rc_track_diag_25_deg_up_to_flat; + return GigaRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return giga_rc_track_diag_25_deg_down; + return GigaRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return giga_rc_track_diag_60_deg_down; + return GigaRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return giga_rc_track_diag_flat_to_25_deg_down; + return GigaRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return giga_rc_track_diag_25_deg_down_to_60_deg_down; + return GigaRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return giga_rc_track_diag_60_deg_down_to_25_deg_down; + return GigaRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return giga_rc_track_diag_25_deg_down_to_flat; + return GigaRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return giga_rc_track_diag_flat_to_left_bank; + return GigaRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return giga_rc_track_diag_flat_to_right_bank; + return GigaRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return giga_rc_track_diag_left_bank_to_flat; + return GigaRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return giga_rc_track_diag_right_bank_to_flat; + return GigaRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return giga_rc_track_diag_left_bank_to_25_deg_up; + return GigaRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return giga_rc_track_diag_right_bank_to_25_deg_up; + return GigaRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return giga_rc_track_diag_25_deg_up_to_left_bank; + return GigaRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return giga_rc_track_diag_25_deg_up_to_right_bank; + return GigaRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return giga_rc_track_diag_left_bank_to_25_deg_down; + return GigaRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return giga_rc_track_diag_right_bank_to_25_deg_down; + return GigaRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return giga_rc_track_diag_25_deg_down_to_left_bank; + return GigaRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return giga_rc_track_diag_25_deg_down_to_right_bank; + return GigaRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return giga_rc_track_diag_left_bank; + return GigaRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return giga_rc_track_diag_right_bank; + return GigaRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return giga_rc_track_block_brakes; + return GigaRCTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return giga_rc_track_left_banked_quarter_turn_3_25_deg_up; + return GigaRCTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return giga_rc_track_right_banked_quarter_turn_3_25_deg_up; + return GigaRCTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return giga_rc_track_left_banked_quarter_turn_3_25_deg_down; + return GigaRCTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return giga_rc_track_right_banked_quarter_turn_3_25_deg_down; + return GigaRCTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return giga_rc_track_left_banked_quarter_turn_5_25_deg_up; + return GigaRCTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return giga_rc_track_right_banked_quarter_turn_5_25_deg_up; + return GigaRCTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return giga_rc_track_left_banked_quarter_turn_5_25_deg_down; + return GigaRCTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return giga_rc_track_right_banked_quarter_turn_5_25_deg_down; + return GigaRCTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return giga_rc_track_25_deg_up_to_left_banked_25_deg_up; + return GigaRCTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return giga_rc_track_25_deg_up_to_right_banked_25_deg_up; + return GigaRCTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return giga_rc_track_left_banked_25_deg_up_to_25_deg_up; + return GigaRCTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return giga_rc_track_right_banked_25_deg_up_to_25_deg_up; + return GigaRCTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return giga_rc_track_25_deg_down_to_left_banked_25_deg_down; + return GigaRCTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return giga_rc_track_25_deg_down_to_right_banked_25_deg_down; + return GigaRCTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return giga_rc_track_left_banked_25_deg_down_to_25_deg_down; + return GigaRCTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return giga_rc_track_right_banked_25_deg_down_to_25_deg_down; + return GigaRCTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return giga_rc_track_left_banked_flat_to_left_banked_25_deg_up; + return GigaRCTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return giga_rc_track_right_banked_flat_to_right_banked_25_deg_up; + return GigaRCTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return giga_rc_track_left_banked_25_deg_up_to_left_banked_flat; + return GigaRCTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return giga_rc_track_right_banked_25_deg_up_to_right_banked_flat; + return GigaRCTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return giga_rc_track_left_banked_flat_to_left_banked_25_deg_down; + return GigaRCTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return giga_rc_track_right_banked_flat_to_right_banked_25_deg_down; + return GigaRCTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return giga_rc_track_left_banked_25_deg_down_to_left_banked_flat; + return GigaRCTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return giga_rc_track_right_banked_25_deg_down_to_right_banked_flat; + return GigaRCTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return giga_rc_track_flat_to_left_banked_25_deg_up; + return GigaRCTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return giga_rc_track_flat_to_right_banked_25_deg_up; + return GigaRCTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return giga_rc_track_left_banked_25_deg_up_to_flat; + return GigaRCTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return giga_rc_track_right_banked_25_deg_up_to_flat; + return GigaRCTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return giga_rc_track_flat_to_left_banked_25_deg_down; + return GigaRCTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return giga_rc_track_flat_to_right_banked_25_deg_down; + return GigaRCTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return giga_rc_track_left_banked_25_deg_down_to_flat; + return GigaRCTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return giga_rc_track_right_banked_25_deg_down_to_flat; + return GigaRCTrackRightBanked25DegDownToFlat; case TrackElemType::Booster: - return giga_rc_track_booster; + return GigaRCTrackBooster; } return nullptr; } diff --git a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp index 00d9fc792a..246a35f6a1 100644 --- a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x0087694C */ -static void heartline_twister_rc_track_flat( +static void HeartlineTwisterRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -29,38 +29,38 @@ static void heartline_twister_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21354), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21354), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21356), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21356), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21355), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21355), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21357), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21357), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21358), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21358), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21360), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21360), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21359), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21359), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21361), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21361), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -72,21 +72,21 @@ static void heartline_twister_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21294), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21294), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21296), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21296), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21295), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21295), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21297), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21297), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -96,7 +96,7 @@ static void heartline_twister_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void heartline_twister_rc_track_station( +static void HeartlineTwisterRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -109,19 +109,19 @@ static void heartline_twister_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x0087695C */ -static void heartline_twister_rc_track_25_deg_up( +static void HeartlineTwisterRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -131,38 +131,38 @@ static void heartline_twister_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21378), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21378), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21382), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21382), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21379), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21379), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21383), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21383), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21380), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21380), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21384), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21384), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21381), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21381), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21385), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21385), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -173,38 +173,38 @@ static void heartline_twister_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21322), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21322), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21326), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21326), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21323), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21323), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21327), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21327), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21324), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21324), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21328), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21328), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21325), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21325), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21329), { 0, 0, height }, { 32, 1, 50 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21329), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 50 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -222,7 +222,7 @@ static void heartline_twister_rc_track_25_deg_up( } /** rct2: 0x008769FC */ -static void heartline_twister_rc_track_60_deg_up( +static void HeartlineTwisterRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -232,38 +232,38 @@ static void heartline_twister_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21402), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21402), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21406), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21406), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 6, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21403), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21403), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21407), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21407), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 7, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21404), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21404), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21408), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21408), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 6, 23, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21405), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21405), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21409), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21409), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 7, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -274,38 +274,38 @@ static void heartline_twister_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21346), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21346), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21350), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21350), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 6, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21347), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21347), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21351), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21351), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 7, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21348), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21348), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21352), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21352), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 6, 23, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21349), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21349), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21353), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21353), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, 7, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -323,7 +323,7 @@ static void heartline_twister_rc_track_60_deg_up( } /** rct2: 0x0087696C */ -static void heartline_twister_rc_track_flat_to_25_deg_up( +static void HeartlineTwisterRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -333,38 +333,38 @@ static void heartline_twister_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21362), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21362), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21366), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21366), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21363), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21363), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21367), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21367), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21364), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21364), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21368), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21368), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21365), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21365), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21369), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21369), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -375,38 +375,38 @@ static void heartline_twister_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height }, { 32, 1, 42 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 42 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -424,7 +424,7 @@ static void heartline_twister_rc_track_flat_to_25_deg_up( } /** rct2: 0x008769BC */ -static void heartline_twister_rc_track_25_deg_up_to_60_deg_up( +static void HeartlineTwisterRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -434,38 +434,38 @@ static void heartline_twister_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21386), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21386), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21390), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21390), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21387), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21387), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21391), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21391), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21388), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21388), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21392), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21392), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21389), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21389), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21393), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21393), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -476,38 +476,38 @@ static void heartline_twister_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21330), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21330), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21334), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21334), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21331), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21331), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21335), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21335), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21332), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21332), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21336), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21336), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21333), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21333), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21337), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21337), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -525,7 +525,7 @@ static void heartline_twister_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008769CC */ -static void heartline_twister_rc_track_60_deg_up_to_25_deg_up( +static void HeartlineTwisterRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -535,38 +535,38 @@ static void heartline_twister_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21394), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21394), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21398), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21398), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21395), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21395), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21399), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21399), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21396), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21396), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21400), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21400), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 19, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21397), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21397), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21401), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21401), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -577,38 +577,38 @@ static void heartline_twister_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21338), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21338), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21342), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21342), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21339), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21339), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21343), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21343), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21340), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21340), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21344), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21344), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 19, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21341), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21341), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21345), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21345), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -626,7 +626,7 @@ static void heartline_twister_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x0087697C */ -static void heartline_twister_rc_track_25_deg_up_to_flat( +static void HeartlineTwisterRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -636,38 +636,38 @@ static void heartline_twister_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21370), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21370), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21374), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21374), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21371), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21371), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21375), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21375), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21372), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21372), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21376), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21376), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21373), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21373), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21377), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21377), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -678,38 +678,38 @@ static void heartline_twister_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21314), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21314), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21315), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21315), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21316), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21316), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21317), { 0, 0, height }, { 32, 20, 2 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21317), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -727,55 +727,55 @@ static void heartline_twister_rc_track_25_deg_up_to_flat( } /** rct2: 0x0087698C */ -static void heartline_twister_rc_track_25_deg_down( +static void HeartlineTwisterRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - heartline_twister_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + HeartlineTwisterRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00876A0C */ -static void heartline_twister_rc_track_60_deg_down( +static void HeartlineTwisterRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - heartline_twister_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + HeartlineTwisterRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0087699C */ -static void heartline_twister_rc_track_flat_to_25_deg_down( +static void HeartlineTwisterRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - heartline_twister_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + HeartlineTwisterRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008769DC */ -static void heartline_twister_rc_track_25_deg_down_to_60_deg_down( +static void HeartlineTwisterRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - heartline_twister_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + HeartlineTwisterRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008769EC */ -static void heartline_twister_rc_track_60_deg_down_to_25_deg_down( +static void HeartlineTwisterRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - heartline_twister_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + HeartlineTwisterRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008769AC */ -static void heartline_twister_rc_track_25_deg_down_to_flat( +static void HeartlineTwisterRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - heartline_twister_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + HeartlineTwisterRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00876A6C */ -static void heartline_twister_rc_track_heartline_transfer_up( +static void HeartlineTwisterRCTrackHeartlineTransferUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -787,37 +787,37 @@ static void heartline_twister_rc_track_heartline_transfer_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -838,61 +838,61 @@ static void heartline_twister_rc_track_heartline_transfer_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21314), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 5, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21315), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 6, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21316), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 7, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21317), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 8, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -905,37 +905,37 @@ static void heartline_twister_rc_track_heartline_transfer_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21298), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21302), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21299), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21303), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21300), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21304), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21301), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21305), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -948,34 +948,34 @@ static void heartline_twister_rc_track_heartline_transfer_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21316), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21317), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21314), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21315), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; } if (direction == 0 || direction == 3) @@ -993,7 +993,7 @@ static void heartline_twister_rc_track_heartline_transfer_up( } /** rct2: 0x00876A7C */ -static void heartline_twister_rc_track_heartline_transfer_down( +static void HeartlineTwisterRCTrackHeartlineTransferDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1005,34 +1005,34 @@ static void heartline_twister_rc_track_heartline_transfer_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21316), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21317), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21314), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21315), { 0, 0, height - 8 }, - { 32, 20, 2 }, { 0, 6, height - 7 }); + { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height - 8 }, - { 32, 1, 34 }, { 0, 27, height - 8 }); + { { 0, 27, height - 8 }, { 32, 1, 34 } }); break; } if (direction == 0 || direction == 3) @@ -1052,61 +1052,61 @@ static void heartline_twister_rc_track_heartline_transfer_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21314), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 5, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21315), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 6, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21316), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 7, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21317), { 0, 0, height + 8 }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height + 16 }, - { 32, 20, 2 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height + 8 }, - { 32, 1, 34 }, { 0, 27, height + 8 }); + { { 0, 27, height + 8 }, { 32, 1, 34 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height + 16 }, - { 32, 1, 34 }, { 0, 27, height + 16 }); + { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 8, height + 8, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1119,37 +1119,37 @@ static void heartline_twister_rc_track_heartline_transfer_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21298), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21302), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21299), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21303), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21300), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21304), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21301), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21305), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1162,37 +1162,37 @@ static void heartline_twister_rc_track_heartline_transfer_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 23 }); + { { 0, 6, height + 23 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1211,7 +1211,7 @@ static void heartline_twister_rc_track_heartline_transfer_down( } /** rct2: 0x00876A4C */ -static void heartline_twister_rc_track_left_heartline_roll( +static void HeartlineTwisterRCTrackLeftHeartlineRoll( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1223,37 +1223,37 @@ static void heartline_twister_rc_track_left_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21410), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21422), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21413), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21425), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21416), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21428), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21419), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21431), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1267,37 +1267,37 @@ static void heartline_twister_rc_track_left_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21411), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21423), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21414), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21426), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21417), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21429), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21420), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21432), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1310,37 +1310,37 @@ static void heartline_twister_rc_track_left_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21412), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21424), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21415), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21427), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21418), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21430), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21421), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21433), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1353,37 +1353,37 @@ static void heartline_twister_rc_track_left_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21418), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21430), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21421), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21433), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21412), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21424), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21415), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21427), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1396,37 +1396,37 @@ static void heartline_twister_rc_track_left_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21417), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21429), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21420), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21432), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21411), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21423), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21414), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21426), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1439,37 +1439,37 @@ static void heartline_twister_rc_track_left_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21416), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21428), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21419), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21431), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21410), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21422), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21413), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21425), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1481,7 +1481,7 @@ static void heartline_twister_rc_track_left_heartline_roll( } /** rct2: 0x00876A5C */ -static void heartline_twister_rc_track_right_heartline_roll( +static void HeartlineTwisterRCTrackRightHeartlineRoll( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1493,37 +1493,37 @@ static void heartline_twister_rc_track_right_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21434), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21446), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21437), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21449), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21440), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21452), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21443), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21455), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1537,37 +1537,37 @@ static void heartline_twister_rc_track_right_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21435), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21447), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21438), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21441), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21453), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21444), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21456), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1580,37 +1580,37 @@ static void heartline_twister_rc_track_right_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21436), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21448), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21439), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21451), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21442), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21454), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21445), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21457), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1623,37 +1623,37 @@ static void heartline_twister_rc_track_right_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21442), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21454), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21445), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21457), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21436), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21448), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21439), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21451), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1666,37 +1666,37 @@ static void heartline_twister_rc_track_right_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21441), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21453), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21444), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21456), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21435), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21447), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21438), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1709,37 +1709,37 @@ static void heartline_twister_rc_track_right_heartline_roll( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21440), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21452), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21443), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21455), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21434), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21446), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21437), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21449), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1750,48 +1750,48 @@ static void heartline_twister_rc_track_right_heartline_roll( } } -TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionHeartlineTwisterRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return heartline_twister_rc_track_flat; + return HeartlineTwisterRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return heartline_twister_rc_track_station; + return HeartlineTwisterRCTrackStation; case TrackElemType::Up25: - return heartline_twister_rc_track_25_deg_up; + return HeartlineTwisterRCTrack25DegUp; case TrackElemType::Up60: - return heartline_twister_rc_track_60_deg_up; + return HeartlineTwisterRCTrack60DegUp; case TrackElemType::FlatToUp25: - return heartline_twister_rc_track_flat_to_25_deg_up; + return HeartlineTwisterRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return heartline_twister_rc_track_25_deg_up_to_60_deg_up; + return HeartlineTwisterRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return heartline_twister_rc_track_60_deg_up_to_25_deg_up; + return HeartlineTwisterRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return heartline_twister_rc_track_25_deg_up_to_flat; + return HeartlineTwisterRCTrack25DegUpToFlat; case TrackElemType::Down25: - return heartline_twister_rc_track_25_deg_down; + return HeartlineTwisterRCTrack25DegDown; case TrackElemType::Down60: - return heartline_twister_rc_track_60_deg_down; + return HeartlineTwisterRCTrack60DegDown; case TrackElemType::FlatToDown25: - return heartline_twister_rc_track_flat_to_25_deg_down; + return HeartlineTwisterRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return heartline_twister_rc_track_25_deg_down_to_60_deg_down; + return HeartlineTwisterRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return heartline_twister_rc_track_60_deg_down_to_25_deg_down; + return HeartlineTwisterRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return heartline_twister_rc_track_25_deg_down_to_flat; + return HeartlineTwisterRCTrack25DegDownToFlat; case TrackElemType::HeartLineTransferUp: - return heartline_twister_rc_track_heartline_transfer_up; + return HeartlineTwisterRCTrackHeartlineTransferUp; case TrackElemType::HeartLineTransferDown: - return heartline_twister_rc_track_heartline_transfer_down; + return HeartlineTwisterRCTrackHeartlineTransferDown; case TrackElemType::LeftHeartLineRoll: - return heartline_twister_rc_track_left_heartline_roll; + return HeartlineTwisterRCTrackLeftHeartlineRoll; case TrackElemType::RightHeartLineRoll: - return heartline_twister_rc_track_right_heartline_roll; + return HeartlineTwisterRCTrackRightHeartlineRoll; } return nullptr; } diff --git a/src/openrct2/ride/coaster/HybridCoaster.cpp b/src/openrct2/ride/coaster/HybridCoaster.cpp index a32b4805fc..d24f0cfbed 100644 --- a/src/openrct2/ride/coaster/HybridCoaster.cpp +++ b/src/openrct2/ride/coaster/HybridCoaster.cpp @@ -42,13 +42,13 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT + direction), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } else { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT + (direction & 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -70,19 +70,19 @@ namespace HybridRC if (trackElement.GetTrackType() == TrackElemType::EndStation) { PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height + 3 }); + session, direction, GetTrackColour(session).WithIndex(imageIds[direction][1]), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( - session, direction, GetTrackColour(session).WithIndex(imageIds[direction][0]), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height + 3 }); + session, direction, GetTrackColour(session).WithIndex(imageIds[direction][0]), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 10, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 10, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -97,13 +97,13 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE + direction + 8), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); } else { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE + direction + 8), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -151,8 +151,9 @@ namespace HybridRC auto* ps = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(imageIds[trackElement.HasChain() ? 0 : 1][direction]), - { 0, 0, height }, { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z }, - { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }); + { 0, 0, height }, + { { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }, + { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); if (direction == 1 || direction == 2) { @@ -180,13 +181,13 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE + direction), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } else { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE + direction), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -212,28 +213,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 3, height + 3 }); + { 0, 0, height }, { { 0, 3, height + 3 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 2), - { 0, 0, height }, { 32, 2, 43 }, { 0, 28, height }); + { 0, 0, height }, { { 0, 28, height }, { 32, 2, 43 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 3, height + 3 }); + { 0, 0, height }, { { 0, 3, height + 3 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 4), - { 0, 0, height }, { 32, 2, 43 }, { 0, 28, height }); + { 0, 0, height }, { { 0, 28, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } } @@ -244,28 +245,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 0), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 2 }); + { { 0, 6, height + 2 }, { 32, 20, 3 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 1), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 2), { 0, 0, height }, - { 32, 2, 43 }, { 0, 28, height }); + { { 0, 28, height }, { 32, 2, 43 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 3), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 4), { 0, 0, height }, - { 32, 2, 43 }, { 0, 28, height }); + { { 0, 28, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 5), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 2 }); + { { 0, 6, height + 2 }, { 32, 20, 3 } }); break; } } @@ -293,28 +294,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 8), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 9), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 10), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP + 11), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } } @@ -325,29 +326,29 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 6), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 7), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 8), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 9), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 10), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP + 11), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } } @@ -372,13 +373,13 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE + direction + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } else { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE + direction + 4), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -462,8 +463,8 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(imageIds[direction]), { 0, 0, height }, - { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z }, - { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }); + { { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }, + { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); PaintUtilSetVerticalTunnel(session, height + 32); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -508,8 +509,8 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(imageIds[direction]), { 0, 0, height }, - { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z }, - { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }); + { { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }, + { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) { @@ -556,8 +557,8 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(imageIds[direction]), { 0, 0, height }, - { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z }, - { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }); + { { boundBoxOffsets[direction].x, boundBoxOffsets[direction].y, boundBoxOffsets[direction].z }, + { boundBoxLengths[direction].x, boundBoxLengths[direction].y, boundBoxLengths[direction].z } }); switch (direction) { case 1: @@ -583,22 +584,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL + 6), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL + 5), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; } if (direction == 0 || direction == 3) @@ -625,25 +626,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 6), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 9), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -663,25 +664,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 1), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 4), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 7), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 10), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -695,25 +696,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 2), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 5), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 8), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE + 11), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -752,25 +753,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 10), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 15), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -792,25 +793,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 1), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 6), - { 0, 0, height }, { 36, 16, 3 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 36, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 11), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 16), - { 0, 0, height }, { 32, 14, 3 }, { 0, 18, height }); + { 0, 0, height }, { { 0, 18, height }, { 32, 14, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -827,25 +828,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 2), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 7), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 12), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 17), - { 0, 0, height }, { 33, 33, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 33, 33, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -868,25 +869,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 3), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 8), - { 0, 0, height }, { 16, 36, 3 }, { 4, 0, height }); + { 0, 0, height }, { { 4, 0, height }, { 16, 36, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 13), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 18), - { 0, 0, height }, { 14, 32, 3 }, { 18, 0, height }); + { 0, 0, height }, { { 18, 0, height }, { 14, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -903,25 +904,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 4), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 9), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 14), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE + 19), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -960,25 +961,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 8), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 12), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -995,25 +996,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 1), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 5), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 9), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 13), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1026,25 +1027,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 2), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 6), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 10), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 14), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1076,22 +1077,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 3), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 7), - { 0, 0, height }, { 16, 18, 3 }, { 0, 16 + 8, height }); + { 0, 0, height }, { { 0, 16 + 8, height }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 11), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 15), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -1112,25 +1113,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 16), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 20), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1147,25 +1148,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 17), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 21), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 25), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 29), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1178,25 +1179,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 18), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 22), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 26), - { 0, 0, height }, { 28, 28, 3 }, { 4, 4, height }); + { 0, 0, height }, { { 4, 4, height }, { 28, 28, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 30), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1228,22 +1229,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 19), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 23), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 27), - { 0, 0, height }, { 16, 18, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE + 31), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -1283,7 +1284,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1294,7 +1295,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1311,7 +1312,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1323,7 +1324,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1354,7 +1355,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1365,7 +1366,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1396,7 +1397,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_FLAT_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1407,7 +1408,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1432,7 +1433,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1443,7 +1444,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1459,7 +1460,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1470,7 +1471,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1501,7 +1502,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1512,7 +1513,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1543,7 +1544,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1554,7 +1555,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1579,7 +1580,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1590,7 +1591,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1606,7 +1607,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1617,7 +1618,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1648,7 +1649,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1659,7 +1660,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1690,7 +1691,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 5), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1701,7 +1702,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 5), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1726,7 +1727,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1737,7 +1738,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1753,7 +1754,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1764,7 +1765,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1795,7 +1796,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1806,7 +1807,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1837,7 +1838,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1848,7 +1849,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1873,7 +1874,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1884,7 +1885,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1900,7 +1901,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1911,7 +1912,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1942,7 +1943,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1953,7 +1954,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1984,7 +1985,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1995,7 +1996,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2020,7 +2021,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 5), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2031,7 +2032,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 5), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2046,7 +2047,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2057,7 +2058,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2087,7 +2088,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2098,7 +2099,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2128,7 +2129,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2139,7 +2140,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2165,7 +2166,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2176,7 +2177,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2192,7 +2193,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2203,7 +2204,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2234,7 +2235,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2245,7 +2246,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2276,7 +2277,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_GENTLE_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2287,7 +2288,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2312,7 +2313,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2323,7 +2324,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2339,7 +2340,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2350,7 +2351,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2381,7 +2382,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2392,7 +2393,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2423,7 +2424,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2434,7 +2435,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2459,7 +2460,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2470,7 +2471,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2486,7 +2487,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2497,7 +2498,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2528,7 +2529,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2539,7 +2540,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2570,7 +2571,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2581,7 +2582,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2606,7 +2607,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2617,7 +2618,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2633,7 +2634,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2644,7 +2645,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2675,7 +2676,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2686,7 +2687,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2717,7 +2718,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 5), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -2728,7 +2729,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 5), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -2753,7 +2754,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2764,7 +2765,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2780,7 +2781,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2791,7 +2792,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2822,7 +2823,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2833,7 +2834,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2864,7 +2865,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2875,7 +2876,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2900,7 +2901,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 5), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -2911,7 +2912,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 5), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -2927,7 +2928,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2938,7 +2939,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2969,7 +2970,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2980,7 +2981,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3011,7 +3012,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3022,7 +3023,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3047,7 +3048,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3058,7 +3059,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3074,7 +3075,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3085,7 +3086,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3116,7 +3117,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3127,7 +3128,7 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3158,7 +3159,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_LIFT_TRACK_STEEP_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3169,7 +3170,7 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3188,28 +3189,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 1), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 3), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3227,28 +3228,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 9), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 11), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3280,28 +3281,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 13), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 15), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 17), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3326,28 +3327,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 19), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 21), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 23), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3372,28 +3373,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 24), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 25), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 26), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 27), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 28), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 29), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3418,28 +3419,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 30), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 31), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 32), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 33), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 34), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 35), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3492,28 +3493,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 37), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 38), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 39), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 40), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION + 41), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3542,7 +3543,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3555,11 +3556,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -3587,7 +3588,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -3615,7 +3616,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3637,7 +3638,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3650,7 +3651,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 5), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -3678,11 +3679,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -3710,7 +3711,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3732,7 +3733,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 6), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3745,11 +3746,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 7), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 8), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -3777,7 +3778,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 5), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -3805,7 +3806,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 9), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3827,7 +3828,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 2), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3840,7 +3841,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 3), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -3868,11 +3869,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 0), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 1), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -3900,7 +3901,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 4), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3922,7 +3923,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 14), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -3935,11 +3936,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } switch (direction) @@ -3967,7 +3968,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 13), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -3995,7 +3996,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 12), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4017,7 +4018,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 19), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4030,7 +4031,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 15), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4058,11 +4059,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 17), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 18), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4090,7 +4091,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 16), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4112,7 +4113,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 24), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4125,11 +4126,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 20), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 21), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 36 }); + { -16, -16, height }, { { -16, -16, height + 36 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4157,7 +4158,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 23), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4185,7 +4186,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 22), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4207,7 +4208,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 29), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4220,7 +4221,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 25), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4248,11 +4249,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 27), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 28), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 36 }); + { -16, -16, height }, { { -16, -16, height + 36 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4280,7 +4281,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 26), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4302,7 +4303,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 26), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4314,11 +4315,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 27), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 28), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 36 }); + { -16, -16, height }, { { -16, -16, height + 36 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4345,7 +4346,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 25), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4372,7 +4373,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 29), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4395,7 +4396,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 22), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4407,7 +4408,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 23), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4434,11 +4435,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 20), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 21), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 36 }); + { -16, -16, height }, { { -16, -16, height + 36 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4465,7 +4466,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 24), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4488,7 +4489,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 16), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4501,11 +4502,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 17), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 18), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4533,7 +4534,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 15), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4561,7 +4562,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 19), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4583,7 +4584,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 12), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4596,7 +4597,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 13), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4624,11 +4625,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 10), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 11), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4656,7 +4657,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 14), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4678,7 +4679,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 34), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4691,11 +4692,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 30), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 31), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4723,7 +4724,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 33), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4751,7 +4752,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 32), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4773,7 +4774,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 32), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4786,7 +4787,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 33), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } switch (direction) @@ -4814,11 +4815,11 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 30), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 31), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 28 }); + { -16, -16, height }, { { -16, -16, height + 28 }, { 32, 32, 0 } }); break; } switch (direction) @@ -4846,7 +4847,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BANK_TRANSITION_DIAGONAL + 34), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -4867,31 +4868,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 1), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 5), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 9), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 13), - { 0, 0, height }, { 26, 32, 3 }, { 6, 6, height }); + { 0, 0, height }, { { 6, 6, height }, { 26, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4911,25 +4912,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 2), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 6), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 10), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 14), - { 0, 0, height }, { 22, 22, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 22, 22, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4943,31 +4944,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 3), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 8), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 11), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 12), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_CURVE_BANKED + 15), - { 0, 0, height }, { 32, 26, 3 }, { 6, 6, height }); + { 0, 0, height }, { { 6, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5006,31 +5007,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 1), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 7), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 14), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 20), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5052,25 +5053,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 2), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 8), - { 0, 0, height }, { 48, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 48, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 15), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 21), - { 0, 0, height }, { 32, 14, 3 }, { 0, 18, height }); + { 0, 0, height }, { { 0, 18, height }, { 32, 14, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5087,28 +5088,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 3), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 9), - { 0, 0, height }, { 38, 38, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 38, 38, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 10), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 28 }); + { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 16), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 22), - { 0, 0, height }, { 38, 38, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 38, 38, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5131,25 +5132,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 4), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 11), - { 0, 0, height }, { 16, 48, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 48, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 17), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 23), - { 0, 0, height }, { 14, 32, 3 }, { 18, 0, height }); + { 0, 0, height }, { { 18, 0, height }, { 14, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5166,31 +5167,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 5), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 13), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 18), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 19), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_MEDIUM_CURVE_BANKED + 24), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5229,31 +5230,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 1), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 6), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 12), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 16), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5270,28 +5271,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 2), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 8), - { 0, 0, height }, { 34, 16, 0 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 13), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 17), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5304,25 +5305,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 3), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 9), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 28 }); + { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 14), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 18), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5354,25 +5355,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 4), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 11), - { 0, 0, height }, { 16, 18, 0 }, { 0, 16, height + 28 }); + { 0, 0, height }, { { 0, 16, height + 28 }, { 16, 18, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 15), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 19), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -5393,31 +5394,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 20), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 24), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 29), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 36), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5434,28 +5435,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 21), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 25), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 31), - { 0, 0, height }, { 34, 16, 0 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 37), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5468,25 +5469,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 22), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 26), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 32), - { 0, 0, height }, { 28, 28, 0 }, { 4, 4, height + 28 }); + { 0, 0, height }, { { 4, 4, height + 28 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 38), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5518,27 +5519,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 23), - { 0, 0, height }, { 16, 16, 3 }, - { 16, 0, // TODO - height }); + { 0, 0, height }, + { { 16, 0, // TODO + height }, + { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 27), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 33), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 34), - { 0, 0, height }, { 16, 18, 0 }, { 0, 16, height + 28 }); + { 0, 0, height }, { { 0, 16, height + 28 }, { 16, 18, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_CURVE_BANKED + 39), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -5805,25 +5807,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 5), - { 0, 0, height }, { 34, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 34, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5857,13 +5859,13 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 11), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 16), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5880,19 +5882,19 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 2), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 7), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 12), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5921,7 +5923,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 3), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5939,7 +5941,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 18), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5956,25 +5958,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 4), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 9), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 14), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 19), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6005,25 +6007,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 30), - { 0, 0, height }, { 34, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 34, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6045,13 +6047,13 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 21), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 26), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6086,19 +6088,19 @@ namespace HybridRC case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 27), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 32), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 37), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6121,7 +6123,7 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 23), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6139,7 +6141,7 @@ namespace HybridRC case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 38), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6156,25 +6158,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 24), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 29), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 34), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE + 39), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6218,41 +6220,41 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 0), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 1), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 2), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 3), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 4), - { 0, 0, height }, { 28, 3, 48 }, { 2, 28, height }); + { 0, 0, height }, { { 2, 28, height }, { 28, 3, 48 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 5), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 6), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 7), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } @@ -6266,42 +6268,41 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 8), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 9), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 10), - { 0, 0, height }, { 28, 3, 48 }, { 2, 28, height }); + { 0, 0, height }, { { 2, 28, height }, { 28, 3, 48 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 11), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 12), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 13), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 14), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_STEEP_SMALL_CURVE + 15), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel( - session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } @@ -6332,28 +6333,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 0), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 1), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 2), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 3), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 4), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 5), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -6377,28 +6378,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 6), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 7), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 8), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 9), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 10), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_VERTICAL_TWIST + 11), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -6433,25 +6434,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 0), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 1), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 2), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height + 3 }); + { 0, 0, height }, { { 0, 27, height + 3 }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 3), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 4), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6476,25 +6477,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 5), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 6), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 7), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 8), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 9), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6519,25 +6520,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 10), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 11), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 12), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 13), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 14), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6562,25 +6563,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 15), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 16), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 17), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 18), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 19), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6633,28 +6634,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 21), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 23), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6679,28 +6680,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 27), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 29), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 31), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6725,28 +6726,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 32), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 33), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 34), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 35), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 36), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 37), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6771,28 +6772,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 38), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 39), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 40), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 41), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 42), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 43), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6845,22 +6846,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 44), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 45), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 46), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 47), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6885,22 +6886,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 48), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 49), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 50), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 51), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6939,25 +6940,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 52), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 53), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 54), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 55), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 56), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6982,25 +6983,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 57), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 58), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 59), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 60), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 61), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7025,25 +7026,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 62), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 63), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 64), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 65), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 66), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7068,25 +7069,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 67), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 68), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 69), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 70), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SLOPE_BANK_TRANSITION + 71), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7154,7 +7155,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 3), - { 0, 6, height }, { 34, 1, 34 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7220,7 +7221,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 5), - { 6, 0, height }, { 1, 34, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 34, 34 } }); WoodenASupportsPaintSetup(session, 1, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7231,7 +7232,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 8), - { 6, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7288,7 +7289,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 17), - { 0, 6, height }, { 34, 1, 34 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7347,7 +7348,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 15), - { 6, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7358,7 +7359,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_SMALL_CURVE_BANKED + 19), - { 6, 0, height }, { 1, 34, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 34, 34 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7413,32 +7414,32 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 6), - { 0, 0, height }, { 34, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7472,21 +7473,21 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 8), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 16), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 22), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7504,25 +7505,25 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 2), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 9), - { 0, 0, height }, { 16, 16, 3 }, { 0, -8, height }); + { 0, 0, height }, { { 0, -8, height }, { 16, 16, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 10), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 17), - { 0, 0, height }, { 1, 1, 3 }, { 64, 0, height }); + { 0, 0, height }, { { 64, 0, height }, { 1, 1, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7553,32 +7554,32 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 3), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 11), - { 0, 0, height }, { 16, 32, 3 }, { -8, 0, height }); + { 0, 0, height }, { { -8, 0, height }, { 16, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 12), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 18), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 24), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7596,36 +7597,36 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 4), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 13), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 14), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 19), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 20), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 25), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7657,32 +7658,32 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 31), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 37), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 38), - { 0, 0, height }, { 34, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 34, 1, 34 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 47), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7705,25 +7706,25 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 27), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 32), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 39), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 40), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7755,25 +7756,25 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 33), - { 0, 0, height }, { 1, 1, 3 }, { 64, 0, height }); + { 0, 0, height }, { { 64, 0, height }, { 1, 1, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 41), - { 0, 0, height }, { 16, 16, 3 }, { -8, 0, height }); + { 0, 0, height }, { { -8, 0, height }, { 16, 16, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 42), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 49), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7797,32 +7798,32 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 29), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 34), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 43), - { 0, 0, height }, { 16, 32, 3 }, { -8, 0, height }); + { 0, 0, height }, { { -8, 0, height }, { 16, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 44), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 50), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7840,36 +7841,36 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 30), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 35), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 36), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 45), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 46), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 51), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7916,25 +7917,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 7), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7963,13 +7964,13 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 2), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 6), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7986,13 +7987,13 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 2), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 6), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8021,25 +8022,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 7), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8070,25 +8071,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 8), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 11), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8105,13 +8106,13 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 9), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 13), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8152,13 +8153,13 @@ namespace HybridRC case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 9), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 13), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8175,25 +8176,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 11), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 8), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_S_BEND + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8224,31 +8225,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 1), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 5), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 9), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 13), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8283,25 +8284,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 2), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 6), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 10), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 14), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8315,31 +8316,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 3), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 7), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 8), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 11), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 12), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 15), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8361,31 +8362,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 13), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 0), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 1), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 4), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 5), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 9), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8425,25 +8426,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 14), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 2), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 6), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 10), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8457,31 +8458,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 8), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 11), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 12), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8507,31 +8508,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 16), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 19), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 23), - { 0, 0, height }, { 34, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 34, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 24), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 29), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8566,25 +8567,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 17), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 20), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 25), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 30), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8598,31 +8599,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 18), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 21), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 22), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 26), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 27), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 31), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8644,31 +8645,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 19), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 23), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 24), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 28), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 29), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 16), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8708,25 +8709,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 20), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 25), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 30), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 17), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8740,31 +8741,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 22), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 27), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 31), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_SMALL_HELIX + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8816,31 +8817,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 1), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 7), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 14), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 20), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8862,25 +8863,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 2), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 8), - { 0, 0, height }, { 33, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 33, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 15), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 21), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8897,28 +8898,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 3), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 9), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 10), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 28 }); + { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 16), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 22), - { 0, 0, height }, { 34, 34, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 34, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8941,25 +8942,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 4), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 11), - { 0, 0, height }, { 16, 33, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 33, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 17), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 23), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8976,31 +8977,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 5), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 12), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 13), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 18), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 19), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 24), - { 0, 0, height }, { 28, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 28, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9022,31 +9023,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 20), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 0), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 1), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 6), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 7), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 14), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9073,25 +9074,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 21), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 2), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 8), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 15), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9108,28 +9109,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 22), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 3), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 9), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 10), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 28 }); + { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 16), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9152,25 +9153,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 23), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 4), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 11), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 17), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9187,31 +9188,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 13), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 19), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9237,31 +9238,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 25), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 30), - { 0, 0, height }, { 32, 32, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 37), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 44), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 45), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9283,25 +9284,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 26), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 31), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 38), - { 0, 0, height }, { 33, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 33, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 46), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9318,28 +9319,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 27), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 32), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 39), - { 0, 0, height }, { 16, 32, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 40), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 28 }); + { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 47), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9362,25 +9363,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 28), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 33), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 41), - { 0, 0, height }, { 16, 33, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 33, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 48), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9397,31 +9398,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 29), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 34), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 35), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 42), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 43), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 49), - { 0, 0, height }, { 32, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9443,31 +9444,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 30), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 36), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 37), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 44), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 45), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 25), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9494,25 +9495,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 31), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 38), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 46), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 26), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9529,28 +9530,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 32), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 39), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 40), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 28 }); + { 0, 0, height }, { { 16, 16, height + 28 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 47), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 27), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9573,25 +9574,25 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 33), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 41), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 28 }); + { 0, 0, height }, { { 0, 0, height + 28 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 48), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 28), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9608,31 +9609,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 34), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 35), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 42), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 43), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 49), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_HELIX + 29), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -9684,34 +9685,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 1), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 7), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 13), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 19), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9728,34 +9729,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 3), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 9), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 15), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 21), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9768,34 +9769,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 5), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 11), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 17), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 23), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; } switch (direction) @@ -9826,34 +9827,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 25), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 31), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 37), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 42), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 43), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9870,34 +9871,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 27), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 32), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 33), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 38), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 39), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 44), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 45), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 0 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9910,34 +9911,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 29), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 34), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 35), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 40), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 41), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 46), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BARREL_ROLL + 47), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 56 }); + { 0, 0, height }, { { 0, 6, height + 56 }, { 32, 20, 0 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9982,28 +9983,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 1), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 7), - { 0, 0, height }, { 32, 1, 32 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -10022,28 +10023,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 3), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 8), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 9), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 13), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 17), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10060,34 +10061,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 5), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 11), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 15), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 19), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 0 } }); break; } switch (direction) @@ -10122,28 +10123,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 29), - { 0, 0, height }, { 32, 1, 32 }, { 0, 31, height + 40 }); + { 0, 0, height }, { { 0, 31, height + 40 }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 34), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 35), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; } if (direction == 0 || direction == 3) @@ -10161,28 +10162,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 31), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 37), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10199,34 +10200,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 23), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 27), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 32), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 33), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 38), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_ZERO_G_ROLL + 39), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 48 }); + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 1 } }); break; } switch (direction) @@ -10275,28 +10276,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 8), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 15), - { 0, 0, height }, { 30, 20, 16 }, { 1, 6, height }); + { 0, 0, height }, { { 1, 6, height }, { 30, 20, 16 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 16), - { 0, 0, height }, { 32, 0, 40 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 40 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 23), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -10314,31 +10315,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 2), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 9), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 10), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 17), - { 0, 0, height }, { 40, 8, 64 }, { -3, 0, height }); + { 0, 0, height }, { { -3, 0, height }, { 40, 8, 64 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 18), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10352,34 +10353,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 4), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 11), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 12), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 19), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 20), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 25), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10397,34 +10398,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 6), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 40 }); + { 0, 0, height }, { { 0, 0, height + 40 }, { 32, 32, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 13), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 14), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 21), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 22), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 27), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 28), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 40 }); + { 0, 0, height }, { { 0, 0, height + 40 }, { 32, 32, 1 } }); break; } switch (direction) @@ -10459,28 +10460,28 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 29), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 36), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 43), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 44), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 51), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -10498,31 +10499,31 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 37), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 38), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 45), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 46), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 52), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 53), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10536,34 +10537,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 31), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 32), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 39), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 40), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 47), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 48), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 54), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 55), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; } @@ -10581,34 +10582,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 33), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 34), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 40 }); + { 0, 0, height }, { { 0, 0, height + 40 }, { 32, 32, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 41), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 42), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 49), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 50), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 56), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_LARGE_ZERO_G_ROLL + 57), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 40 }); + { 0, 0, height }, { { 0, 0, height + 40 }, { 32, 32, 1 } }); break; } switch (direction) @@ -10657,34 +10658,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 0), - { 0, 0, height }, { 2, 20, 31 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 1), - { 0, 0, height }, { 32, 1, 48 }, { 0, 32, height + 8 }); + { 0, 0, height }, { { 0, 32, height + 8 }, { 32, 1, 48 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 6), - { 0, 0, height }, { 2, 20, 31 }, { 26, 4, height + 8 }); + { 0, 0, height }, { { 26, 4, height + 8 }, { 2, 20, 31 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 7), - { 0, 0, height }, { 32, 1, 48 }, { 0, 32, height + 8 }); + { 0, 0, height }, { { 0, 32, height + 8 }, { 32, 1, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 12), - { 0, 0, height }, { 2, 20, 31 }, { 26, 4, height + 8 }); + { 0, 0, height }, { { 26, 4, height + 8 }, { 2, 20, 31 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 13), - { 0, 0, height }, { 32, 1, 48 }, { 0, 32, height + 8 }); + { 0, 0, height }, { { 0, 32, height + 8 }, { 32, 1, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 18), - { 0, 0, height }, { 2, 20, 31 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 19), - { 0, 0, height }, { 32, 1, 48 }, { 0, 32, height + 8 }); + { 0, 0, height }, { { 0, 32, height + 8 }, { 32, 1, 48 } }); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -10696,34 +10697,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 3), - { 0, 0, height }, { 32, 1, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 64 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 9), - { 0, 0, height }, { 32, 1, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 15), - { 0, 0, height }, { 32, 1, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 21), - { 0, 0, height }, { 32, 1, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 64 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10736,34 +10737,34 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 5), - { 0, 0, height }, { 32, 1, 32 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 11), - { 0, 0, height }, { 32, 1, 32 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 17), - { 0, 0, height }, { 32, 1, 32 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_QUARTER_LOOP + 23), - { 0, 0, height }, { 32, 1, 32 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 32, 1, 32 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10790,7 +10791,7 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BRAKE + (direction & 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -10805,8 +10806,8 @@ namespace HybridRC session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT + (direction & 1)), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 3 }); - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + { { 0, 6, height + 3 }, { 32, 20, 0 } }); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10825,22 +10826,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -10858,22 +10859,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 9), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 13), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -10887,22 +10888,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -10916,22 +10917,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 7), - { 0, 0, height }, { 2, 24, 56 }, { 28, 4, height - 16 }); + { 0, 0, height }, { { 28, 4, height - 16 }, { 2, 24, 56 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 11), - { 0, 0, height }, { 2, 24, 56 }, { 28, 4, height - 16 }); + { 0, 0, height }, { { 28, 4, height - 16 }, { 2, 24, 56 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -10963,22 +10964,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 20), - { 0, 0, height }, { 2, 24, 56 }, { 28, 4, height - 16 }); + { 0, 0, height }, { { 28, 4, height - 16 }, { 2, 24, 56 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 24), - { 0, 0, height }, { 2, 24, 56 }, { 28, 4, height - 16 }); + { 0, 0, height }, { { 28, 4, height - 16 }, { 2, 24, 56 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -10996,22 +10997,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 17), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 29), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -11025,22 +11026,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -11054,22 +11055,22 @@ namespace HybridRC case 0: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 19), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 23), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 27), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_FLAT_TO_STEEP + 31), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } WoodenASupportsPaintSetup( @@ -11109,7 +11110,7 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + (direction & 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); @@ -11122,20 +11123,20 @@ namespace HybridRC { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_BOOSTER + (direction & 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(SEGMENTS_ALL, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } - static void Trackpowered_lift( + static void TrackpoweredLift( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_POWERED_LIFT + direction), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) { @@ -11170,7 +11171,7 @@ namespace HybridRC { 0, 6, height }, { 32, 20, 3 }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 3), - { 0, 6, height }, { 34, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 34, 1, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -11289,7 +11290,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 14), { 0, 6, height }, - { 34, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 34, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11463,7 +11464,7 @@ namespace HybridRC PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 14), { 6, 0, height }, - { 1, 34, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 34, 26 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -11580,7 +11581,7 @@ namespace HybridRC { 6, 0, height }, { 20, 32, 3 }); PaintAddImageAsParentRotated( session, direction, GetTrackColour(session).WithIndex(SPR_G2_HYBRID_TRACK_TURN_BANK_TRANSITION + 3), - { 6, 0, height }, { 1, 34, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 34, 26 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11940,7 +11941,7 @@ namespace HybridRC case TrackElemType::InvertedFlatToDown90QuarterLoop: return TrackInvertedFlatTo90DegQuarterLoopDown; case TrackElemType::PoweredLift: - return Trackpowered_lift; + return TrackpoweredLift; case TrackElemType::Booster: return Trackbooster; } diff --git a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp index 869ace00a5..aa80636a60 100644 --- a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x00890CB4 */ -static void inverted_hairpin_rc_track_flat( +static void InvertedHairpinRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -30,22 +30,22 @@ static void inverted_hairpin_rc_track_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17030), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17031), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17032), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17033), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } } @@ -57,20 +57,20 @@ static void inverted_hairpin_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17026), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17027), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 30, session.TrackColours[SCHEME_SUPPORTS]); @@ -81,7 +81,7 @@ static void inverted_hairpin_rc_track_flat( } /** rct2: 0x00890D84, 0x00890D94, 0x00890DA4 */ -static void inverted_hairpin_rc_track_station( +static void InvertedHairpinRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -94,22 +94,22 @@ static void inverted_hairpin_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x00890CC4 */ -static void inverted_hairpin_rc_track_25_deg_up( +static void InvertedHairpinRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -120,22 +120,22 @@ static void inverted_hairpin_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17070), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17071), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17072), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17073), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } } @@ -146,29 +146,29 @@ static void inverted_hairpin_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17042), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17043), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17044), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17045), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -203,7 +203,7 @@ static void inverted_hairpin_rc_track_25_deg_up( } /** rct2: 0x00890CD4 */ -static void inverted_hairpin_rc_track_60_deg_up( +static void InvertedHairpinRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -214,22 +214,22 @@ static void inverted_hairpin_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17086), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17087), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17088), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17089), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; } } @@ -240,22 +240,22 @@ static void inverted_hairpin_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17058), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17059), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17060), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17061), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; } } @@ -273,7 +273,7 @@ static void inverted_hairpin_rc_track_60_deg_up( } /** rct2: 0x00890CE4 */ -static void inverted_hairpin_rc_track_flat_to_25_deg_up( +static void InvertedHairpinRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -284,22 +284,22 @@ static void inverted_hairpin_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17062), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17063), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17064), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17065), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } @@ -310,29 +310,29 @@ static void inverted_hairpin_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17034), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17035), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17036), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17037), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -367,7 +367,7 @@ static void inverted_hairpin_rc_track_flat_to_25_deg_up( } /** rct2: 0x00890CF4 */ -static void inverted_hairpin_rc_track_25_deg_up_to_60_deg_up( +static void InvertedHairpinRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -378,28 +378,28 @@ static void inverted_hairpin_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17074), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17078), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17075), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17079), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17076), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17077), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } } @@ -410,28 +410,28 @@ static void inverted_hairpin_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17046), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17050), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17047), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17051), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17048), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17049), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } } @@ -449,7 +449,7 @@ static void inverted_hairpin_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x00890D04 */ -static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up( +static void InvertedHairpinRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -460,28 +460,28 @@ static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17080), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17084), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17081), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17085), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17082), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17083), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } } @@ -492,35 +492,35 @@ static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17052), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17056), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17053), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17057), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17054), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17055), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -555,7 +555,7 @@ static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x00890D14 */ -static void inverted_hairpin_rc_track_25_deg_up_to_flat( +static void InvertedHairpinRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -566,22 +566,22 @@ static void inverted_hairpin_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17066), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17067), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17068), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17069), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } @@ -592,29 +592,29 @@ static void inverted_hairpin_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17038), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17039), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17040), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17041), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -649,55 +649,55 @@ static void inverted_hairpin_rc_track_25_deg_up_to_flat( } /** rct2: 0x00890D24 */ -static void inverted_hairpin_rc_track_25_deg_down( +static void InvertedHairpinRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890D34 */ -static void inverted_hairpin_rc_track_60_deg_down( +static void InvertedHairpinRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890D44 */ -static void inverted_hairpin_rc_track_flat_to_25_deg_down( +static void InvertedHairpinRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890D54 */ -static void inverted_hairpin_rc_track_25_deg_down_to_60_deg_down( +static void InvertedHairpinRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890D64 */ -static void inverted_hairpin_rc_track_60_deg_down_to_25_deg_down( +static void InvertedHairpinRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890D74 */ -static void inverted_hairpin_rc_track_25_deg_down_to_flat( +static void InvertedHairpinRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890DB4 */ -static void inverted_hairpin_rc_track_left_quarter_turn_3( +static void InvertedHairpinRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -709,22 +709,22 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17123), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17126), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17129), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17120), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -749,22 +749,22 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17122), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17125), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17128), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17119), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -777,22 +777,22 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17121), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17124), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17127), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17118), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -817,16 +817,16 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3( } /** rct2: 0x00890DC4 */ -static void inverted_hairpin_rc_track_right_quarter_turn_3( +static void InvertedHairpinRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_hairpin_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedHairpinRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00890DD4 */ -static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up( +static void InvertedHairpinRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -921,7 +921,7 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x00890DE4 */ -static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up( +static void InvertedHairpinRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1016,27 +1016,25 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x00890DF4 */ -static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_down( +static void InvertedHairpinRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedHairpinRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00890E04 */ -static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_down( +static void InvertedHairpinRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedHairpinRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00890E64 */ -static void inverted_hairpin_rc_track_left_quarter_turn_1( +static void InvertedHairpinRCTrackLeftQuarterTurn1( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1044,23 +1042,23 @@ static void inverted_hairpin_rc_track_left_quarter_turn_1( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17114), { 0, 0, height + 24 }, { 26, 24, 3 }, - { 6, 2, height + 24 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17114), { 0, 0, height + 24 }, + { { 6, 2, height + 24 }, { 26, 24, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17115), { 0, 0, height + 24 }, { 26, 26, 3 }, - { 0, 0, height + 24 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17115), { 0, 0, height + 24 }, + { { 0, 0, height + 24 }, { 26, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17116), { 0, 0, height + 24 }, { 24, 26, 3 }, - { 2, 6, height + 24 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17116), { 0, 0, height + 24 }, + { { 2, 6, height + 24 }, { 24, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17117), { 0, 0, height + 24 }, { 24, 24, 3 }, - { 6, 6, height + 24 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17117), { 0, 0, height + 24 }, + { { 6, 6, height + 24 }, { 24, 24, 3 } }); break; } @@ -1085,15 +1083,15 @@ static void inverted_hairpin_rc_track_left_quarter_turn_1( } /** rct2: 0x00890E74 */ -static void inverted_hairpin_rc_track_right_quarter_turn_1( +static void InvertedHairpinRCTrackRightQuarterTurn1( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_left_quarter_turn_1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedHairpinRCTrackLeftQuarterTurn1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00890E24 */ -static void inverted_hairpin_rc_track_flat_to_60_deg_up( +static void InvertedHairpinRCTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1104,28 +1102,28 @@ static void inverted_hairpin_rc_track_flat_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17102), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17106), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17103), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17107), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17104), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17105), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 30, 20, 3 } }); break; } } @@ -1136,28 +1134,28 @@ static void inverted_hairpin_rc_track_flat_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17090), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17094), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17091), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17095), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17092), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17093), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 30, 20, 3 } }); break; } } @@ -1175,7 +1173,7 @@ static void inverted_hairpin_rc_track_flat_to_60_deg_up( } /** rct2: 0x00890E34 */ -static void inverted_hairpin_rc_track_60_deg_up_to_flat( +static void InvertedHairpinRCTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1186,28 +1184,28 @@ static void inverted_hairpin_rc_track_60_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17108), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 48 }); + { { 0, 6, height + 48 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17112), { 0, 0, height + 24 }, - { 32, 10, 41 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 41 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17109), { 0, 0, height + 24 }, - { 32, 2, 41 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 41 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17113), { 0, 0, height + 24 }, - { 32, 10, 41 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 41 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17110), { 0, 0, height + 24 }, - { 32, 2, 41 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 41 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17111), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 48 }); + { { 0, 6, height + 48 }, { 30, 20, 3 } }); break; } } @@ -1218,28 +1216,28 @@ static void inverted_hairpin_rc_track_60_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17096), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 48 }); + { { 0, 6, height + 48 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17100), { 0, 0, height + 24 }, - { 32, 10, 41 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 41 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17097), { 0, 0, height + 24 }, - { 32, 2, 41 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 41 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17101), { 0, 0, height + 24 }, - { 32, 10, 41 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 41 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17098), { 0, 0, height + 24 }, - { 32, 2, 41 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 41 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17099), { 0, 0, height + 24 }, - { 30, 20, 3 }, { 0, 6, height + 48 }); + { { 0, 6, height + 48 }, { 30, 20, 3 } }); break; } } @@ -1278,23 +1276,23 @@ static void inverted_hairpin_rc_track_60_deg_up_to_flat( } /** rct2: 0x00890E44 */ -static void inverted_hairpin_rc_track_flat_to_60_deg_down( +static void InvertedHairpinRCTrackFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_60_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890E54 */ -static void inverted_hairpin_rc_track_60_deg_down_to_flat( +static void InvertedHairpinRCTrack60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_hairpin_rc_track_flat_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedHairpinRCTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00890E14 */ -static void inverted_hairpin_rc_track_brakes( +static void InvertedHairpinRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1303,20 +1301,20 @@ static void inverted_hairpin_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17028), { 0, 0, height + 24 }, { 32, 20, 1 }, - { 0, 6, height + 22 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17028), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17029), { 0, 0, height + 24 }, { 32, 20, 1 }, - { 0, 6, height + 22 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17029), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 30, session.TrackColours[SCHEME_SUPPORTS]); @@ -1327,7 +1325,7 @@ static void inverted_hairpin_rc_track_brakes( } /** rct2: 0x00890E84 */ -static void inverted_hairpin_rc_track_block_brakes( +static void InvertedHairpinRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1336,20 +1334,20 @@ static void inverted_hairpin_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17028), { 0, 0, height + 24 }, { 32, 20, 1 }, - { 0, 6, height + 22 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17028), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17029), { 0, 0, height + 24 }, { 32, 20, 1 }, - { 0, 6, height + 22 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17029), { 0, 0, height + 24 }, + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 30, session.TrackColours[SCHEME_SUPPORTS]); @@ -1359,68 +1357,68 @@ static void inverted_hairpin_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedHairpinRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return inverted_hairpin_rc_track_flat; + return InvertedHairpinRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return inverted_hairpin_rc_track_station; + return InvertedHairpinRCTrackStation; case TrackElemType::Up25: - return inverted_hairpin_rc_track_25_deg_up; + return InvertedHairpinRCTrack25DegUp; case TrackElemType::Up60: - return inverted_hairpin_rc_track_60_deg_up; + return InvertedHairpinRCTrack60DegUp; case TrackElemType::FlatToUp25: - return inverted_hairpin_rc_track_flat_to_25_deg_up; + return InvertedHairpinRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return inverted_hairpin_rc_track_25_deg_up_to_60_deg_up; + return InvertedHairpinRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return inverted_hairpin_rc_track_60_deg_up_to_25_deg_up; + return InvertedHairpinRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return inverted_hairpin_rc_track_25_deg_up_to_flat; + return InvertedHairpinRCTrack25DegUpToFlat; case TrackElemType::Down25: - return inverted_hairpin_rc_track_25_deg_down; + return InvertedHairpinRCTrack25DegDown; case TrackElemType::Down60: - return inverted_hairpin_rc_track_60_deg_down; + return InvertedHairpinRCTrack60DegDown; case TrackElemType::FlatToDown25: - return inverted_hairpin_rc_track_flat_to_25_deg_down; + return InvertedHairpinRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return inverted_hairpin_rc_track_25_deg_down_to_60_deg_down; + return InvertedHairpinRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return inverted_hairpin_rc_track_60_deg_down_to_25_deg_down; + return InvertedHairpinRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return inverted_hairpin_rc_track_25_deg_down_to_flat; + return InvertedHairpinRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn3Tiles: - return inverted_hairpin_rc_track_left_quarter_turn_3; + return InvertedHairpinRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return inverted_hairpin_rc_track_right_quarter_turn_3; + return InvertedHairpinRCTrackRightQuarterTurn3; case TrackElemType::LeftQuarterTurn3TilesUp25: - return inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up; + return InvertedHairpinRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up; + return InvertedHairpinRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_down; + return InvertedHairpinRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_down; + return InvertedHairpinRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftQuarterTurn1Tile: - return inverted_hairpin_rc_track_left_quarter_turn_1; + return InvertedHairpinRCTrackLeftQuarterTurn1; case TrackElemType::RightQuarterTurn1Tile: - return inverted_hairpin_rc_track_right_quarter_turn_1; + return InvertedHairpinRCTrackRightQuarterTurn1; case TrackElemType::FlatToUp60: - return inverted_hairpin_rc_track_flat_to_60_deg_up; + return InvertedHairpinRCTrackFlatTo60DegUp; case TrackElemType::Up60ToFlat: - return inverted_hairpin_rc_track_60_deg_up_to_flat; + return InvertedHairpinRCTrack60DegUpToFlat; case TrackElemType::FlatToDown60: - return inverted_hairpin_rc_track_flat_to_60_deg_down; + return InvertedHairpinRCTrackFlatTo60DegDown; case TrackElemType::Down60ToFlat: - return inverted_hairpin_rc_track_60_deg_down_to_flat; + return InvertedHairpinRCTrack60DegDownToFlat; case TrackElemType::Brakes: - return inverted_hairpin_rc_track_brakes; + return InvertedHairpinRCTrackBrakes; case TrackElemType::BlockBrakes: - return inverted_hairpin_rc_track_block_brakes; + return InvertedHairpinRCTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp index 48b4e1aff3..7d2c20f6ce 100644 --- a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008B0460 */ -static void inverted_impulse_rc_track_flat( +static void InvertedImpulseRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -28,20 +28,20 @@ static void inverted_impulse_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19662), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19662), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19663), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19663), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); @@ -52,7 +52,7 @@ static void inverted_impulse_rc_track_flat( } /** rct2: 0x008B0470, 0x008B0480, 0x008B0490 */ -static void inverted_impulse_rc_track_station( +static void InvertedImpulseRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -65,22 +65,22 @@ static void inverted_impulse_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008B04A0 */ -static void inverted_impulse_rc_track_25_deg_up( +static void InvertedImpulseRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -88,29 +88,29 @@ static void inverted_impulse_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19672), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19672), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19673), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19673), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19674), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19674), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19675), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19675), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -145,7 +145,7 @@ static void inverted_impulse_rc_track_25_deg_up( } /** rct2: 0x008B04B0 */ -static void inverted_impulse_rc_track_60_deg_up( +static void InvertedImpulseRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -153,23 +153,23 @@ static void inverted_impulse_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19688), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 93 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19688), { 0, 0, height + 29 }, + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19689), { 0, 0, height + 29 }, { 32, 2, 81 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19689), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19690), { 0, 0, height + 29 }, { 32, 2, 81 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19690), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19691), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 93 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19691), { 0, 0, height + 29 }, + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -186,7 +186,7 @@ static void inverted_impulse_rc_track_60_deg_up( } /** rct2: 0x008B04C0 */ -static void inverted_impulse_rc_track_flat_to_25_deg_up( +static void InvertedImpulseRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -194,23 +194,23 @@ static void inverted_impulse_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19664), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19664), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19665), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19665), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19666), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19666), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19667), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19667), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -248,7 +248,7 @@ static void inverted_impulse_rc_track_flat_to_25_deg_up( } /** rct2: 0x008B04D0 */ -static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up( +static void InvertedImpulseRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -256,29 +256,29 @@ static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19676), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19676), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19680), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19680), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19677), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19677), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19681), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19681), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19678), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19678), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19679), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19679), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -295,7 +295,7 @@ static void inverted_impulse_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008B04E0 */ -static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up( +static void InvertedImpulseRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -303,29 +303,29 @@ static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19682), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19682), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19686), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19686), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19683), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19683), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19687), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19687), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19684), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19684), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19685), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19685), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -342,7 +342,7 @@ static void inverted_impulse_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008B04F0 */ -static void inverted_impulse_rc_track_25_deg_up_to_flat( +static void InvertedImpulseRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -350,23 +350,23 @@ static void inverted_impulse_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19668), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19668), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19669), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19669), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19670), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19670), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19671), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19671), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -404,55 +404,55 @@ static void inverted_impulse_rc_track_25_deg_up_to_flat( } /** rct2: 0x008B0500 */ -static void inverted_impulse_rc_track_25_deg_down( +static void InvertedImpulseRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0510 */ -static void inverted_impulse_rc_track_60_deg_down( +static void InvertedImpulseRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0520 */ -static void inverted_impulse_rc_track_flat_to_25_deg_down( +static void InvertedImpulseRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0530 */ -static void inverted_impulse_rc_track_25_deg_down_to_60_deg_down( +static void InvertedImpulseRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0540 */ -static void inverted_impulse_rc_track_60_deg_down_to_25_deg_down( +static void InvertedImpulseRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0550 */ -static void inverted_impulse_rc_track_25_deg_down_to_flat( +static void InvertedImpulseRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B05A0 */ -static void inverted_impulse_rc_track_90_deg_up( +static void InvertedImpulseRCTrack90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -464,22 +464,22 @@ static void inverted_impulse_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19700), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19701), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19702), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19703), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -493,15 +493,15 @@ static void inverted_impulse_rc_track_90_deg_up( } /** rct2: 0x008B05B0 */ -static void inverted_impulse_rc_track_90_deg_down( +static void InvertedImpulseRCTrack90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0560 */ -static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up( +static void InvertedImpulseRCTrack60DegUpTo90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -513,22 +513,22 @@ static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19692), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19693), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19694), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19695), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -546,15 +546,15 @@ static void inverted_impulse_rc_track_60_deg_up_to_90_deg_up( } /** rct2: 0x008B0570 */ -static void inverted_impulse_rc_track_90_deg_down_to_60_deg_down( +static void InvertedImpulseRCTrack90DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_60_deg_up_to_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedImpulseRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0580 */ -static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up( +static void InvertedImpulseRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -562,23 +562,23 @@ static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19696), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 85 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19696), { 0, 0, height + 29 }, + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19697), { 0, 0, height + 29 }, { 32, 2, 55 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19697), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19698), { 0, 0, height + 29 }, { 32, 2, 55 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19698), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19699), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 85 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19699), { 0, 0, height + 29 }, + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } switch (direction) @@ -596,7 +596,7 @@ static void inverted_impulse_rc_track_90_deg_up_to_60_deg_up( } /** rct2: 0x008B0590 */ -static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down( +static void InvertedImpulseRCTrack60DegDownTo90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -608,22 +608,22 @@ static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19698), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19699), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19696), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 85 }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19697), { 0, 0, height + 29 }, - { 32, 2, 55 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 55 } }); break; } if (direction == 0 || direction == 3) @@ -640,7 +640,7 @@ static void inverted_impulse_rc_track_60_deg_down_to_90_deg_down( } /** rct2: 0x008B05C0 */ -static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up( +static void InvertedImpulseRCTrackLeftQuarterTurn190DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -652,31 +652,31 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19708), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19709), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19717), { 0, 0, height + 29 }, - { 2, 32, 31 }, { 4, 0, height + 11 }); + { { 4, 0, height + 11 }, { 2, 32, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19710), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19718), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19711), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19719), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -690,7 +690,7 @@ static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up( } /** rct2: 0x008B05D0 */ -static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up( +static void InvertedImpulseRCTrackRightQuarterTurn190DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -702,31 +702,31 @@ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19704), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19712), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19705), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19713), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19706), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19714), { 0, 0, height + 29 }, - { 32, 2, 31 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19707), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 125 }); + { { 0, 6, height + 125 }, { 32, 20, 3 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -740,77 +740,75 @@ static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up( } /** rct2: 0x008B05E0 */ -static void inverted_impulse_rc_track_left_quarter_turn_1_90_deg_down( +static void InvertedImpulseRCTrackLeftQuarterTurn190DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedImpulseRCTrackRightQuarterTurn190DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008B05F0 */ -static void inverted_impulse_rc_track_right_quarter_turn_1_90_deg_down( +static void InvertedImpulseRCTrackRightQuarterTurn190DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedImpulseRCTrackLeftQuarterTurn190DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedImpulseRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return inverted_impulse_rc_track_flat; + return InvertedImpulseRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return inverted_impulse_rc_track_station; + return InvertedImpulseRCTrackStation; case TrackElemType::Up25: - return inverted_impulse_rc_track_25_deg_up; + return InvertedImpulseRCTrack25DegUp; case TrackElemType::Up60: - return inverted_impulse_rc_track_60_deg_up; + return InvertedImpulseRCTrack60DegUp; case TrackElemType::FlatToUp25: - return inverted_impulse_rc_track_flat_to_25_deg_up; + return InvertedImpulseRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return inverted_impulse_rc_track_25_deg_up_to_60_deg_up; + return InvertedImpulseRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return inverted_impulse_rc_track_60_deg_up_to_25_deg_up; + return InvertedImpulseRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return inverted_impulse_rc_track_25_deg_up_to_flat; + return InvertedImpulseRCTrack25DegUpToFlat; case TrackElemType::Down25: - return inverted_impulse_rc_track_25_deg_down; + return InvertedImpulseRCTrack25DegDown; case TrackElemType::Down60: - return inverted_impulse_rc_track_60_deg_down; + return InvertedImpulseRCTrack60DegDown; case TrackElemType::FlatToDown25: - return inverted_impulse_rc_track_flat_to_25_deg_down; + return InvertedImpulseRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return inverted_impulse_rc_track_25_deg_down_to_60_deg_down; + return InvertedImpulseRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return inverted_impulse_rc_track_60_deg_down_to_25_deg_down; + return InvertedImpulseRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return inverted_impulse_rc_track_25_deg_down_to_flat; + return InvertedImpulseRCTrack25DegDownToFlat; case TrackElemType::Up90: - return inverted_impulse_rc_track_90_deg_up; + return InvertedImpulseRCTrack90DegUp; case TrackElemType::Down90: - return inverted_impulse_rc_track_90_deg_down; + return InvertedImpulseRCTrack90DegDown; case TrackElemType::Up60ToUp90: - return inverted_impulse_rc_track_60_deg_up_to_90_deg_up; + return InvertedImpulseRCTrack60DegUpTo90DegUp; case TrackElemType::Down90ToDown60: - return inverted_impulse_rc_track_90_deg_down_to_60_deg_down; + return InvertedImpulseRCTrack90DegDownTo60DegDown; case TrackElemType::Up90ToUp60: - return inverted_impulse_rc_track_90_deg_up_to_60_deg_up; + return InvertedImpulseRCTrack90DegUpTo60DegUp; case TrackElemType::Down60ToDown90: - return inverted_impulse_rc_track_60_deg_down_to_90_deg_down; + return InvertedImpulseRCTrack60DegDownTo90DegDown; case TrackElemType::LeftQuarterTurn1TileUp90: - return inverted_impulse_rc_track_left_quarter_turn_1_90_deg_up; + return InvertedImpulseRCTrackLeftQuarterTurn190DegUp; case TrackElemType::RightQuarterTurn1TileUp90: - return inverted_impulse_rc_track_right_quarter_turn_1_90_deg_up; + return InvertedImpulseRCTrackRightQuarterTurn190DegUp; case TrackElemType::LeftQuarterTurn1TileDown90: - return inverted_impulse_rc_track_left_quarter_turn_1_90_deg_down; + return InvertedImpulseRCTrackLeftQuarterTurn190DegDown; case TrackElemType::RightQuarterTurn1TileDown90: - return inverted_impulse_rc_track_right_quarter_turn_1_90_deg_down; + return InvertedImpulseRCTrackRightQuarterTurn190DegDown; } return nullptr; } diff --git a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index 73122405f7..06b3e5028c 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008A92E8 */ -static void inverted_rc_track_flat( +static void InvertedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -31,13 +31,13 @@ static void inverted_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27131), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27132), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -49,20 +49,20 @@ static void inverted_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -72,7 +72,7 @@ static void inverted_rc_track_flat( } /** rct2: 0x008A9558, 0x008A9568, 0x008A9578 */ -static void inverted_rc_track_station( +static void InvertedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -85,22 +85,22 @@ static void inverted_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008A92F8 */ -static void inverted_rc_track_25_deg_up( +static void InvertedRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -111,22 +111,22 @@ static void inverted_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27249), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27250), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27251), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27252), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } } @@ -137,29 +137,29 @@ static void inverted_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27221), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27222), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27223), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27224), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -194,7 +194,7 @@ static void inverted_rc_track_25_deg_up( } /** rct2: 0x008A9308 */ -static void inverted_rc_track_60_deg_up( +static void InvertedRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -202,23 +202,23 @@ static void inverted_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27237), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 93 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27237), { 0, 0, height + 29 }, + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27238), { 0, 0, height + 29 }, { 32, 2, 81 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27238), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27239), { 0, 0, height + 29 }, { 32, 2, 81 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27239), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27240), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 93 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27240), { 0, 0, height + 29 }, + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -235,7 +235,7 @@ static void inverted_rc_track_60_deg_up( } /** rct2: 0x008A9318 */ -static void inverted_rc_track_flat_to_25_deg_up( +static void InvertedRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -246,22 +246,22 @@ static void inverted_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27241), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27242), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27243), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27244), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -272,29 +272,29 @@ static void inverted_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27213), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27214), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27215), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27216), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -329,7 +329,7 @@ static void inverted_rc_track_flat_to_25_deg_up( } /** rct2: 0x008A9328 */ -static void inverted_rc_track_25_deg_up_to_60_deg_up( +static void InvertedRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -337,29 +337,29 @@ static void inverted_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27225), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27225), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27229), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27229), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27226), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27226), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27230), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27230), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27227), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27227), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27228), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27228), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -376,7 +376,7 @@ static void inverted_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008A9338 */ -static void inverted_rc_track_60_deg_up_to_25_deg_up( +static void InvertedRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -384,35 +384,35 @@ static void inverted_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27231), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27231), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27235), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27235), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27232), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27232), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27236), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27236), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27233), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27233), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27234), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27234), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -447,7 +447,7 @@ static void inverted_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008A9348 */ -static void inverted_rc_track_25_deg_up_to_flat( +static void InvertedRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -458,22 +458,22 @@ static void inverted_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27245), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27246), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27247), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27248), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -484,29 +484,29 @@ static void inverted_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27217), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27218), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27219), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27220), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -541,55 +541,55 @@ static void inverted_rc_track_25_deg_up_to_flat( } /** rct2: 0x008A9358 */ -static void inverted_rc_track_25_deg_down( +static void InvertedRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9368 */ -static void inverted_rc_track_60_deg_down( +static void InvertedRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9378 */ -static void inverted_rc_track_flat_to_25_deg_down( +static void InvertedRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9388 */ -static void inverted_rc_track_25_deg_down_to_60_deg_down( +static void InvertedRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9398 */ -static void inverted_rc_track_60_deg_down_to_25_deg_down( +static void InvertedRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A93A8 */ -static void inverted_rc_track_25_deg_down_to_flat( +static void InvertedRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A93B8 */ -static void inverted_rc_track_left_quarter_turn_5( +static void InvertedRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -601,22 +601,22 @@ static void inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27142), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27147), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27152), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27137), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -650,12 +650,12 @@ static void inverted_rc_track_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27151), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27136), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -670,17 +670,17 @@ static void inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27140), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27145), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27150), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -701,7 +701,7 @@ static void inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27139), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -716,7 +716,7 @@ static void inverted_rc_track_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27134), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -731,22 +731,22 @@ static void inverted_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27138), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27143), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27148), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27133), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -770,16 +770,16 @@ static void inverted_rc_track_left_quarter_turn_5( } /** rct2: 0x008A93C8 */ -static void inverted_rc_track_right_quarter_turn_5( +static void InvertedRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - inverted_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A93D8 */ -static void inverted_rc_track_flat_to_left_bank( +static void InvertedRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -787,23 +787,23 @@ static void inverted_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27269), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27269), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27270), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27270), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27271), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27271), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27272), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27272), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -811,7 +811,7 @@ static void inverted_rc_track_flat_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -821,7 +821,7 @@ static void inverted_rc_track_flat_to_left_bank( } /** rct2: 0x008A93E8 */ -static void inverted_rc_track_flat_to_right_bank( +static void InvertedRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -829,23 +829,23 @@ static void inverted_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27273), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27273), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27274), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27274), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27275), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27275), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27276), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27276), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -853,7 +853,7 @@ static void inverted_rc_track_flat_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -863,7 +863,7 @@ static void inverted_rc_track_flat_to_right_bank( } /** rct2: 0x008A93F8 */ -static void inverted_rc_track_left_bank_to_flat( +static void InvertedRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -871,23 +871,23 @@ static void inverted_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27275), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27275), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27276), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27276), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27273), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27273), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27274), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27274), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -895,7 +895,7 @@ static void inverted_rc_track_left_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -905,7 +905,7 @@ static void inverted_rc_track_left_bank_to_flat( } /** rct2: 0x008A9408 */ -static void inverted_rc_track_right_bank_to_flat( +static void InvertedRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -913,23 +913,23 @@ static void inverted_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27271), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27271), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27272), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27272), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27269), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27269), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27270), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27270), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -937,7 +937,7 @@ static void inverted_rc_track_right_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -947,7 +947,7 @@ static void inverted_rc_track_right_bank_to_flat( } /** rct2: 0x008A9418 */ -static void inverted_rc_track_banked_left_quarter_turn_5( +static void InvertedRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -959,22 +959,22 @@ static void inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27162), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27167), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27172), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27157), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1008,12 +1008,12 @@ static void inverted_rc_track_banked_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27171), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27156), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1028,17 +1028,17 @@ static void inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27160), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27165), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27170), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1059,7 +1059,7 @@ static void inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27159), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1074,7 +1074,7 @@ static void inverted_rc_track_banked_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27154), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1089,22 +1089,22 @@ static void inverted_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27158), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27163), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27168), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27153), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -1128,16 +1128,16 @@ static void inverted_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008A9428 */ -static void inverted_rc_track_banked_right_quarter_turn_5( +static void InvertedRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - inverted_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A9438 */ -static void inverted_rc_track_left_bank_to_25_deg_up( +static void InvertedRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1145,23 +1145,23 @@ static void inverted_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27277), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27277), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27278), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27278), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27279), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27279), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27280), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27280), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1169,7 +1169,7 @@ static void inverted_rc_track_left_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1204,7 +1204,7 @@ static void inverted_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008A9448 */ -static void inverted_rc_track_right_bank_to_25_deg_up( +static void InvertedRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1212,23 +1212,23 @@ static void inverted_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27281), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27281), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27282), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27282), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27283), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27283), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27284), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27284), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1236,7 +1236,7 @@ static void inverted_rc_track_right_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1271,7 +1271,7 @@ static void inverted_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008A9458 */ -static void inverted_rc_track_25_deg_up_to_left_bank( +static void InvertedRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1279,23 +1279,23 @@ static void inverted_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27285), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27285), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27286), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27286), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27287), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27287), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27288), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27288), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1303,7 +1303,7 @@ static void inverted_rc_track_25_deg_up_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1338,7 +1338,7 @@ static void inverted_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008A9468 */ -static void inverted_rc_track_25_deg_up_to_right_bank( +static void InvertedRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1346,23 +1346,23 @@ static void inverted_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27289), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27289), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27290), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27290), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27291), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27291), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27292), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27292), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } @@ -1370,7 +1370,7 @@ static void inverted_rc_track_25_deg_up_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1405,39 +1405,39 @@ static void inverted_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008A9478 */ -static void inverted_rc_track_left_bank_to_25_deg_down( +static void InvertedRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9488 */ -static void inverted_rc_track_right_bank_to_25_deg_down( +static void InvertedRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9498 */ -static void inverted_rc_track_25_deg_down_to_left_bank( +static void InvertedRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A94A8 */ -static void inverted_rc_track_25_deg_down_to_right_bank( +static void InvertedRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A94B8 */ -static void inverted_rc_track_left_bank( +static void InvertedRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1445,23 +1445,23 @@ static void inverted_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27293), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27293), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27294), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27294), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27295), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27295), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27296), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27296), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1469,7 +1469,7 @@ static void inverted_rc_track_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1479,15 +1479,15 @@ static void inverted_rc_track_left_bank( } /** rct2: 0x008A94C8 */ -static void inverted_rc_track_right_bank( +static void InvertedRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A94D8 */ -static void inverted_rc_track_left_quarter_turn_5_25_deg_up( +static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1668,7 +1668,7 @@ static void inverted_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008A94E8 */ -static void inverted_rc_track_right_quarter_turn_5_25_deg_up( +static void InvertedRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1849,25 +1849,25 @@ static void inverted_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008A94F8 */ -static void inverted_rc_track_left_quarter_turn_5_25_deg_down( +static void InvertedRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - inverted_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A9508 */ -static void inverted_rc_track_right_quarter_turn_5_25_deg_down( +static void InvertedRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - inverted_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A9518 */ -static void inverted_rc_track_s_bend_left( +static void InvertedRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1879,22 +1879,22 @@ static void inverted_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27253), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27257), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27256), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27260), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1924,12 +1924,12 @@ static void inverted_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27255), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27259), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; } @@ -1957,12 +1957,12 @@ static void inverted_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27255), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27259), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2000,22 +2000,22 @@ static void inverted_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27256), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27260), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27253), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27257), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2038,7 +2038,7 @@ static void inverted_rc_track_s_bend_left( } /** rct2: 0x008A9528 */ -static void inverted_rc_track_s_bend_right( +static void InvertedRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2050,22 +2050,22 @@ static void inverted_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27261), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27265), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27264), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27268), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2085,12 +2085,12 @@ static void inverted_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27262), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27266), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2138,12 +2138,12 @@ static void inverted_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27262), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27266), { 0, 0, height + 29 }, - { 32, 26, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 26, 3 } }); break; } @@ -2171,22 +2171,22 @@ static void inverted_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27264), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27268), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27261), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27265), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2209,7 +2209,7 @@ static void inverted_rc_track_s_bend_right( } /** rct2: 0x008A9538 */ -static void inverted_rc_track_left_vertical_loop( +static void InvertedRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2221,22 +2221,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27355), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27363), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27362), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27370), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; } @@ -2278,22 +2278,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27356), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27364), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27361), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27369), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2305,22 +2305,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27357), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27365), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27360), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27368), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2333,22 +2333,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27358), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27366), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27359), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27367), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2369,22 +2369,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27359), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27367), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27358), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27366), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2399,22 +2399,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27360), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27368), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27357), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27365), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2427,22 +2427,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27361), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27369), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27356), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27364), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2454,22 +2454,22 @@ static void inverted_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27362), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27370), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27355), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27363), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } @@ -2514,7 +2514,7 @@ static void inverted_rc_track_left_vertical_loop( } /** rct2: 0x008A9548 */ -static void inverted_rc_track_right_vertical_loop( +static void InvertedRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2526,22 +2526,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27386), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27378), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27379), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27371), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } @@ -2583,22 +2583,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27385), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27377), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27380), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27372), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2610,22 +2610,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27384), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27376), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27381), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27373), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2638,22 +2638,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27383), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27375), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27382), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27374), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2674,22 +2674,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27382), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27374), { 0, 0, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27383), { 0, 16, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27375), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2704,22 +2704,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27381), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27373), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27384), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27376), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2732,22 +2732,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27380), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27372), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27385), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27377), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2759,22 +2759,22 @@ static void inverted_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27379), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27371), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27386), { 0, 6, height + 29 }, - { 32, 10, 7 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 10, 7 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27378), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; } @@ -2819,7 +2819,7 @@ static void inverted_rc_track_right_vertical_loop( } /** rct2: 0x008A9588 */ -static void inverted_rc_track_left_quarter_turn_3( +static void InvertedRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2831,22 +2831,22 @@ static void inverted_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27392), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27395), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27398), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27389), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2870,7 +2870,7 @@ static void inverted_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27391), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -2880,12 +2880,12 @@ static void inverted_rc_track_left_quarter_turn_3( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27397), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27388), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2898,22 +2898,22 @@ static void inverted_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27390), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27393), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27396), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27387), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -2937,16 +2937,16 @@ static void inverted_rc_track_left_quarter_turn_3( } /** rct2: 0x008A9598 */ -static void inverted_rc_track_right_quarter_turn_3( +static void InvertedRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A95A8 */ -static void inverted_rc_track_left_quarter_turn_3_bank( +static void InvertedRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2958,22 +2958,22 @@ static void inverted_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27404), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27407), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27410), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27401), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2997,22 +2997,22 @@ static void inverted_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27403), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27406), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27409), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27400), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3025,22 +3025,22 @@ static void inverted_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27402), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27405), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27408), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27399), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -3064,16 +3064,16 @@ static void inverted_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008A95B8 */ -static void inverted_rc_track_right_quarter_turn_3_bank( +static void InvertedRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A95C8 */ -static void inverted_rc_track_left_quarter_turn_3_25_deg_up( +static void InvertedRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3166,7 +3166,7 @@ static void inverted_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008A95D8 */ -static void inverted_rc_track_right_quarter_turn_3_25_deg_up( +static void InvertedRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3259,25 +3259,25 @@ static void inverted_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008A95E8 */ -static void inverted_rc_track_left_quarter_turn_3_25_deg_down( +static void InvertedRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A95F8 */ -static void inverted_rc_track_right_quarter_turn_3_25_deg_down( +static void InvertedRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A9608 */ -static void inverted_rc_track_left_twist_down_to_up( +static void InvertedRCTrackLeftTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3394,7 +3394,7 @@ static void inverted_rc_track_left_twist_down_to_up( } /** rct2: 0x008A9618 */ -static void inverted_rc_track_right_twist_down_to_up( +static void InvertedRCTrackRightTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3511,7 +3511,7 @@ static void inverted_rc_track_right_twist_down_to_up( } /** rct2: 0x008A9628 */ -static void inverted_rc_track_left_twist_up_to_down( +static void InvertedRCTrackLeftTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3628,7 +3628,7 @@ static void inverted_rc_track_left_twist_up_to_down( } /** rct2: 0x008A9638 */ -static void inverted_rc_track_right_twist_up_to_down( +static void InvertedRCTrackRightTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3745,7 +3745,7 @@ static void inverted_rc_track_right_twist_up_to_down( } /** rct2: 0x008A9648 */ -static void inverted_rc_track_half_loop_up( +static void InvertedRCTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3757,22 +3757,22 @@ static void inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27451), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27459), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27458), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27466), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } @@ -3810,22 +3810,22 @@ static void inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27452), { 0, 0, height + 29 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27460), { 0, 14, height + 29 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27457), { 0, 6, height + 29 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27465), { 0, 6, height + 29 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3837,22 +3837,22 @@ static void inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27453), { 16, 0, height + 2 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27461), { 12, 0, height + 2 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27456), { 10, 16, height + 2 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27464), { 16, 16, height + 2 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3867,22 +3867,22 @@ static void inverted_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27454), { 0, 0, height + 34 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27462), { 0, 0, height + 34 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27455), { 0, 16, height + 34 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27463), { 0, 16, height + 34 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -3897,15 +3897,15 @@ static void inverted_rc_track_half_loop_up( } /** rct2: 0x008A9658 */ -static void inverted_rc_track_half_loop_down( +static void InvertedRCTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_half_loop_up(session, ride, 3 - trackSequence, direction, height, trackElement); + InvertedRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A9668 */ -static void inverted_rc_track_left_corkscrew_up( +static void InvertedRCTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3917,22 +3917,22 @@ static void inverted_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27467), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27470), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27473), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27476), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; } @@ -3955,22 +3955,22 @@ static void inverted_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27468), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27471), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27474), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27477), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3982,22 +3982,22 @@ static void inverted_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27469), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27472), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27475), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27478), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); @@ -4021,7 +4021,7 @@ static void inverted_rc_track_left_corkscrew_up( } /** rct2: 0x008A9678 */ -static void inverted_rc_track_right_corkscrew_up( +static void InvertedRCTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4033,22 +4033,22 @@ static void inverted_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27479), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27482), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27485), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27488), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 33 }); + { { 0, 6, height + 33 }, { 32, 20, 3 } }); break; } @@ -4071,22 +4071,22 @@ static void inverted_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27480), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27483), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27486), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27489), { 0, 0, height + 14 }, - { 20, 20, 3 }, { 6, 6, height + 24 }); + { { 6, 6, height + 24 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4098,22 +4098,22 @@ static void inverted_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27481), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27484), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27487), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27490), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 39 }); + { { 6, 0, height + 39 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); @@ -4137,23 +4137,23 @@ static void inverted_rc_track_right_corkscrew_up( } /** rct2: 0x008A9688 */ -static void inverted_rc_track_left_corkscrew_down( +static void InvertedRCTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_corkscrew_up(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + InvertedRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A9698 */ -static void inverted_rc_track_right_corkscrew_down( +static void InvertedRCTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_corkscrew_up(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A96D8 */ -static void inverted_rc_track_left_quarter_turn_1_60_deg_up( +static void InvertedRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4161,44 +4161,44 @@ static void inverted_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27352), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27352), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27348), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27348), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27353), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27353), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27349), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27349), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27354), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27354), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27350), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27350), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27351), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27351), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27347), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27347), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A96B8 */ -static void inverted_rc_track_right_quarter_turn_1_60_deg_up( +static void InvertedRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4206,61 +4206,60 @@ static void inverted_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27343), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27343), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27339), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27339), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27344), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27344), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27340), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27340), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27345), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27345), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27341), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27341), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27346), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27346), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27342), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27342), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel( - session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_INVERTED_4, +56, TUNNEL_INVERTED_5); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A96C8 */ -static void inverted_rc_track_left_quarter_turn_1_60_deg_down( +static void InvertedRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A96E8 */ -static void inverted_rc_track_right_quarter_turn_1_60_deg_down( +static void InvertedRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A96A8 */ -static void inverted_rc_track_brakes( +static void InvertedRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4269,20 +4268,20 @@ static void inverted_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27337), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27337), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27338), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27338), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4292,7 +4291,7 @@ static void inverted_rc_track_brakes( } /** rct2: 0x008A96F8 */ -static void inverted_rc_track_left_quarter_banked_helix_large_up( +static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4304,22 +4303,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27202), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27207), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27212), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27197), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; } @@ -4343,22 +4342,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27201), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27206), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27211), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27196), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4373,22 +4372,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27200), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27205), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27210), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27195), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4404,22 +4403,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27199), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27204), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27209), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27194), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4434,22 +4433,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27198), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27203), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27208), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27193), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; } @@ -4473,7 +4472,7 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up( } /** rct2: 0x008A9708 */ -static void inverted_rc_track_right_quarter_banked_helix_large_up( +static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4485,22 +4484,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27173), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27178), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27183), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27188), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; } @@ -4524,22 +4523,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27174), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27179), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27184), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27189), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4554,22 +4553,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27175), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27180), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27185), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27190), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4585,22 +4584,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27176), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27181), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27186), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27191), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4615,22 +4614,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27177), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27182), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27187), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27192), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; } @@ -4654,7 +4653,7 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up( } /** rct2: 0x008A9718 */ -static void inverted_rc_track_left_quarter_banked_helix_large_down( +static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4666,22 +4665,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27182), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27187), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27192), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27177), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; } @@ -4705,22 +4704,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27181), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27186), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27191), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27176), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4735,22 +4734,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27180), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27185), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27190), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27175), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4766,22 +4765,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27179), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27184), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27189), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27174), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4796,22 +4795,22 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27178), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27183), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27188), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27173), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; } @@ -4835,7 +4834,7 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down( } /** rct2: 0x008A9728 */ -static void inverted_rc_track_right_quarter_banked_helix_large_down( +static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4847,22 +4846,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27193), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27198), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27203), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27208), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; } @@ -4886,22 +4885,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27194), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27199), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27204), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27209), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4916,22 +4915,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27195), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27200), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27205), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27210), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4947,22 +4946,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27196), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27201), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27206), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27211), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4977,22 +4976,22 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27197), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27202), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27207), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27212), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; } @@ -5016,7 +5015,7 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down( } /** rct2: 0x008A9A38 */ -static void inverted_rc_track_25_deg_up_left_banked( +static void InvertedRCTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5024,29 +5023,29 @@ static void inverted_rc_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27711), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27711), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27712), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27712), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27713), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27713), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27714), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27714), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -5081,7 +5080,7 @@ static void inverted_rc_track_25_deg_up_left_banked( } /** rct2: 0x008A9A48 */ -static void inverted_rc_track_25_deg_up_right_banked( +static void InvertedRCTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5089,29 +5088,29 @@ static void inverted_rc_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27715), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27715), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27716), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27716), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27717), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27717), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27718), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27718), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -5146,7 +5145,7 @@ static void inverted_rc_track_25_deg_up_right_banked( } /** rct2: 0x008A9738 */ -static void inverted_rc_track_on_ride_photo( +static void InvertedRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5158,8 +5157,8 @@ static void inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -5167,8 +5166,8 @@ static void inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5176,8 +5175,8 @@ static void inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -5185,34 +5184,34 @@ static void inverted_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_INVERTED_3); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); } /** rct2: 0x008A9A58 */ -static void inverted_rc_track_25_deg_down_left_banked( +static void InvertedRCTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_right_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpRightBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9A68 */ -static void inverted_rc_track_25_deg_down_right_banked( +static void InvertedRCTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_left_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpLeftBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9748 */ -static void inverted_rc_track_left_eighth_to_diag( +static void InvertedRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5224,22 +5223,22 @@ static void inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27507), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27511), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27515), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27519), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5259,22 +5258,22 @@ static void inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27508), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27512), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27516), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27520), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5289,22 +5288,22 @@ static void inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27509), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27513), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27517), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27521), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5323,22 +5322,22 @@ static void inverted_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27510), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27514), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27518), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27522), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; } @@ -5372,7 +5371,7 @@ static void inverted_rc_track_left_eighth_to_diag( } /** rct2: 0x008A9758 */ -static void inverted_rc_track_right_eighth_to_diag( +static void InvertedRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5384,22 +5383,22 @@ static void inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27491), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27495), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27499), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27503), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5419,22 +5418,22 @@ static void inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27492), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27496), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27500), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27504), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5449,22 +5448,22 @@ static void inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27493), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27497), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27501), { 0, 0, height + 29 }, - { 28, 28, 3 }, { 4, 4, height + 29 }); + { { 4, 4, height + 29 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27505), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5483,22 +5482,22 @@ static void inverted_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27494), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27498), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27502), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27506), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } @@ -5532,25 +5531,25 @@ static void inverted_rc_track_right_eighth_to_diag( } /** rct2: 0x008A9768 */ -static void inverted_rc_track_left_eighth_to_orthogonal( +static void InvertedRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - inverted_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9778 */ -static void inverted_rc_track_right_eighth_to_orthogonal( +static void InvertedRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - inverted_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + InvertedRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A9938 */ -static void inverted_rc_track_left_eighth_bank_to_diag( +static void InvertedRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5562,22 +5561,22 @@ static void inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27539), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27543), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27547), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27551), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5597,22 +5596,22 @@ static void inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27540), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27544), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27548), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27552), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5627,22 +5626,22 @@ static void inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27541), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27545), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27549), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27553), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5661,22 +5660,22 @@ static void inverted_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27542), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27546), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27550), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27554), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; } @@ -5711,7 +5710,7 @@ static void inverted_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008A9948 */ -static void inverted_rc_track_right_eighth_bank_to_diag( +static void InvertedRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5723,22 +5722,22 @@ static void inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27523), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27527), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27531), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27535), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -5758,22 +5757,22 @@ static void inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27524), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27528), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27532), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27536), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5788,22 +5787,22 @@ static void inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27525), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27529), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27533), { 0, 0, height + 29 }, - { 28, 28, 3 }, { 4, 4, height + 29 }); + { { 4, 4, height + 29 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27537), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5822,22 +5821,22 @@ static void inverted_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27526), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27530), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27534), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27538), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } @@ -5872,25 +5871,25 @@ static void inverted_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008A9958 */ -static void inverted_rc_track_left_eighth_bank_to_orthogonal( +static void InvertedRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - inverted_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9968 */ -static void inverted_rc_track_right_eighth_bank_to_orthogonal( +static void InvertedRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - inverted_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + InvertedRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A9788 */ -static void inverted_rc_track_diag_flat( +static void InvertedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5904,7 +5903,7 @@ static void inverted_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27614), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5915,7 +5914,7 @@ static void inverted_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27558), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5931,7 +5930,7 @@ static void inverted_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27611), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5942,7 +5941,7 @@ static void inverted_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27555), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5958,7 +5957,7 @@ static void inverted_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27613), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5969,7 +5968,7 @@ static void inverted_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27557), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5985,7 +5984,7 @@ static void inverted_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27612), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -5996,7 +5995,7 @@ static void inverted_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27556), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -6029,7 +6028,7 @@ static void inverted_rc_track_diag_flat( } /** rct2: 0x008A97B8 */ -static void inverted_rc_track_diag_25_deg_up( +static void InvertedRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6043,7 +6042,7 @@ static void inverted_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27626), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6054,7 +6053,7 @@ static void inverted_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27570), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6070,7 +6069,7 @@ static void inverted_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27623), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6081,7 +6080,7 @@ static void inverted_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27567), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6097,7 +6096,7 @@ static void inverted_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27625), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6108,7 +6107,7 @@ static void inverted_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27569), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6124,7 +6123,7 @@ static void inverted_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27624), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6135,7 +6134,7 @@ static void inverted_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27568), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6168,7 +6167,7 @@ static void inverted_rc_track_diag_25_deg_up( } /** rct2: 0x008A9818 */ -static void inverted_rc_track_diag_60_deg_up( +static void InvertedRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6180,7 +6179,7 @@ static void inverted_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27582), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6193,7 +6192,7 @@ static void inverted_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27579), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6206,7 +6205,7 @@ static void inverted_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27581), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6219,7 +6218,7 @@ static void inverted_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27580), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -6251,7 +6250,7 @@ static void inverted_rc_track_diag_60_deg_up( } /** rct2: 0x008A9798 */ -static void inverted_rc_track_diag_flat_to_25_deg_up( +static void InvertedRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6265,7 +6264,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27618), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6276,7 +6275,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27562), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6292,7 +6291,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27615), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6303,7 +6302,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27559), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6319,7 +6318,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27617), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6330,7 +6329,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27561), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6346,7 +6345,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27616), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6357,7 +6356,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27560), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6390,7 +6389,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A97F8 */ -static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( +static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6402,7 +6401,7 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27574), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6415,7 +6414,7 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27571), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6428,7 +6427,7 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27573), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6441,7 +6440,7 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27572), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -6473,7 +6472,7 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008A9808 */ -static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( +static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6485,7 +6484,7 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27578), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6498,7 +6497,7 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27575), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6511,7 +6510,7 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27577), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6524,7 +6523,7 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27576), { -16, -16, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 61 }); + { { 0, 0, height + 61 }, { 16, 16, 3 } }); break; } @@ -6556,7 +6555,7 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008A97A8 */ -static void inverted_rc_track_diag_25_deg_up_to_flat( +static void InvertedRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6570,7 +6569,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27622), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6581,7 +6580,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27566), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6597,7 +6596,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27619), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6608,7 +6607,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27563), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6624,7 +6623,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27621), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6635,7 +6634,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27565), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6651,7 +6650,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27620), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6662,7 +6661,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27564), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6695,7 +6694,7 @@ static void inverted_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A97E8 */ -static void inverted_rc_track_diag_25_deg_down( +static void InvertedRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6709,7 +6708,7 @@ static void inverted_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27624), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6720,7 +6719,7 @@ static void inverted_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27568), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6736,7 +6735,7 @@ static void inverted_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27625), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6747,7 +6746,7 @@ static void inverted_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27569), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6763,7 +6762,7 @@ static void inverted_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27623), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6774,7 +6773,7 @@ static void inverted_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27567), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6790,7 +6789,7 @@ static void inverted_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27626), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6801,7 +6800,7 @@ static void inverted_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27570), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -6834,7 +6833,7 @@ static void inverted_rc_track_diag_25_deg_down( } /** rct2: 0x008A9848 */ -static void inverted_rc_track_diag_60_deg_down( +static void InvertedRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6846,7 +6845,7 @@ static void inverted_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27580), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6859,7 +6858,7 @@ static void inverted_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27581), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6872,7 +6871,7 @@ static void inverted_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27579), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6885,7 +6884,7 @@ static void inverted_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27582), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } @@ -6917,7 +6916,7 @@ static void inverted_rc_track_diag_60_deg_down( } /** rct2: 0x008A97C8 */ -static void inverted_rc_track_diag_flat_to_25_deg_down( +static void InvertedRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6931,7 +6930,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27620), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6942,7 +6941,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27564), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6957,7 +6956,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27621), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6968,7 +6967,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27565), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6983,7 +6982,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27619), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -6994,7 +6993,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27563), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7009,7 +7008,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27622), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7020,7 +7019,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27566), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7053,7 +7052,7 @@ static void inverted_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A9828 */ -static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( +static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7065,7 +7064,7 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27576), { -16, -16, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 61 }); + { { 0, 0, height + 61 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7078,7 +7077,7 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27577), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7091,7 +7090,7 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27575), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7104,7 +7103,7 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27578), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -7136,7 +7135,7 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008A9838 */ -static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( +static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7148,7 +7147,7 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27572), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7161,7 +7160,7 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27573), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7174,7 +7173,7 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27571), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7187,7 +7186,7 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27574), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -7219,7 +7218,7 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008A97D8 */ -static void inverted_rc_track_diag_25_deg_down_to_flat( +static void InvertedRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7233,7 +7232,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27616), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7244,7 +7243,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27560), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7260,7 +7259,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27617), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7271,7 +7270,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27561), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7287,7 +7286,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27615), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7298,7 +7297,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27559), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7314,7 +7313,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27618), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7325,7 +7324,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27562), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -7358,7 +7357,7 @@ static void inverted_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A9878 */ -static void inverted_rc_track_diag_flat_to_left_bank( +static void InvertedRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7370,7 +7369,7 @@ static void inverted_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27590), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7383,7 +7382,7 @@ static void inverted_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27587), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7396,7 +7395,7 @@ static void inverted_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27589), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7409,7 +7408,7 @@ static void inverted_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27588), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7442,7 +7441,7 @@ static void inverted_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008A9888 */ -static void inverted_rc_track_diag_flat_to_right_bank( +static void InvertedRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7454,7 +7453,7 @@ static void inverted_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27594), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7467,7 +7466,7 @@ static void inverted_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27591), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7480,7 +7479,7 @@ static void inverted_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27593), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7493,7 +7492,7 @@ static void inverted_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27592), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7526,7 +7525,7 @@ static void inverted_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008A9898 */ -static void inverted_rc_track_diag_left_bank_to_flat( +static void InvertedRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7538,7 +7537,7 @@ static void inverted_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27592), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7551,7 +7550,7 @@ static void inverted_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27593), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7564,7 +7563,7 @@ static void inverted_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27591), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7577,7 +7576,7 @@ static void inverted_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27594), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7610,7 +7609,7 @@ static void inverted_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008A98A8 */ -static void inverted_rc_track_diag_right_bank_to_flat( +static void InvertedRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7622,7 +7621,7 @@ static void inverted_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27588), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7635,7 +7634,7 @@ static void inverted_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27589), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7648,7 +7647,7 @@ static void inverted_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27587), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7661,7 +7660,7 @@ static void inverted_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27590), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -7694,7 +7693,7 @@ static void inverted_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008A98D8 */ -static void inverted_rc_track_diag_left_bank_to_25_deg_up( +static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7706,7 +7705,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27606), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7719,7 +7718,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27603), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7732,7 +7731,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27605), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7745,7 +7744,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27604), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -7777,7 +7776,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008A98E8 */ -static void inverted_rc_track_diag_right_bank_to_25_deg_up( +static void InvertedRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7789,7 +7788,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27610), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7802,7 +7801,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27607), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7815,7 +7814,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27609), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7828,7 +7827,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27608), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -7860,7 +7859,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008A98B8 */ -static void inverted_rc_track_diag_25_deg_up_to_left_bank( +static void InvertedRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7872,7 +7871,7 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27598), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7885,7 +7884,7 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27595), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7898,7 +7897,7 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27597), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7911,7 +7910,7 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27596), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -7943,7 +7942,7 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008A98C8 */ -static void inverted_rc_track_diag_25_deg_up_to_right_bank( +static void InvertedRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7955,7 +7954,7 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27602), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7968,7 +7967,7 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27599), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7981,7 +7980,7 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27601), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7994,7 +7993,7 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27600), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8026,7 +8025,7 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008A98F8 */ -static void inverted_rc_track_diag_left_bank_to_25_deg_down( +static void InvertedRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8038,7 +8037,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27600), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8050,7 +8049,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27601), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8062,7 +8061,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27599), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8074,7 +8073,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27602), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8106,7 +8105,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008A9908 */ -static void inverted_rc_track_diag_right_bank_to_25_deg_down( +static void InvertedRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8118,7 +8117,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27596), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8130,7 +8129,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27597), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8142,7 +8141,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27595), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8154,7 +8153,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27598), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8186,7 +8185,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008A9918 */ -static void inverted_rc_track_diag_25_deg_down_to_left_bank( +static void InvertedRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8198,7 +8197,7 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27608), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8211,7 +8210,7 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27609), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8224,7 +8223,7 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27607), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8237,7 +8236,7 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27610), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8269,7 +8268,7 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008A9928 */ -static void inverted_rc_track_diag_25_deg_down_to_right_bank( +static void InvertedRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8281,7 +8280,7 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27604), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8294,7 +8293,7 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27605), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8307,7 +8306,7 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27603), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8320,7 +8319,7 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27606), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } @@ -8352,7 +8351,7 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008A9858 */ -static void inverted_rc_track_diag_left_bank( +static void InvertedRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8364,7 +8363,7 @@ static void inverted_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27586), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8377,7 +8376,7 @@ static void inverted_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27583), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8390,7 +8389,7 @@ static void inverted_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27585), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8403,7 +8402,7 @@ static void inverted_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27584), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -8436,7 +8435,7 @@ static void inverted_rc_track_diag_left_bank( } /** rct2: 0x008A9868 */ -static void inverted_rc_track_diag_right_bank( +static void InvertedRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8448,7 +8447,7 @@ static void inverted_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27584), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8461,7 +8460,7 @@ static void inverted_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27585), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8474,7 +8473,7 @@ static void inverted_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27583), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8487,7 +8486,7 @@ static void inverted_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27586), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -8520,7 +8519,7 @@ static void inverted_rc_track_diag_right_bank( } /** rct2: 0x008A9978 */ -static void inverted_rc_track_left_large_half_loop_up( +static void InvertedRCTrackLeftLargeHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8532,22 +8531,22 @@ static void inverted_rc_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27639), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27646), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27653), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27660), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -8564,22 +8563,22 @@ static void inverted_rc_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27640), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27647), { 0, 0, height }, - { 32, 20, 9 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 9 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27654), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27661), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8592,22 +8591,22 @@ static void inverted_rc_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27641), { 0, 0, height }, - { 24, 16, 3 }, { 8, 0, height + 40 }); + { { 8, 0, height + 40 }, { 24, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27648), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27655), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27662), { 0, 0, height }, { 2, 16, 3 }, - { 30, 16, height + 70 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27662), { 0, 0, height }, + { { 30, 16, height + 70 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8621,23 +8620,23 @@ static void inverted_rc_track_left_large_half_loop_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27642), { 0, 0, height }, { 8, 16, 3 }, - { 24, 0, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27642), { 0, 0, height }, + { { 24, 0, height + 29 }, { 8, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27649), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27656), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27663), { 0, 0, height }, { 2, 16, 3 }, - { 30, 16, height + 100 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27663), { 0, 0, height }, + { { 30, 16, height + 100 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8651,23 +8650,23 @@ static void inverted_rc_track_left_large_half_loop_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27643), { 0, 0, height }, { 2, 2, 3 }, - { 30, 30, height + 80 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27643), { 0, 0, height }, + { { 30, 30, height + 80 }, { 2, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27650), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27657), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27664), { 0, 0, height }, { 2, 16, 3 }, - { 30, 0, height + 90 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27664), { 0, 0, height }, + { { 30, 0, height + 90 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8679,23 +8678,23 @@ static void inverted_rc_track_left_large_half_loop_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27644), { 0, 0, height }, { 2, 16, 3 }, - { 30, 16, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27644), { 0, 0, height }, + { { 30, 16, height }, { 2, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27651), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27658), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27665), { 0, 0, height }, { 2, 16, 3 }, - { 30, 0, height + 140 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27665), { 0, 0, height }, + { { 30, 0, height + 140 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8710,28 +8709,28 @@ static void inverted_rc_track_left_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27645), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27652), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27659), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 25, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27666), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8750,7 +8749,7 @@ static void inverted_rc_track_left_large_half_loop_up( } /** rct2: 0x008A9988 */ -static void inverted_rc_track_right_large_half_loop_up( +static void InvertedRCTrackRightLargeHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8762,22 +8761,22 @@ static void inverted_rc_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27688), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27681), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27674), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27667), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -8794,22 +8793,22 @@ static void inverted_rc_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27689), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27682), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27675), { 0, 0, height }, - { 32, 20, 19 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 19 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27668), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8822,22 +8821,22 @@ static void inverted_rc_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27690), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height + 70 }); + { { 0, 16, height + 70 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27683), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27676), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27669), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height + 70 }); + { { 0, 0, height + 70 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8852,22 +8851,22 @@ static void inverted_rc_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27691), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height + 100 }); + { { 0, 16, height + 100 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27684), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27677), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27670), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height + 100 }); + { { 0, 0, height + 100 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8882,22 +8881,22 @@ static void inverted_rc_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27692), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height + 90 }); + { { 16, 0, height + 90 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27685), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27678), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27671), { 0, 0, height }, { 2, 16, 3 }, - { 30, 16, height + 110 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27671), { 0, 0, height }, + { { 30, 16, height + 110 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8909,23 +8908,23 @@ static void inverted_rc_track_right_large_half_loop_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27693), { 0, 0, height }, { 2, 16, 3 }, - { 30, 0, height + 140 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27693), { 0, 0, height }, + { { 30, 0, height + 140 }, { 2, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27686), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27679), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27672), { 0, 0, height }, { 2, 16, 3 }, - { 30, 16, height + 140 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27672), { 0, 0, height }, + { { 30, 16, height + 140 }, { 2, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8940,28 +8939,28 @@ static void inverted_rc_track_right_large_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27694), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27687), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 25, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27680), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27673), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8980,23 +8979,23 @@ static void inverted_rc_track_right_large_half_loop_up( } /** rct2: 0x008A9998 */ -static void inverted_rc_track_right_large_half_loop_down( +static void InvertedRCTrackRightLargeHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_large_half_loop_up(session, ride, 6 - trackSequence, direction, height, trackElement); + InvertedRCTrackRightLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A99A8 */ -static void inverted_rc_track_left_large_half_loop_down( +static void InvertedRCTrackLeftLargeHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_large_half_loop_up(session, ride, 6 - trackSequence, direction, height, trackElement); + InvertedRCTrackLeftLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A96A8 */ -static void inverted_rc_track_block_brakes( +static void InvertedRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9005,20 +9004,20 @@ static void inverted_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27337), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27337), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27338), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27338), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9028,7 +9027,7 @@ static void inverted_rc_track_block_brakes( } /** rct2: 0x008A9A78 */ -static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up( +static void InvertedRCTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9121,7 +9120,7 @@ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008A9A88 */ -static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up( +static void InvertedRCTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9214,27 +9213,25 @@ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008A9A98 */ -static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_down( +static void InvertedRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_rc_track_right_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A9AA8 */ -static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_down( +static void InvertedRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - inverted_rc_track_left_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A9BB8 */ -static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up( +static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9415,7 +9412,7 @@ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008A9BC8 */ -static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up( +static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9596,27 +9593,25 @@ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008A9BD8 */ -static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_down( +static void InvertedRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - inverted_rc_track_right_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + InvertedRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A9BE8 */ -static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_down( +static void InvertedRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - inverted_rc_track_left_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + InvertedRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A9AB8 */ -static void inverted_rc_track_25_deg_up_to_left_banked_25_deg_up( +static void InvertedRCTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9624,29 +9619,29 @@ static void inverted_rc_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27719), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27719), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27720), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27720), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27721), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27721), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27722), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27722), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -9681,7 +9676,7 @@ static void inverted_rc_track_25_deg_up_to_left_banked_25_deg_up( } /** rct2: 0x008A9AC8 */ -static void inverted_rc_track_25_deg_up_to_right_banked_25_deg_up( +static void InvertedRCTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9689,29 +9684,29 @@ static void inverted_rc_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27723), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27723), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27724), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27724), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27725), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27725), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27726), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27726), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -9746,7 +9741,7 @@ static void inverted_rc_track_25_deg_up_to_right_banked_25_deg_up( } /** rct2: 0x008A9AD8 */ -static void inverted_rc_track_left_banked_25_deg_up_to_25_deg_up( +static void InvertedRCTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9754,29 +9749,29 @@ static void inverted_rc_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27727), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27727), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27728), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27728), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27729), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27729), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27730), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27730), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -9811,7 +9806,7 @@ static void inverted_rc_track_left_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008A9AE8 */ -static void inverted_rc_track_right_banked_25_deg_up_to_25_deg_up( +static void InvertedRCTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9819,29 +9814,29 @@ static void inverted_rc_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27731), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27731), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27732), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27732), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27733), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27733), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27734), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 45 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27734), { 0, 0, height + 29 }, + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -9876,43 +9871,39 @@ static void inverted_rc_track_right_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008A9AF8 */ -static void inverted_rc_track_25_deg_down_to_left_banked_25_deg_down( +static void InvertedRCTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_banked_25_deg_up_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9B08 */ -static void inverted_rc_track_25_deg_down_to_right_banked_25_deg_down( +static void InvertedRCTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_banked_25_deg_up_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackLeftBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9B18 */ -static void inverted_rc_track_left_banked_25_deg_down_to_25_deg_down( +static void InvertedRCTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9B28 */ -static void inverted_rc_track_right_banked_25_deg_down_to_25_deg_down( +static void InvertedRCTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_25_deg_up_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrack25DegUpToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9B38 */ -static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up( +static void InvertedRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9920,29 +9911,29 @@ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27735), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27735), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27736), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27736), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27737), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27737), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27738), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27738), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -9977,7 +9968,7 @@ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up( } /** rct2: 0x008A9B48 */ -static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up( +static void InvertedRCTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9985,29 +9976,29 @@ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27739), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27739), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27740), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27740), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27741), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27741), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27742), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27742), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10042,7 +10033,7 @@ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up( } /** rct2: 0x008A9B58 */ -static void inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat( +static void InvertedRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10050,29 +10041,29 @@ static void inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27743), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27743), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27744), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27744), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27745), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27745), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27746), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27746), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10107,7 +10098,7 @@ static void inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat( } /** rct2: 0x008A9B68 */ -static void inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat( +static void InvertedRCTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10115,29 +10106,29 @@ static void inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27747), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27747), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27748), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27748), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27749), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27749), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27750), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27750), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10172,43 +10163,39 @@ static void inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat( } /** rct2: 0x008A9B78 */ -static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_down( +static void InvertedRCTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightBanked25DegUpToRightBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9B88 */ -static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_down( +static void InvertedRCTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackLeftBanked25DegUpToLeftBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9B98 */ -static void inverted_rc_track_left_banked_25_deg_down_to_left_banked_flat( +static void InvertedRCTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightBankedFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9BA8 */ -static void inverted_rc_track_right_banked_25_deg_down_to_right_banked_flat( +static void InvertedRCTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackLeftBankedFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A99B8 */ -static void inverted_rc_track_flat_to_left_banked_25_deg_up( +static void InvertedRCTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10216,29 +10203,29 @@ static void inverted_rc_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27695), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27695), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27696), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27696), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27697), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27697), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27698), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27698), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10273,7 +10260,7 @@ static void inverted_rc_track_flat_to_left_banked_25_deg_up( } /** rct2: 0x008A99C8 */ -static void inverted_rc_track_flat_to_right_banked_25_deg_up( +static void InvertedRCTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10281,29 +10268,29 @@ static void inverted_rc_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27699), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27699), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27700), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27700), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27701), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27701), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27702), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27702), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10338,7 +10325,7 @@ static void inverted_rc_track_flat_to_right_banked_25_deg_up( } /** rct2: 0x008A99D8 */ -static void inverted_rc_track_left_banked_25_deg_up_to_flat( +static void InvertedRCTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10346,29 +10333,29 @@ static void inverted_rc_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27703), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27703), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27704), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27704), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27705), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27705), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27706), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27706), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10403,7 +10390,7 @@ static void inverted_rc_track_left_banked_25_deg_up_to_flat( } /** rct2: 0x008A99E8 */ -static void inverted_rc_track_right_banked_25_deg_up_to_flat( +static void InvertedRCTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10411,29 +10398,29 @@ static void inverted_rc_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27707), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27707), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27708), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27708), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27709), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27709), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27710), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 37 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27710), { 0, 0, height + 29 }, + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -10468,51 +10455,51 @@ static void inverted_rc_track_right_banked_25_deg_up_to_flat( } /** rct2: 0x008A99F8 */ -static void inverted_rc_track_flat_to_left_banked_25_deg_down( +static void InvertedRCTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_right_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackRightBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9A08 */ -static void inverted_rc_track_flat_to_right_banked_25_deg_down( +static void InvertedRCTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_left_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackLeftBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9A18 */ -static void inverted_rc_track_left_banked_25_deg_down_to_flat( +static void InvertedRCTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_flat_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A9A28 */ -static void inverted_rc_track_right_banked_25_deg_down_to_flat( +static void InvertedRCTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - inverted_rc_track_flat_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + InvertedRCTrackFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } // Added by OpenRCT2 -static void inverted_rc_track_booster( +static void InvertedRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { const auto imageId = (direction & 1) ? SPR_G2_BM_INVERT_BOOSTER_2 : SPR_G2_BM_INVERT_BOOSTER_1; PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { 0, 0, height + 29 }, { 32, 20, 1 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 1 } }); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10521,303 +10508,303 @@ static void inverted_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionInvertedRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return inverted_rc_track_flat; + return InvertedRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return inverted_rc_track_station; + return InvertedRCTrackStation; case TrackElemType::Up25: - return inverted_rc_track_25_deg_up; + return InvertedRCTrack25DegUp; case TrackElemType::Up60: - return inverted_rc_track_60_deg_up; + return InvertedRCTrack60DegUp; case TrackElemType::FlatToUp25: - return inverted_rc_track_flat_to_25_deg_up; + return InvertedRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return inverted_rc_track_25_deg_up_to_60_deg_up; + return InvertedRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return inverted_rc_track_60_deg_up_to_25_deg_up; + return InvertedRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return inverted_rc_track_25_deg_up_to_flat; + return InvertedRCTrack25DegUpToFlat; case TrackElemType::Down25: - return inverted_rc_track_25_deg_down; + return InvertedRCTrack25DegDown; case TrackElemType::Down60: - return inverted_rc_track_60_deg_down; + return InvertedRCTrack60DegDown; case TrackElemType::FlatToDown25: - return inverted_rc_track_flat_to_25_deg_down; + return InvertedRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return inverted_rc_track_25_deg_down_to_60_deg_down; + return InvertedRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return inverted_rc_track_60_deg_down_to_25_deg_down; + return InvertedRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return inverted_rc_track_25_deg_down_to_flat; + return InvertedRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return inverted_rc_track_left_quarter_turn_5; + return InvertedRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return inverted_rc_track_right_quarter_turn_5; + return InvertedRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return inverted_rc_track_flat_to_left_bank; + return InvertedRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return inverted_rc_track_flat_to_right_bank; + return InvertedRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return inverted_rc_track_left_bank_to_flat; + return InvertedRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return inverted_rc_track_right_bank_to_flat; + return InvertedRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return inverted_rc_track_banked_left_quarter_turn_5; + return InvertedRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return inverted_rc_track_banked_right_quarter_turn_5; + return InvertedRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return inverted_rc_track_left_bank_to_25_deg_up; + return InvertedRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return inverted_rc_track_right_bank_to_25_deg_up; + return InvertedRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return inverted_rc_track_25_deg_up_to_left_bank; + return InvertedRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return inverted_rc_track_25_deg_up_to_right_bank; + return InvertedRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return inverted_rc_track_left_bank_to_25_deg_down; + return InvertedRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return inverted_rc_track_right_bank_to_25_deg_down; + return InvertedRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return inverted_rc_track_25_deg_down_to_left_bank; + return InvertedRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return inverted_rc_track_25_deg_down_to_right_bank; + return InvertedRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return inverted_rc_track_left_bank; + return InvertedRCTrackLeftBank; case TrackElemType::RightBank: - return inverted_rc_track_right_bank; + return InvertedRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return inverted_rc_track_left_quarter_turn_5_25_deg_up; + return InvertedRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return inverted_rc_track_right_quarter_turn_5_25_deg_up; + return InvertedRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return inverted_rc_track_left_quarter_turn_5_25_deg_down; + return InvertedRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return inverted_rc_track_right_quarter_turn_5_25_deg_down; + return InvertedRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return inverted_rc_track_s_bend_left; + return InvertedRCTrackSBendLeft; case TrackElemType::SBendRight: - return inverted_rc_track_s_bend_right; + return InvertedRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return inverted_rc_track_left_vertical_loop; + return InvertedRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return inverted_rc_track_right_vertical_loop; + return InvertedRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return inverted_rc_track_left_quarter_turn_3; + return InvertedRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return inverted_rc_track_right_quarter_turn_3; + return InvertedRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return inverted_rc_track_left_quarter_turn_3_bank; + return InvertedRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return inverted_rc_track_right_quarter_turn_3_bank; + return InvertedRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return inverted_rc_track_left_quarter_turn_3_25_deg_up; + return InvertedRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return inverted_rc_track_right_quarter_turn_3_25_deg_up; + return InvertedRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return inverted_rc_track_left_quarter_turn_3_25_deg_down; + return InvertedRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return inverted_rc_track_right_quarter_turn_3_25_deg_down; + return InvertedRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftTwistDownToUp: - return inverted_rc_track_left_twist_down_to_up; + return InvertedRCTrackLeftTwistDownToUp; case TrackElemType::RightTwistDownToUp: - return inverted_rc_track_right_twist_down_to_up; + return InvertedRCTrackRightTwistDownToUp; case TrackElemType::LeftTwistUpToDown: - return inverted_rc_track_left_twist_up_to_down; + return InvertedRCTrackLeftTwistUpToDown; case TrackElemType::RightTwistUpToDown: - return inverted_rc_track_right_twist_up_to_down; + return InvertedRCTrackRightTwistUpToDown; case TrackElemType::HalfLoopUp: - return inverted_rc_track_half_loop_up; + return InvertedRCTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return inverted_rc_track_half_loop_down; + return InvertedRCTrackHalfLoopDown; case TrackElemType::LeftCorkscrewUp: - return inverted_rc_track_left_corkscrew_up; + return InvertedRCTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return inverted_rc_track_right_corkscrew_up; + return InvertedRCTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return inverted_rc_track_left_corkscrew_down; + return InvertedRCTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return inverted_rc_track_right_corkscrew_down; + return InvertedRCTrackRightCorkscrewDown; case TrackElemType::LeftQuarterTurn1TileUp60: - return inverted_rc_track_left_quarter_turn_1_60_deg_up; + return InvertedRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return inverted_rc_track_right_quarter_turn_1_60_deg_up; + return InvertedRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return inverted_rc_track_left_quarter_turn_1_60_deg_down; + return InvertedRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return inverted_rc_track_right_quarter_turn_1_60_deg_down; + return InvertedRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return inverted_rc_track_brakes; + return InvertedRCTrackBrakes; case TrackElemType::LeftQuarterBankedHelixLargeUp: - return inverted_rc_track_left_quarter_banked_helix_large_up; + return InvertedRCTrackLeftQuarterBankedHelixLargeUp; case TrackElemType::RightQuarterBankedHelixLargeUp: - return inverted_rc_track_right_quarter_banked_helix_large_up; + return InvertedRCTrackRightQuarterBankedHelixLargeUp; case TrackElemType::LeftQuarterBankedHelixLargeDown: - return inverted_rc_track_left_quarter_banked_helix_large_down; + return InvertedRCTrackLeftQuarterBankedHelixLargeDown; case TrackElemType::RightQuarterBankedHelixLargeDown: - return inverted_rc_track_right_quarter_banked_helix_large_down; + return InvertedRCTrackRightQuarterBankedHelixLargeDown; case TrackElemType::Up25LeftBanked: - return inverted_rc_track_25_deg_up_left_banked; + return InvertedRCTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return inverted_rc_track_25_deg_up_right_banked; + return InvertedRCTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return inverted_rc_track_on_ride_photo; + return InvertedRCTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return inverted_rc_track_25_deg_down_left_banked; + return InvertedRCTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return inverted_rc_track_25_deg_down_right_banked; + return InvertedRCTrack25DegDownRightBanked; case TrackElemType::LeftEighthToDiag: - return inverted_rc_track_left_eighth_to_diag; + return InvertedRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return inverted_rc_track_right_eighth_to_diag; + return InvertedRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return inverted_rc_track_left_eighth_to_orthogonal; + return InvertedRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return inverted_rc_track_right_eighth_to_orthogonal; + return InvertedRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return inverted_rc_track_left_eighth_bank_to_diag; + return InvertedRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return inverted_rc_track_right_eighth_bank_to_diag; + return InvertedRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return inverted_rc_track_left_eighth_bank_to_orthogonal; + return InvertedRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return inverted_rc_track_right_eighth_bank_to_orthogonal; + return InvertedRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return inverted_rc_track_diag_flat; + return InvertedRCTrackDiagFlat; case TrackElemType::DiagUp25: - return inverted_rc_track_diag_25_deg_up; + return InvertedRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return inverted_rc_track_diag_60_deg_up; + return InvertedRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return inverted_rc_track_diag_flat_to_25_deg_up; + return InvertedRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return inverted_rc_track_diag_25_deg_up_to_60_deg_up; + return InvertedRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return inverted_rc_track_diag_60_deg_up_to_25_deg_up; + return InvertedRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return inverted_rc_track_diag_25_deg_up_to_flat; + return InvertedRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return inverted_rc_track_diag_25_deg_down; + return InvertedRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return inverted_rc_track_diag_60_deg_down; + return InvertedRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return inverted_rc_track_diag_flat_to_25_deg_down; + return InvertedRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return inverted_rc_track_diag_25_deg_down_to_60_deg_down; + return InvertedRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return inverted_rc_track_diag_60_deg_down_to_25_deg_down; + return InvertedRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return inverted_rc_track_diag_25_deg_down_to_flat; + return InvertedRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return inverted_rc_track_diag_flat_to_left_bank; + return InvertedRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return inverted_rc_track_diag_flat_to_right_bank; + return InvertedRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return inverted_rc_track_diag_left_bank_to_flat; + return InvertedRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return inverted_rc_track_diag_right_bank_to_flat; + return InvertedRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return inverted_rc_track_diag_left_bank_to_25_deg_up; + return InvertedRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return inverted_rc_track_diag_right_bank_to_25_deg_up; + return InvertedRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return inverted_rc_track_diag_25_deg_up_to_left_bank; + return InvertedRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return inverted_rc_track_diag_25_deg_up_to_right_bank; + return InvertedRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return inverted_rc_track_diag_left_bank_to_25_deg_down; + return InvertedRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return inverted_rc_track_diag_right_bank_to_25_deg_down; + return InvertedRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return inverted_rc_track_diag_25_deg_down_to_left_bank; + return InvertedRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return inverted_rc_track_diag_25_deg_down_to_right_bank; + return InvertedRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return inverted_rc_track_diag_left_bank; + return InvertedRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return inverted_rc_track_diag_right_bank; + return InvertedRCTrackDiagRightBank; case TrackElemType::LeftLargeHalfLoopUp: - return inverted_rc_track_left_large_half_loop_up; + return InvertedRCTrackLeftLargeHalfLoopUp; case TrackElemType::RightLargeHalfLoopUp: - return inverted_rc_track_right_large_half_loop_up; + return InvertedRCTrackRightLargeHalfLoopUp; case TrackElemType::RightLargeHalfLoopDown: - return inverted_rc_track_right_large_half_loop_down; + return InvertedRCTrackRightLargeHalfLoopDown; case TrackElemType::LeftLargeHalfLoopDown: - return inverted_rc_track_left_large_half_loop_down; + return InvertedRCTrackLeftLargeHalfLoopDown; case TrackElemType::BlockBrakes: - return inverted_rc_track_block_brakes; + return InvertedRCTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return inverted_rc_track_left_banked_quarter_turn_3_25_deg_up; + return InvertedRCTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return inverted_rc_track_right_banked_quarter_turn_3_25_deg_up; + return InvertedRCTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return inverted_rc_track_left_banked_quarter_turn_3_25_deg_down; + return InvertedRCTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return inverted_rc_track_right_banked_quarter_turn_3_25_deg_down; + return InvertedRCTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return inverted_rc_track_left_banked_quarter_turn_5_25_deg_up; + return InvertedRCTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return inverted_rc_track_right_banked_quarter_turn_5_25_deg_up; + return InvertedRCTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return inverted_rc_track_left_banked_quarter_turn_5_25_deg_down; + return InvertedRCTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return inverted_rc_track_right_banked_quarter_turn_5_25_deg_down; + return InvertedRCTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return inverted_rc_track_25_deg_up_to_left_banked_25_deg_up; + return InvertedRCTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return inverted_rc_track_25_deg_up_to_right_banked_25_deg_up; + return InvertedRCTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return inverted_rc_track_left_banked_25_deg_up_to_25_deg_up; + return InvertedRCTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return inverted_rc_track_right_banked_25_deg_up_to_25_deg_up; + return InvertedRCTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return inverted_rc_track_25_deg_down_to_left_banked_25_deg_down; + return InvertedRCTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return inverted_rc_track_25_deg_down_to_right_banked_25_deg_down; + return InvertedRCTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return inverted_rc_track_left_banked_25_deg_down_to_25_deg_down; + return InvertedRCTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return inverted_rc_track_right_banked_25_deg_down_to_25_deg_down; + return InvertedRCTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up; + return InvertedRCTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up; + return InvertedRCTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat; + return InvertedRCTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat; + return InvertedRCTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return inverted_rc_track_left_banked_flat_to_left_banked_25_deg_down; + return InvertedRCTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return inverted_rc_track_right_banked_flat_to_right_banked_25_deg_down; + return InvertedRCTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return inverted_rc_track_left_banked_25_deg_down_to_left_banked_flat; + return InvertedRCTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return inverted_rc_track_right_banked_25_deg_down_to_right_banked_flat; + return InvertedRCTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return inverted_rc_track_flat_to_left_banked_25_deg_up; + return InvertedRCTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return inverted_rc_track_flat_to_right_banked_25_deg_up; + return InvertedRCTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return inverted_rc_track_left_banked_25_deg_up_to_flat; + return InvertedRCTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return inverted_rc_track_right_banked_25_deg_up_to_flat; + return InvertedRCTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return inverted_rc_track_flat_to_left_banked_25_deg_down; + return InvertedRCTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return inverted_rc_track_flat_to_right_banked_25_deg_down; + return InvertedRCTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return inverted_rc_track_left_banked_25_deg_down_to_flat; + return InvertedRCTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return inverted_rc_track_right_banked_25_deg_down_to_flat; + return InvertedRCTrackRightBanked25DegDownToFlat; case TrackElemType::Booster: - return inverted_rc_track_booster; + return InvertedRCTrackBooster; } return nullptr; } diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 8a53f3d90a..635c42d53b 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,6 +13,7 @@ #include "../../interface/Viewport.h" #include "../../interface/Window.h" #include "../../localisation/Localisation.h" +#include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../sprites.h" @@ -1812,15 +1813,15 @@ static constexpr const uint32_t junior_rc_track_pieces_diag_60_deg_down_to_25_de }, }; -void junior_rc_paint_track_flat( +void JuniorRCPaintTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_flat[EnumValue(chainType)][direction]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 0, height, @@ -1832,19 +1833,23 @@ void junior_rc_paint_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -void junior_rc_paint_station( +void JuniorRCPaintStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, uint16_t height, const TrackElement& trackElement, bool drawBlockBrake) { ImageId imageId; - bool isBraked = trackElement.BlockBrakeClosed(); + bool isBraked = trackElement.IsBrakeClosed(); + auto stationObj = ride.GetStationObject(); if (direction == 0 || direction == 2) { - // height -= 2 (height - 2) - imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); + if (stationObj != nullptr && !(stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + { + // height -= 2 (height - 2) + imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); + } // height += 2 (height) if (trackElement.GetTrackType() == TrackElemType::EndStation && drawBlockBrake) @@ -1864,9 +1869,12 @@ void junior_rc_paint_station( } else if (direction == 1 || direction == 3) { - // height -= 2 (height - 2) - imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); + if (stationObj != nullptr && !(stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + { + // height -= 2 (height - 2) + imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); + } // height += 2 (height) if (trackElement.GetTrackType() == TrackElemType::EndStation && drawBlockBrake) @@ -1884,15 +1892,15 @@ void junior_rc_paint_station( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -void junior_rc_paint_track_25_deg_up( +void JuniorRCPaintTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( junior_rc_track_pieces_25_deg_up[EnumValue(chainType)][direction]); @@ -1902,7 +1910,7 @@ void junior_rc_paint_track_25_deg_up( uint8_t tunnelType[4] = { TUNNEL_1, TUNNEL_2, TUNNEL_2, TUNNEL_1 }; PaintUtilPushTunnelRotated(session, direction, height + tunnelHeights[direction], tunnelType[direction]); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, supportType, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1913,9 +1921,9 @@ void junior_rc_paint_track_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -void junior_rc_paint_track_flat_to_25_deg_up( +void JuniorRCPaintTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( junior_rc_track_pieces_flat_to_25_deg_up[EnumValue(chainType)][direction]); @@ -1930,7 +1938,7 @@ void junior_rc_paint_track_flat_to_25_deg_up( PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_2); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; uint16_t ax = (direction == 0) ? 5 : 3; @@ -1942,9 +1950,9 @@ void junior_rc_paint_track_flat_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -void junior_rc_paint_track_25_deg_up_to_flat( +void JuniorRCPaintTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( junior_rc_track_pieces_25_deg_up_to_flat[EnumValue(chainType)][direction]); @@ -1972,7 +1980,7 @@ void junior_rc_paint_track_25_deg_up_to_flat( PaintUtilPushTunnelLeft(session, tunnelHeight, tunnelType); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, supportType, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1990,11 +1998,11 @@ static constexpr const int8_t junior_rc_track_right_quarter_turn_5_tiles_support { 0, 0, 0, 0, 0, 0, 0 }, }; -static void junior_rc_right_quarter_turn_5_tiles_paint_setup( +static void JuniorRCRightQuarterTurn5TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_flat_quarter_turn_5_tiles, defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, defaultRightQuarterTurn5TilesBoundOffsets); @@ -2070,18 +2078,18 @@ static constexpr const uint8_t junior_rc_left_quarter_turn_5_tiles_to_right_turn }; /* rct2: 0x0051917A */ -static void junior_rc_left_quarter_turn_5_tiles_paint_setup( +static void JuniorRCLeftQuarterTurn5TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_quarter_turn_5_tiles_paint_setup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightQuarterTurn5TilesPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** * rct2: 0x008AAFC0, 0x00521593, 0x005216A1, 0x005217AF, 0x00521884 */ -static void junior_rc_flat_to_left_bank_paint_setup( +static void JuniorRCFlatToLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2115,7 +2123,7 @@ static void junior_rc_flat_to_left_bank_paint_setup( } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2129,7 +2137,7 @@ static void junior_rc_flat_to_left_bank_paint_setup( /** * rct2: 0x008AAFD0, 0x00521959, 0x00521A2E, 0x00521B03, 0x00521C11 */ -static void junior_rc_flat_to_right_bank_paint_setup( +static void JuniorRCFlatToRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2163,7 +2171,7 @@ static void junior_rc_flat_to_right_bank_paint_setup( } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2174,18 +2182,18 @@ static void junior_rc_flat_to_right_bank_paint_setup( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void junior_rc_left_bank_to_flat_paint_setup( +static void JuniorRCLeftBankToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_flat_to_right_bank_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCFlatToRightBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -static void junior_rc_right_bank_to_flat_paint_setup( +static void JuniorRCRightBankToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_flat_to_left_bank_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCFlatToLeftBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } static constexpr const CoordsXY junior_rc_banked_right_quarter_turn_5_tiles_bound_lengths[4][5] = { @@ -2251,7 +2259,7 @@ static constexpr const CoordsXYZ junior_rc_banked_right_quarter_turn_5_tiles_bou }; /* rct2: 0x008AB010, 0x0052304C */ -static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( +static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2260,7 +2268,7 @@ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( { thickness = 26; } - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_banked_quarter_turn_5_tiles, nullptr, junior_rc_banked_right_quarter_turn_5_tiles_bound_lengths, junior_rc_banked_right_quarter_turn_5_tiles_bound_offsets); @@ -2343,19 +2351,18 @@ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( } /* rct2: 0x008AB000 */ -static void junior_rc_banked_left_quarter_turn_5_tiles_paint_setup( +static void JuniorRCBankedLeftQuarterTurn5TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; - junior_rc_banked_right_quarter_turn_5_tiles_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCBankedRightQuarterTurn5TilesPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** * rct2: 0x008AB020, 0x00522073, 0x00522182, 0x00522291, 0x00522367 */ -static void junior_rc_left_bank_to_25_deg_up_paint_setup( +static void JuniorRCLeftBankTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2385,7 +2392,7 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup( } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2415,7 +2422,7 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup( /** * rct2: 0x008AB030, 0x0052243D, 0x00522513, 0x005225E9, 0x005226F8 */ -static void junior_rc_right_bank_to_25_deg_up_paint_setup( +static void JuniorRCRightBankTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2445,7 +2452,7 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup( } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2475,7 +2482,7 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup( /** * rct2: 0x008AB040, 0x00522807, 0x0052291A, 0x00522A2D, 0x00522B07 */ -static void junior_rc_25_deg_up_to_left_bank_paint_setup( +static void JuniorRC25DegUpToLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2522,7 +2529,7 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup( } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2536,7 +2543,7 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup( /** * rct2: 0x008AB050, 0x00522BE1, 0x00522CBB, 0x00522D95, 0x00522EA8 */ -static void junior_rc_25_deg_up_to_right_bank_paint_setup( +static void JuniorRC25DegUpToRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2583,7 +2590,7 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup( } } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2597,41 +2604,41 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup( /** * rct2: 0x008AB060 */ -static void junior_rc_left_bank_to_25_deg_down_paint_setup( +static void JuniorRCLeftBankTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_25_deg_up_to_right_bank_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRC25DegUpToRightBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** * rct2: 0x008AB070 */ -static void junior_rc_right_bank_to_25_deg_down_paint_setup( +static void JuniorRCRightBankTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_25_deg_up_to_left_bank_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRC25DegUpToLeftBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** * rct2: 0x008AB080 */ -static void junior_rc_25_deg_down_to_left_bank_paint_setup( +static void JuniorRC25DegDownToLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_right_bank_to_25_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCRightBankTo25DegUpPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** * rct2: 0x008AB090 */ -static void junior_rc_25_deg_down_to_right_bank_paint_setup( +static void JuniorRC25DegDownToRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_left_bank_to_25_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCLeftBankTo25DegUpPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } static constexpr const CoordsXYZ junior_rc_left_bank_bound_lengths[4] = { @@ -2651,7 +2658,7 @@ static constexpr const CoordsXY junior_rc_left_bank_bound_offsets[4] = { /** * rct2: 0x008AB0A0, 0x00521D1F, 0x00521DF4, 0x00521EC9, 0x00521F9E */ -static void junior_rc_left_bank_paint_setup( +static void JuniorRCLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2671,7 +2678,7 @@ static void junior_rc_left_bank_paint_setup( PaintUtilPushTunnelLeft(session, height, 0); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2685,18 +2692,18 @@ static void junior_rc_left_bank_paint_setup( /** * rct2: 0x008AB0B0 */ -static void junior_rc_right_bank_paint_setup( +static void JuniorRCRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_left_bank_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCLeftBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( +void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_left_quarter_turn_5_tiles_25_deg_up[EnumValue(chainType)], junior_rc_left_quarter_turn_5_tiles_25_deg_up_offsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); @@ -2770,11 +2777,11 @@ void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( } } -void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( +void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_quarter_turn_5_tiles_25_deg_up[EnumValue(chainType)], defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); @@ -2849,49 +2856,49 @@ void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( } /* rct2: 0x008AAE10, 0x00519D88, 0x00519DAC, 0x00519DD0, 0x00519DF4 */ -static void junior_rc_left_quarter_turn_5_tiles_25_deg_up_paint_setup( +static void JuniorRCLeftQuarterTurn5Tiles25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( + JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /* rct2: 0x008AAE20, 0x00519E18, 0x0051A148, 0x0051A452, 0x0051A738 */ -static void junior_rc_right_quarter_turn_5_tiles_25_deg_up_paint_setup( +static void JuniorRCRightQuarterTurn5Tiles25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( + JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /* rct2: 0x008AAE30, 0x0051AA42, 0x0051AA68, 0x0051AA8C, 0x0051AAB0 */ -static void junior_rc_left_quarter_turn_5_tiles_25_deg_down_paint_setup( +static void JuniorRCLeftQuarterTurn5Tiles25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_right_quarter_turn_5_tiles_25_deg_up_paint_setup( + JuniorRCRightQuarterTurn5Tiles25DegUpPaintSetup( session, ride, junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence], (direction + 1) & 3, height, trackElement); } /* rct2: 0x008AAE40, 0x0051AAD4, 0x0051AE04, 0x0051B10E, 0x0051B3F4 */ -static void junior_rc_right_quarter_turn_5_tiles_25_deg_down_paint_setup( +static void JuniorRCRightQuarterTurn5Tiles25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_left_quarter_turn_5_tiles_25_deg_up_paint_setup( + JuniorRCLeftQuarterTurn5Tiles25DegUpPaintSetup( session, ride, junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence], (direction - 1) & 3, height, trackElement); } /* rct2: 0x008AAE50, 0x0051B6FE, 0x0051B946, 0x0051BB8E, 0x0051BBA8 */ -static void junior_rc_s_bend_left_paint_setup( +static void JuniorRCSBendLeftPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2990,7 +2997,7 @@ static void junior_rc_s_bend_left_paint_setup( } /* rct2: 0x008AAE60, 0x0051BBC0, 0x0051BE06, 0x0051C04E, 0x0051C068 */ -static void junior_rc_s_bend_right_paint_setup( +static void JuniorRCSBendRightPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3089,15 +3096,15 @@ static void junior_rc_s_bend_right_paint_setup( } /** rct2: 0x008AAEB0, 0x0051C0E0, 0x0051C2C1, 0x0051C47F, 0x0051C61D */ -static void junior_rc_right_quarter_turn_3_tiles_paint_setup( +static void JuniorRCRightQuarterTurn3TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_flat_quarter_turn_3_tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); static constexpr uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, @@ -3131,12 +3138,12 @@ static void junior_rc_right_quarter_turn_3_tiles_paint_setup( } /** rct2: 0x008AAEA0 */ -static void junior_rc_left_quarter_turn_3_tiles_paint_setup( +static void JuniorRCLeftQuarterTurn3TilesPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - junior_rc_right_quarter_turn_3_tiles_paint_setup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightQuarterTurn3TilesPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } static constexpr const CoordsXY junior_rc_right_quarter_turn_3_tiles_bank_bound_lengths[4][3] = { @@ -3186,7 +3193,7 @@ static constexpr const CoordsXYZ junior_rc_right_quarter_turn_3_tiles_bank_offse }; /** rct2: 0x008AA0D0, 0x00523EA0, 0x005240CC, 0x0052430F, 0x00524500*/ -static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( +static void JuniorRCRightQuarterTurn3TilesBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3197,11 +3204,11 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( { 1, 1, 1, 1 }, }; - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, thickness[direction][trackSequence], height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], 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); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); if (direction == 1 && trackSequence == 3) { @@ -3245,9 +3252,9 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( +void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto imageId = ImageId(0); CoordsXY offset; @@ -3326,9 +3333,9 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( +void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto imageId = ImageId(0); CoordsXY offset; @@ -3408,35 +3415,34 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( } /** rct2: 0x008AA0C0 */ -static void junior_rc_left_quarter_turn_3_tiles_bank_paint_setup( +static void JuniorRCLeftQuarterTurn3TilesBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - junior_rc_right_quarter_turn_3_tiles_bank_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightQuarterTurn3TilesBankPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AAED0, 0x0051C83C, 0x0051C9EC, 0x0051CB76, 0x0051CCDC*/ -static void junior_rc_right_quarter_turn_3_tiles_25_deg_up_paint_setup( +static void JuniorRCRightQuarterTurn3Tiles25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( + JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAEF0, 0x0051CEC8, 0x0051D078, 0x0051D202, 0x0051D368*/ -static void junior_rc_right_quarter_turn_3_tiles_25_deg_down_paint_setup( +static void JuniorRCRightQuarterTurn3Tiles25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( + JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } static constexpr const uint8_t junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[] = { @@ -3447,27 +3453,25 @@ static constexpr const uint8_t junior_rc_left_quarter_turn_3_tiles_to_right_turn }; /** rct2: 0x008AAEC0 */ -static void junior_rc_left_quarter_turn_3_tiles_25_deg_up_paint_setup( +static void JuniorRCLeftQuarterTurn3Tiles25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_quarter_turn_3_tiles_25_deg_down_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightQuarterTurn3Tiles25DegDownPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AAEE0 */ -static void junior_rc_left_quarter_turn_3_tiles_25_deg_down_paint_setup( +static void JuniorRCLeftQuarterTurn3Tiles25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_quarter_turn_3_tiles_25_deg_up_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightQuarterTurn3Tiles25DegUpPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AB0F0, 0x0052B3A4, 0x0052B5F8, 0x0052B863, 0x0052BA78 */ -static void junior_rc_right_half_banked_helix_up_small_paint_setup( +static void JuniorRCRightHalfBankedHelixUpSmallPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3479,7 +3483,7 @@ static void junior_rc_right_half_banked_helix_up_small_paint_setup( direction++; direction &= 3; } - track_paint_util_right_helix_up_small_quarter_tiles_paint( + TrackPaintUtilRightHelixUpSmallQuarterTilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_half_banked_helix_up_small_quarter_tiles, nullptr, defaultRightHelixUpSmallQuarterBoundLengths, defaultRightHelixUpSmallQuarterBoundOffsets); @@ -3535,7 +3539,7 @@ static void junior_rc_right_half_banked_helix_up_small_paint_setup( } /** rct2: 0x008AB110, 0x0052BD80, 0x0052BFD4, 0x0052C23B, 0x0052C450 */ -static void junior_rc_right_half_banked_helix_down_small_paint_setup( +static void JuniorRCRightHalfBankedHelixDownSmallPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3547,7 +3551,7 @@ static void junior_rc_right_half_banked_helix_down_small_paint_setup( direction++; direction &= 3; } - track_paint_util_right_helix_up_small_quarter_tiles_paint( + TrackPaintUtilRightHelixUpSmallQuarterTilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_half_banked_helix_down_small_quarter_tiles, nullptr, defaultRightHelixUpSmallQuarterBoundLengths, defaultRightHelixUpSmallQuarterBoundOffsets); @@ -3603,7 +3607,7 @@ static void junior_rc_right_half_banked_helix_down_small_paint_setup( } /** rct2: 0x008AB0E0 */ -static void junior_rc_left_half_banked_helix_up_small_paint_setup( +static void JuniorRCLeftHalfBankedHelixUpSmallPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3614,12 +3618,11 @@ static void junior_rc_left_half_banked_helix_up_small_paint_setup( direction &= 3; } trackSequence = junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_half_banked_helix_down_small_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightHalfBankedHelixDownSmallPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AB100 */ -static void junior_rc_left_half_banked_helix_down_small_paint_setup( +static void JuniorRCLeftHalfBankedHelixDownSmallPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3630,12 +3633,11 @@ static void junior_rc_left_half_banked_helix_down_small_paint_setup( direction &= 3; } trackSequence = junior_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_half_banked_helix_up_small_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightHalfBankedHelixUpSmallPaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AB130, 0x0052C7BC, 0x0052CB6B, 0x0052CF32, 0x0052D2B3 */ -static void junior_rc_right_half_banked_helix_up_large_paint_setup( +static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3647,7 +3649,7 @@ static void junior_rc_right_half_banked_helix_up_large_paint_setup( direction++; direction &= 3; } - track_paint_util_right_helix_up_large_quarter_tiles_paint( + TrackPaintUtilRightHelixUpLargeQuarterTilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_half_banked_helix_up_large_quarter_tiles, nullptr, defaultRightHelixUpLargeQuarterBoundLengths, defaultRightHelixUpLargeQuarterBoundOffsets); @@ -3719,7 +3721,7 @@ static void junior_rc_right_half_banked_helix_up_large_paint_setup( } /** rct2: 0x008AB150, 0x0052D778, 0x0052DB27, 0x0052DEEA, 0x0052E26B */ -static void junior_rc_right_half_banked_helix_down_large_paint_setup( +static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3731,7 +3733,7 @@ static void junior_rc_right_half_banked_helix_down_large_paint_setup( direction++; direction &= 3; } - track_paint_util_right_helix_up_large_quarter_tiles_paint( + TrackPaintUtilRightHelixUpLargeQuarterTilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_half_banked_helix_down_large_quarter_tiles, nullptr, defaultRightHelixUpLargeQuarterBoundLengths, defaultRightHelixUpLargeQuarterBoundOffsets); @@ -3803,7 +3805,7 @@ static void junior_rc_right_half_banked_helix_down_large_paint_setup( } /** rct2: 0x008AB120 */ -static void junior_rc_left_half_banked_helix_up_large_paint_setup( +static void JuniorRCLeftHalfBankedHelixUpLargePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3814,12 +3816,11 @@ static void junior_rc_left_half_banked_helix_up_large_paint_setup( direction &= 3; } trackSequence = junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_half_banked_helix_down_large_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightHalfBankedHelixDownLargePaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x008AB140 */ -static void junior_rc_left_half_banked_helix_down_large_paint_setup( +static void JuniorRCLeftHalfBankedHelixDownLargePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3830,14 +3831,13 @@ static void junior_rc_left_half_banked_helix_down_large_paint_setup( direction &= 3; } trackSequence = junior_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; - junior_rc_right_half_banked_helix_up_large_paint_setup( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + JuniorRCRightHalfBankedHelixUpLargePaintSetup(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** * rct2: 0x008AAF00, 0x0051851C, 0x005185D8 */ -static void junior_rc_brake_paint_setup( +static void JuniorRCBrakePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3857,7 +3857,7 @@ static void junior_rc_brake_paint_setup( PaintUtilPushTunnelLeft(session, height, TUNNEL_0); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3871,13 +3871,13 @@ static void junior_rc_brake_paint_setup( /** * rct2: 0x008AB280, 0x00518694, 0x00518759 */ -static void junior_rc_block_brake_paint_setup( +static void JuniorRCBlockBrakePaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { ImageId image_id; - bool isBraked = trackElement.BlockBrakeClosed(); + bool isBraked = trackElement.IsBrakeClosed(); image_id = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_block_brake[isBraked][direction]); if (direction & 1) @@ -3893,7 +3893,7 @@ static void junior_rc_block_brake_paint_setup( PaintUtilPushTunnelLeft(session, height, TUNNEL_0); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { int32_t edi = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, edi, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3905,11 +3905,11 @@ static void junior_rc_block_brake_paint_setup( } /** rct2: 0x008AAF80 */ -static void junior_rc_left_eighth_to_diag_paint_setup( +static void JuniorRCLeftEighthToDiagPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_eighth_to_diag_tiles_paint( + TrackPaintUtilEighthToDiagTilesPaint( session, defaultEighthToDiagThickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_left_eight_to_diag, nullptr, defaultLeftEighthToDiagBoundLengths, defaultLeftEighthToDiagBoundOffsets); @@ -3967,11 +3967,11 @@ static void junior_rc_left_eighth_to_diag_paint_setup( } /** rct2: 0x008AAF90 */ -static void junior_rc_right_eighth_to_diag_paint_setup( +static void JuniorRCRightEighthToDiagPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_eighth_to_diag_tiles_paint( + TrackPaintUtilEighthToDiagTilesPaint( session, defaultEighthToDiagThickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_eight_to_diag, nullptr, defaultRightEighthToDiagBoundLengths, defaultRightEighthToDiagBoundOffsets); @@ -4029,23 +4029,23 @@ static void junior_rc_right_eighth_to_diag_paint_setup( } /** rct2: 0x008AAFA0 */ -static void junior_rc_left_eighth_to_orthogonal_paint_setup( +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]; - junior_rc_right_eighth_to_diag_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCRightEighthToDiagPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AAFB0 */ -static void junior_rc_right_eighth_to_orthogonal_paint_setup( +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]; - junior_rc_left_eighth_to_diag_paint_setup(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + JuniorRCLeftEighthToDiagPaintSetup(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } static constexpr const CoordsXY junior_rc_left_eighth_to_diag_bank_bound_lengths[4][4] = { @@ -4130,11 +4130,11 @@ static constexpr const int8_t junior_rc_left_eighth_to_diag_bank_thickness[4][4] }; /** rct2: 0x008AB160 */ -static void junior_rc_left_eighth_to_diag_bank_paint_setup( +static void JuniorRCLeftEighthToDiagBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_eighth_to_diag_tiles_paint( + TrackPaintUtilEighthToDiagTilesPaint( session, junior_rc_left_eighth_to_diag_bank_thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_left_eight_to_diag_bank, nullptr, junior_rc_left_eighth_to_diag_bank_bound_lengths, junior_rc_left_eighth_to_diag_bank_bound_offsets); @@ -4273,11 +4273,11 @@ static constexpr const int8_t junior_rc_right_eighth_to_diag_bank_thickness[4][4 }; /** rct2: 0x008AB170 */ -static void junior_rc_right_eighth_to_diag_bank_paint_setup( +static void JuniorRCRightEighthToDiagBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_eighth_to_diag_tiles_paint( + TrackPaintUtilEighthToDiagTilesPaint( session, junior_rc_right_eighth_to_diag_bank_thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_right_eight_to_diag_bank, nullptr, junior_rc_right_eighth_to_diag_bank_bound_lengths, junior_rc_right_eighth_to_diag_bank_bound_offsets); @@ -4335,23 +4335,23 @@ static void junior_rc_right_eighth_to_diag_bank_paint_setup( } /** rct2: 0x008AB180 */ -static void junior_rc_left_eighth_to_orthogonal_bank_paint_setup( +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]; - junior_rc_right_eighth_to_diag_bank_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRCRightEighthToDiagBankPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AB190 */ -static void junior_rc_right_eighth_to_orthogonal_bank_paint_setup( +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]; - junior_rc_left_eighth_to_diag_bank_paint_setup(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + JuniorRCLeftEighthToDiagBankPaintSetup(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } static constexpr const int32_t junior_rc_diag_blocked_segments[] = { @@ -4368,11 +4368,11 @@ static constexpr const uint8_t junior_rc_diag_support_segment[] = { 3, }; -void junior_rc_paint_track_diag_flat( +void JuniorRCPaintTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4388,11 +4388,11 @@ void junior_rc_paint_track_diag_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -void junior_rc_paint_track_diag_25_deg_up( +void JuniorRCPaintTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_up[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4408,11 +4408,11 @@ void junior_rc_paint_track_diag_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -void junior_rc_paint_track_diag_flat_to_25_deg_up( +void JuniorRCPaintTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat_to_25_deg_up[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4429,14 +4429,14 @@ void junior_rc_paint_track_diag_flat_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -void junior_rc_paint_track_diag_flat_to_60_deg_up( +void JuniorRCPaintTrackDiagFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { // There is no specific chain for the Water Coaster, use the Junior RC chain instead - chainType = std::min(JuniorRcChainType::FrictionWheels, chainType); + chainType = std::min(JuniorRCChainType::FrictionWheels, chainType); - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat_to_60_deg_up[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4453,11 +4453,11 @@ void junior_rc_paint_track_diag_flat_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); } -void junior_rc_paint_track_diag_25_deg_up_to_flat( +void JuniorRCPaintTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_up_to_flat[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4474,14 +4474,14 @@ void junior_rc_paint_track_diag_25_deg_up_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -void junior_rc_paint_track_diag_60_deg_up_to_flat( +void JuniorRCPaintTrackDiag60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { // There is no specific chain for the Water Coaster, use the Junior RC chain instead - chainType = std::min(JuniorRcChainType::FrictionWheels, chainType); + chainType = std::min(JuniorRCChainType::FrictionWheels, chainType); - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_60_deg_up_to_flat[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4498,11 +4498,11 @@ void junior_rc_paint_track_diag_60_deg_up_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); } -void junior_rc_paint_track_diag_25_deg_down( +void JuniorRCPaintTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_down[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4519,11 +4519,11 @@ void junior_rc_paint_track_diag_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -void junior_rc_paint_track_diag_flat_to_25_deg_down( +void JuniorRCPaintTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat_to_25_deg_down[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4540,14 +4540,14 @@ void junior_rc_paint_track_diag_flat_to_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -void junior_rc_paint_track_diag_flat_to_60_deg_down( +void JuniorRCPaintTrackDiagFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { // There is no specific chain for the Water Coaster, use the Junior RC chain instead - chainType = std::min(JuniorRcChainType::FrictionWheels, chainType); + chainType = std::min(JuniorRCChainType::FrictionWheels, chainType); - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat_to_60_deg_down[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4564,11 +4564,11 @@ void junior_rc_paint_track_diag_flat_to_60_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -void junior_rc_paint_track_diag_25_deg_down_to_flat( +void JuniorRCPaintTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_down_to_flat[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4585,14 +4585,14 @@ void junior_rc_paint_track_diag_25_deg_down_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -void junior_rc_paint_track_diag_60_deg_down_to_flat( +void JuniorRCPaintTrackDiag60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { // There is no specific chain for the Water Coaster, use the Junior RC chain instead - chainType = std::min(JuniorRcChainType::FrictionWheels, chainType); + chainType = std::min(JuniorRCChainType::FrictionWheels, chainType); - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_60_deg_down_to_flat[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4610,128 +4610,128 @@ void junior_rc_paint_track_diag_60_deg_down_to_flat( } /** rct2: 0x008AAF10 */ -static void junior_rc_diag_flat_paint_setup( +static void JuniorRCDiagFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat( + JuniorRCPaintTrackDiagFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAF40 */ -static void junior_rc_diag_25_deg_up_paint_setup( +static void JuniorRCDiag25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_up( + JuniorRCPaintTrackDiag25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAF20 */ -static void junior_rc_diag_flat_to_25_deg_up_paint_setup( +static void JuniorRCDiagFlatTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat_to_25_deg_up( + JuniorRCPaintTrackDiagFlatTo25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_flat_to_60_deg_up_paint_setup( +static void JuniorRCDiagFlatTo60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat_to_60_deg_up( + JuniorRCPaintTrackDiagFlatTo60DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAF30 */ -static void junior_rc_diag_25_deg_up_to_flat_paint_setup( +static void JuniorRCDiag25DegUpToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_up_to_flat( + JuniorRCPaintTrackDiag25DegUpToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_60_deg_up_to_flat_paint_setup( +static void JuniorRCDiag60DegUpToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_60_deg_up_to_flat( + JuniorRCPaintTrackDiag60DegUpToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAF70 */ -static void junior_rc_diag_25_deg_down_paint_setup( +static void JuniorRCDiag25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_down( + JuniorRCPaintTrackDiag25DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAF50 */ -static void junior_rc_diag_flat_to_25_deg_down_paint_setup( +static void JuniorRCDiagFlatTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat_to_25_deg_down( + JuniorRCPaintTrackDiagFlatTo25DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_flat_to_60_deg_down_paint_setup( +static void JuniorRCDiagFlatTo60DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat_to_60_deg_down( + JuniorRCPaintTrackDiagFlatTo60DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AAF60 */ -static void junior_rc_diag_25_deg_down_to_flat_paint_setup( +static void JuniorRCDiag25DegDownToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_down_to_flat( + JuniorRCPaintTrackDiag25DegDownToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_60_deg_down_to_flat_paint_setup( +static void JuniorRCDiag60DegDownToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_60_deg_down_to_flat( + JuniorRCPaintTrackDiag60DegDownToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /** rct2: 0x008AB1C0 */ -static void junior_rc_diag_flat_to_left_bank_paint_setup( +static void JuniorRCDiagFlatToLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat_to_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4754,11 +4754,11 @@ static void junior_rc_diag_flat_to_left_bank_paint_setup( } /** rct2: 0x008AB1D0 */ -static void junior_rc_diag_flat_to_right_bank_paint_setup( +static void JuniorRCDiagFlatToRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_flat_to_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4781,11 +4781,11 @@ static void junior_rc_diag_flat_to_right_bank_paint_setup( } /** rct2: 0x008AB1E0 */ -static void junior_rc_diag_left_bank_to_flat_paint_setup( +static void JuniorRCDiagLeftBankToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_left_bank_to_flat, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4808,11 +4808,11 @@ static void junior_rc_diag_left_bank_to_flat_paint_setup( } /** rct2: 0x008AB1F0 */ -static void junior_rc_diag_right_bank_to_flat_paint_setup( +static void JuniorRCDiagRightBankToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_right_bank_to_flat, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4835,11 +4835,11 @@ static void junior_rc_diag_right_bank_to_flat_paint_setup( } /** rct2: 0x008AB220 */ -static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup( +static void JuniorRCDiagLeftBankTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_left_bank_to_25_deg_up, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4862,11 +4862,11 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup( } /** rct2: 0x008AB230 */ -static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup( +static void JuniorRCDiagRightBankTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_right_bank_to_25_deg_up, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4889,11 +4889,11 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup( } /** rct2: 0x008AB200 */ -static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup( +static void JuniorRCDiag25DegUpToLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_up_to_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4916,11 +4916,11 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup( } /** rct2: 0x008AB210 */ -static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup( +static void JuniorRCDiag25DegUpToRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_up_to_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4943,11 +4943,11 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup( } /** rct2: 0x008AB200 */ -static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup( +static void JuniorRCDiagLeftBankTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_left_bank_to_25_deg_down, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4970,11 +4970,11 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup( } /** rct2: 0x008AB210 */ -static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup( +static void JuniorRCDiagRightBankTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_right_bank_to_25_deg_down, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -4997,11 +4997,11 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup( } /** rct2: 0x008AB220 */ -static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup( +static void JuniorRCDiag25DegDownToLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_down_to_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5024,11 +5024,11 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup( } /** rct2: 0x008AB230 */ -static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup( +static void JuniorRCDiag25DegDownToRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_down_to_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5065,12 +5065,12 @@ static constexpr const CoordsXYZ junior_rc_diag_right_bank_bound_offsets[4] = { }; /** rct2: 0x008AB1A0 */ -static void junior_rc_diag_left_bank_paint_setup( +static void JuniorRCDiagLeftBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { uint8_t thickness = direction == 0 ? 0 : 1; - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_left_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, junior_rc_diag_left_bank_bound_offsets); @@ -5088,12 +5088,12 @@ static void junior_rc_diag_left_bank_paint_setup( } /** rct2: 0x008AB1B0 */ -static void junior_rc_diag_right_bank_paint_setup( +static void JuniorRCDiagRightBankPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { uint8_t thickness = direction == 2 ? 0 : 1; - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, thickness, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_right_bank, defaultDiagTileOffsets, defaultDiagBoundLengths, junior_rc_diag_right_bank_bound_offsets); @@ -5138,9 +5138,9 @@ static constexpr const CoordsXY junior_rc_60_deg_up_bound_lengths[4] = { { 20, 32 }, }; -void junior_rc_paint_track_60_deg_up( +void JuniorRCPaintTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto image_id = session.TrackColours[SCHEME_TRACK].WithIndex( junior_rc_track_pieces_60_deg_up[EnumValue(chainType)][direction]); @@ -5167,10 +5167,10 @@ void junior_rc_paint_track_60_deg_up( } static constexpr int8_t support[4] = { 35, 29, 25, 32 }; - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction], height, + session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction & 3], height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5179,21 +5179,21 @@ void junior_rc_paint_track_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -static void junior_rc_60_deg_up_paint_setup( +static void JuniorRC60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_60_deg_up( + JuniorRCPaintTrack60DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_60_deg_down_paint_setup( +static void JuniorRC60DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_60_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRC60DegUpPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } static constexpr const CoordsXY junior_rc_25_deg_up_to_60_deg_up_bound_lengths[4][2] = { @@ -5217,9 +5217,9 @@ static constexpr const CoordsXY junior_rc_25_deg_up_to_60_deg_up_bound_offsets[4 { { 6, 0 }, { 0, 0 } }, }; -void junior_rc_paint_track_25_deg_up_to_60_deg_up( +void JuniorRCPaintTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto image_id = session.TrackColours[SCHEME_TRACK].WithIndex( junior_rc_track_pieces_25_deg_up_to_60_deg_up[EnumValue(chainType)][direction][0]); @@ -5259,10 +5259,10 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( } static constexpr int8_t support[4] = { 12, 12, 12, 14 }; - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( - session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction], height, + session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction & 3], height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5271,26 +5271,26 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void junior_rc_25_deg_up_to_60_deg_up_paint_setup( +static void JuniorRC25DegUpTo60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_25_deg_up_to_60_deg_up( + JuniorRCPaintTrack25DegUpTo60DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_60_deg_down_to_25_deg_down_paint_setup( +static void JuniorRC60DegDownTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_25_deg_up_to_60_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRC25DegUpTo60DegUpPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -void junior_rc_paint_track_60_deg_up_to_25_deg_up( +void JuniorRCPaintTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { auto image_id = session.TrackColours[SCHEME_TRACK].WithIndex( junior_rc_track_pieces_60_deg_up_to_25_deg_up[EnumValue(chainType)][direction][0]); @@ -5329,7 +5329,7 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 20, height, @@ -5341,28 +5341,28 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void junior_rc_60_deg_up_to_25_deg_up_paint_setup( +static void JuniorRC60DegUpTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_60_deg_up_to_25_deg_up( + JuniorRCPaintTrack60DegUpTo25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_25_deg_down_to_60_deg_down_paint_setup( +static void JuniorRC25DegDownTo60DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_60_deg_up_to_25_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + JuniorRC60DegUpTo25DegUpPaintSetup(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -void junior_rc_paint_track_diag_60_deg_up( +void JuniorRCPaintTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_60_deg_up[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5378,11 +5378,11 @@ void junior_rc_paint_track_diag_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -void junior_rc_paint_track_diag_60_deg_down( +void JuniorRCPaintTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_60_deg_down[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5399,11 +5399,11 @@ void junior_rc_paint_track_diag_60_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( +void JuniorRCPaintTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_up_to_60_deg_up[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5420,9 +5420,9 @@ void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( +void JuniorRCPaintTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { if (direction == 1 && trackSequence == 3) { @@ -5434,7 +5434,7 @@ void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( } else { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5452,9 +5452,9 @@ void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( +void JuniorRCPaintTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { if (direction == 3 && trackSequence == 0) { @@ -5466,7 +5466,7 @@ void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( } else { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5484,11 +5484,11 @@ void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( +void JuniorRCPaintTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType) + const TrackElement& trackElement, JuniorRCChainType chainType) { - track_paint_util_diag_tiles_paint( + TrackPaintUtilDiagTilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], junior_rc_track_pieces_diag_60_deg_down_to_25_deg_down[EnumValue(chainType)], defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr); @@ -5505,64 +5505,64 @@ void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void junior_rc_diag_60_deg_up_paint_setup( +static void JuniorRCDiag60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_60_deg_up( + JuniorRCPaintTrackDiag60DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_60_deg_down_paint_setup( +static void JuniorRCDiag60DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_60_deg_down( + JuniorRCPaintTrackDiag60DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_25_deg_up_to_60_deg_up_paint_setup( +static void JuniorRCDiag25DegUpTo60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( + JuniorRCPaintTrackDiag25DegUpTo60DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_60_deg_up_to_25_deg_up_paint_setup( +static void JuniorRCDiag60DegUpTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( + JuniorRCPaintTrackDiag60DegUpTo25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_25_deg_down_to_60_deg_down_paint_setup( +static void JuniorRCDiag25DegDownTo60DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( + JuniorRCPaintTrackDiag25DegDownTo60DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } -static void junior_rc_diag_60_deg_down_to_25_deg_down_paint_setup( +static void JuniorRCDiag60DegDownTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( + JuniorRCPaintTrackDiag60DegDownTo25DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } static constexpr const CoordsXY junior_rc_flat_to_60_deg_up_bound_lengths[4][2] = { @@ -5600,7 +5600,7 @@ static constexpr const CoordsXY junior_rc_60_deg_up_to_flat_tile_offsets[4][2] = { { 13, -9 }, { 0, 0 } }, }; -static void junior_rc_flat_to_60_deg_up_paint_setup( +static void JuniorRCFlatTo60DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5643,7 +5643,7 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( } static constexpr int8_t support[4] = { 12, 12, 12, 14 }; - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, support[direction], height - 7, @@ -5655,14 +5655,14 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void junior_rc_60_deg_down_to_flat_paint_setup( +static void JuniorRC60DegDownToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_flat_to_60_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + JuniorRCFlatTo60DegUpPaintSetup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void junior_rc_60_deg_up_to_flat_paint_setup( +static void JuniorRC60DegUpToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5704,7 +5704,7 @@ static void junior_rc_60_deg_up_to_flat_paint_setup( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK, 4, 20, height - 5, @@ -5716,90 +5716,90 @@ static void junior_rc_60_deg_up_to_flat_paint_setup( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void junior_rc_flat_to_60_deg_down_paint_setup( +static void JuniorRCFlatTo60DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_60_deg_up_to_flat_paint_setup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + JuniorRC60DegUpToFlatPaintSetup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /* rct2: 0x00518394 */ -static void junior_rc_flat_paint_setup( +static void JuniorRCFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_flat( + JuniorRCPaintTrackFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /* rct2: 0x00515629, 0x00514D22, 0x005151B9 */ -static void paint_junior_rc_station_track( +static void PaintJuniorRCStationTrack( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_station(session, ride, trackSequence, direction, height, trackElement, true); + JuniorRCPaintStation(session, ride, trackSequence, direction, height, trackElement, true); } /* rct2: 0x0051881E */ -static void junior_rc_25_deg_up_paint_setup( +static void JuniorRC25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_25_deg_up( + JuniorRCPaintTrack25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /* rct2: 0x00518B42 */ -static void junior_rc_flat_to_25_deg_up_paint_setup( +static void JuniorRCFlatTo25DegUpPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_flat_to_25_deg_up( + JuniorRCPaintTrackFlatTo25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /* rct2: 0x00518E56 */ -static void junior_rc_25_deg_up_to_flat_paint_setup( +static void JuniorRC25DegUpToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_25_deg_up_to_flat( + JuniorRCPaintTrack25DegUpToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::FrictionWheels : JuniorRcChainType::None); + isChained ? JuniorRCChainType::FrictionWheels : JuniorRCChainType::None); } /* rct2: 0x005189B0 */ -static void junior_rc_25_deg_down_paint_setup( +static void JuniorRC25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_25_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + JuniorRC25DegUpPaintSetup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /* rct2: 0x00518FE8 */ -static void junior_rc_flat_to_25_deg_down_paint_setup( +static void JuniorRCFlatTo25DegDownPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_25_deg_up_to_flat_paint_setup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + JuniorRC25DegUpToFlatPaintSetup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /* rct2: 0x00518CCC */ -static void junior_rc_25_deg_down_to_flat_paint_setup( +static void JuniorRC25DegDownToFlatPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_flat_to_25_deg_up_paint_setup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + JuniorRCFlatTo25DegUpPaintSetup(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void junior_rc_booster_paint_setup( +static void JuniorRCBoosterPaintSetup( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5820,7 +5820,7 @@ static void junior_rc_booster_paint_setup( PaintUtilPushTunnelLeft(session, height, TUNNEL_0); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { uint8_t supportType = (direction & 1) ? METAL_SUPPORTS_FORK_ALT : METAL_SUPPORTS_FORK; MetalASupportsPaintSetup(session, supportType, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5831,7 +5831,7 @@ static void junior_rc_booster_paint_setup( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void junior_rc_track_on_ride_photo( +static void JuniorRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5848,7 +5848,8 @@ static void junior_rc_track_on_ride_photo( session, METAL_SUPPORTS_FORK, 5, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 8, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + PaintAddImageAsParentRotated( + session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( @@ -5858,7 +5859,8 @@ static void junior_rc_track_on_ride_photo( session, METAL_SUPPORTS_FORK_ALT, 6, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + PaintAddImageAsParentRotated( + session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5868,7 +5870,8 @@ static void junior_rc_track_on_ride_photo( session, METAL_SUPPORTS_FORK, 5, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 8, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + PaintAddImageAsParentRotated( + session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( @@ -5878,236 +5881,237 @@ static void junior_rc_track_on_ride_photo( session, METAL_SUPPORTS_FORK_ALT, 6, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 6, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + PaintAddImageAsParentRotated( + session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3 + photoCameraOffset, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3 + photoCameraOffset, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48 + photoCameraOffset, 0x20); } /* 0x008AAA0C */ -TRACK_PAINT_FUNCTION get_track_paint_function_junior_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionJuniorRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return junior_rc_flat_paint_setup; + return JuniorRCFlatPaintSetup; case TrackElemType::EndStation: - return paint_junior_rc_station_track; + return PaintJuniorRCStationTrack; case TrackElemType::BeginStation: - return paint_junior_rc_station_track; + return PaintJuniorRCStationTrack; case TrackElemType::MiddleStation: - return paint_junior_rc_station_track; + return PaintJuniorRCStationTrack; case TrackElemType::Up25: - return junior_rc_25_deg_up_paint_setup; + return JuniorRC25DegUpPaintSetup; case TrackElemType::Up60: - return junior_rc_60_deg_up_paint_setup; + return JuniorRC60DegUpPaintSetup; case TrackElemType::FlatToUp25: - return junior_rc_flat_to_25_deg_up_paint_setup; + return JuniorRCFlatTo25DegUpPaintSetup; case TrackElemType::Up25ToUp60: - return junior_rc_25_deg_up_to_60_deg_up_paint_setup; + return JuniorRC25DegUpTo60DegUpPaintSetup; case TrackElemType::Up60ToUp25: - return junior_rc_60_deg_up_to_25_deg_up_paint_setup; + return JuniorRC60DegUpTo25DegUpPaintSetup; case TrackElemType::Up25ToFlat: - return junior_rc_25_deg_up_to_flat_paint_setup; + return JuniorRC25DegUpToFlatPaintSetup; case TrackElemType::Down25: - return junior_rc_25_deg_down_paint_setup; + return JuniorRC25DegDownPaintSetup; case TrackElemType::Down60: - return junior_rc_60_deg_down_paint_setup; + return JuniorRC60DegDownPaintSetup; case TrackElemType::FlatToDown25: - return junior_rc_flat_to_25_deg_down_paint_setup; + return JuniorRCFlatTo25DegDownPaintSetup; case TrackElemType::Down25ToDown60: - return junior_rc_25_deg_down_to_60_deg_down_paint_setup; + return JuniorRC25DegDownTo60DegDownPaintSetup; case TrackElemType::Down60ToDown25: - return junior_rc_60_deg_down_to_25_deg_down_paint_setup; + return JuniorRC60DegDownTo25DegDownPaintSetup; case TrackElemType::Down25ToFlat: - return junior_rc_25_deg_down_to_flat_paint_setup; + return JuniorRC25DegDownToFlatPaintSetup; case TrackElemType::LeftQuarterTurn5Tiles: - return junior_rc_left_quarter_turn_5_tiles_paint_setup; + return JuniorRCLeftQuarterTurn5TilesPaintSetup; case TrackElemType::RightQuarterTurn5Tiles: - return junior_rc_right_quarter_turn_5_tiles_paint_setup; + return JuniorRCRightQuarterTurn5TilesPaintSetup; case TrackElemType::FlatToLeftBank: - return junior_rc_flat_to_left_bank_paint_setup; + return JuniorRCFlatToLeftBankPaintSetup; case TrackElemType::FlatToRightBank: - return junior_rc_flat_to_right_bank_paint_setup; + return JuniorRCFlatToRightBankPaintSetup; case TrackElemType::LeftBankToFlat: - return junior_rc_left_bank_to_flat_paint_setup; + return JuniorRCLeftBankToFlatPaintSetup; case TrackElemType::RightBankToFlat: - return junior_rc_right_bank_to_flat_paint_setup; + return JuniorRCRightBankToFlatPaintSetup; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return junior_rc_banked_left_quarter_turn_5_tiles_paint_setup; + return JuniorRCBankedLeftQuarterTurn5TilesPaintSetup; case TrackElemType::BankedRightQuarterTurn5Tiles: - return junior_rc_banked_right_quarter_turn_5_tiles_paint_setup; + return JuniorRCBankedRightQuarterTurn5TilesPaintSetup; case TrackElemType::LeftBankToUp25: - return junior_rc_left_bank_to_25_deg_up_paint_setup; + return JuniorRCLeftBankTo25DegUpPaintSetup; case TrackElemType::RightBankToUp25: - return junior_rc_right_bank_to_25_deg_up_paint_setup; + return JuniorRCRightBankTo25DegUpPaintSetup; case TrackElemType::Up25ToLeftBank: - return junior_rc_25_deg_up_to_left_bank_paint_setup; + return JuniorRC25DegUpToLeftBankPaintSetup; case TrackElemType::Up25ToRightBank: - return junior_rc_25_deg_up_to_right_bank_paint_setup; + return JuniorRC25DegUpToRightBankPaintSetup; case TrackElemType::LeftBankToDown25: - return junior_rc_left_bank_to_25_deg_down_paint_setup; + return JuniorRCLeftBankTo25DegDownPaintSetup; case TrackElemType::RightBankToDown25: - return junior_rc_right_bank_to_25_deg_down_paint_setup; + return JuniorRCRightBankTo25DegDownPaintSetup; case TrackElemType::Down25ToLeftBank: - return junior_rc_25_deg_down_to_left_bank_paint_setup; + return JuniorRC25DegDownToLeftBankPaintSetup; case TrackElemType::Down25ToRightBank: - return junior_rc_25_deg_down_to_right_bank_paint_setup; + return JuniorRC25DegDownToRightBankPaintSetup; case TrackElemType::LeftBank: - return junior_rc_left_bank_paint_setup; + return JuniorRCLeftBankPaintSetup; case TrackElemType::RightBank: - return junior_rc_right_bank_paint_setup; + return JuniorRCRightBankPaintSetup; case TrackElemType::LeftQuarterTurn5TilesUp25: - return junior_rc_left_quarter_turn_5_tiles_25_deg_up_paint_setup; + return JuniorRCLeftQuarterTurn5Tiles25DegUpPaintSetup; case TrackElemType::RightQuarterTurn5TilesUp25: - return junior_rc_right_quarter_turn_5_tiles_25_deg_up_paint_setup; + return JuniorRCRightQuarterTurn5Tiles25DegUpPaintSetup; case TrackElemType::LeftQuarterTurn5TilesDown25: - return junior_rc_left_quarter_turn_5_tiles_25_deg_down_paint_setup; + return JuniorRCLeftQuarterTurn5Tiles25DegDownPaintSetup; case TrackElemType::RightQuarterTurn5TilesDown25: - return junior_rc_right_quarter_turn_5_tiles_25_deg_down_paint_setup; + return JuniorRCRightQuarterTurn5Tiles25DegDownPaintSetup; case TrackElemType::SBendLeft: - return junior_rc_s_bend_left_paint_setup; + return JuniorRCSBendLeftPaintSetup; case TrackElemType::SBendRight: - return junior_rc_s_bend_right_paint_setup; + return JuniorRCSBendRightPaintSetup; case TrackElemType::LeftQuarterTurn3Tiles: - return junior_rc_left_quarter_turn_3_tiles_paint_setup; + return JuniorRCLeftQuarterTurn3TilesPaintSetup; case TrackElemType::RightQuarterTurn3Tiles: - return junior_rc_right_quarter_turn_3_tiles_paint_setup; + return JuniorRCRightQuarterTurn3TilesPaintSetup; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return junior_rc_left_quarter_turn_3_tiles_bank_paint_setup; + return JuniorRCLeftQuarterTurn3TilesBankPaintSetup; case TrackElemType::RightBankedQuarterTurn3Tiles: - return junior_rc_right_quarter_turn_3_tiles_bank_paint_setup; + return JuniorRCRightQuarterTurn3TilesBankPaintSetup; case TrackElemType::LeftQuarterTurn3TilesUp25: - return junior_rc_left_quarter_turn_3_tiles_25_deg_up_paint_setup; + return JuniorRCLeftQuarterTurn3Tiles25DegUpPaintSetup; case TrackElemType::RightQuarterTurn3TilesUp25: - return junior_rc_right_quarter_turn_3_tiles_25_deg_up_paint_setup; + return JuniorRCRightQuarterTurn3Tiles25DegUpPaintSetup; case TrackElemType::LeftQuarterTurn3TilesDown25: - return junior_rc_left_quarter_turn_3_tiles_25_deg_down_paint_setup; + return JuniorRCLeftQuarterTurn3Tiles25DegDownPaintSetup; case TrackElemType::RightQuarterTurn3TilesDown25: - return junior_rc_right_quarter_turn_3_tiles_25_deg_down_paint_setup; + return JuniorRCRightQuarterTurn3Tiles25DegDownPaintSetup; case TrackElemType::FlatToUp60: - return junior_rc_flat_to_60_deg_up_paint_setup; + return JuniorRCFlatTo60DegUpPaintSetup; case TrackElemType::Up60ToFlat: - return junior_rc_60_deg_up_to_flat_paint_setup; + return JuniorRC60DegUpToFlatPaintSetup; case TrackElemType::FlatToDown60: - return junior_rc_flat_to_60_deg_down_paint_setup; + return JuniorRCFlatTo60DegDownPaintSetup; case TrackElemType::Down60ToFlat: - return junior_rc_60_deg_down_to_flat_paint_setup; + return JuniorRC60DegDownToFlatPaintSetup; case TrackElemType::LeftHalfBankedHelixUpSmall: - return junior_rc_left_half_banked_helix_up_small_paint_setup; + return JuniorRCLeftHalfBankedHelixUpSmallPaintSetup; case TrackElemType::RightHalfBankedHelixUpSmall: - return junior_rc_right_half_banked_helix_up_small_paint_setup; + return JuniorRCRightHalfBankedHelixUpSmallPaintSetup; case TrackElemType::LeftHalfBankedHelixDownSmall: - return junior_rc_left_half_banked_helix_down_small_paint_setup; + return JuniorRCLeftHalfBankedHelixDownSmallPaintSetup; case TrackElemType::RightHalfBankedHelixDownSmall: - return junior_rc_right_half_banked_helix_down_small_paint_setup; + return JuniorRCRightHalfBankedHelixDownSmallPaintSetup; case TrackElemType::LeftHalfBankedHelixUpLarge: - return junior_rc_left_half_banked_helix_up_large_paint_setup; + return JuniorRCLeftHalfBankedHelixUpLargePaintSetup; case TrackElemType::RightHalfBankedHelixUpLarge: - return junior_rc_right_half_banked_helix_up_large_paint_setup; + return JuniorRCRightHalfBankedHelixUpLargePaintSetup; case TrackElemType::LeftHalfBankedHelixDownLarge: - return junior_rc_left_half_banked_helix_down_large_paint_setup; + return JuniorRCLeftHalfBankedHelixDownLargePaintSetup; case TrackElemType::RightHalfBankedHelixDownLarge: - return junior_rc_right_half_banked_helix_down_large_paint_setup; + return JuniorRCRightHalfBankedHelixDownLargePaintSetup; case TrackElemType::Brakes: - return junior_rc_brake_paint_setup; + return JuniorRCBrakePaintSetup; case TrackElemType::LeftEighthToDiag: - return junior_rc_left_eighth_to_diag_paint_setup; + return JuniorRCLeftEighthToDiagPaintSetup; case TrackElemType::RightEighthToDiag: - return junior_rc_right_eighth_to_diag_paint_setup; + return JuniorRCRightEighthToDiagPaintSetup; case TrackElemType::LeftEighthToOrthogonal: - return junior_rc_left_eighth_to_orthogonal_paint_setup; + return JuniorRCLeftEighthToOrthogonalPaintSetup; case TrackElemType::RightEighthToOrthogonal: - return junior_rc_right_eighth_to_orthogonal_paint_setup; + return JuniorRCRightEighthToOrthogonalPaintSetup; case TrackElemType::LeftEighthBankToDiag: - return junior_rc_left_eighth_to_diag_bank_paint_setup; + return JuniorRCLeftEighthToDiagBankPaintSetup; case TrackElemType::RightEighthBankToDiag: - return junior_rc_right_eighth_to_diag_bank_paint_setup; + return JuniorRCRightEighthToDiagBankPaintSetup; case TrackElemType::LeftEighthBankToOrthogonal: - return junior_rc_left_eighth_to_orthogonal_bank_paint_setup; + return JuniorRCLeftEighthToOrthogonalBankPaintSetup; case TrackElemType::RightEighthBankToOrthogonal: - return junior_rc_right_eighth_to_orthogonal_bank_paint_setup; + return JuniorRCRightEighthToOrthogonalBankPaintSetup; case TrackElemType::DiagFlat: - return junior_rc_diag_flat_paint_setup; + return JuniorRCDiagFlatPaintSetup; case TrackElemType::DiagUp25: - return junior_rc_diag_25_deg_up_paint_setup; + return JuniorRCDiag25DegUpPaintSetup; case TrackElemType::DiagUp60: - return junior_rc_diag_60_deg_up_paint_setup; + return JuniorRCDiag60DegUpPaintSetup; case TrackElemType::DiagFlatToUp25: - return junior_rc_diag_flat_to_25_deg_up_paint_setup; + return JuniorRCDiagFlatTo25DegUpPaintSetup; case TrackElemType::DiagUp25ToUp60: - return junior_rc_diag_25_deg_up_to_60_deg_up_paint_setup; + return JuniorRCDiag25DegUpTo60DegUpPaintSetup; case TrackElemType::DiagUp60ToUp25: - return junior_rc_diag_60_deg_up_to_25_deg_up_paint_setup; + return JuniorRCDiag60DegUpTo25DegUpPaintSetup; case TrackElemType::DiagUp25ToFlat: - return junior_rc_diag_25_deg_up_to_flat_paint_setup; + return JuniorRCDiag25DegUpToFlatPaintSetup; case TrackElemType::DiagDown25: - return junior_rc_diag_25_deg_down_paint_setup; + return JuniorRCDiag25DegDownPaintSetup; case TrackElemType::DiagDown60: - return junior_rc_diag_60_deg_down_paint_setup; + return JuniorRCDiag60DegDownPaintSetup; case TrackElemType::DiagFlatToDown25: - return junior_rc_diag_flat_to_25_deg_down_paint_setup; + return JuniorRCDiagFlatTo25DegDownPaintSetup; case TrackElemType::DiagDown25ToDown60: - return junior_rc_diag_25_deg_down_to_60_deg_down_paint_setup; + return JuniorRCDiag25DegDownTo60DegDownPaintSetup; case TrackElemType::DiagDown60ToDown25: - return junior_rc_diag_60_deg_down_to_25_deg_down_paint_setup; + return JuniorRCDiag60DegDownTo25DegDownPaintSetup; case TrackElemType::DiagDown25ToFlat: - return junior_rc_diag_25_deg_down_to_flat_paint_setup; + return JuniorRCDiag25DegDownToFlatPaintSetup; case TrackElemType::DiagFlatToLeftBank: - return junior_rc_diag_flat_to_left_bank_paint_setup; + return JuniorRCDiagFlatToLeftBankPaintSetup; case TrackElemType::DiagFlatToRightBank: - return junior_rc_diag_flat_to_right_bank_paint_setup; + return JuniorRCDiagFlatToRightBankPaintSetup; case TrackElemType::DiagLeftBankToFlat: - return junior_rc_diag_left_bank_to_flat_paint_setup; + return JuniorRCDiagLeftBankToFlatPaintSetup; case TrackElemType::DiagRightBankToFlat: - return junior_rc_diag_right_bank_to_flat_paint_setup; + return JuniorRCDiagRightBankToFlatPaintSetup; case TrackElemType::DiagLeftBankToUp25: - return junior_rc_diag_left_bank_to_25_deg_up_paint_setup; + return JuniorRCDiagLeftBankTo25DegUpPaintSetup; case TrackElemType::DiagRightBankToUp25: - return junior_rc_diag_right_bank_to_25_deg_up_paint_setup; + return JuniorRCDiagRightBankTo25DegUpPaintSetup; case TrackElemType::DiagUp25ToLeftBank: - return junior_rc_diag_25_deg_up_to_left_bank_paint_setup; + return JuniorRCDiag25DegUpToLeftBankPaintSetup; case TrackElemType::DiagUp25ToRightBank: - return junior_rc_diag_25_deg_up_to_right_bank_paint_setup; + return JuniorRCDiag25DegUpToRightBankPaintSetup; case TrackElemType::DiagLeftBankToDown25: - return junior_rc_diag_left_bank_to_25_deg_down_paint_setup; + return JuniorRCDiagLeftBankTo25DegDownPaintSetup; case TrackElemType::DiagRightBankToDown25: - return junior_rc_diag_right_bank_to_25_deg_down_paint_setup; + return JuniorRCDiagRightBankTo25DegDownPaintSetup; case TrackElemType::DiagDown25ToLeftBank: - return junior_rc_diag_25_deg_down_to_left_bank_paint_setup; + return JuniorRCDiag25DegDownToLeftBankPaintSetup; case TrackElemType::DiagDown25ToRightBank: - return junior_rc_diag_25_deg_down_to_right_bank_paint_setup; + return JuniorRCDiag25DegDownToRightBankPaintSetup; case TrackElemType::DiagLeftBank: - return junior_rc_diag_left_bank_paint_setup; + return JuniorRCDiagLeftBankPaintSetup; case TrackElemType::DiagRightBank: - return junior_rc_diag_right_bank_paint_setup; + return JuniorRCDiagRightBankPaintSetup; case TrackElemType::BlockBrakes: - return junior_rc_block_brake_paint_setup; + return JuniorRCBlockBrakePaintSetup; case TrackElemType::Booster: - return junior_rc_booster_paint_setup; + return JuniorRCBoosterPaintSetup; case TrackElemType::DiagDown60ToFlat: - return junior_rc_diag_60_deg_down_to_flat_paint_setup; + return JuniorRCDiag60DegDownToFlatPaintSetup; case TrackElemType::DiagUp60ToFlat: - return junior_rc_diag_60_deg_up_to_flat_paint_setup; + return JuniorRCDiag60DegUpToFlatPaintSetup; case TrackElemType::DiagFlatToUp60: - return junior_rc_diag_flat_to_60_deg_up_paint_setup; + return JuniorRCDiagFlatTo60DegUpPaintSetup; case TrackElemType::DiagFlatToDown60: - return junior_rc_diag_flat_to_60_deg_down_paint_setup; + return JuniorRCDiagFlatTo60DegDownPaintSetup; case TrackElemType::OnRidePhoto: - return junior_rc_track_on_ride_photo; + return JuniorRCTrackOnRidePhoto; } return nullptr; } diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.h b/src/openrct2/ride/coaster/JuniorRollerCoaster.h index 91c541587a..064601c9b6 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.h +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,7 +11,7 @@ #include "../../common.h" -enum class JuniorRcChainType : uint8_t +enum class JuniorRCChainType : uint8_t { None, FrictionWheels, @@ -22,94 +22,94 @@ struct Ride; struct PaintSession; struct TrackElement; -void junior_rc_paint_station( +void JuniorRCPaintStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, const TrackElement& trackElement, bool drawBlockBrake); -void junior_rc_paint_track_flat( +void JuniorRCPaintTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_60_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_flat_to_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_25_deg_up_to_60_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_60_deg_up_to_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_25_deg_up_to_flat( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); + const TrackElement& trackElement, JuniorRCChainType chainType); -void junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( +void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); + const TrackElement& trackElement, JuniorRCChainType chainType); -void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( +void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); + const TrackElement& trackElement, JuniorRCChainType chainType); -void junior_rc_paint_track_diag_flat( +void JuniorRCPaintTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_60_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_flat_to_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_flat_to_60_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiagFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_25_deg_up_to_flat( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_60_deg_up_to_flat( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_25_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_60_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_flat_to_25_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_flat_to_60_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiagFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_25_deg_down_to_flat( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); -void junior_rc_paint_track_diag_60_deg_down_to_flat( + const TrackElement& trackElement, JuniorRCChainType chainType); +void JuniorRCPaintTrackDiag60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height, - const TrackElement& trackElement, JuniorRcChainType chainType); + const TrackElement& trackElement, JuniorRCChainType chainType); diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp index ccff695f19..5b9ac440cc 100644 --- a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x0082491C */ -static void lay_down_rc_track_flat( +static void LayDownRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -32,25 +32,25 @@ static void lay_down_rc_track_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16226), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16227), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16228), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16229), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -64,16 +64,16 @@ static void lay_down_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -94,13 +94,13 @@ static void lay_down_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26557), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26558), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } } @@ -112,20 +112,20 @@ static void lay_down_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -137,7 +137,7 @@ static void lay_down_rc_track_flat( } /** rct2: 0x00824B8C, 0x00824B9C, 0x00824BAC */ -static void lay_down_rc_track_station( +static void LayDownRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -152,15 +152,15 @@ static void lay_down_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); } else @@ -176,19 +176,19 @@ static void lay_down_rc_track_station( { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -196,7 +196,7 @@ static void lay_down_rc_track_station( } /** rct2: 0x0082492C */ -static void lay_down_rc_track_25_deg_up( +static void LayDownRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -209,25 +209,25 @@ static void lay_down_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16314), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16315), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16316), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16317), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -240,25 +240,25 @@ static void lay_down_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16286), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16287), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16288), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16289), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -285,22 +285,22 @@ static void lay_down_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26621), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26622), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26623), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26624), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } } @@ -311,29 +311,29 @@ static void lay_down_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26569), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26570), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26571), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26572), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -369,7 +369,7 @@ static void lay_down_rc_track_25_deg_up( } /** rct2: 0x0082493C */ -static void lay_down_rc_track_60_deg_up( +static void LayDownRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -382,25 +382,25 @@ static void lay_down_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16330), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16331), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16332), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16333), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -413,25 +413,25 @@ static void lay_down_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16302), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16303), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16304), { 0, 0, height }, - { 32, 1, 98 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16305), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -456,22 +456,22 @@ static void lay_down_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26585), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26586), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26587), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26588), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -489,7 +489,7 @@ static void lay_down_rc_track_60_deg_up( } /** rct2: 0x0082494C */ -static void lay_down_rc_track_flat_to_25_deg_up( +static void LayDownRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -502,25 +502,25 @@ static void lay_down_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16306), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16307), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16308), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16309), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -533,25 +533,25 @@ static void lay_down_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16278), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16279), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16280), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16281), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -578,22 +578,22 @@ static void lay_down_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26613), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26614), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26615), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26616), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } @@ -604,29 +604,29 @@ static void lay_down_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26561), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26562), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26563), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26564), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -662,7 +662,7 @@ static void lay_down_rc_track_flat_to_25_deg_up( } /** rct2: 0x0082495C */ -static void lay_down_rc_track_25_deg_up_to_60_deg_up( +static void LayDownRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -675,31 +675,31 @@ static void lay_down_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16318), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16319), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16322), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16320), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16323), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16321), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -712,31 +712,31 @@ static void lay_down_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16290), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16291), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16294), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16292), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16295), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16293), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -761,28 +761,28 @@ static void lay_down_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26573), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26577), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26574), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26578), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26575), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26576), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -800,7 +800,7 @@ static void lay_down_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x0082496C */ -static void lay_down_rc_track_60_deg_up_to_25_deg_up( +static void LayDownRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -813,31 +813,31 @@ static void lay_down_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16324), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16325), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16328), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16326), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16329), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16327), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -850,31 +850,31 @@ static void lay_down_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16296), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16297), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16300), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16298), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16301), { 0, 0, height }, - { 32, 1, 66 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16299), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -899,34 +899,34 @@ static void lay_down_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26579), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26583), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26580), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26584), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26581), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26582), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -962,7 +962,7 @@ static void lay_down_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x0082497C */ -static void lay_down_rc_track_25_deg_up_to_flat( +static void LayDownRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -975,25 +975,25 @@ static void lay_down_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16310), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16311), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16312), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16313), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1006,25 +1006,25 @@ static void lay_down_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16282), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16283), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16284), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16285), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1051,22 +1051,22 @@ static void lay_down_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26617), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26618), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26619), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26620), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } @@ -1077,29 +1077,29 @@ static void lay_down_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26565), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26566), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26567), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26568), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -1135,55 +1135,55 @@ static void lay_down_rc_track_25_deg_up_to_flat( } /** rct2: 0x0082498C */ -static void lay_down_rc_track_25_deg_down( +static void LayDownRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0082499C */ -static void lay_down_rc_track_60_deg_down( +static void LayDownRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008249AC */ -static void lay_down_rc_track_flat_to_25_deg_down( +static void LayDownRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008249BC */ -static void lay_down_rc_track_25_deg_down_to_60_deg_down( +static void LayDownRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008249CC */ -static void lay_down_rc_track_60_deg_down_to_25_deg_down( +static void LayDownRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008249DC */ -static void lay_down_rc_track_25_deg_down_to_flat( +static void LayDownRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008249EC */ -static void lay_down_rc_track_left_quarter_turn_5( +static void LayDownRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1197,22 +1197,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16343), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16348), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16353), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16338), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -1234,22 +1234,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16342), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16347), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16352), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16337), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1265,22 +1265,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16341), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16346), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16351), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16336), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1296,22 +1296,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16340), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16345), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16350), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16335), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1327,22 +1327,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16339), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16344), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16349), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16334), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -1372,22 +1372,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26694), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26699), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26704), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26689), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1412,22 +1412,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26693), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26698), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26703), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26688), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1443,22 +1443,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26692), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26697), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26702), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26687), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1474,22 +1474,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26691), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26696), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26701), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26686), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1505,22 +1505,22 @@ static void lay_down_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26690), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26695), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26700), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26685), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -1546,16 +1546,16 @@ static void lay_down_rc_track_left_quarter_turn_5( } /** rct2: 0x008249FC */ -static void lay_down_rc_track_right_quarter_turn_5( +static void LayDownRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - lay_down_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824A0C */ -static void lay_down_rc_track_flat_to_left_bank( +static void LayDownRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1565,32 +1565,32 @@ static void lay_down_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1607,22 +1607,22 @@ static void lay_down_rc_track_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26657), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26658), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26659), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26660), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1630,7 +1630,7 @@ static void lay_down_rc_track_flat_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -1642,7 +1642,7 @@ static void lay_down_rc_track_flat_to_left_bank( } /** rct2: 0x00824A1C */ -static void lay_down_rc_track_flat_to_right_bank( +static void LayDownRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1652,32 +1652,32 @@ static void lay_down_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1694,22 +1694,22 @@ static void lay_down_rc_track_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26661), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26662), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26663), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26664), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1717,7 +1717,7 @@ static void lay_down_rc_track_flat_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -1729,7 +1729,7 @@ static void lay_down_rc_track_flat_to_right_bank( } /** rct2: 0x00824A2C */ -static void lay_down_rc_track_left_bank_to_flat( +static void LayDownRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1739,32 +1739,32 @@ static void lay_down_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16244), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16248), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16245), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16249), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16242), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16243), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1781,22 +1781,22 @@ static void lay_down_rc_track_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26663), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26664), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26661), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26662), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1804,7 +1804,7 @@ static void lay_down_rc_track_left_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -1816,7 +1816,7 @@ static void lay_down_rc_track_left_bank_to_flat( } /** rct2: 0x00824A3C */ -static void lay_down_rc_track_right_bank_to_flat( +static void LayDownRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1826,32 +1826,32 @@ static void lay_down_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16240), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16241), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16238), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16246), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16239), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16247), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1868,22 +1868,22 @@ static void lay_down_rc_track_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26659), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26660), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26657), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26658), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1891,7 +1891,7 @@ static void lay_down_rc_track_right_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -1903,7 +1903,7 @@ static void lay_down_rc_track_right_bank_to_flat( } /** rct2: 0x00824A4C */ -static void lay_down_rc_track_banked_left_quarter_turn_5( +static void LayDownRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1917,25 +1917,25 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16363), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16374), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16368), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16373), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16358), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -1957,22 +1957,22 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16362), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16367), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16372), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16357), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1988,22 +1988,22 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16361), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16366), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16371), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16356), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2019,22 +2019,22 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16360), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16365), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16370), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16355), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2050,25 +2050,25 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16359), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16364), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16369), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16375), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16354), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -2098,22 +2098,22 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26738), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26743), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26748), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26733), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } @@ -2148,12 +2148,12 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26747), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26732), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2169,17 +2169,17 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26736), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26741), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 24 }); + { { 16, 16, height + 24 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26746), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -2200,7 +2200,7 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26735), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -2215,7 +2215,7 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26730), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2231,22 +2231,22 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26734), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26739), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26744), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26729), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -2272,16 +2272,16 @@ static void lay_down_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x00824A5C */ -static void lay_down_rc_track_banked_right_quarter_turn_5( +static void LayDownRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - lay_down_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824A6C */ -static void lay_down_rc_track_left_bank_to_25_deg_up( +static void LayDownRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2291,32 +2291,32 @@ static void lay_down_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16250), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16250), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16254), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16254), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16251), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16251), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16255), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16255), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16252), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16252), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16253), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16253), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2340,22 +2340,22 @@ static void lay_down_rc_track_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26665), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26666), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26667), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26668), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2363,7 +2363,7 @@ static void lay_down_rc_track_left_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2399,7 +2399,7 @@ static void lay_down_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x00824A7C */ -static void lay_down_rc_track_right_bank_to_25_deg_up( +static void LayDownRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2409,32 +2409,32 @@ static void lay_down_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16256), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16256), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16257), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16257), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16258), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16258), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16260), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16260), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16259), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16259), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16261), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16261), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2458,22 +2458,22 @@ static void lay_down_rc_track_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26669), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26670), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26671), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26672), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2481,7 +2481,7 @@ static void lay_down_rc_track_right_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2517,7 +2517,7 @@ static void lay_down_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x00824A8C */ -static void lay_down_rc_track_25_deg_up_to_left_bank( +static void LayDownRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2527,32 +2527,32 @@ static void lay_down_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16262), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16262), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16266), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16266), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16263), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16263), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16267), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16267), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16264), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16264), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16265), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16265), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2576,22 +2576,22 @@ static void lay_down_rc_track_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26673), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26674), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26675), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26676), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2599,7 +2599,7 @@ static void lay_down_rc_track_25_deg_up_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2635,7 +2635,7 @@ static void lay_down_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x00824A9C */ -static void lay_down_rc_track_25_deg_up_to_right_bank( +static void LayDownRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2645,32 +2645,32 @@ static void lay_down_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16268), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16268), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16269), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16269), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16270), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16270), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16272), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16272), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16271), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16271), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16273), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16273), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2694,22 +2694,22 @@ static void lay_down_rc_track_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26677), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26678), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26679), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26680), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2717,7 +2717,7 @@ static void lay_down_rc_track_25_deg_up_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2753,39 +2753,39 @@ static void lay_down_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x00824AAC */ -static void lay_down_rc_track_left_bank_to_25_deg_down( +static void LayDownRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824ABC */ -static void lay_down_rc_track_right_bank_to_25_deg_down( +static void LayDownRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824ACC */ -static void lay_down_rc_track_25_deg_down_to_left_bank( +static void LayDownRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824ADC */ -static void lay_down_rc_track_25_deg_down_to_right_bank( +static void LayDownRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824AEC */ -static void lay_down_rc_track_left_bank( +static void LayDownRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2795,26 +2795,26 @@ static void lay_down_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16274), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16274), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16275), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16275), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16276), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16276), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16277), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16277), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2831,22 +2831,22 @@ static void lay_down_rc_track_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26681), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26682), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26683), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26684), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -2854,7 +2854,7 @@ static void lay_down_rc_track_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -2866,15 +2866,15 @@ static void lay_down_rc_track_left_bank( } /** rct2: 0x00824AFC */ -static void lay_down_rc_track_right_bank( +static void LayDownRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824B0C */ -static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( +static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2888,22 +2888,22 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16510), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16515), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16520), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16525), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -2935,12 +2935,12 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16521), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16526), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2956,17 +2956,17 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16512), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16517), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16522), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -2987,7 +2987,7 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16513), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -3002,7 +3002,7 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16528), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3018,22 +3018,22 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16514), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16519), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16524), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16529), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3237,7 +3237,7 @@ static void lay_down_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x00824B1C */ -static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( +static void LayDownRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3251,22 +3251,22 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16490), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16495), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16500), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16505), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3288,12 +3288,12 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16491), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16496), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3324,17 +3324,17 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16497), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16502), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16507), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3350,7 +3350,7 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16493), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -3365,7 +3365,7 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16508), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3381,22 +3381,22 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16494), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16499), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16504), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16509), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3600,25 +3600,25 @@ static void lay_down_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x00824B2C */ -static void lay_down_rc_track_left_quarter_turn_5_25_deg_down( +static void LayDownRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - lay_down_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LayDownRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00824B3C */ -static void lay_down_rc_track_right_quarter_turn_5_25_deg_down( +static void LayDownRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - lay_down_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824B4C */ -static void lay_down_rc_track_s_bend_left( +static void LayDownRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3632,22 +3632,22 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16402), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16406), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16405), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16409), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3680,12 +3680,12 @@ static void lay_down_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16404), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16408), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3701,12 +3701,12 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16404), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16408), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3736,22 +3736,22 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16405), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16409), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16402), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16406), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3781,22 +3781,22 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26641), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26645), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26644), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26648), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3817,22 +3817,22 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26642), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26646), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26643), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26647), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; } @@ -3861,22 +3861,22 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26643), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26647), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26642), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26646), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; } @@ -3905,22 +3905,22 @@ static void lay_down_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26644), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26648), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26641), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26645), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3945,7 +3945,7 @@ static void lay_down_rc_track_s_bend_left( } /** rct2: 0x00824B5C */ -static void lay_down_rc_track_s_bend_right( +static void LayDownRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3959,22 +3959,22 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16410), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16414), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16413), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16417), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3993,14 +3993,14 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16411), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16415), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4038,14 +4038,14 @@ static void lay_down_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16411), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16415), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4063,22 +4063,22 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16413), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16417), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16410), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16414), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4108,22 +4108,22 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26649), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26653), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26652), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26656), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4144,22 +4144,22 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26650), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26654), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26651), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26655), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; } @@ -4188,22 +4188,22 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26651), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26655), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26650), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26654), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; } @@ -4232,22 +4232,22 @@ static void lay_down_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26652), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26656), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26649), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26653), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4272,7 +4272,7 @@ static void lay_down_rc_track_s_bend_right( } /** rct2: 0x00824B6C */ -static void lay_down_rc_track_left_vertical_loop( +static void LayDownRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4364,22 +4364,22 @@ static void lay_down_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16564), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16572), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16567), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16575), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4458,22 +4458,22 @@ static void lay_down_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16567), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16575), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16564), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16572), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4569,7 +4569,7 @@ static void lay_down_rc_track_left_vertical_loop( } /** rct2: 0x00824B7C */ -static void lay_down_rc_track_right_vertical_loop( +static void LayDownRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4647,22 +4647,22 @@ static void lay_down_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16591), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16583), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16588), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16580), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -4731,22 +4731,22 @@ static void lay_down_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16588), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16580), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16591), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16583), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -4824,11 +4824,11 @@ static void lay_down_rc_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } /** rct2: 0x00824BBC */ -static void lay_down_rc_track_left_quarter_turn_3( +static void LayDownRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4842,22 +4842,22 @@ static void lay_down_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16381), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16384), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16387), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16378), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4879,22 +4879,22 @@ static void lay_down_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16380), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16383), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16386), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16377), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4907,22 +4907,22 @@ static void lay_down_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16379), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16382), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16385), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16376), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4952,22 +4952,22 @@ static void lay_down_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26710), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26713), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26716), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26707), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -4992,22 +4992,22 @@ static void lay_down_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26709), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26712), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26715), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26706), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5020,22 +5020,22 @@ static void lay_down_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26708), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26711), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26714), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26705), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -5061,16 +5061,16 @@ static void lay_down_rc_track_left_quarter_turn_3( } /** rct2: 0x00824BCC */ -static void lay_down_rc_track_right_quarter_turn_3( +static void LayDownRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - lay_down_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824BDC */ -static void lay_down_rc_track_left_quarter_turn_3_bank( +static void LayDownRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5084,25 +5084,25 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16393), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16400), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16396), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16399), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16390), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5124,22 +5124,22 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16392), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16395), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16398), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16389), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5152,25 +5152,25 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16391), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16394), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16397), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16401), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16388), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5200,22 +5200,22 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26722), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26725), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26728), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26719), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -5240,22 +5240,22 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26721), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26724), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26727), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26718), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5268,22 +5268,22 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26720), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26723), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26726), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26717), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -5309,16 +5309,16 @@ static void lay_down_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x00824BEC */ -static void lay_down_rc_track_right_quarter_turn_3_bank( +static void LayDownRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - lay_down_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824BFC */ -static void lay_down_rc_track_left_quarter_turn_3_25_deg_up( +static void LayDownRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5501,7 +5501,7 @@ static void lay_down_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x00824C0C */ -static void lay_down_rc_track_right_quarter_turn_3_25_deg_up( +static void LayDownRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5690,25 +5690,25 @@ static void lay_down_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x00824C1C */ -static void lay_down_rc_track_left_quarter_turn_3_25_deg_down( +static void LayDownRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - lay_down_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LayDownRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00824C2C */ -static void lay_down_rc_track_right_quarter_turn_3_25_deg_down( +static void LayDownRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - lay_down_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824C9C */ -static void lay_down_rc_track_left_half_banked_helix_up_small( +static void LayDownRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5720,25 +5720,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16481), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16488), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16484), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16487), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16478), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5761,22 +5761,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16480), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16483), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16486), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16477), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5789,25 +5789,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16479), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16482), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16485), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16489), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16476), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5832,25 +5832,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16478), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16481), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16488), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16484), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16487), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -5878,22 +5878,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16477), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16480), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16483), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16486), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5906,25 +5906,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16476), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16479), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16482), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16485), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16489), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5942,7 +5942,7 @@ static void lay_down_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x00824CAC */ -static void lay_down_rc_track_right_half_banked_helix_up_small( +static void LayDownRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5954,25 +5954,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16462), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16465), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16468), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16471), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16475), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -5995,22 +5995,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16463), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16466), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16469), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16472), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6023,25 +6023,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16464), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16467), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16474), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16470), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16473), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6066,25 +6066,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16465), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16468), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16471), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16475), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16462), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6112,22 +6112,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16466), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16469), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16472), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16463), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6140,25 +6140,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16467), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16474), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16470), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16473), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16464), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -6176,7 +6176,7 @@ static void lay_down_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x00824CBC */ -static void lay_down_rc_track_left_half_banked_helix_down_small( +static void LayDownRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6186,11 +6186,11 @@ static void lay_down_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - lay_down_rc_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LayDownRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00824CCC */ -static void lay_down_rc_track_right_half_banked_helix_down_small( +static void LayDownRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6200,11 +6200,11 @@ static void lay_down_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - lay_down_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824CDC */ -static void lay_down_rc_track_left_half_banked_helix_up_large( +static void LayDownRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6216,25 +6216,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16449), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16460), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16454), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16459), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16444), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -6257,22 +6257,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16448), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16453), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16458), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16443), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6287,22 +6287,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16447), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16452), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16457), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16442), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6318,22 +6318,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16446), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16451), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16456), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16441), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6348,25 +6348,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16445), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16450), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16455), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16461), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16440), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6391,25 +6391,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16444), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16449), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16460), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16454), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16459), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6437,22 +6437,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16443), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16448), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16453), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16458), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6467,22 +6467,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16442), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16447), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16452), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16457), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6498,22 +6498,22 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16441), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16446), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16451), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16456), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6528,25 +6528,25 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16440), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16445), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16450), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16455), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16461), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -6564,7 +6564,7 @@ static void lay_down_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x00824CEC */ -static void lay_down_rc_track_right_half_banked_helix_up_large( +static void LayDownRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6576,25 +6576,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16418), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16423), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16428), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16433), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16439), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -6617,22 +6617,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16419), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16424), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16429), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16434), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6647,22 +6647,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16420), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16425), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16430), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16435), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6678,22 +6678,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16421), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16426), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16431), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16436), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6708,25 +6708,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16422), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16427), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16438), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16432), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16437), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6751,25 +6751,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16423), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16428), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16433), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16439), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16418), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -6797,22 +6797,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16424), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16429), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16434), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16419), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6827,22 +6827,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16425), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16430), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16435), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16420), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6858,22 +6858,22 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16426), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16431), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16436), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16421), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6888,25 +6888,25 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16427), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16438), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16432), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16437), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16422), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -6924,7 +6924,7 @@ static void lay_down_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x00824CFC */ -static void lay_down_rc_track_left_half_banked_helix_down_large( +static void LayDownRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6934,11 +6934,11 @@ static void lay_down_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - lay_down_rc_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LayDownRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00824D0C */ -static void lay_down_rc_track_right_half_banked_helix_down_large( +static void LayDownRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6948,11 +6948,11 @@ static void lay_down_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - lay_down_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824D3C */ -static void lay_down_rc_track_left_quarter_turn_1_60_deg_up( +static void LayDownRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6962,35 +6962,35 @@ static void lay_down_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16555), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16555), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16559), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16559), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16556), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16556), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16560), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16560), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16557), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16557), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16561), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16561), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16554), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16554), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16558), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16558), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } } @@ -7000,45 +7000,45 @@ static void lay_down_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26910), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26910), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26906), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26906), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26911), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26911), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26907), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26907), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26912), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26912), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26908), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26908), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26909), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26909), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26905), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26905), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x00824D1C */ -static void lay_down_rc_track_right_quarter_turn_1_60_deg_up( +static void LayDownRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7048,35 +7048,35 @@ static void lay_down_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16546), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16546), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16550), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16550), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16547), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16547), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16551), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16551), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16548), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16548), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16552), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16552), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16549), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16549), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16553), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16553), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } } @@ -7086,62 +7086,62 @@ static void lay_down_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26901), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26901), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26897), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26897), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26902), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26902), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26898), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26898), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26903), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26903), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26899), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26899), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26904), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26904), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26900), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26900), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x00824D2C */ -static void lay_down_rc_track_left_quarter_turn_1_60_deg_down( +static void LayDownRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LayDownRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00824D4C */ -static void lay_down_rc_track_right_quarter_turn_1_60_deg_down( +static void LayDownRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LayDownRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00824D5C */ -static void lay_down_rc_track_brakes( +static void LayDownRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7152,17 +7152,17 @@ static void lay_down_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16230), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16230), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16231), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16231), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7180,19 +7180,19 @@ static void lay_down_rc_track_brakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26559), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26560), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -7204,7 +7204,7 @@ static void lay_down_rc_track_brakes( } /** rct2: 0x00824D6C */ -static void lay_down_rc_track_on_ride_photo( +static void LayDownRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7220,8 +7220,8 @@ static void lay_down_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -7231,8 +7231,8 @@ static void lay_down_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -7242,8 +7242,8 @@ static void lay_down_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7253,11 +7253,11 @@ static void lay_down_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -7275,7 +7275,7 @@ static void lay_down_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -7286,7 +7286,7 @@ static void lay_down_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -7297,7 +7297,7 @@ static void lay_down_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7308,10 +7308,10 @@ static void lay_down_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); @@ -7319,7 +7319,7 @@ static void lay_down_rc_track_on_ride_photo( } /** rct2: 0x00824D8C */ -static void lay_down_rc_track_left_eighth_to_diag( +static void LayDownRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7333,22 +7333,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16740), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16744), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16748), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16752), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -7367,22 +7367,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16741), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16745), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16749), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16753), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7398,22 +7398,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16742), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16746), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16750), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16754), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7432,28 +7432,28 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16743), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16747), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16751), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16755), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7477,22 +7477,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26765), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26769), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26773), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26777), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -7513,22 +7513,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26766), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26770), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26774), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26778), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7544,22 +7544,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26767), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26771), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26775), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26779), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7578,22 +7578,22 @@ static void lay_down_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26768), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26772), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26776), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26780), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; } @@ -7629,7 +7629,7 @@ static void lay_down_rc_track_left_eighth_to_diag( } /** rct2: 0x00824D9C */ -static void lay_down_rc_track_right_eighth_to_diag( +static void LayDownRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7643,22 +7643,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16724), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16728), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16732), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16736), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -7677,22 +7677,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16725), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16729), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16733), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16737), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7708,22 +7708,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16726), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16730), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16734), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16738), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7742,28 +7742,28 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16727), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16731), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16735), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16739), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7787,22 +7787,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26749), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26753), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26757), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26761), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -7823,22 +7823,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26750), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26754), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26758), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26762), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7854,22 +7854,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26751), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26755), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26759), { 0, 0, height + 24 }, - { 28, 28, 3 }, { 4, 4, height + 22 }); + { { 4, 4, height + 22 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26763), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7888,22 +7888,22 @@ static void lay_down_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26752), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26756), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26760), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26764), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } @@ -7939,25 +7939,25 @@ static void lay_down_rc_track_right_eighth_to_diag( } /** rct2: 0x00824DAC */ -static void lay_down_rc_track_left_eighth_to_orthogonal( +static void LayDownRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - lay_down_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824DBC */ -static void lay_down_rc_track_right_eighth_to_orthogonal( +static void LayDownRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - lay_down_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + LayDownRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x00824DCC */ -static void lay_down_rc_track_left_eighth_bank_to_diag( +static void LayDownRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7971,22 +7971,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16772), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16776), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16780), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16784), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -8005,22 +8005,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16773), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16777), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16781), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16785), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8036,22 +8036,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16774), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16778), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16782), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16786), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8070,28 +8070,28 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16775), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16779), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16783), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16787), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8115,22 +8115,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26853), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26857), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26861), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26865), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -8151,22 +8151,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26854), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26858), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26862), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26866), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8182,22 +8182,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26855), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26859), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26863), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26867), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8216,22 +8216,22 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26856), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26860), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26864), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26868), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; } @@ -8267,7 +8267,7 @@ static void lay_down_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x00824DDC */ -static void lay_down_rc_track_right_eighth_bank_to_diag( +static void LayDownRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8281,22 +8281,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16756), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16760), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16764), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16768), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -8315,22 +8315,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16757), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16761), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16765), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16769), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8346,22 +8346,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16758), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16762), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16766), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16770), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8380,28 +8380,28 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16759), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16763), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16767), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16771), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8425,22 +8425,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26837), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26841), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26845), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26849), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -8461,22 +8461,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26838), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26842), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26846), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26850), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8492,22 +8492,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26839), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26843), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26847), { 0, 0, height + 24 }, - { 28, 28, 3 }, { 4, 4, height + 22 }); + { { 4, 4, height + 22 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26851), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8526,22 +8526,22 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26840), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26844), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26848), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26852), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } @@ -8577,25 +8577,25 @@ static void lay_down_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x00824DEC */ -static void lay_down_rc_track_left_eighth_bank_to_orthogonal( +static void LayDownRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - lay_down_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LayDownRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00824DFC */ -static void lay_down_rc_track_right_eighth_bank_to_orthogonal( +static void LayDownRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - lay_down_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + LayDownRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x00824D7C */ -static void lay_down_rc_track_diag_flat( +static void LayDownRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8611,7 +8611,7 @@ static void lay_down_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16699), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8622,7 +8622,7 @@ static void lay_down_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16637), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8638,7 +8638,7 @@ static void lay_down_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16696), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8649,7 +8649,7 @@ static void lay_down_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16634), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8665,7 +8665,7 @@ static void lay_down_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16698), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8676,7 +8676,7 @@ static void lay_down_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16636), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8696,7 +8696,7 @@ static void lay_down_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16697), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8721,7 +8721,7 @@ static void lay_down_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16635), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8753,7 +8753,7 @@ static void lay_down_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26812), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8764,7 +8764,7 @@ static void lay_down_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26784), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8780,7 +8780,7 @@ static void lay_down_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26809), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8791,7 +8791,7 @@ static void lay_down_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26781), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8807,7 +8807,7 @@ static void lay_down_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26811), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8818,7 +8818,7 @@ static void lay_down_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26783), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8834,7 +8834,7 @@ static void lay_down_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26810), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8845,7 +8845,7 @@ static void lay_down_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26782), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -8879,7 +8879,7 @@ static void lay_down_rc_track_diag_flat( } /** rct2: 0x00824E2C */ -static void lay_down_rc_track_diag_25_deg_up( +static void LayDownRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8895,7 +8895,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16711), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8906,7 +8906,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16649), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8922,7 +8922,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16708), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8933,7 +8933,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16646), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8949,7 +8949,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16710), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8960,7 +8960,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16648), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8980,7 +8980,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16709), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9005,7 +9005,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16647), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9037,7 +9037,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26824), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9048,7 +9048,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26796), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9064,7 +9064,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26821), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9075,7 +9075,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26793), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9091,7 +9091,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26823), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9102,7 +9102,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26795), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9118,7 +9118,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26822), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9129,7 +9129,7 @@ static void lay_down_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26794), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -9163,7 +9163,7 @@ static void lay_down_rc_track_diag_25_deg_up( } /** rct2: 0x00824E8C */ -static void lay_down_rc_track_diag_60_deg_up( +static void LayDownRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9179,7 +9179,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16723), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9190,7 +9190,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16661), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9206,7 +9206,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16720), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9217,7 +9217,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16658), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9233,7 +9233,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16722), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9244,7 +9244,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16660), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9264,7 +9264,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16721), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9289,7 +9289,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16659), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9319,7 +9319,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26808), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9332,7 +9332,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26805), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9345,7 +9345,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26807), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9358,7 +9358,7 @@ static void lay_down_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26806), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 3 } }); break; } @@ -9391,7 +9391,7 @@ static void lay_down_rc_track_diag_60_deg_up( } /** rct2: 0x00824E0C */ -static void lay_down_rc_track_diag_flat_to_25_deg_up( +static void LayDownRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9407,7 +9407,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16703), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9418,7 +9418,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16641), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9434,7 +9434,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16700), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9445,7 +9445,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16638), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9461,7 +9461,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16702), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9472,7 +9472,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16640), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9492,7 +9492,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16701), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9517,7 +9517,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16639), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9549,7 +9549,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26816), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9560,7 +9560,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26788), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9576,7 +9576,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26813), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9587,7 +9587,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26785), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9603,7 +9603,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26815), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9614,7 +9614,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26787), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9630,7 +9630,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26814), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9641,7 +9641,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26786), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -9675,7 +9675,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x00824E6C */ -static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( +static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9691,7 +9691,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16715), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9702,7 +9702,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16653), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9718,7 +9718,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16712), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9729,7 +9729,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16650), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9745,7 +9745,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16714), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9756,7 +9756,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16652), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9776,7 +9776,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16713), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9801,7 +9801,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16651), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9831,7 +9831,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26800), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9844,7 +9844,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26797), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9857,7 +9857,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26799), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9870,7 +9870,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26798), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -9903,7 +9903,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x00824E7C */ -static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( +static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9919,7 +9919,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16719), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9930,7 +9930,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16657), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9946,7 +9946,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16716), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9957,7 +9957,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16654), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9973,7 +9973,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16718), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9984,7 +9984,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16656), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10004,7 +10004,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16717), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10029,7 +10029,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16655), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10059,7 +10059,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26804), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10072,7 +10072,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26801), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10085,7 +10085,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26803), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10098,7 +10098,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26802), { -16, -16, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 56 }); + { { 0, 0, height + 56 }, { 16, 16, 3 } }); break; } @@ -10131,7 +10131,7 @@ static void lay_down_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x00824E1C */ -static void lay_down_rc_track_diag_25_deg_up_to_flat( +static void LayDownRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10147,7 +10147,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16707), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10158,7 +10158,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16645), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10174,7 +10174,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16704), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10185,7 +10185,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16642), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10201,7 +10201,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16706), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10212,7 +10212,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16644), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10232,7 +10232,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16705), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10257,7 +10257,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16643), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10289,7 +10289,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26820), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10300,7 +10300,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26792), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10316,7 +10316,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26817), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10327,7 +10327,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26789), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10343,7 +10343,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26819), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10354,7 +10354,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26791), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10370,7 +10370,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26818), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10381,7 +10381,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26790), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -10415,7 +10415,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x00824E5C */ -static void lay_down_rc_track_diag_25_deg_down( +static void LayDownRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10431,7 +10431,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16709), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10442,7 +10442,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16647), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10458,7 +10458,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16710), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10469,7 +10469,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16648), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10485,7 +10485,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16708), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10496,7 +10496,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16646), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10516,7 +10516,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16711), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10541,7 +10541,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16649), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10571,7 +10571,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26794), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10584,7 +10584,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26795), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10597,7 +10597,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26793), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10610,7 +10610,7 @@ static void lay_down_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26796), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -10643,7 +10643,7 @@ static void lay_down_rc_track_diag_25_deg_down( } /** rct2: 0x00824EBC */ -static void lay_down_rc_track_diag_60_deg_down( +static void LayDownRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10659,7 +10659,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16721), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10670,7 +10670,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16659), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10686,7 +10686,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16722), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10697,7 +10697,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16660), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10713,7 +10713,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16720), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10724,7 +10724,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16658), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10744,7 +10744,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16723), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10769,7 +10769,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16661), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10799,7 +10799,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26806), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10812,7 +10812,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26807), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10825,7 +10825,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26805), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10838,7 +10838,7 @@ static void lay_down_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26808), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } @@ -10871,7 +10871,7 @@ static void lay_down_rc_track_diag_60_deg_down( } /** rct2: 0x00824E3C */ -static void lay_down_rc_track_diag_flat_to_25_deg_down( +static void LayDownRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10887,7 +10887,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16705), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10898,7 +10898,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16643), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10913,7 +10913,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16706), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10924,7 +10924,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16644), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10939,7 +10939,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16704), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10950,7 +10950,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16642), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -10969,7 +10969,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16707), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10994,7 +10994,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16645), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11023,7 +11023,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26790), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11035,7 +11035,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26791), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11047,7 +11047,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26789), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11059,7 +11059,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26792), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -11092,7 +11092,7 @@ static void lay_down_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x00824E9C */ -static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( +static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11108,7 +11108,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16717), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -11119,7 +11119,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16655), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -11135,7 +11135,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16718), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11146,7 +11146,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16656), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11162,7 +11162,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16716), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11173,7 +11173,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16654), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11193,7 +11193,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16719), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11218,7 +11218,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16657), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11248,7 +11248,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26802), { -16, -16, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 56 }); + { { 0, 0, height + 56 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11261,7 +11261,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26803), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11274,7 +11274,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26801), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11287,7 +11287,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26804), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -11320,7 +11320,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x00824EAC */ -static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( +static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11336,7 +11336,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16713), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11347,7 +11347,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16651), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11363,7 +11363,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16714), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11374,7 +11374,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16652), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11390,7 +11390,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16712), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11401,7 +11401,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16650), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11421,7 +11421,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16715), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11446,7 +11446,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16653), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11476,7 +11476,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26798), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11489,7 +11489,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26799), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11502,7 +11502,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26797), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11515,7 +11515,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26800), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -11548,7 +11548,7 @@ static void lay_down_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x00824E4C */ -static void lay_down_rc_track_diag_25_deg_down_to_flat( +static void LayDownRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11564,7 +11564,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16701), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11575,7 +11575,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16639), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11591,7 +11591,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16702), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11602,7 +11602,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16640), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11618,7 +11618,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16700), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11629,7 +11629,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16638), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -11649,7 +11649,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16703), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11674,7 +11674,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16641), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11704,7 +11704,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26786), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11717,7 +11717,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26787), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11730,7 +11730,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26785), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11743,7 +11743,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26788), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -11776,7 +11776,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x00824EEC */ -static void lay_down_rc_track_diag_flat_to_left_bank( +static void LayDownRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11790,7 +11790,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16669), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11803,10 +11803,10 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16666), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16670), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11819,7 +11819,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16668), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11836,7 +11836,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16667), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11865,7 +11865,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26876), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11878,7 +11878,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26873), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11891,7 +11891,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26875), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11904,7 +11904,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26874), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -11938,7 +11938,7 @@ static void lay_down_rc_track_diag_flat_to_left_bank( } /** rct2: 0x00824EFC */ -static void lay_down_rc_track_diag_flat_to_right_bank( +static void LayDownRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11952,7 +11952,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16674), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11965,7 +11965,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16671), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11978,10 +11978,10 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16673), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16675), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11998,7 +11998,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16672), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12027,7 +12027,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26880), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12040,7 +12040,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26877), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12053,7 +12053,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26879), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12066,7 +12066,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26878), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12100,7 +12100,7 @@ static void lay_down_rc_track_diag_flat_to_right_bank( } /** rct2: 0x00824F0C */ -static void lay_down_rc_track_diag_left_bank_to_flat( +static void LayDownRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12114,7 +12114,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16672), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12127,10 +12127,10 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16673), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16675), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12143,7 +12143,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16671), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12160,7 +12160,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16674), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12189,7 +12189,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26878), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12202,7 +12202,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26879), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12215,7 +12215,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26877), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12228,7 +12228,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26880), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12262,7 +12262,7 @@ static void lay_down_rc_track_diag_left_bank_to_flat( } /** rct2: 0x00824F1C */ -static void lay_down_rc_track_diag_right_bank_to_flat( +static void LayDownRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12276,7 +12276,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16667), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12289,7 +12289,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16668), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12302,10 +12302,10 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16666), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16670), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12322,7 +12322,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16669), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12351,7 +12351,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26874), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12364,7 +12364,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26875), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12377,7 +12377,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26873), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12390,7 +12390,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26876), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -12424,7 +12424,7 @@ static void lay_down_rc_track_diag_right_bank_to_flat( } /** rct2: 0x00824F4C */ -static void lay_down_rc_track_diag_left_bank_to_25_deg_up( +static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12438,7 +12438,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16689), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12451,10 +12451,10 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16686), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16690), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12467,7 +12467,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16688), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12484,7 +12484,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16687), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12513,7 +12513,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26892), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12526,7 +12526,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26889), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12539,7 +12539,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26891), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12552,7 +12552,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26890), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -12585,7 +12585,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x00824F5C */ -static void lay_down_rc_track_diag_right_bank_to_25_deg_up( +static void LayDownRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12599,7 +12599,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16694), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12612,7 +12612,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16691), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12625,10 +12625,10 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16693), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16695), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12645,7 +12645,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16692), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12674,7 +12674,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26896), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12687,7 +12687,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26893), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12700,7 +12700,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26895), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12713,7 +12713,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26894), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -12746,7 +12746,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x00824F2C */ -static void lay_down_rc_track_diag_25_deg_up_to_left_bank( +static void LayDownRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12760,7 +12760,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16679), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12773,10 +12773,10 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16676), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16680), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12789,7 +12789,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16678), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12806,7 +12806,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16677), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12835,7 +12835,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26884), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12848,7 +12848,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26881), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12861,7 +12861,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26883), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12874,7 +12874,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26882), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -12907,7 +12907,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x00824F3C */ -static void lay_down_rc_track_diag_25_deg_up_to_right_bank( +static void LayDownRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12921,7 +12921,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16684), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12934,7 +12934,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16681), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12947,10 +12947,10 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16683), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16685), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12967,7 +12967,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16682), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12996,7 +12996,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26888), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13009,7 +13009,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26885), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13022,7 +13022,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26887), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13035,7 +13035,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26886), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13068,7 +13068,7 @@ static void lay_down_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x00824F6C */ -static void lay_down_rc_track_diag_left_bank_to_25_deg_down( +static void LayDownRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13082,7 +13082,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16682), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13094,10 +13094,10 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16683), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16685), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13109,7 +13109,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16681), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13125,7 +13125,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16684), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13153,7 +13153,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26886), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13165,7 +13165,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26887), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13177,7 +13177,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26885), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13189,7 +13189,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26888), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13222,7 +13222,7 @@ static void lay_down_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x00824F7C */ -static void lay_down_rc_track_diag_right_bank_to_25_deg_down( +static void LayDownRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13236,7 +13236,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16677), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13248,7 +13248,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16678), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13260,10 +13260,10 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16676), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16680), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13279,7 +13279,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16679), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13307,7 +13307,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26882), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13319,7 +13319,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26883), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13331,7 +13331,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26881), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13343,7 +13343,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26884), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13376,7 +13376,7 @@ static void lay_down_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x00824F8C */ -static void lay_down_rc_track_diag_25_deg_down_to_left_bank( +static void LayDownRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13390,7 +13390,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16692), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13403,10 +13403,10 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16693), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16695), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13419,7 +13419,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16691), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13436,7 +13436,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16694), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13465,7 +13465,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26894), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13478,7 +13478,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26895), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13491,7 +13491,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26893), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13504,7 +13504,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26896), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13537,7 +13537,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x00824F9C */ -static void lay_down_rc_track_diag_25_deg_down_to_right_bank( +static void LayDownRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13551,7 +13551,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16687), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13564,7 +13564,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16688), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13577,10 +13577,10 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16686), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16690), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13597,7 +13597,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16689), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13626,7 +13626,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26890), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13639,7 +13639,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26891), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13652,7 +13652,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26889), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13665,7 +13665,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26892), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -13698,7 +13698,7 @@ static void lay_down_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x00824ECC */ -static void lay_down_rc_track_diag_left_bank( +static void LayDownRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13712,7 +13712,7 @@ static void lay_down_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16665), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13725,7 +13725,7 @@ static void lay_down_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16662), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13738,7 +13738,7 @@ static void lay_down_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16664), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13755,7 +13755,7 @@ static void lay_down_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16663), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13784,7 +13784,7 @@ static void lay_down_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26872), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13797,7 +13797,7 @@ static void lay_down_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26869), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13810,7 +13810,7 @@ static void lay_down_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26871), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13823,7 +13823,7 @@ static void lay_down_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26870), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -13857,7 +13857,7 @@ static void lay_down_rc_track_diag_left_bank( } /** rct2: 0x00824EDC */ -static void lay_down_rc_track_diag_right_bank( +static void LayDownRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13871,7 +13871,7 @@ static void lay_down_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16663), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13884,7 +13884,7 @@ static void lay_down_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16664), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13897,7 +13897,7 @@ static void lay_down_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16662), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13914,7 +13914,7 @@ static void lay_down_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16665), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13943,7 +13943,7 @@ static void lay_down_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26870), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13956,7 +13956,7 @@ static void lay_down_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26871), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13969,7 +13969,7 @@ static void lay_down_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26869), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13982,7 +13982,7 @@ static void lay_down_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26872), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -14016,7 +14016,7 @@ static void lay_down_rc_track_diag_right_bank( } /** rct2: 0x00824FAC */ -static void lay_down_rc_track_left_flyer_twist_up( +static void LayDownRCTrackLeftFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14064,7 +14064,7 @@ static void lay_down_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26973), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -14094,7 +14094,7 @@ static void lay_down_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26974), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -14135,7 +14135,7 @@ static void lay_down_rc_track_left_flyer_twist_up( } /** rct2: 0x00824FBC */ -static void lay_down_rc_track_right_flyer_twist_up( +static void LayDownRCTrackRightFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14254,7 +14254,7 @@ static void lay_down_rc_track_right_flyer_twist_up( } /** rct2: 0x00824FCC */ -static void lay_down_rc_track_left_flyer_twist_down( +static void LayDownRCTrackLeftFlyerTwistDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14276,7 +14276,7 @@ static void lay_down_rc_track_left_flyer_twist_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26974), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -14314,7 +14314,7 @@ static void lay_down_rc_track_left_flyer_twist_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26973), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -14373,7 +14373,7 @@ static void lay_down_rc_track_left_flyer_twist_down( } /** rct2: 0x00824FDC */ -static void lay_down_rc_track_right_flyer_twist_down( +static void LayDownRCTrackRightFlyerTwistDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14492,7 +14492,7 @@ static void lay_down_rc_track_right_flyer_twist_down( } /** rct2: 0x00824C3C */ -static void lay_down_rc_track_flyer_half_loop_up( +static void LayDownRCTrackFlyerHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14538,21 +14538,21 @@ static void lay_down_rc_track_flyer_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16595), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16603), { 0, 14, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16600), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14578,7 +14578,7 @@ static void lay_down_rc_track_flyer_half_loop_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16604), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -14588,7 +14588,7 @@ static void lay_down_rc_track_flyer_half_loop_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16607), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14633,7 +14633,7 @@ static void lay_down_rc_track_flyer_half_loop_up( } /** rct2: 0x00824C4C */ -static void lay_down_rc_track_flyer_half_loop_down( +static void LayDownRCTrackFlyerHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14682,7 +14682,7 @@ static void lay_down_rc_track_flyer_half_loop_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16604), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -14692,7 +14692,7 @@ static void lay_down_rc_track_flyer_half_loop_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16607), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -14707,21 +14707,21 @@ static void lay_down_rc_track_flyer_half_loop_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16595), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16603), { 0, 14, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16600), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14774,7 +14774,7 @@ static void lay_down_rc_track_flyer_half_loop_down( } /** rct2: 0x00824C5C */ -static void lay_down_rc_track_left_flyer_corkscrew_up( +static void LayDownRCTrackLeftFlyerCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14786,22 +14786,22 @@ static void lay_down_rc_track_left_flyer_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16610), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16613), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16616), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16619), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } @@ -14832,22 +14832,22 @@ static void lay_down_rc_track_left_flyer_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16611), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16614), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16617), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16620), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -14859,22 +14859,22 @@ static void lay_down_rc_track_left_flyer_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16612), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16615), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16618), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16621), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -14899,7 +14899,7 @@ static void lay_down_rc_track_left_flyer_corkscrew_up( } /** rct2: 0x00824C6C */ -static void lay_down_rc_track_right_flyer_corkscrew_up( +static void LayDownRCTrackRightFlyerCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14911,22 +14911,22 @@ static void lay_down_rc_track_right_flyer_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16622), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16625), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16628), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16631), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -14946,22 +14946,22 @@ static void lay_down_rc_track_right_flyer_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16623), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16626), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16629), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16632), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -14973,22 +14973,22 @@ static void lay_down_rc_track_right_flyer_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16624), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16627), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16630), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16633), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -15013,7 +15013,7 @@ static void lay_down_rc_track_right_flyer_corkscrew_up( } /** rct2: 0x00824C7C */ -static void lay_down_rc_track_left_flyer_corkscrew_down( +static void LayDownRCTrackLeftFlyerCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15025,22 +15025,22 @@ static void lay_down_rc_track_left_flyer_corkscrew_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16627), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16630), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16633), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16624), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } @@ -15062,22 +15062,22 @@ static void lay_down_rc_track_left_flyer_corkscrew_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16626), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16629), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16632), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16623), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -15089,22 +15089,22 @@ static void lay_down_rc_track_left_flyer_corkscrew_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16625), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 4 }); + { { 6, 0, height + 4 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16628), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 4 }); + { { 6, 0, height + 4 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16631), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 4 }); + { { 6, 0, height + 4 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16622), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 4 }); + { { 6, 0, height + 4 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -15127,15 +15127,15 @@ static void lay_down_rc_track_left_flyer_corkscrew_down( } /** rct2: 0x00824C8C */ -static void lay_down_rc_track_right_flyer_corkscrew_down( +static void LayDownRCTrackRightFlyerCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_left_flyer_corkscrew_up(session, ride, 2 - trackSequence, (direction + 3) % 4, height, trackElement); + LayDownRCTrackLeftFlyerCorkscrewUp(session, ride, 2 - trackSequence, (direction + 3) % 4, height, trackElement); } /** rct2: 0x00824FEC */ -static void lay_down_rc_track_block_brakes( +static void LayDownRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15146,14 +15146,14 @@ static void lay_down_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16232), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16232), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16233), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16233), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -15170,19 +15170,19 @@ static void lay_down_rc_track_block_brakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26559), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26560), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 33, session.TrackColours[SCHEME_SUPPORTS]); @@ -15193,7 +15193,7 @@ static void lay_down_rc_track_block_brakes( } } -static void lay_down_rc_track_left_quarter_banked_helix_large_up( +static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15205,22 +15205,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27118), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27123), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27128), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27113), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; } @@ -15245,22 +15245,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27117), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27122), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27127), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27112), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15275,22 +15275,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27116), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27121), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27126), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27111), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15306,22 +15306,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27115), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27120), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27125), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27110), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15336,22 +15336,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27114), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27119), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27124), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27109), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; } @@ -15375,7 +15375,7 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_up( } } -static void lay_down_rc_track_right_quarter_banked_helix_large_up( +static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15387,22 +15387,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27089), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27094), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27099), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27104), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 30 }); + { { 0, 6, height + 30 }, { 32, 20, 3 } }); break; } @@ -15427,22 +15427,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27090), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27095), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27100), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27105), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15457,22 +15457,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27091), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27096), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27101), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27106), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15488,22 +15488,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27092), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27097), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27102), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27107), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15518,22 +15518,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27093), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27098), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27103), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27108), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 38 }); + { { 6, 0, height + 38 }, { 20, 32, 3 } }); break; } @@ -15557,7 +15557,7 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_up( } } -static void lay_down_rc_track_left_quarter_banked_helix_large_down( +static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15569,22 +15569,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27098), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27103), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27108), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27093), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; } @@ -15609,22 +15609,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27097), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27102), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27107), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27092), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15639,22 +15639,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27096), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27101), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27106), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27091), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15670,22 +15670,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27095), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27100), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27105), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27090), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15700,22 +15700,22 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27094), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27099), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27104), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27089), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; } @@ -15739,7 +15739,7 @@ static void lay_down_rc_track_left_quarter_banked_helix_large_down( } } -static void lay_down_rc_track_right_quarter_banked_helix_large_down( +static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15751,22 +15751,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27109), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27114), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27119), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27124), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 38 }); + { { 0, 6, height + 38 }, { 32, 20, 3 } }); break; } @@ -15791,22 +15791,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27110), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27115), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27120), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27125), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15821,22 +15821,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27111), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27116), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27121), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 38 }); + { { 16, 16, height + 38 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27126), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 38 }); + { { 0, 16, height + 38 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15852,22 +15852,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27112), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27117), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27122), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 38 }); + { { 0, 0, height + 38 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27127), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 38 }); + { { 16, 0, height + 38 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -15882,22 +15882,22 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27113), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27118), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27123), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27128), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 30 }); + { { 6, 0, height + 30 }, { 20, 32, 3 } }); break; } @@ -15920,7 +15920,7 @@ static void lay_down_rc_track_right_quarter_banked_helix_large_down( break; } } -static void lay_down_rc_track_half_loop_inverted_up( +static void LayDownRCTrackHalfLoopInvertedUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -15932,22 +15932,22 @@ static void lay_down_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27073), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27081), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27080), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27088), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } @@ -15985,22 +15985,22 @@ static void lay_down_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27074), { 0, 0, height + 24 }, - { 32, 2, 3 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27082), { 0, 14, height + 24 }, - { 32, 2, 63 }, { 0, 29, height + 29 }); + { { 0, 29, height + 29 }, { 32, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27079), { 0, 6, height + 24 }, - { 32, 2, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27087), { 0, 6, height + 24 }, - { 2, 2, 3 }, { 29, 20, height + 29 }); + { { 29, 20, height + 29 }, { 2, 2, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -16012,22 +16012,22 @@ static void lay_down_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27075), { 16, 0, height - 3 }, - { 5, 2, 119 }, { 16, 29, height + 2 }); + { { 16, 29, height + 2 }, { 5, 2, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27083), { 12, 0, height - 3 }, - { 32, 2, 119 }, { 0, -6, height + 2 }); + { { 0, -6, height + 2 }, { 32, 2, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27078), { 10, 16, height - 3 }, - { 4, 2, 119 }, { 10, 0, height + 2 }); + { { 10, 0, height + 2 }, { 4, 2, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27086), { 16, 16, height - 3 }, - { 2, 2, 119 }, { 29, 29, height + 2 }); + { { 29, 29, height + 2 }, { 2, 2, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -16042,22 +16042,22 @@ static void lay_down_rc_track_half_loop_inverted_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27076), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27084), { 0, 0, height + 29 }, - { 2, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 2, 2, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27077), { 0, 16, height + 29 }, - { 32, 2, 3 }, { 0, 0, height - 6 }); + { { 0, 0, height - 6 }, { 32, 2, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27085), { 0, 16, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 34 }); + { { 0, 6, height + 34 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -16071,249 +16071,249 @@ static void lay_down_rc_track_half_loop_inverted_up( } } -static void lay_down_rc_track_half_loop_uninverted_down( +static void LayDownRCTrackHalfLoopUninvertedDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lay_down_rc_track_half_loop_inverted_up(session, ride, 3 - trackSequence, direction, height, trackElement); + LayDownRCTrackHalfLoopInvertedUp(session, ride, 3 - trackSequence, direction, height, trackElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLayDownRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return lay_down_rc_track_flat; + return LayDownRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return lay_down_rc_track_station; + return LayDownRCTrackStation; case TrackElemType::Up25: - return lay_down_rc_track_25_deg_up; + return LayDownRCTrack25DegUp; case TrackElemType::Up60: - return lay_down_rc_track_60_deg_up; + return LayDownRCTrack60DegUp; case TrackElemType::FlatToUp25: - return lay_down_rc_track_flat_to_25_deg_up; + return LayDownRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return lay_down_rc_track_25_deg_up_to_60_deg_up; + return LayDownRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return lay_down_rc_track_60_deg_up_to_25_deg_up; + return LayDownRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return lay_down_rc_track_25_deg_up_to_flat; + return LayDownRCTrack25DegUpToFlat; case TrackElemType::Down25: - return lay_down_rc_track_25_deg_down; + return LayDownRCTrack25DegDown; case TrackElemType::Down60: - return lay_down_rc_track_60_deg_down; + return LayDownRCTrack60DegDown; case TrackElemType::FlatToDown25: - return lay_down_rc_track_flat_to_25_deg_down; + return LayDownRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return lay_down_rc_track_25_deg_down_to_60_deg_down; + return LayDownRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return lay_down_rc_track_60_deg_down_to_25_deg_down; + return LayDownRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return lay_down_rc_track_25_deg_down_to_flat; + return LayDownRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return lay_down_rc_track_left_quarter_turn_5; + return LayDownRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return lay_down_rc_track_right_quarter_turn_5; + return LayDownRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return lay_down_rc_track_flat_to_left_bank; + return LayDownRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return lay_down_rc_track_flat_to_right_bank; + return LayDownRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return lay_down_rc_track_left_bank_to_flat; + return LayDownRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return lay_down_rc_track_right_bank_to_flat; + return LayDownRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return lay_down_rc_track_banked_left_quarter_turn_5; + return LayDownRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return lay_down_rc_track_banked_right_quarter_turn_5; + return LayDownRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return lay_down_rc_track_left_bank_to_25_deg_up; + return LayDownRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return lay_down_rc_track_right_bank_to_25_deg_up; + return LayDownRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return lay_down_rc_track_25_deg_up_to_left_bank; + return LayDownRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return lay_down_rc_track_25_deg_up_to_right_bank; + return LayDownRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return lay_down_rc_track_left_bank_to_25_deg_down; + return LayDownRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return lay_down_rc_track_right_bank_to_25_deg_down; + return LayDownRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return lay_down_rc_track_25_deg_down_to_left_bank; + return LayDownRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return lay_down_rc_track_25_deg_down_to_right_bank; + return LayDownRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return lay_down_rc_track_left_bank; + return LayDownRCTrackLeftBank; case TrackElemType::RightBank: - return lay_down_rc_track_right_bank; + return LayDownRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return lay_down_rc_track_left_quarter_turn_5_25_deg_up; + return LayDownRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return lay_down_rc_track_right_quarter_turn_5_25_deg_up; + return LayDownRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return lay_down_rc_track_left_quarter_turn_5_25_deg_down; + return LayDownRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return lay_down_rc_track_right_quarter_turn_5_25_deg_down; + return LayDownRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return lay_down_rc_track_s_bend_left; + return LayDownRCTrackSBendLeft; case TrackElemType::SBendRight: - return lay_down_rc_track_s_bend_right; + return LayDownRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return lay_down_rc_track_left_vertical_loop; + return LayDownRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return lay_down_rc_track_right_vertical_loop; + return LayDownRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return lay_down_rc_track_left_quarter_turn_3; + return LayDownRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return lay_down_rc_track_right_quarter_turn_3; + return LayDownRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return lay_down_rc_track_left_quarter_turn_3_bank; + return LayDownRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return lay_down_rc_track_right_quarter_turn_3_bank; + return LayDownRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return lay_down_rc_track_left_quarter_turn_3_25_deg_up; + return LayDownRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return lay_down_rc_track_right_quarter_turn_3_25_deg_up; + return LayDownRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return lay_down_rc_track_left_quarter_turn_3_25_deg_down; + return LayDownRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return lay_down_rc_track_right_quarter_turn_3_25_deg_down; + return LayDownRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return lay_down_rc_track_left_half_banked_helix_up_small; + return LayDownRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return lay_down_rc_track_right_half_banked_helix_up_small; + return LayDownRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return lay_down_rc_track_left_half_banked_helix_down_small; + return LayDownRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return lay_down_rc_track_right_half_banked_helix_down_small; + return LayDownRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return lay_down_rc_track_left_half_banked_helix_up_large; + return LayDownRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return lay_down_rc_track_right_half_banked_helix_up_large; + return LayDownRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return lay_down_rc_track_left_half_banked_helix_down_large; + return LayDownRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return lay_down_rc_track_right_half_banked_helix_down_large; + return LayDownRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return lay_down_rc_track_left_quarter_turn_1_60_deg_up; + return LayDownRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return lay_down_rc_track_right_quarter_turn_1_60_deg_up; + return LayDownRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return lay_down_rc_track_left_quarter_turn_1_60_deg_down; + return LayDownRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return lay_down_rc_track_right_quarter_turn_1_60_deg_down; + return LayDownRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return lay_down_rc_track_brakes; + return LayDownRCTrackBrakes; case TrackElemType::OnRidePhoto: - return lay_down_rc_track_on_ride_photo; + return LayDownRCTrackOnRidePhoto; case TrackElemType::LeftEighthToDiag: - return lay_down_rc_track_left_eighth_to_diag; + return LayDownRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return lay_down_rc_track_right_eighth_to_diag; + return LayDownRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return lay_down_rc_track_left_eighth_to_orthogonal; + return LayDownRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return lay_down_rc_track_right_eighth_to_orthogonal; + return LayDownRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return lay_down_rc_track_left_eighth_bank_to_diag; + return LayDownRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return lay_down_rc_track_right_eighth_bank_to_diag; + return LayDownRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return lay_down_rc_track_left_eighth_bank_to_orthogonal; + return LayDownRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return lay_down_rc_track_right_eighth_bank_to_orthogonal; + return LayDownRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return lay_down_rc_track_diag_flat; + return LayDownRCTrackDiagFlat; case TrackElemType::DiagUp25: - return lay_down_rc_track_diag_25_deg_up; + return LayDownRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return lay_down_rc_track_diag_60_deg_up; + return LayDownRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return lay_down_rc_track_diag_flat_to_25_deg_up; + return LayDownRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return lay_down_rc_track_diag_25_deg_up_to_60_deg_up; + return LayDownRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return lay_down_rc_track_diag_60_deg_up_to_25_deg_up; + return LayDownRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return lay_down_rc_track_diag_25_deg_up_to_flat; + return LayDownRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return lay_down_rc_track_diag_25_deg_down; + return LayDownRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return lay_down_rc_track_diag_60_deg_down; + return LayDownRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return lay_down_rc_track_diag_flat_to_25_deg_down; + return LayDownRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return lay_down_rc_track_diag_25_deg_down_to_60_deg_down; + return LayDownRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return lay_down_rc_track_diag_60_deg_down_to_25_deg_down; + return LayDownRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return lay_down_rc_track_diag_25_deg_down_to_flat; + return LayDownRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return lay_down_rc_track_diag_flat_to_left_bank; + return LayDownRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return lay_down_rc_track_diag_flat_to_right_bank; + return LayDownRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return lay_down_rc_track_diag_left_bank_to_flat; + return LayDownRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return lay_down_rc_track_diag_right_bank_to_flat; + return LayDownRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return lay_down_rc_track_diag_left_bank_to_25_deg_up; + return LayDownRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return lay_down_rc_track_diag_right_bank_to_25_deg_up; + return LayDownRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return lay_down_rc_track_diag_25_deg_up_to_left_bank; + return LayDownRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return lay_down_rc_track_diag_25_deg_up_to_right_bank; + return LayDownRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return lay_down_rc_track_diag_left_bank_to_25_deg_down; + return LayDownRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return lay_down_rc_track_diag_right_bank_to_25_deg_down; + return LayDownRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return lay_down_rc_track_diag_25_deg_down_to_left_bank; + return LayDownRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return lay_down_rc_track_diag_25_deg_down_to_right_bank; + return LayDownRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return lay_down_rc_track_diag_left_bank; + return LayDownRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return lay_down_rc_track_diag_right_bank; + return LayDownRCTrackDiagRightBank; case TrackElemType::LeftFlyerTwistUp: - return lay_down_rc_track_left_flyer_twist_up; + return LayDownRCTrackLeftFlyerTwistUp; case TrackElemType::RightFlyerTwistUp: - return lay_down_rc_track_right_flyer_twist_up; + return LayDownRCTrackRightFlyerTwistUp; case TrackElemType::LeftFlyerTwistDown: - return lay_down_rc_track_left_flyer_twist_down; + return LayDownRCTrackLeftFlyerTwistDown; case TrackElemType::RightFlyerTwistDown: - return lay_down_rc_track_right_flyer_twist_down; + return LayDownRCTrackRightFlyerTwistDown; case TrackElemType::FlyerHalfLoopUninvertedUp: - return lay_down_rc_track_flyer_half_loop_up; + return LayDownRCTrackFlyerHalfLoopUp; case TrackElemType::FlyerHalfLoopInvertedDown: - return lay_down_rc_track_flyer_half_loop_down; + return LayDownRCTrackFlyerHalfLoopDown; case TrackElemType::LeftFlyerCorkscrewUp: - return lay_down_rc_track_left_flyer_corkscrew_up; + return LayDownRCTrackLeftFlyerCorkscrewUp; case TrackElemType::RightFlyerCorkscrewUp: - return lay_down_rc_track_right_flyer_corkscrew_up; + return LayDownRCTrackRightFlyerCorkscrewUp; case TrackElemType::LeftFlyerCorkscrewDown: - return lay_down_rc_track_left_flyer_corkscrew_down; + return LayDownRCTrackLeftFlyerCorkscrewDown; case TrackElemType::RightFlyerCorkscrewDown: - return lay_down_rc_track_right_flyer_corkscrew_down; + return LayDownRCTrackRightFlyerCorkscrewDown; case TrackElemType::BlockBrakes: - return lay_down_rc_track_block_brakes; + return LayDownRCTrackBlockBrakes; case TrackElemType::LeftQuarterBankedHelixLargeUp: - return lay_down_rc_track_left_quarter_banked_helix_large_up; + return LayDownRCTrackLeftQuarterBankedHelixLargeUp; case TrackElemType::RightQuarterBankedHelixLargeUp: - return lay_down_rc_track_right_quarter_banked_helix_large_up; + return LayDownRCTrackRightQuarterBankedHelixLargeUp; case TrackElemType::LeftQuarterBankedHelixLargeDown: - return lay_down_rc_track_left_quarter_banked_helix_large_down; + return LayDownRCTrackLeftQuarterBankedHelixLargeDown; case TrackElemType::RightQuarterBankedHelixLargeDown: - return lay_down_rc_track_right_quarter_banked_helix_large_down; + return LayDownRCTrackRightQuarterBankedHelixLargeDown; case TrackElemType::FlyerHalfLoopInvertedUp: - return lay_down_rc_track_half_loop_inverted_up; + return LayDownRCTrackHalfLoopInvertedUp; case TrackElemType::FlyerHalfLoopUninvertedDown: - return lay_down_rc_track_half_loop_uninverted_down; + return LayDownRCTrackHalfLoopUninvertedDown; } - return get_track_paint_function_corkscrew_rc(trackType); + return GetTrackPaintFunctionCorkscrewRC(trackType); } diff --git a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp index 1c5cac1729..954a6bd5f0 100644 --- a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ static constexpr const uint32_t _LimLauncherBlockBrakeImages[NumOrthogonalDirect }; /** rct2: 0x008A6D50, 0x008A6D60, 0x008A6D70 */ -static void lim_launched_rc_track_station( +static void LimLaunchedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -44,29 +44,29 @@ static void lim_launched_rc_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_LimLauncherBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A65E0 */ -static void lim_launched_rc_track_left_vertical_loop( +static void LimLaunchedRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -150,22 +150,22 @@ static void lim_launched_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15390), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15398), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15393), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15401), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -244,22 +244,22 @@ static void lim_launched_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15393), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15401), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15390), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15398), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -347,7 +347,7 @@ static void lim_launched_rc_track_left_vertical_loop( } /** rct2: 0x008A65F0 */ -static void lim_launched_rc_track_right_vertical_loop( +static void LimLaunchedRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -416,22 +416,22 @@ static void lim_launched_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15417), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15409), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15414), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15406), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -500,22 +500,22 @@ static void lim_launched_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15414), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15406), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15417), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15409), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -584,11 +584,11 @@ static void lim_launched_rc_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } /** rct2: 0x008A6D10 */ -static void lim_launched_rc_track_left_twist_down_to_up( +static void LimLaunchedRCTrackLeftTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -600,34 +600,34 @@ static void lim_launched_rc_track_left_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15758), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15782), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15761), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15785), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15764), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15788), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15767), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15791), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -646,34 +646,34 @@ static void lim_launched_rc_track_left_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15759), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15783), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15762), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15786), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15765), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15789), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15768), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15792), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -688,34 +688,34 @@ static void lim_launched_rc_track_left_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15760), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15784), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15763), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15787), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15766), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15790), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15769), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15793), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -736,7 +736,7 @@ static void lim_launched_rc_track_left_twist_down_to_up( } /** rct2: 0x008A6D20 */ -static void lim_launched_rc_track_right_twist_down_to_up( +static void LimLaunchedRCTrackRightTwistDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -748,34 +748,34 @@ static void lim_launched_rc_track_right_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15770), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15794), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15773), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15797), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15776), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15800), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15779), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15803), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -794,34 +794,34 @@ static void lim_launched_rc_track_right_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15771), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15795), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15774), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15798), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15777), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15801), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15780), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15804), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -836,34 +836,34 @@ static void lim_launched_rc_track_right_twist_down_to_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15772), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15796), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15775), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15799), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15778), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15802), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15781), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15805), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -884,7 +884,7 @@ static void lim_launched_rc_track_right_twist_down_to_up( } /** rct2: 0x008A6D30 */ -static void lim_launched_rc_track_left_twist_up_to_down( +static void LimLaunchedRCTrackLeftTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -896,34 +896,34 @@ static void lim_launched_rc_track_left_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15766), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15790), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15769), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15793), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15760), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15784), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15763), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15787), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } if (direction == 0 || direction == 3) @@ -941,34 +941,34 @@ static void lim_launched_rc_track_left_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15765), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15789), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15768), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15792), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15759), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15783), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15762), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15786), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -983,34 +983,34 @@ static void lim_launched_rc_track_left_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15764), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15788), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15767), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15791), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15758), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15782), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15761), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15785), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1032,7 +1032,7 @@ static void lim_launched_rc_track_left_twist_up_to_down( } /** rct2: 0x008A6D40 */ -static void lim_launched_rc_track_right_twist_up_to_down( +static void LimLaunchedRCTrackRightTwistUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1044,34 +1044,34 @@ static void lim_launched_rc_track_right_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15778), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15802), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15781), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15805), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15772), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15796), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15775), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15799), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 44 }); + { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } if (direction == 0 || direction == 3) @@ -1089,34 +1089,34 @@ static void lim_launched_rc_track_right_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15777), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15801), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15780), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15804), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15771), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15795), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15774), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15798), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1131,34 +1131,34 @@ static void lim_launched_rc_track_right_twist_up_to_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15776), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15800), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15779), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15803), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15770), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15794), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15773), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15797), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 28 }); + { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1180,7 +1180,7 @@ static void lim_launched_rc_track_right_twist_up_to_down( } /** rct2: 0x008A6CD0 */ -static void lim_launched_rc_track_left_corkscrew_up( +static void LimLaunchedRCTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1192,26 +1192,26 @@ static void lim_launched_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15734), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15737), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15740), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15743), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - track_paint_util_left_corkscrew_up_supports(session, direction, height); + TrackPaintUtilLeftCorkscrewUpSupports(session, direction, height); if (direction == 0 || direction == 3) { @@ -1225,22 +1225,22 @@ static void lim_launched_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15735), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15738), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15741), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15744), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -1252,22 +1252,22 @@ static void lim_launched_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15736), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15739), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15742), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15745), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -1291,7 +1291,7 @@ static void lim_launched_rc_track_left_corkscrew_up( } /** rct2: 0x008A6CE0 */ -static void lim_launched_rc_track_right_corkscrew_up( +static void LimLaunchedRCTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1303,22 +1303,22 @@ static void lim_launched_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15746), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15749), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15752), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15755), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1337,22 +1337,22 @@ static void lim_launched_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15747), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15750), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15753), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15756), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -1364,22 +1364,22 @@ static void lim_launched_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15748), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15751), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15754), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15757), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -1403,23 +1403,23 @@ static void lim_launched_rc_track_right_corkscrew_up( } /** rct2: 0x008A6CF0 */ -static void lim_launched_rc_track_left_corkscrew_down( +static void LimLaunchedRCTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_corkscrew_up(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + LimLaunchedRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6D00 */ -static void lim_launched_rc_track_right_corkscrew_down( +static void LimLaunchedRCTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_corkscrew_up(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + LimLaunchedRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6D80 */ -static void lim_launched_rc_track_brakes( +static void LimLaunchedRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1428,17 +1428,17 @@ static void lim_launched_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15018), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15018), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15019), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15019), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1449,7 +1449,7 @@ static void lim_launched_rc_track_brakes( } /** rct2: 0x008A6C10 */ -static void lim_launched_rc_track_90_deg_up( +static void LimLaunchedRCTrack90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1461,22 +1461,22 @@ static void lim_launched_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15702), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15703), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15704), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15705), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -1490,15 +1490,15 @@ static void lim_launched_rc_track_90_deg_up( } /** rct2: 0x008A6C20 */ -static void lim_launched_rc_track_90_deg_down( +static void LimLaunchedRCTrack90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6C30 */ -static void lim_launched_rc_track_60_deg_up_to_90_deg_up( +static void LimLaunchedRCTrack60DegUpTo90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1510,22 +1510,22 @@ static void lim_launched_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15694), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15695), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15696), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15697), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -1543,15 +1543,15 @@ static void lim_launched_rc_track_60_deg_up_to_90_deg_up( } /** rct2: 0x008A6C40 */ -static void lim_launched_rc_track_90_deg_down_to_60_deg_down( +static void LimLaunchedRCTrack90DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_60_deg_up_to_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6C50 */ -static void lim_launched_rc_track_90_deg_up_to_60_deg_up( +static void LimLaunchedRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1559,23 +1559,23 @@ static void lim_launched_rc_track_90_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15698), { 0, 0, height }, { 6, 20, 3 }, - { 0, 6, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15698), { 0, 0, height }, + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15699), { 0, 0, height }, { 2, 20, 31 }, - { 39, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15699), { 0, 0, height }, + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15700), { 0, 0, height }, { 2, 20, 31 }, - { 39, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15700), { 0, 0, height }, + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15701), { 0, 0, height }, { 6, 20, 3 }, - { 0, 6, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15701), { 0, 0, height }, + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; } switch (direction) @@ -1593,7 +1593,7 @@ static void lim_launched_rc_track_90_deg_up_to_60_deg_up( } /** rct2: 0x008A6C60 */ -static void lim_launched_rc_track_60_deg_down_to_90_deg_down( +static void LimLaunchedRCTrack60DegDownTo90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1605,22 +1605,22 @@ static void lim_launched_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15700), { 0, 0, height }, - { 2, 20, 31 }, { 39, 6, height + 8 }); + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15701), { 0, 0, height }, { 6, 20, 3 }, - { 0, 6, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15701), { 0, 0, height }, + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15698), { 0, 0, height }, { 6, 20, 3 }, - { 0, 6, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15698), { 0, 0, height }, + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15699), { 0, 0, height }, - { 2, 20, 31 }, { 39, 6, height + 8 }); + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; } if (direction == 0 || direction == 3) @@ -1637,7 +1637,7 @@ static void lim_launched_rc_track_60_deg_down_to_90_deg_down( } /** rct2: 0x008A6C70 */ -static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( +static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1649,22 +1649,22 @@ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15722), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15725), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15728), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15731), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1677,22 +1677,22 @@ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15723), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15726), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15729), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15732), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1705,22 +1705,22 @@ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15724), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15727), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15730), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15733), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -1735,25 +1735,24 @@ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( } /** rct2: 0x008A6C80 */ -static void lim_launched_rc_track_inverted_flat_to_90_deg_quarter_loop_down( +static void LimLaunchedRCTrackInvertedFlatTo90DegQuarterLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up( - session, ride, 2 - trackSequence, direction, height, trackElement); + LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp(session, ride, 2 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A6D90 */ -static void lim_launched_rc_track_block_brakes( +static void LimLaunchedRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_LimLauncherBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1763,7 +1762,7 @@ static void lim_launched_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void lim_launched_rc_track_left_quarter_turn_1_90_deg_up( +static void LimLaunchedRCTrackLeftQuarterTurn190DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1775,28 +1774,28 @@ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15706), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15707), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15715), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15716), { 0, 0, height }, { 2, 2, 63 }, - { 24, 24, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15716), { 0, 0, height }, + { { 24, 24, height + 8 }, { 2, 2, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15709), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15717), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -1810,7 +1809,7 @@ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_up( } /** rct2: 0x008A6CA0 */ -static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up( +static void LimLaunchedRCTrackRightQuarterTurn190DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1822,28 +1821,28 @@ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15710), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15718), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15719), { 0, 0, height }, { 2, 2, 63 }, - { 24, 24, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15719), { 0, 0, height }, + { { 24, 24, height + 8 }, { 2, 2, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15712), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15720), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15713), { 0, 0, height }, - { 2, 20, 63 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -1857,24 +1856,22 @@ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up( } /** rct2: 0x008A6CB0 */ -static void lim_launched_rc_track_left_quarter_turn_1_90_deg_down( +static void LimLaunchedRCTrackLeftQuarterTurn190DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_quarter_turn_1_90_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LimLaunchedRCTrackRightQuarterTurn190DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6CC0 */ -static void lim_launched_rc_track_right_quarter_turn_1_90_deg_down( +static void LimLaunchedRCTrackRightQuarterTurn190DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_quarter_turn_1_90_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LimLaunchedRCTrackLeftQuarterTurn190DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } -static void lim_launched_rc_track_left_barrel_roll_up_to_down( +static void LimLaunchedRCTrackLeftBarrelRollUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1887,11 +1884,11 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 1), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1899,11 +1896,11 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 7), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1911,11 +1908,11 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 13), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1923,11 +1920,11 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 19), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1948,41 +1945,41 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 3), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 9), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 15), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 21), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1998,41 +1995,41 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 5), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 11), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 17), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 23), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -2052,7 +2049,7 @@ static void lim_launched_rc_track_left_barrel_roll_up_to_down( } } -static void lim_launched_rc_track_right_barrel_roll_up_to_down( +static void LimLaunchedRCTrackRightBarrelRollUpToDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2065,11 +2062,11 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 25), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2077,11 +2074,11 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 31), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2089,11 +2086,11 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 37), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2101,11 +2098,11 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 42), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 43), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2126,41 +2123,41 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 27), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 32), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 33), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 38), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 39), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 44), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 45), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2176,41 +2173,41 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 29), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 34), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 35), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 40), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 41), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 46), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_BARREL_ROLL + 47), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -2230,23 +2227,21 @@ static void lim_launched_rc_track_right_barrel_roll_up_to_down( } } -static void lim_launched_rc_track_left_barrel_roll_down_to_up( +static void LimLaunchedRCTrackLeftBarrelRollDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_barrel_roll_up_to_down( - session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackLeftBarrelRollUpToDown(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_right_barrel_roll_down_to_up( +static void LimLaunchedRCTrackRightBarrelRollDownToUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_barrel_roll_up_to_down( - session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackRightBarrelRollUpToDown(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_half_loop_up( +static void LimLaunchedRCTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2296,7 +2291,7 @@ static void lim_launched_rc_track_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 1), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2304,7 +2299,7 @@ static void lim_launched_rc_track_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 5), - { 0, 14, height }, { 3, 20, 63 }, { 28, 6, height }); + { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2312,7 +2307,7 @@ static void lim_launched_rc_track_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 9), { 0, 6, height }, - { 3, 20, 63 }, { 28, 6, height }); + { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2341,7 +2336,7 @@ static void lim_launched_rc_track_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 6), - { 12, 0, height }, { 3, 16, 119 }, { 12, 0, height }); + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2353,7 +2348,7 @@ static void lim_launched_rc_track_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_HALF_LOOP + 14), - { 16, 16, height }, { 2, 16, 119 }, { 15, 6, height }); + { 16, 16, height }, { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2401,14 +2396,14 @@ static void lim_launched_rc_track_half_loop_up( } } -static void lim_launched_rc_track_half_loop_down( +static void LimLaunchedRCTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_half_loop_up(session, ride, 3 - trackSequence, direction, height, trackElement); + LimLaunchedRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } -static void lim_launched_rc_track_flat_to_60_deg_up_long_base( +static void LimLaunchedRCTrackFlatTo60DegUpLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2421,28 +2416,28 @@ static void lim_launched_rc_track_flat_to_60_deg_up_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2461,28 +2456,28 @@ static void lim_launched_rc_track_flat_to_60_deg_up_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 9), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 13), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2497,28 +2492,28 @@ static void lim_launched_rc_track_flat_to_60_deg_up_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 2), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 6), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2533,28 +2528,28 @@ static void lim_launched_rc_track_flat_to_60_deg_up_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 3), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 7), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 11), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 19, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2573,7 +2568,7 @@ static void lim_launched_rc_track_flat_to_60_deg_up_long_base( break; } } -static void lim_launched_rc_track_60_deg_up_to_flat_long_base( +static void LimLaunchedRCTrack60DegUpToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2586,28 +2581,28 @@ static void lim_launched_rc_track_60_deg_up_to_flat_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 20), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 24), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 24, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2626,28 +2621,28 @@ static void lim_launched_rc_track_60_deg_up_to_flat_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 17), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 29), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2662,28 +2657,28 @@ static void lim_launched_rc_track_60_deg_up_to_flat_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 26), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2698,28 +2693,28 @@ static void lim_launched_rc_track_60_deg_up_to_flat_long_base( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 19), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 23), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 27), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_FLAT_TO_STEEP + 31), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -2739,23 +2734,21 @@ static void lim_launched_rc_track_60_deg_up_to_flat_long_base( } } -static void lim_launched_rc_track_flat_to_60_deg_down_long_base( +static void LimLaunchedRCTrackFlatTo60DegDownLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_60_deg_up_to_flat_long_base( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrack60DegUpToFlatLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_60_deg_down_to_flat_long_base( +static void LimLaunchedRCTrack60DegDownToFlatLongBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_flat_to_60_deg_up_long_base( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackFlatTo60DegUpLongBase(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_left_large_corkscrew_up( +static void LimLaunchedRCTrackLeftLargeCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2768,25 +2761,25 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } @@ -2808,7 +2801,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 34, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2816,7 +2809,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 6), - { 0, 0, height }, { 26, 1, 32 }, { 0, 29, height }); + { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2824,7 +2817,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 11), - { 0, 0, height }, { 20, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2832,7 +2825,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2850,25 +2843,25 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 2), - { 0, 0, height }, { 48, 1, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 7), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 12), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 48 }); + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 17), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2889,7 +2882,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 3), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2897,7 +2890,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 8), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2905,7 +2898,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 13), - { 0, 0, height }, { 24, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2913,7 +2906,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2928,25 +2921,25 @@ static void lim_launched_rc_track_left_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 4), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 9), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 14), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 19), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; } @@ -2968,7 +2961,7 @@ static void lim_launched_rc_track_left_large_corkscrew_up( } } -static void lim_launched_rc_track_right_large_corkscrew_up( +static void LimLaunchedRCTrackRightLargeCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2981,25 +2974,25 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } @@ -3021,7 +3014,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3029,7 +3022,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 26), - { 0, 0, height }, { 20, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3037,7 +3030,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 31), - { 0, 0, height }, { 26, 1, 32 }, { 0, 29, height }); + { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3045,7 +3038,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 34, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3063,25 +3056,25 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 27), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 48 }); + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 32), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 48 }); + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 37), - { 0, 0, height }, { 48, 1, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3102,7 +3095,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 23), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3110,7 +3103,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 28), - { 0, 0, height }, { 24, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3118,7 +3111,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 33), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3126,7 +3119,7 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 38), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3140,25 +3133,25 @@ static void lim_launched_rc_track_right_large_corkscrew_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 24), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 29), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 34), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_CORKSCREW + 39), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; } @@ -3180,21 +3173,21 @@ static void lim_launched_rc_track_right_large_corkscrew_up( } } -static void lim_launched_rc_track_left_large_corkscrew_down( +static void LimLaunchedRCTrackLeftLargeCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_large_corkscrew_up(session, ride, 5 - trackSequence, (direction + 1) & 3, height, trackElement); + LimLaunchedRCTrackRightLargeCorkscrewUp(session, ride, 5 - trackSequence, (direction + 1) & 3, height, trackElement); } -static void lim_launched_rc_track_right_large_corkscrew_down( +static void LimLaunchedRCTrackRightLargeCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_large_corkscrew_up(session, ride, 5 - trackSequence, (direction - 1) & 3, height, trackElement); + LimLaunchedRCTrackLeftLargeCorkscrewUp(session, ride, 5 - trackSequence, (direction - 1) & 3, height, trackElement); } -static void lim_launched_rc_track_left_medium_half_loop_up( +static void LimLaunchedRCTrackLeftMediumHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3207,25 +3200,25 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 5), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -3246,25 +3239,25 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 6), - { 0, 0, height }, { 0, 32, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 11), - { 0, 0, height }, { 40, 0, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -3281,7 +3274,7 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 2), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height + 2 }); + { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3289,7 +3282,7 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 7), - { 0, 0, height }, { 1, 32, 96 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3297,7 +3290,7 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 12), - { 0, 0, height }, { 1, 32, 96 }, { 31, 0, height }); + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3305,7 +3298,7 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 17), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3321,25 +3314,25 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 3), - { 0, 0, height }, { 0, 32, 160 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 0, 32, 160 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 8), - { 0, 0, height }, { 0, 32, 160 }, { 30, 0, height }); + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 13), - { 0, 0, height }, { 1, 32, 160 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 1, 32, 160 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 18), - { 0, 0, height }, { 1, 32, 160 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3353,25 +3346,25 @@ static void lim_launched_rc_track_left_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 4), - { 0, 0, height }, { 32, 32, 1 }, { 0, 2, height + 48 }); + { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 9), - { 0, 0, height }, { 32, 32, 1 }, { 0, 2, height + 48 }); + { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 14), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 19), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; } @@ -3389,7 +3382,7 @@ static void lim_launched_rc_track_left_medium_half_loop_up( } } -static void lim_launched_rc_track_right_medium_half_loop_up( +static void LimLaunchedRCTrackRightMediumHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3402,25 +3395,25 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -3441,25 +3434,25 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 26), - { 0, 0, height }, { 40, 0, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 31), - { 0, 0, height }, { 0, 32, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -3476,7 +3469,7 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 22), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3484,7 +3477,7 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 27), - { 0, 0, height }, { 0, 32, 96 }, { 30, 0, height }); + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3492,7 +3485,7 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 32), - { 0, 0, height }, { 0, 32, 96 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3500,7 +3493,7 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 37), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height + 2 }); + { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3516,25 +3509,25 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 23), - { 0, 0, height }, { 0, 32, 160 }, { -12, 0, height }); + { 0, 0, height }, { { -12, 0, height }, { 0, 32, 160 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 28), - { 0, 0, height }, { 0, 32, 160 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 0, 32, 160 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 33), - { 0, 0, height }, { 0, 32, 160 }, { 30, 0, height }); + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 38), - { 0, 0, height }, { 1, 32, 160 }, { 2, 0, height }); + { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); break; } @@ -3549,25 +3542,25 @@ static void lim_launched_rc_track_right_medium_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 24), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 29), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 34), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_MEDIUM_HALF_LOOP + 39), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; } @@ -3584,21 +3577,21 @@ static void lim_launched_rc_track_right_medium_half_loop_up( } } -static void lim_launched_rc_track_left_medium_half_loop_down( +static void LimLaunchedRCTrackLeftMediumHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_medium_half_loop_up(session, ride, 4 - trackSequence, direction, height, trackElement); + LimLaunchedRCTrackRightMediumHalfLoopUp(session, ride, 4 - trackSequence, direction, height, trackElement); } -static void lim_launched_rc_track_right_medium_half_loop_down( +static void LimLaunchedRCTrackRightMediumHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_medium_half_loop_up(session, ride, 4 - trackSequence, direction, height, trackElement); + LimLaunchedRCTrackLeftMediumHalfLoopUp(session, ride, 4 - trackSequence, direction, height, trackElement); } -static void lim_launched_rc_track_left_zero_g_roll_up( +static void LimLaunchedRCTrackLeftZeroGRollUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3611,11 +3604,11 @@ static void lim_launched_rc_track_left_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 1), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3623,11 +3616,11 @@ static void lim_launched_rc_track_left_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 4), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 5), - { 0, 0, height }, { 32, 1, 32 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3635,7 +3628,7 @@ static void lim_launched_rc_track_left_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 8), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3643,7 +3636,7 @@ static void lim_launched_rc_track_left_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 12), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3664,25 +3657,25 @@ static void lim_launched_rc_track_left_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 2), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 6), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 9), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 13), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3698,33 +3691,33 @@ static void lim_launched_rc_track_left_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 3), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 7), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 10), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 11), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 15), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; } switch (direction) @@ -3746,7 +3739,7 @@ static void lim_launched_rc_track_left_zero_g_roll_up( } } -static void lim_launched_rc_track_right_zero_g_roll_up( +static void LimLaunchedRCTrackRightZeroGRollUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3759,7 +3752,7 @@ static void lim_launched_rc_track_right_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3767,7 +3760,7 @@ static void lim_launched_rc_track_right_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3775,11 +3768,11 @@ static void lim_launched_rc_track_right_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 24), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 25), - { 0, 0, height }, { 32, 1, 32 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3787,11 +3780,11 @@ static void lim_launched_rc_track_right_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 29), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3811,25 +3804,25 @@ static void lim_launched_rc_track_right_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 17), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 26), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 30), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3845,33 +3838,33 @@ static void lim_launched_rc_track_right_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 19), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 23), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 27), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_ZERO_G_ROLL + 31), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; } switch (direction) @@ -3893,21 +3886,21 @@ static void lim_launched_rc_track_right_zero_g_roll_up( } } -static void lim_launched_rc_track_left_zero_g_roll_down( +static void LimLaunchedRCTrackLeftZeroGRollDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_zero_g_roll_up(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackLeftZeroGRollUp(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_right_zero_g_roll_down( +static void LimLaunchedRCTrackRightZeroGRollDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_zero_g_roll_up(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackRightZeroGRollUp(session, ride, 2 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_left_large_zero_g_roll_up( +static void LimLaunchedRCTrackLeftLargeZeroGRollUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3920,29 +3913,29 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 5), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 9), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 10), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 25, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3961,29 +3954,29 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 2), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 6), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 11), - { 0, 0, height }, { 32, 0, 64 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 16), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3997,29 +3990,29 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 3), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 7), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 12), - { 0, 0, height }, { 32, 0, 48 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 17), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 18), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4039,7 +4032,7 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 4), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4047,7 +4040,7 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 8), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4055,11 +4048,11 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 13), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4067,7 +4060,7 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 19), - { 0, 0, height }, { 32, 10, 20 }, { 0, 18, height }); + { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4086,7 +4079,7 @@ static void lim_launched_rc_track_left_large_zero_g_roll_up( } } -static void lim_launched_rc_track_right_large_zero_g_roll_up( +static void LimLaunchedRCTrackRightLargeZeroGRollUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4099,29 +4092,29 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 20), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 25), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 26), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 31), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 25, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4140,29 +4133,29 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 27), - { 0, 0, height }, { 32, 0, 64 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 32), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 37), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4176,29 +4169,29 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 22), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 23), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 28), - { 0, 0, height }, { 32, 0, 48 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 33), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 38), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; } @@ -4219,7 +4212,7 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 24), - { 0, 0, height }, { 32, 10, 20 }, { 0, 18, height }); + { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4227,11 +4220,11 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 29), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 30), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4239,7 +4232,7 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 34), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4247,7 +4240,7 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_ZERO_G_ROLL + 39), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4266,23 +4259,21 @@ static void lim_launched_rc_track_right_large_zero_g_roll_up( } } -static void lim_launched_rc_track_left_large_zero_g_roll_down( +static void LimLaunchedRCTrackLeftLargeZeroGRollDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_large_zero_g_roll_up( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackLeftLargeZeroGRollUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_right_large_zero_g_roll_down( +static void LimLaunchedRCTrackRightLargeZeroGRollDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_large_zero_g_roll_up( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackRightLargeZeroGRollUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( +static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4305,7 +4296,7 @@ static void lim_launched_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 3), - { 0, 6, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4342,25 +4333,25 @@ static void lim_launched_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 1), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 4), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 6), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 8), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); @@ -4380,7 +4371,7 @@ static void lim_launched_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( } } -static void lim_launched_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( +static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4409,7 +4400,7 @@ static void lim_launched_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 14), - { 0, 6, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4440,25 +4431,25 @@ static void lim_launched_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 10), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 12), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 15), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 17), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); @@ -4478,7 +4469,7 @@ static void lim_launched_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( } } -static void lim_launched_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( +static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4491,25 +4482,25 @@ static void lim_launched_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 12), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 15), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 17), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 10), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); @@ -4544,7 +4535,7 @@ static void lim_launched_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 14), - { 6, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4576,7 +4567,7 @@ static void lim_launched_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( } } -static void lim_launched_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( +static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4589,25 +4580,25 @@ static void lim_launched_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 8), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 1), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 4), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 6), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height - 6, session.TrackColours[SCHEME_SUPPORTS]); @@ -4648,7 +4639,7 @@ static void lim_launched_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_TURN_BANK_TRANSITION + 3), - { 6, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4674,7 +4665,7 @@ static void lim_launched_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank } } -static void lim_launched_rc_track_left_large_half_loop_up( +static void LimLaunchedRCTrackLeftLargeHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4687,25 +4678,25 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 0), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 7), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 14), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 21), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4724,7 +4715,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 1), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4732,7 +4723,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 8), - { 0, 0, height }, { 32, 20, 9 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4740,7 +4731,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 15), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4748,7 +4739,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 22), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4764,25 +4755,25 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 2), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 9), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 70 }); + { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 16), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 70 }); + { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 23), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4798,7 +4789,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 3), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4806,7 +4797,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 10), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4814,7 +4805,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 17), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4822,7 +4813,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 24), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4840,25 +4831,25 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 4), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 11), - { 0, 0, height }, { 16, 16, 0 }, { 0, 16, height + 110 }); + { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 18), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 100 }); + { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 25), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4872,25 +4863,25 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 5), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 12), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 19), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 26), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4906,25 +4897,25 @@ static void lim_launched_rc_track_left_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 6), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 13), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 20), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 27), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; } if (direction == 0 || direction == 3) @@ -4940,7 +4931,7 @@ static void lim_launched_rc_track_left_large_half_loop_up( } } -static void lim_launched_rc_track_right_large_half_loop_up( +static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4953,25 +4944,25 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 28), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 35), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 42), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 49), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4990,7 +4981,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 29), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4998,7 +4989,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 36), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5006,7 +4997,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 43), - { 0, 0, height }, { 32, 20, 9 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5014,7 +5005,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 50), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5030,25 +5021,25 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 30), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 37), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 70 }); + { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 44), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 70 }); + { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 51), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5064,7 +5055,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 31), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5072,7 +5063,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 38), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5080,7 +5071,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 45), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5088,7 +5079,7 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 52), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5106,25 +5097,25 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 32), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 39), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 100 }); + { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 46), - { 0, 0, height }, { 16, 16, 0 }, { 0, 16, height + 110 }); + { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 53), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5138,25 +5129,25 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 33), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 40), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 47), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 54), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5172,25 +5163,25 @@ static void lim_launched_rc_track_right_large_half_loop_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 34), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 41), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 48), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_LARGE_HALF_LOOP + 55), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; } if (direction == 0 || direction == 3) @@ -5206,21 +5197,21 @@ static void lim_launched_rc_track_right_large_half_loop_up( } } -static void lim_launched_rc_track_right_large_half_loop_down( +static void LimLaunchedRCTrackRightLargeHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_right_large_half_loop_up(session, ride, 6 - trackSequence, direction, height, trackElement); + LimLaunchedRCTrackRightLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } -static void lim_launched_rc_track_left_large_half_loop_down( +static void LimLaunchedRCTrackLeftLargeHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_left_large_half_loop_up(session, ride, 6 - trackSequence, direction, height, trackElement); + LimLaunchedRCTrackLeftLargeHalfLoopUp(session, ride, 6 - trackSequence, direction, height, trackElement); } -static void lim_launched_rc_track_flat_to_60_deg_up( +static void LimLaunchedRCTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5230,36 +5221,36 @@ static void lim_launched_rc_track_flat_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 0), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 2), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 1), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 4), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 3), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 5), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5276,7 +5267,7 @@ static void lim_launched_rc_track_flat_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); } -static void lim_launched_rc_track_60_deg_up_to_flat( +static void LimLaunchedRCTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5286,33 +5277,33 @@ static void lim_launched_rc_track_60_deg_up_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 6), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 7), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 8), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 10), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 9), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 11), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5329,21 +5320,21 @@ static void lim_launched_rc_track_60_deg_up_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void lim_launched_rc_track_flat_to_60_deg_down( +static void LimLaunchedRCTrackFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_60_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_60_deg_down_to_flat( +static void LimLaunchedRCTrack60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - lim_launched_rc_track_flat_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LimLaunchedRCTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void lim_launched_rc_track_diag_flat_to_60_deg_up( +static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5356,7 +5347,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 15), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5370,7 +5361,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 12), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5384,7 +5375,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 14), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5402,7 +5393,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 13), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5422,7 +5413,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_up( } } -static void lim_launched_rc_track_diag_60_deg_up_to_flat( +static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5435,7 +5426,7 @@ static void lim_launched_rc_track_diag_60_deg_up_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 19), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5449,7 +5440,7 @@ static void lim_launched_rc_track_diag_60_deg_up_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 16), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5463,7 +5454,7 @@ static void lim_launched_rc_track_diag_60_deg_up_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 18), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5481,7 +5472,7 @@ static void lim_launched_rc_track_diag_60_deg_up_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 17), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5501,7 +5492,7 @@ static void lim_launched_rc_track_diag_60_deg_up_to_flat( } } -static void lim_launched_rc_track_diag_flat_to_60_deg_down( +static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5514,7 +5505,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 17), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5528,7 +5519,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 18), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5542,7 +5533,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 16), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5560,7 +5551,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_down( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 19), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5580,7 +5571,7 @@ static void lim_launched_rc_track_diag_flat_to_60_deg_down( } } -static void lim_launched_rc_track_diag_60_deg_down_to_flat( +static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5593,7 +5584,7 @@ static void lim_launched_rc_track_diag_60_deg_down_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 13), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5607,7 +5598,7 @@ static void lim_launched_rc_track_diag_60_deg_down_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 14), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5621,7 +5612,7 @@ static void lim_launched_rc_track_diag_60_deg_down_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 12), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5639,7 +5630,7 @@ static void lim_launched_rc_track_diag_60_deg_down_to_flat( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_LIM_LAUNCHED_TRACK_SMALL_FLAT_TO_STEEP + 15), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5659,7 +5650,7 @@ static void lim_launched_rc_track_diag_60_deg_down_to_flat( } } -static void lim_launched_rc_track_booster( +static void LimLaunchedRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5668,23 +5659,23 @@ static void lim_launched_rc_track_booster( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15012), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15012), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15014), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15014), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15013), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15013), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15015), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15015), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5694,7 +5685,7 @@ static void lim_launched_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLimLaunchedRC(int32_t trackType) { switch (trackType) { @@ -5828,145 +5819,145 @@ TRACK_PAINT_FUNCTION get_track_paint_function_lim_launched_rc(int32_t trackType) case TrackElemType::FlatToRightBankedDown25: case TrackElemType::LeftBankedDown25ToFlat: case TrackElemType::RightBankedDown25ToFlat: - return get_track_paint_function_looping_rc(trackType); + return GetTrackPaintFunctionLoopingRC(trackType); case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return lim_launched_rc_track_station; + return LimLaunchedRCTrackStation; case TrackElemType::LeftVerticalLoop: - return lim_launched_rc_track_left_vertical_loop; + return LimLaunchedRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return lim_launched_rc_track_right_vertical_loop; + return LimLaunchedRCTrackRightVerticalLoop; case TrackElemType::LeftTwistDownToUp: - return lim_launched_rc_track_left_twist_down_to_up; + return LimLaunchedRCTrackLeftTwistDownToUp; case TrackElemType::RightTwistDownToUp: - return lim_launched_rc_track_right_twist_down_to_up; + return LimLaunchedRCTrackRightTwistDownToUp; case TrackElemType::LeftTwistUpToDown: - return lim_launched_rc_track_left_twist_up_to_down; + return LimLaunchedRCTrackLeftTwistUpToDown; case TrackElemType::RightTwistUpToDown: - return lim_launched_rc_track_right_twist_up_to_down; + return LimLaunchedRCTrackRightTwistUpToDown; case TrackElemType::LeftCorkscrewUp: - return lim_launched_rc_track_left_corkscrew_up; + return LimLaunchedRCTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return lim_launched_rc_track_right_corkscrew_up; + return LimLaunchedRCTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return lim_launched_rc_track_left_corkscrew_down; + return LimLaunchedRCTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return lim_launched_rc_track_right_corkscrew_down; + return LimLaunchedRCTrackRightCorkscrewDown; case TrackElemType::Brakes: - return lim_launched_rc_track_brakes; + return LimLaunchedRCTrackBrakes; case TrackElemType::Up90: - return lim_launched_rc_track_90_deg_up; + return LimLaunchedRCTrack90DegUp; case TrackElemType::Down90: - return lim_launched_rc_track_90_deg_down; + return LimLaunchedRCTrack90DegDown; case TrackElemType::Up60ToUp90: - return lim_launched_rc_track_60_deg_up_to_90_deg_up; + return LimLaunchedRCTrack60DegUpTo90DegUp; case TrackElemType::Down90ToDown60: - return lim_launched_rc_track_90_deg_down_to_60_deg_down; + return LimLaunchedRCTrack90DegDownTo60DegDown; case TrackElemType::Up90ToUp60: - return lim_launched_rc_track_90_deg_up_to_60_deg_up; + return LimLaunchedRCTrack90DegUpTo60DegUp; case TrackElemType::Down60ToDown90: - return lim_launched_rc_track_60_deg_down_to_90_deg_down; + return LimLaunchedRCTrack60DegDownTo90DegDown; case TrackElemType::Up90ToInvertedFlatQuarterLoop: - return lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up; + return LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp; case TrackElemType::InvertedFlatToDown90QuarterLoop: - return lim_launched_rc_track_inverted_flat_to_90_deg_quarter_loop_down; + return LimLaunchedRCTrackInvertedFlatTo90DegQuarterLoopDown; case TrackElemType::BlockBrakes: - return lim_launched_rc_track_block_brakes; + return LimLaunchedRCTrackBlockBrakes; case TrackElemType::LeftQuarterTurn1TileUp90: - return lim_launched_rc_track_left_quarter_turn_1_90_deg_up; + return LimLaunchedRCTrackLeftQuarterTurn190DegUp; case TrackElemType::RightQuarterTurn1TileUp90: - return lim_launched_rc_track_right_quarter_turn_1_90_deg_up; + return LimLaunchedRCTrackRightQuarterTurn190DegUp; case TrackElemType::LeftQuarterTurn1TileDown90: - return lim_launched_rc_track_left_quarter_turn_1_90_deg_down; + return LimLaunchedRCTrackLeftQuarterTurn190DegDown; case TrackElemType::RightQuarterTurn1TileDown90: - return lim_launched_rc_track_right_quarter_turn_1_90_deg_down; + return LimLaunchedRCTrackRightQuarterTurn190DegDown; case TrackElemType::FlatToUp60LongBase: - return lim_launched_rc_track_flat_to_60_deg_up_long_base; + return LimLaunchedRCTrackFlatTo60DegUpLongBase; case TrackElemType::Up60ToFlatLongBase: - return lim_launched_rc_track_60_deg_up_to_flat_long_base; + return LimLaunchedRCTrack60DegUpToFlatLongBase; case TrackElemType::FlatToDown60LongBase: - return lim_launched_rc_track_flat_to_60_deg_down_long_base; + return LimLaunchedRCTrackFlatTo60DegDownLongBase; case TrackElemType::Down60ToFlatLongBase: - return lim_launched_rc_track_60_deg_down_to_flat_long_base; + return LimLaunchedRCTrack60DegDownToFlatLongBase; case TrackElemType::FlatToUp60: - return lim_launched_rc_track_flat_to_60_deg_up; + return LimLaunchedRCTrackFlatTo60DegUp; case TrackElemType::Up60ToFlat: - return lim_launched_rc_track_60_deg_up_to_flat; + return LimLaunchedRCTrack60DegUpToFlat; case TrackElemType::FlatToDown60: - return lim_launched_rc_track_flat_to_60_deg_down; + return LimLaunchedRCTrackFlatTo60DegDown; case TrackElemType::Down60ToFlat: - return lim_launched_rc_track_60_deg_down_to_flat; + return LimLaunchedRCTrack60DegDownToFlat; case TrackElemType::DiagFlatToUp60: - return lim_launched_rc_track_diag_flat_to_60_deg_up; + return LimLaunchedRCTrackDiagFlatTo60DegUp; case TrackElemType::DiagUp60ToFlat: - return lim_launched_rc_track_diag_60_deg_up_to_flat; + return LimLaunchedRCTrackDiag60DegUpToFlat; case TrackElemType::DiagFlatToDown60: - return lim_launched_rc_track_diag_flat_to_60_deg_down; + return LimLaunchedRCTrackDiagFlatTo60DegDown; case TrackElemType::DiagDown60ToFlat: - return lim_launched_rc_track_diag_60_deg_down_to_flat; + return LimLaunchedRCTrackDiag60DegDownToFlat; case TrackElemType::LeftBarrelRollUpToDown: - return lim_launched_rc_track_left_barrel_roll_up_to_down; + return LimLaunchedRCTrackLeftBarrelRollUpToDown; case TrackElemType::RightBarrelRollUpToDown: - return lim_launched_rc_track_right_barrel_roll_up_to_down; + return LimLaunchedRCTrackRightBarrelRollUpToDown; case TrackElemType::LeftBarrelRollDownToUp: - return lim_launched_rc_track_left_barrel_roll_down_to_up; + return LimLaunchedRCTrackLeftBarrelRollDownToUp; case TrackElemType::RightBarrelRollDownToUp: - return lim_launched_rc_track_right_barrel_roll_down_to_up; + return LimLaunchedRCTrackRightBarrelRollDownToUp; case TrackElemType::LeftBankToLeftQuarterTurn3TilesUp25: - return lim_launched_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up; + return LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp; case TrackElemType::RightBankToRightQuarterTurn3TilesUp25: - return lim_launched_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up; + return LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25ToLeftBank: - return lim_launched_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank; + return LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank; case TrackElemType::RightQuarterTurn3TilesDown25ToRightBank: - return lim_launched_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank; + return LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank; case TrackElemType::HalfLoopUp: - return lim_launched_rc_track_half_loop_up; + return LimLaunchedRCTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return lim_launched_rc_track_half_loop_down; + return LimLaunchedRCTrackHalfLoopDown; case TrackElemType::LeftMediumHalfLoopUp: - return lim_launched_rc_track_left_medium_half_loop_up; + return LimLaunchedRCTrackLeftMediumHalfLoopUp; case TrackElemType::RightMediumHalfLoopUp: - return lim_launched_rc_track_right_medium_half_loop_up; + return LimLaunchedRCTrackRightMediumHalfLoopUp; case TrackElemType::LeftMediumHalfLoopDown: - return lim_launched_rc_track_left_medium_half_loop_down; + return LimLaunchedRCTrackLeftMediumHalfLoopDown; case TrackElemType::RightMediumHalfLoopDown: - return lim_launched_rc_track_right_medium_half_loop_down; + return LimLaunchedRCTrackRightMediumHalfLoopDown; case TrackElemType::LeftLargeHalfLoopUp: - return lim_launched_rc_track_left_large_half_loop_up; + return LimLaunchedRCTrackLeftLargeHalfLoopUp; case TrackElemType::RightLargeHalfLoopUp: - return lim_launched_rc_track_right_large_half_loop_up; + return LimLaunchedRCTrackRightLargeHalfLoopUp; case TrackElemType::RightLargeHalfLoopDown: - return lim_launched_rc_track_right_large_half_loop_down; + return LimLaunchedRCTrackRightLargeHalfLoopDown; case TrackElemType::LeftLargeHalfLoopDown: - return lim_launched_rc_track_left_large_half_loop_down; + return LimLaunchedRCTrackLeftLargeHalfLoopDown; case TrackElemType::LeftLargeCorkscrewUp: - return lim_launched_rc_track_left_large_corkscrew_up; + return LimLaunchedRCTrackLeftLargeCorkscrewUp; case TrackElemType::RightLargeCorkscrewUp: - return lim_launched_rc_track_right_large_corkscrew_up; + return LimLaunchedRCTrackRightLargeCorkscrewUp; case TrackElemType::LeftLargeCorkscrewDown: - return lim_launched_rc_track_left_large_corkscrew_down; + return LimLaunchedRCTrackLeftLargeCorkscrewDown; case TrackElemType::RightLargeCorkscrewDown: - return lim_launched_rc_track_right_large_corkscrew_down; + return LimLaunchedRCTrackRightLargeCorkscrewDown; case TrackElemType::LeftZeroGRollUp: - return lim_launched_rc_track_left_zero_g_roll_up; + return LimLaunchedRCTrackLeftZeroGRollUp; case TrackElemType::RightZeroGRollUp: - return lim_launched_rc_track_right_zero_g_roll_up; + return LimLaunchedRCTrackRightZeroGRollUp; case TrackElemType::LeftZeroGRollDown: - return lim_launched_rc_track_left_zero_g_roll_down; + return LimLaunchedRCTrackLeftZeroGRollDown; case TrackElemType::RightZeroGRollDown: - return lim_launched_rc_track_right_zero_g_roll_down; + return LimLaunchedRCTrackRightZeroGRollDown; case TrackElemType::LeftLargeZeroGRollUp: - return lim_launched_rc_track_left_large_zero_g_roll_up; + return LimLaunchedRCTrackLeftLargeZeroGRollUp; case TrackElemType::RightLargeZeroGRollUp: - return lim_launched_rc_track_right_large_zero_g_roll_up; + return LimLaunchedRCTrackRightLargeZeroGRollUp; case TrackElemType::LeftLargeZeroGRollDown: - return lim_launched_rc_track_left_large_zero_g_roll_down; + return LimLaunchedRCTrackLeftLargeZeroGRollDown; case TrackElemType::RightLargeZeroGRollDown: - return lim_launched_rc_track_right_large_zero_g_roll_down; + return LimLaunchedRCTrackRightLargeZeroGRollDown; case TrackElemType::Booster: - return lim_launched_rc_track_booster; + return LimLaunchedRCTrackBooster; } return nullptr; } diff --git a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index e340496ae0..763d723f85 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,7 +25,7 @@ static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_SW_NE = 15016; static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_NW_SE = 15017; /** rct2: 0x008A6370 */ -static void looping_rc_track_flat( +static void LoopingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -35,26 +35,26 @@ static void looping_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15006), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15006), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15007), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15007), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15008), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15008), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15009), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15009), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -66,17 +66,17 @@ static void looping_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -87,7 +87,7 @@ static void looping_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void looping_rc_track_station( +static void LoopingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -103,23 +103,23 @@ static void looping_rc_track_station( { SPR_LOOPING_RC_FLAT_CHAINED_SW_NE, SPR_STATION_BASE_B_SW_NE }, { SPR_LOOPING_RC_FLAT_CHAINED_NW_SE, SPR_STATION_BASE_B_NW_SE }, }; - const auto& imageIds = is_csg_loaded() ? imageIdsFrictionWheels : imageIdsShuttleLaunch; + const auto& imageIds = IsCsgLoaded() ? imageIdsFrictionWheels : imageIdsShuttleLaunch; PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A6380 */ -static void looping_rc_track_25_deg_up( +static void LoopingRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -129,26 +129,26 @@ static void looping_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15060), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15060), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15061), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15061), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15062), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15062), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15063), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15063), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -159,26 +159,26 @@ static void looping_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15032), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15032), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15033), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15033), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15034), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15034), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15035), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15035), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -197,7 +197,7 @@ static void looping_rc_track_25_deg_up( } /** rct2: 0x008A6390 */ -static void looping_rc_track_60_deg_up( +static void LoopingRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -207,26 +207,26 @@ static void looping_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15076), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15076), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15077), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15077), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15078), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15078), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15079), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15079), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -237,26 +237,26 @@ static void looping_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15048), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15048), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15049), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15049), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15050), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15050), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15051), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15051), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -275,7 +275,7 @@ static void looping_rc_track_60_deg_up( } /** rct2: 0x008A63A0 */ -static void looping_rc_track_flat_to_25_deg_up( +static void LoopingRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -285,26 +285,26 @@ static void looping_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15052), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15052), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15053), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15053), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15054), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15054), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15055), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15055), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -315,26 +315,26 @@ static void looping_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15024), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15024), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15025), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15025), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15026), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15026), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15027), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15027), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -353,7 +353,7 @@ static void looping_rc_track_flat_to_25_deg_up( } /** rct2: 0x008A63B0 */ -static void looping_rc_track_25_deg_up_to_60_deg_up( +static void LoopingRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -363,32 +363,32 @@ static void looping_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15064), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15064), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15065), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15065), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15068), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15068), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15066), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15066), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15069), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15069), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15067), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15067), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -399,32 +399,32 @@ static void looping_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15036), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15036), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15037), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15037), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15040), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15040), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15038), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15038), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15041), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15041), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15039), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15039), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -443,7 +443,7 @@ static void looping_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008A63C0 */ -static void looping_rc_track_60_deg_up_to_25_deg_up( +static void LoopingRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -453,32 +453,32 @@ static void looping_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15070), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15070), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15071), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15071), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15074), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15074), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15072), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15072), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15075), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15075), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15073), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15073), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -489,32 +489,32 @@ static void looping_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15042), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15042), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15043), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15043), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15046), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15046), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15044), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15044), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15047), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15047), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15045), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15045), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -533,7 +533,7 @@ static void looping_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008A63D0 */ -static void looping_rc_track_25_deg_up_to_flat( +static void LoopingRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -543,26 +543,26 @@ static void looping_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15056), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15056), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15057), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15057), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15058), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15058), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15059), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15059), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -573,26 +573,26 @@ static void looping_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15028), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15028), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15029), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15029), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15030), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15030), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15031), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15031), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -611,55 +611,55 @@ static void looping_rc_track_25_deg_up_to_flat( } /** rct2: 0x008A63E0 */ -static void looping_rc_track_25_deg_down( +static void LoopingRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A63F0 */ -static void looping_rc_track_60_deg_down( +static void LoopingRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6400 */ -static void looping_rc_track_flat_to_25_deg_down( +static void LoopingRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6410 */ -static void looping_rc_track_25_deg_down_to_60_deg_down( +static void LoopingRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6420 */ -static void looping_rc_track_60_deg_down_to_25_deg_down( +static void LoopingRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6430 */ -static void looping_rc_track_25_deg_down_to_flat( +static void LoopingRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6440 */ -static void looping_rc_track_left_quarter_turn_5( +static void LoopingRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -671,22 +671,22 @@ static void looping_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15183), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15188), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15193), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15178), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -707,22 +707,22 @@ static void looping_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15182), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15187), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15192), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15177), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -737,22 +737,22 @@ static void looping_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15181), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15186), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15191), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15176), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -768,22 +768,22 @@ static void looping_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15180), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15185), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15190), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15175), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -798,22 +798,22 @@ static void looping_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15179), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15184), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15189), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15174), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -834,16 +834,16 @@ static void looping_rc_track_left_quarter_turn_5( } /** rct2: 0x008A6450 */ -static void looping_rc_track_right_quarter_turn_5( +static void LoopingRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6460 */ -static void looping_rc_track_flat_to_left_bank( +static void LoopingRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -851,32 +851,32 @@ static void looping_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15080), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15080), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15092), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15092), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15081), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15081), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15093), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15093), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15082), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15082), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15083), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15083), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -887,7 +887,7 @@ static void looping_rc_track_flat_to_left_bank( } /** rct2: 0x008A6470 */ -static void looping_rc_track_flat_to_right_bank( +static void LoopingRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -895,32 +895,32 @@ static void looping_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15084), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15084), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15085), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15085), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15086), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15086), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15094), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15094), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15087), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15087), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15095), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15095), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -931,7 +931,7 @@ static void looping_rc_track_flat_to_right_bank( } /** rct2: 0x008A6480 */ -static void looping_rc_track_left_bank_to_flat( +static void LoopingRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -939,32 +939,32 @@ static void looping_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15086), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15086), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15094), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15094), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15087), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15087), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15095), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15095), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15084), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15084), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15085), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15085), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -975,7 +975,7 @@ static void looping_rc_track_left_bank_to_flat( } /** rct2: 0x008A6490 */ -static void looping_rc_track_right_bank_to_flat( +static void LoopingRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -983,32 +983,32 @@ static void looping_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15082), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15082), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15083), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15083), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15080), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15080), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15092), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15092), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15081), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15081), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15093), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15093), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1019,7 +1019,7 @@ static void looping_rc_track_right_bank_to_flat( } /** rct2: 0x008A64A0 */ -static void looping_rc_track_banked_left_quarter_turn_5( +static void LoopingRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1031,25 +1031,25 @@ static void looping_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15203), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15214), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15208), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15213), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15198), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1070,22 +1070,22 @@ static void looping_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15202), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15207), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15212), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15197), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1100,22 +1100,22 @@ static void looping_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15201), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15206), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15211), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15196), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1131,22 +1131,22 @@ static void looping_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15200), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15205), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15210), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15195), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1161,25 +1161,25 @@ static void looping_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15199), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15204), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15209), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15215), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15194), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1200,16 +1200,16 @@ static void looping_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008A64B0 */ -static void looping_rc_track_banked_right_quarter_turn_5( +static void LoopingRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A64C0 */ -static void looping_rc_track_left_bank_to_25_deg_up( +static void LoopingRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1217,32 +1217,32 @@ static void looping_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15096), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15096), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15112), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15112), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15097), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15097), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15113), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15113), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15098), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15098), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15099), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15099), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1260,7 +1260,7 @@ static void looping_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008A64D0 */ -static void looping_rc_track_right_bank_to_25_deg_up( +static void LoopingRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1268,32 +1268,32 @@ static void looping_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15100), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15100), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15101), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15101), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15102), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15102), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15114), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15114), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15103), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15103), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15115), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15115), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1311,7 +1311,7 @@ static void looping_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008A64E0 */ -static void looping_rc_track_25_deg_up_to_left_bank( +static void LoopingRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1319,32 +1319,32 @@ static void looping_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15104), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15104), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15116), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15116), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15105), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15105), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15117), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15117), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15106), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15106), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15107), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15107), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1362,7 +1362,7 @@ static void looping_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008A64F0 */ -static void looping_rc_track_25_deg_up_to_right_bank( +static void LoopingRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1370,32 +1370,32 @@ static void looping_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15108), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15108), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15109), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15109), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15110), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15110), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15118), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15118), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15111), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15111), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15119), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15119), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1413,39 +1413,39 @@ static void looping_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008A6500 */ -static void looping_rc_track_left_bank_to_25_deg_down( +static void LoopingRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6510 */ -static void looping_rc_track_right_bank_to_25_deg_down( +static void LoopingRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6520 */ -static void looping_rc_track_25_deg_down_to_left_bank( +static void LoopingRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6530 */ -static void looping_rc_track_25_deg_down_to_right_bank( +static void LoopingRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6540 */ -static void looping_rc_track_left_bank( +static void LoopingRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1453,26 +1453,26 @@ static void looping_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15088), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15088), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15089), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15089), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15090), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15090), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15091), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15091), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1483,15 +1483,15 @@ static void looping_rc_track_left_bank( } /** rct2: 0x008A6550 */ -static void looping_rc_track_right_bank( +static void LoopingRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6560 */ -static void looping_rc_track_left_quarter_turn_5_25_deg_up( +static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1503,22 +1503,22 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15296), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15301), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15306), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15311), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1549,12 +1549,12 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15307), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15312), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1569,17 +1569,17 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15298), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15303), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15308), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1600,7 +1600,7 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15299), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1615,7 +1615,7 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15314), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1630,22 +1630,22 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15300), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15305), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15310), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15315), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1666,7 +1666,7 @@ static void looping_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008A6570 */ -static void looping_rc_track_right_quarter_turn_5_25_deg_up( +static void LoopingRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1678,22 +1678,22 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15276), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15281), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15286), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15291), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1714,12 +1714,12 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15277), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15282), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1749,17 +1749,17 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15283), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15288), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15293), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1775,7 +1775,7 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15279), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1790,7 +1790,7 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15294), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1805,22 +1805,22 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15280), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15285), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15290), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15295), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1841,25 +1841,25 @@ static void looping_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008A6580 */ -static void looping_rc_track_left_quarter_turn_5_25_deg_down( +static void LoopingRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6590 */ -static void looping_rc_track_right_quarter_turn_5_25_deg_down( +static void LoopingRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A65A0 */ -static void looping_rc_track_s_bend_left( +static void LoopingRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1871,22 +1871,22 @@ static void looping_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15260), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15264), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15263), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15267), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1918,12 +1918,12 @@ static void looping_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15262), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15266), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1938,12 +1938,12 @@ static void looping_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15262), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15266), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1972,22 +1972,22 @@ static void looping_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15263), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15267), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15260), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15264), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2008,7 +2008,7 @@ static void looping_rc_track_s_bend_left( } /** rct2: 0x008A65B0 */ -static void looping_rc_track_s_bend_right( +static void LoopingRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2020,22 +2020,22 @@ static void looping_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15268), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15272), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15271), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15275), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2053,14 +2053,14 @@ static void looping_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15269), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15273), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2097,14 +2097,14 @@ static void looping_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15269), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15273), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2121,22 +2121,22 @@ static void looping_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15271), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15275), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15268), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15272), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2157,7 +2157,7 @@ static void looping_rc_track_s_bend_right( } /** rct2: 0x008A65C0 */ -static void looping_rc_track_left_vertical_loop( +static void LoopingRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2233,42 +2233,42 @@ static void looping_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15350), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_CENTRED, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15364), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15358), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15366), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15353), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15365), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15361), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15367), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2347,42 +2347,42 @@ static void looping_rc_track_left_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15353), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15365), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15361), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15367), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15350), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_CENTRED, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15364), { 16, 0, height }, - { 3, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15358), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15366), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2462,7 +2462,7 @@ static void looping_rc_track_left_vertical_loop( } /** rct2: 0x008A65D0 */ -static void looping_rc_track_right_vertical_loop( +static void LoopingRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2530,42 +2530,42 @@ static void looping_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15381), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15384), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15373), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15386), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15378), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15385), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15370), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT_CENTRED, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15387), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -2634,42 +2634,42 @@ static void looping_rc_track_right_vertical_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15378), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15385), { 12, 0, height }, - { 3, 16, 119 }, { 12, 0, height }); + { { 12, 0, height }, { 3, 16, 119 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15370), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT_CENTRED, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15387), { 16, 0, height }, - { 2, 16, 119 }, { 16, 0, height }); + { { 16, 0, height }, { 2, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15381), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15384), { 16, 16, height }, - { 2, 16, 119 }, { 16, 16, height }); + { { 16, 16, height }, { 2, 16, 119 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15373), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_THICK_ALT, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15386), { 10, 16, height }, - { 4, 16, 119 }, { 10, 16, height }); + { { 10, 16, height }, { 4, 16, 119 } }); break; } PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20); @@ -2737,11 +2737,11 @@ static void looping_rc_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } /** rct2: 0x008A6630 */ -static void looping_rc_track_left_quarter_turn_3( +static void LoopingRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2753,22 +2753,22 @@ static void looping_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15125), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15128), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15131), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15122), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2789,22 +2789,22 @@ static void looping_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15124), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15127), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15130), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15121), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2817,22 +2817,22 @@ static void looping_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15123), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15126), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15129), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15120), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2853,16 +2853,16 @@ static void looping_rc_track_left_quarter_turn_3( } /** rct2: 0x008A6640 */ -static void looping_rc_track_right_quarter_turn_3( +static void LoopingRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6650 */ -static void looping_rc_track_left_quarter_turn_3_bank( +static void LoopingRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2874,25 +2874,25 @@ static void looping_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15137), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15144), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15140), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15143), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15134), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2913,22 +2913,22 @@ static void looping_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15136), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15139), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15142), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15133), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2941,25 +2941,25 @@ static void looping_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15135), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15138), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15141), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15145), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15132), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2980,16 +2980,16 @@ static void looping_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008A6660 */ -static void looping_rc_track_right_quarter_turn_3_bank( +static void LoopingRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6670 */ -static void looping_rc_track_left_quarter_turn_3_25_deg_up( +static void LoopingRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3076,7 +3076,7 @@ static void looping_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008A6680 */ -static void looping_rc_track_right_quarter_turn_3_25_deg_up( +static void LoopingRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3170,25 +3170,25 @@ static void looping_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008A6690 */ -static void looping_rc_track_left_quarter_turn_3_25_deg_down( +static void LoopingRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A66A0 */ -static void looping_rc_track_right_quarter_turn_3_25_deg_down( +static void LoopingRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A66B0 */ -static void looping_rc_track_left_half_banked_helix_up_small( +static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3200,25 +3200,25 @@ static void looping_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15165), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15172), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15168), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15171), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15162), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3240,22 +3240,22 @@ static void looping_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15164), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15167), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15170), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15161), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3268,25 +3268,25 @@ static void looping_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15163), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15166), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15169), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15173), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15160), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3310,25 +3310,25 @@ static void looping_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15162), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15165), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15172), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15168), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15171), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3355,22 +3355,22 @@ static void looping_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15161), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15164), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15167), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15170), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3383,25 +3383,25 @@ static void looping_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15160), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15163), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15166), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15169), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15173), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3418,7 +3418,7 @@ static void looping_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x008A66C0 */ -static void looping_rc_track_right_half_banked_helix_up_small( +static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3430,25 +3430,25 @@ static void looping_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15146), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15149), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15152), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15155), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15159), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3470,22 +3470,22 @@ static void looping_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15147), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15150), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15153), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15156), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3498,25 +3498,25 @@ static void looping_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15148), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15151), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15158), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15154), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15157), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3540,25 +3540,25 @@ static void looping_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15149), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15152), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15155), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15159), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15146), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3585,22 +3585,22 @@ static void looping_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15150), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15153), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15156), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15147), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3613,25 +3613,25 @@ static void looping_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15151), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15158), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15154), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15157), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15148), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3648,7 +3648,7 @@ static void looping_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x008A66D0 */ -static void looping_rc_track_left_half_banked_helix_down_small( +static void LoopingRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3658,11 +3658,11 @@ static void looping_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A66E0 */ -static void looping_rc_track_right_half_banked_helix_down_small( +static void LoopingRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3672,11 +3672,11 @@ static void looping_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A66F0 */ -static void looping_rc_track_left_half_banked_helix_up_large( +static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3688,25 +3688,25 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15247), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15258), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15252), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15257), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15242), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3728,22 +3728,22 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15246), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15251), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15256), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15241), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3758,22 +3758,22 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15245), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15250), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15255), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15240), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3789,22 +3789,22 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15244), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15249), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15254), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15239), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3819,25 +3819,25 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15243), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15248), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15253), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15259), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15238), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3861,25 +3861,25 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15242), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15247), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15258), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15252), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15257), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3906,22 +3906,22 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15241), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15246), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15251), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15256), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3936,22 +3936,22 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15240), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15245), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15250), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15255), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3967,22 +3967,22 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15239), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15244), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15249), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15254), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3997,25 +3997,25 @@ static void looping_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15238), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15243), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15248), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15253), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15259), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4032,7 +4032,7 @@ static void looping_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x008A6700 */ -static void looping_rc_track_right_half_banked_helix_up_large( +static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4044,25 +4044,25 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15216), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15221), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15226), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15231), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15237), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4084,22 +4084,22 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15217), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15222), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15227), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15232), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4114,22 +4114,22 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15218), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15223), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15228), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15233), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4145,22 +4145,22 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15219), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15224), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15229), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15234), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4175,25 +4175,25 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15220), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15225), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15236), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15230), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15235), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4217,25 +4217,25 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15221), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15226), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15231), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15237), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15216), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4262,22 +4262,22 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15222), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15227), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15232), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15217), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4292,22 +4292,22 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15223), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15228), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15233), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15218), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4323,22 +4323,22 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15224), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15229), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15234), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15219), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4353,25 +4353,25 @@ static void looping_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15225), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15236), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15230), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15235), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15220), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4388,7 +4388,7 @@ static void looping_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x008A6710 */ -static void looping_rc_track_left_half_banked_helix_down_large( +static void LoopingRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4398,11 +4398,11 @@ static void looping_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6720 */ -static void looping_rc_track_right_half_banked_helix_down_large( +static void LoopingRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4412,11 +4412,11 @@ static void looping_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6750 */ -static void looping_rc_track_left_quarter_turn_1_60_deg_up( +static void LoopingRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4424,44 +4424,44 @@ static void looping_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15341), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15341), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15345), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15345), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15342), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15342), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15346), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15346), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15343), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15343), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15347), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15347), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15340), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15340), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15344), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15344), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A6730 */ -static void looping_rc_track_right_quarter_turn_1_60_deg_up( +static void LoopingRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4469,60 +4469,60 @@ static void looping_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15332), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15332), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15336), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15336), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15333), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15333), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15337), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15337), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15334), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15334), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15338), { 0, 0, height }, { 2, 28, 59 }, - { 28, 2, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15338), { 0, 0, height }, + { { 28, 2, height + 2 }, { 2, 28, 59 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15335), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15335), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15339), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15339), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A6740 */ -static void looping_rc_track_left_quarter_turn_1_60_deg_down( +static void LoopingRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6760 */ -static void looping_rc_track_right_quarter_turn_1_60_deg_down( +static void LoopingRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6770 */ -static void looping_rc_track_brakes( +static void LoopingRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4531,23 +4531,23 @@ static void looping_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15012), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15012), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15014), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15014), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15013), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15013), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15015), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15015), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4558,7 +4558,7 @@ static void looping_rc_track_brakes( } /** rct2: 0x008A6A40 */ -static void looping_rc_track_25_deg_up_left_banked( +static void LoopingRCTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4566,26 +4566,26 @@ static void looping_rc_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15594), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15594), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15595), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15595), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15596), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15596), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15597), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15597), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4603,7 +4603,7 @@ static void looping_rc_track_25_deg_up_left_banked( } /** rct2: 0x008A6A50 */ -static void looping_rc_track_25_deg_up_right_banked( +static void LoopingRCTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4611,26 +4611,26 @@ static void looping_rc_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15598), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15598), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15599), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15599), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15600), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15600), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15601), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15601), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4648,7 +4648,7 @@ static void looping_rc_track_25_deg_up_right_banked( } /** rct2: 0x008A6780 */ -static void looping_rc_track_on_ride_photo( +static void LoopingRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4661,8 +4661,8 @@ static void looping_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4671,8 +4671,8 @@ static void looping_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4681,8 +4681,8 @@ static void looping_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4691,34 +4691,34 @@ static void looping_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008A6A60 */ -static void looping_rc_track_25_deg_down_left_banked( +static void LoopingRCTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_right_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpRightBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6A70 */ -static void looping_rc_track_25_deg_down_right_banked( +static void LoopingRCTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_left_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpLeftBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6860 */ -static void looping_rc_track_left_eighth_to_diag( +static void LoopingRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4730,22 +4730,22 @@ static void looping_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15526), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15530), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15534), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15538), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4763,22 +4763,22 @@ static void looping_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15527), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15531), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15535), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15539), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4793,22 +4793,22 @@ static void looping_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15528), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15532), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15536), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15540), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4827,28 +4827,28 @@ static void looping_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15529), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15533), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15537), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15541), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4863,7 +4863,7 @@ static void looping_rc_track_left_eighth_to_diag( } /** rct2: 0x008A6870 */ -static void looping_rc_track_right_eighth_to_diag( +static void LoopingRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4875,22 +4875,22 @@ static void looping_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15510), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15514), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15518), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15522), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4908,22 +4908,22 @@ static void looping_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15511), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15515), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15519), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15523), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4938,22 +4938,22 @@ static void looping_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15512), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15516), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15520), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15524), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4972,28 +4972,28 @@ static void looping_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15513), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15517), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15521), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15525), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5008,25 +5008,25 @@ static void looping_rc_track_right_eighth_to_diag( } /** rct2: 0x008A6880 */ -static void looping_rc_track_left_eighth_to_orthogonal( +static void LoopingRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - looping_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6890 */ -static void looping_rc_track_right_eighth_to_orthogonal( +static void LoopingRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - looping_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + LoopingRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A68A0 */ -static void looping_rc_track_left_eighth_bank_to_diag( +static void LoopingRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5038,22 +5038,22 @@ static void looping_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15558), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15562), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15566), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15570), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5071,22 +5071,22 @@ static void looping_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15559), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15563), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15567), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15571), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5101,22 +5101,22 @@ static void looping_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15560), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15564), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15568), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15572), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5135,28 +5135,28 @@ static void looping_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15561), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15565), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15569), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15573), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5171,7 +5171,7 @@ static void looping_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008A68B0 */ -static void looping_rc_track_right_eighth_bank_to_diag( +static void LoopingRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5183,22 +5183,22 @@ static void looping_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15542), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15546), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15550), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15554), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5216,22 +5216,22 @@ static void looping_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15543), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15547), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15551), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15555), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5246,22 +5246,22 @@ static void looping_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15544), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15548), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15552), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15556), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5280,28 +5280,28 @@ static void looping_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15545), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15549), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15553), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15557), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5316,25 +5316,25 @@ static void looping_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008A68C0 */ -static void looping_rc_track_left_eighth_bank_to_orthogonal( +static void LoopingRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - looping_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A68D0 */ -static void looping_rc_track_right_eighth_bank_to_orthogonal( +static void LoopingRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - looping_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + LoopingRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A6790 */ -static void looping_rc_track_diag_flat( +static void LoopingRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5348,7 +5348,7 @@ static void looping_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15451), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5359,7 +5359,7 @@ static void looping_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15423), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5375,7 +5375,7 @@ static void looping_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15448), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5386,7 +5386,7 @@ static void looping_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15420), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5402,7 +5402,7 @@ static void looping_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15450), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5413,7 +5413,7 @@ static void looping_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15422), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5433,7 +5433,7 @@ static void looping_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15449), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5458,7 +5458,7 @@ static void looping_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15421), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5480,7 +5480,7 @@ static void looping_rc_track_diag_flat( } /** rct2: 0x008A67C0 */ -static void looping_rc_track_diag_25_deg_up( +static void LoopingRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5494,7 +5494,7 @@ static void looping_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15463), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5505,7 +5505,7 @@ static void looping_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15435), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5521,7 +5521,7 @@ static void looping_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15460), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5532,7 +5532,7 @@ static void looping_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15432), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5548,7 +5548,7 @@ static void looping_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15462), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5559,7 +5559,7 @@ static void looping_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15434), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5579,7 +5579,7 @@ static void looping_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15461), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5604,7 +5604,7 @@ static void looping_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15433), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5626,7 +5626,7 @@ static void looping_rc_track_diag_25_deg_up( } /** rct2: 0x008A67F0 */ -static void looping_rc_track_diag_60_deg_up( +static void LoopingRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5640,7 +5640,7 @@ static void looping_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15475), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5651,7 +5651,7 @@ static void looping_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15447), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5667,7 +5667,7 @@ static void looping_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15472), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5678,7 +5678,7 @@ static void looping_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15444), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5694,7 +5694,7 @@ static void looping_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15474), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5705,7 +5705,7 @@ static void looping_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15446), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5725,7 +5725,7 @@ static void looping_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15473), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5750,7 +5750,7 @@ static void looping_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15445), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5772,7 +5772,7 @@ static void looping_rc_track_diag_60_deg_up( } /** rct2: 0x008A67A0 */ -static void looping_rc_track_diag_flat_to_25_deg_up( +static void LoopingRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5786,7 +5786,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15455), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5797,7 +5797,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15427), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5813,7 +5813,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15452), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5824,7 +5824,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15424), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5840,7 +5840,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15454), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5851,7 +5851,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15426), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5871,7 +5871,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15453), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5896,7 +5896,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15425), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5918,7 +5918,7 @@ static void looping_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A67D0 */ -static void looping_rc_track_diag_25_deg_up_to_60_deg_up( +static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5932,7 +5932,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15467), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5943,7 +5943,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15439), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5959,7 +5959,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15464), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5970,7 +5970,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15436), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5986,7 +5986,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15466), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5997,7 +5997,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15438), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6017,7 +6017,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15465), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6042,7 +6042,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15437), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6064,7 +6064,7 @@ static void looping_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008A67E0 */ -static void looping_rc_track_diag_60_deg_up_to_25_deg_up( +static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6078,7 +6078,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15471), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6089,7 +6089,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15443), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6105,7 +6105,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15468), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6116,7 +6116,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15440), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6132,7 +6132,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15470), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6143,7 +6143,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15442), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6163,7 +6163,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15469), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6188,7 +6188,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15441), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6210,7 +6210,7 @@ static void looping_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008A67B0 */ -static void looping_rc_track_diag_25_deg_up_to_flat( +static void LoopingRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6224,7 +6224,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15459), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6235,7 +6235,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15431), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6251,7 +6251,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15456), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6262,7 +6262,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15428), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6278,7 +6278,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15458), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6289,7 +6289,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15430), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6309,7 +6309,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15457), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6334,7 +6334,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15429), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6356,7 +6356,7 @@ static void looping_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A6820 */ -static void looping_rc_track_diag_25_deg_down( +static void LoopingRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6370,7 +6370,7 @@ static void looping_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15461), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6381,7 +6381,7 @@ static void looping_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15433), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6397,7 +6397,7 @@ static void looping_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15462), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6408,7 +6408,7 @@ static void looping_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15434), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6424,7 +6424,7 @@ static void looping_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15460), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6435,7 +6435,7 @@ static void looping_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15432), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6455,7 +6455,7 @@ static void looping_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15463), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6480,7 +6480,7 @@ static void looping_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15435), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6502,7 +6502,7 @@ static void looping_rc_track_diag_25_deg_down( } /** rct2: 0x008A6850 */ -static void looping_rc_track_diag_60_deg_down( +static void LoopingRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6516,7 +6516,7 @@ static void looping_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15473), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6527,7 +6527,7 @@ static void looping_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15445), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6543,7 +6543,7 @@ static void looping_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15474), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6554,7 +6554,7 @@ static void looping_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15446), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6570,7 +6570,7 @@ static void looping_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15472), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6581,7 +6581,7 @@ static void looping_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15444), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6601,7 +6601,7 @@ static void looping_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15475), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6626,7 +6626,7 @@ static void looping_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15447), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6648,7 +6648,7 @@ static void looping_rc_track_diag_60_deg_down( } /** rct2: 0x008A6800 */ -static void looping_rc_track_diag_flat_to_25_deg_down( +static void LoopingRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6662,7 +6662,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15457), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6673,7 +6673,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15429), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6688,7 +6688,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15458), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6699,7 +6699,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15430), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6714,7 +6714,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15456), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6725,7 +6725,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15428), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6744,7 +6744,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15459), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6769,7 +6769,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15431), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6792,7 +6792,7 @@ static void looping_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A6830 */ -static void looping_rc_track_diag_25_deg_down_to_60_deg_down( +static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6806,7 +6806,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15469), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -6817,7 +6817,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15441), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -6833,7 +6833,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15470), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6844,7 +6844,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15442), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6860,7 +6860,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15468), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6871,7 +6871,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15440), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6891,7 +6891,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15471), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6916,7 +6916,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15443), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6938,7 +6938,7 @@ static void looping_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008A6840 */ -static void looping_rc_track_diag_60_deg_down_to_25_deg_down( +static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6952,7 +6952,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15465), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6963,7 +6963,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15437), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6979,7 +6979,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15466), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6990,7 +6990,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15438), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7006,7 +7006,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15464), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7017,7 +7017,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15436), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7037,7 +7037,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15467), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7062,7 +7062,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15439), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7084,7 +7084,7 @@ static void looping_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008A6810 */ -static void looping_rc_track_diag_25_deg_down_to_flat( +static void LoopingRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7098,7 +7098,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15453), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7109,7 +7109,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15425), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7125,7 +7125,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15454), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7136,7 +7136,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15426), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7152,7 +7152,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15452), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7163,7 +7163,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15424), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7183,7 +7183,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15455), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7208,7 +7208,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15427), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7230,7 +7230,7 @@ static void looping_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A6900 */ -static void looping_rc_track_diag_flat_to_left_bank( +static void LoopingRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7242,7 +7242,7 @@ static void looping_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15503), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7255,10 +7255,10 @@ static void looping_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15500), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15504), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7271,7 +7271,7 @@ static void looping_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15502), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7288,7 +7288,7 @@ static void looping_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15501), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7309,7 +7309,7 @@ static void looping_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008A6910 */ -static void looping_rc_track_diag_flat_to_right_bank( +static void LoopingRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7321,7 +7321,7 @@ static void looping_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15508), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7334,7 +7334,7 @@ static void looping_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15505), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7347,10 +7347,10 @@ static void looping_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15507), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15509), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7367,7 +7367,7 @@ static void looping_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15506), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7388,7 +7388,7 @@ static void looping_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008A6920 */ -static void looping_rc_track_diag_left_bank_to_flat( +static void LoopingRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7400,7 +7400,7 @@ static void looping_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15506), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7413,10 +7413,10 @@ static void looping_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15507), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15509), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7429,7 +7429,7 @@ static void looping_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15505), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7446,7 +7446,7 @@ static void looping_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15508), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7467,7 +7467,7 @@ static void looping_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008A6930 */ -static void looping_rc_track_diag_right_bank_to_flat( +static void LoopingRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7479,7 +7479,7 @@ static void looping_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15501), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7492,7 +7492,7 @@ static void looping_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15502), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7505,10 +7505,10 @@ static void looping_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15500), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15504), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7525,7 +7525,7 @@ static void looping_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15503), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7546,7 +7546,7 @@ static void looping_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008A6960 */ -static void looping_rc_track_diag_left_bank_to_25_deg_up( +static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7558,7 +7558,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15493), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7571,10 +7571,10 @@ static void looping_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15490), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15494), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7587,7 +7587,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15492), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7604,7 +7604,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15491), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7625,7 +7625,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008A6970 */ -static void looping_rc_track_diag_right_bank_to_25_deg_up( +static void LoopingRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7637,7 +7637,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15498), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7650,7 +7650,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15495), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7663,10 +7663,10 @@ static void looping_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15497), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15499), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7683,7 +7683,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15496), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7704,7 +7704,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008A6940 */ -static void looping_rc_track_diag_25_deg_up_to_left_bank( +static void LoopingRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7716,7 +7716,7 @@ static void looping_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15483), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7729,10 +7729,10 @@ static void looping_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15480), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15484), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7745,7 +7745,7 @@ static void looping_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15482), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7762,7 +7762,7 @@ static void looping_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15481), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7783,7 +7783,7 @@ static void looping_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008A6950 */ -static void looping_rc_track_diag_25_deg_up_to_right_bank( +static void LoopingRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7795,7 +7795,7 @@ static void looping_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15488), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7808,7 +7808,7 @@ static void looping_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15485), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7821,10 +7821,10 @@ static void looping_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15487), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15489), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7841,7 +7841,7 @@ static void looping_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15486), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7862,7 +7862,7 @@ static void looping_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008A6980 */ -static void looping_rc_track_diag_left_bank_to_25_deg_down( +static void LoopingRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7874,7 +7874,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15486), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7886,10 +7886,10 @@ static void looping_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15487), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15489), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7901,7 +7901,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15485), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7917,7 +7917,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15488), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7939,7 +7939,7 @@ static void looping_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008A6990 */ -static void looping_rc_track_diag_right_bank_to_25_deg_down( +static void LoopingRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7951,7 +7951,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15481), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7963,7 +7963,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15482), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7975,10 +7975,10 @@ static void looping_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15480), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15484), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7994,7 +7994,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15483), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8016,7 +8016,7 @@ static void looping_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008A69A0 */ -static void looping_rc_track_diag_25_deg_down_to_left_bank( +static void LoopingRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8028,7 +8028,7 @@ static void looping_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15496), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8041,10 +8041,10 @@ static void looping_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15497), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15499), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8057,7 +8057,7 @@ static void looping_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15495), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8074,7 +8074,7 @@ static void looping_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15498), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8095,7 +8095,7 @@ static void looping_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008A69B0 */ -static void looping_rc_track_diag_25_deg_down_to_right_bank( +static void LoopingRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8107,7 +8107,7 @@ static void looping_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15491), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8120,7 +8120,7 @@ static void looping_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15492), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8133,10 +8133,10 @@ static void looping_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15490), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15494), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8153,7 +8153,7 @@ static void looping_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15493), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8174,7 +8174,7 @@ static void looping_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008A68E0 */ -static void looping_rc_track_diag_left_bank( +static void LoopingRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8186,7 +8186,7 @@ static void looping_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15479), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8199,7 +8199,7 @@ static void looping_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15476), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8212,7 +8212,7 @@ static void looping_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15478), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8229,7 +8229,7 @@ static void looping_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15477), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8250,7 +8250,7 @@ static void looping_rc_track_diag_left_bank( } /** rct2: 0x008A68F0 */ -static void looping_rc_track_diag_right_bank( +static void LoopingRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8262,7 +8262,7 @@ static void looping_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15477), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8275,7 +8275,7 @@ static void looping_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15478), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8288,7 +8288,7 @@ static void looping_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15476), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8305,7 +8305,7 @@ static void looping_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15479), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8326,7 +8326,7 @@ static void looping_rc_track_diag_right_bank( } /** rct2: 0x008A6C00 */ -static void looping_rc_track_block_brakes( +static void LoopingRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8335,23 +8335,23 @@ static void looping_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15012), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15012), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15014), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15014), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15013), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15013), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15015), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15015), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8362,7 +8362,7 @@ static void looping_rc_track_block_brakes( } /** rct2: 0x008A6BC0 */ -static void looping_rc_track_left_banked_quarter_turn_3_25_deg_up( +static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8379,7 +8379,7 @@ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15691), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( @@ -8418,12 +8418,12 @@ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15690), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15692), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8449,7 +8449,7 @@ static void looping_rc_track_left_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008A6BD0 */ -static void looping_rc_track_right_banked_quarter_turn_3_25_deg_up( +static void LoopingRCTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8471,7 +8471,7 @@ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15682), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8507,14 +8507,14 @@ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15681), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15683), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8543,27 +8543,25 @@ static void looping_rc_track_right_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008A6BE0 */ -static void looping_rc_track_left_banked_quarter_turn_3_25_deg_down( +static void LoopingRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_right_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6BF0 */ -static void looping_rc_track_right_banked_quarter_turn_3_25_deg_down( +static void LoopingRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - looping_rc_track_left_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6B80 */ -static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( +static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8575,22 +8573,22 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15658), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15663), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15668), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15673), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8615,18 +8613,18 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15664), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15664), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15669), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15674), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8641,17 +8639,17 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15660), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15665), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15665), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15670), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8672,22 +8670,22 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15661), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15666), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15666), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15671), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15676), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8702,22 +8700,22 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15662), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15667), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15672), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15677), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8738,7 +8736,7 @@ static void looping_rc_track_left_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008A6B90 */ -static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( +static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8750,22 +8748,22 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15638), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15643), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15648), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15653), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8786,17 +8784,17 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15639), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15644), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15649), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15649), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8821,17 +8819,17 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15645), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15650), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15650), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15655), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8847,22 +8845,22 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15641), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15646), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15651), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15651), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15656), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8877,22 +8875,22 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15642), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15647), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15652), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15657), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8913,27 +8911,25 @@ static void looping_rc_track_right_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008A6BA0 */ -static void looping_rc_track_left_banked_quarter_turn_5_25_deg_down( +static void LoopingRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_right_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + LoopingRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A6BB0 */ -static void looping_rc_track_right_banked_quarter_turn_5_25_deg_down( +static void LoopingRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - looping_rc_track_left_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + LoopingRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A6A80 */ -static void looping_rc_track_25_deg_up_to_left_banked_25_deg_up( +static void LoopingRCTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8941,29 +8937,29 @@ static void looping_rc_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15602), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15602), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15603), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15603), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15610), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15610), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15604), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15604), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15605), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15605), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8981,7 +8977,7 @@ static void looping_rc_track_25_deg_up_to_left_banked_25_deg_up( } /** rct2: 0x008A6A90 */ -static void looping_rc_track_25_deg_up_to_right_banked_25_deg_up( +static void LoopingRCTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8989,29 +8985,29 @@ static void looping_rc_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15606), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15606), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15607), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15607), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15608), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15608), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15611), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15611), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15609), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15609), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9029,7 +9025,7 @@ static void looping_rc_track_25_deg_up_to_right_banked_25_deg_up( } /** rct2: 0x008A6AA0 */ -static void looping_rc_track_left_banked_25_deg_up_to_25_deg_up( +static void LoopingRCTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9037,29 +9033,29 @@ static void looping_rc_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15612), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15612), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15613), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15613), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15620), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15620), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15614), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15614), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15615), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15615), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9077,7 +9073,7 @@ static void looping_rc_track_left_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008A6AB0 */ -static void looping_rc_track_right_banked_25_deg_up_to_25_deg_up( +static void LoopingRCTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9085,29 +9081,29 @@ static void looping_rc_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15616), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15616), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15617), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15617), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15618), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15618), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15621), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15621), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15619), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15619), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9125,43 +9121,39 @@ static void looping_rc_track_right_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008A6AC0 */ -static void looping_rc_track_25_deg_down_to_left_banked_25_deg_down( +static void LoopingRCTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_right_banked_25_deg_up_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6AD0 */ -static void looping_rc_track_25_deg_down_to_right_banked_25_deg_down( +static void LoopingRCTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_banked_25_deg_up_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackLeftBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6AE0 */ -static void looping_rc_track_left_banked_25_deg_down_to_25_deg_down( +static void LoopingRCTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6AF0 */ -static void looping_rc_track_right_banked_25_deg_down_to_25_deg_down( +static void LoopingRCTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_25_deg_up_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrack25DegUpToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6B00 */ -static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_up( +static void LoopingRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9169,26 +9161,26 @@ static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15622), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15622), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15623), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15623), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15624), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15624), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15625), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15625), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9206,7 +9198,7 @@ static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_up( } /** rct2: 0x008A6B10 */ -static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_up( +static void LoopingRCTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9214,26 +9206,26 @@ static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15626), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15626), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15627), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15627), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15628), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15628), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15629), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15629), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9251,7 +9243,7 @@ static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_up( } /** rct2: 0x008A6B40 */ -static void looping_rc_track_left_banked_25_deg_up_to_left_banked_flat( +static void LoopingRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9259,26 +9251,26 @@ static void looping_rc_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15630), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15630), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15631), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15631), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15632), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15632), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15633), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15633), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9296,7 +9288,7 @@ static void looping_rc_track_left_banked_25_deg_up_to_left_banked_flat( } /** rct2: 0x008A6B50 */ -static void looping_rc_track_right_banked_25_deg_up_to_right_banked_flat( +static void LoopingRCTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9304,26 +9296,26 @@ static void looping_rc_track_right_banked_25_deg_up_to_right_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15634), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15634), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15635), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15635), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15636), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15636), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15637), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15637), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9341,43 +9333,39 @@ static void looping_rc_track_right_banked_25_deg_up_to_right_banked_flat( } /** rct2: 0x008A6B60 */ -static void looping_rc_track_left_banked_flat_to_left_banked_25_deg_down( +static void LoopingRCTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_right_banked_25_deg_up_to_right_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightBanked25DegUpToRightBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6B70 */ -static void looping_rc_track_right_banked_flat_to_right_banked_25_deg_down( +static void LoopingRCTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_banked_25_deg_up_to_left_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackLeftBanked25DegUpToLeftBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6B20 */ -static void looping_rc_track_left_banked_25_deg_down_to_left_banked_flat( +static void LoopingRCTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_right_banked_flat_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightBankedFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6B30 */ -static void looping_rc_track_right_banked_25_deg_down_to_right_banked_flat( +static void LoopingRCTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_banked_flat_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackLeftBankedFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A69C0 */ -static void looping_rc_track_flat_to_left_banked_25_deg_up( +static void LoopingRCTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9385,29 +9373,29 @@ static void looping_rc_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15574), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15574), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15575), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15575), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15582), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15582), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15576), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15576), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15577), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15577), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9425,7 +9413,7 @@ static void looping_rc_track_flat_to_left_banked_25_deg_up( } /** rct2: 0x008A69D0 */ -static void looping_rc_track_flat_to_right_banked_25_deg_up( +static void LoopingRCTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9433,29 +9421,29 @@ static void looping_rc_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15578), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15578), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15579), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15579), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15580), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15580), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15583), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15583), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15581), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15581), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9473,7 +9461,7 @@ static void looping_rc_track_flat_to_right_banked_25_deg_up( } /** rct2: 0x008A69E0 */ -static void looping_rc_track_left_banked_25_deg_up_to_flat( +static void LoopingRCTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9481,29 +9469,29 @@ static void looping_rc_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15584), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15584), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15585), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15585), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15592), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15592), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15586), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15586), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15587), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15587), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9521,7 +9509,7 @@ static void looping_rc_track_left_banked_25_deg_up_to_flat( } /** rct2: 0x008A69F0 */ -static void looping_rc_track_right_banked_25_deg_up_to_flat( +static void LoopingRCTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9529,29 +9517,29 @@ static void looping_rc_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15588), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15588), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15589), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15589), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15590), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15590), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15593), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15593), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15591), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15591), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9569,38 +9557,38 @@ static void looping_rc_track_right_banked_25_deg_up_to_flat( } /** rct2: 0x008A6A00 */ -static void looping_rc_track_flat_to_left_banked_25_deg_down( +static void LoopingRCTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_right_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackRightBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6A10 */ -static void looping_rc_track_flat_to_right_banked_25_deg_down( +static void LoopingRCTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_left_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackLeftBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6A20 */ -static void looping_rc_track_left_banked_25_deg_down_to_flat( +static void LoopingRCTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_flat_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A6A30 */ -static void looping_rc_track_right_banked_25_deg_down_to_flat( +static void LoopingRCTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - looping_rc_track_flat_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + LoopingRCTrackFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void looping_rc_track_booster( +static void LoopingRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9610,16 +9598,16 @@ static void looping_rc_track_booster( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_LOOPING_RC_BOOSTER_NE_SW), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_LOOPING_RC_BOOSTER_NW_SE), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9629,283 +9617,283 @@ static void looping_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLoopingRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return looping_rc_track_flat; + return LoopingRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return looping_rc_track_station; + return LoopingRCTrackStation; case TrackElemType::Up25: - return looping_rc_track_25_deg_up; + return LoopingRCTrack25DegUp; case TrackElemType::Up60: - return looping_rc_track_60_deg_up; + return LoopingRCTrack60DegUp; case TrackElemType::FlatToUp25: - return looping_rc_track_flat_to_25_deg_up; + return LoopingRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return looping_rc_track_25_deg_up_to_60_deg_up; + return LoopingRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return looping_rc_track_60_deg_up_to_25_deg_up; + return LoopingRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return looping_rc_track_25_deg_up_to_flat; + return LoopingRCTrack25DegUpToFlat; case TrackElemType::Down25: - return looping_rc_track_25_deg_down; + return LoopingRCTrack25DegDown; case TrackElemType::Down60: - return looping_rc_track_60_deg_down; + return LoopingRCTrack60DegDown; case TrackElemType::FlatToDown25: - return looping_rc_track_flat_to_25_deg_down; + return LoopingRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return looping_rc_track_25_deg_down_to_60_deg_down; + return LoopingRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return looping_rc_track_60_deg_down_to_25_deg_down; + return LoopingRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return looping_rc_track_25_deg_down_to_flat; + return LoopingRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return looping_rc_track_left_quarter_turn_5; + return LoopingRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return looping_rc_track_right_quarter_turn_5; + return LoopingRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return looping_rc_track_flat_to_left_bank; + return LoopingRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return looping_rc_track_flat_to_right_bank; + return LoopingRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return looping_rc_track_left_bank_to_flat; + return LoopingRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return looping_rc_track_right_bank_to_flat; + return LoopingRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return looping_rc_track_banked_left_quarter_turn_5; + return LoopingRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return looping_rc_track_banked_right_quarter_turn_5; + return LoopingRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return looping_rc_track_left_bank_to_25_deg_up; + return LoopingRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return looping_rc_track_right_bank_to_25_deg_up; + return LoopingRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return looping_rc_track_25_deg_up_to_left_bank; + return LoopingRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return looping_rc_track_25_deg_up_to_right_bank; + return LoopingRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return looping_rc_track_left_bank_to_25_deg_down; + return LoopingRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return looping_rc_track_right_bank_to_25_deg_down; + return LoopingRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return looping_rc_track_25_deg_down_to_left_bank; + return LoopingRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return looping_rc_track_25_deg_down_to_right_bank; + return LoopingRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return looping_rc_track_left_bank; + return LoopingRCTrackLeftBank; case TrackElemType::RightBank: - return looping_rc_track_right_bank; + return LoopingRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return looping_rc_track_left_quarter_turn_5_25_deg_up; + return LoopingRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return looping_rc_track_right_quarter_turn_5_25_deg_up; + return LoopingRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return looping_rc_track_left_quarter_turn_5_25_deg_down; + return LoopingRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return looping_rc_track_right_quarter_turn_5_25_deg_down; + return LoopingRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return looping_rc_track_s_bend_left; + return LoopingRCTrackSBendLeft; case TrackElemType::SBendRight: - return looping_rc_track_s_bend_right; + return LoopingRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return looping_rc_track_left_vertical_loop; + return LoopingRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return looping_rc_track_right_vertical_loop; + return LoopingRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return looping_rc_track_left_quarter_turn_3; + return LoopingRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return looping_rc_track_right_quarter_turn_3; + return LoopingRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return looping_rc_track_left_quarter_turn_3_bank; + return LoopingRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return looping_rc_track_right_quarter_turn_3_bank; + return LoopingRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return looping_rc_track_left_quarter_turn_3_25_deg_up; + return LoopingRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return looping_rc_track_right_quarter_turn_3_25_deg_up; + return LoopingRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return looping_rc_track_left_quarter_turn_3_25_deg_down; + return LoopingRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return looping_rc_track_right_quarter_turn_3_25_deg_down; + return LoopingRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return looping_rc_track_left_half_banked_helix_up_small; + return LoopingRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return looping_rc_track_right_half_banked_helix_up_small; + return LoopingRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return looping_rc_track_left_half_banked_helix_down_small; + return LoopingRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return looping_rc_track_right_half_banked_helix_down_small; + return LoopingRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return looping_rc_track_left_half_banked_helix_up_large; + return LoopingRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return looping_rc_track_right_half_banked_helix_up_large; + return LoopingRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return looping_rc_track_left_half_banked_helix_down_large; + return LoopingRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return looping_rc_track_right_half_banked_helix_down_large; + return LoopingRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return looping_rc_track_left_quarter_turn_1_60_deg_up; + return LoopingRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return looping_rc_track_right_quarter_turn_1_60_deg_up; + return LoopingRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return looping_rc_track_left_quarter_turn_1_60_deg_down; + return LoopingRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return looping_rc_track_right_quarter_turn_1_60_deg_down; + return LoopingRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return looping_rc_track_brakes; + return LoopingRCTrackBrakes; case TrackElemType::Up25LeftBanked: - return looping_rc_track_25_deg_up_left_banked; + return LoopingRCTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return looping_rc_track_25_deg_up_right_banked; + return LoopingRCTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return looping_rc_track_on_ride_photo; + return LoopingRCTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return looping_rc_track_25_deg_down_left_banked; + return LoopingRCTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return looping_rc_track_25_deg_down_right_banked; + return LoopingRCTrack25DegDownRightBanked; case TrackElemType::LeftEighthToDiag: - return looping_rc_track_left_eighth_to_diag; + return LoopingRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return looping_rc_track_right_eighth_to_diag; + return LoopingRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return looping_rc_track_left_eighth_to_orthogonal; + return LoopingRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return looping_rc_track_right_eighth_to_orthogonal; + return LoopingRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return looping_rc_track_left_eighth_bank_to_diag; + return LoopingRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return looping_rc_track_right_eighth_bank_to_diag; + return LoopingRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return looping_rc_track_left_eighth_bank_to_orthogonal; + return LoopingRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return looping_rc_track_right_eighth_bank_to_orthogonal; + return LoopingRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return looping_rc_track_diag_flat; + return LoopingRCTrackDiagFlat; case TrackElemType::DiagUp25: - return looping_rc_track_diag_25_deg_up; + return LoopingRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return looping_rc_track_diag_60_deg_up; + return LoopingRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return looping_rc_track_diag_flat_to_25_deg_up; + return LoopingRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return looping_rc_track_diag_25_deg_up_to_60_deg_up; + return LoopingRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return looping_rc_track_diag_60_deg_up_to_25_deg_up; + return LoopingRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return looping_rc_track_diag_25_deg_up_to_flat; + return LoopingRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return looping_rc_track_diag_25_deg_down; + return LoopingRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return looping_rc_track_diag_60_deg_down; + return LoopingRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return looping_rc_track_diag_flat_to_25_deg_down; + return LoopingRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return looping_rc_track_diag_25_deg_down_to_60_deg_down; + return LoopingRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return looping_rc_track_diag_60_deg_down_to_25_deg_down; + return LoopingRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return looping_rc_track_diag_25_deg_down_to_flat; + return LoopingRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return looping_rc_track_diag_flat_to_left_bank; + return LoopingRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return looping_rc_track_diag_flat_to_right_bank; + return LoopingRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return looping_rc_track_diag_left_bank_to_flat; + return LoopingRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return looping_rc_track_diag_right_bank_to_flat; + return LoopingRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return looping_rc_track_diag_left_bank_to_25_deg_up; + return LoopingRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return looping_rc_track_diag_right_bank_to_25_deg_up; + return LoopingRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return looping_rc_track_diag_25_deg_up_to_left_bank; + return LoopingRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return looping_rc_track_diag_25_deg_up_to_right_bank; + return LoopingRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return looping_rc_track_diag_left_bank_to_25_deg_down; + return LoopingRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return looping_rc_track_diag_right_bank_to_25_deg_down; + return LoopingRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return looping_rc_track_diag_25_deg_down_to_left_bank; + return LoopingRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return looping_rc_track_diag_25_deg_down_to_right_bank; + return LoopingRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return looping_rc_track_diag_left_bank; + return LoopingRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return looping_rc_track_diag_right_bank; + return LoopingRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return looping_rc_track_block_brakes; + return LoopingRCTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return looping_rc_track_left_banked_quarter_turn_3_25_deg_up; + return LoopingRCTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return looping_rc_track_right_banked_quarter_turn_3_25_deg_up; + return LoopingRCTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return looping_rc_track_left_banked_quarter_turn_3_25_deg_down; + return LoopingRCTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return looping_rc_track_right_banked_quarter_turn_3_25_deg_down; + return LoopingRCTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return looping_rc_track_left_banked_quarter_turn_5_25_deg_up; + return LoopingRCTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return looping_rc_track_right_banked_quarter_turn_5_25_deg_up; + return LoopingRCTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return looping_rc_track_left_banked_quarter_turn_5_25_deg_down; + return LoopingRCTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return looping_rc_track_right_banked_quarter_turn_5_25_deg_down; + return LoopingRCTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return looping_rc_track_25_deg_up_to_left_banked_25_deg_up; + return LoopingRCTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return looping_rc_track_25_deg_up_to_right_banked_25_deg_up; + return LoopingRCTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return looping_rc_track_left_banked_25_deg_up_to_25_deg_up; + return LoopingRCTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return looping_rc_track_right_banked_25_deg_up_to_25_deg_up; + return LoopingRCTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return looping_rc_track_25_deg_down_to_left_banked_25_deg_down; + return LoopingRCTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return looping_rc_track_25_deg_down_to_right_banked_25_deg_down; + return LoopingRCTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return looping_rc_track_left_banked_25_deg_down_to_25_deg_down; + return LoopingRCTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return looping_rc_track_right_banked_25_deg_down_to_25_deg_down; + return LoopingRCTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return looping_rc_track_left_banked_flat_to_left_banked_25_deg_up; + return LoopingRCTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return looping_rc_track_right_banked_flat_to_right_banked_25_deg_up; + return LoopingRCTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return looping_rc_track_left_banked_25_deg_up_to_left_banked_flat; + return LoopingRCTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return looping_rc_track_right_banked_25_deg_up_to_right_banked_flat; + return LoopingRCTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return looping_rc_track_left_banked_flat_to_left_banked_25_deg_down; + return LoopingRCTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return looping_rc_track_right_banked_flat_to_right_banked_25_deg_down; + return LoopingRCTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return looping_rc_track_left_banked_25_deg_down_to_left_banked_flat; + return LoopingRCTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return looping_rc_track_right_banked_25_deg_down_to_right_banked_flat; + return LoopingRCTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return looping_rc_track_flat_to_left_banked_25_deg_up; + return LoopingRCTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return looping_rc_track_flat_to_right_banked_25_deg_up; + return LoopingRCTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return looping_rc_track_left_banked_25_deg_up_to_flat; + return LoopingRCTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return looping_rc_track_right_banked_25_deg_up_to_flat; + return LoopingRCTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return looping_rc_track_flat_to_left_banked_25_deg_down; + return LoopingRCTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return looping_rc_track_flat_to_right_banked_25_deg_down; + return LoopingRCTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return looping_rc_track_left_banked_25_deg_down_to_flat; + return LoopingRCTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return looping_rc_track_right_banked_25_deg_down_to_flat; + return LoopingRCTrackRightBanked25DegDownToFlat; case TrackElemType::Booster: - return looping_rc_track_booster; + return LoopingRCTrackBooster; } - return get_track_paint_function_lim_launched_rc(trackType); + return GetTrackPaintFunctionLimLaunchedRC(trackType); } diff --git a/src/openrct2/ride/coaster/MineRide.cpp b/src/openrct2/ride/coaster/MineRide.cpp index d5e9c32f44..0de783a682 100644 --- a/src/openrct2/ride/coaster/MineRide.cpp +++ b/src/openrct2/ride/coaster/MineRide.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008B08D0 */ -static void mine_ride_track_flat( +static void MineRideTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -28,9 +28,9 @@ static void mine_ride_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -38,9 +38,9 @@ static void mine_ride_track_flat( case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -52,7 +52,7 @@ static void mine_ride_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void mine_ride_track_station( +static void MineRideTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -65,19 +65,19 @@ static void mine_ride_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008B08E0 */ -static void mine_ride_track_25_deg_up( +static void MineRideTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -85,18 +85,18 @@ static void mine_ride_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19388), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19388), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19389), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19389), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -104,18 +104,18 @@ static void mine_ride_track_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19390), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19390), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19391), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19391), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -136,7 +136,7 @@ static void mine_ride_track_25_deg_up( } /** rct2: 0x008B08F0 */ -static void mine_ride_track_flat_to_25_deg_up( +static void MineRideTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -144,36 +144,36 @@ static void mine_ride_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19380), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19380), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19381), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19381), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19382), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19382), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19383), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19383), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -193,7 +193,7 @@ static void mine_ride_track_flat_to_25_deg_up( } /** rct2: 0x008B0900 */ -static void mine_ride_track_25_deg_up_to_flat( +static void MineRideTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -201,18 +201,18 @@ static void mine_ride_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19384), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19384), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19385), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19385), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -220,18 +220,18 @@ static void mine_ride_track_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19386), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19386), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19387), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19387), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -252,31 +252,31 @@ static void mine_ride_track_25_deg_up_to_flat( } /** rct2: 0x008B0910 */ -static void mine_ride_track_25_deg_down( +static void MineRideTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0920 */ -static void mine_ride_track_flat_to_25_deg_down( +static void MineRideTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0930 */ -static void mine_ride_track_25_deg_down_to_flat( +static void MineRideTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0940 */ -static void mine_ride_track_left_quarter_turn_5( +static void MineRideTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -288,26 +288,26 @@ static void mine_ride_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19427), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19432), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19437), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19422), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -329,22 +329,22 @@ static void mine_ride_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19426), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19431), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19436), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19421), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -359,22 +359,22 @@ static void mine_ride_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19425), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19430), { 0, 0, height }, - { 16, 16, 3 }, { 6, 6, height }); + { { 6, 6, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19435), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19420), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -390,22 +390,22 @@ static void mine_ride_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19424), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19429), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19434), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19419), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -420,27 +420,27 @@ static void mine_ride_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19423), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19428), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19433), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19418), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -461,16 +461,16 @@ static void mine_ride_track_left_quarter_turn_5( } /** rct2: 0x008B0950 */ -static void mine_ride_track_right_quarter_turn_5( +static void MineRideTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_ride_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineRideTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008B0960 */ -static void mine_ride_track_flat_to_left_bank( +static void MineRideTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -478,42 +478,42 @@ static void mine_ride_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19340), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19340), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19348), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19348), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19341), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19341), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19349), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19349), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19342), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19342), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19343), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19343), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -526,7 +526,7 @@ static void mine_ride_track_flat_to_left_bank( } /** rct2: 0x008B0970 */ -static void mine_ride_track_flat_to_right_bank( +static void MineRideTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -534,42 +534,42 @@ static void mine_ride_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19344), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19344), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19345), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19345), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19346), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19346), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19350), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19350), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19347), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19347), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19351), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19351), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -582,7 +582,7 @@ static void mine_ride_track_flat_to_right_bank( } /** rct2: 0x008B0980 */ -static void mine_ride_track_left_bank_to_flat( +static void MineRideTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -590,42 +590,42 @@ static void mine_ride_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19346), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19346), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19350), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19350), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19347), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19347), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19351), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19351), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19344), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19344), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19345), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19345), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -638,7 +638,7 @@ static void mine_ride_track_left_bank_to_flat( } /** rct2: 0x008B0990 */ -static void mine_ride_track_right_bank_to_flat( +static void MineRideTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -646,42 +646,42 @@ static void mine_ride_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19342), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19342), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19343), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19343), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19340), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19340), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19348), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19348), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19341), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19341), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19349), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19349), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -694,7 +694,7 @@ static void mine_ride_track_right_bank_to_flat( } /** rct2: 0x008B09A0 */ -static void mine_ride_track_banked_left_quarter_turn_5( +static void MineRideTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -706,29 +706,29 @@ static void mine_ride_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19447), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19458), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19452), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19457), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19442), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -750,22 +750,22 @@ static void mine_ride_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19446), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19451), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19456), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19441), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -780,22 +780,22 @@ static void mine_ride_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19445), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19450), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19455), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19440), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -811,22 +811,22 @@ static void mine_ride_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19444), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19449), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19454), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19439), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -841,30 +841,30 @@ static void mine_ride_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19443), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19448), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19453), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19459), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19438), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -885,16 +885,16 @@ static void mine_ride_track_banked_left_quarter_turn_5( } /** rct2: 0x008B09B0 */ -static void mine_ride_track_banked_right_quarter_turn_5( +static void MineRideTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_ride_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineRideTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008B09C0 */ -static void mine_ride_track_left_bank_to_25_deg_up( +static void MineRideTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -902,42 +902,42 @@ static void mine_ride_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19352), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19352), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19356), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19356), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19353), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19353), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19357), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19357), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19354), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19354), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19355), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19355), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -957,7 +957,7 @@ static void mine_ride_track_left_bank_to_25_deg_up( } /** rct2: 0x008B09D0 */ -static void mine_ride_track_right_bank_to_25_deg_up( +static void MineRideTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -965,42 +965,42 @@ static void mine_ride_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19358), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19358), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19359), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19359), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19360), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19360), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19362), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19362), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19361), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19361), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19363), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19363), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1020,7 +1020,7 @@ static void mine_ride_track_right_bank_to_25_deg_up( } /** rct2: 0x008B09E0 */ -static void mine_ride_track_25_deg_up_to_left_bank( +static void MineRideTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1028,24 +1028,24 @@ static void mine_ride_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19364), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19364), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19368), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19368), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19365), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19365), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19369), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19369), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1053,18 +1053,18 @@ static void mine_ride_track_25_deg_up_to_left_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19366), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19366), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19367), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19367), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1085,7 +1085,7 @@ static void mine_ride_track_25_deg_up_to_left_bank( } /** rct2: 0x008B09F0 */ -static void mine_ride_track_25_deg_up_to_right_bank( +static void MineRideTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1093,18 +1093,18 @@ static void mine_ride_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19370), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19370), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19371), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19371), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1112,24 +1112,24 @@ static void mine_ride_track_25_deg_up_to_right_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19372), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19372), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19374), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19374), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19373), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19373), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19375), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19375), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1150,39 +1150,39 @@ static void mine_ride_track_25_deg_up_to_right_bank( } /** rct2: 0x008B0A00 */ -static void mine_ride_track_left_bank_to_25_deg_down( +static void MineRideTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0A10 */ -static void mine_ride_track_right_bank_to_25_deg_down( +static void MineRideTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0A20 */ -static void mine_ride_track_25_deg_down_to_left_bank( +static void MineRideTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0A30 */ -static void mine_ride_track_25_deg_down_to_right_bank( +static void MineRideTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0A40 */ -static void mine_ride_track_left_bank( +static void MineRideTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1190,36 +1190,36 @@ static void mine_ride_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19376), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19376), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19377), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19377), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19378), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19378), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19379), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19379), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1232,15 +1232,15 @@ static void mine_ride_track_left_bank( } /** rct2: 0x008B0A50 */ -static void mine_ride_track_right_bank( +static void MineRideTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_ride_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0A60 */ -static void mine_ride_track_s_bend_left( +static void MineRideTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1252,26 +1252,26 @@ static void mine_ride_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19460), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19464), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19463), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19467), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1303,12 +1303,12 @@ static void mine_ride_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19462), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19466), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1323,12 +1323,12 @@ static void mine_ride_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19462), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19466), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1356,26 +1356,26 @@ static void mine_ride_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19463), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19467), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19460), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19464), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1397,7 +1397,7 @@ static void mine_ride_track_s_bend_left( } /** rct2: 0x008B0A70 */ -static void mine_ride_track_s_bend_right( +static void MineRideTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1409,26 +1409,26 @@ static void mine_ride_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19468), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19472), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19471), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19475), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1447,13 +1447,13 @@ static void mine_ride_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19469), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19473), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1490,13 +1490,13 @@ static void mine_ride_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19469), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19473), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1513,26 +1513,26 @@ static void mine_ride_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19471), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19475), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19468), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19472), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1554,7 +1554,7 @@ static void mine_ride_track_s_bend_right( } /** rct2: 0x008B0AB0 */ -static void mine_ride_track_left_quarter_turn_3( +static void MineRideTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1566,26 +1566,26 @@ static void mine_ride_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19397), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19400), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19403), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19394), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1607,22 +1607,22 @@ static void mine_ride_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19396), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19399), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19402), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19393), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1635,27 +1635,27 @@ static void mine_ride_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19395), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19398), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19401), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19392), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1676,16 +1676,16 @@ static void mine_ride_track_left_quarter_turn_3( } /** rct2: 0x008B0AC0 */ -static void mine_ride_track_right_quarter_turn_3( +static void MineRideTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_ride_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineRideTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008B0AD0 */ -static void mine_ride_track_left_quarter_turn_3_bank( +static void MineRideTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1697,29 +1697,29 @@ static void mine_ride_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19409), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19416), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19412), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19415), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19406), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1741,22 +1741,22 @@ static void mine_ride_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19408), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19411), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19414), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19405), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1769,30 +1769,30 @@ static void mine_ride_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19407), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19410), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19413), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19417), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19404), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1813,16 +1813,16 @@ static void mine_ride_track_left_quarter_turn_3_bank( } /** rct2: 0x008B0AE0 */ -static void mine_ride_track_right_quarter_turn_3_bank( +static void MineRideTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_ride_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineRideTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008B0AF0 */ -static void mine_ride_track_left_half_banked_helix_up_small( +static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1834,29 +1834,29 @@ static void mine_ride_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19495), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19502), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19498), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19501), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19492), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1879,22 +1879,22 @@ static void mine_ride_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19494), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19497), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19500), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19491), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1907,31 +1907,31 @@ static void mine_ride_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19493), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19496), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19499), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19503), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19490), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1956,30 +1956,30 @@ static void mine_ride_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19492), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19495), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19502), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19498), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19501), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2006,22 +2006,22 @@ static void mine_ride_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19491), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19494), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19497), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19500), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2034,31 +2034,31 @@ static void mine_ride_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19490), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19493), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19496), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19499), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19503), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2076,7 +2076,7 @@ static void mine_ride_track_left_half_banked_helix_up_small( } /** rct2: 0x008B0B00 */ -static void mine_ride_track_right_half_banked_helix_up_small( +static void MineRideTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2088,29 +2088,29 @@ static void mine_ride_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19476), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19479), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19482), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19485), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19489), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2133,22 +2133,22 @@ static void mine_ride_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19477), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19480), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19483), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19486), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2161,31 +2161,31 @@ static void mine_ride_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19478), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19481), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19488), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19484), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19487), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2210,30 +2210,30 @@ static void mine_ride_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19479), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19482), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19485), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19489), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19476), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2260,22 +2260,22 @@ static void mine_ride_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19480), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19483), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19486), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19477), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2288,31 +2288,31 @@ static void mine_ride_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19481), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19488), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19484), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19487), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19478), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2330,7 +2330,7 @@ static void mine_ride_track_right_half_banked_helix_up_small( } /** rct2: 0x008B0B10 */ -static void mine_ride_track_left_half_banked_helix_down_small( +static void MineRideTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2340,11 +2340,11 @@ static void mine_ride_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_ride_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MineRideTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008B0B20 */ -static void mine_ride_track_right_half_banked_helix_down_small( +static void MineRideTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2354,11 +2354,11 @@ static void mine_ride_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_ride_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineRideTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008B0B30 */ -static void mine_ride_track_left_half_banked_helix_up_large( +static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2370,29 +2370,29 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19535), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19546), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19540), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19545), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19530), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2415,22 +2415,22 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19534), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19539), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19544), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19529), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2445,22 +2445,22 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19533), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19538), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19543), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19528), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2476,22 +2476,22 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19532), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19537), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19542), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19527), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2506,31 +2506,31 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19531), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19536), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19541), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19547), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19526), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2555,30 +2555,30 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19530), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19535), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19546), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19540), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19545), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2605,22 +2605,22 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19529), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19534), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19539), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19544), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2635,22 +2635,22 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19528), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19533), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19538), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19543), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2666,22 +2666,22 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19527), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19532), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19537), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19542), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2696,31 +2696,31 @@ static void mine_ride_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19526), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19531), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19536), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19541), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19547), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2738,7 +2738,7 @@ static void mine_ride_track_left_half_banked_helix_up_large( } /** rct2: 0x008B0B40 */ -static void mine_ride_track_right_half_banked_helix_up_large( +static void MineRideTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2750,29 +2750,29 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19504), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19509), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19514), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19519), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19525), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2795,22 +2795,22 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19505), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19510), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19515), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19520), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2825,22 +2825,22 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19506), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19511), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19516), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19521), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2856,22 +2856,22 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19507), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19512), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19517), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19522), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2886,31 +2886,31 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19508), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19513), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19524), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19518), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19523), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2935,30 +2935,30 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19509), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19514), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19519), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19525), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19504), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2985,22 +2985,22 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19510), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19515), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19520), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19505), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3015,22 +3015,22 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19511), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19516), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19521), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19506), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3046,22 +3046,22 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19512), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19517), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19522), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19507), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3076,31 +3076,31 @@ static void mine_ride_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19513), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19524), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19518), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19523), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19508), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3118,7 +3118,7 @@ static void mine_ride_track_right_half_banked_helix_up_large( } /** rct2: 0x008B0B50 */ -static void mine_ride_track_left_half_banked_helix_down_large( +static void MineRideTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3128,11 +3128,11 @@ static void mine_ride_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_ride_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MineRideTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008B0B60 */ -static void mine_ride_track_right_half_banked_helix_down_large( +static void MineRideTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3142,11 +3142,11 @@ static void mine_ride_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_ride_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineRideTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008B0B70 */ -static void mine_ride_track_on_ride_photo( +static void MineRideTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3158,8 +3158,8 @@ static void mine_ride_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 5, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -3167,8 +3167,8 @@ static void mine_ride_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 6, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -3176,8 +3176,8 @@ static void mine_ride_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 5, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -3185,18 +3185,18 @@ static void mine_ride_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 6, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008B0B90 */ -static void mine_ride_track_left_eighth_to_diag( +static void MineRideTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3208,26 +3208,26 @@ static void mine_ride_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19564), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19568), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19572), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19576), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3246,22 +3246,22 @@ static void mine_ride_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19565), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19569), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19573), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19577), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3276,22 +3276,22 @@ static void mine_ride_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19566), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19570), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19574), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19578), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3310,26 +3310,26 @@ static void mine_ride_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19567), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19571), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19575), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19579), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3344,7 +3344,7 @@ static void mine_ride_track_left_eighth_to_diag( } /** rct2: 0x008B0BA0 */ -static void mine_ride_track_right_eighth_to_diag( +static void MineRideTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3356,26 +3356,26 @@ static void mine_ride_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19548), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19552), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19556), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19560), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3394,22 +3394,22 @@ static void mine_ride_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19549), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19553), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19557), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19561), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3424,22 +3424,22 @@ static void mine_ride_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19550), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19554), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19558), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19562), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3458,26 +3458,26 @@ static void mine_ride_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19551), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19555), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19559), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19563), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3492,25 +3492,25 @@ static void mine_ride_track_right_eighth_to_diag( } /** rct2: 0x008B0BB0 */ -static void mine_ride_track_left_eighth_to_orthogonal( +static void MineRideTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_ride_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0BC0 */ -static void mine_ride_track_right_eighth_to_orthogonal( +static void MineRideTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_ride_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MineRideTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008B0BD0 */ -static void mine_ride_track_left_eighth_bank_to_diag( +static void MineRideTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3522,26 +3522,26 @@ static void mine_ride_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19596), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19600), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19604), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19608), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3560,22 +3560,22 @@ static void mine_ride_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19597), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19601), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19605), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19609), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3590,22 +3590,22 @@ static void mine_ride_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19598), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19602), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19606), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19610), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3624,26 +3624,26 @@ static void mine_ride_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19599), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19603), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19607), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19611), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3658,7 +3658,7 @@ static void mine_ride_track_left_eighth_bank_to_diag( } /** rct2: 0x008B0BE0 */ -static void mine_ride_track_right_eighth_bank_to_diag( +static void MineRideTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3670,26 +3670,26 @@ static void mine_ride_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19580), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19584), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19588), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19592), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3708,22 +3708,22 @@ static void mine_ride_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19581), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19585), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19589), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19593), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3738,22 +3738,22 @@ static void mine_ride_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19582), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19586), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19590), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19594), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3772,26 +3772,26 @@ static void mine_ride_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19583), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19587), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19591), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19595), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3806,25 +3806,25 @@ static void mine_ride_track_right_eighth_bank_to_diag( } /** rct2: 0x008B0BF0 */ -static void mine_ride_track_left_eighth_bank_to_orthogonal( +static void MineRideTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_ride_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineRideTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008B0C00 */ -static void mine_ride_track_right_eighth_bank_to_orthogonal( +static void MineRideTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_ride_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MineRideTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008B0B80 */ -static void mine_ride_track_diag_flat( +static void MineRideTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3836,7 +3836,7 @@ static void mine_ride_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19615), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3849,7 +3849,7 @@ static void mine_ride_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19612), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3862,7 +3862,7 @@ static void mine_ride_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19614), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3878,7 +3878,7 @@ static void mine_ride_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19613), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3898,7 +3898,7 @@ static void mine_ride_track_diag_flat( } /** rct2: 0x008B0C30 */ -static void mine_ride_track_diag_25_deg_up( +static void MineRideTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3910,7 +3910,7 @@ static void mine_ride_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19627), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3923,7 +3923,7 @@ static void mine_ride_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19624), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3936,7 +3936,7 @@ static void mine_ride_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19626), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3953,7 +3953,7 @@ static void mine_ride_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19625), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3974,7 +3974,7 @@ static void mine_ride_track_diag_25_deg_up( } /** rct2: 0x008B0C10 */ -static void mine_ride_track_diag_flat_to_25_deg_up( +static void MineRideTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3986,7 +3986,7 @@ static void mine_ride_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19619), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3999,7 +3999,7 @@ static void mine_ride_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19616), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4012,7 +4012,7 @@ static void mine_ride_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19618), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4028,7 +4028,7 @@ static void mine_ride_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19617), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4048,7 +4048,7 @@ static void mine_ride_track_diag_flat_to_25_deg_up( } /** rct2: 0x008B0C20 */ -static void mine_ride_track_diag_25_deg_up_to_flat( +static void MineRideTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4060,7 +4060,7 @@ static void mine_ride_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19623), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4073,7 +4073,7 @@ static void mine_ride_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19620), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4086,7 +4086,7 @@ static void mine_ride_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19622), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4103,7 +4103,7 @@ static void mine_ride_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19621), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4124,7 +4124,7 @@ static void mine_ride_track_diag_25_deg_up_to_flat( } /** rct2: 0x008B0C60 */ -static void mine_ride_track_diag_25_deg_down( +static void MineRideTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4136,7 +4136,7 @@ static void mine_ride_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19625), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4149,7 +4149,7 @@ static void mine_ride_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19626), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4162,7 +4162,7 @@ static void mine_ride_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19624), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4179,7 +4179,7 @@ static void mine_ride_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19627), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4200,7 +4200,7 @@ static void mine_ride_track_diag_25_deg_down( } /** rct2: 0x008B0C40 */ -static void mine_ride_track_diag_flat_to_25_deg_down( +static void MineRideTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4212,7 +4212,7 @@ static void mine_ride_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19621), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4224,7 +4224,7 @@ static void mine_ride_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19622), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4236,7 +4236,7 @@ static void mine_ride_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19620), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4252,7 +4252,7 @@ static void mine_ride_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19623), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4274,7 +4274,7 @@ static void mine_ride_track_diag_flat_to_25_deg_down( } /** rct2: 0x008B0C50 */ -static void mine_ride_track_diag_25_deg_down_to_flat( +static void MineRideTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4286,7 +4286,7 @@ static void mine_ride_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19617), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4299,7 +4299,7 @@ static void mine_ride_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19618), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4312,7 +4312,7 @@ static void mine_ride_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19616), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4328,7 +4328,7 @@ static void mine_ride_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19619), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4348,7 +4348,7 @@ static void mine_ride_track_diag_25_deg_down_to_flat( } /** rct2: 0x008B0C90 */ -static void mine_ride_track_diag_flat_to_left_bank( +static void MineRideTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4360,7 +4360,7 @@ static void mine_ride_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19635), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4373,10 +4373,10 @@ static void mine_ride_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19632), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19636), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4389,7 +4389,7 @@ static void mine_ride_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19634), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4405,7 +4405,7 @@ static void mine_ride_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19633), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4425,7 +4425,7 @@ static void mine_ride_track_diag_flat_to_left_bank( } /** rct2: 0x008B0CA0 */ -static void mine_ride_track_diag_flat_to_right_bank( +static void MineRideTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4437,7 +4437,7 @@ static void mine_ride_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19640), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4450,7 +4450,7 @@ static void mine_ride_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19637), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4463,10 +4463,10 @@ static void mine_ride_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19639), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19641), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4482,7 +4482,7 @@ static void mine_ride_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19638), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4502,7 +4502,7 @@ static void mine_ride_track_diag_flat_to_right_bank( } /** rct2: 0x008B0CB0 */ -static void mine_ride_track_diag_left_bank_to_flat( +static void MineRideTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4514,7 +4514,7 @@ static void mine_ride_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19638), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4527,10 +4527,10 @@ static void mine_ride_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19639), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19641), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4543,7 +4543,7 @@ static void mine_ride_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19637), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4559,7 +4559,7 @@ static void mine_ride_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19640), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4579,7 +4579,7 @@ static void mine_ride_track_diag_left_bank_to_flat( } /** rct2: 0x008B0CC0 */ -static void mine_ride_track_diag_right_bank_to_flat( +static void MineRideTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4591,7 +4591,7 @@ static void mine_ride_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19633), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4604,7 +4604,7 @@ static void mine_ride_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19634), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4617,10 +4617,10 @@ static void mine_ride_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19632), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19636), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4636,7 +4636,7 @@ static void mine_ride_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19635), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4656,7 +4656,7 @@ static void mine_ride_track_diag_right_bank_to_flat( } /** rct2: 0x008B0CF0 */ -static void mine_ride_track_diag_left_bank_to_25_deg_up( +static void MineRideTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4668,7 +4668,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19655), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4681,10 +4681,10 @@ static void mine_ride_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19652), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19656), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4697,7 +4697,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19654), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4713,7 +4713,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19653), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4733,7 +4733,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008B0D00 */ -static void mine_ride_track_diag_right_bank_to_25_deg_up( +static void MineRideTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4745,7 +4745,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19660), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4758,7 +4758,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19657), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4771,10 +4771,10 @@ static void mine_ride_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19659), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19661), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4790,7 +4790,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19658), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4810,7 +4810,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008B0CD0 */ -static void mine_ride_track_diag_25_deg_up_to_left_bank( +static void MineRideTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4822,7 +4822,7 @@ static void mine_ride_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19645), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4835,10 +4835,10 @@ static void mine_ride_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19642), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19646), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4851,7 +4851,7 @@ static void mine_ride_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19644), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4868,7 +4868,7 @@ static void mine_ride_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19643), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4889,7 +4889,7 @@ static void mine_ride_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008B0CE0 */ -static void mine_ride_track_diag_25_deg_up_to_right_bank( +static void MineRideTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4901,7 +4901,7 @@ static void mine_ride_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19650), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4914,7 +4914,7 @@ static void mine_ride_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19647), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4927,10 +4927,10 @@ static void mine_ride_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19649), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19651), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4947,7 +4947,7 @@ static void mine_ride_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19648), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4968,7 +4968,7 @@ static void mine_ride_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008B0D10 */ -static void mine_ride_track_diag_left_bank_to_25_deg_down( +static void MineRideTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4980,7 +4980,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19648), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4992,10 +4992,10 @@ static void mine_ride_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19649), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19651), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5007,7 +5007,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19647), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5023,7 +5023,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19650), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5045,7 +5045,7 @@ static void mine_ride_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008B0D20 */ -static void mine_ride_track_diag_right_bank_to_25_deg_down( +static void MineRideTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5057,7 +5057,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19643), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5069,7 +5069,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19644), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5081,10 +5081,10 @@ static void mine_ride_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19642), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19646), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5100,7 +5100,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19645), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5122,7 +5122,7 @@ static void mine_ride_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008B0D30 */ -static void mine_ride_track_diag_25_deg_down_to_left_bank( +static void MineRideTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5134,7 +5134,7 @@ static void mine_ride_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19658), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5147,10 +5147,10 @@ static void mine_ride_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19659), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19661), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5163,7 +5163,7 @@ static void mine_ride_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19657), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5179,7 +5179,7 @@ static void mine_ride_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19660), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5199,7 +5199,7 @@ static void mine_ride_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008B0D40 */ -static void mine_ride_track_diag_25_deg_down_to_right_bank( +static void MineRideTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5211,7 +5211,7 @@ static void mine_ride_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19653), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5224,7 +5224,7 @@ static void mine_ride_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19654), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5237,10 +5237,10 @@ static void mine_ride_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19652), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19656), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5256,7 +5256,7 @@ static void mine_ride_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19655), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5276,7 +5276,7 @@ static void mine_ride_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008B0C70 */ -static void mine_ride_track_diag_left_bank( +static void MineRideTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5288,7 +5288,7 @@ static void mine_ride_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19631), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5301,7 +5301,7 @@ static void mine_ride_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19628), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5314,7 +5314,7 @@ static void mine_ride_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19630), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5330,7 +5330,7 @@ static void mine_ride_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19629), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5350,7 +5350,7 @@ static void mine_ride_track_diag_left_bank( } /** rct2: 0x008B0C80 */ -static void mine_ride_track_diag_right_bank( +static void MineRideTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5362,7 +5362,7 @@ static void mine_ride_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19629), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5375,7 +5375,7 @@ static void mine_ride_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19630), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5388,7 +5388,7 @@ static void mine_ride_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19628), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5404,7 +5404,7 @@ static void mine_ride_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19631), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5423,152 +5423,152 @@ static void mine_ride_track_diag_right_bank( } } -TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMineRide(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return mine_ride_track_flat; + return MineRideTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return mine_ride_track_station; + return MineRideTrackStation; case TrackElemType::Up25: - return mine_ride_track_25_deg_up; + return MineRideTrack25DegUp; case TrackElemType::FlatToUp25: - return mine_ride_track_flat_to_25_deg_up; + return MineRideTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return mine_ride_track_25_deg_up_to_flat; + return MineRideTrack25DegUpToFlat; case TrackElemType::Down25: - return mine_ride_track_25_deg_down; + return MineRideTrack25DegDown; case TrackElemType::FlatToDown25: - return mine_ride_track_flat_to_25_deg_down; + return MineRideTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return mine_ride_track_25_deg_down_to_flat; + return MineRideTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return mine_ride_track_left_quarter_turn_5; + return MineRideTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return mine_ride_track_right_quarter_turn_5; + return MineRideTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return mine_ride_track_flat_to_left_bank; + return MineRideTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return mine_ride_track_flat_to_right_bank; + return MineRideTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return mine_ride_track_left_bank_to_flat; + return MineRideTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return mine_ride_track_right_bank_to_flat; + return MineRideTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return mine_ride_track_banked_left_quarter_turn_5; + return MineRideTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return mine_ride_track_banked_right_quarter_turn_5; + return MineRideTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return mine_ride_track_left_bank_to_25_deg_up; + return MineRideTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return mine_ride_track_right_bank_to_25_deg_up; + return MineRideTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return mine_ride_track_25_deg_up_to_left_bank; + return MineRideTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return mine_ride_track_25_deg_up_to_right_bank; + return MineRideTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return mine_ride_track_left_bank_to_25_deg_down; + return MineRideTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return mine_ride_track_right_bank_to_25_deg_down; + return MineRideTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return mine_ride_track_25_deg_down_to_left_bank; + return MineRideTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return mine_ride_track_25_deg_down_to_right_bank; + return MineRideTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return mine_ride_track_left_bank; + return MineRideTrackLeftBank; case TrackElemType::RightBank: - return mine_ride_track_right_bank; + return MineRideTrackRightBank; case TrackElemType::SBendLeft: - return mine_ride_track_s_bend_left; + return MineRideTrackSBendLeft; case TrackElemType::SBendRight: - return mine_ride_track_s_bend_right; + return MineRideTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return mine_ride_track_left_quarter_turn_3; + return MineRideTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return mine_ride_track_right_quarter_turn_3; + return MineRideTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return mine_ride_track_left_quarter_turn_3_bank; + return MineRideTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return mine_ride_track_right_quarter_turn_3_bank; + return MineRideTrackRightQuarterTurn3Bank; case TrackElemType::LeftHalfBankedHelixUpSmall: - return mine_ride_track_left_half_banked_helix_up_small; + return MineRideTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return mine_ride_track_right_half_banked_helix_up_small; + return MineRideTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return mine_ride_track_left_half_banked_helix_down_small; + return MineRideTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return mine_ride_track_right_half_banked_helix_down_small; + return MineRideTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return mine_ride_track_left_half_banked_helix_up_large; + return MineRideTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return mine_ride_track_right_half_banked_helix_up_large; + return MineRideTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return mine_ride_track_left_half_banked_helix_down_large; + return MineRideTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return mine_ride_track_right_half_banked_helix_down_large; + return MineRideTrackRightHalfBankedHelixDownLarge; case TrackElemType::OnRidePhoto: - return mine_ride_track_on_ride_photo; + return MineRideTrackOnRidePhoto; case TrackElemType::LeftEighthToDiag: - return mine_ride_track_left_eighth_to_diag; + return MineRideTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return mine_ride_track_right_eighth_to_diag; + return MineRideTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return mine_ride_track_left_eighth_to_orthogonal; + return MineRideTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return mine_ride_track_right_eighth_to_orthogonal; + return MineRideTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return mine_ride_track_left_eighth_bank_to_diag; + return MineRideTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return mine_ride_track_right_eighth_bank_to_diag; + return MineRideTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return mine_ride_track_left_eighth_bank_to_orthogonal; + return MineRideTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return mine_ride_track_right_eighth_bank_to_orthogonal; + return MineRideTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return mine_ride_track_diag_flat; + return MineRideTrackDiagFlat; case TrackElemType::DiagUp25: - return mine_ride_track_diag_25_deg_up; + return MineRideTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return mine_ride_track_diag_flat_to_25_deg_up; + return MineRideTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return mine_ride_track_diag_25_deg_up_to_flat; + return MineRideTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return mine_ride_track_diag_25_deg_down; + return MineRideTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return mine_ride_track_diag_flat_to_25_deg_down; + return MineRideTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return mine_ride_track_diag_25_deg_down_to_flat; + return MineRideTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return mine_ride_track_diag_flat_to_left_bank; + return MineRideTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return mine_ride_track_diag_flat_to_right_bank; + return MineRideTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return mine_ride_track_diag_left_bank_to_flat; + return MineRideTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return mine_ride_track_diag_right_bank_to_flat; + return MineRideTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return mine_ride_track_diag_left_bank_to_25_deg_up; + return MineRideTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return mine_ride_track_diag_right_bank_to_25_deg_up; + return MineRideTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return mine_ride_track_diag_25_deg_up_to_left_bank; + return MineRideTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return mine_ride_track_diag_25_deg_up_to_right_bank; + return MineRideTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return mine_ride_track_diag_left_bank_to_25_deg_down; + return MineRideTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return mine_ride_track_diag_right_bank_to_25_deg_down; + return MineRideTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return mine_ride_track_diag_25_deg_down_to_left_bank; + return MineRideTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return mine_ride_track_diag_25_deg_down_to_right_bank; + return MineRideTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return mine_ride_track_diag_left_bank; + return MineRideTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return mine_ride_track_diag_right_bank; + return MineRideTrackDiagRightBank; } return nullptr; } diff --git a/src/openrct2/ride/coaster/MineTrainCoaster.cpp b/src/openrct2/ride/coaster/MineTrainCoaster.cpp index 5ffa691120..c0c9d61c30 100644 --- a/src/openrct2/ride/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/ride/coaster/MineTrainCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ static constexpr const uint32_t _MineTrainBlockBrakeImages[NumOrthogonalDirectio }; /** rct2: 0x0071BFA4 */ -static void mine_train_rc_track_flat( +static void MineTrainRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -41,26 +41,26 @@ static void mine_train_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20054), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20054), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20055), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20055), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20056), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20056), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20057), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20057), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -72,15 +72,15 @@ static void mine_train_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20052), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20052), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20053), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20053), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -91,7 +91,7 @@ static void mine_train_rc_track_flat( } /** rct2: 0x0071C154, 0x0071C164, 0x0071C174 */ -static void mine_train_rc_track_station( +static void MineTrainRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -104,29 +104,29 @@ static void mine_train_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height - 2 }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_MineTrainBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); } else { PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 20, 1 } }); } - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x0071BFB4 */ -static void mine_train_rc_track_25_deg_up( +static void MineTrainRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -136,26 +136,26 @@ static void mine_train_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20102), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20102), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20103), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20103), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20104), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20104), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20105), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20105), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -166,26 +166,26 @@ static void mine_train_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20074), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20074), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20075), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20075), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20076), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20076), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20077), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20077), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -203,7 +203,7 @@ static void mine_train_rc_track_25_deg_up( } /** rct2: 0x0071BFC4 */ -static void mine_train_rc_track_60_deg_up( +static void MineTrainRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -211,26 +211,26 @@ static void mine_train_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20090), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20090), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20091), { 0, 0, height }, { 1, 32, 98 }, - { 27, 0, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20091), { 0, 0, height }, + { { 27, 0, height }, { 1, 32, 98 } }); WoodenASupportsPaintSetup(session, 7, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20092), { 0, 0, height }, { 1, 32, 98 }, - { 27, 0, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20092), { 0, 0, height }, + { { 27, 0, height }, { 1, 32, 98 } }); WoodenASupportsPaintSetup(session, 6, 23, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20093), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20093), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -247,7 +247,7 @@ static void mine_train_rc_track_60_deg_up( } /** rct2: 0x0071BFD4 */ -static void mine_train_rc_track_flat_to_25_deg_up( +static void MineTrainRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -257,26 +257,26 @@ static void mine_train_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20094), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20094), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20095), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20095), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20096), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20096), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20097), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20097), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -287,26 +287,26 @@ static void mine_train_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20066), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20066), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20067), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20067), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20068), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20068), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20069), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20069), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -324,7 +324,7 @@ static void mine_train_rc_track_flat_to_25_deg_up( } /** rct2: 0x0071BFE4 */ -static void mine_train_rc_track_25_deg_up_to_60_deg_up( +static void MineTrainRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -332,32 +332,32 @@ static void mine_train_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20078), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20078), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20079), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20079), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20082), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20082), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20080), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20080), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20083), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20083), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, 6, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20081), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20081), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -374,7 +374,7 @@ static void mine_train_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x0071BFF4 */ -static void mine_train_rc_track_60_deg_up_to_25_deg_up( +static void MineTrainRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -382,32 +382,32 @@ static void mine_train_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20084), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20084), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20085), { 0, 0, height }, { 24, 1, 61 }, - { 4, 29, height - 16 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20085), { 0, 0, height }, + { { 4, 29, height - 16 }, { 24, 1, 61 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20088), { 0, 0, height }, { 32, 2, 66 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20088), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 66 } }); WoodenASupportsPaintSetup(session, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20086), { 0, 0, height }, { 24, 1, 61 }, - { 4, 29, height - 16 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20086), { 0, 0, height }, + { { 4, 29, height - 16 }, { 24, 1, 61 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20089), { 0, 0, height }, { 32, 2, 66 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20089), { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 66 } }); WoodenASupportsPaintSetup(session, 6, 19, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20087), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20087), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -424,7 +424,7 @@ static void mine_train_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x0071C004 */ -static void mine_train_rc_track_25_deg_up_to_flat( +static void MineTrainRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -434,26 +434,26 @@ static void mine_train_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20098), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20098), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20099), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20099), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20100), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20100), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20101), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20101), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -464,26 +464,26 @@ static void mine_train_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20070), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20070), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20071), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20071), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20072), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20072), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20073), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20073), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -501,55 +501,55 @@ static void mine_train_rc_track_25_deg_up_to_flat( } /** rct2: 0x0071C014 */ -static void mine_train_rc_track_25_deg_down( +static void MineTrainRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C024 */ -static void mine_train_rc_track_60_deg_down( +static void MineTrainRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C034 */ -static void mine_train_rc_track_flat_to_25_deg_down( +static void MineTrainRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C044 */ -static void mine_train_rc_track_25_deg_down_to_60_deg_down( +static void MineTrainRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C054 */ -static void mine_train_rc_track_60_deg_down_to_25_deg_down( +static void MineTrainRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C064 */ -static void mine_train_rc_track_25_deg_down_to_flat( +static void MineTrainRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C0B4 */ -static void mine_train_rc_track_left_quarter_turn_5( +static void MineTrainRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -561,25 +561,25 @@ static void mine_train_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20155), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20160), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20165), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20150), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -613,13 +613,13 @@ static void mine_train_rc_track_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20164), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20149), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -635,19 +635,19 @@ static void mine_train_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20153), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20158), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20163), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -676,7 +676,7 @@ static void mine_train_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20152), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -694,7 +694,7 @@ static void mine_train_rc_track_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20147), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -710,25 +710,25 @@ static void mine_train_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20151), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20156), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20161), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20146), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -748,16 +748,16 @@ static void mine_train_rc_track_left_quarter_turn_5( } /** rct2: 0x0071C0C4 */ -static void mine_train_rc_track_right_quarter_turn_5( +static void MineTrainRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_train_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C074 */ -static void mine_train_rc_track_flat_to_left_bank( +static void MineTrainRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -765,32 +765,32 @@ static void mine_train_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20106), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20106), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20114), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20114), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20107), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20107), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20115), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20115), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20108), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20108), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20109), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20109), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -800,7 +800,7 @@ static void mine_train_rc_track_flat_to_left_bank( } /** rct2: 0x0071C084 */ -static void mine_train_rc_track_flat_to_right_bank( +static void MineTrainRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -808,32 +808,32 @@ static void mine_train_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20110), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20110), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20111), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20111), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20112), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20112), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20116), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20116), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20113), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20113), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20117), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20117), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -843,7 +843,7 @@ static void mine_train_rc_track_flat_to_right_bank( } /** rct2: 0x0071C094 */ -static void mine_train_rc_track_left_bank_to_flat( +static void MineTrainRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -851,32 +851,32 @@ static void mine_train_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20112), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20112), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20116), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20116), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20113), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20113), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20117), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20117), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20110), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20110), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20111), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20111), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -886,7 +886,7 @@ static void mine_train_rc_track_left_bank_to_flat( } /** rct2: 0x0071C0A4 */ -static void mine_train_rc_track_right_bank_to_flat( +static void MineTrainRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -894,32 +894,32 @@ static void mine_train_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20108), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20108), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20109), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20109), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20106), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20106), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20114), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20114), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20107), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20107), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20115), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20115), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -929,7 +929,7 @@ static void mine_train_rc_track_right_bank_to_flat( } /** rct2: 0x0071C0D4 */ -static void mine_train_rc_track_banked_left_quarter_turn_5( +static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -941,28 +941,28 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20175), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20186), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20180), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20185), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20170), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -990,19 +990,19 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20179), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20184), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20169), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1018,19 +1018,19 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20173), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20178), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20183), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -1059,13 +1059,13 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20172), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20177), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -1077,7 +1077,7 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20167), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1093,28 +1093,28 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20171), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20176), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20181), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20187), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20166), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1134,16 +1134,16 @@ static void mine_train_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x0071C0E4 */ -static void mine_train_rc_track_banked_right_quarter_turn_5( +static void MineTrainRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_train_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C204 */ -static void mine_train_rc_track_left_bank_to_25_deg_up( +static void MineTrainRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1151,32 +1151,32 @@ static void mine_train_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20118), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20118), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20122), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20122), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20119), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20119), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20123), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20123), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20120), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20120), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20121), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20121), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1193,7 +1193,7 @@ static void mine_train_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x0071C214 */ -static void mine_train_rc_track_right_bank_to_25_deg_up( +static void MineTrainRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1201,32 +1201,32 @@ static void mine_train_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20124), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20124), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20125), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20125), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20126), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20126), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20128), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20128), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20127), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20127), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20129), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20129), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1243,7 +1243,7 @@ static void mine_train_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x0071C224 */ -static void mine_train_rc_track_25_deg_up_to_left_bank( +static void MineTrainRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1251,32 +1251,32 @@ static void mine_train_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20130), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20130), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20134), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20134), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20131), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20131), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20135), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20135), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20132), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20132), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20133), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20133), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1293,7 +1293,7 @@ static void mine_train_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x0071C234 */ -static void mine_train_rc_track_25_deg_up_to_right_bank( +static void MineTrainRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1301,32 +1301,32 @@ static void mine_train_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20136), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20136), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20137), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20137), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20138), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20138), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20140), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20140), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 6, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20139), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20139), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20141), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20141), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 7, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1343,39 +1343,39 @@ static void mine_train_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x0071C244 */ -static void mine_train_rc_track_left_bank_to_25_deg_down( +static void MineTrainRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C254 */ -static void mine_train_rc_track_right_bank_to_25_deg_down( +static void MineTrainRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C264 */ -static void mine_train_rc_track_25_deg_down_to_left_bank( +static void MineTrainRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C274 */ -static void mine_train_rc_track_25_deg_down_to_right_bank( +static void MineTrainRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C304 */ -static void mine_train_rc_track_left_bank( +static void MineTrainRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1383,26 +1383,26 @@ static void mine_train_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20142), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20142), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20143), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20143), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20144), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20144), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20145), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20145), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1412,15 +1412,15 @@ static void mine_train_rc_track_left_bank( } /** rct2: 0x0071C314 */ -static void mine_train_rc_track_right_bank( +static void MineTrainRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mine_train_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C0F4 */ -static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( +static void MineTrainRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1432,25 +1432,25 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20250), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20255), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20260), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20265), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1472,25 +1472,25 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20251), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20256), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20261), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20266), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1506,25 +1506,25 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20252), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20257), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20262), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20267), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1547,25 +1547,25 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20253), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20258), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20263), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20268), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1581,25 +1581,25 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20254), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20259), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20264), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20269), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1619,7 +1619,7 @@ static void mine_train_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x0071C104 */ -static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( +static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1631,25 +1631,25 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20230), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20235), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20240), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20245), { 0, 0, height }, - { 32, 27, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 1 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1671,25 +1671,25 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20231), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20236), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20241), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20246), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1705,25 +1705,25 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20232), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20237), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20242), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20247), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1746,25 +1746,25 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20233), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20238), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20243), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20248), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1780,25 +1780,25 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20234), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20239), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20244), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20249), { 0, 0, height }, - { 27, 32, 1 }, { 2, 0, height }); + { { 2, 0, height }, { 27, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1818,25 +1818,25 @@ static void mine_train_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x0071C114 */ -static void mine_train_rc_track_left_quarter_turn_5_25_deg_down( +static void MineTrainRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_train_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MineTrainRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x0071C124 */ -static void mine_train_rc_track_right_quarter_turn_5_25_deg_down( +static void MineTrainRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_train_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C134 */ -static void mine_train_rc_track_s_bend_left( +static void MineTrainRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1848,25 +1848,25 @@ static void mine_train_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20270), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20274), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20273), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20277), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1895,13 +1895,13 @@ static void mine_train_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20272), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20276), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1917,13 +1917,13 @@ static void mine_train_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20272), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20276), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -1951,25 +1951,25 @@ static void mine_train_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20273), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20277), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20270), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20274), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1989,7 +1989,7 @@ static void mine_train_rc_track_s_bend_left( } /** rct2: 0x0071C144 */ -static void mine_train_rc_track_s_bend_right( +static void MineTrainRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2001,25 +2001,25 @@ static void mine_train_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20278), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20282), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20281), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20285), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2036,13 +2036,13 @@ static void mine_train_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20279), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20283), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2082,13 +2082,13 @@ static void mine_train_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20279), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20283), { 0, 0, height }, - { 32, 26, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2104,25 +2104,25 @@ static void mine_train_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20281), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20285), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20278), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20282), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2142,7 +2142,7 @@ static void mine_train_rc_track_s_bend_right( } /** rct2: 0x0071C184 */ -static void mine_train_rc_track_left_quarter_turn_3( +static void MineTrainRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2154,25 +2154,25 @@ static void mine_train_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20193), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20196), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20199), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20190), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2207,7 +2207,7 @@ static void mine_train_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20192), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( @@ -2217,12 +2217,12 @@ static void mine_train_rc_track_left_quarter_turn_3( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20198), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20189), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2235,25 +2235,25 @@ static void mine_train_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20191), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20194), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20197), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20188), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2273,16 +2273,16 @@ static void mine_train_rc_track_left_quarter_turn_3( } /** rct2: 0x0071C194 */ -static void mine_train_rc_track_right_quarter_turn_3( +static void MineTrainRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_train_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C1A4 */ -static void mine_train_rc_track_left_quarter_turn_3_bank( +static void MineTrainRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2294,28 +2294,28 @@ static void mine_train_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20205), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20212), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20208), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20211), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20202), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2350,22 +2350,22 @@ static void mine_train_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20204), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20207), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20210), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20201), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2378,28 +2378,28 @@ static void mine_train_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20203), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20206), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20209), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20213), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20200), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2419,16 +2419,16 @@ static void mine_train_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x0071C1B4 */ -static void mine_train_rc_track_right_quarter_turn_3_bank( +static void MineTrainRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_train_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C1C4 */ -static void mine_train_rc_track_left_quarter_turn_3_25_deg_up( +static void MineTrainRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2536,7 +2536,7 @@ static void mine_train_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x0071C1D4 */ -static void mine_train_rc_track_right_quarter_turn_3_25_deg_up( +static void MineTrainRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2644,25 +2644,25 @@ static void mine_train_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x0071C1E4 */ -static void mine_train_rc_track_left_quarter_turn_3_25_deg_down( +static void MineTrainRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_train_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MineTrainRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x0071C1F4 */ -static void mine_train_rc_track_right_quarter_turn_3_25_deg_down( +static void MineTrainRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_train_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C284 */ -static void mine_train_rc_track_left_half_banked_helix_up_small( +static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2674,28 +2674,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20305), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20312), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20308), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20311), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20302), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2734,22 +2734,22 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20304), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20307), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20310), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20301), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2762,28 +2762,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20303), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20306), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20309), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20313), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20300), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2809,28 +2809,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20302), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20305), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20312), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20308), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20311), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2874,22 +2874,22 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20301), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20304), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20307), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20310), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2902,28 +2902,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20300), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20303), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20306), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20309), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20313), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2942,7 +2942,7 @@ static void mine_train_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x0071C294 */ -static void mine_train_rc_track_right_half_banked_helix_up_small( +static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2954,28 +2954,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20286), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20289), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20292), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20295), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20299), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3014,22 +3014,22 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20287), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20290), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20293), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20296), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3042,28 +3042,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20288), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20291), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20298), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20294), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20297), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3089,28 +3089,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20289), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20292), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20295), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20299), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20286), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3154,22 +3154,22 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20290), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20293), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20296), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20287), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3182,28 +3182,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20291), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20298), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20294), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20297), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20288), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3222,7 +3222,7 @@ static void mine_train_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x0071C2A4 */ -static void mine_train_rc_track_left_half_banked_helix_down_small( +static void MineTrainRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3232,12 +3232,11 @@ static void mine_train_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_train_rc_track_right_half_banked_helix_up_small( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MineTrainRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x0071C2B4 */ -static void mine_train_rc_track_right_half_banked_helix_down_small( +static void MineTrainRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3247,12 +3246,11 @@ static void mine_train_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mine_train_rc_track_left_half_banked_helix_up_small( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C2C4 */ -static void mine_train_rc_track_left_half_banked_helix_up_large( +static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3264,28 +3262,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20345), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20356), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20350), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20355), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20340), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3311,25 +3309,25 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20344), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20349), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20354), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20339), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3345,28 +3343,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20343), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20348), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20178), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20353), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20338), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3387,28 +3385,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20342), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20347), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20177), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20352), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20337), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3424,28 +3422,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20341), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20346), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20351), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20357), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20336), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3471,28 +3469,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20340), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20345), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20356), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20350), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20355), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3523,25 +3521,25 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20339), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20344), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20349), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20354), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3557,28 +3555,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20338), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20343), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20348), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20178), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20353), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3599,28 +3597,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20337), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20342), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20347), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20177), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20352), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3636,28 +3634,28 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20336), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20341), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20346), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20351), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20357), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3676,7 +3674,7 @@ static void mine_train_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x0071C2D4 */ -static void mine_train_rc_track_right_half_banked_helix_up_large( +static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3688,28 +3686,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20314), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20319), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20324), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20329), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20335), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3735,25 +3733,25 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20315), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20320), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20325), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20330), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3769,25 +3767,25 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20316), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20321), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20326), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20331), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3808,25 +3806,25 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20317), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20322), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20327), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20332), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3842,28 +3840,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20318), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20323), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20334), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20328), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20333), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3889,28 +3887,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20319), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20324), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20329), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20335), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20314), { 0, 0, height }, - { 20, 32, 1 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3941,25 +3939,25 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20320), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20325), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20330), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20315), { 0, 0, height }, - { 16, 32, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3975,25 +3973,25 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20321), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20326), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20331), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20316), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4014,25 +4012,25 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20322), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20327), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20332), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20317), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4048,28 +4046,28 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20323), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20334), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20328), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20333), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20318), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4088,7 +4086,7 @@ static void mine_train_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x0071C2E4 */ -static void mine_train_rc_track_left_half_banked_helix_down_large( +static void MineTrainRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4098,12 +4096,11 @@ static void mine_train_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_train_rc_track_right_half_banked_helix_up_large( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MineTrainRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x0071C2F4 */ -static void mine_train_rc_track_right_half_banked_helix_down_large( +static void MineTrainRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4113,12 +4110,11 @@ static void mine_train_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mine_train_rc_track_left_half_banked_helix_up_large( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MineTrainRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0071C324 */ -static void mine_train_rc_track_brakes( +static void MineTrainRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4127,15 +4123,15 @@ static void mine_train_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20058), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20058), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20059), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20059), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4145,7 +4141,7 @@ static void mine_train_rc_track_brakes( } /** rct2: 0x0071C334 */ -static void mine_train_rc_track_on_ride_photo( +static void MineTrainRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4153,37 +4149,37 @@ static void mine_train_rc_track_on_ride_photo( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20052), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20052), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20053), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20053), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20052), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20052), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20053), { 0, 0, height }, { 32, 20, 1 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20053), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } - track_paint_util_onride_photo_paint(session, direction, height + 2, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 2, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x0071C354 */ -static void mine_train_rc_track_left_eighth_to_diag( +static void MineTrainRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4195,25 +4191,25 @@ static void mine_train_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20452), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20456), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20460), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20464), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4230,25 +4226,25 @@ static void mine_train_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20453), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20457), { 0, 0, height }, - { 34, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20461), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20465), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4261,25 +4257,25 @@ static void mine_train_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20454), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20458), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20462), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20466), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4311,22 +4307,22 @@ static void mine_train_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20455), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20459), { 0, 0, height }, - { 16, 18, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20463), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20467), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4336,7 +4332,7 @@ static void mine_train_rc_track_left_eighth_to_diag( } /** rct2: 0x0071C364 */ -static void mine_train_rc_track_right_eighth_to_diag( +static void MineTrainRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4348,25 +4344,25 @@ static void mine_train_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20436), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20440), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20444), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20448), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4383,25 +4379,25 @@ static void mine_train_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20437), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20441), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20445), { 0, 0, height }, - { 34, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20449), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4414,25 +4410,25 @@ static void mine_train_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20438), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20442), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20446), { 0, 0, height }, - { 28, 28, 1 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 1 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20450), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4464,22 +4460,22 @@ static void mine_train_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20439), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20443), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20447), { 0, 0, height }, - { 16, 18, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20451), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4489,25 +4485,25 @@ static void mine_train_rc_track_right_eighth_to_diag( } /** rct2: 0x0071C374 */ -static void mine_train_rc_track_left_eighth_to_orthogonal( +static void MineTrainRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_train_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C384 */ -static void mine_train_rc_track_right_eighth_to_orthogonal( +static void MineTrainRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_train_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MineTrainRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x0071C394 */ -static void mine_train_rc_track_left_eighth_bank_to_diag( +static void MineTrainRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4519,25 +4515,25 @@ static void mine_train_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20484), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20488), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20492), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20496), { 0, 0, height }, - { 32, 32, 1 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4554,25 +4550,25 @@ static void mine_train_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20485), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20489), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20493), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20497), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4585,25 +4581,25 @@ static void mine_train_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20486), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20490), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20494), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20498), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4635,22 +4631,22 @@ static void mine_train_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20487), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20491), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20495), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20499), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4660,7 +4656,7 @@ static void mine_train_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x0071C3A4 */ -static void mine_train_rc_track_right_eighth_bank_to_diag( +static void MineTrainRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4672,25 +4668,25 @@ static void mine_train_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20468), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20472), { 0, 0, height }, - { 32, 32, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20476), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20480), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4707,25 +4703,25 @@ static void mine_train_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20469), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20473), { 0, 0, height }, - { 32, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20477), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); WoodenASupportsPaintSetup(session, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20481), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4738,25 +4734,25 @@ static void mine_train_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20470), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20474), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 9, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20478), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup(session, 10, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20482), { 0, 0, height }, - { 16, 16, 1 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 1 } }); WoodenASupportsPaintSetup(session, 11, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4788,22 +4784,22 @@ static void mine_train_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20471), { 0, 0, height }, - { 16, 16, 1 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20475), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20479), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20483), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4813,25 +4809,25 @@ static void mine_train_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x0071C3B4 */ -static void mine_train_rc_track_left_eighth_bank_to_orthogonal( +static void MineTrainRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_train_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MineTrainRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0071C3C4 */ -static void mine_train_rc_track_right_eighth_bank_to_orthogonal( +static void MineTrainRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mine_train_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MineTrainRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x0071C344 */ -static void mine_train_rc_track_diag_flat( +static void MineTrainRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4845,7 +4841,7 @@ static void mine_train_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20389), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -4856,7 +4852,7 @@ static void mine_train_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20361), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -4871,7 +4867,7 @@ static void mine_train_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20386), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -4892,7 +4888,7 @@ static void mine_train_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20358), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -4923,7 +4919,7 @@ static void mine_train_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20388), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -4944,7 +4940,7 @@ static void mine_train_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20360), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -4963,7 +4959,7 @@ static void mine_train_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20387), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -4974,7 +4970,7 @@ static void mine_train_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20359), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -4985,7 +4981,7 @@ static void mine_train_rc_track_diag_flat( } /** rct2: 0x0071C414 */ -static void mine_train_rc_track_diag_25_deg_up( +static void MineTrainRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4999,7 +4995,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20401), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5010,7 +5006,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20373), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5025,7 +5021,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20398), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5046,7 +5042,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20370), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5077,7 +5073,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20400), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5098,7 +5094,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20372), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5117,7 +5113,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20399), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5128,7 +5124,7 @@ static void mine_train_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20371), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5139,7 +5135,7 @@ static void mine_train_rc_track_diag_25_deg_up( } /** rct2: 0x0071C474 */ -static void mine_train_rc_track_diag_60_deg_up( +static void MineTrainRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5151,7 +5147,7 @@ static void mine_train_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20385), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5163,7 +5159,7 @@ static void mine_train_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20382), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5191,7 +5187,7 @@ static void mine_train_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20384), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5207,7 +5203,7 @@ static void mine_train_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20383), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5217,7 +5213,7 @@ static void mine_train_rc_track_diag_60_deg_up( } /** rct2: 0x0071C3F4 */ -static void mine_train_rc_track_diag_flat_to_25_deg_up( +static void MineTrainRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5231,7 +5227,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20393), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5242,7 +5238,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20365), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5257,7 +5253,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20390), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5278,7 +5274,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20362), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5309,7 +5305,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20392), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5330,7 +5326,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20364), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5349,7 +5345,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20391), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5360,7 +5356,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20363), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5371,7 +5367,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x0071C454 */ -static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( +static void MineTrainRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5383,7 +5379,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20377), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5395,7 +5391,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20374), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5423,7 +5419,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20376), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5439,7 +5435,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20375), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5449,7 +5445,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x0071C464 */ -static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( +static void MineTrainRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5461,7 +5457,7 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20381), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5473,7 +5469,7 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20378), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5501,7 +5497,7 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20380), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5517,7 +5513,7 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20379), { -16, -16, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5527,7 +5523,7 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x0071C404 */ -static void mine_train_rc_track_diag_25_deg_up_to_flat( +static void MineTrainRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5541,7 +5537,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20397), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5552,7 +5548,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20369), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5567,7 +5563,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20394), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5588,7 +5584,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20366), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5619,7 +5615,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20396), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5640,7 +5636,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20368), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5659,7 +5655,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20395), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5670,7 +5666,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20367), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5681,7 +5677,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x0071C444 */ -static void mine_train_rc_track_diag_25_deg_down( +static void MineTrainRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5695,7 +5691,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20399), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5706,7 +5702,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20371), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5721,7 +5717,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20400), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5742,7 +5738,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20372), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5773,7 +5769,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20398), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5794,7 +5790,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20370), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5813,7 +5809,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20401), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5824,7 +5820,7 @@ static void mine_train_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20373), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5835,7 +5831,7 @@ static void mine_train_rc_track_diag_25_deg_down( } /** rct2: 0x0071C4A4 */ -static void mine_train_rc_track_diag_60_deg_down( +static void MineTrainRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5847,7 +5843,7 @@ static void mine_train_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20383), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5859,7 +5855,7 @@ static void mine_train_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20384), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5887,7 +5883,7 @@ static void mine_train_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20382), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -5903,7 +5899,7 @@ static void mine_train_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20385), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5913,7 +5909,7 @@ static void mine_train_rc_track_diag_60_deg_down( } /** rct2: 0x0071C424 */ -static void mine_train_rc_track_diag_flat_to_25_deg_down( +static void MineTrainRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5927,7 +5923,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20395), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5938,7 +5934,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20367), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -5952,7 +5948,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20396), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -5973,7 +5969,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20368), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6003,7 +5999,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20394), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6024,7 +6020,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20366), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6042,7 +6038,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20397), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -6053,7 +6049,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20369), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -6065,7 +6061,7 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x0071C484 */ -static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( +static void MineTrainRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6077,7 +6073,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20379), { -16, -16, height }, - { 16, 16, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6089,7 +6085,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20380), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6117,7 +6113,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20378), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6133,7 +6129,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20381), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6143,7 +6139,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x0071C494 */ -static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( +static void MineTrainRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6155,7 +6151,7 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20375), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6167,7 +6163,7 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20376), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6195,7 +6191,7 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20374), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6211,7 +6207,7 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20377), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6221,7 +6217,7 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x0071C434 */ -static void mine_train_rc_track_diag_25_deg_down_to_flat( +static void MineTrainRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6235,7 +6231,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20391), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -6246,7 +6242,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20363), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -6261,7 +6257,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20392), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6282,7 +6278,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20364), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6313,7 +6309,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20390), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6334,7 +6330,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20362), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6353,7 +6349,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20393), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -6364,7 +6360,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20365), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } } @@ -6375,7 +6371,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x0071C4D4 */ -static void mine_train_rc_track_diag_flat_to_left_bank( +static void MineTrainRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6387,7 +6383,7 @@ static void mine_train_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20409), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6399,10 +6395,10 @@ static void mine_train_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20406), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20410), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6430,7 +6426,7 @@ static void mine_train_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20408), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6446,7 +6442,7 @@ static void mine_train_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20407), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6456,7 +6452,7 @@ static void mine_train_rc_track_diag_flat_to_left_bank( } /** rct2: 0x0071C4B4 */ -static void mine_train_rc_track_diag_flat_to_right_bank( +static void MineTrainRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6468,7 +6464,7 @@ static void mine_train_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20414), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6480,7 +6476,7 @@ static void mine_train_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20411), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6508,10 +6504,10 @@ static void mine_train_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20413), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20415), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6527,7 +6523,7 @@ static void mine_train_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20412), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6537,7 +6533,7 @@ static void mine_train_rc_track_diag_flat_to_right_bank( } /** rct2: 0x0071C4C4 */ -static void mine_train_rc_track_diag_left_bank_to_flat( +static void MineTrainRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6549,7 +6545,7 @@ static void mine_train_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20412), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6561,10 +6557,10 @@ static void mine_train_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20413), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20415), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6592,7 +6588,7 @@ static void mine_train_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20411), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6608,7 +6604,7 @@ static void mine_train_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20414), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6618,7 +6614,7 @@ static void mine_train_rc_track_diag_left_bank_to_flat( } /** rct2: 0x0071C4E4 */ -static void mine_train_rc_track_diag_right_bank_to_flat( +static void MineTrainRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6630,7 +6626,7 @@ static void mine_train_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20407), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6642,7 +6638,7 @@ static void mine_train_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20408), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6670,10 +6666,10 @@ static void mine_train_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20406), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20410), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6689,7 +6685,7 @@ static void mine_train_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20409), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6699,7 +6695,7 @@ static void mine_train_rc_track_diag_right_bank_to_flat( } /** rct2: 0x0071C514 */ -static void mine_train_rc_track_diag_left_bank_to_25_deg_up( +static void MineTrainRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6711,7 +6707,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20429), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6723,10 +6719,10 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20426), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20430), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6754,7 +6750,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20428), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6770,7 +6766,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20427), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6780,7 +6776,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x0071C524 */ -static void mine_train_rc_track_diag_right_bank_to_25_deg_up( +static void MineTrainRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6792,7 +6788,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20434), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6804,7 +6800,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20431), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6832,10 +6828,10 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20433), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20435), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6851,7 +6847,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20432), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6861,7 +6857,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x0071C4F4 */ -static void mine_train_rc_track_diag_25_deg_up_to_left_bank( +static void MineTrainRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6873,7 +6869,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20419), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6885,10 +6881,10 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20416), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20420), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6916,7 +6912,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20418), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -6932,7 +6928,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20417), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6942,7 +6938,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x0071C504 */ -static void mine_train_rc_track_diag_25_deg_up_to_right_bank( +static void MineTrainRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6954,7 +6950,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20424), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6966,7 +6962,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20421), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -6994,10 +6990,10 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20423), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20425), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7013,7 +7009,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20422), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7023,7 +7019,7 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x0071C534 */ -static void mine_train_rc_track_diag_left_bank_to_25_deg_down( +static void MineTrainRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7035,7 +7031,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20422), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } break; @@ -7045,10 +7041,10 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20423), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20425), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -7074,7 +7070,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20421), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7088,7 +7084,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20424), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } break; @@ -7099,7 +7095,7 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x0071C544 */ -static void mine_train_rc_track_diag_right_bank_to_25_deg_down( +static void MineTrainRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7111,7 +7107,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20417), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } break; @@ -7121,7 +7117,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20418), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -7147,10 +7143,10 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20416), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20420), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 8, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7164,7 +7160,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20419), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } break; @@ -7175,7 +7171,7 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x0071C554 */ -static void mine_train_rc_track_diag_25_deg_down_to_left_bank( +static void MineTrainRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7187,7 +7183,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20432), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7199,10 +7195,10 @@ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20433), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20435), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -7230,7 +7226,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20431), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7246,7 +7242,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20434), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7256,7 +7252,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x0071C564 */ -static void mine_train_rc_track_diag_25_deg_down_to_right_bank( +static void MineTrainRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7268,7 +7264,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20427), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7280,7 +7276,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20428), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -7308,10 +7304,10 @@ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20426), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20430), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7327,7 +7323,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20429), { -16, -16, height }, - { 32, 32, 1 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 1 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7337,7 +7333,7 @@ static void mine_train_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x0071C3D4 */ -static void mine_train_rc_track_diag_left_bank( +static void MineTrainRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7349,7 +7345,7 @@ static void mine_train_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20405), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7362,7 +7358,7 @@ static void mine_train_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20402), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -7391,7 +7387,7 @@ static void mine_train_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20404), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7408,7 +7404,7 @@ static void mine_train_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20403), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7419,7 +7415,7 @@ static void mine_train_rc_track_diag_left_bank( } /** rct2: 0x0071C3E4 */ -static void mine_train_rc_track_diag_right_bank( +static void MineTrainRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7431,7 +7427,7 @@ static void mine_train_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20403), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7444,7 +7440,7 @@ static void mine_train_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20404), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -7473,7 +7469,7 @@ static void mine_train_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20402), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -7490,7 +7486,7 @@ static void mine_train_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(20405), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7501,210 +7497,210 @@ static void mine_train_rc_track_diag_right_bank( } /** rct2: 0x0071C574 */ -static void mine_train_rc_track_block_brakes( +static void MineTrainRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_MineTrainBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMineTrainRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return mine_train_rc_track_flat; + return MineTrainRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return mine_train_rc_track_station; + return MineTrainRCTrackStation; case TrackElemType::Up25: - return mine_train_rc_track_25_deg_up; + return MineTrainRCTrack25DegUp; case TrackElemType::Up60: - return mine_train_rc_track_60_deg_up; + return MineTrainRCTrack60DegUp; case TrackElemType::FlatToUp25: - return mine_train_rc_track_flat_to_25_deg_up; + return MineTrainRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return mine_train_rc_track_25_deg_up_to_60_deg_up; + return MineTrainRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return mine_train_rc_track_60_deg_up_to_25_deg_up; + return MineTrainRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return mine_train_rc_track_25_deg_up_to_flat; + return MineTrainRCTrack25DegUpToFlat; case TrackElemType::Down25: - return mine_train_rc_track_25_deg_down; + return MineTrainRCTrack25DegDown; case TrackElemType::Down60: - return mine_train_rc_track_60_deg_down; + return MineTrainRCTrack60DegDown; case TrackElemType::FlatToDown25: - return mine_train_rc_track_flat_to_25_deg_down; + return MineTrainRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return mine_train_rc_track_25_deg_down_to_60_deg_down; + return MineTrainRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return mine_train_rc_track_60_deg_down_to_25_deg_down; + return MineTrainRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return mine_train_rc_track_25_deg_down_to_flat; + return MineTrainRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return mine_train_rc_track_left_quarter_turn_5; + return MineTrainRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return mine_train_rc_track_right_quarter_turn_5; + return MineTrainRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return mine_train_rc_track_flat_to_left_bank; + return MineTrainRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return mine_train_rc_track_flat_to_right_bank; + return MineTrainRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return mine_train_rc_track_left_bank_to_flat; + return MineTrainRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return mine_train_rc_track_right_bank_to_flat; + return MineTrainRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return mine_train_rc_track_banked_left_quarter_turn_5; + return MineTrainRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return mine_train_rc_track_banked_right_quarter_turn_5; + return MineTrainRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return mine_train_rc_track_left_bank_to_25_deg_up; + return MineTrainRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return mine_train_rc_track_right_bank_to_25_deg_up; + return MineTrainRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return mine_train_rc_track_25_deg_up_to_left_bank; + return MineTrainRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return mine_train_rc_track_25_deg_up_to_right_bank; + return MineTrainRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return mine_train_rc_track_left_bank_to_25_deg_down; + return MineTrainRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return mine_train_rc_track_right_bank_to_25_deg_down; + return MineTrainRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return mine_train_rc_track_25_deg_down_to_left_bank; + return MineTrainRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return mine_train_rc_track_25_deg_down_to_right_bank; + return MineTrainRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return mine_train_rc_track_left_bank; + return MineTrainRCTrackLeftBank; case TrackElemType::RightBank: - return mine_train_rc_track_right_bank; + return MineTrainRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return mine_train_rc_track_left_quarter_turn_5_25_deg_up; + return MineTrainRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return mine_train_rc_track_right_quarter_turn_5_25_deg_up; + return MineTrainRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return mine_train_rc_track_left_quarter_turn_5_25_deg_down; + return MineTrainRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return mine_train_rc_track_right_quarter_turn_5_25_deg_down; + return MineTrainRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return mine_train_rc_track_s_bend_left; + return MineTrainRCTrackSBendLeft; case TrackElemType::SBendRight: - return mine_train_rc_track_s_bend_right; + return MineTrainRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return mine_train_rc_track_left_quarter_turn_3; + return MineTrainRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return mine_train_rc_track_right_quarter_turn_3; + return MineTrainRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return mine_train_rc_track_left_quarter_turn_3_bank; + return MineTrainRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return mine_train_rc_track_right_quarter_turn_3_bank; + return MineTrainRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return mine_train_rc_track_left_quarter_turn_3_25_deg_up; + return MineTrainRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return mine_train_rc_track_right_quarter_turn_3_25_deg_up; + return MineTrainRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return mine_train_rc_track_left_quarter_turn_3_25_deg_down; + return MineTrainRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return mine_train_rc_track_right_quarter_turn_3_25_deg_down; + return MineTrainRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return mine_train_rc_track_left_half_banked_helix_up_small; + return MineTrainRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return mine_train_rc_track_right_half_banked_helix_up_small; + return MineTrainRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return mine_train_rc_track_left_half_banked_helix_down_small; + return MineTrainRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return mine_train_rc_track_right_half_banked_helix_down_small; + return MineTrainRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return mine_train_rc_track_left_half_banked_helix_up_large; + return MineTrainRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return mine_train_rc_track_right_half_banked_helix_up_large; + return MineTrainRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return mine_train_rc_track_left_half_banked_helix_down_large; + return MineTrainRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return mine_train_rc_track_right_half_banked_helix_down_large; + return MineTrainRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::Brakes: - return mine_train_rc_track_brakes; + return MineTrainRCTrackBrakes; case TrackElemType::OnRidePhoto: - return mine_train_rc_track_on_ride_photo; + return MineTrainRCTrackOnRidePhoto; case TrackElemType::LeftEighthToDiag: - return mine_train_rc_track_left_eighth_to_diag; + return MineTrainRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return mine_train_rc_track_right_eighth_to_diag; + return MineTrainRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return mine_train_rc_track_left_eighth_to_orthogonal; + return MineTrainRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return mine_train_rc_track_right_eighth_to_orthogonal; + return MineTrainRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return mine_train_rc_track_left_eighth_bank_to_diag; + return MineTrainRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return mine_train_rc_track_right_eighth_bank_to_diag; + return MineTrainRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return mine_train_rc_track_left_eighth_bank_to_orthogonal; + return MineTrainRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return mine_train_rc_track_right_eighth_bank_to_orthogonal; + return MineTrainRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return mine_train_rc_track_diag_flat; + return MineTrainRCTrackDiagFlat; case TrackElemType::DiagUp25: - return mine_train_rc_track_diag_25_deg_up; + return MineTrainRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return mine_train_rc_track_diag_60_deg_up; + return MineTrainRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return mine_train_rc_track_diag_flat_to_25_deg_up; + return MineTrainRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return mine_train_rc_track_diag_25_deg_up_to_60_deg_up; + return MineTrainRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return mine_train_rc_track_diag_60_deg_up_to_25_deg_up; + return MineTrainRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return mine_train_rc_track_diag_25_deg_up_to_flat; + return MineTrainRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return mine_train_rc_track_diag_25_deg_down; + return MineTrainRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return mine_train_rc_track_diag_60_deg_down; + return MineTrainRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return mine_train_rc_track_diag_flat_to_25_deg_down; + return MineTrainRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return mine_train_rc_track_diag_25_deg_down_to_60_deg_down; + return MineTrainRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return mine_train_rc_track_diag_60_deg_down_to_25_deg_down; + return MineTrainRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return mine_train_rc_track_diag_25_deg_down_to_flat; + return MineTrainRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return mine_train_rc_track_diag_flat_to_left_bank; + return MineTrainRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return mine_train_rc_track_diag_flat_to_right_bank; + return MineTrainRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return mine_train_rc_track_diag_left_bank_to_flat; + return MineTrainRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return mine_train_rc_track_diag_right_bank_to_flat; + return MineTrainRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return mine_train_rc_track_diag_left_bank_to_25_deg_up; + return MineTrainRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return mine_train_rc_track_diag_right_bank_to_25_deg_up; + return MineTrainRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return mine_train_rc_track_diag_25_deg_up_to_left_bank; + return MineTrainRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return mine_train_rc_track_diag_25_deg_up_to_right_bank; + return MineTrainRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return mine_train_rc_track_diag_left_bank_to_25_deg_down; + return MineTrainRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return mine_train_rc_track_diag_right_bank_to_25_deg_down; + return MineTrainRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return mine_train_rc_track_diag_25_deg_down_to_left_bank; + return MineTrainRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return mine_train_rc_track_diag_25_deg_down_to_right_bank; + return MineTrainRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return mine_train_rc_track_diag_left_bank; + return MineTrainRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return mine_train_rc_track_diag_right_bank; + return MineTrainRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return mine_train_rc_track_block_brakes; + return MineTrainRCTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp index 5916f61868..39a726f9ee 100644 --- a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ static constexpr const uint32_t _MiniRCBlockBrakeImages[NumOrthogonalDirections] }; /** rct2: 0x008A4ABC */ -static void mini_rc_track_flat( +static void MiniRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -41,18 +41,18 @@ static void mini_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19044), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19044), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19045), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19045), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -60,18 +60,18 @@ static void mini_rc_track_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19046), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19046), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19047), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19047), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -86,9 +86,9 @@ static void mini_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -96,9 +96,9 @@ static void mini_rc_track_flat( case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -112,7 +112,7 @@ static void mini_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void mini_rc_track_station( +static void MiniRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -125,29 +125,29 @@ static void mini_rc_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_MiniRCBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A4ACC */ -static void mini_rc_track_25_deg_up( +static void MiniRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -157,9 +157,9 @@ static void mini_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19056), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19056), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -167,9 +167,9 @@ static void mini_rc_track_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19057), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19057), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -177,9 +177,9 @@ static void mini_rc_track_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19058), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19058), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -187,9 +187,9 @@ static void mini_rc_track_25_deg_up( break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19059), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19059), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -203,9 +203,9 @@ static void mini_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18796), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18796), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -213,9 +213,9 @@ static void mini_rc_track_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18797), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18797), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -223,9 +223,9 @@ static void mini_rc_track_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18798), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18798), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -233,9 +233,9 @@ static void mini_rc_track_25_deg_up( break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18799), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18799), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -257,7 +257,7 @@ static void mini_rc_track_25_deg_up( } /** rct2: 0x008A4ADC */ -static void mini_rc_track_60_deg_up( +static void MiniRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -265,18 +265,18 @@ static void mini_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18812), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18812), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 38, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18813), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18813), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 38, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -284,18 +284,18 @@ static void mini_rc_track_60_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18814), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18814), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 38, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18815), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18815), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 38, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -316,7 +316,7 @@ static void mini_rc_track_60_deg_up( } /** rct2: 0x008A4AEC */ -static void mini_rc_track_flat_to_25_deg_up( +static void MiniRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -326,18 +326,18 @@ static void mini_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19048), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19048), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19049), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19049), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -345,18 +345,18 @@ static void mini_rc_track_flat_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19050), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19050), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19051), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19051), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -370,18 +370,18 @@ static void mini_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18788), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18788), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18789), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18789), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -389,18 +389,18 @@ static void mini_rc_track_flat_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18790), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18790), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18791), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18791), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -422,7 +422,7 @@ static void mini_rc_track_flat_to_25_deg_up( } /** rct2: 0x008A4AFC */ -static void mini_rc_track_25_deg_up_to_60_deg_up( +static void MiniRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -430,21 +430,21 @@ static void mini_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18800), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18800), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18801), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18801), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18804), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18804), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -452,21 +452,21 @@ static void mini_rc_track_25_deg_up_to_60_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18802), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18802), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18805), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18805), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18803), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18803), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -487,7 +487,7 @@ static void mini_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008A4B0C */ -static void mini_rc_track_60_deg_up_to_25_deg_up( +static void MiniRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -495,21 +495,21 @@ static void mini_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18806), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18806), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 26, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18807), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18807), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18810), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18810), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 26, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -517,21 +517,21 @@ static void mini_rc_track_60_deg_up_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18808), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18808), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18811), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18811), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 26, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18809), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18809), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 26, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -552,7 +552,7 @@ static void mini_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008A4B1C */ -static void mini_rc_track_25_deg_up_to_flat( +static void MiniRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -562,9 +562,9 @@ static void mini_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19052), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19052), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -572,9 +572,9 @@ static void mini_rc_track_25_deg_up_to_flat( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19053), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19053), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -582,9 +582,9 @@ static void mini_rc_track_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19054), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19054), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -592,9 +592,9 @@ static void mini_rc_track_25_deg_up_to_flat( break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19055), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19055), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -608,9 +608,9 @@ static void mini_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18792), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18792), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -618,9 +618,9 @@ static void mini_rc_track_25_deg_up_to_flat( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18793), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18793), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -628,9 +628,9 @@ static void mini_rc_track_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18794), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18794), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -638,9 +638,9 @@ static void mini_rc_track_25_deg_up_to_flat( break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18795), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18795), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -662,55 +662,55 @@ static void mini_rc_track_25_deg_up_to_flat( } /** rct2: 0x008A4B2C */ -static void mini_rc_track_25_deg_down( +static void MiniRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4B3C */ -static void mini_rc_track_60_deg_down( +static void MiniRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4B4C */ -static void mini_rc_track_flat_to_25_deg_down( +static void MiniRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4B5C */ -static void mini_rc_track_25_deg_down_to_60_deg_down( +static void MiniRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4B6C */ -static void mini_rc_track_60_deg_down_to_25_deg_down( +static void MiniRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4B7C */ -static void mini_rc_track_25_deg_down_to_flat( +static void MiniRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4B8C */ -static void mini_rc_track_left_quarter_turn_5( +static void MiniRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -722,26 +722,26 @@ static void mini_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18851), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18856), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18861), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18846), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -763,22 +763,22 @@ static void mini_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18850), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18855), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18860), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18845), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -793,22 +793,22 @@ static void mini_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18849), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18854), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18859), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18844), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -824,22 +824,22 @@ static void mini_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18848), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18853), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18858), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18843), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -854,27 +854,27 @@ static void mini_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18847), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18852), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18857), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18842), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -895,16 +895,16 @@ static void mini_rc_track_left_quarter_turn_5( } /** rct2: 0x008A4B9C */ -static void mini_rc_track_right_quarter_turn_5( +static void MiniRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4BAC */ -static void mini_rc_track_flat_to_left_bank( +static void MiniRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -912,42 +912,42 @@ static void mini_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18748), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18748), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18756), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18756), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18749), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18749), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18757), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18757), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18750), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18750), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18751), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18751), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -960,7 +960,7 @@ static void mini_rc_track_flat_to_left_bank( } /** rct2: 0x008A4BBC */ -static void mini_rc_track_flat_to_right_bank( +static void MiniRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -968,42 +968,42 @@ static void mini_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18752), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18752), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18753), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18753), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18754), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18754), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18758), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18758), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18755), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18755), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18759), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18759), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1016,7 +1016,7 @@ static void mini_rc_track_flat_to_right_bank( } /** rct2: 0x008A4BCC */ -static void mini_rc_track_left_bank_to_flat( +static void MiniRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1024,42 +1024,42 @@ static void mini_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18754), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18754), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18758), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18758), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18755), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18755), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18759), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18759), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18752), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18752), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18753), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18753), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1072,7 +1072,7 @@ static void mini_rc_track_left_bank_to_flat( } /** rct2: 0x008A4BDC */ -static void mini_rc_track_right_bank_to_flat( +static void MiniRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1080,42 +1080,42 @@ static void mini_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18750), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18750), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18751), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18751), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18748), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18748), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18756), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18756), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18749), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18749), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18757), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18757), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1128,7 +1128,7 @@ static void mini_rc_track_right_bank_to_flat( } /** rct2: 0x008A4BEC */ -static void mini_rc_track_banked_left_quarter_turn_5( +static void MiniRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1140,29 +1140,29 @@ static void mini_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18871), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18882), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18876), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18881), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18866), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1184,22 +1184,22 @@ static void mini_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18870), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18875), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18880), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18865), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1214,22 +1214,22 @@ static void mini_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18869), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18874), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18879), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18864), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1245,22 +1245,22 @@ static void mini_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18868), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18873), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18878), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18863), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1275,30 +1275,30 @@ static void mini_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18867), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18872), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18877), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18883), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18862), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1319,16 +1319,16 @@ static void mini_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008A4BFC */ -static void mini_rc_track_banked_right_quarter_turn_5( +static void MiniRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4C0C */ -static void mini_rc_track_left_bank_to_25_deg_up( +static void MiniRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1336,42 +1336,42 @@ static void mini_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18760), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18760), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18764), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18764), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18761), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18761), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18765), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18765), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18762), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18762), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18763), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18763), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1391,7 +1391,7 @@ static void mini_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008A4C1C */ -static void mini_rc_track_right_bank_to_25_deg_up( +static void MiniRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1399,42 +1399,42 @@ static void mini_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18766), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18766), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18767), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18767), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18768), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18768), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18770), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18770), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18769), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18769), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18771), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18771), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1454,7 +1454,7 @@ static void mini_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008A4C2C */ -static void mini_rc_track_25_deg_up_to_left_bank( +static void MiniRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1462,24 +1462,24 @@ static void mini_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18772), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18772), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18776), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18776), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18773), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18773), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18777), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18777), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1487,18 +1487,18 @@ static void mini_rc_track_25_deg_up_to_left_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18774), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18774), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18775), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18775), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1519,7 +1519,7 @@ static void mini_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008A4C3C */ -static void mini_rc_track_25_deg_up_to_right_bank( +static void MiniRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1527,18 +1527,18 @@ static void mini_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18778), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18778), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18779), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18779), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1546,24 +1546,24 @@ static void mini_rc_track_25_deg_up_to_right_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18780), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18780), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18782), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18782), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18781), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18781), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18783), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18783), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1584,39 +1584,39 @@ static void mini_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008A4C4C */ -static void mini_rc_track_left_bank_to_25_deg_down( +static void MiniRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4C5C */ -static void mini_rc_track_right_bank_to_25_deg_down( +static void MiniRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4C6C */ -static void mini_rc_track_25_deg_down_to_left_bank( +static void MiniRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4C7C */ -static void mini_rc_track_25_deg_down_to_right_bank( +static void MiniRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4C8C */ -static void mini_rc_track_left_bank( +static void MiniRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1624,36 +1624,36 @@ static void mini_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18784), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18784), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18785), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18785), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18786), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18786), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18787), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18787), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1666,15 +1666,15 @@ static void mini_rc_track_left_bank( } /** rct2: 0x008A4C9C */ -static void mini_rc_track_right_bank( +static void MiniRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4CAC */ -static void mini_rc_track_left_quarter_turn_5_25_deg_up( +static void MiniRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1686,28 +1686,28 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18936), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18941), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18946), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18951), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1739,12 +1739,12 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18947), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18952), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1759,17 +1759,17 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18938), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18943), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18948), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1790,7 +1790,7 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18939), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1805,7 +1805,7 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18954), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1820,28 +1820,28 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18940), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18945), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18950), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18955), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1863,7 +1863,7 @@ static void mini_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008A4CBC */ -static void mini_rc_track_right_quarter_turn_5_25_deg_up( +static void MiniRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1875,28 +1875,28 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18916), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18921), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18926), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18931), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1918,12 +1918,12 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18917), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18922), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1953,17 +1953,17 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18923), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18928), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18933), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1979,7 +1979,7 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18919), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1994,7 +1994,7 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18934), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2009,28 +2009,28 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18920), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18925), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18930), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18935), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2052,25 +2052,25 @@ static void mini_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008A4CCC */ -static void mini_rc_track_left_quarter_turn_5_25_deg_down( +static void MiniRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A4CDC */ -static void mini_rc_track_right_quarter_turn_5_25_deg_down( +static void MiniRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4CEC */ -static void mini_rc_track_s_bend_left( +static void MiniRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2082,26 +2082,26 @@ static void mini_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18900), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18904), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18903), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18907), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2133,12 +2133,12 @@ static void mini_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18902), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18906), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2153,12 +2153,12 @@ static void mini_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18902), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18906), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2186,26 +2186,26 @@ static void mini_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18903), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18907), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18900), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18904), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2227,7 +2227,7 @@ static void mini_rc_track_s_bend_left( } /** rct2: 0x008A4CFC */ -static void mini_rc_track_s_bend_right( +static void MiniRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2239,26 +2239,26 @@ static void mini_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18908), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18912), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18911), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18915), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2277,13 +2277,13 @@ static void mini_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18909), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18913), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2320,13 +2320,13 @@ static void mini_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18909), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18913), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2343,26 +2343,26 @@ static void mini_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18911), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18915), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18908), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18912), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2384,7 +2384,7 @@ static void mini_rc_track_s_bend_right( } /** rct2: 0x008A4D3C */ -static void mini_rc_track_left_quarter_turn_3( +static void MiniRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2396,26 +2396,26 @@ static void mini_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18821), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18824), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18827), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18818), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2437,22 +2437,22 @@ static void mini_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18820), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18823), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18826), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18817), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2465,27 +2465,27 @@ static void mini_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18819), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18822), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18825), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18816), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2506,16 +2506,16 @@ static void mini_rc_track_left_quarter_turn_3( } /** rct2: 0x008A4D4C */ -static void mini_rc_track_right_quarter_turn_3( +static void MiniRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4D5C */ -static void mini_rc_track_left_quarter_turn_3_bank( +static void MiniRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2527,29 +2527,29 @@ static void mini_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18833), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18840), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18836), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18839), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18830), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2571,22 +2571,22 @@ static void mini_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18832), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18835), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18838), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18829), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2599,30 +2599,30 @@ static void mini_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18831), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18834), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18837), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18841), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18828), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2643,16 +2643,16 @@ static void mini_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008A4D6C */ -static void mini_rc_track_right_quarter_turn_3_bank( +static void MiniRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4D7C */ -static void mini_rc_track_left_quarter_turn_3_25_deg_up( +static void MiniRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2753,7 +2753,7 @@ static void mini_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008A4D8C */ -static void mini_rc_track_right_quarter_turn_3_25_deg_up( +static void MiniRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2854,25 +2854,25 @@ static void mini_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008A4D9C */ -static void mini_rc_track_left_quarter_turn_3_25_deg_down( +static void MiniRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A4DAC */ -static void mini_rc_track_right_quarter_turn_3_25_deg_down( +static void MiniRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4DBC */ -static void mini_rc_track_left_half_banked_helix_up_small( +static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2884,29 +2884,29 @@ static void mini_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18991), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18998), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18994), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18997), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18988), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2929,22 +2929,22 @@ static void mini_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18990), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18993), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18996), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18987), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2957,31 +2957,31 @@ static void mini_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18989), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18992), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18995), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18999), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18986), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3006,30 +3006,30 @@ static void mini_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18988), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18991), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18998), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18994), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18997), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3056,22 +3056,22 @@ static void mini_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18987), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18990), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18993), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18996), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3084,31 +3084,31 @@ static void mini_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18986), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18989), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18992), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18995), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18999), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3126,7 +3126,7 @@ static void mini_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x008A4DCC */ -static void mini_rc_track_right_half_banked_helix_up_small( +static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3138,29 +3138,29 @@ static void mini_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18972), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18975), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18978), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18981), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18985), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3183,22 +3183,22 @@ static void mini_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18973), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18976), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18979), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18982), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3211,31 +3211,31 @@ static void mini_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18974), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18977), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18984), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18980), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18983), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3260,30 +3260,30 @@ static void mini_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18975), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18978), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18981), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18985), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18972), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3310,22 +3310,22 @@ static void mini_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18976), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18979), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18982), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18973), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3338,31 +3338,31 @@ static void mini_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18977), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18984), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18980), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18983), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18974), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3380,7 +3380,7 @@ static void mini_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x008A4DDC */ -static void mini_rc_track_left_half_banked_helix_down_small( +static void MiniRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3390,11 +3390,11 @@ static void mini_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A4DEC */ -static void mini_rc_track_right_half_banked_helix_down_small( +static void MiniRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3404,11 +3404,11 @@ static void mini_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4DFC */ -static void mini_rc_track_left_half_banked_helix_up_large( +static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3420,29 +3420,29 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19031), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19042), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19036), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19041), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19026), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3465,22 +3465,22 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19030), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19035), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19040), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19025), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3495,22 +3495,22 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19029), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19034), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19039), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19024), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3526,22 +3526,22 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19028), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19033), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19038), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19023), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3556,31 +3556,31 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19027), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19032), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19037), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19043), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19022), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3605,30 +3605,30 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19026), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19031), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19042), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19036), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19041), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3655,22 +3655,22 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19025), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19030), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19035), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19040), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3685,22 +3685,22 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19024), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19029), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19034), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19039), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3716,22 +3716,22 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19023), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19028), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19033), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19038), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3746,31 +3746,31 @@ static void mini_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19022), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19027), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19032), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19037), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19043), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3788,7 +3788,7 @@ static void mini_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x008A4E0C */ -static void mini_rc_track_right_half_banked_helix_up_large( +static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3800,29 +3800,29 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19000), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19005), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19010), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19015), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19021), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3845,22 +3845,22 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19001), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19006), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19011), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19016), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3875,22 +3875,22 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19002), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19007), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19012), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19017), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3906,22 +3906,22 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19003), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19008), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19013), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19018), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3936,31 +3936,31 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19004), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19009), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19020), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19014), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19019), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3985,30 +3985,30 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19005), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19010), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19015), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19021), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19000), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4035,22 +4035,22 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19006), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19011), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19016), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19001), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4065,22 +4065,22 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19007), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19012), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19017), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19002), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4096,22 +4096,22 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19008), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19013), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19018), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19003), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4126,31 +4126,31 @@ static void mini_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19009), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19020), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19014), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19019), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19004), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4168,7 +4168,7 @@ static void mini_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x008A4E1C */ -static void mini_rc_track_left_half_banked_helix_down_large( +static void MiniRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4178,11 +4178,11 @@ static void mini_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A4E2C */ -static void mini_rc_track_right_half_banked_helix_down_large( +static void MiniRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4192,11 +4192,11 @@ static void mini_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4E5C */ -static void mini_rc_track_left_quarter_turn_1_60_deg_up( +static void MiniRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4204,44 +4204,44 @@ static void mini_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18893), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18893), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18897), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18897), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18894), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18894), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18898), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18898), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18895), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18895), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18899), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18899), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18892), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18892), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18896), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18896), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A4E3C */ -static void mini_rc_track_right_quarter_turn_1_60_deg_up( +static void MiniRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4249,60 +4249,60 @@ static void mini_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18884), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18884), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18888), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18888), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18885), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18885), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18889), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18889), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18886), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18886), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18890), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18890), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18887), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18887), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18891), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18891), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008A4E4C */ -static void mini_rc_track_left_quarter_turn_1_60_deg_down( +static void MiniRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_right_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A4E6C */ -static void mini_rc_track_right_quarter_turn_1_60_deg_down( +static void MiniRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_quarter_turn_1_60_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A4E7C */ -static void mini_rc_track_brakes( +static void MiniRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4311,9 +4311,9 @@ static void mini_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18740), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18740), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4321,9 +4321,9 @@ static void mini_rc_track_brakes( case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18741), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18741), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4336,7 +4336,7 @@ static void mini_rc_track_brakes( } /** rct2: 0x008A50CC */ -static void mini_rc_track_25_deg_up_left_banked( +static void MiniRCTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4344,18 +4344,18 @@ static void mini_rc_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19222), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19222), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19223), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19223), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4363,18 +4363,18 @@ static void mini_rc_track_25_deg_up_left_banked( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19224), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19224), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19225), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19225), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4395,7 +4395,7 @@ static void mini_rc_track_25_deg_up_left_banked( } /** rct2: 0x008A50DC */ -static void mini_rc_track_25_deg_up_right_banked( +static void MiniRCTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4403,18 +4403,18 @@ static void mini_rc_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19226), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19226), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19227), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19227), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4422,18 +4422,18 @@ static void mini_rc_track_25_deg_up_right_banked( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19228), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19228), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19229), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19229), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4454,7 +4454,7 @@ static void mini_rc_track_25_deg_up_right_banked( } /** rct2: 0x008A4E8C */ -static void mini_rc_track_on_ride_photo( +static void MiniRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4466,8 +4466,8 @@ static void mini_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 5, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -4475,8 +4475,8 @@ static void mini_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 6, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -4484,8 +4484,8 @@ static void mini_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 5, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 8, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -4493,34 +4493,34 @@ static void mini_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 6, 6, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 7, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008A50EC */ -static void mini_rc_track_25_deg_down_left_banked( +static void MiniRCTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_right_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpRightBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A50FC */ -static void mini_rc_track_25_deg_down_right_banked( +static void MiniRCTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_left_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpLeftBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4EAC */ -static void mini_rc_track_left_eighth_to_diag( +static void MiniRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4532,26 +4532,26 @@ static void mini_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19076), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19080), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19084), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19088), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4570,22 +4570,22 @@ static void mini_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19077), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19081), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19085), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19089), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4600,22 +4600,22 @@ static void mini_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19078), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19082), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19086), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19090), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4634,26 +4634,26 @@ static void mini_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19079), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19083), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19087), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19091), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4668,7 +4668,7 @@ static void mini_rc_track_left_eighth_to_diag( } /** rct2: 0x008A4EBC */ -static void mini_rc_track_right_eighth_to_diag( +static void MiniRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4680,26 +4680,26 @@ static void mini_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19060), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19064), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19068), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19072), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4718,22 +4718,22 @@ static void mini_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19061), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19065), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19069), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19073), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4748,22 +4748,22 @@ static void mini_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19062), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19066), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19070), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19074), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4782,26 +4782,26 @@ static void mini_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19063), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19067), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19071), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19075), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4816,25 +4816,25 @@ static void mini_rc_track_right_eighth_to_diag( } /** rct2: 0x008A4ECC */ -static void mini_rc_track_left_eighth_to_orthogonal( +static void MiniRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mini_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4EDC */ -static void mini_rc_track_right_eighth_to_orthogonal( +static void MiniRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mini_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MiniRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A4EEC */ -static void mini_rc_track_left_eighth_bank_to_diag( +static void MiniRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4846,26 +4846,26 @@ static void mini_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19108), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19112), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19116), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19120), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4884,22 +4884,22 @@ static void mini_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19109), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19113), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19117), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19121), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4914,22 +4914,22 @@ static void mini_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19110), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19114), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19118), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19122), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4948,26 +4948,26 @@ static void mini_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19111), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19115), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19119), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19123), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4982,7 +4982,7 @@ static void mini_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008A4EFC */ -static void mini_rc_track_right_eighth_bank_to_diag( +static void MiniRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4994,26 +4994,26 @@ static void mini_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19092), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19096), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19100), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19104), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5032,22 +5032,22 @@ static void mini_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19093), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19097), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19101), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19105), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5062,22 +5062,22 @@ static void mini_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19094), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19098), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19102), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19106), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5096,26 +5096,26 @@ static void mini_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19095), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19099), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19103), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 2, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19107), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 3, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5130,25 +5130,25 @@ static void mini_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008A4F0C */ -static void mini_rc_track_left_eighth_bank_to_orthogonal( +static void MiniRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mini_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A4F1C */ -static void mini_rc_track_right_eighth_bank_to_orthogonal( +static void MiniRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mini_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MiniRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A4E9C */ -static void mini_rc_track_diag_flat( +static void MiniRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5162,7 +5162,7 @@ static void mini_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19189), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5173,7 +5173,7 @@ static void mini_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19127), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5189,7 +5189,7 @@ static void mini_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19186), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5200,7 +5200,7 @@ static void mini_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19124), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5216,7 +5216,7 @@ static void mini_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19188), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5227,7 +5227,7 @@ static void mini_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19126), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5247,7 +5247,7 @@ static void mini_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19187), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5272,7 +5272,7 @@ static void mini_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19125), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5294,7 +5294,7 @@ static void mini_rc_track_diag_flat( } /** rct2: 0x008A4F4C */ -static void mini_rc_track_diag_25_deg_up( +static void MiniRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5308,7 +5308,7 @@ static void mini_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19201), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5319,7 +5319,7 @@ static void mini_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19139), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5335,7 +5335,7 @@ static void mini_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19198), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5346,7 +5346,7 @@ static void mini_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19136), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5362,7 +5362,7 @@ static void mini_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19200), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5373,7 +5373,7 @@ static void mini_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19138), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5393,7 +5393,7 @@ static void mini_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19199), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5418,7 +5418,7 @@ static void mini_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19137), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5440,7 +5440,7 @@ static void mini_rc_track_diag_25_deg_up( } /** rct2: 0x008A4FAC */ -static void mini_rc_track_diag_60_deg_up( +static void MiniRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5452,7 +5452,7 @@ static void mini_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19151), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5465,7 +5465,7 @@ static void mini_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19148), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5478,7 +5478,7 @@ static void mini_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19150), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5495,7 +5495,7 @@ static void mini_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19149), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 42, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5516,7 +5516,7 @@ static void mini_rc_track_diag_60_deg_up( } /** rct2: 0x008A4F2C */ -static void mini_rc_track_diag_flat_to_25_deg_up( +static void MiniRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5530,7 +5530,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19193), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5541,7 +5541,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19131), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5557,7 +5557,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19190), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5568,7 +5568,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19128), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5584,7 +5584,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19192), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5595,7 +5595,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19130), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5615,7 +5615,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19191), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5640,7 +5640,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19129), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5662,7 +5662,7 @@ static void mini_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A4F8C */ -static void mini_rc_track_diag_25_deg_up_to_60_deg_up( +static void MiniRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5674,7 +5674,7 @@ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19143), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5687,7 +5687,7 @@ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19140), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5700,7 +5700,7 @@ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19142), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5717,7 +5717,7 @@ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19141), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5738,7 +5738,7 @@ static void mini_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008A4F9C */ -static void mini_rc_track_diag_60_deg_up_to_25_deg_up( +static void MiniRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5750,7 +5750,7 @@ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19147), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5763,7 +5763,7 @@ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19144), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5776,7 +5776,7 @@ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19146), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5793,7 +5793,7 @@ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19145), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 27, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5814,7 +5814,7 @@ static void mini_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008A4F3C */ -static void mini_rc_track_diag_25_deg_up_to_flat( +static void MiniRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5828,7 +5828,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19197), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5839,7 +5839,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19135), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5855,7 +5855,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19194), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5866,7 +5866,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19132), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5882,7 +5882,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19196), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5893,7 +5893,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19134), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5913,7 +5913,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19195), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5938,7 +5938,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19133), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5960,7 +5960,7 @@ static void mini_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A4F7C */ -static void mini_rc_track_diag_25_deg_down( +static void MiniRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5974,7 +5974,7 @@ static void mini_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19199), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5985,7 +5985,7 @@ static void mini_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19137), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6001,7 +6001,7 @@ static void mini_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19200), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6012,7 +6012,7 @@ static void mini_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19138), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6028,7 +6028,7 @@ static void mini_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19198), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6039,7 +6039,7 @@ static void mini_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19136), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6059,7 +6059,7 @@ static void mini_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19201), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6084,7 +6084,7 @@ static void mini_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19139), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6106,7 +6106,7 @@ static void mini_rc_track_diag_25_deg_down( } /** rct2: 0x008A4FDC */ -static void mini_rc_track_diag_60_deg_down( +static void MiniRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6118,7 +6118,7 @@ static void mini_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19149), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6131,7 +6131,7 @@ static void mini_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19150), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6144,7 +6144,7 @@ static void mini_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19148), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6161,7 +6161,7 @@ static void mini_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19151), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 34, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6182,7 +6182,7 @@ static void mini_rc_track_diag_60_deg_down( } /** rct2: 0x008A4F5C */ -static void mini_rc_track_diag_flat_to_25_deg_down( +static void MiniRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6196,7 +6196,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19195), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6207,7 +6207,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19133), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6222,7 +6222,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19196), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6233,7 +6233,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19134), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6248,7 +6248,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19194), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6259,7 +6259,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19132), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6278,7 +6278,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19197), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6303,7 +6303,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19135), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6326,7 +6326,7 @@ static void mini_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A4FBC */ -static void mini_rc_track_diag_25_deg_down_to_60_deg_down( +static void MiniRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6338,7 +6338,7 @@ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19145), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6351,7 +6351,7 @@ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19146), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6364,7 +6364,7 @@ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19144), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6381,7 +6381,7 @@ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19147), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 23, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6402,7 +6402,7 @@ static void mini_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008A4FCC */ -static void mini_rc_track_diag_60_deg_down_to_25_deg_down( +static void MiniRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6414,7 +6414,7 @@ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19141), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6427,7 +6427,7 @@ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19142), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6440,7 +6440,7 @@ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19140), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6457,7 +6457,7 @@ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19143), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6478,7 +6478,7 @@ static void mini_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008A4F6C */ -static void mini_rc_track_diag_25_deg_down_to_flat( +static void MiniRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6492,7 +6492,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19191), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6503,7 +6503,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19129), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6519,7 +6519,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19192), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6530,7 +6530,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19130), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6546,7 +6546,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19190), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6557,7 +6557,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19128), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6577,7 +6577,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19193), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6602,7 +6602,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19131), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6624,7 +6624,7 @@ static void mini_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A500C */ -static void mini_rc_track_diag_flat_to_left_bank( +static void MiniRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6636,7 +6636,7 @@ static void mini_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19159), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6649,10 +6649,10 @@ static void mini_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19156), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19160), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6665,7 +6665,7 @@ static void mini_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19158), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6681,7 +6681,7 @@ static void mini_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19157), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6701,7 +6701,7 @@ static void mini_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008A501C */ -static void mini_rc_track_diag_flat_to_right_bank( +static void MiniRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6713,7 +6713,7 @@ static void mini_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19164), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6726,7 +6726,7 @@ static void mini_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19161), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6739,10 +6739,10 @@ static void mini_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19163), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19165), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6758,7 +6758,7 @@ static void mini_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19162), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6778,7 +6778,7 @@ static void mini_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008A502C */ -static void mini_rc_track_diag_left_bank_to_flat( +static void MiniRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6790,7 +6790,7 @@ static void mini_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19162), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6803,10 +6803,10 @@ static void mini_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19163), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19165), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6819,7 +6819,7 @@ static void mini_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19161), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6835,7 +6835,7 @@ static void mini_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19164), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6855,7 +6855,7 @@ static void mini_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008A503C */ -static void mini_rc_track_diag_right_bank_to_flat( +static void MiniRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6867,7 +6867,7 @@ static void mini_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19157), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6880,7 +6880,7 @@ static void mini_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19158), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6893,10 +6893,10 @@ static void mini_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19156), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19160), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6912,7 +6912,7 @@ static void mini_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19159), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6932,7 +6932,7 @@ static void mini_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008A506C */ -static void mini_rc_track_diag_left_bank_to_25_deg_up( +static void MiniRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6944,7 +6944,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19179), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6957,10 +6957,10 @@ static void mini_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19176), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19180), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6973,7 +6973,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19178), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6989,7 +6989,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19177), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7009,7 +7009,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008A507C */ -static void mini_rc_track_diag_right_bank_to_25_deg_up( +static void MiniRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7021,7 +7021,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19184), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7034,7 +7034,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19181), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7047,10 +7047,10 @@ static void mini_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19183), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19185), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7066,7 +7066,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19182), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7086,7 +7086,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008A504C */ -static void mini_rc_track_diag_25_deg_up_to_left_bank( +static void MiniRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7098,7 +7098,7 @@ static void mini_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19169), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7111,10 +7111,10 @@ static void mini_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19166), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19170), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7127,7 +7127,7 @@ static void mini_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19168), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7144,7 +7144,7 @@ static void mini_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19167), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7165,7 +7165,7 @@ static void mini_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008A505C */ -static void mini_rc_track_diag_25_deg_up_to_right_bank( +static void MiniRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7177,7 +7177,7 @@ static void mini_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19174), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7190,7 +7190,7 @@ static void mini_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19171), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7203,10 +7203,10 @@ static void mini_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19173), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19175), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7223,7 +7223,7 @@ static void mini_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19172), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7244,7 +7244,7 @@ static void mini_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008A508C */ -static void mini_rc_track_diag_left_bank_to_25_deg_down( +static void MiniRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7256,7 +7256,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19172), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7268,10 +7268,10 @@ static void mini_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19173), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19175), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7283,7 +7283,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19171), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7299,7 +7299,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19174), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7321,7 +7321,7 @@ static void mini_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008A509C */ -static void mini_rc_track_diag_right_bank_to_25_deg_down( +static void MiniRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7333,7 +7333,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19167), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7345,7 +7345,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19168), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7357,10 +7357,10 @@ static void mini_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19166), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19170), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7376,7 +7376,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19169), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7398,7 +7398,7 @@ static void mini_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008A50AC */ -static void mini_rc_track_diag_25_deg_down_to_left_bank( +static void MiniRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7410,7 +7410,7 @@ static void mini_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19182), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7423,10 +7423,10 @@ static void mini_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19183), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19185), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7439,7 +7439,7 @@ static void mini_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19181), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7455,7 +7455,7 @@ static void mini_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19184), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7475,7 +7475,7 @@ static void mini_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008A50BC */ -static void mini_rc_track_diag_25_deg_down_to_right_bank( +static void MiniRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7487,7 +7487,7 @@ static void mini_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19177), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7500,7 +7500,7 @@ static void mini_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19178), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7513,10 +7513,10 @@ static void mini_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19176), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19180), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7532,7 +7532,7 @@ static void mini_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19179), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7552,7 +7552,7 @@ static void mini_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008A4FEC */ -static void mini_rc_track_diag_left_bank( +static void MiniRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7564,7 +7564,7 @@ static void mini_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19155), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7577,7 +7577,7 @@ static void mini_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19152), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7590,7 +7590,7 @@ static void mini_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19154), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7606,7 +7606,7 @@ static void mini_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19153), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7626,7 +7626,7 @@ static void mini_rc_track_diag_left_bank( } /** rct2: 0x008A4FFC */ -static void mini_rc_track_diag_right_bank( +static void MiniRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7638,7 +7638,7 @@ static void mini_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19153), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7651,7 +7651,7 @@ static void mini_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19154), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7664,7 +7664,7 @@ static void mini_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19152), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7680,7 +7680,7 @@ static void mini_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19155), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7700,26 +7700,26 @@ static void mini_rc_track_diag_right_bank( } /** rct2: 0x008A530C */ -static void mini_rc_track_block_brakes( +static void MiniRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_MiniRCBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); switch (direction) { case 0: case 2: - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: case 3: - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7732,7 +7732,7 @@ static void mini_rc_track_block_brakes( } /** rct2: 0x008A510C */ -static void mini_rc_track_left_banked_quarter_turn_3_25_deg_up( +static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7751,7 +7751,7 @@ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19319), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7797,14 +7797,14 @@ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19318), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19320), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7833,7 +7833,7 @@ static void mini_rc_track_left_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008A511C */ -static void mini_rc_track_right_banked_quarter_turn_3_25_deg_up( +static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7859,7 +7859,7 @@ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19310), { 0, 6, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7898,14 +7898,14 @@ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19309), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19311), { 6, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7934,26 +7934,25 @@ static void mini_rc_track_right_banked_quarter_turn_3_25_deg_up( } /** rct2: 0x008A512C */ -static void mini_rc_track_left_banked_quarter_turn_3_25_deg_down( +static void MiniRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_right_banked_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A513C */ -static void mini_rc_track_right_banked_quarter_turn_3_25_deg_down( +static void MiniRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_rc_track_left_banked_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftBankedQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A514C */ -static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( +static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7965,28 +7964,28 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19286), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19291), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19296), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19301), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8012,18 +8011,18 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19292), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19292), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19297), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19302), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8038,17 +8037,17 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19288), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19293), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19293), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19298), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8069,22 +8068,22 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19289), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19294), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19294), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19299), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19304), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8099,28 +8098,28 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19290), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19295), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19300), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19305), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8142,7 +8141,7 @@ static void mini_rc_track_left_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008A515C */ -static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( +static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8154,28 +8153,28 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19266), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19271), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19276), { 0, 0, height }, - { 32, 1, 34 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19281), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8197,17 +8196,17 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19267), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19272), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19277), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19277), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8232,17 +8231,17 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19273), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19278), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19278), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19283), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8258,22 +8257,22 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19269), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19274), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19279), { 0, 0, height }, { 1, 1, 34 }, - { 30, 30, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19279), { 0, 0, height }, + { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19284), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8288,28 +8287,28 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19270), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19275), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19280), { 0, 0, height }, - { 1, 32, 34 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19285), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8331,26 +8330,25 @@ static void mini_rc_track_right_banked_quarter_turn_5_25_deg_up( } /** rct2: 0x008A516C */ -static void mini_rc_track_left_banked_quarter_turn_5_25_deg_down( +static void MiniRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_right_banked_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MiniRCTrackRightBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A517C */ -static void mini_rc_track_right_banked_quarter_turn_5_25_deg_down( +static void MiniRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_rc_track_left_banked_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniRCTrackLeftBankedQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A518C */ -static void mini_rc_track_25_deg_up_to_left_banked_25_deg_up( +static void MiniRCTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8358,21 +8356,21 @@ static void mini_rc_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19230), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19230), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19231), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19231), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19238), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19238), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8380,18 +8378,18 @@ static void mini_rc_track_25_deg_up_to_left_banked_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19232), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19232), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19233), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19233), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8412,7 +8410,7 @@ static void mini_rc_track_25_deg_up_to_left_banked_25_deg_up( } /** rct2: 0x008A519C */ -static void mini_rc_track_25_deg_up_to_right_banked_25_deg_up( +static void MiniRCTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8420,18 +8418,18 @@ static void mini_rc_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19234), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19234), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19235), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19235), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8439,21 +8437,21 @@ static void mini_rc_track_25_deg_up_to_right_banked_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19236), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19236), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19239), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19239), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19237), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19237), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8474,7 +8472,7 @@ static void mini_rc_track_25_deg_up_to_right_banked_25_deg_up( } /** rct2: 0x008A51AC */ -static void mini_rc_track_left_banked_25_deg_up_to_25_deg_up( +static void MiniRCTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8482,21 +8480,21 @@ static void mini_rc_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19240), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19240), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19241), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19241), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19248), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19248), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8504,18 +8502,18 @@ static void mini_rc_track_left_banked_25_deg_up_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19242), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19242), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19243), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19243), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8536,7 +8534,7 @@ static void mini_rc_track_left_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008A51BC */ -static void mini_rc_track_right_banked_25_deg_up_to_25_deg_up( +static void MiniRCTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8544,18 +8542,18 @@ static void mini_rc_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19244), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19244), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19245), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19245), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8563,21 +8561,21 @@ static void mini_rc_track_right_banked_25_deg_up_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19246), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19246), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19249), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19249), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19247), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19247), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8598,39 +8596,39 @@ static void mini_rc_track_right_banked_25_deg_up_to_25_deg_up( } /** rct2: 0x008A51CC */ -static void mini_rc_track_25_deg_down_to_left_banked_25_deg_down( +static void MiniRCTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_right_banked_25_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A51DC */ -static void mini_rc_track_25_deg_down_to_right_banked_25_deg_down( +static void MiniRCTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_banked_25_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackLeftBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A51EC */ -static void mini_rc_track_left_banked_25_deg_down_to_25_deg_down( +static void MiniRCTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A51FC */ -static void mini_rc_track_right_banked_25_deg_down_to_25_deg_down( +static void MiniRCTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_25_deg_up_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrack25DegUpToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A520C */ -static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_up( +static void MiniRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8638,36 +8636,36 @@ static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19250), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19250), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19251), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19251), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19252), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19252), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19253), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19253), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8687,7 +8685,7 @@ static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_up( } /** rct2: 0x008A521C */ -static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_up( +static void MiniRCTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8695,36 +8693,36 @@ static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19254), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19254), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19255), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19255), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19256), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19256), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19257), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19257), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8744,7 +8742,7 @@ static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_up( } /** rct2: 0x008A524C */ -static void mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( +static void MiniRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8752,18 +8750,18 @@ static void mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19258), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19258), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19259), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19259), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8771,18 +8769,18 @@ static void mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19260), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19260), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19261), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19261), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8803,7 +8801,7 @@ static void mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( } /** rct2: 0x008A525C */ -static void mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( +static void MiniRCTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8811,18 +8809,18 @@ static void mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19262), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19262), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19263), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19263), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8830,18 +8828,18 @@ static void mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19264), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19264), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19265), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19265), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8862,43 +8860,39 @@ static void mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( } /** rct2: 0x008A526C */ -static void mini_rc_track_left_banked_flat_to_left_banked_25_deg_down( +static void MiniRCTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_right_banked_25_deg_up_to_right_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightBanked25DegUpToRightBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A527C */ -static void mini_rc_track_right_banked_flat_to_right_banked_25_deg_down( +static void MiniRCTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_banked_25_deg_up_to_left_banked_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackLeftBanked25DegUpToLeftBankedFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A522C */ -static void mini_rc_track_left_banked_25_deg_down_to_left_banked_flat( +static void MiniRCTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_right_banked_flat_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightBankedFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A523C */ -static void mini_rc_track_right_banked_25_deg_down_to_right_banked_flat( +static void MiniRCTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_banked_flat_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackLeftBankedFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A528C */ -static void mini_rc_track_flat_to_left_banked_25_deg_up( +static void MiniRCTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8906,39 +8900,39 @@ static void mini_rc_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19202), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19202), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19203), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19203), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19210), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19210), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19204), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19204), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19205), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19205), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8958,7 +8952,7 @@ static void mini_rc_track_flat_to_left_banked_25_deg_up( } /** rct2: 0x008A529C */ -static void mini_rc_track_flat_to_right_banked_25_deg_up( +static void MiniRCTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8966,39 +8960,39 @@ static void mini_rc_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19206), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19206), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19207), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19207), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19208), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19208), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19211), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19211), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19209), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19209), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9018,7 +9012,7 @@ static void mini_rc_track_flat_to_right_banked_25_deg_up( } /** rct2: 0x008A52AC */ -static void mini_rc_track_left_banked_25_deg_up_to_flat( +static void MiniRCTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9026,21 +9020,21 @@ static void mini_rc_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19212), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19212), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19213), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19213), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19220), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19220), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9048,18 +9042,18 @@ static void mini_rc_track_left_banked_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19214), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19214), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19215), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19215), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9080,7 +9074,7 @@ static void mini_rc_track_left_banked_25_deg_up_to_flat( } /** rct2: 0x008A52BC */ -static void mini_rc_track_right_banked_25_deg_up_to_flat( +static void MiniRCTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9088,18 +9082,18 @@ static void mini_rc_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19216), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19216), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19217), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19217), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9107,21 +9101,21 @@ static void mini_rc_track_right_banked_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19218), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19218), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19221), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19221), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19219), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19219), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_FORK_ALT, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9142,38 +9136,38 @@ static void mini_rc_track_right_banked_25_deg_up_to_flat( } /** rct2: 0x008A52CC */ -static void mini_rc_track_flat_to_left_banked_25_deg_down( +static void MiniRCTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_right_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackRightBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A52DC */ -static void mini_rc_track_flat_to_right_banked_25_deg_down( +static void MiniRCTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_left_banked_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackLeftBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A52EC */ -static void mini_rc_track_left_banked_25_deg_down_to_flat( +static void MiniRCTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_flat_to_right_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A52FC */ -static void mini_rc_track_right_banked_25_deg_down_to_flat( +static void MiniRCTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_rc_track_flat_to_left_banked_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniRCTrackFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void mini_rc_track_left_curved_lift_hill( +static void MiniRCTrackLeftCurvedLiftHill( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9273,7 +9267,7 @@ static void mini_rc_track_left_curved_lift_hill( } } -static void mini_rc_track_right_curved_lift_hill( +static void MiniRCTrackRightCurvedLiftHill( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9373,7 +9367,7 @@ static void mini_rc_track_right_curved_lift_hill( } } -static void mini_rc_track_booster( +static void MiniRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9389,8 +9383,8 @@ static void mini_rc_track_booster( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_MINI_RC_BOOSTER_NE_SW), - { ne_sw_offsetX, ne_sw_offsetY, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + { ne_sw_offsetX, ne_sw_offsetY, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9399,8 +9393,8 @@ static void mini_rc_track_booster( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_G2_MINI_RC_BOOSTER_NW_SE), - { nw_se_offsetX, nw_se_offsetY, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + { nw_se_offsetX, nw_se_offsetY, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_FORK_ALT, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -9412,282 +9406,282 @@ static void mini_rc_track_booster( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return mini_rc_track_flat; + return MiniRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return mini_rc_track_station; + return MiniRCTrackStation; case TrackElemType::Up25: - return mini_rc_track_25_deg_up; + return MiniRCTrack25DegUp; case TrackElemType::Up60: - return mini_rc_track_60_deg_up; + return MiniRCTrack60DegUp; case TrackElemType::FlatToUp25: - return mini_rc_track_flat_to_25_deg_up; + return MiniRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return mini_rc_track_25_deg_up_to_60_deg_up; + return MiniRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return mini_rc_track_60_deg_up_to_25_deg_up; + return MiniRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return mini_rc_track_25_deg_up_to_flat; + return MiniRCTrack25DegUpToFlat; case TrackElemType::Down25: - return mini_rc_track_25_deg_down; + return MiniRCTrack25DegDown; case TrackElemType::Down60: - return mini_rc_track_60_deg_down; + return MiniRCTrack60DegDown; case TrackElemType::FlatToDown25: - return mini_rc_track_flat_to_25_deg_down; + return MiniRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return mini_rc_track_25_deg_down_to_60_deg_down; + return MiniRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return mini_rc_track_60_deg_down_to_25_deg_down; + return MiniRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return mini_rc_track_25_deg_down_to_flat; + return MiniRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return mini_rc_track_left_quarter_turn_5; + return MiniRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return mini_rc_track_right_quarter_turn_5; + return MiniRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return mini_rc_track_flat_to_left_bank; + return MiniRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return mini_rc_track_flat_to_right_bank; + return MiniRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return mini_rc_track_left_bank_to_flat; + return MiniRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return mini_rc_track_right_bank_to_flat; + return MiniRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return mini_rc_track_banked_left_quarter_turn_5; + return MiniRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return mini_rc_track_banked_right_quarter_turn_5; + return MiniRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return mini_rc_track_left_bank_to_25_deg_up; + return MiniRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return mini_rc_track_right_bank_to_25_deg_up; + return MiniRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return mini_rc_track_25_deg_up_to_left_bank; + return MiniRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return mini_rc_track_25_deg_up_to_right_bank; + return MiniRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return mini_rc_track_left_bank_to_25_deg_down; + return MiniRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return mini_rc_track_right_bank_to_25_deg_down; + return MiniRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return mini_rc_track_25_deg_down_to_left_bank; + return MiniRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return mini_rc_track_25_deg_down_to_right_bank; + return MiniRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return mini_rc_track_left_bank; + return MiniRCTrackLeftBank; case TrackElemType::RightBank: - return mini_rc_track_right_bank; + return MiniRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return mini_rc_track_left_quarter_turn_5_25_deg_up; + return MiniRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return mini_rc_track_right_quarter_turn_5_25_deg_up; + return MiniRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return mini_rc_track_left_quarter_turn_5_25_deg_down; + return MiniRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return mini_rc_track_right_quarter_turn_5_25_deg_down; + return MiniRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return mini_rc_track_s_bend_left; + return MiniRCTrackSBendLeft; case TrackElemType::SBendRight: - return mini_rc_track_s_bend_right; + return MiniRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return mini_rc_track_left_quarter_turn_3; + return MiniRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return mini_rc_track_right_quarter_turn_3; + return MiniRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return mini_rc_track_left_quarter_turn_3_bank; + return MiniRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return mini_rc_track_right_quarter_turn_3_bank; + return MiniRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return mini_rc_track_left_quarter_turn_3_25_deg_up; + return MiniRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return mini_rc_track_right_quarter_turn_3_25_deg_up; + return MiniRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return mini_rc_track_left_quarter_turn_3_25_deg_down; + return MiniRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return mini_rc_track_right_quarter_turn_3_25_deg_down; + return MiniRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return mini_rc_track_left_half_banked_helix_up_small; + return MiniRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return mini_rc_track_right_half_banked_helix_up_small; + return MiniRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return mini_rc_track_left_half_banked_helix_down_small; + return MiniRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return mini_rc_track_right_half_banked_helix_down_small; + return MiniRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return mini_rc_track_left_half_banked_helix_up_large; + return MiniRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return mini_rc_track_right_half_banked_helix_up_large; + return MiniRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return mini_rc_track_left_half_banked_helix_down_large; + return MiniRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return mini_rc_track_right_half_banked_helix_down_large; + return MiniRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return mini_rc_track_left_quarter_turn_1_60_deg_up; + return MiniRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return mini_rc_track_right_quarter_turn_1_60_deg_up; + return MiniRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return mini_rc_track_left_quarter_turn_1_60_deg_down; + return MiniRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return mini_rc_track_right_quarter_turn_1_60_deg_down; + return MiniRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return mini_rc_track_brakes; + return MiniRCTrackBrakes; case TrackElemType::Up25LeftBanked: - return mini_rc_track_25_deg_up_left_banked; + return MiniRCTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return mini_rc_track_25_deg_up_right_banked; + return MiniRCTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return mini_rc_track_on_ride_photo; + return MiniRCTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return mini_rc_track_25_deg_down_left_banked; + return MiniRCTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return mini_rc_track_25_deg_down_right_banked; + return MiniRCTrack25DegDownRightBanked; case TrackElemType::LeftEighthToDiag: - return mini_rc_track_left_eighth_to_diag; + return MiniRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return mini_rc_track_right_eighth_to_diag; + return MiniRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return mini_rc_track_left_eighth_to_orthogonal; + return MiniRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return mini_rc_track_right_eighth_to_orthogonal; + return MiniRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return mini_rc_track_left_eighth_bank_to_diag; + return MiniRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return mini_rc_track_right_eighth_bank_to_diag; + return MiniRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return mini_rc_track_left_eighth_bank_to_orthogonal; + return MiniRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return mini_rc_track_right_eighth_bank_to_orthogonal; + return MiniRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return mini_rc_track_diag_flat; + return MiniRCTrackDiagFlat; case TrackElemType::DiagUp25: - return mini_rc_track_diag_25_deg_up; + return MiniRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return mini_rc_track_diag_60_deg_up; + return MiniRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return mini_rc_track_diag_flat_to_25_deg_up; + return MiniRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return mini_rc_track_diag_25_deg_up_to_60_deg_up; + return MiniRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return mini_rc_track_diag_60_deg_up_to_25_deg_up; + return MiniRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return mini_rc_track_diag_25_deg_up_to_flat; + return MiniRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return mini_rc_track_diag_25_deg_down; + return MiniRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return mini_rc_track_diag_60_deg_down; + return MiniRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return mini_rc_track_diag_flat_to_25_deg_down; + return MiniRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return mini_rc_track_diag_25_deg_down_to_60_deg_down; + return MiniRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return mini_rc_track_diag_60_deg_down_to_25_deg_down; + return MiniRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return mini_rc_track_diag_25_deg_down_to_flat; + return MiniRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return mini_rc_track_diag_flat_to_left_bank; + return MiniRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return mini_rc_track_diag_flat_to_right_bank; + return MiniRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return mini_rc_track_diag_left_bank_to_flat; + return MiniRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return mini_rc_track_diag_right_bank_to_flat; + return MiniRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return mini_rc_track_diag_left_bank_to_25_deg_up; + return MiniRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return mini_rc_track_diag_right_bank_to_25_deg_up; + return MiniRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return mini_rc_track_diag_25_deg_up_to_left_bank; + return MiniRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return mini_rc_track_diag_25_deg_up_to_right_bank; + return MiniRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return mini_rc_track_diag_left_bank_to_25_deg_down; + return MiniRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return mini_rc_track_diag_right_bank_to_25_deg_down; + return MiniRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return mini_rc_track_diag_25_deg_down_to_left_bank; + return MiniRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return mini_rc_track_diag_25_deg_down_to_right_bank; + return MiniRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return mini_rc_track_diag_left_bank; + return MiniRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return mini_rc_track_diag_right_bank; + return MiniRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return mini_rc_track_block_brakes; + return MiniRCTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return mini_rc_track_left_banked_quarter_turn_3_25_deg_up; + return MiniRCTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return mini_rc_track_right_banked_quarter_turn_3_25_deg_up; + return MiniRCTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return mini_rc_track_left_banked_quarter_turn_3_25_deg_down; + return MiniRCTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return mini_rc_track_right_banked_quarter_turn_3_25_deg_down; + return MiniRCTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return mini_rc_track_left_banked_quarter_turn_5_25_deg_up; + return MiniRCTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return mini_rc_track_right_banked_quarter_turn_5_25_deg_up; + return MiniRCTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return mini_rc_track_left_banked_quarter_turn_5_25_deg_down; + return MiniRCTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return mini_rc_track_right_banked_quarter_turn_5_25_deg_down; + return MiniRCTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return mini_rc_track_25_deg_up_to_left_banked_25_deg_up; + return MiniRCTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return mini_rc_track_25_deg_up_to_right_banked_25_deg_up; + return MiniRCTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return mini_rc_track_left_banked_25_deg_up_to_25_deg_up; + return MiniRCTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return mini_rc_track_right_banked_25_deg_up_to_25_deg_up; + return MiniRCTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return mini_rc_track_25_deg_down_to_left_banked_25_deg_down; + return MiniRCTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return mini_rc_track_25_deg_down_to_right_banked_25_deg_down; + return MiniRCTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return mini_rc_track_left_banked_25_deg_down_to_25_deg_down; + return MiniRCTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return mini_rc_track_right_banked_25_deg_down_to_25_deg_down; + return MiniRCTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return mini_rc_track_left_banked_flat_to_left_banked_25_deg_up; + return MiniRCTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return mini_rc_track_right_banked_flat_to_right_banked_25_deg_up; + return MiniRCTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return mini_rc_track_left_banked_25_deg_up_to_left_banked_flat; + return MiniRCTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return mini_rc_track_right_banked_25_deg_up_to_right_banked_flat; + return MiniRCTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return mini_rc_track_left_banked_flat_to_left_banked_25_deg_down; + return MiniRCTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return mini_rc_track_right_banked_flat_to_right_banked_25_deg_down; + return MiniRCTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return mini_rc_track_left_banked_25_deg_down_to_left_banked_flat; + return MiniRCTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return mini_rc_track_right_banked_25_deg_down_to_right_banked_flat; + return MiniRCTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return mini_rc_track_flat_to_left_banked_25_deg_up; + return MiniRCTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return mini_rc_track_flat_to_right_banked_25_deg_up; + return MiniRCTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return mini_rc_track_left_banked_25_deg_up_to_flat; + return MiniRCTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return mini_rc_track_right_banked_25_deg_up_to_flat; + return MiniRCTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return mini_rc_track_flat_to_left_banked_25_deg_down; + return MiniRCTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return mini_rc_track_flat_to_right_banked_25_deg_down; + return MiniRCTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return mini_rc_track_left_banked_25_deg_down_to_flat; + return MiniRCTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return mini_rc_track_right_banked_25_deg_down_to_flat; + return MiniRCTrackRightBanked25DegDownToFlat; case TrackElemType::LeftCurvedLiftHill: - return mini_rc_track_left_curved_lift_hill; + return MiniRCTrackLeftCurvedLiftHill; case TrackElemType::RightCurvedLiftHill: - return mini_rc_track_right_curved_lift_hill; + return MiniRCTrackRightCurvedLiftHill; case TrackElemType::Booster: - return mini_rc_track_booster; + return MiniRCTrackBooster; } return nullptr; } diff --git a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp index f1a92fdee7..127522a5bd 100644 --- a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008AFE9C */ -static void mini_suspended_rc_track_flat( +static void MiniSuspendedRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -62,7 +62,7 @@ static void mini_suspended_rc_track_flat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -84,7 +84,7 @@ static void mini_suspended_rc_track_flat( } /** rct2: 0x008AFF4C, 0x008AFF5C, 0x008AFF6C */ -static void mini_suspended_rc_track_station( +static void MiniSuspendedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -97,22 +97,22 @@ static void mini_suspended_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 6, height + 24 }, { 32, 20, 1 }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 2, height }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + { { 0, 2, height }, { 32, 20, 1 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008AFEAC */ -static void mini_suspended_rc_track_25_deg_up( +static void MiniSuspendedRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -123,22 +123,22 @@ static void mini_suspended_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28435), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28441), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28437), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28442), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; } } @@ -149,29 +149,29 @@ static void mini_suspended_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28385), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28391), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28387), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28392), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 1 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -206,7 +206,7 @@ static void mini_suspended_rc_track_25_deg_up( } /** rct2: 0x008AFEBC */ -static void mini_suspended_rc_track_flat_to_25_deg_up( +static void MiniSuspendedRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -217,22 +217,22 @@ static void mini_suspended_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28436), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28443), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28438), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28444), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; } } @@ -243,29 +243,29 @@ static void mini_suspended_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28386), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28393), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28388), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28394), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -300,7 +300,7 @@ static void mini_suspended_rc_track_flat_to_25_deg_up( } /** rct2: 0x008AFECC */ -static void mini_suspended_rc_track_25_deg_up_to_flat( +static void MiniSuspendedRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -311,22 +311,22 @@ static void mini_suspended_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28440), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28446), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28439), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28445), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; } } @@ -337,29 +337,29 @@ static void mini_suspended_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28390), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28396), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28389), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28395), { 0, 6, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 1 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -394,31 +394,31 @@ static void mini_suspended_rc_track_25_deg_up_to_flat( } /** rct2: 0x008AFEDC */ -static void mini_suspended_rc_track_25_deg_down( +static void MiniSuspendedRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_suspended_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniSuspendedRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AFEEC */ -static void mini_suspended_rc_track_flat_to_25_deg_down( +static void MiniSuspendedRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_suspended_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniSuspendedRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AFEFC */ -static void mini_suspended_rc_track_25_deg_down_to_flat( +static void MiniSuspendedRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - mini_suspended_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniSuspendedRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AFF0C */ -static void mini_suspended_rc_track_left_quarter_turn_5( +static void MiniSuspendedRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -623,16 +623,16 @@ static void mini_suspended_rc_track_left_quarter_turn_5( } /** rct2: 0x008AFF1C */ -static void mini_suspended_rc_track_right_quarter_turn_5( +static void MiniSuspendedRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - mini_suspended_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniSuspendedRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AFF2C */ -static void mini_suspended_rc_track_s_bend_left( +static void MiniSuspendedRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -827,7 +827,7 @@ static void mini_suspended_rc_track_s_bend_left( } /** rct2: 0x008AFF3C */ -static void mini_suspended_rc_track_s_bend_right( +static void MiniSuspendedRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1022,7 +1022,7 @@ static void mini_suspended_rc_track_s_bend_right( } /** rct2: 0x008AFF7C */ -static void mini_suspended_rc_track_left_quarter_turn_3( +static void MiniSuspendedRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1164,16 +1164,16 @@ static void mini_suspended_rc_track_left_quarter_turn_3( } /** rct2: 0x008AFF8C */ -static void mini_suspended_rc_track_right_quarter_turn_3( +static void MiniSuspendedRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - mini_suspended_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MiniSuspendedRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AFFAC */ -static void mini_suspended_rc_track_left_eighth_to_diag( +static void MiniSuspendedRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1185,22 +1185,22 @@ static void mini_suspended_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28475), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28479), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28483), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28487), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; } @@ -1232,22 +1232,22 @@ static void mini_suspended_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28476), { 0, 0, height + 24 }, - { 32, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 32, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28480), { 0, 0, height + 24 }, - { 34, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 34, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28484), { 0, 0, height + 24 }, - { 32, 16, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28488), { 0, 0, height + 24 }, - { 32, 16, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1262,22 +1262,22 @@ static void mini_suspended_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28477), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28481), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 16, height + 24 }); + { { 16, 16, height + 24 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28485), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28489), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1296,22 +1296,22 @@ static void mini_suspended_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28478), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 16, height + 24 }); + { { 16, 16, height + 24 }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28482), { 0, 0, height + 24 }, - { 16, 18, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 18, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28486), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28490), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 1 } }); break; } @@ -1346,7 +1346,7 @@ static void mini_suspended_rc_track_left_eighth_to_diag( } /** rct2: 0x008AFFBC */ -static void mini_suspended_rc_track_right_eighth_to_diag( +static void MiniSuspendedRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1358,22 +1358,22 @@ static void mini_suspended_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28459), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28463), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28467), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28471), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 1 } }); break; } @@ -1405,22 +1405,22 @@ static void mini_suspended_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28460), { 0, 0, height + 24 }, - { 32, 16, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28464), { 0, 0, height + 24 }, - { 32, 16, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28468), { 0, 0, height + 24 }, - { 34, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 34, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28472), { 0, 0, height + 24 }, - { 32, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 32, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1435,22 +1435,22 @@ static void mini_suspended_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28461), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28465), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28469), { 0, 0, height + 24 }, - { 28, 28, 1 }, { 4, 2, height + 24 }); + { { 4, 2, height + 24 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28473), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 16, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1469,22 +1469,22 @@ static void mini_suspended_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28462), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28466), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 0, 0, height + 24 }); + { { 0, 0, height + 24 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28470), { 0, 0, height + 24 }, - { 16, 18, 1 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 18, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28474), { 0, 0, height + 24 }, - { 16, 16, 1 }, { 16, 16, height + 24 }); + { { 16, 16, height + 24 }, { 16, 16, 1 } }); break; } @@ -1519,25 +1519,25 @@ static void mini_suspended_rc_track_right_eighth_to_diag( } /** rct2: 0x008AFFCC */ -static void mini_suspended_rc_track_left_eighth_to_orthogonal( +static void MiniSuspendedRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mini_suspended_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MiniSuspendedRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AFFDC */ -static void mini_suspended_rc_track_right_eighth_to_orthogonal( +static void MiniSuspendedRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - mini_suspended_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MiniSuspendedRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008AFF9C */ -static void mini_suspended_rc_track_diag_flat( +static void MiniSuspendedRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1551,7 +1551,7 @@ static void mini_suspended_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28510), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1562,7 +1562,7 @@ static void mini_suspended_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28494), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1578,7 +1578,7 @@ static void mini_suspended_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28507), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1589,7 +1589,7 @@ static void mini_suspended_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28491), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1605,7 +1605,7 @@ static void mini_suspended_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28509), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1616,7 +1616,7 @@ static void mini_suspended_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28493), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1632,7 +1632,7 @@ static void mini_suspended_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28508), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1643,7 +1643,7 @@ static void mini_suspended_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28492), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 1 } }); break; } } @@ -1676,7 +1676,7 @@ static void mini_suspended_rc_track_diag_flat( } /** rct2: 0x008B000C */ -static void mini_suspended_rc_track_diag_25_deg_up( +static void MiniSuspendedRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1690,7 +1690,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28522), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1701,7 +1701,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28506), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1717,7 +1717,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28519), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1728,7 +1728,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28503), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1744,7 +1744,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28521), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1755,7 +1755,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28505), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1771,7 +1771,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28520), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1782,7 +1782,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28504), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -1815,7 +1815,7 @@ static void mini_suspended_rc_track_diag_25_deg_up( } /** rct2: 0x008AFFEC */ -static void mini_suspended_rc_track_diag_flat_to_25_deg_up( +static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1829,7 +1829,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28514), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1840,7 +1840,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28498), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1856,7 +1856,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28511), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1867,7 +1867,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28495), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1883,7 +1883,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28513), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1894,7 +1894,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28497), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1910,7 +1910,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28512), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1921,7 +1921,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28496), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1954,7 +1954,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008AFFFC */ -static void mini_suspended_rc_track_diag_25_deg_up_to_flat( +static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1968,7 +1968,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28518), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1979,7 +1979,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28502), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -1995,7 +1995,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28515), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2006,7 +2006,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28499), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2022,7 +2022,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28517), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2033,7 +2033,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28501), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2049,7 +2049,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28516), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2060,7 +2060,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28500), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2093,7 +2093,7 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008B003C */ -static void mini_suspended_rc_track_diag_25_deg_down( +static void MiniSuspendedRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2107,7 +2107,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28520), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2118,7 +2118,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28504), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2134,7 +2134,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28521), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2145,7 +2145,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28505), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2161,7 +2161,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28519), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2172,7 +2172,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28503), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2188,7 +2188,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28522), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2199,7 +2199,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28506), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 1 } }); break; } } @@ -2232,7 +2232,7 @@ static void mini_suspended_rc_track_diag_25_deg_down( } /** rct2: 0x008B001C */ -static void mini_suspended_rc_track_diag_flat_to_25_deg_down( +static void MiniSuspendedRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2246,7 +2246,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28516), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2257,7 +2257,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28500), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2272,7 +2272,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28517), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2283,7 +2283,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28501), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2298,7 +2298,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28515), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2309,7 +2309,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28499), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2324,7 +2324,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28518), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2335,7 +2335,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28502), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2368,7 +2368,7 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008B002C */ -static void mini_suspended_rc_track_diag_25_deg_down_to_flat( +static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2382,7 +2382,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28512), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2393,7 +2393,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28496), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2409,7 +2409,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28513), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2420,7 +2420,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28497), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2436,7 +2436,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28511), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2447,7 +2447,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28495), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2463,7 +2463,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28514), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2474,7 +2474,7 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28498), { -16, -16, height + 24 }, - { 32, 32, 1 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 1 } }); break; } } @@ -2506,62 +2506,62 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat( } } -TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniSuspendedRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return mini_suspended_rc_track_flat; + return MiniSuspendedRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return mini_suspended_rc_track_station; + return MiniSuspendedRCTrackStation; case TrackElemType::Up25: - return mini_suspended_rc_track_25_deg_up; + return MiniSuspendedRCTrack25DegUp; case TrackElemType::FlatToUp25: - return mini_suspended_rc_track_flat_to_25_deg_up; + return MiniSuspendedRCTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return mini_suspended_rc_track_25_deg_up_to_flat; + return MiniSuspendedRCTrack25DegUpToFlat; case TrackElemType::Down25: - return mini_suspended_rc_track_25_deg_down; + return MiniSuspendedRCTrack25DegDown; case TrackElemType::FlatToDown25: - return mini_suspended_rc_track_flat_to_25_deg_down; + return MiniSuspendedRCTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return mini_suspended_rc_track_25_deg_down_to_flat; + return MiniSuspendedRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return mini_suspended_rc_track_left_quarter_turn_5; + return MiniSuspendedRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return mini_suspended_rc_track_right_quarter_turn_5; + return MiniSuspendedRCTrackRightQuarterTurn5; case TrackElemType::SBendLeft: - return mini_suspended_rc_track_s_bend_left; + return MiniSuspendedRCTrackSBendLeft; case TrackElemType::SBendRight: - return mini_suspended_rc_track_s_bend_right; + return MiniSuspendedRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return mini_suspended_rc_track_left_quarter_turn_3; + return MiniSuspendedRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return mini_suspended_rc_track_right_quarter_turn_3; + return MiniSuspendedRCTrackRightQuarterTurn3; case TrackElemType::LeftEighthToDiag: - return mini_suspended_rc_track_left_eighth_to_diag; + return MiniSuspendedRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return mini_suspended_rc_track_right_eighth_to_diag; + return MiniSuspendedRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return mini_suspended_rc_track_left_eighth_to_orthogonal; + return MiniSuspendedRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return mini_suspended_rc_track_right_eighth_to_orthogonal; + return MiniSuspendedRCTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return mini_suspended_rc_track_diag_flat; + return MiniSuspendedRCTrackDiagFlat; case TrackElemType::DiagUp25: - return mini_suspended_rc_track_diag_25_deg_up; + return MiniSuspendedRCTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return mini_suspended_rc_track_diag_flat_to_25_deg_up; + return MiniSuspendedRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return mini_suspended_rc_track_diag_25_deg_up_to_flat; + return MiniSuspendedRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return mini_suspended_rc_track_diag_25_deg_down; + return MiniSuspendedRCTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return mini_suspended_rc_track_diag_flat_to_25_deg_down; + return MiniSuspendedRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return mini_suspended_rc_track_diag_25_deg_down_to_flat; + return MiniSuspendedRCTrackDiag25DegDownToFlat; } return nullptr; } diff --git a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index 65d0835a0a..2349c7240f 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ static constexpr const uint32_t MULTI_DIM_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED = 26 static constexpr const uint32_t MULTI_DIM_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED = 26554; /** rct2: 0x00792D88 */ -static void multi_dimension_rc_track_flat( +static void MultiDimensionRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -48,16 +48,16 @@ static void multi_dimension_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15808), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15809), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -71,16 +71,16 @@ static void multi_dimension_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -98,19 +98,19 @@ static void multi_dimension_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26227), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26228), { 0, 0, height + 24 }, - { 32, 20, 1 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 1 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -122,7 +122,7 @@ static void multi_dimension_rc_track_flat( } /** rct2: 0x00792F98, 0x00792FA8, 0x00792FB8 */ -static void multi_dimension_rc_track_station( +static void MultiDimensionRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -135,42 +135,42 @@ static void multi_dimension_rc_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); uint8_t offset = isClosed ? 2 : 1; PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][offset]), { 0, 0, height }, - { 32, 26, 1 }, { 0, 3, height + 3 }); + { { 0, 3, height + 3 }, { 32, 26, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 26, 1 }, { 0, 3, height + 3 }); + { { 0, 3, height + 3 }, { 32, 26, 1 } }); } - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11); const auto* stationObj = ride.GetStationObject(); bool hasFence; if (direction == 0 || direction == 2) { - hasFence = track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height); } else { - hasFence = track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height); } if (direction == 0 || direction == 2) { - hasFence = track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height); } else { - hasFence = track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height); } PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -179,7 +179,7 @@ static void multi_dimension_rc_track_station( } /** rct2: 0x00792D98 */ -static void multi_dimension_rc_track_25_deg_up( +static void MultiDimensionRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -192,25 +192,25 @@ static void multi_dimension_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15908), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15909), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15910), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15911), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -223,25 +223,25 @@ static void multi_dimension_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15880), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15881), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15882), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15883), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -265,28 +265,28 @@ static void multi_dimension_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26253), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26254), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26255), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26256), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 40 }); + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -322,7 +322,7 @@ static void multi_dimension_rc_track_25_deg_up( } /** rct2: 0x00792DA8 */ -static void multi_dimension_rc_track_60_deg_up( +static void MultiDimensionRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -332,26 +332,26 @@ static void multi_dimension_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15896), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15896), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15897), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15897), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15898), { 0, 0, height }, { 32, 1, 98 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15898), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15899), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15899), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 24, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -374,22 +374,22 @@ static void multi_dimension_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26269), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26270), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26271), { 0, 0, height + 24 }, - { 32, 2, 81 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26272), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 88 }); + { { 0, 6, height + 88 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -407,7 +407,7 @@ static void multi_dimension_rc_track_60_deg_up( } /** rct2: 0x00792DB8 */ -static void multi_dimension_rc_track_flat_to_25_deg_up( +static void MultiDimensionRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -420,25 +420,25 @@ static void multi_dimension_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15900), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15901), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15902), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15903), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -451,25 +451,25 @@ static void multi_dimension_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15872), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15873), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15874), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15875), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -493,28 +493,28 @@ static void multi_dimension_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26245), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26246), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26247), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26248), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -550,7 +550,7 @@ static void multi_dimension_rc_track_flat_to_25_deg_up( } /** rct2: 0x00792DC8 */ -static void multi_dimension_rc_track_25_deg_up_to_60_deg_up( +static void MultiDimensionRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -560,32 +560,32 @@ static void multi_dimension_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15884), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15884), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15885), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15885), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15888), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15888), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15886), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15886), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15889), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15889), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15887), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15887), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -608,28 +608,28 @@ static void multi_dimension_rc_track_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26257), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26261), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26258), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26262), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26259), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26260), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -647,7 +647,7 @@ static void multi_dimension_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x00792DD8 */ -static void multi_dimension_rc_track_60_deg_up_to_25_deg_up( +static void MultiDimensionRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -657,32 +657,32 @@ static void multi_dimension_rc_track_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15890), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15890), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15891), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15891), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15894), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15894), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15892), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15892), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15895), { 0, 0, height }, { 32, 1, 66 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15895), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15893), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15893), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -705,34 +705,34 @@ static void multi_dimension_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26263), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26267), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26264), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26268), { 0, 0, height + 24 }, - { 32, 10, 49 }, { 0, 10, height + 6 }); + { { 0, 10, height + 6 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26265), { 0, 0, height + 24 }, - { 32, 2, 49 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26266), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -768,7 +768,7 @@ static void multi_dimension_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x00792DE8 */ -static void multi_dimension_rc_track_25_deg_up_to_flat( +static void MultiDimensionRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -781,25 +781,25 @@ static void multi_dimension_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15904), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15905), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15906), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15907), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -812,25 +812,25 @@ static void multi_dimension_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15876), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15877), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15878), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15879), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -854,28 +854,28 @@ static void multi_dimension_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26249), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26250), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26251), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26252), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -911,55 +911,55 @@ static void multi_dimension_rc_track_25_deg_up_to_flat( } /** rct2: 0x00792DF8 */ -static void multi_dimension_rc_track_25_deg_down( +static void MultiDimensionRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792E08 */ -static void multi_dimension_rc_track_60_deg_down( +static void MultiDimensionRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792E18 */ -static void multi_dimension_rc_track_flat_to_25_deg_down( +static void MultiDimensionRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792E28 */ -static void multi_dimension_rc_track_25_deg_down_to_60_deg_down( +static void MultiDimensionRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792E38 */ -static void multi_dimension_rc_track_60_deg_down_to_25_deg_down( +static void MultiDimensionRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792E48 */ -static void multi_dimension_rc_track_25_deg_down_to_flat( +static void MultiDimensionRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792E58 */ -static void multi_dimension_rc_track_left_quarter_turn_5( +static void MultiDimensionRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -973,22 +973,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15921), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15926), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15931), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15916), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -1009,22 +1009,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15920), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15925), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15930), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15915), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1040,22 +1040,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15919), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15924), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15929), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15914), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1071,22 +1071,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15918), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15923), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15928), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15913), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1102,22 +1102,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15917), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15922), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15927), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15912), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -1147,22 +1147,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26310), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26315), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26320), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26305), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1187,22 +1187,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26309), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26314), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26319), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26304), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1218,22 +1218,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26308), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26313), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26318), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26303), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1249,22 +1249,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26307), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26312), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26317), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26302), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1280,22 +1280,22 @@ static void multi_dimension_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26306), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26311), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26316), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26301), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -1321,16 +1321,16 @@ static void multi_dimension_rc_track_left_quarter_turn_5( } /** rct2: 0x00792E68 */ -static void multi_dimension_rc_track_right_quarter_turn_5( +static void MultiDimensionRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - multi_dimension_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MultiDimensionRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00792E78 */ -static void multi_dimension_rc_track_flat_to_left_bank( +static void MultiDimensionRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1340,32 +1340,32 @@ static void multi_dimension_rc_track_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15832), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15832), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15840), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15840), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15833), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15833), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15841), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15841), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15834), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15834), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15835), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15835), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1381,22 +1381,22 @@ static void multi_dimension_rc_track_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26273), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26274), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26275), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26276), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1404,7 +1404,7 @@ static void multi_dimension_rc_track_flat_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -1416,7 +1416,7 @@ static void multi_dimension_rc_track_flat_to_left_bank( } /** rct2: 0x00792E88 */ -static void multi_dimension_rc_track_flat_to_right_bank( +static void MultiDimensionRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1426,32 +1426,32 @@ static void multi_dimension_rc_track_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15836), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15836), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15837), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15837), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15838), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15838), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15842), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15842), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15839), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15839), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15843), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15843), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1467,22 +1467,22 @@ static void multi_dimension_rc_track_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26277), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26278), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26279), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26280), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1490,7 +1490,7 @@ static void multi_dimension_rc_track_flat_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -1502,7 +1502,7 @@ static void multi_dimension_rc_track_flat_to_right_bank( } /** rct2: 0x00792E98 */ -static void multi_dimension_rc_track_left_bank_to_flat( +static void MultiDimensionRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1512,32 +1512,32 @@ static void multi_dimension_rc_track_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15838), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15838), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15842), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15842), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15839), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15839), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15843), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15843), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15836), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15836), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15837), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15837), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1553,22 +1553,22 @@ static void multi_dimension_rc_track_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26279), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26280), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26277), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26278), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1576,7 +1576,7 @@ static void multi_dimension_rc_track_left_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -1588,7 +1588,7 @@ static void multi_dimension_rc_track_left_bank_to_flat( } /** rct2: 0x00792EA8 */ -static void multi_dimension_rc_track_right_bank_to_flat( +static void MultiDimensionRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1598,32 +1598,32 @@ static void multi_dimension_rc_track_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15834), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15834), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15835), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15835), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15832), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15832), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15840), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15840), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15833), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15833), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15841), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15841), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1639,22 +1639,22 @@ static void multi_dimension_rc_track_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26275), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26276), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26273), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26274), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -1662,7 +1662,7 @@ static void multi_dimension_rc_track_right_bank_to_flat( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -1674,7 +1674,7 @@ static void multi_dimension_rc_track_right_bank_to_flat( } /** rct2: 0x00792EB8 */ -static void multi_dimension_rc_track_banked_left_quarter_turn_5( +static void MultiDimensionRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1688,25 +1688,25 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15941), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15952), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15946), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15951), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15936), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -1727,22 +1727,22 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15940), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15945), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15950), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15935), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1758,22 +1758,22 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15939), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15944), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15949), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15934), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1789,22 +1789,22 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15938), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15943), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15948), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15933), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1820,25 +1820,25 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15937), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15942), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15947), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15953), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15932), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -1868,22 +1868,22 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26354), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26359), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26364), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26349), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } @@ -1918,12 +1918,12 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26363), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26348), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1939,17 +1939,17 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26352), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 24 }); + { { 0, 16, height + 24 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26357), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 24 }); + { { 16, 16, height + 24 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26362), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1970,7 +1970,7 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26351), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1985,7 +1985,7 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26346), { 0, 0, height + 24 }, - { 16, 32, 3 }, { 16, 0, height + 24 }); + { { 16, 0, height + 24 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2001,22 +2001,22 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26350), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26355), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26360), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26345), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -2042,17 +2042,16 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x00792EC8 */ -static void multi_dimension_rc_track_banked_right_quarter_turn_5( +static void MultiDimensionRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - multi_dimension_rc_track_banked_left_quarter_turn_5( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MultiDimensionRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00792ED8 */ -static void multi_dimension_rc_track_left_bank_to_25_deg_up( +static void MultiDimensionRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2062,32 +2061,32 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15844), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15844), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15848), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15848), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15845), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15845), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15849), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15849), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15846), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15846), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15847), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15847), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2110,22 +2109,22 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26281), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26282), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26283), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26284), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2133,7 +2132,7 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2169,7 +2168,7 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x00792EE8 */ -static void multi_dimension_rc_track_right_bank_to_25_deg_up( +static void MultiDimensionRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2179,32 +2178,32 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15850), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15850), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15851), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15851), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15852), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15852), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15854), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15854), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15853), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15853), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15855), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15855), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2227,22 +2226,22 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26285), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26286), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26287), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26288), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2250,7 +2249,7 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_up( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2286,7 +2285,7 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x00792EF8 */ -static void multi_dimension_rc_track_25_deg_up_to_left_bank( +static void MultiDimensionRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2296,32 +2295,32 @@ static void multi_dimension_rc_track_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15856), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15856), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15860), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15860), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15857), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15857), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15861), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15861), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15858), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15858), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15859), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15859), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2344,22 +2343,22 @@ static void multi_dimension_rc_track_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26289), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26290), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26291), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26292), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2367,7 +2366,7 @@ static void multi_dimension_rc_track_25_deg_up_to_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2403,7 +2402,7 @@ static void multi_dimension_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x00792F08 */ -static void multi_dimension_rc_track_25_deg_up_to_right_bank( +static void MultiDimensionRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2413,32 +2412,32 @@ static void multi_dimension_rc_track_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15862), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15862), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15863), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15863), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15864), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15864), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15866), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15866), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15865), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15865), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15867), { 0, 0, height }, { 32, 1, 34 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15867), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2461,22 +2460,22 @@ static void multi_dimension_rc_track_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26293), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26294), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26295), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26296), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -2484,7 +2483,7 @@ static void multi_dimension_rc_track_25_deg_up_to_right_bank( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -2520,39 +2519,39 @@ static void multi_dimension_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x00792F18 */ -static void multi_dimension_rc_track_left_bank_to_25_deg_down( +static void MultiDimensionRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792F28 */ -static void multi_dimension_rc_track_right_bank_to_25_deg_down( +static void MultiDimensionRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792F38 */ -static void multi_dimension_rc_track_25_deg_down_to_left_bank( +static void MultiDimensionRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792F48 */ -static void multi_dimension_rc_track_25_deg_down_to_right_bank( +static void MultiDimensionRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792F58 */ -static void multi_dimension_rc_track_left_bank( +static void MultiDimensionRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2562,26 +2561,26 @@ static void multi_dimension_rc_track_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15868), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15868), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15869), { 0, 0, height }, { 32, 1, 26 }, - { 0, 27, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15869), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15870), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15870), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15871), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15871), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -2597,22 +2596,22 @@ static void multi_dimension_rc_track_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26297), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26298), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26299), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26300), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -2620,7 +2619,7 @@ static void multi_dimension_rc_track_left_bank( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -2632,15 +2631,15 @@ static void multi_dimension_rc_track_left_bank( } /** rct2: 0x00792F68 */ -static void multi_dimension_rc_track_right_bank( +static void MultiDimensionRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00792F78 */ -static void multi_dimension_rc_track_s_bend_left( +static void MultiDimensionRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2654,22 +2653,22 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15816), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15820), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15819), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15823), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -2701,12 +2700,12 @@ static void multi_dimension_rc_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15818), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15822), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2718,12 +2717,12 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15818), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15822), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -2749,22 +2748,22 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15819), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15823), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15816), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15820), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -2793,22 +2792,22 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26229), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26233), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26232), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26236), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -2829,22 +2828,22 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26230), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26234), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26231), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26235), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; } @@ -2873,22 +2872,22 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26231), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26235), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26230), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26234), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; } @@ -2917,22 +2916,22 @@ static void multi_dimension_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26232), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26236), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26229), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26233), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -2957,7 +2956,7 @@ static void multi_dimension_rc_track_s_bend_left( } /** rct2: 0x00792F88 */ -static void multi_dimension_rc_track_s_bend_right( +static void MultiDimensionRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2971,22 +2970,22 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15824), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15828), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15827), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15831), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3004,14 +3003,14 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15825), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15829), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3045,14 +3044,14 @@ static void multi_dimension_rc_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15825), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15829), { 0, 0, height }, - { 32, 26, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3066,22 +3065,22 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15827), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15831), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15824), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15828), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3110,22 +3109,22 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26237), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26241), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26240), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26244), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3146,22 +3145,22 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26238), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26242), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26239), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26243), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; } @@ -3190,22 +3189,22 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26239), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26243), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26238), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26242), { 0, 0, height + 24 }, - { 32, 26, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 26, 3 } }); break; } @@ -3234,22 +3233,22 @@ static void multi_dimension_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26240), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26244), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26237), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26241), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3274,7 +3273,7 @@ static void multi_dimension_rc_track_s_bend_right( } /** rct2: 0x00792FC8 */ -static void multi_dimension_rc_track_left_quarter_turn_3( +static void MultiDimensionRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3288,22 +3287,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15959), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15962), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15965), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15956), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3324,22 +3323,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15958), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15961), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15964), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15955), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3352,22 +3351,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15957), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15960), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15963), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15954), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3397,22 +3396,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26326), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26329), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26332), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26323), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3437,22 +3436,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26325), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26328), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26331), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26322), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3465,22 +3464,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26324), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26327), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26330), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26321), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -3506,16 +3505,16 @@ static void multi_dimension_rc_track_left_quarter_turn_3( } /** rct2: 0x00792FD8 */ -static void multi_dimension_rc_track_right_quarter_turn_3( +static void MultiDimensionRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - multi_dimension_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MultiDimensionRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00792FE8 */ -static void multi_dimension_rc_track_left_quarter_turn_3_bank( +static void MultiDimensionRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3529,25 +3528,25 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15971), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15978), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15974), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15977), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15968), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3568,22 +3567,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15970), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15973), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15976), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15967), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3596,25 +3595,25 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15969), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15972), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15975), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15979), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15966), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3644,22 +3643,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26338), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26341), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26344), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26335), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -3684,22 +3683,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26337), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26340), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26343), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26334), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3712,22 +3711,22 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26336), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26339), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26342), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26333), { 0, 0, height + 24 }, - { 20, 32, 3 }, { 6, 0, height + 22 }); + { { 6, 0, height + 22 }, { 20, 32, 3 } }); break; } @@ -3753,16 +3752,16 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x00792FF8 */ -static void multi_dimension_rc_track_right_quarter_turn_3_bank( +static void MultiDimensionRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - multi_dimension_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MultiDimensionRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00793008 */ -static void multi_dimension_rc_track_left_half_banked_helix_up_small( +static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3774,25 +3773,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16197), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16204), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16200), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16203), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16194), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -3813,22 +3812,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16196), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16199), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16202), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16193), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3841,25 +3840,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16195), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16198), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16201), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16205), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16192), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3884,25 +3883,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16194), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16197), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16204), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16200), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16203), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -3928,22 +3927,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16193), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16196), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16199), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16202), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3956,25 +3955,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16192), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16195), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16198), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16201), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16205), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -3990,7 +3989,7 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x00793018 */ -static void multi_dimension_rc_track_right_half_banked_helix_up_small( +static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4002,25 +4001,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16178), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16181), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16184), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16187), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16191), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -4041,22 +4040,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16179), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16182), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16185), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16188), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4069,25 +4068,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16180), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16183), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16190), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16186), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16189), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4110,25 +4109,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16181), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16184), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16187), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16191), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16178), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4156,22 +4155,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16182), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16185), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16188), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16179), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4184,25 +4183,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16183), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16190), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16186), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16189), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16180), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4218,7 +4217,7 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x00793028 */ -static void multi_dimension_rc_track_left_half_banked_helix_down_small( +static void MultiDimensionRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4228,12 +4227,11 @@ static void multi_dimension_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - multi_dimension_rc_track_right_half_banked_helix_up_small( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MultiDimensionRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00793038 */ -static void multi_dimension_rc_track_right_half_banked_helix_down_small( +static void MultiDimensionRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4243,12 +4241,11 @@ static void multi_dimension_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - multi_dimension_rc_track_left_half_banked_helix_up_small( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MultiDimensionRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00793048 */ -static void multi_dimension_rc_track_left_half_banked_helix_up_large( +static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4260,25 +4257,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16165), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16176), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16170), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16175), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16160), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4299,22 +4296,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16164), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16169), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16174), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16159), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4329,22 +4326,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16163), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16168), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16173), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16158), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4360,22 +4357,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16162), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16167), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16172), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16157), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4390,25 +4387,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16161), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16166), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16171), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16177), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16156), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4433,25 +4430,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16160), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16165), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16176), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16170), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16175), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4477,22 +4474,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16159), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16164), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16169), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16174), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4507,22 +4504,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16158), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16163), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16168), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16173), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4538,22 +4535,22 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16157), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16162), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16167), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16172), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4568,25 +4565,25 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16156), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16161), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16166), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16171), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16177), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -4602,7 +4599,7 @@ static void multi_dimension_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x00793058 */ -static void multi_dimension_rc_track_right_half_banked_helix_up_large( +static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4614,25 +4611,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16134), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16139), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16144), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16149), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16155), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -4653,22 +4650,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16135), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16140), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16145), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16150), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4683,22 +4680,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16136), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16141), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16146), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16151), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4714,22 +4711,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16137), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16142), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16147), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16152), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4744,25 +4741,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16138), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16143), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16154), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16148), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16153), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4785,25 +4782,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16139), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16144), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16149), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16155), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16134), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -4831,22 +4828,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16140), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16145), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16150), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16135), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4861,22 +4858,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16141), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16146), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16151), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16136), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4892,22 +4889,22 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16142), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16147), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16152), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16137), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4922,25 +4919,25 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16143), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16154), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16148), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16153), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16138), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -4956,7 +4953,7 @@ static void multi_dimension_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x00793068 */ -static void multi_dimension_rc_track_left_half_banked_helix_down_large( +static void MultiDimensionRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4966,12 +4963,11 @@ static void multi_dimension_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - multi_dimension_rc_track_right_half_banked_helix_up_large( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + MultiDimensionRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x00793078 */ -static void multi_dimension_rc_track_right_half_banked_helix_down_large( +static void MultiDimensionRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4981,12 +4977,11 @@ static void multi_dimension_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - multi_dimension_rc_track_left_half_banked_helix_up_large( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + MultiDimensionRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00793088 */ -static void multi_dimension_rc_track_brakes( +static void MultiDimensionRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4997,17 +4992,17 @@ static void multi_dimension_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16218), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16218), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16219), { 0, 0, height }, { 32, 20, 3 }, - { 0, 6, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16219), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5024,19 +5019,19 @@ static void multi_dimension_rc_track_brakes( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26549), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26550), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -5048,7 +5043,7 @@ static void multi_dimension_rc_track_brakes( } /** rct2: 0x00793098 */ -static void multi_dimension_rc_track_on_ride_photo( +static void MultiDimensionRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5064,8 +5059,8 @@ static void multi_dimension_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -5075,8 +5070,8 @@ static void multi_dimension_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5086,8 +5081,8 @@ static void multi_dimension_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -5097,11 +5092,11 @@ static void multi_dimension_rc_track_on_ride_photo( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, { 32, 20, 0 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, + { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -5119,7 +5114,7 @@ static void multi_dimension_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26227), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -5130,7 +5125,7 @@ static void multi_dimension_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26228), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5141,7 +5136,7 @@ static void multi_dimension_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26227), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -5152,10 +5147,10 @@ static void multi_dimension_rc_track_on_ride_photo( session, METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26228), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64, 0x20); @@ -5163,7 +5158,7 @@ static void multi_dimension_rc_track_on_ride_photo( } /** rct2: 0x00793328 */ -static void multi_dimension_rc_track_90_deg_up( +static void MultiDimensionRCTrack90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5177,22 +5172,22 @@ static void multi_dimension_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16130), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16131), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16132), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16133), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -5214,22 +5209,22 @@ static void multi_dimension_rc_track_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26533), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26534), { 0, 0, height + 24 }, - { 32, 2, 31 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26535), { 0, 0, height + 24 }, - { 32, 2, 31 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26536), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 56 }); + { { 0, 6, height + 56 }, { 32, 20, 3 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -5244,15 +5239,15 @@ static void multi_dimension_rc_track_90_deg_up( } /** rct2: 0x00793338 */ -static void multi_dimension_rc_track_90_deg_down( +static void MultiDimensionRCTrack90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00793348 */ -static void multi_dimension_rc_track_60_deg_up_to_90_deg_up( +static void MultiDimensionRCTrack60DegUpTo90DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5266,22 +5261,22 @@ static void multi_dimension_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16122), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16123), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16124), { 0, 0, height }, - { 2, 20, 55 }, { 24, 6, height }); + { { 24, 6, height }, { 2, 20, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16125), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -5307,22 +5302,22 @@ static void multi_dimension_rc_track_60_deg_up_to_90_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26525), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 80 }); + { { 0, 6, height + 80 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26526), { 0, 0, height + 24 }, - { 32, 2, 55 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26527), { 0, 0, height + 24 }, - { 32, 2, 55 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26528), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 80 }); + { { 0, 6, height + 80 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -5341,15 +5336,15 @@ static void multi_dimension_rc_track_60_deg_up_to_90_deg_up( } /** rct2: 0x00793358 */ -static void multi_dimension_rc_track_90_deg_down_to_60_deg_down( +static void MultiDimensionRCTrack90DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - multi_dimension_rc_track_60_deg_up_to_90_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrack60DegUpTo90DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00793368 */ -static void multi_dimension_rc_track_90_deg_up_to_60_deg_up( +static void MultiDimensionRCTrack90DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5359,23 +5354,23 @@ static void multi_dimension_rc_track_90_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16126), { 0, 0, height }, { 6, 20, 3 }, - { 0, 6, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16126), { 0, 0, height }, + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16127), { 0, 0, height }, { 2, 20, 31 }, - { 39, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16127), { 0, 0, height }, + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16128), { 0, 0, height }, { 2, 20, 31 }, - { 39, 6, height + 8 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16128), { 0, 0, height }, + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16129), { 0, 0, height }, { 6, 20, 3 }, - { 0, 6, height + 2 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16129), { 0, 0, height }, + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; } switch (direction) @@ -5398,22 +5393,22 @@ static void multi_dimension_rc_track_90_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26529), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 80 }); + { { 0, 6, height + 80 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26530), { 0, 0, height + 24 }, - { 32, 2, 55 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26531), { 0, 0, height + 24 }, - { 32, 2, 55 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26532), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 80 }); + { { 0, 6, height + 80 }, { 32, 20, 3 } }); break; } switch (direction) @@ -5432,7 +5427,7 @@ static void multi_dimension_rc_track_90_deg_up_to_60_deg_up( } /** rct2: 0x00793378 */ -static void multi_dimension_rc_track_60_deg_down_to_90_deg_down( +static void MultiDimensionRCTrack60DegDownTo90DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5446,22 +5441,22 @@ static void multi_dimension_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16128), { 0, 0, height }, - { 2, 20, 31 }, { 39, 6, height + 8 }); + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16129), { 0, 0, height }, - { 6, 20, 3 }, { 0, 6, height + 2 }); + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16126), { 0, 0, height }, - { 6, 20, 3 }, { 0, 6, height + 2 }); + { { 0, 6, height + 2 }, { 6, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16127), { 0, 0, height }, - { 2, 20, 31 }, { 39, 6, height + 8 }); + { { 39, 6, height + 8 }, { 2, 20, 31 } }); break; } if (direction == 0 || direction == 3) @@ -5486,22 +5481,22 @@ static void multi_dimension_rc_track_60_deg_down_to_90_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26531), { 0, 0, height + 24 }, - { 32, 2, 55 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 55 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26532), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 80 }); + { { 0, 6, height + 80 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26529), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 80 }); + { { 0, 6, height + 80 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26530), { 0, 0, height + 24 }, - { 32, 2, 55 }, { 0, 4, height + 6 }); + { { 0, 4, height + 6 }, { 32, 2, 55 } }); break; } if (direction == 0 || direction == 3) @@ -5519,7 +5514,7 @@ static void multi_dimension_rc_track_60_deg_down_to_90_deg_down( } /** rct2: 0x007930B8 */ -static void multi_dimension_rc_track_left_eighth_to_diag( +static void MultiDimensionRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5533,22 +5528,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15996), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16000), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16004), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16008), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5566,22 +5561,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15997), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16001), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16005), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16009), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5593,22 +5588,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15998), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16002), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16006), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16010), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5627,28 +5622,28 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15999), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16003), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16007), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16011), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5668,22 +5663,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26405), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26409), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26413), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26417), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -5704,22 +5699,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26406), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26410), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26414), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26418), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5735,22 +5730,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26407), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26411), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26415), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26419), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5769,22 +5764,22 @@ static void multi_dimension_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26408), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26412), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26416), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26420), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; } @@ -5820,7 +5815,7 @@ static void multi_dimension_rc_track_left_eighth_to_diag( } /** rct2: 0x007930C8 */ -static void multi_dimension_rc_track_right_eighth_to_diag( +static void MultiDimensionRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5834,22 +5829,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15980), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15984), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15988), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15992), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -5867,22 +5862,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15981), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15985), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15989), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15993), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5894,22 +5889,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15982), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15986), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15990), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15994), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5928,28 +5923,28 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15983), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15987), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15991), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15995), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5969,22 +5964,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26389), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26393), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26397), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26401), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -6005,22 +6000,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26390), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26394), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26398), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26402), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6036,22 +6031,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26391), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26395), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26399), { 0, 0, height + 24 }, - { 28, 28, 3 }, { 4, 4, height + 22 }); + { { 4, 4, height + 22 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26403), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6070,22 +6065,22 @@ static void multi_dimension_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26392), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26396), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26400), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26404), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } @@ -6121,25 +6116,25 @@ static void multi_dimension_rc_track_right_eighth_to_diag( } /** rct2: 0x007930D8 */ -static void multi_dimension_rc_track_left_eighth_to_orthogonal( +static void MultiDimensionRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - multi_dimension_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x007930E8 */ -static void multi_dimension_rc_track_right_eighth_to_orthogonal( +static void MultiDimensionRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - multi_dimension_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MultiDimensionRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x007930F8 */ -static void multi_dimension_rc_track_left_eighth_bank_to_diag( +static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6153,22 +6148,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16028), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16032), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16036), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16040), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -6186,22 +6181,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16029), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16033), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16037), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16041), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6213,22 +6208,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16030), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16034), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16038), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16042), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6247,28 +6242,28 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16031), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16035), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16039), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16043), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6288,22 +6283,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26437), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26441), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26445), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26449), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -6324,22 +6319,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26438), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26442), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26446), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26450), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6355,22 +6350,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26439), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26443), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26447), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26451), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6389,22 +6384,22 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26440), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26444), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26448), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26452), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; } @@ -6440,7 +6435,7 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x00793108 */ -static void multi_dimension_rc_track_right_eighth_bank_to_diag( +static void MultiDimensionRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6454,22 +6449,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16012), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16016), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16020), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16024), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup( @@ -6487,22 +6482,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16013), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16017), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16021), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16025), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -6514,22 +6509,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16014), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16018), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16022), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16026), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6548,28 +6543,28 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16015), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16019), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16023), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16027), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6589,22 +6584,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26421), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26425), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26429), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26433), { 0, 0, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 22 }); + { { 0, 6, height + 22 }, { 32, 20, 3 } }); break; } @@ -6625,22 +6620,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26422), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26426), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26430), { 0, 0, height + 24 }, - { 34, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26434), { 0, 0, height + 24 }, - { 32, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6656,22 +6651,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26423), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26427), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26431), { 0, 0, height + 24 }, - { 28, 28, 3 }, { 4, 4, height + 22 }); + { { 4, 4, height + 22 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26435), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6690,22 +6685,22 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26424), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 0, height + 22 }); + { { 16, 0, height + 22 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26428), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 22 }); + { { 0, 0, height + 22 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26432), { 0, 0, height + 24 }, - { 16, 18, 3 }, { 0, 16, height + 22 }); + { { 0, 16, height + 22 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26436), { 0, 0, height + 24 }, - { 16, 16, 3 }, { 16, 16, height + 22 }); + { { 16, 16, height + 22 }, { 16, 16, 3 } }); break; } @@ -6741,25 +6736,25 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x00793118 */ -static void multi_dimension_rc_track_left_eighth_bank_to_orthogonal( +static void MultiDimensionRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - multi_dimension_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + MultiDimensionRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00793128 */ -static void multi_dimension_rc_track_right_eighth_bank_to_orthogonal( +static void MultiDimensionRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - multi_dimension_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + MultiDimensionRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x007930A8 */ -static void multi_dimension_rc_track_diag_flat( +static void MultiDimensionRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6775,7 +6770,7 @@ static void multi_dimension_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16109), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6786,7 +6781,7 @@ static void multi_dimension_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16047), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6802,7 +6797,7 @@ static void multi_dimension_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16106), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6813,7 +6808,7 @@ static void multi_dimension_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16044), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6829,7 +6824,7 @@ static void multi_dimension_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16108), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6840,7 +6835,7 @@ static void multi_dimension_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16046), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6860,7 +6855,7 @@ static void multi_dimension_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16107), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6885,7 +6880,7 @@ static void multi_dimension_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16045), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6917,7 +6912,7 @@ static void multi_dimension_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26484), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -6928,7 +6923,7 @@ static void multi_dimension_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26456), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -6944,7 +6939,7 @@ static void multi_dimension_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26481), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -6955,7 +6950,7 @@ static void multi_dimension_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26453), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -6971,7 +6966,7 @@ static void multi_dimension_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26483), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -6982,7 +6977,7 @@ static void multi_dimension_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26455), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -6998,7 +6993,7 @@ static void multi_dimension_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26482), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -7009,7 +7004,7 @@ static void multi_dimension_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26454), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 22 }); + { -16, -16, height + 24 }, { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } } @@ -7043,7 +7038,7 @@ static void multi_dimension_rc_track_diag_flat( } /** rct2: 0x00793158 */ -static void multi_dimension_rc_track_diag_25_deg_up( +static void MultiDimensionRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7059,7 +7054,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16121), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7070,7 +7065,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16059), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7086,7 +7081,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16118), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7097,7 +7092,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16056), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7113,7 +7108,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16120), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7124,7 +7119,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16058), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7144,7 +7139,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16119), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7169,7 +7164,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16057), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7201,7 +7196,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26496), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7212,7 +7207,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26468), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7228,7 +7223,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26493), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7239,7 +7234,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26465), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7255,7 +7250,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26495), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7266,7 +7261,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26467), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7282,7 +7277,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26494), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7293,7 +7288,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26466), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 40 }); + { -16, -16, height + 24 }, { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } } @@ -7327,7 +7322,7 @@ static void multi_dimension_rc_track_diag_25_deg_up( } /** rct2: 0x007931B8 */ -static void multi_dimension_rc_track_diag_60_deg_up( +static void MultiDimensionRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7341,7 +7336,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16071), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7354,7 +7349,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16068), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7367,7 +7362,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16070), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7384,7 +7379,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16069), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7413,7 +7408,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26480), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7426,7 +7421,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26477), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7439,7 +7434,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26479), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7452,7 +7447,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26478), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 3 } }); break; } @@ -7485,7 +7480,7 @@ static void multi_dimension_rc_track_diag_60_deg_up( } /** rct2: 0x00793138 */ -static void multi_dimension_rc_track_diag_flat_to_25_deg_up( +static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7501,7 +7496,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16113), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7512,7 +7507,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16051), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7528,7 +7523,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16110), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7539,7 +7534,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16048), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7555,7 +7550,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16112), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7566,7 +7561,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16050), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7586,7 +7581,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16111), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7611,7 +7606,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16049), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7643,7 +7638,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26488), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7654,7 +7649,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26460), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7670,7 +7665,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26485), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7681,7 +7676,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26457), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7697,7 +7692,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26487), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7708,7 +7703,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26459), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7724,7 +7719,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26486), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7735,7 +7730,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26458), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -7769,7 +7764,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x00793198 */ -static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( +static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7783,7 +7778,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16063), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7796,7 +7791,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16060), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7809,7 +7804,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16062), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7826,7 +7821,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16061), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7855,7 +7850,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26472), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7868,7 +7863,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26469), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7881,7 +7876,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26471), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7894,7 +7889,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26470), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -7927,7 +7922,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x007931A8 */ -static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( +static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7941,7 +7936,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16067), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7954,7 +7949,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16064), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7967,7 +7962,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16066), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7984,7 +7979,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16065), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8013,7 +8008,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26476), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8026,7 +8021,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26473), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8039,7 +8034,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26475), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8052,7 +8047,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26474), { -16, -16, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 56 }); + { { 0, 0, height + 56 }, { 16, 16, 3 } }); break; } @@ -8085,7 +8080,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x00793148 */ -static void multi_dimension_rc_track_diag_25_deg_up_to_flat( +static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8101,7 +8096,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16117), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8112,7 +8107,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16055), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8128,7 +8123,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16114), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8139,7 +8134,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16052), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8155,7 +8150,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16116), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8166,7 +8161,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16054), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8186,7 +8181,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16115), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8211,7 +8206,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16053), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8243,7 +8238,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26492), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8254,7 +8249,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26464), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8270,7 +8265,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26489), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8281,7 +8276,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26461), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8297,7 +8292,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26491), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8308,7 +8303,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26463), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8324,7 +8319,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26490), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8335,7 +8330,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26462), - { -16, -16, height + 24 }, { 32, 32, 3 }, { -16, -16, height + 32 }); + { -16, -16, height + 24 }, { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } } @@ -8369,7 +8364,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x00793188 */ -static void multi_dimension_rc_track_diag_25_deg_down( +static void MultiDimensionRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8385,7 +8380,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16119), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8396,7 +8391,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16057), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8412,7 +8407,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16120), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8423,7 +8418,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16058), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8439,7 +8434,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16118), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8450,7 +8445,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16056), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8470,7 +8465,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16121), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8495,7 +8490,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16059), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8525,7 +8520,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26466), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8538,7 +8533,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26467), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8551,7 +8546,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26465), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8564,7 +8559,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26468), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -8597,7 +8592,7 @@ static void multi_dimension_rc_track_diag_25_deg_down( } /** rct2: 0x007931E8 */ -static void multi_dimension_rc_track_diag_60_deg_down( +static void MultiDimensionRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8611,7 +8606,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16069), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8624,7 +8619,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16070), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8637,7 +8632,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16068), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8654,7 +8649,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16071), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8683,7 +8678,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26478), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 24 }); + { { -16, -16, height + 24 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8696,7 +8691,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26479), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8709,7 +8704,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26477), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8722,7 +8717,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26480), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 88 }); + { { -16, -16, height + 88 }, { 32, 32, 3 } }); break; } @@ -8755,7 +8750,7 @@ static void multi_dimension_rc_track_diag_60_deg_down( } /** rct2: 0x00793168 */ -static void multi_dimension_rc_track_diag_flat_to_25_deg_down( +static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8771,7 +8766,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16115), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8782,7 +8777,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16053), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8797,7 +8792,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16116), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8808,7 +8803,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16054), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8823,7 +8818,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16114), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8834,7 +8829,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16052), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -8853,7 +8848,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16117), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8878,7 +8873,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16055), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8907,7 +8902,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26462), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8920,7 +8915,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26463), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8933,7 +8928,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26461), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8946,7 +8941,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26464), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -8979,7 +8974,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x007931C8 */ -static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( +static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8993,7 +8988,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16065), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9006,7 +9001,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16066), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9019,7 +9014,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16064), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9036,7 +9031,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16067), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9065,7 +9060,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26474), { -16, -16, height + 24 }, - { 16, 16, 3 }, { 0, 0, height + 56 }); + { { 0, 0, height + 56 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9078,7 +9073,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26475), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9091,7 +9086,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26473), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9104,7 +9099,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26476), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -9137,7 +9132,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x007931D8 */ -static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( +static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9151,7 +9146,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16061), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9164,7 +9159,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16062), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9177,7 +9172,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16060), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9194,7 +9189,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16063), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9223,7 +9218,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26470), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9236,7 +9231,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26471), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9249,7 +9244,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26469), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9262,7 +9257,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26472), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 56 }); + { { -16, -16, height + 56 }, { 32, 32, 3 } }); break; } @@ -9295,7 +9290,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x00793178 */ -static void multi_dimension_rc_track_diag_25_deg_down_to_flat( +static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9311,7 +9306,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16111), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9322,7 +9317,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16049), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9338,7 +9333,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16112), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9349,7 +9344,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16050), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9365,7 +9360,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16110), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9376,7 +9371,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16048), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -9396,7 +9391,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16113), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9421,7 +9416,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16051), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9451,7 +9446,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26458), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9464,7 +9459,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26459), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9477,7 +9472,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26457), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9490,7 +9485,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26460), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -9523,7 +9518,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x00793218 */ -static void multi_dimension_rc_track_diag_flat_to_left_bank( +static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9537,7 +9532,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16079), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9550,10 +9545,10 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16076), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16080), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9566,7 +9561,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16078), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9583,7 +9578,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16077), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9612,7 +9607,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26504), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9625,7 +9620,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26501), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9638,7 +9633,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26503), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9651,7 +9646,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26502), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -9685,7 +9680,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank( } /** rct2: 0x00793228 */ -static void multi_dimension_rc_track_diag_flat_to_right_bank( +static void MultiDimensionRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9699,7 +9694,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16084), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9712,7 +9707,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16081), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9725,10 +9720,10 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16083), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16085), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9745,7 +9740,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16082), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9774,7 +9769,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26508), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9787,7 +9782,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26505), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9800,7 +9795,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26507), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9813,7 +9808,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26506), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -9847,7 +9842,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank( } /** rct2: 0x00793238 */ -static void multi_dimension_rc_track_diag_left_bank_to_flat( +static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9861,7 +9856,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16082), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9874,10 +9869,10 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16083), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16085), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9890,7 +9885,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16081), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9907,7 +9902,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16084), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9936,7 +9931,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26506), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9949,7 +9944,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26507), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9962,7 +9957,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26505), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9975,7 +9970,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26508), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -10009,7 +10004,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat( } /** rct2: 0x00793248 */ -static void multi_dimension_rc_track_diag_right_bank_to_flat( +static void MultiDimensionRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10023,7 +10018,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16077), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10036,7 +10031,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16078), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10049,10 +10044,10 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16076), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16080), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10069,7 +10064,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16079), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10098,7 +10093,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26502), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10111,7 +10106,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26503), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10124,7 +10119,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26501), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10137,7 +10132,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26504), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -10171,7 +10166,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat( } /** rct2: 0x00793278 */ -static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( +static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10185,7 +10180,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16099), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10198,10 +10193,10 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16096), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16100), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10214,7 +10209,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16098), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10231,7 +10226,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16097), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10260,7 +10255,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26520), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10273,7 +10268,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26517), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10286,7 +10281,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26519), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10299,7 +10294,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26518), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -10332,7 +10327,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x00793288 */ -static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( +static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10346,7 +10341,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16104), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10359,7 +10354,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16101), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10372,10 +10367,10 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16103), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16105), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10392,7 +10387,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16102), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10421,7 +10416,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26524), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10434,7 +10429,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26521), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10447,7 +10442,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26523), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10460,7 +10455,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26522), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -10493,7 +10488,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x00793258 */ -static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( +static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10507,7 +10502,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16089), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10520,10 +10515,10 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16086), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16090), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10536,7 +10531,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16088), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10553,7 +10548,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16087), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10582,7 +10577,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26512), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10595,7 +10590,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26509), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10608,7 +10603,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26511), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10621,7 +10616,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26510), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -10654,7 +10649,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x00793268 */ -static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( +static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10668,7 +10663,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16094), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10681,7 +10676,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16091), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10694,10 +10689,10 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16093), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16095), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10714,7 +10709,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16092), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10743,7 +10738,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26516), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10756,7 +10751,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26513), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10769,7 +10764,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26515), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10782,7 +10777,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26514), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -10815,7 +10810,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x00793298 */ -static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( +static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10829,7 +10824,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16092), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10841,10 +10836,10 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16093), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16095), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10856,7 +10851,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16091), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10872,7 +10867,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16094), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10900,7 +10895,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26514), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10912,7 +10907,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26515), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10924,7 +10919,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26513), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10936,7 +10931,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26516), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -10969,7 +10964,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x007932A8 */ -static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( +static void MultiDimensionRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10983,7 +10978,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16087), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10995,7 +10990,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16088), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11007,10 +11002,10 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16086), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16090), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11026,7 +11021,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16089), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11054,7 +11049,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26510), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11066,7 +11061,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26511), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11078,7 +11073,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26509), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11090,7 +11085,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26512), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -11123,7 +11118,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x007932B8 */ -static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( +static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11137,7 +11132,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16102), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11150,10 +11145,10 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16103), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16105), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11166,7 +11161,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16101), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11183,7 +11178,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16104), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11212,7 +11207,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26522), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11225,7 +11220,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26523), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11238,7 +11233,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26521), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11251,7 +11246,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26524), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -11284,7 +11279,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x007932C8 */ -static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( +static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11298,7 +11293,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16097), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11311,7 +11306,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16098), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11324,10 +11319,10 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16096), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16100), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11344,7 +11339,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16099), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11373,7 +11368,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26518), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11386,7 +11381,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26519), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11399,7 +11394,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26517), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11412,7 +11407,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26520), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -11445,7 +11440,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x007931F8 */ -static void multi_dimension_rc_track_diag_left_bank( +static void MultiDimensionRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11459,7 +11454,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16075), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11472,7 +11467,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16072), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11485,7 +11480,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16074), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11502,7 +11497,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16073), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11531,7 +11526,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26500), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11544,7 +11539,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26497), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11557,7 +11552,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26499), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11570,7 +11565,7 @@ static void multi_dimension_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26498), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -11604,7 +11599,7 @@ static void multi_dimension_rc_track_diag_left_bank( } /** rct2: 0x00793208 */ -static void multi_dimension_rc_track_diag_right_bank( +static void MultiDimensionRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11618,7 +11613,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16073), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11631,7 +11626,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16074), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11644,7 +11639,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16072), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11661,7 +11656,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16075), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11690,7 +11685,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26498), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11703,7 +11698,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26499), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11716,7 +11711,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26497), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11729,7 +11724,7 @@ static void multi_dimension_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26500), { -16, -16, height + 24 }, - { 32, 32, 3 }, { -16, -16, height + 22 }); + { { -16, -16, height + 22 }, { 32, 32, 3 } }); break; } @@ -11763,7 +11758,7 @@ static void multi_dimension_rc_track_diag_right_bank( } /** rct2: 0x007932D8 */ -static void multi_dimension_rc_track_left_flyer_twist_up( +static void MultiDimensionRCTrackLeftFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11811,7 +11806,7 @@ static void multi_dimension_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26369), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -11841,7 +11836,7 @@ static void multi_dimension_rc_track_left_flyer_twist_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26370), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -11882,7 +11877,7 @@ static void multi_dimension_rc_track_left_flyer_twist_up( } /** rct2: 0x007932E8 */ -static void multi_dimension_rc_track_right_flyer_twist_up( +static void MultiDimensionRCTrackRightFlyerTwistUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12001,7 +11996,7 @@ static void multi_dimension_rc_track_right_flyer_twist_up( } /** rct2: 0x007932F8 */ -static void multi_dimension_rc_track_left_flyer_twist_down( +static void MultiDimensionRCTrackLeftFlyerTwistDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12023,7 +12018,7 @@ static void multi_dimension_rc_track_left_flyer_twist_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26370), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -12061,7 +12056,7 @@ static void multi_dimension_rc_track_left_flyer_twist_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26369), { 0, 6, height + 24 }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -12120,7 +12115,7 @@ static void multi_dimension_rc_track_left_flyer_twist_down( } /** rct2: 0x00793308 */ -static void multi_dimension_rc_track_right_flyer_twist_down( +static void MultiDimensionRCTrackRightFlyerTwistDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12239,7 +12234,7 @@ static void multi_dimension_rc_track_right_flyer_twist_down( } /** rct2: 0x00793398 */ -static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_loop_down( +static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12253,22 +12248,22 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26539), { 0, 0, height + 16 }, - { 32, 20, 3 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26542), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26545), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26548), { 0, 0, height + 16 }, - { 32, 20, 3 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12285,22 +12280,22 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26538), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 24, 6, height + 16 }); + { { 24, 6, height + 16 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26541), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26544), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26547), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 24, 6, height + 16 }); + { { 24, 6, height + 16 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12313,22 +12308,22 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26537), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 28, 6, height + 24 }); + { { 28, 6, height + 24 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26540), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26543), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26546), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 29, 6, height + 24 }); + { { 29, 6, height + 24 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12349,22 +12344,22 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16208), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16211), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16214), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16217), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12381,22 +12376,22 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16207), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16210), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16213), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16216), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12409,22 +12404,22 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16206), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16209), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16212), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16215), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12438,11 +12433,11 @@ static void multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_lo } /** rct2: 0x00793318 */ -static void multi_dimension_rc_track_block_brakes( +static void MultiDimensionRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); if (!trackElement.IsInverted()) { @@ -12455,7 +12450,7 @@ static void multi_dimension_rc_track_block_brakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isClosed]), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12472,11 +12467,11 @@ static void multi_dimension_rc_track_block_brakes( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isClosed]), - { 0, 0, height + 24 }, { 32, 20, 3 }, { 0, 6, height + 24 }); + { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES_INVERTED, 4, 0, height + 36, session.TrackColours[SCHEME_SUPPORTS]); @@ -12488,7 +12483,7 @@ static void multi_dimension_rc_track_block_brakes( } /** rct2: 0x00793388 */ -static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter_loop( +static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12502,22 +12497,22 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16206), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16209), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16212), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16215), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12530,22 +12525,22 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16207), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16210), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16213), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16216), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12558,22 +12553,22 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16208), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16211), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16214), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16217), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12596,22 +12591,22 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26537), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 28, 6, height - 8 }); + { { 28, 6, height - 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26540), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26543), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26546), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 28, 6, height - 8 }); + { { 28, 6, height - 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12624,22 +12619,22 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26538), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 24, 6, height - 16 }); + { { 24, 6, height - 16 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26541), { 0, 0, height - 16 }, - { 2, 20, 63 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26544), { 0, 0, height - 16 }, - { 2, 20, 63 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26547), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 24, 6, height - 16 }); + { { 24, 6, height - 16 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12652,22 +12647,22 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26539), { 0, 0, height - 16 }, - { 32, 20, 3 }, { 0, 6, height - 16 }); + { { 0, 6, height - 16 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26542), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26545), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26548), { 0, 0, height - 16 }, - { 32, 20, 3 }, { 0, 6, height - 16 }); + { { 0, 6, height - 16 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12683,7 +12678,7 @@ static void multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter } /** rct2: 0x00793398 */ -static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( +static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12697,22 +12692,22 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26539), { 0, 0, height + 16 }, - { 32, 20, 3 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26542), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26545), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26548), { 0, 0, height + 16 }, - { 32, 20, 3 }, { 0, 6, height + 16 }); + { { 0, 6, height + 16 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12729,22 +12724,22 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26538), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 24, 6, height + 16 }); + { { 24, 6, height + 16 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26541), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26544), { 0, 0, height + 16 }, - { 2, 20, 3 }, { 0, 6, height + 18 }); + { { 0, 6, height + 18 }, { 2, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26547), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 24, 6, height + 16 }); + { { 24, 6, height + 16 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12757,22 +12752,22 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26537), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 28, 6, height + 24 }); + { { 28, 6, height + 24 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26540), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26543), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26546), { 0, 0, height + 16 }, - { 2, 20, 31 }, { 29, 6, height + 24 }); + { { 29, 6, height + 24 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12793,22 +12788,22 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16208), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16211), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16214), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16217), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12825,22 +12820,22 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16207), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16210), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16213), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16216), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12853,22 +12848,22 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16206), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16209), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16212), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16215), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12882,7 +12877,7 @@ static void multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop( } /** rct2: 0x00793388 */ -static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter_loop( +static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12896,22 +12891,22 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16206), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16209), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16212), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16215), { 0, 0, height }, - { 2, 20, 31 }, { 4, 6, height + 8 }); + { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12924,22 +12919,22 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16207), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16210), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16213), { 0, 0, height }, - { 2, 20, 63 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16216), { 0, 0, height }, - { 2, 20, 31 }, { -8, 6, height }); + { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12952,22 +12947,22 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16208), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16211), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16214), { 0, 0, height }, - { 2, 20, 31 }, { 24, 6, height + 8 }); + { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16217), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 24 }); + { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12990,22 +12985,22 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26537), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 28, 6, height - 8 }); + { { 28, 6, height - 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26540), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26543), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26546), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 28, 6, height - 8 }); + { { 28, 6, height - 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13018,22 +13013,22 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26538), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 24, 6, height - 16 }); + { { 24, 6, height - 16 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26541), { 0, 0, height - 16 }, - { 2, 20, 63 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26544), { 0, 0, height - 16 }, - { 2, 20, 63 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26547), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 24, 6, height - 16 }); + { { 24, 6, height - 16 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13046,22 +13041,22 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26539), { 0, 0, height - 16 }, - { 32, 20, 3 }, { 0, 6, height - 16 }); + { { 0, 6, height - 16 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26542), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26545), { 0, 0, height - 16 }, - { 2, 20, 31 }, { 0, 6, height - 8 }); + { { 0, 6, height - 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26548), { 0, 0, height - 16 }, - { 32, 20, 3 }, { 0, 6, height - 16 }); + { { 0, 6, height - 16 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -13076,208 +13071,208 @@ static void multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter } } -TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMultiDimensionRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return multi_dimension_rc_track_flat; + return MultiDimensionRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return multi_dimension_rc_track_station; + return MultiDimensionRCTrackStation; case TrackElemType::Up25: - return multi_dimension_rc_track_25_deg_up; + return MultiDimensionRCTrack25DegUp; case TrackElemType::Up60: - return multi_dimension_rc_track_60_deg_up; + return MultiDimensionRCTrack60DegUp; case TrackElemType::FlatToUp25: - return multi_dimension_rc_track_flat_to_25_deg_up; + return MultiDimensionRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return multi_dimension_rc_track_25_deg_up_to_60_deg_up; + return MultiDimensionRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return multi_dimension_rc_track_60_deg_up_to_25_deg_up; + return MultiDimensionRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return multi_dimension_rc_track_25_deg_up_to_flat; + return MultiDimensionRCTrack25DegUpToFlat; case TrackElemType::Down25: - return multi_dimension_rc_track_25_deg_down; + return MultiDimensionRCTrack25DegDown; case TrackElemType::Down60: - return multi_dimension_rc_track_60_deg_down; + return MultiDimensionRCTrack60DegDown; case TrackElemType::FlatToDown25: - return multi_dimension_rc_track_flat_to_25_deg_down; + return MultiDimensionRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return multi_dimension_rc_track_25_deg_down_to_60_deg_down; + return MultiDimensionRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return multi_dimension_rc_track_60_deg_down_to_25_deg_down; + return MultiDimensionRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return multi_dimension_rc_track_25_deg_down_to_flat; + return MultiDimensionRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return multi_dimension_rc_track_left_quarter_turn_5; + return MultiDimensionRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return multi_dimension_rc_track_right_quarter_turn_5; + return MultiDimensionRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return multi_dimension_rc_track_flat_to_left_bank; + return MultiDimensionRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return multi_dimension_rc_track_flat_to_right_bank; + return MultiDimensionRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return multi_dimension_rc_track_left_bank_to_flat; + return MultiDimensionRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return multi_dimension_rc_track_right_bank_to_flat; + return MultiDimensionRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return multi_dimension_rc_track_banked_left_quarter_turn_5; + return MultiDimensionRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return multi_dimension_rc_track_banked_right_quarter_turn_5; + return MultiDimensionRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return multi_dimension_rc_track_left_bank_to_25_deg_up; + return MultiDimensionRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return multi_dimension_rc_track_right_bank_to_25_deg_up; + return MultiDimensionRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return multi_dimension_rc_track_25_deg_up_to_left_bank; + return MultiDimensionRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return multi_dimension_rc_track_25_deg_up_to_right_bank; + return MultiDimensionRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return multi_dimension_rc_track_left_bank_to_25_deg_down; + return MultiDimensionRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return multi_dimension_rc_track_right_bank_to_25_deg_down; + return MultiDimensionRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return multi_dimension_rc_track_25_deg_down_to_left_bank; + return MultiDimensionRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return multi_dimension_rc_track_25_deg_down_to_right_bank; + return MultiDimensionRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return multi_dimension_rc_track_left_bank; + return MultiDimensionRCTrackLeftBank; case TrackElemType::RightBank: - return multi_dimension_rc_track_right_bank; + return MultiDimensionRCTrackRightBank; case TrackElemType::SBendLeft: - return multi_dimension_rc_track_s_bend_left; + return MultiDimensionRCTrackSBendLeft; case TrackElemType::SBendRight: - return multi_dimension_rc_track_s_bend_right; + return MultiDimensionRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return multi_dimension_rc_track_left_quarter_turn_3; + return MultiDimensionRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return multi_dimension_rc_track_right_quarter_turn_3; + return MultiDimensionRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return multi_dimension_rc_track_left_quarter_turn_3_bank; + return MultiDimensionRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return multi_dimension_rc_track_right_quarter_turn_3_bank; + return MultiDimensionRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftHalfBankedHelixUpSmall: - return multi_dimension_rc_track_left_half_banked_helix_up_small; + return MultiDimensionRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return multi_dimension_rc_track_right_half_banked_helix_up_small; + return MultiDimensionRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return multi_dimension_rc_track_left_half_banked_helix_down_small; + return MultiDimensionRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return multi_dimension_rc_track_right_half_banked_helix_down_small; + return MultiDimensionRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return multi_dimension_rc_track_left_half_banked_helix_up_large; + return MultiDimensionRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return multi_dimension_rc_track_right_half_banked_helix_up_large; + return MultiDimensionRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return multi_dimension_rc_track_left_half_banked_helix_down_large; + return MultiDimensionRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return multi_dimension_rc_track_right_half_banked_helix_down_large; + return MultiDimensionRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::Brakes: - return multi_dimension_rc_track_brakes; + return MultiDimensionRCTrackBrakes; case TrackElemType::OnRidePhoto: - return multi_dimension_rc_track_on_ride_photo; + return MultiDimensionRCTrackOnRidePhoto; case TrackElemType::Up90: - return multi_dimension_rc_track_90_deg_up; + return MultiDimensionRCTrack90DegUp; case TrackElemType::Down90: - return multi_dimension_rc_track_90_deg_down; + return MultiDimensionRCTrack90DegDown; case TrackElemType::Up60ToUp90: - return multi_dimension_rc_track_60_deg_up_to_90_deg_up; + return MultiDimensionRCTrack60DegUpTo90DegUp; case TrackElemType::Down90ToDown60: - return multi_dimension_rc_track_90_deg_down_to_60_deg_down; + return MultiDimensionRCTrack90DegDownTo60DegDown; case TrackElemType::Up90ToUp60: - return multi_dimension_rc_track_90_deg_up_to_60_deg_up; + return MultiDimensionRCTrack90DegUpTo60DegUp; case TrackElemType::Down60ToDown90: - return multi_dimension_rc_track_60_deg_down_to_90_deg_down; + return MultiDimensionRCTrack60DegDownTo90DegDown; case TrackElemType::LeftEighthToDiag: - return multi_dimension_rc_track_left_eighth_to_diag; + return MultiDimensionRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return multi_dimension_rc_track_right_eighth_to_diag; + return MultiDimensionRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return multi_dimension_rc_track_left_eighth_to_orthogonal; + return MultiDimensionRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return multi_dimension_rc_track_right_eighth_to_orthogonal; + return MultiDimensionRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return multi_dimension_rc_track_left_eighth_bank_to_diag; + return MultiDimensionRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return multi_dimension_rc_track_right_eighth_bank_to_diag; + return MultiDimensionRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return multi_dimension_rc_track_left_eighth_bank_to_orthogonal; + return MultiDimensionRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return multi_dimension_rc_track_right_eighth_bank_to_orthogonal; + return MultiDimensionRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return multi_dimension_rc_track_diag_flat; + return MultiDimensionRCTrackDiagFlat; case TrackElemType::DiagUp25: - return multi_dimension_rc_track_diag_25_deg_up; + return MultiDimensionRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return multi_dimension_rc_track_diag_60_deg_up; + return MultiDimensionRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return multi_dimension_rc_track_diag_flat_to_25_deg_up; + return MultiDimensionRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up; + return MultiDimensionRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up; + return MultiDimensionRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return multi_dimension_rc_track_diag_25_deg_up_to_flat; + return MultiDimensionRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return multi_dimension_rc_track_diag_25_deg_down; + return MultiDimensionRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return multi_dimension_rc_track_diag_60_deg_down; + return MultiDimensionRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return multi_dimension_rc_track_diag_flat_to_25_deg_down; + return MultiDimensionRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down; + return MultiDimensionRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down; + return MultiDimensionRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return multi_dimension_rc_track_diag_25_deg_down_to_flat; + return MultiDimensionRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return multi_dimension_rc_track_diag_flat_to_left_bank; + return MultiDimensionRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return multi_dimension_rc_track_diag_flat_to_right_bank; + return MultiDimensionRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return multi_dimension_rc_track_diag_left_bank_to_flat; + return MultiDimensionRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return multi_dimension_rc_track_diag_right_bank_to_flat; + return MultiDimensionRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return multi_dimension_rc_track_diag_left_bank_to_25_deg_up; + return MultiDimensionRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return multi_dimension_rc_track_diag_right_bank_to_25_deg_up; + return MultiDimensionRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return multi_dimension_rc_track_diag_25_deg_up_to_left_bank; + return MultiDimensionRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return multi_dimension_rc_track_diag_25_deg_up_to_right_bank; + return MultiDimensionRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return multi_dimension_rc_track_diag_left_bank_to_25_deg_down; + return MultiDimensionRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return multi_dimension_rc_track_diag_right_bank_to_25_deg_down; + return MultiDimensionRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return multi_dimension_rc_track_diag_25_deg_down_to_left_bank; + return MultiDimensionRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return multi_dimension_rc_track_diag_25_deg_down_to_right_bank; + return MultiDimensionRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return multi_dimension_rc_track_diag_left_bank; + return MultiDimensionRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return multi_dimension_rc_track_diag_right_bank; + return MultiDimensionRCTrackDiagRightBank; case TrackElemType::LeftFlyerTwistUp: - return multi_dimension_rc_track_left_flyer_twist_up; + return MultiDimensionRCTrackLeftFlyerTwistUp; case TrackElemType::RightFlyerTwistUp: - return multi_dimension_rc_track_right_flyer_twist_up; + return MultiDimensionRCTrackRightFlyerTwistUp; case TrackElemType::LeftFlyerTwistDown: - return multi_dimension_rc_track_left_flyer_twist_down; + return MultiDimensionRCTrackLeftFlyerTwistDown; case TrackElemType::RightFlyerTwistDown: - return multi_dimension_rc_track_right_flyer_twist_down; + return MultiDimensionRCTrackRightFlyerTwistDown; case TrackElemType::MultiDimInvertedFlatToDown90QuarterLoop: - return multi_dimension_rc_track_multidim_inverted_flat_to_90_deg_quarter_loop_down; + return MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown; case TrackElemType::BlockBrakes: - return multi_dimension_rc_track_block_brakes; + return MultiDimensionRCTrackBlockBrakes; case TrackElemType::MultiDimUp90ToInvertedFlatQuarterLoop: - return multi_dimension_rc_track_multidim_90_deg_up_to_inverted_flat_quarter_loop; + return MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop; case TrackElemType::MultiDimFlatToDown90QuarterLoop: - return multi_dimension_rc_track_multidim_flat_to_90_deg_down_quarter_loop; + return MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop; case TrackElemType::MultiDimInvertedUp90ToFlatQuarterLoop: - return multi_dimension_rc_track_multidim_inverted_90_deg_up_to_flat_quarter_loop; + return MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop; } return nullptr; } diff --git a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp index 4a697eabcd..07e147a106 100644 --- a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -195,20 +195,20 @@ static constexpr const uint32_t reverse_freefall_rc_track_pieces_vertical_suppor SPR_REVERSE_FREEFALL_RC_VERTICAL_SUPPORTS_SE_NW, }; -static void paint_reverse_freefall_rc_flat( +static void PaintReverseFreefallRCFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (direction & 1) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } else { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } @@ -217,7 +217,7 @@ static void paint_reverse_freefall_rc_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_reverse_freefall_rc_station( +static void PaintReverseFreefallRCStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -227,7 +227,7 @@ static void paint_reverse_freefall_rc_station( { // height -= 2 (height - 2) imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); // height += 2 (height) imageId = session.TrackColours[SCHEME_TRACK].WithIndex(reverse_freefall_rc_track_pieces_station[direction]); @@ -240,7 +240,7 @@ static void paint_reverse_freefall_rc_station( { // height -= 2 (height - 2) imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); // height += 2 (height) imageId = session.TrackColours[SCHEME_TRACK].WithIndex(reverse_freefall_rc_track_pieces_station[direction]); @@ -250,13 +250,13 @@ static void paint_reverse_freefall_rc_station( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 5, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_reverse_freefall_rc_slope( +static void PaintReverseFreefallRCSlope( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -282,9 +282,9 @@ static void paint_reverse_freefall_rc_slope( { bbHeight = bbHeights03[trackSequence]; PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); int32_t tunnelOffset = tunnelOffsets03[trackSequence]; if (direction & 1) @@ -300,9 +300,9 @@ static void paint_reverse_freefall_rc_slope( { bbHeight = bbHeights12[trackSequence]; PaintAddImageAsParentRotated( - session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); PaintAddImageAsChildRotated( - session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -321,16 +321,16 @@ static void paint_reverse_freefall_rc_slope( { floorImageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_FLOOR_PLANKS); } - PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height }); + PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } }); PaintAddImageAsChildRotated( - session, direction, supportsImageId, { 0, 0, height }, { isDirection03 ? 26 : 18, 26, 126 }, - { isDirection03 ? 3 : 11, 3, height }); + session, direction, supportsImageId, { 0, 0, height }, + { { isDirection03 ? 3 : 11, 3, height }, { isDirection03 ? 26 : 18, 26, 126 } }); } else { PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { isDirection03 ? 26 : 18, 26, 126 }, - { isDirection03 ? 3 : 11, 3, height }); + session, direction, supportsImageId, { 0, 0, height }, + { { isDirection03 ? 3 : 11, 3, height }, { isDirection03 ? 26 : 18, 26, 126 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence], 0x20); @@ -339,16 +339,16 @@ static void paint_reverse_freefall_rc_slope( if (isDirection03) { PaintAddImageAsParentRotated( - session, direction, supportsImageId, { 0, 0, height }, { 5, 20, 79 }, { 0, 6, height + 128 }); + session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } }); PaintAddImageAsChildRotated( - session, direction, trackImageId, { 0, 0, height }, { 5, 20, 79 }, { 0, 6, height + 128 }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } }); } else { PaintAddImageAsParentRotated( - session, direction, trackImageId, { 0, 0, height }, { 1, 20, 126 }, { 27, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } }); PaintAddImageAsChildRotated( - session, direction, supportsImageId, { 0, 0, height }, { 1, 20, 126 }, { 27, 6, height }); + session, direction, supportsImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -357,7 +357,7 @@ static void paint_reverse_freefall_rc_slope( } } -static void paint_reverse_freefall_rc_vertical( +static void PaintReverseFreefallRCVertical( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -367,7 +367,7 @@ static void paint_reverse_freefall_rc_vertical( case 0: supportsImageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( reverse_freefall_rc_track_pieces_vertical_supports[direction]); - PaintAddImageAsParent(session, supportsImageId, { 0, 0, height }, { 26, 26, 79 }, { 3, 3, height }); + PaintAddImageAsParent(session, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 79 } }); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80, 0x20); break; @@ -376,12 +376,12 @@ static void paint_reverse_freefall_rc_vertical( if (direction == 0 || direction == 3) { PaintAddImageAsParentRotated( - session, direction, trackImageId, { 0, 0, height }, { 2, 20, 79 }, { 0, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 2, 20, 79 } }); } else { PaintAddImageAsParentRotated( - session, direction, trackImageId, { 0, 0, height }, { 2, 20, 79 }, { 30, 6, height }); + session, direction, trackImageId, { 0, 0, height }, { { 30, 6, height }, { 2, 20, 79 } }); } PaintUtilSetVerticalTunnel(session, height + 80); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -390,7 +390,7 @@ static void paint_reverse_freefall_rc_vertical( } } -static void paint_reverse_freefall_rc_onride_photo( +static void PaintReverseFreefallRCOnridePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -410,33 +410,33 @@ static void paint_reverse_freefall_rc_onride_photo( } PaintAddImageAsParentRotated( - session, direction, colour.WithIndex(imageIds[direction]), { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + session, direction, colour.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_reverse_freefall_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionReverseFreefallRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_reverse_freefall_rc_flat; + return PaintReverseFreefallRCFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_reverse_freefall_rc_station; + return PaintReverseFreefallRCStation; case TrackElemType::ReverseFreefallSlope: - return paint_reverse_freefall_rc_slope; + return PaintReverseFreefallRCSlope; case TrackElemType::ReverseFreefallVertical: - return paint_reverse_freefall_rc_vertical; + return PaintReverseFreefallRCVertical; case TrackElemType::OnRidePhoto: - return paint_reverse_freefall_rc_onride_photo; + return PaintReverseFreefallRCOnridePhoto; } return nullptr; } diff --git a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp index 86ae7fe1b6..6979eff951 100644 --- a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ * * rct2: 0x006D4453 */ -void vehicle_visual_reverser( +void VehicleVisualReverser( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { @@ -41,12 +41,12 @@ void vehicle_visual_reverser( z = (v1->z + v2->z) / 2; session.SpritePosition.x = x; session.SpritePosition.y = y; - vehicle_visual_default(session, imageDirection, z, vehicle, carEntry); + VehicleVisualDefault(session, imageDirection, z, vehicle, carEntry); } #endif /** rct2: 0x0086E65C */ -static void reverser_rc_track_flat( +static void ReverserRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -57,15 +57,15 @@ static void reverser_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21520), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21520), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21521), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21521), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -77,15 +77,15 @@ static void reverser_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21504), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21504), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21505), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21505), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -95,7 +95,7 @@ static void reverser_rc_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void reverser_rc_track_station( +static void ReverserRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -108,19 +108,19 @@ static void reverser_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x0086E66C */ -static void reverser_rc_track_25_deg_up( +static void ReverserRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -130,26 +130,26 @@ static void reverser_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21530), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21530), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21531), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21531), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21532), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21532), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21533), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21533), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -160,26 +160,26 @@ static void reverser_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21516), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21516), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21517), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21517), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21518), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21518), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21519), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21519), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -197,7 +197,7 @@ static void reverser_rc_track_25_deg_up( } /** rct2: 0x0086E67C */ -static void reverser_rc_track_flat_to_25_deg_up( +static void ReverserRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -207,26 +207,26 @@ static void reverser_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21522), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21522), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21523), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21523), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21524), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21524), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21525), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21525), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -237,26 +237,26 @@ static void reverser_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21508), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21508), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21509), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21509), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21510), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21510), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21511), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21511), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -274,7 +274,7 @@ static void reverser_rc_track_flat_to_25_deg_up( } /** rct2: 0x0086E68C */ -static void reverser_rc_track_25_deg_up_to_flat( +static void ReverserRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -284,26 +284,26 @@ static void reverser_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21526), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21526), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21527), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21527), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21528), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21528), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21529), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21529), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -314,26 +314,26 @@ static void reverser_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21512), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21512), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21513), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21513), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21514), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21514), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21515), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21515), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -351,31 +351,31 @@ static void reverser_rc_track_25_deg_up_to_flat( } /** rct2: 0x0086E69C */ -static void reverser_rc_track_25_deg_down( +static void ReverserRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - reverser_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ReverserRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0086E6AC */ -static void reverser_rc_track_flat_to_25_deg_down( +static void ReverserRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - reverser_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ReverserRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0086E6BC */ -static void reverser_rc_track_25_deg_down_to_flat( +static void ReverserRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - reverser_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + ReverserRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0086E6CC */ -static void reverser_rc_track_left_quarter_turn_5( +static void ReverserRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -574,16 +574,16 @@ static void reverser_rc_track_left_quarter_turn_5( } /** rct2: 0x0086E6DC */ -static void reverser_rc_track_right_quarter_turn_5( +static void ReverserRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - reverser_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + ReverserRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0086E6EC */ -static void reverser_rc_track_s_bend_left( +static void ReverserRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -595,25 +595,25 @@ static void reverser_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21566), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21570), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21569), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21573), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -630,25 +630,25 @@ static void reverser_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21567), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21571), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21568), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21572), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -664,25 +664,25 @@ static void reverser_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21568), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21572), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21567), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21571), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -698,25 +698,25 @@ static void reverser_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21569), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21573), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21566), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21570), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -736,7 +736,7 @@ static void reverser_rc_track_s_bend_left( } /** rct2: 0x0086E6FC */ -static void reverser_rc_track_s_bend_right( +static void ReverserRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -748,25 +748,25 @@ static void reverser_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21574), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21578), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21577), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21581), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -783,25 +783,25 @@ static void reverser_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21575), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21579), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21576), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21580), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -817,25 +817,25 @@ static void reverser_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21576), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21580), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21575), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21579), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -851,25 +851,25 @@ static void reverser_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21577), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21581), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21574), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21578), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -889,7 +889,7 @@ static void reverser_rc_track_s_bend_right( } /** rct2: 0x0086E73C */ -static void reverser_rc_track_left_quarter_turn_3( +static void ReverserRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -901,25 +901,25 @@ static void reverser_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21559), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21562), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21565), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21556), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -939,22 +939,22 @@ static void reverser_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21558), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21561), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21564), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21555), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -967,25 +967,25 @@ static void reverser_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21557), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21560), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21563), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21554), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1005,16 +1005,16 @@ static void reverser_rc_track_left_quarter_turn_3( } /** rct2: 0x0086E74C */ -static void reverser_rc_track_right_quarter_turn_3( +static void ReverserRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - reverser_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + ReverserRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0086E75C */ -static void reverser_rc_track_brakes( +static void ReverserRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1023,15 +1023,15 @@ static void reverser_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21506), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21506), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21507), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21507), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1041,7 +1041,7 @@ static void reverser_rc_track_brakes( } /** rct2: 0x0086E76C */ -static void reverser_rc_track_left_reverser( +static void ReverserRCTrackLeftReverser( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1053,25 +1053,25 @@ static void reverser_rc_track_left_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21582), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21588), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21594), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21600), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1088,25 +1088,25 @@ static void reverser_rc_track_left_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21585), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21591), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21597), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21603), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1119,25 +1119,25 @@ static void reverser_rc_track_left_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21586), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21592), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21598), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21604), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1150,25 +1150,25 @@ static void reverser_rc_track_left_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21587), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21593), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21599), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21605), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1181,25 +1181,25 @@ static void reverser_rc_track_left_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21583), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21589), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21595), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21601), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1212,25 +1212,25 @@ static void reverser_rc_track_left_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21584), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21590), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21596), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21602), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1250,7 +1250,7 @@ static void reverser_rc_track_left_reverser( } /** rct2: 0x0086E77C */ -static void reverser_rc_track_right_reverser( +static void ReverserRCTrackRightReverser( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1262,25 +1262,25 @@ static void reverser_rc_track_right_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21596), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21602), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21584), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21590), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1297,25 +1297,25 @@ static void reverser_rc_track_right_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21599), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21605), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21587), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21593), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1328,25 +1328,25 @@ static void reverser_rc_track_right_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21598), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21604), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21586), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21592), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1359,25 +1359,25 @@ static void reverser_rc_track_right_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21597), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21603), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21585), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21591), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1390,25 +1390,25 @@ static void reverser_rc_track_right_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21595), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21601), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21583), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21589), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1421,25 +1421,25 @@ static void reverser_rc_track_right_reverser( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21594), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21600), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21582), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21588), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1458,46 +1458,46 @@ static void reverser_rc_track_right_reverser( } } -TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionReverserRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return reverser_rc_track_flat; + return ReverserRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return reverser_rc_track_station; + return ReverserRCTrackStation; case TrackElemType::Up25: - return reverser_rc_track_25_deg_up; + return ReverserRCTrack25DegUp; case TrackElemType::FlatToUp25: - return reverser_rc_track_flat_to_25_deg_up; + return ReverserRCTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return reverser_rc_track_25_deg_up_to_flat; + return ReverserRCTrack25DegUpToFlat; case TrackElemType::Down25: - return reverser_rc_track_25_deg_down; + return ReverserRCTrack25DegDown; case TrackElemType::FlatToDown25: - return reverser_rc_track_flat_to_25_deg_down; + return ReverserRCTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return reverser_rc_track_25_deg_down_to_flat; + return ReverserRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return reverser_rc_track_left_quarter_turn_5; + return ReverserRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return reverser_rc_track_right_quarter_turn_5; + return ReverserRCTrackRightQuarterTurn5; case TrackElemType::SBendLeft: - return reverser_rc_track_s_bend_left; + return ReverserRCTrackSBendLeft; case TrackElemType::SBendRight: - return reverser_rc_track_s_bend_right; + return ReverserRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return reverser_rc_track_left_quarter_turn_3; + return ReverserRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return reverser_rc_track_right_quarter_turn_3; + return ReverserRCTrackRightQuarterTurn3; case TrackElemType::Brakes: - return reverser_rc_track_brakes; + return ReverserRCTrackBrakes; case TrackElemType::LeftReverser: - return reverser_rc_track_left_reverser; + return ReverserRCTrackLeftReverser; case TrackElemType::RightReverser: - return reverser_rc_track_right_reverser; + return ReverserRCTrackRightReverser; } return nullptr; } diff --git a/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp b/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp index 696ebc3a05..1944a57f55 100644 --- a/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SideFrictionRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -66,7 +66,7 @@ constexpr int32_t SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_2_B = 21881; constexpr int32_t SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_3_A = 21879; // Needs no B piece /** rct2: 0x0077839C */ -static void side_friction_rc_track_flat( +static void SideFrictionRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -76,38 +76,38 @@ static void side_friction_rc_track_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21662), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21662), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21664), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21664), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21663), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21663), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21665), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21665), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21666), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21666), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21668), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21668), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21667), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21667), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21669), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21669), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -119,21 +119,21 @@ static void side_friction_rc_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21606), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21606), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21608), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21608), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21607), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21607), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21609), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21609), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -144,7 +144,7 @@ static void side_friction_rc_track_flat( } /** rct2: 0x007784AC, 0x007784BC, 0x007784CC */ -static void side_friction_rc_track_station( +static void SideFrictionRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -156,17 +156,17 @@ static void side_friction_rc_track_station( }; PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x007783AC */ -static void side_friction_rc_track_25_deg_up( +static void SideFrictionRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -176,38 +176,38 @@ static void side_friction_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21678), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21678), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21690), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21690), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21679), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21679), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21691), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21691), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21680), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21680), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21692), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21692), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21681), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21681), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21693), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21693), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -218,38 +218,38 @@ static void side_friction_rc_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21622), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21622), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21634), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21634), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21623), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21623), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21635), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21635), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21624), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21624), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21636), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21636), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21625), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21625), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21637), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21637), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -267,7 +267,7 @@ static void side_friction_rc_track_25_deg_up( } /** rct2: 0x007783CC */ -static void side_friction_rc_track_flat_to_25_deg_up( +static void SideFrictionRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -277,38 +277,38 @@ static void side_friction_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21670), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21670), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21682), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21682), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21671), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21671), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21683), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21683), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21672), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21672), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21684), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21684), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21673), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21673), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21685), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21685), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -319,38 +319,38 @@ static void side_friction_rc_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21614), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21614), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21626), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21626), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21615), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21615), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21627), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21627), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21616), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21616), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21628), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21628), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21617), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21617), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21629), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21629), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -368,7 +368,7 @@ static void side_friction_rc_track_flat_to_25_deg_up( } /** rct2: 0x007783FC */ -static void side_friction_rc_track_25_deg_up_to_flat( +static void SideFrictionRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -378,38 +378,38 @@ static void side_friction_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21674), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21674), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21686), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21686), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21675), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21675), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21687), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21687), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21676), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21676), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21688), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21688), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21677), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21677), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21689), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21689), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -420,38 +420,38 @@ static void side_friction_rc_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21618), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21618), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21630), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21630), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21619), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21619), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21631), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21631), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21620), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21620), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21632), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21632), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21621), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21621), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21633), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21633), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -469,31 +469,31 @@ static void side_friction_rc_track_25_deg_up_to_flat( } /** rct2: 0x0077840C */ -static void side_friction_rc_track_25_deg_down( +static void SideFrictionRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SideFrictionRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0077842C */ -static void side_friction_rc_track_flat_to_25_deg_down( +static void SideFrictionRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SideFrictionRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0077845C */ -static void side_friction_rc_track_25_deg_down_to_flat( +static void SideFrictionRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SideFrictionRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0077846C */ -static void side_friction_rc_track_left_quarter_turn_5( +static void SideFrictionRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -508,7 +508,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 27, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21747), { 0, 2, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -517,7 +517,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 27, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21752), { 0, 2, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -526,7 +526,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21757), { 0, 2, height }, - { 32, 32, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -535,7 +535,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21742), { 0, 2, height }, - { 32, 32, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -560,7 +560,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21746), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -569,7 +569,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21751), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -578,7 +578,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21756), { 0, 16, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -587,7 +587,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21741), { 0, 16, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -606,7 +606,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21745), { 0, 16, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -615,7 +615,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21750), { 16, 16, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -624,7 +624,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21755), { 16, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -633,7 +633,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 16, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21740), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -659,7 +659,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 34, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21744), { 16, 0, height }, - { 16, 34, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 34, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -668,7 +668,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21749), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -677,7 +677,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21754), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -686,7 +686,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 16, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21739), { 16, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -705,7 +705,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21743), { 2, 0, height }, - { 32, 32, 0 }, { 2, 0, height + 27 }); + { { 2, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -714,7 +714,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 27, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21748), { 2, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 27 }); + { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -723,7 +723,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 27, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21753), { 2, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 27 }); + { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -732,7 +732,7 @@ static void side_friction_rc_track_left_quarter_turn_5( { 32, 32, 2 }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21738), { 2, 0, height }, - { 32, 32, 0 }, { 2, 0, height + 27 }); + { { 2, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -752,16 +752,16 @@ static void side_friction_rc_track_left_quarter_turn_5( } /** rct2: 0x0077847C */ -static void side_friction_rc_track_right_quarter_turn_5( +static void SideFrictionRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - side_friction_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SideFrictionRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0077848C */ -static void side_friction_rc_track_s_bend_left( +static void SideFrictionRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -773,37 +773,37 @@ static void side_friction_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21888), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21904), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21892), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21908), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21891), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21907), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21895), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21911), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -820,37 +820,37 @@ static void side_friction_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21889), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21905), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21893), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21909), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21890), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21906), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21894), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21910), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -866,37 +866,37 @@ static void side_friction_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21890), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21906), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21894), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21910), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21889), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21905), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21893), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21909), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -912,37 +912,37 @@ static void side_friction_rc_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21891), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21907), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21895), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21911), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21888), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21904), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21892), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21908), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -962,7 +962,7 @@ static void side_friction_rc_track_s_bend_left( } /** rct2: 0x0077849C */ -static void side_friction_rc_track_s_bend_right( +static void SideFrictionRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -974,37 +974,37 @@ static void side_friction_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21896), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21912), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21900), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21916), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21899), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21915), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21903), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21919), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1021,37 +1021,37 @@ static void side_friction_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21897), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21913), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21901), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21917), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21898), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21914), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21902), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21918), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1067,37 +1067,37 @@ static void side_friction_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21898), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21914), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21902), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21918), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21897), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21913), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21901), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21917), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1113,37 +1113,37 @@ static void side_friction_rc_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21899), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21915), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21903), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21919), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21896), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21912), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21900), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21916), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1163,7 +1163,7 @@ static void side_friction_rc_track_s_bend_right( } /** rct2: 0x007784DC */ -static void side_friction_rc_track_left_quarter_turn_3( +static void SideFrictionRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1175,37 +1175,37 @@ static void side_friction_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21699), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21711), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21702), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21714), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21705), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21717), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21696), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21708), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1225,34 +1225,34 @@ static void side_friction_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21698), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21710), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21701), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21713), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21704), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21716), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21695), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21707), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1265,37 +1265,37 @@ static void side_friction_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21697), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21709), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21700), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21712), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21703), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21715), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21694), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21706), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1315,16 +1315,16 @@ static void side_friction_rc_track_left_quarter_turn_3( } /** rct2: 0x007784EC */ -static void side_friction_rc_track_right_quarter_turn_3( +static void SideFrictionRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - side_friction_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SideFrictionRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x007784FC */ -static void side_friction_rc_track_brakes( +static void SideFrictionRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1333,21 +1333,21 @@ static void side_friction_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21610), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21610), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21612), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21612), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21611), { 0, 0, height }, { 32, 27, 2 }, - { 0, 2, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21611), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21613), { 0, 0, height }, { 32, 27, 0 }, - { 0, 2, height + 27 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21613), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1357,7 +1357,7 @@ static void side_friction_rc_track_brakes( } /** rct2: 0x007785DC */ -static void side_friction_rc_track_left_eighth_to_diag( +static void SideFrictionRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1369,37 +1369,37 @@ static void side_friction_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21790), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21806), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21794), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21810), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21798), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21814), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21802), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21818), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1416,37 +1416,37 @@ static void side_friction_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21791), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21807), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21795), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21811), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21799), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21815), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21803), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21819), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1459,37 +1459,37 @@ static void side_friction_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21792), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21808), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21796), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21812), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21800), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21816), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21804), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21820), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1521,34 +1521,34 @@ static void side_friction_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21793), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21809), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21797), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21813), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21801), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21817), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21805), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21821), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -1558,7 +1558,7 @@ static void side_friction_rc_track_left_eighth_to_diag( } /** rct2: 0x007785EC */ -static void side_friction_rc_track_right_eighth_to_diag( +static void SideFrictionRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1570,37 +1570,37 @@ static void side_friction_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21758), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21774), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21762), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21778), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21766), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21782), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21770), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21786), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1617,37 +1617,37 @@ static void side_friction_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21759), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21775), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21763), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21779), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21767), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21783), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21771), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21787), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1660,37 +1660,37 @@ static void side_friction_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21760), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21776), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21764), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21780), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21768), { 0, 0, height }, - { 28, 28, 2 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21784), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21772), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21788), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -1722,34 +1722,34 @@ static void side_friction_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21761), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21777), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21765), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21781), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21769), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21785), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21773), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21789), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -1759,25 +1759,25 @@ static void side_friction_rc_track_right_eighth_to_diag( } /** rct2: 0x007785FC */ -static void side_friction_rc_track_left_eighth_to_orthogonal( +static void SideFrictionRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - side_friction_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SideFrictionRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0077860C */ -static void side_friction_rc_track_right_eighth_to_orthogonal( +static void SideFrictionRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - side_friction_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + SideFrictionRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x0077850C */ -static void side_friction_rc_track_diag_flat( +static void SideFrictionRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1791,7 +1791,7 @@ static void side_friction_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21849), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -1802,7 +1802,7 @@ static void side_friction_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21825), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -1817,10 +1817,10 @@ static void side_friction_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21846), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21850), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -1841,10 +1841,10 @@ static void side_friction_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21822), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21826), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -1875,10 +1875,10 @@ static void side_friction_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21848), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21851), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -1899,10 +1899,10 @@ static void side_friction_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21824), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21827), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -1921,7 +1921,7 @@ static void side_friction_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21847), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -1932,7 +1932,7 @@ static void side_friction_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21823), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -1943,7 +1943,7 @@ static void side_friction_rc_track_diag_flat( } /** rct2: 0x0077853C */ -static void side_friction_rc_track_diag_25_deg_up( +static void SideFrictionRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1957,7 +1957,7 @@ static void side_friction_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21867), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -1968,7 +1968,7 @@ static void side_friction_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21843), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -1983,10 +1983,10 @@ static void side_friction_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21864), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21868), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2007,10 +2007,10 @@ static void side_friction_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21840), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21844), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2041,10 +2041,10 @@ static void side_friction_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21866), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21869), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2065,10 +2065,10 @@ static void side_friction_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21842), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21845), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2087,7 +2087,7 @@ static void side_friction_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21865), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2098,7 +2098,7 @@ static void side_friction_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21841), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2109,7 +2109,7 @@ static void side_friction_rc_track_diag_25_deg_up( } /** rct2: 0x0077851C */ -static void side_friction_rc_track_diag_flat_to_25_deg_up( +static void SideFrictionRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2123,7 +2123,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21855), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2134,7 +2134,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21831), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2149,10 +2149,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21852), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21856), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2173,10 +2173,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21828), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21832), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2207,10 +2207,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21854), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21857), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2231,10 +2231,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21830), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21833), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2253,7 +2253,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21853), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2264,7 +2264,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21829), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2275,7 +2275,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x0077852C */ -static void side_friction_rc_track_diag_25_deg_up_to_flat( +static void SideFrictionRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2289,7 +2289,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21861), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2300,7 +2300,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21837), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2315,10 +2315,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21858), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21862), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2339,10 +2339,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21834), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21838), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2373,10 +2373,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21860), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21863), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2397,10 +2397,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21836), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21839), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2419,7 +2419,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21859), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2430,7 +2430,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21835), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2441,7 +2441,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x0077859C */ -static void side_friction_rc_track_diag_25_deg_down( +static void SideFrictionRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2455,7 +2455,7 @@ static void side_friction_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21865), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2466,7 +2466,7 @@ static void side_friction_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21841), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2481,10 +2481,10 @@ static void side_friction_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21866), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21869), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2505,10 +2505,10 @@ static void side_friction_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21842), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21845), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2539,10 +2539,10 @@ static void side_friction_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21864), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21868), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2563,10 +2563,10 @@ static void side_friction_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21840), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21844), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2585,7 +2585,7 @@ static void side_friction_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21867), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2596,7 +2596,7 @@ static void side_friction_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21843), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2607,7 +2607,7 @@ static void side_friction_rc_track_diag_25_deg_down( } /** rct2: 0x0077857C */ -static void side_friction_rc_track_diag_flat_to_25_deg_down( +static void SideFrictionRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2621,7 +2621,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21859), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2632,7 +2632,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21835), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2645,10 +2645,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21860), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21863), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2669,10 +2669,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21836), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21839), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2701,10 +2701,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21858), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21862), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2725,10 +2725,10 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21834), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21838), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2745,7 +2745,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21861), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2756,7 +2756,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21837), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2768,7 +2768,7 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x0077858C */ -static void side_friction_rc_track_diag_25_deg_down_to_flat( +static void SideFrictionRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2782,7 +2782,7 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21853), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2793,7 +2793,7 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21829), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2808,10 +2808,10 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21854), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21857), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2832,10 +2832,10 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21830), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21833), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -2866,10 +2866,10 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21852), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21856), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2890,10 +2890,10 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21828), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21832), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -2912,7 +2912,7 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21855), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2923,7 +2923,7 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21831), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -2933,7 +2933,7 @@ static void side_friction_rc_track_diag_25_deg_down_to_flat( } } -static void side_friction_rc_track_60_deg_up( +static void SideFrictionRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2942,40 +2942,40 @@ static void side_friction_rc_track_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_0_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_0_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_1_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_1_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_2_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_2_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 23, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_3_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_DIR_3_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2992,14 +2992,14 @@ static void side_friction_rc_track_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -static void side_friction_rc_track_60_deg_down( +static void SideFrictionRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + SideFrictionRCTrack60DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -static void side_friction_rc_track_25_deg_up_to_60_deg_up( +static void SideFrictionRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3009,44 +3009,44 @@ static void side_friction_rc_track_25_deg_up_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_0_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_0_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 13, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_1_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_1_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_2_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_2_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_3_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_25_DEG_UP_TO_60_DEG_UP_DIR_3_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3063,14 +3063,14 @@ static void side_friction_rc_track_25_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void side_friction_rc_track_60_deg_down_to_25_deg_down( +static void SideFrictionRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + SideFrictionRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -static void side_friction_rc_track_60_deg_up_to_25_deg_up( +static void SideFrictionRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3080,44 +3080,44 @@ static void side_friction_rc_track_60_deg_up_to_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_0_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_0_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_1_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_1_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_2_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_2_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 19, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_3_A), - { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_60_DEG_UP_TO_25_DEG_UP_DIR_3_B), - { 0, 0, height }, { 32, 1, 9 }, { 0, 26, height + 5 }); + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3134,14 +3134,14 @@ static void side_friction_rc_track_60_deg_up_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void side_friction_rc_track_25_deg_down_to_60_deg_down( +static void SideFrictionRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + SideFrictionRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -static void side_friction_rc_track_diag_60_deg_up( +static void SideFrictionRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3154,7 +3154,7 @@ static void side_friction_rc_track_diag_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_DIR_3_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3167,11 +3167,11 @@ static void side_friction_rc_track_diag_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_DIR_0_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_DIR_0_B), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -3201,11 +3201,11 @@ static void side_friction_rc_track_diag_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_DIR_2_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_DIR_2_B), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -3222,7 +3222,7 @@ static void side_friction_rc_track_diag_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_DIR_1_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); break; } @@ -3232,14 +3232,14 @@ static void side_friction_rc_track_diag_60_deg_up( } } -static void side_friction_rc_track_diag_60_deg_down( +static void SideFrictionRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_diag_60_deg_up(session, ride, 3 - trackSequence, (direction + 2) % 4, height, trackElement); + SideFrictionRCTrackDiag60DegUp(session, ride, 3 - trackSequence, (direction + 2) % 4, height, trackElement); } -static void side_friction_rc_track_diag_60_deg_up_to_25_deg_up( +static void SideFrictionRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3252,7 +3252,7 @@ static void side_friction_rc_track_diag_60_deg_up_to_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_3_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3265,11 +3265,11 @@ static void side_friction_rc_track_diag_60_deg_up_to_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_0_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_0_B), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + { -16, -16, height }, { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -3298,11 +3298,11 @@ static void side_friction_rc_track_diag_60_deg_up_to_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_2_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_2_B), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + { -16, -16, height }, { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -3319,7 +3319,7 @@ static void side_friction_rc_track_diag_60_deg_up_to_25_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_60_DEG_UP_TO_25_DEG_UP_DIR_1_A), - { -16, -16, height }, { 16, 16, 2 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3328,15 +3328,14 @@ static void side_friction_rc_track_diag_60_deg_up_to_25_deg_up( } } -static void side_friction_rc_track_diag_25_deg_down_to_60_deg_down( +static void SideFrictionRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_diag_60_deg_up_to_25_deg_up( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + SideFrictionRCTrackDiag60DegUpTo25DegUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); }; -static void side_friction_rc_track_diag_25_deg_up_to_60_deg_up( +static void SideFrictionRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3349,7 +3348,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_25_DEG_UP_TO_60_DEG_UP_DIR_3_A), - { -16 + 4, -16 + 2, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16 + 4, -16 + 2, height }, { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3362,10 +3361,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_25_DEG_UP_TO_60_DEG_UP_DIR_0_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(24033), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -3394,10 +3393,10 @@ static void side_friction_rc_track_diag_25_deg_up_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_25_DEG_UP_TO_60_DEG_UP_DIR_2_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(24034), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -3414,7 +3413,7 @@ static void side_friction_rc_track_diag_25_deg_up_to_60_deg_up( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(SPR_SIDE_FRICTION_DIAG_25_DEG_UP_TO_60_DEG_UP_DIR_1_A), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3423,99 +3422,98 @@ static void side_friction_rc_track_diag_25_deg_up_to_60_deg_up( } } -static void side_friction_rc_track_diag_60_deg_down_to_25_deg_down( +static void SideFrictionRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - side_friction_rc_track_diag_25_deg_up_to_60_deg_up( - session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); + SideFrictionRCTrackDiag25DegUpTo60DegUp(session, ride, 3 - trackSequence, (direction + 2) & 3, height, trackElement); }; -TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSideFrictionRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return side_friction_rc_track_flat; + return SideFrictionRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return side_friction_rc_track_station; + return SideFrictionRCTrackStation; case TrackElemType::Up25: - return side_friction_rc_track_25_deg_up; + return SideFrictionRCTrack25DegUp; case TrackElemType::FlatToUp25: - return side_friction_rc_track_flat_to_25_deg_up; + return SideFrictionRCTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return side_friction_rc_track_25_deg_up_to_flat; + return SideFrictionRCTrack25DegUpToFlat; case TrackElemType::Down25: - return side_friction_rc_track_25_deg_down; + return SideFrictionRCTrack25DegDown; case TrackElemType::FlatToDown25: - return side_friction_rc_track_flat_to_25_deg_down; + return SideFrictionRCTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return side_friction_rc_track_25_deg_down_to_flat; + return SideFrictionRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return side_friction_rc_track_left_quarter_turn_5; + return SideFrictionRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return side_friction_rc_track_right_quarter_turn_5; + return SideFrictionRCTrackRightQuarterTurn5; case TrackElemType::SBendLeft: - return side_friction_rc_track_s_bend_left; + return SideFrictionRCTrackSBendLeft; case TrackElemType::SBendRight: - return side_friction_rc_track_s_bend_right; + return SideFrictionRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return side_friction_rc_track_left_quarter_turn_3; + return SideFrictionRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return side_friction_rc_track_right_quarter_turn_3; + return SideFrictionRCTrackRightQuarterTurn3; case TrackElemType::Brakes: - return side_friction_rc_track_brakes; + return SideFrictionRCTrackBrakes; case TrackElemType::LeftEighthToDiag: - return side_friction_rc_track_left_eighth_to_diag; + return SideFrictionRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return side_friction_rc_track_right_eighth_to_diag; + return SideFrictionRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return side_friction_rc_track_left_eighth_to_orthogonal; + return SideFrictionRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return side_friction_rc_track_right_eighth_to_orthogonal; + return SideFrictionRCTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return side_friction_rc_track_diag_flat; + return SideFrictionRCTrackDiagFlat; case TrackElemType::DiagUp25: - return side_friction_rc_track_diag_25_deg_up; + return SideFrictionRCTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return side_friction_rc_track_diag_flat_to_25_deg_up; + return SideFrictionRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return side_friction_rc_track_diag_25_deg_up_to_flat; + return SideFrictionRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return side_friction_rc_track_diag_25_deg_down; + return SideFrictionRCTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return side_friction_rc_track_diag_flat_to_25_deg_down; + return SideFrictionRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return side_friction_rc_track_diag_25_deg_down_to_flat; + return SideFrictionRCTrackDiag25DegDownToFlat; // Added by OpenRCT2 case TrackElemType::Down25ToDown60: - return side_friction_rc_track_25_deg_down_to_60_deg_down; + return SideFrictionRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return side_friction_rc_track_60_deg_down_to_25_deg_down; + return SideFrictionRCTrack60DegDownTo25DegDown; case TrackElemType::Up25ToUp60: - return side_friction_rc_track_25_deg_up_to_60_deg_up; + return SideFrictionRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return side_friction_rc_track_60_deg_up_to_25_deg_up; + return SideFrictionRCTrack60DegUpTo25DegUp; case TrackElemType::Up60: - return side_friction_rc_track_60_deg_up; + return SideFrictionRCTrack60DegUp; case TrackElemType::Down60: - return side_friction_rc_track_60_deg_down; + return SideFrictionRCTrack60DegDown; case TrackElemType::DiagUp60: - return side_friction_rc_track_diag_60_deg_up; + return SideFrictionRCTrackDiag60DegUp; case TrackElemType::DiagDown60: - return side_friction_rc_track_diag_60_deg_down; + return SideFrictionRCTrackDiag60DegDown; case TrackElemType::DiagUp60ToUp25: - return side_friction_rc_track_diag_60_deg_up_to_25_deg_up; + return SideFrictionRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagDown25ToDown60: - return side_friction_rc_track_diag_25_deg_down_to_60_deg_down; + return SideFrictionRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagUp25ToUp60: - return side_friction_rc_track_diag_25_deg_up_to_60_deg_up; + return SideFrictionRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagDown60ToDown25: - return side_friction_rc_track_diag_60_deg_down_to_25_deg_down; + return SideFrictionRCTrackDiag60DegDownTo25DegDown; } return nullptr; } diff --git a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp index db9ff8ace2..851762514a 100644 --- a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp @@ -38,28 +38,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -72,16 +72,16 @@ namespace SingleRailRC case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -107,19 +107,19 @@ namespace SingleRailRC { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height - 2 }, - { 32, 28, 2 }, { 0, 2, height }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 4, 7); + { { 0, 2, height }, { 32, 28, 2 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -137,28 +137,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -170,27 +170,27 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 10)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 11)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -220,28 +220,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 13)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 14)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -253,25 +253,25 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 13)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 14)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -301,28 +301,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -334,25 +334,25 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -382,36 +382,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 2)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 4)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -423,31 +423,31 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 2)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 4)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -477,36 +477,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 8)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 10)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -518,31 +518,31 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 8)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 10)), - { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -572,28 +572,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -605,25 +605,25 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -696,25 +696,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 8)), - { 0, 0, height }, { 2, 20, 31 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 9)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 10)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 11)), - { 0, 0, height }, { 2, 20, 31 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetVerticalTunnel(session, height + 32); @@ -747,28 +747,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 1)), - { 0, 0, height }, { 2, 20, 55 }, { 24, 6, height }); + { 0, 0, height }, { { 24, 6, height }, { 2, 20, 55 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 2)), - { 0, 0, height }, { 2, 20, 55 }, { 24, 6, height }); + { 0, 0, height }, { { 24, 6, height }, { 2, 20, 55 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 36, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -803,22 +803,22 @@ namespace SingleRailRC case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 5)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 6)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } switch (direction) @@ -848,25 +848,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 6)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL + 5)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; } if (direction == 0 || direction == 3) @@ -895,25 +895,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -935,25 +935,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 1)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 4)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 7)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 10)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -967,25 +967,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 2)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 8)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1026,25 +1026,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1066,25 +1066,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 1)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 6)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 11)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 16)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1101,25 +1101,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 7)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 17)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1136,25 +1136,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 3)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 8)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 13)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1171,25 +1171,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 4)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1230,25 +1230,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1267,25 +1267,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 1)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 5)), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 9)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 13)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1302,25 +1302,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 6)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 10)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 14)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1340,7 +1340,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1348,7 +1348,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 7)), - { 0, 0, height }, { 16, 18, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1356,7 +1356,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 11)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1364,7 +1364,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1392,25 +1392,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1429,25 +1429,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 17)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 25)), - { 0, 0, height }, { 34, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 29)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1464,25 +1464,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 22)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 26)), - { 0, 0, height }, { 28, 28, 3 }, { 4, 4, height }); + { 0, 0, height }, { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 30)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1502,7 +1502,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1510,7 +1510,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 23)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1518,7 +1518,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 27)), - { 0, 0, height }, { 16, 18, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1526,7 +1526,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE + 31)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1572,7 +1572,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1584,7 +1584,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1601,7 +1601,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1613,7 +1613,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1630,7 +1630,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1642,7 +1642,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1663,7 +1663,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1689,7 +1689,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1726,7 +1726,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1738,7 +1738,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1756,7 +1756,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1768,7 +1768,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1786,7 +1786,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1798,7 +1798,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1820,7 +1820,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1846,7 +1846,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1883,7 +1883,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1895,7 +1895,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1913,7 +1913,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1925,7 +1925,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1943,7 +1943,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1955,7 +1955,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1977,7 +1977,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2003,7 +2003,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2040,7 +2040,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2052,7 +2052,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2070,7 +2070,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2082,7 +2082,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2100,7 +2100,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2112,7 +2112,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2134,7 +2134,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2160,7 +2160,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2197,7 +2197,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2209,7 +2209,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2227,7 +2227,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2239,7 +2239,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2257,7 +2257,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2269,7 +2269,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2291,7 +2291,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2317,7 +2317,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2354,7 +2354,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2366,7 +2366,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2383,7 +2383,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2395,7 +2395,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2412,7 +2412,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2424,7 +2424,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2445,7 +2445,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2471,7 +2471,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2509,7 +2509,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2521,7 +2521,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2539,7 +2539,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2551,7 +2551,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2569,7 +2569,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2581,7 +2581,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2603,7 +2603,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2629,7 +2629,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2666,7 +2666,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2678,7 +2678,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2696,7 +2696,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2708,7 +2708,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2726,7 +2726,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2738,7 +2738,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2760,7 +2760,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2786,7 +2786,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2823,7 +2823,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2835,7 +2835,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2853,7 +2853,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2865,7 +2865,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2883,7 +2883,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2895,7 +2895,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2917,7 +2917,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2943,7 +2943,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2980,7 +2980,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2992,7 +2992,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3010,7 +3010,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3022,7 +3022,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3040,7 +3040,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3052,7 +3052,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3074,7 +3074,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 5)), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3100,7 +3100,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 5)), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3137,7 +3137,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3149,7 +3149,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3167,7 +3167,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3179,7 +3179,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3197,7 +3197,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3209,7 +3209,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3231,7 +3231,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3257,7 +3257,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3294,7 +3294,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 5)), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -3306,7 +3306,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 5)), - { -16, -16, height }, { 16, 16, 3 }, { 0, 0, height }); + { -16, -16, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -3324,7 +3324,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3336,7 +3336,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3354,7 +3354,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3366,7 +3366,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3388,7 +3388,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3414,7 +3414,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3451,7 +3451,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3463,7 +3463,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3481,7 +3481,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3493,7 +3493,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3511,7 +3511,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3523,7 +3523,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -3545,7 +3545,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_STEEP_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3571,7 +3571,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3602,36 +3602,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 3)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3651,36 +3651,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 9)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 11)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3714,36 +3714,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 13)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 15)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3770,36 +3770,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 19)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 21)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 23)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3826,36 +3826,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 25)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 26)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 27)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 29)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3882,36 +3882,36 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 31)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 32)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 33)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 34)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 35)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -3966,28 +3966,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 36)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 37)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 38)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION + 39)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4018,7 +4018,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4033,12 +4033,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4053,7 +4053,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4072,7 +4072,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4106,7 +4106,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4121,7 +4121,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4136,12 +4136,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4160,7 +4160,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4194,7 +4194,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 6)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4209,12 +4209,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 7)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 8)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4229,7 +4229,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 5)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4248,7 +4248,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 9)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4282,7 +4282,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 2)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4297,7 +4297,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 3)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4312,12 +4312,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 0)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 1)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4336,7 +4336,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 4)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4370,7 +4370,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 14)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4385,12 +4385,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4405,7 +4405,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 13)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4424,7 +4424,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 12)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4458,7 +4458,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 19)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4473,7 +4473,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 15)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4488,12 +4488,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 17)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 18)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4512,7 +4512,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 16)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4546,7 +4546,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 24)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4561,12 +4561,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 20)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 21)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4581,7 +4581,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 23)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4600,7 +4600,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 22)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4634,7 +4634,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 29)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4649,7 +4649,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 25)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4664,12 +4664,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 27)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 28)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4688,7 +4688,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 26)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4722,7 +4722,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 26)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4736,12 +4736,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 27)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 28)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4755,7 +4755,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 25)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4773,7 +4773,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 29)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4808,7 +4808,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 22)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4822,7 +4822,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 23)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4836,12 +4836,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 20)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 21)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4859,7 +4859,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 24)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4894,7 +4894,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 16)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4909,12 +4909,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 17)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 18)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4929,7 +4929,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 15)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4948,7 +4948,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 19)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -4982,7 +4982,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 12)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4997,7 +4997,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 13)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5012,12 +5012,12 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 10)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 11)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5036,7 +5036,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 14)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5070,7 +5070,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 33)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5085,7 +5085,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 30)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5100,7 +5100,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 32)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5119,7 +5119,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 31)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5153,7 +5153,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 31)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5168,7 +5168,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 32)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5183,7 +5183,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 30)), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5202,7 +5202,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_BANK_TRANSITION_DIAGONAL + 33)), - { -16, -16, height }, { 32, 32, 3 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5235,29 +5235,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 4)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5279,25 +5279,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 5)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 8)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5311,29 +5311,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 3)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 6)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_CURVE_BANKED + 13)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5374,29 +5374,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 6)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5418,25 +5418,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 2)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 7)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 12)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 18)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5453,25 +5453,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 8)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 13)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5488,25 +5488,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 4)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 9)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 14)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 20)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5523,29 +5523,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 15)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 16)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_CURVE_BANKED + 21)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5586,25 +5586,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 4)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5623,25 +5623,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 1)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 5)), - { 0, 0, height }, { 34, 16, 0 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 9)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 13)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5658,25 +5658,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 6)), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 10)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 14)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5696,7 +5696,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5704,7 +5704,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 7)), - { 0, 0, height }, { 16, 18, 0 }, { 0, 16, height + 27 }); + { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5712,7 +5712,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 11)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5720,7 +5720,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5748,25 +5748,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 24)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 28)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5785,25 +5785,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 17)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 25)), - { 0, 0, height }, { 34, 16, 0 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 29)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5820,25 +5820,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 22)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 26)), - { 0, 0, height }, { 28, 28, 0 }, { 4, 4, height + 27 }); + { 0, 0, height }, { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 30)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5858,7 +5858,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5866,7 +5866,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 23)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5874,7 +5874,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 27)), - { 0, 0, height }, { 16, 18, 0 }, { 0, 16, height + 27 }); + { 0, 0, height }, { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5882,7 +5882,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CURVE_BANKED + 31)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6137,25 +6137,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6189,13 +6189,13 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 11)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 16)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6212,19 +6212,19 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 7)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -6247,7 +6247,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 3)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -6265,7 +6265,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6282,25 +6282,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 4)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6333,25 +6333,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6373,13 +6373,13 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 26)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -6414,19 +6414,19 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 27)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 32)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 37)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6443,7 +6443,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 23)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -6461,7 +6461,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 38)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -6478,25 +6478,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 24)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 29)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 34)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE + 39)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -6542,44 +6542,44 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 0)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 1)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 2)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 3)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 4)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 5)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 6)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 7)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } @@ -6594,44 +6594,44 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 8)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 9)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 10)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 11)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 12)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 13)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 14)), - { 0, 0, height }, { 28, 28, 3 }, { 2, 2, height }); + { 0, 0, height }, { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_STEEP_SMALL_CURVE + 15)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 99 }); + { 0, 0, height }, { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_1, +56, TUNNEL_2); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } @@ -6663,33 +6663,33 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 0)), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 1)), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 2)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 3)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 4)), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 5)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -6715,33 +6715,33 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 6)), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 7)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 8)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 9)), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 10)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_VERTICAL_TWIST + 11)), - { 0, 0, height }, { 2, 20, 63 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 63 } }); break; } PaintUtilSetVerticalTunnel(session, height + 96); @@ -6778,32 +6778,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 2)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -6830,32 +6830,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 8)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -6882,32 +6882,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 12)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 13)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -6934,32 +6934,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 18)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 19)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7014,28 +7014,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 20)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 21)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 23)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7062,28 +7062,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 26)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 27)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7110,28 +7110,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 28)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 29)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 31)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7158,28 +7158,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 32)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 33)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 34)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7234,28 +7234,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 36)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 37)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 38)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 39)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7282,28 +7282,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 40)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 41)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 42)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 43)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7344,32 +7344,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 44)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 45)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 46)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 47)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 48)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7396,32 +7396,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 49)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 50)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 51)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 52)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 53)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7448,32 +7448,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 54)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 55)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 56)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 57)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 58)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7500,32 +7500,32 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 59)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 60)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 61)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 62)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SLOPE_BANK_TRANSITION + 63)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -7591,7 +7591,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 2)), - { 0, 6, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( @@ -7638,14 +7638,14 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 3)), - { 6, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 5)), - { 6, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7700,7 +7700,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 12)), - { 0, 6, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7742,7 +7742,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 11)), - { 6, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7751,7 +7751,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_SMALL_CURVE_BANKED + 13)), - { 6, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7811,28 +7811,28 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 5)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7862,21 +7862,21 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 6)), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 11)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 16)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7894,21 +7894,21 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 7)), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -7933,28 +7933,28 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 3)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 8)), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 13)), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7972,28 +7972,28 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 4)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 9)), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 14)), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8027,28 +8027,28 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 30)), - { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8071,21 +8071,21 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 21)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 26)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 31)), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( @@ -8117,21 +8117,21 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 27)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 32)), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 37)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8149,28 +8149,28 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 23)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 28)), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 33)), - { 0, 0, height }, { 1, 1, 34 }, { 30, 30, height }); + { 0, 0, height }, { { 30, 30, height }, { 1, 1, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 38)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8188,28 +8188,28 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 24)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 29)), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 34)), - { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 34 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_GENTLE_MEDIUM_CURVE_BANKED + 39)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8258,25 +8258,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8311,13 +8311,13 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 2)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 6)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8334,13 +8334,13 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 2)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 6)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -8373,25 +8373,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8424,25 +8424,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8461,7 +8461,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 9)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8469,7 +8469,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 13)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8512,7 +8512,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 9)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8520,7 +8520,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 13)), - { 0, 0, height }, { 32, 26, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 26, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8539,25 +8539,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_S_BEND + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8590,29 +8590,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 4)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8635,25 +8635,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 5)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 8)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8667,29 +8667,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 3)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 6)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 9)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 13)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8714,29 +8714,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 0)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 1)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 4)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 7)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8764,25 +8764,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 12)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 2)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 5)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 8)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8796,29 +8796,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 13)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 6)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 10)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8847,29 +8847,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 21)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 25)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8892,25 +8892,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 22)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 26)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8924,29 +8924,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 16)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 19)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 20)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 23)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 27)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -8971,29 +8971,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 17)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 21)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 24)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 25)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9021,25 +9021,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 18)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 22)), - { 0, 0, height }, { 16, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 26)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 15)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9053,29 +9053,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 19)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 20)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 23)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 27)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_HELIX + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9130,29 +9130,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 1)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 6)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9175,25 +9175,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 2)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 7)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 12)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 18)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9210,25 +9210,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 8)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 13)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9245,25 +9245,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 4)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 9)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 14)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 20)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9280,29 +9280,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 10)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 15)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 16)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 21)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9327,29 +9327,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 17)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 0)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 1)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 6)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9377,25 +9377,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 18)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 2)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 7)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 12)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9412,25 +9412,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 19)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 3)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 8)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 13)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9447,25 +9447,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 20)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 4)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 9)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 14)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9482,29 +9482,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 10)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 16)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9532,29 +9532,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 27)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 33)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 38)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 39)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9577,25 +9577,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 23)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 28)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 34)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 40)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9612,25 +9612,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 24)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 29)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 35)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 41)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9647,25 +9647,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 25)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 30)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 36)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 42)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9682,7 +9682,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 26)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 8 }); + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9690,11 +9690,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 31)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 32)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9702,7 +9702,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 37)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9710,7 +9710,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 43)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9736,29 +9736,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 27)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 33)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 38)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 39)), - { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 22)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -9786,25 +9786,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 28)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 34)), - { 0, 0, height }, { 16, 32, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 40)), - { 0, 0, height }, { 16, 32, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 23)), - { 0, 0, height }, { 16, 32, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9821,25 +9821,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 29)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 35)), - { 0, 0, height }, { 16, 16, 1 }, { 16, 16, height + 27 }); + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 41)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 24)), - { 0, 0, height }, { 16, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9856,25 +9856,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 30)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 36)), - { 0, 0, height }, { 32, 16, 1 }, { 0, 0, height + 27 }); + { 0, 0, height }, { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 42)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 25)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9891,11 +9891,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 31)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 32)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9903,7 +9903,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 37)), - { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9911,7 +9911,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 43)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9919,7 +9919,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HELIX + 26)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 8 }); + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9975,11 +9975,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 1)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9987,11 +9987,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 7)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -9999,11 +9999,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 13)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10011,11 +10011,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 19)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10036,41 +10036,41 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 3)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 9)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 15)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 21)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10087,41 +10087,41 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 5)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 11)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 17)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 23)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -10154,11 +10154,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 25)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10166,11 +10166,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 31)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10178,11 +10178,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 36)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 37)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10190,11 +10190,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 42)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 43)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 4, height + 1, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10215,41 +10215,41 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 26)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 27)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 32)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 33)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 38)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 39)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 44)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 45)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10266,41 +10266,41 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 29)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 34)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 35)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 40)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 41)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 46)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BARREL_ROLL + 47)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 44 }); + { 0, 0, height }, { { 0, 6, height + 44 }, { 32, 20, 0 } }); break; } switch (direction) @@ -10384,7 +10384,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10392,7 +10392,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 5)), - { 0, 14, height }, { 3, 20, 63 }, { 28, 6, height }); + { 0, 14, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10400,7 +10400,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 9)), - { 0, 6, height }, { 3, 20, 63 }, { 28, 6, height }); + { 0, 6, height }, { { 28, 6, height }, { 3, 20, 63 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -10429,7 +10429,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 6)), - { 12, 0, height }, { 3, 16, 119 }, { 12, 0, height }); + { 12, 0, height }, { { 12, 0, height }, { 3, 16, 119 } }); break; case 2: PaintAddImageAsParentRotated( @@ -10441,7 +10441,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_HALF_LOOP + 14)), - { 16, 16, height }, { 2, 16, 119 }, { 15, 6, height }); + { 16, 16, height }, { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -10507,16 +10507,16 @@ namespace SingleRailRC case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10539,7 +10539,7 @@ namespace SingleRailRC MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( @@ -10548,7 +10548,7 @@ namespace SingleRailRC MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( @@ -10557,7 +10557,7 @@ namespace SingleRailRC MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 0)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( @@ -10566,10 +10566,10 @@ namespace SingleRailRC MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 1)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 3 }); + { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -10588,28 +10588,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10629,28 +10629,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 13)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10666,28 +10666,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 10, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10703,28 +10703,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 7)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 11)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 19, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10757,28 +10757,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 20)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 24)), - { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 24, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10798,28 +10798,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 29)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 18, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10835,28 +10835,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 26)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 13, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10872,28 +10872,28 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 19)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 23)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 27)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT_TO_STEEP + 31)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 5, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -10939,17 +10939,17 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 0)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 1)), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -10972,25 +10972,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 3)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 6)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } @@ -11012,25 +11012,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 1)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 4)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 7)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 10)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11043,25 +11043,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 2)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 5)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 8)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 11)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -11098,25 +11098,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -11136,25 +11136,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 13)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 16)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 19)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 22)), - { 0, 0, height }, { 20, 20, 3 }, { 6, 6, height + 10 }); + { 0, 0, height }, { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11167,25 +11167,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 14)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 17)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 20)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_CORKSCREW + 23)), - { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height + 24 }); + { 0, 0, height }, { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -11236,25 +11236,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } @@ -11276,7 +11276,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 34, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11284,7 +11284,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 6)), - { 0, 0, height }, { 26, 1, 32 }, { 0, 29, height }); + { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11292,7 +11292,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 11)), - { 0, 0, height }, { 20, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11300,7 +11300,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11319,25 +11319,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 2)), - { 0, 0, height }, { 48, 1, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 7)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 12)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 48 }); + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11359,7 +11359,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 3)), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11367,7 +11367,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 8)), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11375,7 +11375,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 13)), - { 0, 0, height }, { 24, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11383,7 +11383,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11398,25 +11398,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 4)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 9)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 14)), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 19)), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; } @@ -11452,25 +11452,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 4 }); + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } @@ -11492,7 +11492,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11500,7 +11500,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 26)), - { 0, 0, height }, { 20, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 20, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 24, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11508,7 +11508,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 31)), - { 0, 0, height }, { 26, 1, 32 }, { 0, 29, height }); + { 0, 0, height }, { { 0, 29, height }, { 26, 1, 32 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 22, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11516,7 +11516,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 36)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 34, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11535,25 +11535,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 27)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 48 }); + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 32)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 48 }); + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 37)), - { 0, 0, height }, { 48, 1, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11575,7 +11575,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 23)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11583,7 +11583,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 28)), - { 0, 0, height }, { 24, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11591,7 +11591,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 33)), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11599,7 +11599,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 38)), - { 0, 0, height }, { 28, 28, 0 }, { 2, 2, height + 50 }); + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 56, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11613,25 +11613,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 24)), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 29)), - { 0, 0, height }, { 26, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 34)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_CORKSCREW + 39)), - { 0, 0, height }, { 28, 28, 1 }, { 2, 2, height + 40 }); + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); break; } @@ -11697,25 +11697,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 5)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -11736,25 +11736,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 6)), - { 0, 0, height }, { 0, 32, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 11)), - { 0, 0, height }, { 40, 0, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -11772,7 +11772,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 2)), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height + 2 }); + { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11780,7 +11780,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 7)), - { 0, 0, height }, { 1, 32, 96 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11788,7 +11788,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 12)), - { 0, 0, height }, { 1, 32, 96 }, { 31, 0, height }); + { 0, 0, height }, { { 31, 0, height }, { 1, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11796,7 +11796,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 17)), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11812,25 +11812,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 3)), - { 0, 0, height }, { 1, 32, 160 }, { 2, 0, height }); + { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 8)), - { 0, 0, height }, { 0, 32, 160 }, { 30, 0, height }); + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 13)), - { 0, 0, height }, { 1, 32, 160 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 1, 32, 160 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 18)), - { 0, 0, height }, { 1, 32, 160 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -11844,25 +11844,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 4)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 2, height + 48 }); + { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 9)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 2, height + 48 }); + { 0, 0, height }, { { 0, 2, height + 48 }, { 32, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 14)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 19)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; } @@ -11894,25 +11894,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -11933,25 +11933,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 26)), - { 0, 0, height }, { 40, 0, 64 }, { 0, 32, height }); + { 0, 0, height }, { { 0, 32, height }, { 40, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 31)), - { 0, 0, height }, { 0, 32, 64 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 0, 32, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 36)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } @@ -11969,7 +11969,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 22)), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11977,7 +11977,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 27)), - { 0, 0, height }, { 0, 32, 96 }, { 30, 0, height }); + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 18, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11985,7 +11985,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 32)), - { 0, 0, height }, { 0, 32, 96 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 0, 32, 96 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -11993,7 +11993,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 37)), - { 0, 0, height }, { 32, 32, 0 }, { 0, 0, height + 2 }); + { 0, 0, height }, { { 0, 0, height + 2 }, { 32, 32, 0 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12009,25 +12009,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 23)), - { 0, 0, height }, { 1, 32, 160 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 1, 32, 160 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 28)), - { 0, 0, height }, { 0, 32, 160 }, { 29, 0, height }); + { 0, 0, height }, { { 29, 0, height }, { 0, 32, 160 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 33)), - { 0, 0, height }, { 0, 32, 160 }, { 30, 0, height }); + { 0, 0, height }, { { 30, 0, height }, { 0, 32, 160 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 38)), - { 0, 0, height }, { 1, 32, 160 }, { 2, 0, height }); + { 0, 0, height }, { { 2, 0, height }, { 1, 32, 160 } }); break; } @@ -12042,25 +12042,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 24)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 29)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 34)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_MEDIUM_HALF_LOOP + 39)), - { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height + 48 }); + { 0, 0, height }, { { 0, 0, height + 48 }, { 32, 32, 1 } }); break; } @@ -12105,11 +12105,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 1)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12117,11 +12117,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 4)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 5)), - { 0, 0, height }, { 32, 1, 32 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12129,7 +12129,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 8)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12137,7 +12137,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 12)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12158,25 +12158,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 2)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 6)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 13)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12193,33 +12193,33 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 3)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 7)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 10)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 11)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 15)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; } switch (direction) @@ -12256,7 +12256,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 14, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12264,7 +12264,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12272,11 +12272,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 24)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 25)), - { 0, 0, height }, { 32, 1, 32 }, { 0, 31, height }); + { 0, 0, height }, { { 0, 31, height }, { 32, 1, 32 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12284,11 +12284,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 29)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12308,25 +12308,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 17)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 26)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 30)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12343,33 +12343,33 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 19)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 23)), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 33 }); + { 0, 0, height }, { { 0, 6, height + 33 }, { 32, 20, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 27)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_ZERO_G_ROLL + 31)), - { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 28 }); + { 0, 0, height }, { { 0, 6, height + 28 }, { 32, 20, 1 } }); break; } switch (direction) @@ -12420,29 +12420,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 5)), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 9)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 10)), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 25, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -12461,29 +12461,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 2)), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 6)), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 11)), - { 0, 0, height }, { 32, 0, 64 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 16)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12497,29 +12497,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 3)), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 7)), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 12)), - { 0, 0, height }, { 32, 0, 48 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 17)), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 18)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12541,7 +12541,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 4)), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12549,7 +12549,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 8)), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12557,11 +12557,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 13)), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12569,7 +12569,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 19)), - { 0, 0, height }, { 32, 10, 20 }, { 0, 18, height }); + { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12601,29 +12601,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 20)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 25)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 26)), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 31)), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 25, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -12642,29 +12642,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 27)), - { 0, 0, height }, { 32, 0, 64 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 64 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 32)), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 36)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 37)), - { 0, 0, height }, { 32, 0, 96 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 96 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12678,29 +12678,29 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 22)), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 23)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 28)), - { 0, 0, height }, { 32, 0, 48 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 48 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 33)), - { 0, 0, height }, { 32, 0, 48 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 48 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 38)), - { 0, 0, height }, { 32, 0, 64 }, { 0, 30, height }); + { 0, 0, height }, { { 0, 30, height }, { 32, 0, 64 } }); break; } @@ -12723,7 +12723,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 24)), - { 0, 0, height }, { 32, 10, 20 }, { 0, 18, height }); + { 0, 0, height }, { { 0, 18, height }, { 32, 10, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12731,11 +12731,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 29)), - { 0, 0, height }, { 32, 0, 32 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 0, 32 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 30)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 40 }); + { 0, 0, height }, { { 0, 6, height + 40 }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12743,7 +12743,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 34)), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12751,7 +12751,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_ZERO_G_ROLL + 39)), - { 0, 0, height }, { 26, 0, 20 }, { 0, 26, height }); + { 0, 0, height }, { { 0, 26, height }, { 26, 0, 20 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -12797,25 +12797,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 0)), - { 0, 0, height }, { 2, 20, 31 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 3)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 6)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 9)), - { 0, 0, height }, { 2, 20, 31 }, { 4, 6, height + 8 }); + { 0, 0, height }, { { 4, 6, height + 8 }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12829,25 +12829,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 1)), - { 0, 0, height }, { 2, 20, 31 }, { -8, 6, height }); + { 0, 0, height }, { { -8, 6, height }, { 2, 20, 31 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 4)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 7)), - { 0, 0, height }, { 2, 20, 63 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 63 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 10)), - { 0, 0, height }, { 2, 20, 31 }, { -8, 6, height }); + { 0, 0, height }, { { -8, 6, height }, { 2, 20, 31 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -12861,25 +12861,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 2)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 24 }); + { 0, 0, height }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 5)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 8)), - { 0, 0, height }, { 2, 20, 31 }, { 24, 6, height + 8 }); + { 0, 0, height }, { { 24, 6, height + 8 }, { 2, 20, 31 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_QUARTER_LOOP + 11)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height + 24 }); + { 0, 0, height }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -12923,7 +12923,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 3)), - { 0, 6, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -12960,25 +12960,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 1)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 4)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 6)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 8)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -13028,7 +13028,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 14)), - { 0, 6, height }, { 32, 1, 26 }, { 0, 27, height }); + { 0, 6, height }, { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -13059,25 +13059,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 10)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 12)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 15)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 17)), - { 6, 0, height }, { 20, 32, 3 }, { 0, 6, height - 6 }); + { 6, 0, height }, { { 0, 6, height - 6 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup( @@ -13111,25 +13111,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 12)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 15)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 17)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 10)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -13165,7 +13165,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 14)), - { 6, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( @@ -13210,25 +13210,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 8)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 1)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 4)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 6)), - { 0, 6, height }, { 32, 20, 3 }, { 0, 6, height - 6 }); + { 0, 6, height }, { { 0, 6, height - 6 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup( @@ -13270,7 +13270,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_TURN_BANK_TRANSITION + 3)), - { 6, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + { 6, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( @@ -13309,25 +13309,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 0)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 7)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 14)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 21)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -13346,7 +13346,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 1)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13354,7 +13354,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 8)), - { 0, 0, height }, { 32, 20, 9 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13362,7 +13362,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 15)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13370,7 +13370,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 22)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13386,25 +13386,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 2)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 9)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 70 }); + { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 16)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 70 }); + { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 23)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13421,7 +13421,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 3)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13429,7 +13429,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 10)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13437,7 +13437,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 17)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13445,7 +13445,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 24)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13464,25 +13464,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 4)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 11)), - { 0, 0, height }, { 16, 16, 0 }, { 0, 16, height + 110 }); + { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 18)), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 100 }); + { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 25)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13496,25 +13496,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 5)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 12)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 19)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 26)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13531,25 +13531,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 6)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 13)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 20)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 27)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; } if (direction == 0 || direction == 3) @@ -13579,25 +13579,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 28)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 35)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 42)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 49)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -13616,7 +13616,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 29)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13624,7 +13624,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 36)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13632,7 +13632,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 43)), - { 0, 0, height }, { 32, 20, 9 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 9 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13640,7 +13640,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 50)), - { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 15, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13656,25 +13656,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 30)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 37)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 70 }); + { 0, 0, height }, { { 0, 16, height + 70 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 44)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 70 }); + { 0, 0, height }, { { 0, 0, height + 70 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 51)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13691,7 +13691,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 31)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13699,7 +13699,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 38)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 7, 0, height + 28, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13707,7 +13707,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 45)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 5, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13715,7 +13715,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 52)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 6, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13734,25 +13734,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 32)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 0, height }); + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 39)), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 100 }); + { 0, 0, height }, { { 0, 0, height + 100 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 46)), - { 0, 0, height }, { 16, 16, 0 }, { 0, 16, height + 110 }); + { 0, 0, height }, { { 0, 16, height + 110 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 53)), - { 0, 0, height }, { 16, 16, 3 }, { 16, 16, height }); + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13766,25 +13766,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 33)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 40)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 200 }); + { 0, 0, height }, { { 0, 0, height + 200 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 47)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 200 }); + { 0, 0, height }, { { 0, 16, height + 200 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 54)), - { 0, 0, height }, { 32, 16, 3 }, { 0, 16, height }); + { 0, 0, height }, { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -13801,25 +13801,25 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 34)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 41)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 0, height + 32 }); + { 0, 0, height }, { { 0, 0, height + 32 }, { 32, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 48)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_LARGE_HALF_LOOP + 55)), - { 0, 0, height }, { 32, 16, 0 }, { 0, 16, height + 32 }); + { 0, 0, height }, { { 0, 16, height + 32 }, { 32, 16, 0 } }); break; } if (direction == 0 || direction == 3) @@ -13862,7 +13862,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 0)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13870,11 +13870,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 2)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 1)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13882,11 +13882,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 4)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 3)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13894,7 +13894,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 5)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13908,7 +13908,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 0)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13916,11 +13916,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 2)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 1)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13928,11 +13928,11 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 4)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 3)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 0, height + 4, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13940,7 +13940,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 5)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -13971,33 +13971,33 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 6)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 7)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 8)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 10)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 9)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 11)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -14010,33 +14010,33 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 6)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 7)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 8)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 10)), - { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); + { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 9)), - { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 11)), - { 0, 0, height }, { 32, 27, 4 }, { 0, 2, height }); + { 0, 0, height }, { { 0, 2, height }, { 32, 27, 4 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -14084,7 +14084,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14097,7 +14097,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14115,7 +14115,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14128,7 +14128,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14146,7 +14146,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14159,7 +14159,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14181,7 +14181,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14208,7 +14208,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14245,7 +14245,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14258,7 +14258,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14276,7 +14276,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14289,7 +14289,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14307,7 +14307,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14320,7 +14320,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14342,7 +14342,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14369,7 +14369,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14406,7 +14406,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14419,7 +14419,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 17)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14437,7 +14437,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14450,7 +14450,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 18)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14468,7 +14468,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14481,7 +14481,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 16)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14503,7 +14503,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14530,7 +14530,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 19)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14567,7 +14567,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14580,7 +14580,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 13)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14598,7 +14598,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14611,7 +14611,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 14)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14629,7 +14629,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14642,7 +14642,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 12)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); break; } } @@ -14664,7 +14664,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_LIFT_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -14691,7 +14691,7 @@ namespace SingleRailRC session, direction, session.TrackColours[SCHEME_TRACK].WithIndex( (SPR_G2_SINGLE_RAIL_TRACK_SMALL_FLAT_TO_STEEP + 15)), - { -16, -16, height }, { 32, 32, 4 }, { -16, -16, height }); + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 4 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index 0803f363bf..9563eec103 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ static constexpr const uint32_t _StandUpBlockBrakeImages[NumOrthogonalDirections }; /** rct2: 0x008A7114 */ -static void stand_up_rc_track_flat( +static void StandUpRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -56,7 +56,7 @@ static void stand_up_rc_track_flat( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25454), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -76,7 +76,7 @@ static void stand_up_rc_track_flat( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -88,7 +88,7 @@ static void stand_up_rc_track_flat( } /** rct2: 0x008A7384, 0x008A7394, 0x008A73A4 */ -static void stand_up_rc_track_station( +static void StandUpRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -101,29 +101,29 @@ static void stand_up_rc_track_station( if (trackElement.GetTrackType() == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_StandUpBlockBrakeImages[direction][isClosed]), - { 0, 6, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } else { PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 6, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); } PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A7124 */ -static void stand_up_rc_track_25_deg_up( +static void StandUpRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -148,7 +148,7 @@ static void stand_up_rc_track_25_deg_up( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25399), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -174,7 +174,7 @@ static void stand_up_rc_track_25_deg_up( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25245), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -193,7 +193,7 @@ static void stand_up_rc_track_25_deg_up( } /** rct2: 0x008A7134 */ -static void stand_up_rc_track_60_deg_up( +static void StandUpRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -207,20 +207,20 @@ static void stand_up_rc_track_60_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25398), { 0, 6, height }, { 1, 10, 75 }, - { 29, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25398), { 0, 6, height }, + { { 29, 10, height }, { 1, 10, 75 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25390), { 0, 6, height }, { 1, 10, 75 }, - { 29, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25390), { 0, 6, height }, + { { 29, 10, height }, { 1, 10, 75 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25400), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -235,20 +235,20 @@ static void stand_up_rc_track_60_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25244), { 0, 6, height }, { 1, 10, 75 }, - { 29, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25244), { 0, 6, height }, + { { 29, 10, height }, { 1, 10, 75 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25236), { 0, 6, height }, { 1, 10, 75 }, - { 29, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25236), { 0, 6, height }, + { { 29, 10, height }, { 1, 10, 75 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25246), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -267,7 +267,7 @@ static void stand_up_rc_track_60_deg_up( } /** rct2: 0x008A7144 */ -static void stand_up_rc_track_flat_to_25_deg_up( +static void StandUpRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -292,7 +292,7 @@ static void stand_up_rc_track_flat_to_25_deg_up( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25403), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -318,7 +318,7 @@ static void stand_up_rc_track_flat_to_25_deg_up( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25249), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -337,7 +337,7 @@ static void stand_up_rc_track_flat_to_25_deg_up( } /** rct2: 0x008A7154 */ -static void stand_up_rc_track_25_deg_up_to_60_deg_up( +static void StandUpRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -351,26 +351,26 @@ static void stand_up_rc_track_25_deg_up_to_60_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25411), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25411), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25402), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25402), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25409), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25409), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25392), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25392), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25404), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -385,26 +385,26 @@ static void stand_up_rc_track_25_deg_up_to_60_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25277), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25277), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25248), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25248), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25275), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25275), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25238), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25238), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25250), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -423,7 +423,7 @@ static void stand_up_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008A7164 */ -static void stand_up_rc_track_60_deg_up_to_25_deg_up( +static void StandUpRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -437,26 +437,26 @@ static void stand_up_rc_track_60_deg_up_to_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25412), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25412), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25408), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25408), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25410), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25410), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25394), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25394), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25406), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -471,26 +471,26 @@ static void stand_up_rc_track_60_deg_up_to_25_deg_up( break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25278), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25278), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25254), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25254), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25276), { 0, 6, height }, { 32, 10, 43 }, - { 0, 10, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25276), { 0, 6, height }, + { { 0, 10, height }, { 32, 10, 43 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25240), { 0, 6, height }, { 32, 2, 43 }, - { 0, 4, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25240), { 0, 6, height }, + { { 0, 4, height }, { 32, 2, 43 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25252), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -509,7 +509,7 @@ static void stand_up_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008A7174 */ -static void stand_up_rc_track_25_deg_up_to_flat( +static void StandUpRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -534,7 +534,7 @@ static void stand_up_rc_track_25_deg_up_to_flat( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25405), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -560,7 +560,7 @@ static void stand_up_rc_track_25_deg_up_to_flat( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25251), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -579,55 +579,55 @@ static void stand_up_rc_track_25_deg_up_to_flat( } /** rct2: 0x008A7184 */ -static void stand_up_rc_track_25_deg_down( +static void StandUpRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7194 */ -static void stand_up_rc_track_60_deg_down( +static void StandUpRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A71A4 */ -static void stand_up_rc_track_flat_to_25_deg_down( +static void StandUpRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A71B4 */ -static void stand_up_rc_track_25_deg_down_to_60_deg_down( +static void StandUpRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A71C4 */ -static void stand_up_rc_track_60_deg_down_to_25_deg_down( +static void StandUpRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A71D4 */ -static void stand_up_rc_track_25_deg_down_to_flat( +static void StandUpRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A71E4 */ -static void stand_up_rc_track_left_quarter_turn_5( +static void StandUpRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -802,16 +802,16 @@ static void stand_up_rc_track_left_quarter_turn_5( } /** rct2: 0x008A71F4 */ -static void stand_up_rc_track_right_quarter_turn_5( +static void StandUpRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - stand_up_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7204 */ -static void stand_up_rc_track_flat_to_left_bank( +static void StandUpRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -834,7 +834,7 @@ static void stand_up_rc_track_flat_to_left_bank( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25283), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -845,7 +845,7 @@ static void stand_up_rc_track_flat_to_left_bank( } /** rct2: 0x008A7214 */ -static void stand_up_rc_track_flat_to_right_bank( +static void StandUpRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -868,7 +868,7 @@ static void stand_up_rc_track_flat_to_right_bank( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25285), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -879,7 +879,7 @@ static void stand_up_rc_track_flat_to_right_bank( } /** rct2: 0x008A7224 */ -static void stand_up_rc_track_left_bank_to_flat( +static void StandUpRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -902,7 +902,7 @@ static void stand_up_rc_track_left_bank_to_flat( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25284), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -913,7 +913,7 @@ static void stand_up_rc_track_left_bank_to_flat( } /** rct2: 0x008A7234 */ -static void stand_up_rc_track_right_bank_to_flat( +static void StandUpRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -936,7 +936,7 @@ static void stand_up_rc_track_right_bank_to_flat( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25286), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -947,7 +947,7 @@ static void stand_up_rc_track_right_bank_to_flat( } /** rct2: 0x008A7244 */ -static void stand_up_rc_track_banked_left_quarter_turn_5( +static void StandUpRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -959,25 +959,25 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25464), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25475), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25469), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25474), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25459), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -998,22 +998,22 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25463), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25468), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25473), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25458), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1028,22 +1028,22 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25462), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25467), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25472), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25457), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1059,22 +1059,22 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25461), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25466), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25471), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25456), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1089,25 +1089,25 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25460), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25465), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25470), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25476), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25455), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1128,16 +1128,16 @@ static void stand_up_rc_track_banked_left_quarter_turn_5( } /** rct2: 0x008A7254 */ -static void stand_up_rc_track_banked_right_quarter_turn_5( +static void StandUpRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - stand_up_rc_track_banked_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackBankedLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7264 */ -static void stand_up_rc_track_left_bank_to_25_deg_up( +static void StandUpRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1160,7 +1160,7 @@ static void stand_up_rc_track_left_bank_to_25_deg_up( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25318), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1178,7 +1178,7 @@ static void stand_up_rc_track_left_bank_to_25_deg_up( } /** rct2: 0x008A7274 */ -static void stand_up_rc_track_right_bank_to_25_deg_up( +static void StandUpRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1201,7 +1201,7 @@ static void stand_up_rc_track_right_bank_to_25_deg_up( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25322), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1219,7 +1219,7 @@ static void stand_up_rc_track_right_bank_to_25_deg_up( } /** rct2: 0x008A7284 */ -static void stand_up_rc_track_25_deg_up_to_left_bank( +static void StandUpRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1242,7 +1242,7 @@ static void stand_up_rc_track_25_deg_up_to_left_bank( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25314), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1260,7 +1260,7 @@ static void stand_up_rc_track_25_deg_up_to_left_bank( } /** rct2: 0x008A7294 */ -static void stand_up_rc_track_25_deg_up_to_right_bank( +static void StandUpRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1283,7 +1283,7 @@ static void stand_up_rc_track_25_deg_up_to_right_bank( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25310), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1301,39 +1301,39 @@ static void stand_up_rc_track_25_deg_up_to_right_bank( } /** rct2: 0x008A72A4 */ -static void stand_up_rc_track_left_bank_to_25_deg_down( +static void StandUpRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A72B4 */ -static void stand_up_rc_track_right_bank_to_25_deg_down( +static void StandUpRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A72C4 */ -static void stand_up_rc_track_25_deg_down_to_left_bank( +static void StandUpRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A72D4 */ -static void stand_up_rc_track_25_deg_down_to_right_bank( +static void StandUpRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A72E4 */ -static void stand_up_rc_track_left_bank( +static void StandUpRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1356,7 +1356,7 @@ static void stand_up_rc_track_left_bank( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25326), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1367,15 +1367,15 @@ static void stand_up_rc_track_left_bank( } /** rct2: 0x008A72F4 */ -static void stand_up_rc_track_right_bank( +static void StandUpRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A7304 */ -static void stand_up_rc_track_left_quarter_turn_5_25_deg_up( +static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1697,7 +1697,7 @@ static void stand_up_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008A7314 */ -static void stand_up_rc_track_right_quarter_turn_5_25_deg_up( +static void StandUpRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2019,25 +2019,25 @@ static void stand_up_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008A7324 */ -static void stand_up_rc_track_left_quarter_turn_5_25_deg_down( +static void StandUpRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - stand_up_rc_track_right_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + StandUpRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7334 */ -static void stand_up_rc_track_right_quarter_turn_5_25_deg_down( +static void StandUpRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - stand_up_rc_track_left_quarter_turn_5_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7344 */ -static void stand_up_rc_track_s_bend_left( +static void StandUpRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2186,7 +2186,7 @@ static void stand_up_rc_track_s_bend_left( } /** rct2: 0x008A7354 */ -static void stand_up_rc_track_s_bend_right( +static void StandUpRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2335,7 +2335,7 @@ static void stand_up_rc_track_s_bend_right( } /** rct2: 0x008A7364 */ -static void stand_up_rc_track_left_vertical_loop( +static void StandUpRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2618,7 +2618,7 @@ static void stand_up_rc_track_left_vertical_loop( } /** rct2: 0x008A7374 */ -static void stand_up_rc_track_right_vertical_loop( +static void StandUpRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2871,11 +2871,11 @@ static void stand_up_rc_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } /** rct2: 0x008A73B4 */ -static void stand_up_rc_track_left_quarter_turn_3( +static void StandUpRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2987,16 +2987,16 @@ static void stand_up_rc_track_left_quarter_turn_3( } /** rct2: 0x008A73C4 */ -static void stand_up_rc_track_right_quarter_turn_3( +static void StandUpRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - stand_up_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A73D4 */ -static void stand_up_rc_track_left_quarter_turn_3_bank( +static void StandUpRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3008,25 +3008,25 @@ static void stand_up_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25526), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25533), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25529), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25532), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25523), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3047,22 +3047,22 @@ static void stand_up_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25525), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25528), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25531), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25522), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3075,25 +3075,25 @@ static void stand_up_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25524), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25527), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25530), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25534), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25521), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3114,16 +3114,16 @@ static void stand_up_rc_track_left_quarter_turn_3_bank( } /** rct2: 0x008A73E4 */ -static void stand_up_rc_track_right_quarter_turn_3_bank( +static void StandUpRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - stand_up_rc_track_left_quarter_turn_3_bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A73F4 */ -static void stand_up_rc_track_left_quarter_turn_3_25_deg_up( +static void StandUpRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3270,7 +3270,7 @@ static void stand_up_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008A7404 */ -static void stand_up_rc_track_right_quarter_turn_3_25_deg_up( +static void StandUpRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3431,25 +3431,25 @@ static void stand_up_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008A7414 */ -static void stand_up_rc_track_left_quarter_turn_3_25_deg_down( +static void StandUpRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - stand_up_rc_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + StandUpRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7424 */ -static void stand_up_rc_track_right_quarter_turn_3_25_deg_down( +static void StandUpRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - stand_up_rc_track_left_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7434 */ -static void stand_up_rc_track_half_loop_up( +static void StandUpRCTrackHalfLoopUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3494,7 +3494,7 @@ static void stand_up_rc_track_half_loop_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25576), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3507,8 +3507,8 @@ static void stand_up_rc_track_half_loop_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25581), { 0, 6, height }, { 32, 2, 3 }, - { 0, 20, height }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25581), { 0, 6, height }, + { { 0, 20, height }, { 32, 2, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3544,7 +3544,7 @@ static void stand_up_rc_track_half_loop_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25588), { 16, 16, height }, - { 2, 16, 119 }, { 15, 6, height }); + { { 15, 6, height }, { 2, 16, 119 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3589,15 +3589,15 @@ static void stand_up_rc_track_half_loop_up( } /** rct2: 0x008A7444 */ -static void stand_up_rc_track_half_loop_down( +static void StandUpRCTrackHalfLoopDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_half_loop_up(session, ride, 3 - trackSequence, direction, height, trackElement); + StandUpRCTrackHalfLoopUp(session, ride, 3 - trackSequence, direction, height, trackElement); } /** rct2: 0x008A7454 */ -static void stand_up_rc_track_left_corkscrew_up( +static void StandUpRCTrackLeftCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3609,26 +3609,26 @@ static void stand_up_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25591), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25594), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25597), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25600), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } - track_paint_util_left_corkscrew_up_supports(session, direction, height); + TrackPaintUtilLeftCorkscrewUpSupports(session, direction, height); if (direction == 0 || direction == 3) { @@ -3642,22 +3642,22 @@ static void stand_up_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25592), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25595), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25598), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25601), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3669,22 +3669,22 @@ static void stand_up_rc_track_left_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25593), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25596), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25599), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25602), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -3708,7 +3708,7 @@ static void stand_up_rc_track_left_corkscrew_up( } /** rct2: 0x008A7464 */ -static void stand_up_rc_track_right_corkscrew_up( +static void StandUpRCTrackRightCorkscrewUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3720,22 +3720,22 @@ static void stand_up_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25603), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25606), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25609), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25612), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 4 }); + { { 0, 6, height + 4 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3754,22 +3754,22 @@ static void stand_up_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25604), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25607), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25610), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25613), { 0, 0, height }, - { 20, 20, 3 }, { 6, 6, height + 10 }); + { { 6, 6, height + 10 }, { 20, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3781,22 +3781,22 @@ static void stand_up_rc_track_right_corkscrew_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25605), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25608), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25611), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25614), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 24 }); + { { 6, 0, height + 24 }, { 20, 32, 3 } }); break; } @@ -3820,23 +3820,23 @@ static void stand_up_rc_track_right_corkscrew_up( } /** rct2: 0x008A7474 */ -static void stand_up_rc_track_left_corkscrew_down( +static void StandUpRCTrackLeftCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_right_corkscrew_up(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); + StandUpRCTrackRightCorkscrewUp(session, ride, 2 - trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7484 */ -static void stand_up_rc_track_right_corkscrew_down( +static void StandUpRCTrackRightCorkscrewDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - stand_up_rc_track_left_corkscrew_up(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftCorkscrewUp(session, ride, 2 - trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7734 */ -static void stand_up_rc_track_left_half_banked_helix_up_small( +static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3848,25 +3848,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25844), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25851), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25847), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25850), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25841), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3888,22 +3888,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25843), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25846), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25849), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25840), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3916,25 +3916,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25842), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25845), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25848), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25852), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25839), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3958,25 +3958,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25841), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25844), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25851), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25847), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25850), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4003,22 +4003,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25840), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25843), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25846), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25849), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4031,25 +4031,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25839), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25842), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25845), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25848), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25852), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4066,7 +4066,7 @@ static void stand_up_rc_track_left_half_banked_helix_up_small( } /** rct2: 0x008A7744 */ -static void stand_up_rc_track_right_half_banked_helix_up_small( +static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4078,25 +4078,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25825), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25828), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25831), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25834), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25838), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4118,22 +4118,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25826), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25829), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25832), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25835), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4146,25 +4146,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25827), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25830), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25837), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25833), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25836), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4188,25 +4188,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25828), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25831), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25834), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25838), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25825), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 2, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4233,22 +4233,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25829), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25832), { 0, 0, height }, - { 16, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25835), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25826), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4261,25 +4261,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25830), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25837), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25833), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25836), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25827), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4296,7 +4296,7 @@ static void stand_up_rc_track_right_half_banked_helix_up_small( } /** rct2: 0x008A7754 */ -static void stand_up_rc_track_left_half_banked_helix_down_small( +static void StandUpRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4306,11 +4306,11 @@ static void stand_up_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - stand_up_rc_track_right_half_banked_helix_up_small(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + StandUpRCTrackRightHalfBankedHelixUpSmall(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7764 */ -static void stand_up_rc_track_right_half_banked_helix_down_small( +static void StandUpRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4320,11 +4320,11 @@ static void stand_up_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - stand_up_rc_track_left_half_banked_helix_up_small(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A76F4 */ -static void stand_up_rc_track_left_half_banked_helix_up_large( +static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4336,25 +4336,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25812), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25823), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25817), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25822), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25807), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4376,22 +4376,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25811), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25816), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25821), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25806), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4406,22 +4406,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25810), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25815), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25820), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25805), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4437,22 +4437,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25809), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25814), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25819), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25804), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4467,25 +4467,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25808), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25813), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25818), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25824), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25803), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4509,25 +4509,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25807), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25812), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25823), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25817), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25822), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4554,22 +4554,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25806), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25811), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25816), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25821), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4584,22 +4584,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25805), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25810), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25815), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25820), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4615,22 +4615,22 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25804), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25809), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25814), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25819), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4645,25 +4645,25 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25803), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25808), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25813), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25818), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25824), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4680,7 +4680,7 @@ static void stand_up_rc_track_left_half_banked_helix_up_large( } /** rct2: 0x008A7704 */ -static void stand_up_rc_track_right_half_banked_helix_up_large( +static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4692,25 +4692,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25781), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25786), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25791), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25796), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25802), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4732,22 +4732,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25782), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25787), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25792), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25797), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4762,22 +4762,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25783), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25788), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25793), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25798), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4793,22 +4793,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25784), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25789), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25794), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25799), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4823,25 +4823,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25785), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height + 8 }); + { { 6, 0, height + 8 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25790), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25801), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25795), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25800), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4865,25 +4865,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25786), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25791), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25796), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25802), { 0, 0, height }, - { 1, 32, 26 }, { 27, 0, height }); + { { 27, 0, height }, { 1, 32, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25781), { 0, 0, height }, - { 20, 32, 3 }, { 6, 0, height }); + { { 6, 0, height }, { 20, 32, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 1, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -4910,22 +4910,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25787), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25792), { 0, 0, height }, - { 16, 32, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 16, 32, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25797), { 0, 0, height }, - { 16, 32, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25782), { 0, 0, height }, - { 16, 32, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4940,22 +4940,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25788), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25793), { 0, 0, height }, - { 16, 16, 1 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25798), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25783), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4971,22 +4971,22 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25789), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25794), { 0, 0, height }, - { 32, 16, 1 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 32, 16, 1 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25799), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25784), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5001,25 +5001,25 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25790), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25801), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25795), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25800), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25785), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height + 8 }); + { { 0, 6, height + 8 }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 7, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5036,7 +5036,7 @@ static void stand_up_rc_track_right_half_banked_helix_up_large( } /** rct2: 0x008A7714 */ -static void stand_up_rc_track_left_half_banked_helix_down_large( +static void StandUpRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5046,11 +5046,11 @@ static void stand_up_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - stand_up_rc_track_right_half_banked_helix_up_large(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + StandUpRCTrackRightHalfBankedHelixUpLarge(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A7724 */ -static void stand_up_rc_track_right_half_banked_helix_down_large( +static void StandUpRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5060,11 +5060,11 @@ static void stand_up_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - stand_up_rc_track_left_half_banked_helix_up_large(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + StandUpRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A7494 */ -static void stand_up_rc_track_brakes( +static void StandUpRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5081,7 +5081,7 @@ static void stand_up_rc_track_brakes( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25570), { 0, 6, height }, { 32, 20, 3 }); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -5092,7 +5092,7 @@ static void stand_up_rc_track_brakes( } /** rct2: 0x008A74A4 */ -static void stand_up_rc_track_on_ride_photo( +static void StandUpRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5104,8 +5104,8 @@ static void stand_up_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25229), { 0, 6, height }, { 32, 20, 1 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25229), { 0, 6, height }, + { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 1: PaintAddImageAsParentRotated( @@ -5113,8 +5113,8 @@ static void stand_up_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, { 32, 20, 1 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, + { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 2: PaintAddImageAsParentRotated( @@ -5122,8 +5122,8 @@ static void stand_up_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25229), { 0, 6, height }, { 32, 20, 1 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25229), { 0, 6, height }, + { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 3: PaintAddImageAsParentRotated( @@ -5131,18 +5131,18 @@ static void stand_up_rc_track_on_ride_photo( MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, { 32, 20, 1 }, - { 0, 6, height + 3 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, + { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; } - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008A74B4 */ -static void stand_up_rc_track_left_eighth_to_diag( +static void StandUpRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5154,22 +5154,22 @@ static void stand_up_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25643), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25647), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25651), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25655), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5187,22 +5187,22 @@ static void stand_up_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25644), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25648), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25652), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25656), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5217,22 +5217,22 @@ static void stand_up_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25645), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25649), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25653), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25657), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5251,28 +5251,28 @@ static void stand_up_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25646), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25650), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25654), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25658), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5287,7 +5287,7 @@ static void stand_up_rc_track_left_eighth_to_diag( } /** rct2: 0x008A74C4 */ -static void stand_up_rc_track_right_eighth_to_diag( +static void StandUpRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5299,22 +5299,22 @@ static void stand_up_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25627), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25631), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25635), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25639), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5332,22 +5332,22 @@ static void stand_up_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25628), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25632), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25636), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25640), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5362,22 +5362,22 @@ static void stand_up_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25629), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25633), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25637), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25641), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5396,28 +5396,28 @@ static void stand_up_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25630), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25634), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25638), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25642), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5432,25 +5432,25 @@ static void stand_up_rc_track_right_eighth_to_diag( } /** rct2: 0x008A74D4 */ -static void stand_up_rc_track_left_eighth_to_orthogonal( +static void StandUpRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - stand_up_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A74E4 */ -static void stand_up_rc_track_right_eighth_to_orthogonal( +static void StandUpRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - stand_up_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + StandUpRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A76A4 */ -static void stand_up_rc_track_left_eighth_bank_to_diag( +static void StandUpRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5462,22 +5462,22 @@ static void stand_up_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25675), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25679), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25683), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25687), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5495,22 +5495,22 @@ static void stand_up_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25676), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25680), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25684), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25688), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5525,22 +5525,22 @@ static void stand_up_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25677), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25681), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25685), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25689), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5559,28 +5559,28 @@ static void stand_up_rc_track_left_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25678), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25682), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25686), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25690), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5595,7 +5595,7 @@ static void stand_up_rc_track_left_eighth_bank_to_diag( } /** rct2: 0x008A76B4 */ -static void stand_up_rc_track_right_eighth_bank_to_diag( +static void StandUpRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5607,22 +5607,22 @@ static void stand_up_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25659), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25663), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25667), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25671), { 0, 0, height }, - { 32, 1, 26 }, { 0, 27, height }); + { { 0, 27, height }, { 32, 1, 26 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -5640,22 +5640,22 @@ static void stand_up_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25660), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25664), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25668), { 0, 0, height }, - { 34, 16, 0 }, { 0, 0, height + 27 }); + { { 0, 0, height + 27 }, { 34, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25672), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5670,22 +5670,22 @@ static void stand_up_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25661), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25665), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25669), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + { { 4, 4, height + 27 }, { 28, 28, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25673), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5704,28 +5704,28 @@ static void stand_up_rc_track_right_eighth_bank_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25662), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25666), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25670), { 0, 0, height }, - { 16, 18, 0 }, { 0, 16, height + 27 }); + { { 0, 16, height + 27 }, { 16, 18, 0 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25674), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5740,25 +5740,25 @@ static void stand_up_rc_track_right_eighth_bank_to_diag( } /** rct2: 0x008A76C4 */ -static void stand_up_rc_track_left_eighth_bank_to_orthogonal( +static void StandUpRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - stand_up_rc_track_right_eighth_bank_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + StandUpRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A76D4 */ -static void stand_up_rc_track_right_eighth_bank_to_orthogonal( +static void StandUpRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - stand_up_rc_track_left_eighth_bank_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + StandUpRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A74F4 */ -static void stand_up_rc_track_diag_flat( +static void StandUpRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5772,7 +5772,7 @@ static void stand_up_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25756), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5783,7 +5783,7 @@ static void stand_up_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25694), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5799,7 +5799,7 @@ static void stand_up_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25753), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5810,7 +5810,7 @@ static void stand_up_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25691), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5826,7 +5826,7 @@ static void stand_up_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25755), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5837,7 +5837,7 @@ static void stand_up_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25693), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5857,7 +5857,7 @@ static void stand_up_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25754), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5882,7 +5882,7 @@ static void stand_up_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25692), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -5904,7 +5904,7 @@ static void stand_up_rc_track_diag_flat( } /** rct2: 0x008A7524 */ -static void stand_up_rc_track_diag_25_deg_up( +static void StandUpRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5918,7 +5918,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25768), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5929,7 +5929,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25706), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5945,7 +5945,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25765), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5956,7 +5956,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25703), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5972,7 +5972,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25767), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -5983,7 +5983,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25705), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6003,7 +6003,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25766), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6028,7 +6028,7 @@ static void stand_up_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25704), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6050,7 +6050,7 @@ static void stand_up_rc_track_diag_25_deg_up( } /** rct2: 0x008A7584 */ -static void stand_up_rc_track_diag_60_deg_up( +static void StandUpRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6064,7 +6064,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25780), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6075,7 +6075,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25718), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6091,7 +6091,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25777), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6102,7 +6102,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25715), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6118,7 +6118,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25779), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6129,7 +6129,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25717), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6149,7 +6149,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25778), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6174,7 +6174,7 @@ static void stand_up_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25716), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 36, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6196,7 +6196,7 @@ static void stand_up_rc_track_diag_60_deg_up( } /** rct2: 0x008A7504 */ -static void stand_up_rc_track_diag_flat_to_25_deg_up( +static void StandUpRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6210,7 +6210,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25760), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6221,7 +6221,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25698), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6237,7 +6237,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25757), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6248,7 +6248,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25695), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6264,7 +6264,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25759), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6275,7 +6275,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25697), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6295,7 +6295,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25758), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6320,7 +6320,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25696), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6342,7 +6342,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A7564 */ -static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( +static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6356,7 +6356,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25772), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6367,7 +6367,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25710), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6383,7 +6383,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25769), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6394,7 +6394,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25707), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6410,7 +6410,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25771), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6421,7 +6421,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25709), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6441,7 +6441,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25770), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6466,7 +6466,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25708), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6488,7 +6488,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008A7574 */ -static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( +static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6502,7 +6502,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25776), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6513,7 +6513,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25714), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6529,7 +6529,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25773), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6540,7 +6540,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25711), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6556,7 +6556,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25775), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6567,7 +6567,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25713), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6587,7 +6587,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25774), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6612,7 +6612,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25712), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 21, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6634,7 +6634,7 @@ static void stand_up_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008A7514 */ -static void stand_up_rc_track_diag_25_deg_up_to_flat( +static void StandUpRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6648,7 +6648,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25764), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6659,7 +6659,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25702), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6675,7 +6675,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25761), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6686,7 +6686,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25699), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6702,7 +6702,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25763), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6713,7 +6713,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25701), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6733,7 +6733,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25762), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6758,7 +6758,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25700), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6780,7 +6780,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A7554 */ -static void stand_up_rc_track_diag_25_deg_down( +static void StandUpRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6794,7 +6794,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25766), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6805,7 +6805,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25704), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6821,7 +6821,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25767), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6832,7 +6832,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25705), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6848,7 +6848,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25765), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6859,7 +6859,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25703), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6879,7 +6879,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25768), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6904,7 +6904,7 @@ static void stand_up_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25706), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -6926,7 +6926,7 @@ static void stand_up_rc_track_diag_25_deg_down( } /** rct2: 0x008A75B4 */ -static void stand_up_rc_track_diag_60_deg_down( +static void StandUpRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6940,7 +6940,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25778), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6951,7 +6951,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25716), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6967,7 +6967,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25779), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6978,7 +6978,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25717), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -6994,7 +6994,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25777), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7005,7 +7005,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25715), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7025,7 +7025,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25780), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7050,7 +7050,7 @@ static void stand_up_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25718), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 28, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7072,7 +7072,7 @@ static void stand_up_rc_track_diag_60_deg_down( } /** rct2: 0x008A7534 */ -static void stand_up_rc_track_diag_flat_to_25_deg_down( +static void StandUpRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7086,7 +7086,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25762), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7097,7 +7097,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25700), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7112,7 +7112,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25763), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7123,7 +7123,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25701), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7138,7 +7138,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25761), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7149,7 +7149,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25699), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7168,7 +7168,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25764), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7193,7 +7193,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25702), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7216,7 +7216,7 @@ static void stand_up_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A7594 */ -static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( +static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7230,7 +7230,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25774), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -7241,7 +7241,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25712), { -16, -16, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } } @@ -7257,7 +7257,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25775), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7268,7 +7268,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25713), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7284,7 +7284,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25773), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7295,7 +7295,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25711), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7315,7 +7315,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25776), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7340,7 +7340,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25714), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 17, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7362,7 +7362,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008A75A4 */ -static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( +static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7376,7 +7376,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25770), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7387,7 +7387,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25708), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7403,7 +7403,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25771), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7414,7 +7414,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25709), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7430,7 +7430,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25769), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7441,7 +7441,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25707), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7461,7 +7461,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25772), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7486,7 +7486,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25710), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7508,7 +7508,7 @@ static void stand_up_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008A7544 */ -static void stand_up_rc_track_diag_25_deg_down_to_flat( +static void StandUpRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7522,7 +7522,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25758), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7533,7 +7533,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25696), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7549,7 +7549,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25759), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7560,7 +7560,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25697), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7576,7 +7576,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25757), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7587,7 +7587,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25695), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -7607,7 +7607,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25760), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7632,7 +7632,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25698), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7654,7 +7654,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A75E4 */ -static void stand_up_rc_track_diag_flat_to_left_bank( +static void StandUpRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7666,7 +7666,7 @@ static void stand_up_rc_track_diag_flat_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25726), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7679,10 +7679,10 @@ static void stand_up_rc_track_diag_flat_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25723), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25727), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7695,7 +7695,7 @@ static void stand_up_rc_track_diag_flat_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25725), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7712,7 +7712,7 @@ static void stand_up_rc_track_diag_flat_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25724), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7733,7 +7733,7 @@ static void stand_up_rc_track_diag_flat_to_left_bank( } /** rct2: 0x008A75F4 */ -static void stand_up_rc_track_diag_flat_to_right_bank( +static void StandUpRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7745,7 +7745,7 @@ static void stand_up_rc_track_diag_flat_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25731), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7758,7 +7758,7 @@ static void stand_up_rc_track_diag_flat_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25728), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7771,10 +7771,10 @@ static void stand_up_rc_track_diag_flat_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25730), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25732), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7791,7 +7791,7 @@ static void stand_up_rc_track_diag_flat_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25729), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7812,7 +7812,7 @@ static void stand_up_rc_track_diag_flat_to_right_bank( } /** rct2: 0x008A7604 */ -static void stand_up_rc_track_diag_left_bank_to_flat( +static void StandUpRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7824,7 +7824,7 @@ static void stand_up_rc_track_diag_left_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25729), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7837,10 +7837,10 @@ static void stand_up_rc_track_diag_left_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25730), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25732), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7853,7 +7853,7 @@ static void stand_up_rc_track_diag_left_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25728), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7870,7 +7870,7 @@ static void stand_up_rc_track_diag_left_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25731), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7891,7 +7891,7 @@ static void stand_up_rc_track_diag_left_bank_to_flat( } /** rct2: 0x008A7614 */ -static void stand_up_rc_track_diag_right_bank_to_flat( +static void StandUpRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7903,7 +7903,7 @@ static void stand_up_rc_track_diag_right_bank_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25724), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7916,7 +7916,7 @@ static void stand_up_rc_track_diag_right_bank_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25725), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7929,10 +7929,10 @@ static void stand_up_rc_track_diag_right_bank_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25723), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25727), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7949,7 +7949,7 @@ static void stand_up_rc_track_diag_right_bank_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25726), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -7970,7 +7970,7 @@ static void stand_up_rc_track_diag_right_bank_to_flat( } /** rct2: 0x008A7644 */ -static void stand_up_rc_track_diag_left_bank_to_25_deg_up( +static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7982,7 +7982,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25746), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -7995,10 +7995,10 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25743), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25747), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8011,7 +8011,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25745), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8028,7 +8028,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25744), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8049,7 +8049,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_up( } /** rct2: 0x008A7654 */ -static void stand_up_rc_track_diag_right_bank_to_25_deg_up( +static void StandUpRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8061,7 +8061,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25751), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8074,7 +8074,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25748), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8087,10 +8087,10 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25750), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25752), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8107,7 +8107,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25749), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8128,7 +8128,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_up( } /** rct2: 0x008A7624 */ -static void stand_up_rc_track_diag_25_deg_up_to_left_bank( +static void StandUpRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8140,7 +8140,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25736), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8153,10 +8153,10 @@ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25733), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25737), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8169,7 +8169,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25735), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8186,7 +8186,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25734), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8207,7 +8207,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_left_bank( } /** rct2: 0x008A7634 */ -static void stand_up_rc_track_diag_25_deg_up_to_right_bank( +static void StandUpRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8219,7 +8219,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25741), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8232,7 +8232,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25738), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8245,10 +8245,10 @@ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25740), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25742), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8265,7 +8265,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25739), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8286,7 +8286,7 @@ static void stand_up_rc_track_diag_25_deg_up_to_right_bank( } /** rct2: 0x008A7664 */ -static void stand_up_rc_track_diag_left_bank_to_25_deg_down( +static void StandUpRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8298,7 +8298,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25739), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8310,10 +8310,10 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25740), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25742), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8325,7 +8325,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25738), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8341,7 +8341,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25741), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8363,7 +8363,7 @@ static void stand_up_rc_track_diag_left_bank_to_25_deg_down( } /** rct2: 0x008A7674 */ -static void stand_up_rc_track_diag_right_bank_to_25_deg_down( +static void StandUpRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8375,7 +8375,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25734), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8387,7 +8387,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25735), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8399,10 +8399,10 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16676), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16680), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8418,7 +8418,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25736), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8440,7 +8440,7 @@ static void stand_up_rc_track_diag_right_bank_to_25_deg_down( } /** rct2: 0x008A7684 */ -static void stand_up_rc_track_diag_25_deg_down_to_left_bank( +static void StandUpRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8452,7 +8452,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25749), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8465,10 +8465,10 @@ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25750), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25752), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8481,7 +8481,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25748), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8498,7 +8498,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25751), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8519,7 +8519,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_left_bank( } /** rct2: 0x008A7694 */ -static void stand_up_rc_track_diag_25_deg_down_to_right_bank( +static void StandUpRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8531,7 +8531,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25744), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8544,7 +8544,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25745), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8557,10 +8557,10 @@ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25743), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25747), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + { { -16, -16, height + 35 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8577,7 +8577,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25746), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8598,7 +8598,7 @@ static void stand_up_rc_track_diag_25_deg_down_to_right_bank( } /** rct2: 0x008A75C4 */ -static void stand_up_rc_track_diag_left_bank( +static void StandUpRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8610,7 +8610,7 @@ static void stand_up_rc_track_diag_left_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25722), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8623,7 +8623,7 @@ static void stand_up_rc_track_diag_left_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25719), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8636,7 +8636,7 @@ static void stand_up_rc_track_diag_left_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25721), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8653,7 +8653,7 @@ static void stand_up_rc_track_diag_left_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25720), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8674,7 +8674,7 @@ static void stand_up_rc_track_diag_left_bank( } /** rct2: 0x008A75D4 */ -static void stand_up_rc_track_diag_right_bank( +static void StandUpRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8686,7 +8686,7 @@ static void stand_up_rc_track_diag_right_bank( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25720), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8699,7 +8699,7 @@ static void stand_up_rc_track_diag_right_bank( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25721), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8712,7 +8712,7 @@ static void stand_up_rc_track_diag_right_bank( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25719), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + { { -16, -16, height + 27 }, { 32, 32, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -8729,7 +8729,7 @@ static void stand_up_rc_track_diag_right_bank( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25722), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -8750,16 +8750,16 @@ static void stand_up_rc_track_diag_right_bank( } /** rct2: 0x008A76E4 */ -static void stand_up_rc_track_block_brakes( +static void StandUpRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_StandUpBlockBrakeImages[direction][isClosed]), { 0, 6, height }, { 32, 20, 3 }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -8769,212 +8769,212 @@ static void stand_up_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionStandUpRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return stand_up_rc_track_flat; + return StandUpRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return stand_up_rc_track_station; + return StandUpRCTrackStation; case TrackElemType::Up25: - return stand_up_rc_track_25_deg_up; + return StandUpRCTrack25DegUp; case TrackElemType::Up60: - return stand_up_rc_track_60_deg_up; + return StandUpRCTrack60DegUp; case TrackElemType::FlatToUp25: - return stand_up_rc_track_flat_to_25_deg_up; + return StandUpRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return stand_up_rc_track_25_deg_up_to_60_deg_up; + return StandUpRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return stand_up_rc_track_60_deg_up_to_25_deg_up; + return StandUpRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return stand_up_rc_track_25_deg_up_to_flat; + return StandUpRCTrack25DegUpToFlat; case TrackElemType::Down25: - return stand_up_rc_track_25_deg_down; + return StandUpRCTrack25DegDown; case TrackElemType::Down60: - return stand_up_rc_track_60_deg_down; + return StandUpRCTrack60DegDown; case TrackElemType::FlatToDown25: - return stand_up_rc_track_flat_to_25_deg_down; + return StandUpRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return stand_up_rc_track_25_deg_down_to_60_deg_down; + return StandUpRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return stand_up_rc_track_60_deg_down_to_25_deg_down; + return StandUpRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return stand_up_rc_track_25_deg_down_to_flat; + return StandUpRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return stand_up_rc_track_left_quarter_turn_5; + return StandUpRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return stand_up_rc_track_right_quarter_turn_5; + return StandUpRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return stand_up_rc_track_flat_to_left_bank; + return StandUpRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return stand_up_rc_track_flat_to_right_bank; + return StandUpRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return stand_up_rc_track_left_bank_to_flat; + return StandUpRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return stand_up_rc_track_right_bank_to_flat; + return StandUpRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return stand_up_rc_track_banked_left_quarter_turn_5; + return StandUpRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return stand_up_rc_track_banked_right_quarter_turn_5; + return StandUpRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return stand_up_rc_track_left_bank_to_25_deg_up; + return StandUpRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return stand_up_rc_track_right_bank_to_25_deg_up; + return StandUpRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return stand_up_rc_track_25_deg_up_to_left_bank; + return StandUpRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return stand_up_rc_track_25_deg_up_to_right_bank; + return StandUpRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return stand_up_rc_track_left_bank_to_25_deg_down; + return StandUpRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return stand_up_rc_track_right_bank_to_25_deg_down; + return StandUpRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return stand_up_rc_track_25_deg_down_to_left_bank; + return StandUpRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return stand_up_rc_track_25_deg_down_to_right_bank; + return StandUpRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return stand_up_rc_track_left_bank; + return StandUpRCTrackLeftBank; case TrackElemType::RightBank: - return stand_up_rc_track_right_bank; + return StandUpRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return stand_up_rc_track_left_quarter_turn_5_25_deg_up; + return StandUpRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return stand_up_rc_track_right_quarter_turn_5_25_deg_up; + return StandUpRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return stand_up_rc_track_left_quarter_turn_5_25_deg_down; + return StandUpRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return stand_up_rc_track_right_quarter_turn_5_25_deg_down; + return StandUpRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return stand_up_rc_track_s_bend_left; + return StandUpRCTrackSBendLeft; case TrackElemType::SBendRight: - return stand_up_rc_track_s_bend_right; + return StandUpRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return stand_up_rc_track_left_vertical_loop; + return StandUpRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return stand_up_rc_track_right_vertical_loop; + return StandUpRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return stand_up_rc_track_left_quarter_turn_3; + return StandUpRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return stand_up_rc_track_right_quarter_turn_3; + return StandUpRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return stand_up_rc_track_left_quarter_turn_3_bank; + return StandUpRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return stand_up_rc_track_right_quarter_turn_3_bank; + return StandUpRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return stand_up_rc_track_left_quarter_turn_3_25_deg_up; + return StandUpRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return stand_up_rc_track_right_quarter_turn_3_25_deg_up; + return StandUpRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return stand_up_rc_track_left_quarter_turn_3_25_deg_down; + return StandUpRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return stand_up_rc_track_right_quarter_turn_3_25_deg_down; + return StandUpRCTrackRightQuarterTurn325DegDown; case TrackElemType::HalfLoopUp: - return stand_up_rc_track_half_loop_up; + return StandUpRCTrackHalfLoopUp; case TrackElemType::HalfLoopDown: - return stand_up_rc_track_half_loop_down; + return StandUpRCTrackHalfLoopDown; case TrackElemType::LeftCorkscrewUp: - return stand_up_rc_track_left_corkscrew_up; + return StandUpRCTrackLeftCorkscrewUp; case TrackElemType::RightCorkscrewUp: - return stand_up_rc_track_right_corkscrew_up; + return StandUpRCTrackRightCorkscrewUp; case TrackElemType::LeftCorkscrewDown: - return stand_up_rc_track_left_corkscrew_down; + return StandUpRCTrackLeftCorkscrewDown; case TrackElemType::RightCorkscrewDown: - return stand_up_rc_track_right_corkscrew_down; + return StandUpRCTrackRightCorkscrewDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return stand_up_rc_track_left_half_banked_helix_up_small; + return StandUpRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return stand_up_rc_track_right_half_banked_helix_up_small; + return StandUpRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return stand_up_rc_track_left_half_banked_helix_down_small; + return StandUpRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return stand_up_rc_track_right_half_banked_helix_down_small; + return StandUpRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return stand_up_rc_track_left_half_banked_helix_up_large; + return StandUpRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return stand_up_rc_track_right_half_banked_helix_up_large; + return StandUpRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return stand_up_rc_track_left_half_banked_helix_down_large; + return StandUpRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return stand_up_rc_track_right_half_banked_helix_down_large; + return StandUpRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::Brakes: - return stand_up_rc_track_brakes; + return StandUpRCTrackBrakes; case TrackElemType::OnRidePhoto: - return stand_up_rc_track_on_ride_photo; + return StandUpRCTrackOnRidePhoto; case TrackElemType::LeftEighthToDiag: - return stand_up_rc_track_left_eighth_to_diag; + return StandUpRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return stand_up_rc_track_right_eighth_to_diag; + return StandUpRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return stand_up_rc_track_left_eighth_to_orthogonal; + return StandUpRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return stand_up_rc_track_right_eighth_to_orthogonal; + return StandUpRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return stand_up_rc_track_left_eighth_bank_to_diag; + return StandUpRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return stand_up_rc_track_right_eighth_bank_to_diag; + return StandUpRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return stand_up_rc_track_left_eighth_bank_to_orthogonal; + return StandUpRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return stand_up_rc_track_right_eighth_bank_to_orthogonal; + return StandUpRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return stand_up_rc_track_diag_flat; + return StandUpRCTrackDiagFlat; case TrackElemType::DiagUp25: - return stand_up_rc_track_diag_25_deg_up; + return StandUpRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return stand_up_rc_track_diag_60_deg_up; + return StandUpRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return stand_up_rc_track_diag_flat_to_25_deg_up; + return StandUpRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return stand_up_rc_track_diag_25_deg_up_to_60_deg_up; + return StandUpRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return stand_up_rc_track_diag_60_deg_up_to_25_deg_up; + return StandUpRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return stand_up_rc_track_diag_25_deg_up_to_flat; + return StandUpRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return stand_up_rc_track_diag_25_deg_down; + return StandUpRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return stand_up_rc_track_diag_60_deg_down; + return StandUpRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return stand_up_rc_track_diag_flat_to_25_deg_down; + return StandUpRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return stand_up_rc_track_diag_25_deg_down_to_60_deg_down; + return StandUpRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return stand_up_rc_track_diag_60_deg_down_to_25_deg_down; + return StandUpRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return stand_up_rc_track_diag_25_deg_down_to_flat; + return StandUpRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return stand_up_rc_track_diag_flat_to_left_bank; + return StandUpRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return stand_up_rc_track_diag_flat_to_right_bank; + return StandUpRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return stand_up_rc_track_diag_left_bank_to_flat; + return StandUpRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return stand_up_rc_track_diag_right_bank_to_flat; + return StandUpRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return stand_up_rc_track_diag_left_bank_to_25_deg_up; + return StandUpRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return stand_up_rc_track_diag_right_bank_to_25_deg_up; + return StandUpRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return stand_up_rc_track_diag_25_deg_up_to_left_bank; + return StandUpRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return stand_up_rc_track_diag_25_deg_up_to_right_bank; + return StandUpRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return stand_up_rc_track_diag_left_bank_to_25_deg_down; + return StandUpRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return stand_up_rc_track_diag_right_bank_to_25_deg_down; + return StandUpRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return stand_up_rc_track_diag_25_deg_down_to_left_bank; + return StandUpRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return stand_up_rc_track_diag_25_deg_down_to_right_bank; + return StandUpRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return stand_up_rc_track_diag_left_bank; + return StandUpRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return stand_up_rc_track_diag_right_bank; + return StandUpRCTrackDiagRightBank; case TrackElemType::BlockBrakes: - return stand_up_rc_track_block_brakes; + return StandUpRCTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/Steeplechase.cpp b/src/openrct2/ride/coaster/Steeplechase.cpp index 9b30f74fac..84b432c66e 100644 --- a/src/openrct2/ride/coaster/Steeplechase.cpp +++ b/src/openrct2/ride/coaster/Steeplechase.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008A59A8 */ -static void steeplechase_track_flat( +static void SteeplechaseTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -67,7 +67,7 @@ static void steeplechase_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void steeplechase_track_station( +static void SteeplechaseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -80,19 +80,19 @@ static void steeplechase_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height - 2 }, - { 32, 28, 3 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 6, height }, - { 32, 20, 3 }, { 0, 0, height }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + { { 0, 0, height }, { 32, 20, 3 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A59B8 */ -static void steeplechase_track_25_deg_up( +static void SteeplechaseTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -166,7 +166,7 @@ static void steeplechase_track_25_deg_up( } /** rct2: 0x008A59C8 */ -static void steeplechase_track_flat_to_25_deg_up( +static void SteeplechaseTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -240,7 +240,7 @@ static void steeplechase_track_flat_to_25_deg_up( } /** rct2: 0x008A59D8 */ -static void steeplechase_track_25_deg_up_to_flat( +static void SteeplechaseTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -314,31 +314,31 @@ static void steeplechase_track_25_deg_up_to_flat( } /** rct2: 0x008A59E8 */ -static void steeplechase_track_25_deg_down( +static void SteeplechaseTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - steeplechase_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SteeplechaseTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A59F8 */ -static void steeplechase_track_flat_to_25_deg_down( +static void SteeplechaseTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - steeplechase_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SteeplechaseTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5A08 */ -static void steeplechase_track_25_deg_down_to_flat( +static void SteeplechaseTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - steeplechase_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SteeplechaseTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5A18 */ -static void steeplechase_track_left_quarter_turn_5( +static void SteeplechaseTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -527,16 +527,16 @@ static void steeplechase_track_left_quarter_turn_5( } /** rct2: 0x008A5A28 */ -static void steeplechase_track_right_quarter_turn_5( +static void SteeplechaseTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - steeplechase_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SteeplechaseTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A5A38 */ -static void steeplechase_track_s_bend_left( +static void SteeplechaseTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -699,7 +699,7 @@ static void steeplechase_track_s_bend_left( } /** rct2: 0x008A5A48 */ -static void steeplechase_track_s_bend_right( +static void SteeplechaseTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -862,7 +862,7 @@ static void steeplechase_track_s_bend_right( } /** rct2: 0x008A5A88 */ -static void steeplechase_track_left_quarter_turn_3( +static void SteeplechaseTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -988,16 +988,16 @@ static void steeplechase_track_left_quarter_turn_3( } /** rct2: 0x008A5A98 */ -static void steeplechase_track_right_quarter_turn_3( +static void SteeplechaseTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - steeplechase_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SteeplechaseTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A5AA8 */ -static void steeplechase_track_brakes( +static void SteeplechaseTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1023,7 +1023,7 @@ static void steeplechase_track_brakes( } /** rct2: 0x008A5AD8 */ -static void steeplechase_track_left_eighth_to_diag( +static void SteeplechaseTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1035,28 +1035,28 @@ static void steeplechase_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28725), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28729), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28733), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28737), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1075,22 +1075,22 @@ static void steeplechase_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28726), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28730), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28734), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28738), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1105,22 +1105,22 @@ static void steeplechase_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28727), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28731), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28735), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28739), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1139,28 +1139,28 @@ static void steeplechase_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28728), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28732), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28736), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28740), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1175,7 +1175,7 @@ static void steeplechase_track_left_eighth_to_diag( } /** rct2: 0x008A5AE8 */ -static void steeplechase_track_right_eighth_to_diag( +static void SteeplechaseTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1187,28 +1187,28 @@ static void steeplechase_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28709), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28713), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28717), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28721), { 0, 0, height }, - { 32, 20, 3 }, { 0, 6, height }); + { { 0, 6, height }, { 32, 20, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1227,22 +1227,22 @@ static void steeplechase_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28710), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28714), { 0, 0, height }, - { 32, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28718), { 0, 0, height }, - { 34, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28722), { 0, 0, height }, - { 32, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1257,22 +1257,22 @@ static void steeplechase_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28711), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28715), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28719), { 0, 0, height }, - { 28, 28, 3 }, { 4, 4, height }); + { { 4, 4, height }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28723), { 0, 0, height }, - { 16, 16, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1291,28 +1291,28 @@ static void steeplechase_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28712), { 0, 0, height }, - { 16, 16, 3 }, { 16, 0, height }); + { { 16, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28716), { 0, 0, height }, - { 16, 16, 3 }, { 0, 0, height }); + { { 0, 0, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28720), { 0, 0, height }, - { 16, 18, 3 }, { 0, 16, height }); + { { 0, 16, height }, { 16, 18, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28724), { 0, 0, height }, - { 16, 16, 3 }, { 16, 16, height }); + { { 16, 16, height }, { 16, 16, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1327,25 +1327,25 @@ static void steeplechase_track_right_eighth_to_diag( } /** rct2: 0x008A5AF8 */ -static void steeplechase_track_left_eighth_to_orthogonal( +static void SteeplechaseTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - steeplechase_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SteeplechaseTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5B08 */ -static void steeplechase_track_right_eighth_to_orthogonal( +static void SteeplechaseTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - steeplechase_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + SteeplechaseTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A5AC8 */ -static void steeplechase_track_diag_flat( +static void SteeplechaseTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1359,7 +1359,7 @@ static void steeplechase_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28760), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1370,7 +1370,7 @@ static void steeplechase_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28744), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1386,7 +1386,7 @@ static void steeplechase_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28757), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1397,7 +1397,7 @@ static void steeplechase_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28741), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1413,7 +1413,7 @@ static void steeplechase_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28759), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1424,7 +1424,7 @@ static void steeplechase_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28743), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1444,7 +1444,7 @@ static void steeplechase_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28758), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1469,7 +1469,7 @@ static void steeplechase_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28742), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1491,7 +1491,7 @@ static void steeplechase_track_diag_flat( } /** rct2: 0x008A5B38 */ -static void steeplechase_track_diag_25_deg_up( +static void SteeplechaseTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1505,7 +1505,7 @@ static void steeplechase_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28772), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1516,7 +1516,7 @@ static void steeplechase_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28756), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1532,7 +1532,7 @@ static void steeplechase_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28769), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1543,7 +1543,7 @@ static void steeplechase_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28753), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1559,7 +1559,7 @@ static void steeplechase_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28771), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1570,7 +1570,7 @@ static void steeplechase_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28755), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1590,7 +1590,7 @@ static void steeplechase_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28770), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1615,7 +1615,7 @@ static void steeplechase_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28754), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1637,7 +1637,7 @@ static void steeplechase_track_diag_25_deg_up( } /** rct2: 0x008A5B18 */ -static void steeplechase_track_diag_flat_to_25_deg_up( +static void SteeplechaseTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1651,7 +1651,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28764), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1662,7 +1662,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28748), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1678,7 +1678,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28761), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1689,7 +1689,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28745), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1705,7 +1705,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28763), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1716,7 +1716,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28747), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1736,7 +1736,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28762), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1761,7 +1761,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28746), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1783,7 +1783,7 @@ static void steeplechase_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A5B28 */ -static void steeplechase_track_diag_25_deg_up_to_flat( +static void SteeplechaseTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1797,7 +1797,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28768), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1808,7 +1808,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28752), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1824,7 +1824,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28765), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1835,7 +1835,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28749), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1851,7 +1851,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28767), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1862,7 +1862,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28751), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1882,7 +1882,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28766), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1907,7 +1907,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28750), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -1929,7 +1929,7 @@ static void steeplechase_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A5B68 */ -static void steeplechase_track_diag_25_deg_down( +static void SteeplechaseTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1943,7 +1943,7 @@ static void steeplechase_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28770), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1954,7 +1954,7 @@ static void steeplechase_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28754), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1970,7 +1970,7 @@ static void steeplechase_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28771), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1981,7 +1981,7 @@ static void steeplechase_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28755), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -1997,7 +1997,7 @@ static void steeplechase_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28769), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2008,7 +2008,7 @@ static void steeplechase_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28753), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2028,7 +2028,7 @@ static void steeplechase_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28772), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2053,7 +2053,7 @@ static void steeplechase_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28756), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2075,7 +2075,7 @@ static void steeplechase_track_diag_25_deg_down( } /** rct2: 0x008A5B48 */ -static void steeplechase_track_diag_flat_to_25_deg_down( +static void SteeplechaseTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2089,7 +2089,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28766), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2100,7 +2100,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28750), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2115,7 +2115,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28767), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2126,7 +2126,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28751), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2141,7 +2141,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28765), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2152,7 +2152,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28749), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2171,7 +2171,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28768), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2196,7 +2196,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28752), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2219,7 +2219,7 @@ static void steeplechase_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A5B58 */ -static void steeplechase_track_diag_25_deg_down_to_flat( +static void SteeplechaseTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2233,7 +2233,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28762), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2244,7 +2244,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28746), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2260,7 +2260,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28763), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2271,7 +2271,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28747), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2287,7 +2287,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28761), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2298,7 +2298,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28745), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); break; } } @@ -2318,7 +2318,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28764), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2343,7 +2343,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(28748), { -16, -16, height }, - { 32, 32, 3 }, { -16, -16, height }); + { { -16, -16, height }, { 32, 32, 3 } }); MetalBSupportsPaintSetup( session, METAL_SUPPORTS_STICK_ALT, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -2365,7 +2365,7 @@ static void steeplechase_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A5AB8 */ -static void steeplechase_track_block_brakes( +static void SteeplechaseTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2390,66 +2390,66 @@ static void steeplechase_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSteeplechase(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return steeplechase_track_flat; + return SteeplechaseTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return steeplechase_track_station; + return SteeplechaseTrackStation; case TrackElemType::Up25: - return steeplechase_track_25_deg_up; + return SteeplechaseTrack25DegUp; case TrackElemType::FlatToUp25: - return steeplechase_track_flat_to_25_deg_up; + return SteeplechaseTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return steeplechase_track_25_deg_up_to_flat; + return SteeplechaseTrack25DegUpToFlat; case TrackElemType::Down25: - return steeplechase_track_25_deg_down; + return SteeplechaseTrack25DegDown; case TrackElemType::FlatToDown25: - return steeplechase_track_flat_to_25_deg_down; + return SteeplechaseTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return steeplechase_track_25_deg_down_to_flat; + return SteeplechaseTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return steeplechase_track_left_quarter_turn_5; + return SteeplechaseTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return steeplechase_track_right_quarter_turn_5; + return SteeplechaseTrackRightQuarterTurn5; case TrackElemType::SBendLeft: - return steeplechase_track_s_bend_left; + return SteeplechaseTrackSBendLeft; case TrackElemType::SBendRight: - return steeplechase_track_s_bend_right; + return SteeplechaseTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return steeplechase_track_left_quarter_turn_3; + return SteeplechaseTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return steeplechase_track_right_quarter_turn_3; + return SteeplechaseTrackRightQuarterTurn3; case TrackElemType::Brakes: - return steeplechase_track_brakes; + return SteeplechaseTrackBrakes; case TrackElemType::LeftEighthToDiag: - return steeplechase_track_left_eighth_to_diag; + return SteeplechaseTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return steeplechase_track_right_eighth_to_diag; + return SteeplechaseTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return steeplechase_track_left_eighth_to_orthogonal; + return SteeplechaseTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return steeplechase_track_right_eighth_to_orthogonal; + return SteeplechaseTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return steeplechase_track_diag_flat; + return SteeplechaseTrackDiagFlat; case TrackElemType::DiagUp25: - return steeplechase_track_diag_25_deg_up; + return SteeplechaseTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return steeplechase_track_diag_flat_to_25_deg_up; + return SteeplechaseTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return steeplechase_track_diag_25_deg_up_to_flat; + return SteeplechaseTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return steeplechase_track_diag_25_deg_down; + return SteeplechaseTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return steeplechase_track_diag_flat_to_25_deg_down; + return SteeplechaseTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return steeplechase_track_diag_25_deg_down_to_flat; + return SteeplechaseTrackDiag25DegDownToFlat; case TrackElemType::BlockBrakes: - return steeplechase_track_block_brakes; + return SteeplechaseTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp index 5e2cfc08be..ebc1f3a724 100644 --- a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include "../TrackPaint.h" /** rct2: 0x008A8958 */ -static void suspended_swinging_rc_track_flat( +static void SuspendedSwingingRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -31,13 +31,13 @@ static void suspended_swinging_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25963), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25964), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -49,20 +49,20 @@ static void suspended_swinging_rc_track_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25961), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25962), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -72,7 +72,7 @@ static void suspended_swinging_rc_track_flat( } /** rct2: 0x008A8AA8, 0x008A8AB8, 0x008A8AC8 */ -static void suspended_swinging_rc_track_station( +static void SuspendedSwingingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -85,22 +85,22 @@ static void suspended_swinging_rc_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x008A8968 */ -static void suspended_swinging_rc_track_25_deg_up( +static void SuspendedSwingingRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -111,22 +111,22 @@ static void suspended_swinging_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26001), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26002), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26003), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26004), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } } @@ -137,29 +137,29 @@ static void suspended_swinging_rc_track_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25973), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25974), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25975), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25976), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 45 }); + { { 0, 6, height + 45 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -194,7 +194,7 @@ static void suspended_swinging_rc_track_25_deg_up( } /** rct2: 0x008A8978 */ -static void suspended_swinging_rc_track_60_deg_up( +static void SuspendedSwingingRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -202,23 +202,23 @@ static void suspended_swinging_rc_track_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25989), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 93 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25989), { 0, 0, height + 29 }, + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25990), { 0, 0, height + 29 }, { 32, 2, 81 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25990), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25991), { 0, 0, height + 29 }, { 32, 2, 81 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25991), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 81 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25992), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 93 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25992), { 0, 0, height + 29 }, + { { 0, 6, height + 93 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -235,7 +235,7 @@ static void suspended_swinging_rc_track_60_deg_up( } /** rct2: 0x008A8988 */ -static void suspended_swinging_rc_track_flat_to_25_deg_up( +static void SuspendedSwingingRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -246,22 +246,22 @@ static void suspended_swinging_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25993), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25994), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25995), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25996), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -272,29 +272,29 @@ static void suspended_swinging_rc_track_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25965), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25966), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25967), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25968), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -329,7 +329,7 @@ static void suspended_swinging_rc_track_flat_to_25_deg_up( } /** rct2: 0x008A8998 */ -static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up( +static void SuspendedSwingingRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -337,29 +337,29 @@ static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25977), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25977), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25981), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25981), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25978), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25978), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25982), { 0, 0, height + 29 }, { 32, 10, 49 }, - { 0, 10, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25982), { 0, 0, height + 29 }, + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25979), { 0, 0, height + 29 }, { 32, 2, 49 }, - { 0, 4, height + 11 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25979), { 0, 0, height + 29 }, + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25980), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 61 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25980), { 0, 0, height + 29 }, + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } if (direction == 0 || direction == 3) @@ -376,7 +376,7 @@ static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up( } /** rct2: 0x008A89A8 */ -static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up( +static void SuspendedSwingingRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -387,28 +387,28 @@ static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25983), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25987), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26090), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25988), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25985), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25986), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } @@ -419,35 +419,35 @@ static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25983), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25987), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25984), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25988), { 0, 0, height + 29 }, - { 32, 10, 49 }, { 0, 10, height + 11 }); + { { 0, 10, height + 11 }, { 32, 10, 49 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25985), { 0, 0, height + 29 }, - { 32, 2, 49 }, { 0, 4, height + 11 }); + { { 0, 4, height + 11 }, { 32, 2, 49 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25986), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 61 }); + { { 0, 6, height + 61 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -482,7 +482,7 @@ static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up( } /** rct2: 0x008A89B8 */ -static void suspended_swinging_rc_track_25_deg_up_to_flat( +static void SuspendedSwingingRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -493,22 +493,22 @@ static void suspended_swinging_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25997), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25998), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25999), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26000), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -519,29 +519,29 @@ static void suspended_swinging_rc_track_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25969), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25970), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25971), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25972), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 37 }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -576,55 +576,55 @@ static void suspended_swinging_rc_track_25_deg_up_to_flat( } /** rct2: 0x008A89C8 */ -static void suspended_swinging_rc_track_25_deg_down( +static void SuspendedSwingingRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_swinging_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A89D8 */ -static void suspended_swinging_rc_track_60_deg_down( +static void SuspendedSwingingRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_swinging_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A89E8 */ -static void suspended_swinging_rc_track_flat_to_25_deg_down( +static void SuspendedSwingingRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_swinging_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A89F8 */ -static void suspended_swinging_rc_track_25_deg_down_to_60_deg_down( +static void SuspendedSwingingRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_swinging_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A8A08 */ -static void suspended_swinging_rc_track_60_deg_down_to_25_deg_down( +static void SuspendedSwingingRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_swinging_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A8A18 */ -static void suspended_swinging_rc_track_25_deg_down_to_flat( +static void SuspendedSwingingRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_swinging_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A8A28 */ -static void suspended_swinging_rc_track_left_quarter_turn_5( +static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -636,22 +636,22 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26014), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26019), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26024), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26009), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -685,12 +685,12 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26023), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26008), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -705,17 +705,17 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26012), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26017), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26022), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -736,7 +736,7 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26011), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -751,7 +751,7 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26006), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -766,22 +766,22 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26010), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26015), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26020), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26005), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -805,16 +805,16 @@ static void suspended_swinging_rc_track_left_quarter_turn_5( } /** rct2: 0x008A8A38 */ -static void suspended_swinging_rc_track_right_quarter_turn_5( +static void SuspendedSwingingRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - suspended_swinging_rc_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SuspendedSwingingRCTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A8A48 */ -static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up( +static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -941,7 +941,7 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26115), { 16, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 37 }); + { { 16, 0, height + 37 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -995,7 +995,7 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up( } /** rct2: 0x008A8A58 */ -static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up( +static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1107,7 +1107,7 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26080), { 16, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 37 }); + { { 16, 0, height + 37 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1176,27 +1176,25 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up( } /** rct2: 0x008A8A68 */ -static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_down( +static void SuspendedSwingingRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + SuspendedSwingingRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A8A78 */ -static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_down( +static void SuspendedSwingingRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SuspendedSwingingRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A8A88 */ -static void suspended_swinging_rc_track_s_bend_left( +static void SuspendedSwingingRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1367,7 +1365,7 @@ static void suspended_swinging_rc_track_s_bend_left( } /** rct2: 0x008A8A98 */ -static void suspended_swinging_rc_track_s_bend_right( +static void SuspendedSwingingRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1538,7 +1536,7 @@ static void suspended_swinging_rc_track_s_bend_right( } /** rct2: 0x008A8AD8 */ -static void suspended_swinging_rc_track_left_quarter_turn_3( +static void SuspendedSwingingRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1550,22 +1548,22 @@ static void suspended_swinging_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26070), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26073), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26076), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26067), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -1589,7 +1587,7 @@ static void suspended_swinging_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26069), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1599,12 +1597,12 @@ static void suspended_swinging_rc_track_left_quarter_turn_3( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26075), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26066), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1617,22 +1615,22 @@ static void suspended_swinging_rc_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26068), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26071), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26074), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26065), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 29 }); + { { 6, 0, height + 29 }, { 20, 32, 3 } }); break; } @@ -1656,16 +1654,16 @@ static void suspended_swinging_rc_track_left_quarter_turn_3( } /** rct2: 0x008A8AE8 */ -static void suspended_swinging_rc_track_right_quarter_turn_3( +static void SuspendedSwingingRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - suspended_swinging_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SuspendedSwingingRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A8AF8 */ -static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up( +static void SuspendedSwingingRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1758,7 +1756,7 @@ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up( } /** rct2: 0x008A8B08 */ -static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up( +static void SuspendedSwingingRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1851,27 +1849,25 @@ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x008A8B18 */ -static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_down( +static void SuspendedSwingingRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + SuspendedSwingingRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008A8B28 */ -static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_down( +static void SuspendedSwingingRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SuspendedSwingingRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A8B38 */ -static void suspended_swinging_rc_track_brakes( +static void SuspendedSwingingRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1880,20 +1876,20 @@ static void suspended_swinging_rc_track_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26117), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26117), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26118), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26118), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1903,7 +1899,7 @@ static void suspended_swinging_rc_track_brakes( } /** rct2: 0x008A8B48 */ -static void suspended_swinging_rc_track_left_quarter_helix_large_up( +static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1915,22 +1911,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26054), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26059), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26064), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26049), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; } @@ -1954,22 +1950,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26053), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26058), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26063), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26048), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1984,22 +1980,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26052), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26057), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26062), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26047), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2015,22 +2011,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26051), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26056), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26061), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26046), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2045,22 +2041,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26050), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26055), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26060), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26045), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; } @@ -2084,7 +2080,7 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up( } /** rct2: 0x008A8B58 */ -static void suspended_swinging_rc_track_right_quarter_helix_large_up( +static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2096,22 +2092,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26025), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26030), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26035), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26040), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 35 }); + { { 0, 6, height + 35 }, { 32, 20, 3 } }); break; } @@ -2135,22 +2131,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26026), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26031), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26036), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26041), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2165,22 +2161,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26027), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26032), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26037), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26042), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2196,22 +2192,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26028), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26033), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26038), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26043), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2226,22 +2222,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26029), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26034), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26039), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26044), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 43 }); + { { 6, 0, height + 43 }, { 20, 32, 3 } }); break; } @@ -2265,7 +2261,7 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up( } /** rct2: 0x008A8B68 */ -static void suspended_swinging_rc_track_left_quarter_helix_large_down( +static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2277,22 +2273,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26034), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26039), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26044), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26029), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; } @@ -2316,22 +2312,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26033), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26038), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26043), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26028), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2346,22 +2342,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26032), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26037), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26042), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26027), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2377,22 +2373,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26031), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26036), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26041), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26026), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2407,22 +2403,22 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26030), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26035), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26040), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26025), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; } @@ -2446,7 +2442,7 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down( } /** rct2: 0x008A8B78 */ -static void suspended_swinging_rc_track_right_quarter_helix_large_down( +static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2458,22 +2454,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26045), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26050), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26055), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26060), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 43 }); + { { 0, 6, height + 43 }, { 32, 20, 3 } }); break; } @@ -2497,22 +2493,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26046), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26051), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26056), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26061), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2527,22 +2523,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26047), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26052), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26057), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 43 }); + { { 16, 16, height + 43 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26062), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 43 }); + { { 0, 16, height + 43 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2558,22 +2554,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26048), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26053), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26058), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 0, 0, height + 43 }); + { { 0, 0, height + 43 }, { 16, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26063), { 0, 0, height + 29 }, - { 16, 32, 3 }, { 16, 0, height + 43 }); + { { 16, 0, height + 43 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2588,22 +2584,22 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26049), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26054), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26059), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26064), { 0, 0, height + 29 }, - { 20, 32, 3 }, { 6, 0, height + 35 }); + { { 6, 0, height + 35 }, { 20, 32, 3 } }); break; } @@ -2627,7 +2623,7 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down( } /** rct2: 0x008A8B88 */ -static void suspended_swinging_rc_track_left_eighth_to_diag( +static void SuspendedSwingingRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2639,22 +2635,22 @@ static void suspended_swinging_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26167), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26171), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26175), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26179), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2674,22 +2670,22 @@ static void suspended_swinging_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26168), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26172), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26176), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26180), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2704,22 +2700,22 @@ static void suspended_swinging_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26169), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26173), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26177), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26181), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2738,22 +2734,22 @@ static void suspended_swinging_rc_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26170), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26174), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26178), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26182), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; } @@ -2788,7 +2784,7 @@ static void suspended_swinging_rc_track_left_eighth_to_diag( } /** rct2: 0x008A8B98 */ -static void suspended_swinging_rc_track_right_eighth_to_diag( +static void SuspendedSwingingRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2800,22 +2796,22 @@ static void suspended_swinging_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26151), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26155), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26159), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26163), { 0, 0, height + 29 }, - { 32, 20, 3 }, { 0, 6, height + 29 }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } @@ -2835,22 +2831,22 @@ static void suspended_swinging_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26152), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26156), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26160), { 0, 0, height + 29 }, - { 34, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26164), { 0, 0, height + 29 }, - { 32, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2865,22 +2861,22 @@ static void suspended_swinging_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26153), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26157), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26161), { 0, 0, height + 29 }, - { 28, 28, 3 }, { 4, 4, height + 29 }); + { { 4, 4, height + 29 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26165), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -2899,22 +2895,22 @@ static void suspended_swinging_rc_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26154), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 0, height + 29 }); + { { 16, 0, height + 29 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26158), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 29 }); + { { 0, 0, height + 29 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26162), { 0, 0, height + 29 }, - { 16, 18, 3 }, { 0, 16, height + 29 }); + { { 0, 16, height + 29 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26166), { 0, 0, height + 29 }, - { 16, 16, 3 }, { 16, 16, height + 29 }); + { { 16, 16, height + 29 }, { 16, 16, 3 } }); break; } @@ -2949,25 +2945,25 @@ static void suspended_swinging_rc_track_right_eighth_to_diag( } /** rct2: 0x008A8BA8 */ -static void suspended_swinging_rc_track_left_eighth_to_orthogonal( +static void SuspendedSwingingRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - suspended_swinging_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedSwingingRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A8BB8 */ -static void suspended_swinging_rc_track_right_eighth_to_orthogonal( +static void SuspendedSwingingRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - suspended_swinging_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + SuspendedSwingingRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008A8BC8 */ -static void suspended_swinging_rc_track_diag_flat( +static void SuspendedSwingingRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2981,7 +2977,7 @@ static void suspended_swinging_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26214), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -2992,7 +2988,7 @@ static void suspended_swinging_rc_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26186), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3008,7 +3004,7 @@ static void suspended_swinging_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26211), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3019,7 +3015,7 @@ static void suspended_swinging_rc_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26183), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3035,7 +3031,7 @@ static void suspended_swinging_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26213), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3046,7 +3042,7 @@ static void suspended_swinging_rc_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26185), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3062,7 +3058,7 @@ static void suspended_swinging_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26212), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3073,7 +3069,7 @@ static void suspended_swinging_rc_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26184), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } } @@ -3106,7 +3102,7 @@ static void suspended_swinging_rc_track_diag_flat( } /** rct2: 0x008A8BF8 */ -static void suspended_swinging_rc_track_diag_25_deg_up( +static void SuspendedSwingingRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3120,7 +3116,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26226), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3131,7 +3127,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26198), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3147,7 +3143,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26223), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3158,7 +3154,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26195), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3174,7 +3170,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26225), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3185,7 +3181,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26197), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3201,7 +3197,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26224), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3212,7 +3208,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26196), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3245,7 +3241,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up( } /** rct2: 0x008A8C58 */ -static void suspended_swinging_rc_track_diag_60_deg_up( +static void SuspendedSwingingRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3257,7 +3253,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26210), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3270,7 +3266,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26207), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3283,7 +3279,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26209), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3296,7 +3292,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26208), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } @@ -3328,7 +3324,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up( } /** rct2: 0x008A8BD8 */ -static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( +static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3342,7 +3338,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26218), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3353,7 +3349,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26190), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3369,7 +3365,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26215), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3380,7 +3376,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26187), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3396,7 +3392,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26217), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3407,7 +3403,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26189), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3423,7 +3419,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26216), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3434,7 +3430,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26188), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3467,7 +3463,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up( } /** rct2: 0x008A8C38 */ -static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( +static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3479,7 +3475,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26202), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3492,7 +3488,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26199), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3505,7 +3501,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26201), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3518,7 +3514,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26200), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -3550,7 +3546,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up( } /** rct2: 0x008A8C48 */ -static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( +static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3562,7 +3558,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26206), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3575,7 +3571,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26203), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3588,7 +3584,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26205), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3601,7 +3597,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26204), { -16, -16, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 61 }); + { { 0, 0, height + 61 }, { 16, 16, 3 } }); break; } @@ -3633,7 +3629,7 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up( } /** rct2: 0x008A8BE8 */ -static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( +static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3647,7 +3643,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26222), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3658,7 +3654,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26194), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3674,7 +3670,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26219), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3685,7 +3681,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26191), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3701,7 +3697,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26221), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3712,7 +3708,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26193), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3728,7 +3724,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26220), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3739,7 +3735,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26192), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3772,7 +3768,7 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat( } /** rct2: 0x008A8C28 */ -static void suspended_swinging_rc_track_diag_25_deg_down( +static void SuspendedSwingingRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3786,7 +3782,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26224), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3797,7 +3793,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26196), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3813,7 +3809,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26225), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3824,7 +3820,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26197), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3840,7 +3836,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26223), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3851,7 +3847,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26195), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3867,7 +3863,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26226), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3878,7 +3874,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26198), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 45 }); + { { -16, -16, height + 45 }, { 32, 32, 3 } }); break; } } @@ -3911,7 +3907,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down( } /** rct2: 0x008A8C88 */ -static void suspended_swinging_rc_track_diag_60_deg_down( +static void SuspendedSwingingRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3923,7 +3919,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26208), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 29 }); + { { -16, -16, height + 29 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3936,7 +3932,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26209), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3949,7 +3945,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26207), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3962,7 +3958,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26210), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 93 }); + { { -16, -16, height + 93 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -3973,7 +3969,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down( } /** rct2: 0x008A8C08 */ -static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( +static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3987,7 +3983,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26220), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -3998,7 +3994,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26192), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4013,7 +4009,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26221), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4024,7 +4020,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26193), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4039,7 +4035,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26219), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4050,7 +4046,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26191), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4065,7 +4061,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26222), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4076,7 +4072,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26194), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4109,7 +4105,7 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down( } /** rct2: 0x008A8C68 */ -static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( +static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4121,7 +4117,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26204), { -16, -16, height + 29 }, - { 16, 16, 3 }, { 0, 0, height + 61 }); + { { 0, 0, height + 61 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4134,7 +4130,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26205), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4147,7 +4143,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26203), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4160,7 +4156,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26206), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -4192,7 +4188,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down( } /** rct2: 0x008A8C78 */ -static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( +static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4204,7 +4200,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26200), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4217,7 +4213,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26201), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4230,7 +4226,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26199), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4243,7 +4239,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26202), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 61 }); + { { -16, -16, height + 61 }, { 32, 32, 3 } }); break; } @@ -4275,7 +4271,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down( } /** rct2: 0x008A8C18 */ -static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( +static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4289,7 +4285,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26216), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4300,7 +4296,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26188), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4316,7 +4312,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26217), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4327,7 +4323,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26189), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4343,7 +4339,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26215), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4354,7 +4350,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26187), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4370,7 +4366,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26218), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4381,7 +4377,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26190), { -16, -16, height + 29 }, - { 32, 32, 3 }, { -16, -16, height + 37 }); + { { -16, -16, height + 37 }, { 32, 32, 3 } }); break; } } @@ -4414,7 +4410,7 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat( } /** rct2: 0x008A8B38 */ -static void suspended_swinging_rc_track_block_brakes( +static void SuspendedSwingingRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4423,20 +4419,20 @@ static void suspended_swinging_rc_track_block_brakes( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26117), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26117), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26118), { 0, 0, height + 29 }, { 32, 20, 3 }, - { 0, 6, height + 29 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26118), { 0, 0, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height + 44, session.TrackColours[SCHEME_SUPPORTS]); } @@ -4445,114 +4441,114 @@ static void suspended_swinging_rc_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSuspendedSwingingRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return suspended_swinging_rc_track_flat; + return SuspendedSwingingRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return suspended_swinging_rc_track_station; + return SuspendedSwingingRCTrackStation; case TrackElemType::Up25: - return suspended_swinging_rc_track_25_deg_up; + return SuspendedSwingingRCTrack25DegUp; case TrackElemType::Up60: - return suspended_swinging_rc_track_60_deg_up; + return SuspendedSwingingRCTrack60DegUp; case TrackElemType::FlatToUp25: - return suspended_swinging_rc_track_flat_to_25_deg_up; + return SuspendedSwingingRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return suspended_swinging_rc_track_25_deg_up_to_60_deg_up; + return SuspendedSwingingRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return suspended_swinging_rc_track_60_deg_up_to_25_deg_up; + return SuspendedSwingingRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return suspended_swinging_rc_track_25_deg_up_to_flat; + return SuspendedSwingingRCTrack25DegUpToFlat; case TrackElemType::Down25: - return suspended_swinging_rc_track_25_deg_down; + return SuspendedSwingingRCTrack25DegDown; case TrackElemType::Down60: - return suspended_swinging_rc_track_60_deg_down; + return SuspendedSwingingRCTrack60DegDown; case TrackElemType::FlatToDown25: - return suspended_swinging_rc_track_flat_to_25_deg_down; + return SuspendedSwingingRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return suspended_swinging_rc_track_25_deg_down_to_60_deg_down; + return SuspendedSwingingRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return suspended_swinging_rc_track_60_deg_down_to_25_deg_down; + return SuspendedSwingingRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return suspended_swinging_rc_track_25_deg_down_to_flat; + return SuspendedSwingingRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return suspended_swinging_rc_track_left_quarter_turn_5; + return SuspendedSwingingRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return suspended_swinging_rc_track_right_quarter_turn_5; + return SuspendedSwingingRCTrackRightQuarterTurn5; case TrackElemType::LeftQuarterTurn5TilesUp25: - return suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up; + return SuspendedSwingingRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up; + return SuspendedSwingingRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return suspended_swinging_rc_track_left_quarter_turn_5_25_deg_down; + return SuspendedSwingingRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return suspended_swinging_rc_track_right_quarter_turn_5_25_deg_down; + return SuspendedSwingingRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return suspended_swinging_rc_track_s_bend_left; + return SuspendedSwingingRCTrackSBendLeft; case TrackElemType::SBendRight: - return suspended_swinging_rc_track_s_bend_right; + return SuspendedSwingingRCTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return suspended_swinging_rc_track_left_quarter_turn_3; + return SuspendedSwingingRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return suspended_swinging_rc_track_right_quarter_turn_3; + return SuspendedSwingingRCTrackRightQuarterTurn3; case TrackElemType::LeftQuarterTurn3TilesUp25: - return suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up; + return SuspendedSwingingRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up; + return SuspendedSwingingRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return suspended_swinging_rc_track_left_quarter_turn_3_25_deg_down; + return SuspendedSwingingRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return suspended_swinging_rc_track_right_quarter_turn_3_25_deg_down; + return SuspendedSwingingRCTrackRightQuarterTurn325DegDown; case TrackElemType::Brakes: - return suspended_swinging_rc_track_brakes; + return SuspendedSwingingRCTrackBrakes; case TrackElemType::LeftQuarterHelixLargeUp: - return suspended_swinging_rc_track_left_quarter_helix_large_up; + return SuspendedSwingingRCTrackLeftQuarterHelixLargeUp; case TrackElemType::RightQuarterHelixLargeUp: - return suspended_swinging_rc_track_right_quarter_helix_large_up; + return SuspendedSwingingRCTrackRightQuarterHelixLargeUp; case TrackElemType::LeftQuarterHelixLargeDown: - return suspended_swinging_rc_track_left_quarter_helix_large_down; + return SuspendedSwingingRCTrackLeftQuarterHelixLargeDown; case TrackElemType::RightQuarterHelixLargeDown: - return suspended_swinging_rc_track_right_quarter_helix_large_down; + return SuspendedSwingingRCTrackRightQuarterHelixLargeDown; case TrackElemType::LeftEighthToDiag: - return suspended_swinging_rc_track_left_eighth_to_diag; + return SuspendedSwingingRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return suspended_swinging_rc_track_right_eighth_to_diag; + return SuspendedSwingingRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return suspended_swinging_rc_track_left_eighth_to_orthogonal; + return SuspendedSwingingRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return suspended_swinging_rc_track_right_eighth_to_orthogonal; + return SuspendedSwingingRCTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return suspended_swinging_rc_track_diag_flat; + return SuspendedSwingingRCTrackDiagFlat; case TrackElemType::DiagUp25: - return suspended_swinging_rc_track_diag_25_deg_up; + return SuspendedSwingingRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return suspended_swinging_rc_track_diag_60_deg_up; + return SuspendedSwingingRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return suspended_swinging_rc_track_diag_flat_to_25_deg_up; + return SuspendedSwingingRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up; + return SuspendedSwingingRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up; + return SuspendedSwingingRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return suspended_swinging_rc_track_diag_25_deg_up_to_flat; + return SuspendedSwingingRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return suspended_swinging_rc_track_diag_25_deg_down; + return SuspendedSwingingRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return suspended_swinging_rc_track_diag_60_deg_down; + return SuspendedSwingingRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return suspended_swinging_rc_track_diag_flat_to_25_deg_down; + return SuspendedSwingingRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down; + return SuspendedSwingingRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down; + return SuspendedSwingingRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return suspended_swinging_rc_track_diag_25_deg_down_to_flat; + return SuspendedSwingingRCTrackDiag25DegDownToFlat; case TrackElemType::BlockBrakes: - return suspended_swinging_rc_track_block_brakes; + return SuspendedSwingingRCTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/VirginiaReel.cpp b/src/openrct2/ride/coaster/VirginiaReel.cpp index 911767fd18..8c4d715a11 100644 --- a/src/openrct2/ride/coaster/VirginiaReel.cpp +++ b/src/openrct2/ride/coaster/VirginiaReel.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,7 +17,7 @@ #include "../VehiclePaint.h" // 0x009927E6: -static constexpr const vehicle_boundbox _virginiaReelBoundbox[] = { +static constexpr const VehicleBoundBox _virginiaReelBoundbox[] = { { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, { -11, -11, 1, 22, 22, 13 }, @@ -163,7 +163,7 @@ static constexpr const uint32_t virginia_reel_track_pieces_flat_quarter_turn_1_t * * rct2: 0x006D5B48 */ -void vehicle_visual_virginia_reel( +void VehicleVisualVirginiaReel( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { @@ -220,7 +220,7 @@ void vehicle_visual_virginia_reel( } /** rct2: 0x00811264 */ -static void paint_virginia_reel_track_flat( +static void PaintVirginiaReelTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -233,12 +233,12 @@ static void paint_virginia_reel_track_flat( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction]); if (direction & 1) { - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } else { - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } @@ -249,7 +249,7 @@ static void paint_virginia_reel_track_flat( } /** rct2: 0x00811274 */ -static void paint_virginia_reel_track_25_deg_up( +static void PaintVirginiaReelTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -264,11 +264,11 @@ static void paint_virginia_reel_track_25_deg_up( if (direction & 1) { - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); } else { - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); } if (direction == 1 || direction == 2) @@ -301,7 +301,7 @@ static void paint_virginia_reel_track_25_deg_up( } /** rct2: 0x00811294 */ -static void paint_virginia_reel_track_flat_to_25_deg_up( +static void PaintVirginiaReelTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -316,27 +316,27 @@ static void paint_virginia_reel_track_flat_to_25_deg_up( switch (direction) { case 0: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); break; case 1: - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); break; case 2: - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); session.WoodenSupportsPrependTo = ps; WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); break; case 3: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); @@ -348,7 +348,7 @@ static void paint_virginia_reel_track_flat_to_25_deg_up( } /** rct2: 0x00811294 */ -static void paint_virginia_reel_track_25_deg_up_to_flat( +static void PaintVirginiaReelTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -363,11 +363,11 @@ static void paint_virginia_reel_track_25_deg_up_to_flat( if (direction & 1) { - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 0, height }, { 27, 32, 2 } }); } else { - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); } if (direction == 1 || direction == 2) @@ -400,31 +400,31 @@ static void paint_virginia_reel_track_25_deg_up_to_flat( } /** rct2: 0x008112A4 */ -static void paint_virginia_reel_track_25_deg_down( +static void PaintVirginiaReelTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_virginia_reel_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintVirginiaReelTrack25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008112B4 */ -static void paint_virginia_reel_track_flat_to_25_deg_down( +static void PaintVirginiaReelTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_virginia_reel_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintVirginiaReelTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008112C4 */ -static void paint_virginia_reel_track_25_deg_down_to_flat( +static void PaintVirginiaReelTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_virginia_reel_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintVirginiaReelTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008112D4, 0x008112E4, 0x008112F4 */ -static void paint_virginia_reel_station( +static void PaintVirginiaReelStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -433,7 +433,7 @@ static void paint_virginia_reel_station( if (direction == 0 || direction == 2) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_VIRGINIA_REEL_FLAT_SW_NE); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); @@ -443,7 +443,7 @@ static void paint_virginia_reel_station( else if (direction == 1 || direction == 3) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 2 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_VIRGINIA_REEL_FLAT_NW_SE); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 2 } }); @@ -452,7 +452,7 @@ static void paint_virginia_reel_station( } WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -466,14 +466,14 @@ static constexpr const uint8_t virginia_reel_left_quarter_turn_supports[] = { }; /** rct2: 0x00811304 */ -static void paint_virginia_reel_track_left_quarter_turn_3_tiles( +static void PaintVirginiaReelTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_3_tiles_paint( + TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 2, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], virginia_reel_track_pieces_flat_quarter_turn_3_tiles); - track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height, TUNNEL_SQUARE_FLAT, direction, trackSequence); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TUNNEL_SQUARE_FLAT, direction, trackSequence); switch (trackSequence) { @@ -500,21 +500,20 @@ static constexpr const uint8_t virginia_reel_right_quarter_turn_3_tiles_to_left_ }; /** rct2: 0x00811314 */ -static void paint_virginia_reel_track_right_quarter_turn_3_tiles( +static void PaintVirginiaReelTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = virginia_reel_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; - paint_virginia_reel_track_left_quarter_turn_3_tiles( - session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + PaintVirginiaReelTrackLeftQuarterTurn3Tiles(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } /** rct2: 0x00811324 */ -static void paint_virginia_reel_track_left_quarter_turn_1_tile( +static void PaintVirginiaReelTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_1_tile_paint( + TrackPaintUtilLeftQuarterTurn1TilePaint( session, 2, height, 0, direction, session.TrackColours[SCHEME_TRACK], virginia_reel_track_pieces_flat_quarter_turn_1_tile); @@ -543,51 +542,51 @@ static void paint_virginia_reel_track_left_quarter_turn_1_tile( } /** rct2: 0x00811334 */ -static void paint_virginia_reel_track_right_quarter_turn_1_tile( +static void PaintVirginiaReelTrackRightQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_virginia_reel_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + PaintVirginiaReelTrackLeftQuarterTurn1Tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } /** * rct2: 0x00811184 */ -TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionVirginiaReel(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_virginia_reel_track_flat; + return PaintVirginiaReelTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_virginia_reel_station; + return PaintVirginiaReelStation; case TrackElemType::Up25: - return paint_virginia_reel_track_25_deg_up; + return PaintVirginiaReelTrack25DegUp; case TrackElemType::FlatToUp25: - return paint_virginia_reel_track_flat_to_25_deg_up; + return PaintVirginiaReelTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_virginia_reel_track_25_deg_up_to_flat; + return PaintVirginiaReelTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_virginia_reel_track_25_deg_down; + return PaintVirginiaReelTrack25DegDown; case TrackElemType::FlatToDown25: - return paint_virginia_reel_track_flat_to_25_deg_down; + return PaintVirginiaReelTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_virginia_reel_track_25_deg_down_to_flat; + return PaintVirginiaReelTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn3Tiles: - return paint_virginia_reel_track_left_quarter_turn_3_tiles; + return PaintVirginiaReelTrackLeftQuarterTurn3Tiles; case TrackElemType::RightQuarterTurn3Tiles: - return paint_virginia_reel_track_right_quarter_turn_3_tiles; + return PaintVirginiaReelTrackRightQuarterTurn3Tiles; case TrackElemType::LeftQuarterTurn1Tile: - return paint_virginia_reel_track_left_quarter_turn_1_tile; + return PaintVirginiaReelTrackLeftQuarterTurn1Tile; case TrackElemType::RightQuarterTurn1Tile: - return paint_virginia_reel_track_right_quarter_turn_1_tile; + return PaintVirginiaReelTrackRightQuarterTurn1Tile; } return nullptr; diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 063d2ebd97..f3c99ce264 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -164,7 +164,7 @@ static constexpr const uint32_t _wild_mouse_block_brakes_image_ids[NumOrthogonal }; /** rct2: 0x0078B1E4 */ -static void wild_mouse_track_flat( +static void WildMouseTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -177,8 +177,8 @@ static void wild_mouse_track_flat( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isChained]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -188,7 +188,7 @@ static void wild_mouse_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void wild_mouse_track_station( +static void WildMouseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -202,30 +202,30 @@ static void wild_mouse_track_station( int32_t trackType = trackElement.GetTrackType(); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(baseImageIds[direction]), { 0, 0, height - 2 }, - { 32, 28, 2 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 2 } }); if (trackType == TrackElemType::EndStation) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_block_brakes_image_ids[direction][isClosed]), - { 0, 0, height }, { 32, 20, 2 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); } else { PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_brakes_image_ids[direction]), - { 0, 0, height }, { 32, 20, 2 }, { 0, 0, height }); + { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); } - track_paint_util_draw_station_metal_supports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x0078B1F4 */ -static void wild_mouse_track_25_deg_up( +static void WildMouseTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -238,8 +238,8 @@ static void wild_mouse_track_25_deg_up( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isChained]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -257,7 +257,7 @@ static void wild_mouse_track_25_deg_up( } /** rct2: 0x0078B204 */ -static void wild_mouse_track_60_deg_up( +static void WildMouseTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -272,13 +272,13 @@ static void wild_mouse_track_60_deg_up( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isChained]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { if (direction == 0 || direction == 3) { @@ -303,7 +303,7 @@ static void wild_mouse_track_60_deg_up( } /** rct2: 0x0078B214 */ -static void wild_mouse_track_flat_to_25_deg_up( +static void WildMouseTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -316,8 +316,8 @@ static void wild_mouse_track_flat_to_25_deg_up( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isChained]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -4, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -335,7 +335,7 @@ static void wild_mouse_track_flat_to_25_deg_up( } /** rct2: 0x0078B224 */ -static void wild_mouse_track_25_deg_up_to_60_deg_up( +static void WildMouseTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -357,14 +357,14 @@ static void wild_mouse_track_25_deg_up_to_60_deg_up( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -13, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -382,7 +382,7 @@ static void wild_mouse_track_25_deg_up_to_60_deg_up( } /** rct2: 0x0078B234 */ -static void wild_mouse_track_60_deg_up_to_25_deg_up( +static void WildMouseTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -404,14 +404,14 @@ static void wild_mouse_track_60_deg_up_to_25_deg_up( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -21, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -429,7 +429,7 @@ static void wild_mouse_track_60_deg_up_to_25_deg_up( } /** rct2: 0x0078B244 */ -static void wild_mouse_track_25_deg_up_to_flat( +static void WildMouseTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -442,8 +442,8 @@ static void wild_mouse_track_25_deg_up_to_flat( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][isChained]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -7, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -461,54 +461,54 @@ static void wild_mouse_track_25_deg_up_to_flat( } /** rct2: 0x0078B254 */ -static void wild_mouse_track_25_deg_down( +static void WildMouseTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B264 */ -static void wild_mouse_track_60_deg_down( +static void WildMouseTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B274 */ -static void wild_mouse_track_flat_to_25_deg_down( +static void WildMouseTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B284 */ -static void wild_mouse_track_25_deg_down_to_60_deg_down( +static void WildMouseTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B294 */ -static void wild_mouse_track_60_deg_down_to_25_deg_down( +static void WildMouseTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B2A4 */ -static void wild_mouse_track_25_deg_down_to_flat( +static void WildMouseTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void wild_mouse_track_right_quarter_turn_3( +static void WildMouseTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -535,9 +535,9 @@ static void wild_mouse_track_right_quarter_turn_3( }, }; - track_paint_util_right_quarter_turn_3_tiles_paint_3( + TrackPaintUtilRightQuarterTurn3TilesPaint3( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); switch (trackSequence) { @@ -564,7 +564,7 @@ static void wild_mouse_track_right_quarter_turn_3( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void wild_mouse_track_right_quarter_turn_3_25_deg_down( +static void WildMouseTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -598,8 +598,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( sbb->bb_size); } - track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel( - session, height, direction, trackSequence, TUNNEL_2, TUNNEL_1); + TrackPaintUtilRightQuarterTurn3Tiles25DegDownTunnel(session, height, direction, trackSequence, TUNNEL_2, TUNNEL_1); switch (trackSequence) { @@ -623,16 +622,16 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence], 0x20); } -static void wild_mouse_track_left_quarter_turn_3_25_deg_up( +static void WildMouseTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wild_mouse_track_right_quarter_turn_3_25_deg_down(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + WildMouseTrackRightQuarterTurn325DegDown(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x0078B314 */ -static void wild_mouse_track_right_quarter_turn_3_25_deg_up( +static void WildMouseTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -665,7 +664,7 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( { sbb->offset.x, sbb->offset.y, height + sbb->offset.z }, sbb->bb_size); } - track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2); + TrackPaintUtilRightQuarterTurn3Tiles25DegUpTunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2); switch (trackSequence) { @@ -699,24 +698,24 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( } /** rct2: 0x0078B324 */ -static void wild_mouse_track_left_quarter_turn_3_25_deg_down( +static void WildMouseTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wild_mouse_track_right_quarter_turn_3_25_deg_up(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + WildMouseTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void wild_mouse_track_left_quarter_turn_3( +static void WildMouseTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wild_mouse_track_right_quarter_turn_3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + WildMouseTrackRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x0078B394 */ -static void wild_mouse_track_left_quarter_turn_1( +static void WildMouseTrackLeftQuarterTurn1( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -731,35 +730,35 @@ static void wild_mouse_track_left_quarter_turn_1( switch (direction) { case 0: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 24, 2 }, { 6, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 2, height }, { 26, 24, 2 } }); break; case 1: PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 2 }); break; case 2: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 26, 2 }, { 2, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 6, height }, { 24, 26, 2 } }); break; case 3: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 24, 2 }, { 6, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 6, height }, { 24, 24, 2 } }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x0078B3A4 */ -static void wild_mouse_track_right_quarter_turn_1( +static void WildMouseTrackRightQuarterTurn1( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_left_quarter_turn_1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WildMouseTrackLeftQuarterTurn1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x0078B354 */ -static void wild_mouse_track_flat_to_60_deg_up( +static void WildMouseTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -781,14 +780,14 @@ static void wild_mouse_track_flat_to_60_deg_up( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, -5, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -806,7 +805,7 @@ static void wild_mouse_track_flat_to_60_deg_up( } /** rct2: 0x0078B364 */ -static void wild_mouse_track_60_deg_up_to_flat( +static void WildMouseTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -828,14 +827,14 @@ static void wild_mouse_track_60_deg_up_to_flat( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(frontImageIds[direction][isChained]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); } else { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 1, 24, 43 }, { 29, 4, height + 2 }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 2, 43 }, { 0, 4, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 29, 4, height + 2 }, { 1, 24, 43 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 4, height }, { 32, 2, 43 } }); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { if (direction == 0 || direction == 3) { @@ -860,29 +859,29 @@ static void wild_mouse_track_60_deg_up_to_flat( } /** rct2: 0x0078B374 */ -static void wild_mouse_track_flat_to_60_deg_down( +static void WildMouseTrackFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_60_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B384 */ -static void wild_mouse_track_60_deg_down_to_flat( +static void WildMouseTrack60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wild_mouse_track_flat_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WildMouseTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x0078B344 */ -static void wild_mouse_track_brakes( +static void WildMouseTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_brakes_image_ids[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -893,7 +892,7 @@ static void wild_mouse_track_brakes( } /** rct2: 0x0078B3C4 */ -static void wild_mouse_track_rotation_control_toggle( +static void WildMouseTrackRotationControlToggle( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -905,8 +904,8 @@ static void wild_mouse_track_rotation_control_toggle( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -917,14 +916,14 @@ static void wild_mouse_track_rotation_control_toggle( } /** rct2: 0x0078B3B4 */ -static void wild_mouse_track_block_brakes( +static void WildMouseTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - bool isClosed = trackElement.BlockBrakeClosed(); + bool isClosed = trackElement.IsBrakeClosed(); auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_block_brakes_image_ids[direction][isClosed]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -934,70 +933,70 @@ static void wild_mouse_track_block_brakes( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWildMouse(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return wild_mouse_track_flat; + return WildMouseTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return wild_mouse_track_station; + return WildMouseTrackStation; case TrackElemType::Up25: - return wild_mouse_track_25_deg_up; + return WildMouseTrack25DegUp; case TrackElemType::Up60: - return wild_mouse_track_60_deg_up; + return WildMouseTrack60DegUp; case TrackElemType::FlatToUp25: - return wild_mouse_track_flat_to_25_deg_up; + return WildMouseTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return wild_mouse_track_25_deg_up_to_60_deg_up; + return WildMouseTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return wild_mouse_track_60_deg_up_to_25_deg_up; + return WildMouseTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return wild_mouse_track_25_deg_up_to_flat; + return WildMouseTrack25DegUpToFlat; case TrackElemType::Down25: - return wild_mouse_track_25_deg_down; + return WildMouseTrack25DegDown; case TrackElemType::Down60: - return wild_mouse_track_60_deg_down; + return WildMouseTrack60DegDown; case TrackElemType::FlatToDown25: - return wild_mouse_track_flat_to_25_deg_down; + return WildMouseTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return wild_mouse_track_25_deg_down_to_60_deg_down; + return WildMouseTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return wild_mouse_track_60_deg_down_to_25_deg_down; + return WildMouseTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return wild_mouse_track_25_deg_down_to_flat; + return WildMouseTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn3Tiles: - return wild_mouse_track_left_quarter_turn_3; + return WildMouseTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return wild_mouse_track_right_quarter_turn_3; + return WildMouseTrackRightQuarterTurn3; case TrackElemType::LeftQuarterTurn3TilesUp25: - return wild_mouse_track_left_quarter_turn_3_25_deg_up; + return WildMouseTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return wild_mouse_track_right_quarter_turn_3_25_deg_up; + return WildMouseTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return wild_mouse_track_left_quarter_turn_3_25_deg_down; + return WildMouseTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return wild_mouse_track_right_quarter_turn_3_25_deg_down; + return WildMouseTrackRightQuarterTurn325DegDown; case TrackElemType::LeftQuarterTurn1Tile: - return wild_mouse_track_left_quarter_turn_1; + return WildMouseTrackLeftQuarterTurn1; case TrackElemType::RightQuarterTurn1Tile: - return wild_mouse_track_right_quarter_turn_1; + return WildMouseTrackRightQuarterTurn1; case TrackElemType::FlatToUp60: - return wild_mouse_track_flat_to_60_deg_up; + return WildMouseTrackFlatTo60DegUp; case TrackElemType::Up60ToFlat: - return wild_mouse_track_60_deg_up_to_flat; + return WildMouseTrack60DegUpToFlat; case TrackElemType::FlatToDown60: - return wild_mouse_track_flat_to_60_deg_down; + return WildMouseTrackFlatTo60DegDown; case TrackElemType::Down60ToFlat: - return wild_mouse_track_60_deg_down_to_flat; + return WildMouseTrack60DegDownToFlat; case TrackElemType::Brakes: - return wild_mouse_track_brakes; + return WildMouseTrackBrakes; case TrackElemType::RotationControlToggle: - return wild_mouse_track_rotation_control_toggle; + return WildMouseTrackRotationControlToggle; case TrackElemType::BlockBrakes: - return wild_mouse_track_block_brakes; + return WildMouseTrackBlockBrakes; } return nullptr; } diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp index d3bc1a553d..934dc5069c 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -448,14 +448,14 @@ static constexpr const 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 }, }; -ImageId wooden_rc_get_rails_colour(PaintSession& session) +ImageId WoodenRCGetRailsColour(PaintSession& session) { return session.TrackColours[SCHEME_TRACK]; } /** rct2: 0x008AC568 */ template -static void wooden_rc_track_flat( +static void WoodenRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -473,9 +473,9 @@ static void wooden_rc_track_flat( }; uint8_t isChained = trackElement.HasChain() ? 1 : 0; - wooden_rc_track_paint( - session, imageIds[direction][isChained], railsImageIds[direction][isChained], direction, 0, 2, 32, 25, 2, height, 0, 3, - height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][isChained], railsImageIds[direction][isChained], { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -483,7 +483,7 @@ static void wooden_rc_track_flat( } template -static void wooden_rc_track_station( +static void WoodenRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -497,18 +497,19 @@ static void wooden_rc_track_station( int32_t trackType = trackElement.GetTrackType(); if (trackType == TrackElemType::EndStation) { - const auto brakeImg = trackElement.BlockBrakeClosed() ? _wooden_rc_station_block_brakes_image_ids[direction][1] - : _wooden_rc_station_block_brakes_image_ids[direction][0]; - wooden_rc_track_paint(session, brakeImg, SPR_G2_EMPTY, direction, 0, 2, 32, 27, 2, height, 0, 2, height); + const auto brakeImg = trackElement.IsBrakeClosed() ? _wooden_rc_station_block_brakes_image_ids[direction][1] + : _wooden_rc_station_block_brakes_image_ids[direction][0]; + WoodenRCTrackPaint( + session, direction, brakeImg, SPR_G2_EMPTY, { 0, 2, height }, { { 0, 2, height }, { 32, 27, 2 } }); } else { - wooden_rc_track_paint( - session, stationImageIds[direction][0], stationImageIds[direction][1], direction, 0, 2, 32, 27, 2, height, 0, 2, - height); + WoodenRCTrackPaint( + session, direction, stationImageIds[direction][0], stationImageIds[direction][1], { 0, 2, height }, + { { 0, 2, height }, { 32, 27, 2 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station_2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -516,7 +517,7 @@ static void wooden_rc_track_station( /** rct2: 0x008AC578 */ template -static void wooden_rc_track_25_deg_up( +static void WoodenRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -576,14 +577,14 @@ static void wooden_rc_track_25_deg_up( }; uint8_t isChained = trackElement.HasChain() ? 1 : 0; - wooden_rc_track_paint( - session, imageIds[isChained][direction][0], imageIds[isChained][direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, - height); + WoodenRCTrackPaint( + session, direction, imageIds[isChained][direction][0], imageIds[isChained][direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[isChained][direction][2], imageIds[isChained][direction][3], direction, 0, 0, 32, 1, 9, height, 0, - 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[isChained][direction][2], imageIds[isChained][direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -602,10 +603,17 @@ static void wooden_rc_track_25_deg_up( /** rct2: 0x008AC588 */ template -static void wooden_rc_track_60_deg_up( +static void WoodenRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + static constexpr const uint32_t imageIdsChained[4][2] = { + { SPR_G2_WOODEN_RC_60_SWNE_CHAINED, SPR_WOODEN_RC_60_DEG_RAILS_SW_NE }, + { SPR_G2_WOODEN_RC_60_SWNE_CHAINED_BACK, SPR_WOODEN_RC_60_DEG_RAILS_NW_SE }, + { SPR_G2_WOODEN_RC_60_SENW_CHAINED_BACK, SPR_WOODEN_RC_60_DEG_RAILS_NE_SW }, + { SPR_G2_WOODEN_RC_60_SENW_CHAINED, SPR_WOODEN_RC_60_DEG_RAILS_SE_NW }, + }; + static constexpr const uint32_t imageIds[4][2] = { { SPR_WOODEN_RC_60_DEG_SW_NE, SPR_WOODEN_RC_60_DEG_RAILS_SW_NE }, { SPR_WOODEN_RC_60_DEG_NW_SE, SPR_WOODEN_RC_60_DEG_RAILS_NW_SE }, @@ -613,16 +621,37 @@ static void wooden_rc_track_60_deg_up( { SPR_WOODEN_RC_60_DEG_SE_NW, SPR_WOODEN_RC_60_DEG_RAILS_SE_NW }, }; - if (direction == 0 || direction == 3) + if (trackElement.HasChain()) { - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + if (direction == 0 || direction == 3) + { + WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][0], imageIdsChained[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); + } + else + { + session.WoodenSupportsPrependTo = WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][0], imageIdsChained[direction][1], { 0, 0, height }, + { { 28, 4, height - 16 }, { 2, 24, 93 } }); + } } else { - session.WoodenSupportsPrependTo = wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 2, 24, 93, height, 28, 4, height - 16); + if (direction == 0 || direction == 3) + { + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); + } + else + { + session.WoodenSupportsPrependTo = WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 28, 4, height - 16 }, { 2, 24, 93 } }); + } } + WoodenASupportsPaintSetup(session, direction & 1, 21 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -640,7 +669,7 @@ static void wooden_rc_track_60_deg_up( /** rct2: 0x008AC598 */ template -static void wooden_rc_track_flat_to_25_deg_up( +static void WoodenRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -700,14 +729,14 @@ static void wooden_rc_track_flat_to_25_deg_up( }; uint8_t isChained = trackElement.HasChain() ? 1 : 0; - wooden_rc_track_paint( - session, imageIds[isChained][direction][0], imageIds[isChained][direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, - height); + WoodenRCTrackPaint( + session, direction, imageIds[isChained][direction][0], imageIds[isChained][direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[isChained][direction][2], imageIds[isChained][direction][3], direction, 0, 0, 32, 1, 9, height, 0, - 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[isChained][direction][2], imageIds[isChained][direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -726,10 +755,37 @@ static void wooden_rc_track_flat_to_25_deg_up( /** rct2: 0x008AC5A8 */ template -static void wooden_rc_track_25_deg_up_to_60_deg_up( +static void WoodenRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + static constexpr const uint32_t imageIdsChained[4][4] = { + { + SPR_G2_WOODEN_RC_25_60_SWNE_CHAINED, + SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_SW_NE, + 0, + 0, + }, + { + SPR_WOODEN_RC_25_DEG_TO_60_DEG_NW_SE, + SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_NW_SE, + SPR_G2_WOODEN_RC_25_60_SENW_CHAINED_BACK, + SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_FRONT_NW_SE, + }, + { + SPR_WOODEN_RC_25_DEG_TO_60_DEG_NE_SW, + SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_NE_SW, + SPR_G2_WOODEN_RC_25_60_SWNE_CHAINED_BACK, + SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_FRONT_NE_SW, + }, + { + SPR_G2_WOODEN_RC_25_60_SENW_CHAINED, + SPR_WOODEN_RC_25_DEG_TO_60_DEG_RAILS_SE_NW, + 0, + 0, + }, + }; + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_25_DEG_TO_60_DEG_SW_NE, @@ -756,19 +812,43 @@ static void wooden_rc_track_25_deg_up_to_60_deg_up( 0, }, }; - - if (direction == 0 || direction == 3) + if (trackElement.HasChain()) { - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + if (direction == 0 || direction == 3) + { + WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][0], imageIdsChained[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); + } + else + { + session.WoodenSupportsPrependTo = WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][0], imageIdsChained[direction][1], { 0, 0, height }, + { { 28, 4, height + 2 }, { 2, 24, 43 } }); + WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][2], imageIdsChained[direction][3], { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + } } else { - session.WoodenSupportsPrependTo = wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 2, 24, 43, height, 28, 4, height + 2); - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 2, 43, height, 0, 4, height); + if (direction == 0 || direction == 3) + { + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); + } + else + { + session.WoodenSupportsPrependTo = WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 28, 4, height + 2 }, { 2, 24, 43 } }); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + } } + WoodenASupportsPaintSetup(session, direction & 1, 13 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -786,10 +866,37 @@ static void wooden_rc_track_25_deg_up_to_60_deg_up( /** rct2: 0x008AC5B8 */ template -static void wooden_rc_track_60_deg_up_to_25_deg_up( +static void WoodenRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + static constexpr const uint32_t imageIdsChained[4][4] = { + { + SPR_G2_WOODEN_RC_60_25_SWNE_CHAINED, + SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_SW_NE, + 0, + 0, + }, + { + SPR_WOODEN_RC_60_DEG_TO_25_DEG_NW_SE, + SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_NW_SE, + SPR_G2_WOODEN_RC_60_25_SWNE_CHAINED_BACK, + SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_FRONT_NW_SE, + }, + { + SPR_WOODEN_RC_60_DEG_TO_25_DEG_NE_SW, + SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_NE_SW, + SPR_G2_WOODEN_RC_60_25_SENW_CHAINED_BACK, + SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_FRONT_NE_SW, + }, + { + SPR_G2_WOODEN_RC_60_25_SENW_CHAINED, + SPR_WOODEN_RC_60_DEG_TO_25_DEG_RAILS_SE_NW, + 0, + 0, + }, + }; + static constexpr const uint32_t imageIds[4][4] = { { SPR_WOODEN_RC_60_DEG_TO_25_DEG_SW_NE, @@ -817,18 +924,43 @@ static void wooden_rc_track_60_deg_up_to_25_deg_up( }, }; - if (direction == 0 || direction == 3) + if (trackElement.HasChain()) { - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + if (direction == 0 || direction == 3) + { + WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][0], imageIdsChained[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); + } + else + { + session.WoodenSupportsPrependTo = WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][0], imageIdsChained[direction][1], { 0, 0, height }, + { { 4, 28, height - 16 }, { 24, 1, 61 } }); + WoodenRCTrackPaint( + session, direction, imageIdsChained[direction][2], imageIdsChained[direction][3], { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + } } else { - session.WoodenSupportsPrependTo = wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 24, 1, 61, height, 4, 28, height - 16); - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 2, 43, height, 0, 4, height); + if (direction == 0 || direction == 3) + { + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); + } + else + { + session.WoodenSupportsPrependTo = WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 4, 28, height - 16 }, { 24, 1, 61 } }); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 4, height }, { 32, 2, 43 } }); + } } + WoodenASupportsPaintSetup(session, direction & 1, 17 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -846,7 +978,7 @@ static void wooden_rc_track_60_deg_up_to_25_deg_up( /** rct2: 0x008AC5C8 */ template -static void wooden_rc_track_25_deg_up_to_flat( +static void WoodenRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -906,14 +1038,14 @@ static void wooden_rc_track_25_deg_up_to_flat( }; uint8_t isChained = trackElement.HasChain() ? 1 : 0; - wooden_rc_track_paint( - session, imageIds[isChained][direction][0], imageIds[isChained][direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, - height); + WoodenRCTrackPaint( + session, direction, imageIds[isChained][direction][0], imageIds[isChained][direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[isChained][direction][2], imageIds[isChained][direction][3], direction, 0, 0, 32, 1, 9, height, 0, - 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[isChained][direction][2], imageIds[isChained][direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -932,64 +1064,64 @@ static void wooden_rc_track_25_deg_up_to_flat( /** rct2: 0x008AC5D8 */ template -static void wooden_rc_track_25_deg_down( +static void WoodenRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC5E8 */ template -static void wooden_rc_track_60_deg_down( +static void WoodenRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC5F8 */ template -static void wooden_rc_track_flat_to_25_deg_down( +static void WoodenRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC608 */ template -static void wooden_rc_track_25_deg_down_to_60_deg_down( +static void WoodenRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC618 */ template -static void wooden_rc_track_60_deg_down_to_25_deg_down( +static void WoodenRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC628 */ template -static void wooden_rc_track_25_deg_down_to_flat( +static void WoodenRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void wooden_rc_track_right_quarter_turn_5( +static void WoodenRCTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[2][4][7] = { + static constexpr const SpriteBoundBox2 imageIds[2][4][7] = { { { { @@ -1326,9 +1458,9 @@ static void wooden_rc_track_right_quarter_turn_5( { 1, -1, 3, 5, -1, 3, 0 }, }; - wooden_rc_track_paint_bb(session, &imageIds[0][direction][trackSequence], height); - wooden_rc_track_paint_bb(session, &imageIds[1][direction][trackSequence], height); - track_paint_util_right_quarter_turn_5_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + WoodenRCTrackPaintBb(session, &imageIds[0][direction][trackSequence], height); + WoodenRCTrackPaintBb(session, &imageIds[1][direction][trackSequence], height); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); if (supportType[direction][trackSequence] != -1) { @@ -1368,17 +1500,17 @@ static void wooden_rc_track_right_quarter_turn_5( } template -static void wooden_rc_track_left_quarter_turn_5( +static void WoodenRCTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_right_quarter_turn_5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + WoodenRCTrackRightQuarterTurn5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AC658 */ template -static void wooden_rc_track_flat_to_left_bank( +static void WoodenRCTrackFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1409,12 +1541,14 @@ static void wooden_rc_track_flat_to_left_bank( }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 3) { - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 1, 9, height, 0, 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -1424,7 +1558,7 @@ static void wooden_rc_track_flat_to_left_bank( /** rct2: 0x008AC668 */ template -static void wooden_rc_track_flat_to_right_bank( +static void WoodenRCTrackFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1455,12 +1589,14 @@ static void wooden_rc_track_flat_to_right_bank( }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 0 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 1, 9, height, 0, 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -1470,28 +1606,28 @@ static void wooden_rc_track_flat_to_right_bank( /** rct2: 0x008AC678 */ template -static void wooden_rc_track_left_bank_to_flat( +static void WoodenRCTrackLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_flat_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackFlatToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC688 */ template -static void wooden_rc_track_right_bank_to_flat( +static void WoodenRCTrackRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_flat_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackFlatToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void wooden_rc_track_banked_right_quarter_turn_5( +static void WoodenRCTrackBankedRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - static constexpr const sprite_bb_2 imageIds[2][4][7] = { + static constexpr const SpriteBoundBox2 imageIds[2][4][7] = { { { { @@ -1828,9 +1964,9 @@ static void wooden_rc_track_banked_right_quarter_turn_5( { 1, -1, 3, 5, -1, 3, 0 }, }; - wooden_rc_track_paint_bb(session, &imageIds[0][direction][trackSequence], height); - wooden_rc_track_paint_bb(session, &imageIds[1][direction][trackSequence], height); - track_paint_util_right_quarter_turn_5_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + WoodenRCTrackPaintBb(session, &imageIds[0][direction][trackSequence], height); + WoodenRCTrackPaintBb(session, &imageIds[1][direction][trackSequence], height); + TrackPaintUtilRightQuarterTurn5TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); if (supportType[direction][trackSequence] != -1) { @@ -1870,18 +2006,17 @@ static void wooden_rc_track_banked_right_quarter_turn_5( } template -static void wooden_rc_track_banked_left_quarter_turn_5( +static void WoodenRCTrackBankedLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_banked_right_quarter_turn_5( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + WoodenRCTrackBankedRightQuarterTurn5(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AC6B8 */ template -static void wooden_rc_track_left_bank_to_25_deg_up( +static void WoodenRCTrackLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1912,12 +2047,14 @@ static void wooden_rc_track_left_bank_to_25_deg_up( }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 1, 9, height, 0, 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -1934,7 +2071,7 @@ static void wooden_rc_track_left_bank_to_25_deg_up( /** rct2: 0x008AC6C8 */ template -static void wooden_rc_track_right_bank_to_25_deg_up( +static void WoodenRCTrackRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1965,12 +2102,14 @@ static void wooden_rc_track_right_bank_to_25_deg_up( }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 1, 9, height, 0, 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -1987,7 +2126,7 @@ static void wooden_rc_track_right_bank_to_25_deg_up( /** rct2: 0x008AC6D8 */ template -static void wooden_rc_track_25_deg_up_to_left_bank( +static void WoodenRCTrack25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2018,12 +2157,14 @@ static void wooden_rc_track_25_deg_up_to_left_bank( }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 1, 9, height, 0, 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -2040,7 +2181,7 @@ static void wooden_rc_track_25_deg_up_to_left_bank( /** rct2: 0x008AC6E8 */ template -static void wooden_rc_track_25_deg_up_to_right_bank( +static void WoodenRCTrack25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2071,12 +2212,14 @@ static void wooden_rc_track_25_deg_up_to_right_bank( }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); if (direction == 1 || direction == 2) { - wooden_rc_track_paint( - session, imageIds[direction][2], imageIds[direction][3], direction, 0, 0, 32, 1, 9, height, 0, 26, height + 5); + WoodenRCTrackPaint( + session, direction, imageIds[direction][2], imageIds[direction][3], { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); } WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); if (direction == 0 || direction == 3) @@ -2093,43 +2236,43 @@ static void wooden_rc_track_25_deg_up_to_right_bank( /** rct2: 0x008AC6F8 */ template -static void wooden_rc_track_left_bank_to_25_deg_down( +static void WoodenRCTrackLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_to_right_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpToRightBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC708 */ template -static void wooden_rc_track_right_bank_to_25_deg_down( +static void WoodenRCTrackRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_to_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpToLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC718 */ template -static void wooden_rc_track_25_deg_down_to_left_bank( +static void WoodenRCTrack25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_right_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackRightBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC728 */ template -static void wooden_rc_track_25_deg_down_to_right_bank( +static void WoodenRCTrack25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_bank_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackLeftBankTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC738 */ template -static void wooden_rc_track_left_bank( +static void WoodenRCTrackLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2140,8 +2283,9 @@ static void wooden_rc_track_left_bank( { SPR_WOODEN_RC_LEFT_BANK_SE_NW, SPR_WOODEN_RC_LEFT_BANK_RAILS_SE_NW }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 0, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2150,16 +2294,16 @@ static void wooden_rc_track_left_bank( /** rct2: 0x008AC748 */ template -static void wooden_rc_track_right_bank( +static void WoodenRCTrackRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_bank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackLeftBank(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC758 */ template -static void wooden_rc_track_left_quarter_turn_5_25_deg_up( +static void WoodenRCTrackLeftQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2170,44 +2314,44 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23781), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23781), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24647), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24647), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23786), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23786), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24652), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24652), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23812), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23812), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24678), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24678), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23791), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23791), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24657), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24657), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23796), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23796), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24662), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24662), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2228,50 +2372,50 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23782), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23782), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24648), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24648), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23787), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23787), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24653), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24653), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23813), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23813), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24679), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24679), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23792), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23792), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24658), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24658), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23797), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23797), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24663), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24663), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23819), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23819), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24685), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24685), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2286,50 +2430,50 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23783), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23783), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24649), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24649), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23788), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23788), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24654), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24654), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23814), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23814), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24680), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24680), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23793), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23793), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24659), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24659), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23798), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23798), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24664), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24664), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23820), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23820), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24686), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24686), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2351,56 +2495,56 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23784), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23784), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24650), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24650), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23789), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23789), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24655), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24655), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23815), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23815), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24681), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24681), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23794), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23794), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24660), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24660), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23817), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23817), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24683), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24683), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23799), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23799), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24665), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24665), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23821), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23821), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24687), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24687), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2415,56 +2559,56 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23785), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23785), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24651), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24651), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23790), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23790), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24656), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24656), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23816), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23816), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24682), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24682), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23795), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23795), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24661), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24661), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23818), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23818), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24684), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24684), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23800), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23800), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24666), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24666), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23822), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23822), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24688), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24688), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2485,7 +2629,7 @@ static void wooden_rc_track_left_quarter_turn_5_25_deg_up( /** rct2: 0x008AC768 */ template -static void wooden_rc_track_right_quarter_turn_5_25_deg_up( +static void WoodenRCTrackRightQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2496,44 +2640,44 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23761), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23761), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24627), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24627), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23766), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23766), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24632), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24632), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23771), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23771), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24637), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24637), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23807), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23807), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24673), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24673), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23776), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23776), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24642), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24642), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2554,50 +2698,50 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23762), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23762), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24628), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24628), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23801), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23801), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24667), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24667), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23767), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23767), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24633), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24633), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23772), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23772), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24638), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24638), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23808), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23808), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24674), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24674), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23777), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23777), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24643), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24643), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2612,50 +2756,50 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23763), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23763), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24629), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24629), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23802), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23802), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24668), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24668), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23768), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23768), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24634), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24634), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23773), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23773), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24639), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24639), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23809), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23809), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24675), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24675), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23778), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23778), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24644), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24644), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2677,56 +2821,56 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23764), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23764), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24630), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24630), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23803), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23803), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24669), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24669), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23769), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23769), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24635), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24635), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23805), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23805), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24671), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24671), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23774), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23774), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24640), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24640), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23810), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23810), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24676), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24676), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23779), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23779), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24645), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24645), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2741,56 +2885,56 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23765), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23765), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24631), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24631), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23804), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23804), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24670), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24670), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23770), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23770), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24636), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24636), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23806), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23806), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24672), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24672), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23775), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23775), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24641), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24641), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23811), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23811), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24677), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24677), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23780), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23780), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24646), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24646), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2811,29 +2955,27 @@ static void wooden_rc_track_right_quarter_turn_5_25_deg_up( /** rct2: 0x008AC778 */ template -static void wooden_rc_track_left_quarter_turn_5_25_deg_down( +static void WoodenRCTrackLeftQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_right_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + WoodenRCTrackRightQuarterTurn525DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AC788 */ template -static void wooden_rc_track_right_quarter_turn_5_25_deg_down( +static void WoodenRCTrackRightQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_left_quarter_turn_5_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftQuarterTurn525DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AC798 */ template -static void wooden_rc_track_s_bend_left( +static void WoodenRCTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2844,50 +2986,50 @@ static void wooden_rc_track_s_bend_left( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23725), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23725), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24591), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24591), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23729), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23729), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24595), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24595), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23741), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23741), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24607), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24607), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23728), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23728), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24594), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24594), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23732), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23732), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24598), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24598), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23744), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23744), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24610), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24610), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2903,50 +3045,50 @@ static void wooden_rc_track_s_bend_left( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23726), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23726), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24592), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24592), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23730), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23730), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24596), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24596), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23742), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23742), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24608), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24608), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23727), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23727), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24593), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24593), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23731), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23731), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24597), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24597), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23743), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23743), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24609), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24609), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -2961,50 +3103,50 @@ static void wooden_rc_track_s_bend_left( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23727), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23727), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24593), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24593), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23731), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23731), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24597), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24597), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23743), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23743), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24609), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24609), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23726), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23726), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24592), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24592), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23730), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23730), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24596), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24596), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23742), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23742), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24608), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24608), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3019,50 +3161,50 @@ static void wooden_rc_track_s_bend_left( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23728), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23728), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24594), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24594), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23732), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23732), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24598), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24598), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23744), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23744), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24610), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24610), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23725), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23725), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24591), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24591), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23729), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23729), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24595), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24595), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23741), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23741), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24607), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24607), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3083,7 +3225,7 @@ static void wooden_rc_track_s_bend_left( /** rct2: 0x008AC7A8 */ template -static void wooden_rc_track_s_bend_right( +static void WoodenRCTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3094,50 +3236,50 @@ static void wooden_rc_track_s_bend_right( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23733), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23733), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24599), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24599), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23745), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23745), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24611), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24611), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23737), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23737), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24603), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24603), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23736), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23736), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24602), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24602), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23748), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23748), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24614), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24614), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23740), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23740), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24606), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24606), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3153,50 +3295,50 @@ static void wooden_rc_track_s_bend_right( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23734), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23734), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24600), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24600), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23746), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23746), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24612), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24612), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23738), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23738), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24604), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24604), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23735), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23735), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24601), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24601), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23747), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23747), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24613), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24613), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23739), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23739), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24605), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24605), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3211,50 +3353,50 @@ static void wooden_rc_track_s_bend_right( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23735), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23735), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24601), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24601), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23747), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23747), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24613), { 0, 0, height }, - { 32, 26, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24613), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23739), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23739), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24605), { 0, 0, height }, - { 32, 26, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24605), { 0, 0, height }, + { { 0, 0, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23734), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23734), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24600), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24600), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23746), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23746), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24612), { 0, 0, height }, - { 32, 26, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24612), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23738), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23738), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24604), { 0, 0, height }, - { 32, 26, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24604), { 0, 0, height }, + { { 0, 6, height }, { 32, 26, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3269,50 +3411,50 @@ static void wooden_rc_track_s_bend_right( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23736), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23736), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24602), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24602), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23748), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23748), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24614), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24614), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23740), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23740), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24606), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24606), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23733), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23733), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24599), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24599), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23745), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23745), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24611), { 0, 0, height }, - { 32, 25, 0 }, { 0, 3, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24611), { 0, 0, height }, + { { 0, 3, height + 27 }, { 32, 25, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23737), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23737), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24603), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24603), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3333,7 +3475,7 @@ static void wooden_rc_track_s_bend_right( /** rct2: 0x008ACE18 */ template -static void wooden_rc_track_left_vertical_loop( +static void WoodenRCTrackLeftVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3344,23 +3486,19 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23453), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23453), { 0, 6, height }, { 32, 20, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23461), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23461), { 0, 6, height }, { 32, 20, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23460), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23460), { 0, 6, height }, { 32, 20, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23468), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23468), { 0, 6, height }, { 32, 20, 7 }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3379,29 +3517,25 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23454), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23454), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23462), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23462), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23459), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23459), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23467), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23467), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3417,22 +3551,22 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23455), { 16, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23455), { 16, 0, height }, { 5, 16, 119 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23463), { 12, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23463), { 12, 0, height }, { 3, 16, 119 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23458), { 10, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23458), { 10, 16, height }, { 4, 16, 119 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23466), { 16, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23466), { 16, 16, height }, { 4, 16, 119 }); break; } @@ -3445,22 +3579,22 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23456), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23456), { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23464), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23464), { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23457), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23457), { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23465), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23465), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } @@ -3481,22 +3615,22 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23457), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23457), { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23465), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23465), { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23456), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23456), { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23464), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23464), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } @@ -3511,22 +3645,22 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23458), { 10, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23458), { 10, 16, height }, { 4, 16, 119 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23466), { 16, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23466), { 16, 16, height }, { 4, 16, 119 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23455), { 16, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23455), { 16, 0, height }, { 5, 16, 119 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23463), { 12, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23463), { 12, 0, height }, { 3, 16, 119 }); break; } @@ -3539,29 +3673,25 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23459), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23459), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23467), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23467), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23454), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23454), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23462), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23462), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3577,23 +3707,19 @@ static void wooden_rc_track_left_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23460), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23460), { 0, 6, height }, { 32, 20, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23468), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23468), { 0, 6, height }, { 32, 20, 7 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23453), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23453), { 0, 6, height }, { 32, 20, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23461), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23461), { 0, 6, height }, { 32, 20, 3 }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3617,7 +3743,7 @@ static void wooden_rc_track_left_vertical_loop( /** rct2: 0x008ACE28 */ template -static void wooden_rc_track_right_vertical_loop( +static void WoodenRCTrackRightVerticalLoop( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3628,23 +3754,19 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23484), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23484), { 0, 6, height }, { 32, 20, 7 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23476), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23476), { 0, 6, height }, { 32, 20, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23477), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23477), { 0, 6, height }, { 32, 20, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23469), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23469), { 0, 6, height }, { 32, 20, 3 }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3659,29 +3781,25 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23483), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23483), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23475), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23475), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23478), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23478), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23470), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23470), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3693,22 +3811,22 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23482), { 16, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23482), { 16, 16, height }, { 4, 16, 119 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23474), { 10, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23474), { 10, 16, height }, { 4, 16, 119 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23479), { 12, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23479), { 12, 0, height }, { 3, 16, 119 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23471), { 16, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23471), { 16, 0, height }, { 5, 16, 119 }); break; } @@ -3719,22 +3837,22 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23481), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23481), { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23473), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23473), { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23480), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23480), { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23472), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23472), { 0, 0, height + 32 }, { 32, 16, 3 }); break; } @@ -3751,22 +3869,22 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23480), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23480), { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23472), { 0, 0, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23472), { 0, 0, height + 32 }, { 32, 16, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23481), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23481), { 0, 16, height + 32 }, { 32, 16, 3 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23473), { 0, 16, height + 32 }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23473), { 0, 16, height + 32 }, { 32, 16, 3 }); break; } @@ -3777,22 +3895,22 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23479), { 12, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23479), { 12, 0, height }, { 3, 16, 119 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23471), { 16, 0, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23471), { 16, 0, height }, { 5, 16, 119 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23482), { 16, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23482), { 16, 16, height }, { 4, 16, 119 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23474), { 10, 16, height }, + session, direction, WoodenRCGetRailsColour(session).WithIndex(23474), { 10, 16, height }, { 4, 16, 119 }); break; } @@ -3803,29 +3921,25 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23478), { 0, 14, height }, - { 32, 2, 63 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23478), { 0, 14, height }, { 32, 2, 63 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23470), { 0, 0, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23470), { 0, 0, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23483), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23483), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23475), { 0, 6, height }, - { 32, 26, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23475), { 0, 6, height }, { 32, 26, 3 }); MetalASupportsPaintSetup( session, METAL_SUPPORTS_BOXED, 4, 16, height, session.TrackColours[SCHEME_SUPPORTS]); break; @@ -3837,23 +3951,19 @@ static void wooden_rc_track_right_vertical_loop( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23477), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23477), { 0, 6, height }, { 32, 20, 3 }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23469), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23469), { 0, 6, height }, { 32, 20, 3 }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23484), { 0, 6, height }, - { 32, 20, 7 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23484), { 0, 6, height }, { 32, 20, 7 }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(23476), { 0, 6, height }, - { 32, 20, 3 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(23476), { 0, 6, height }, { 32, 20, 3 }); break; } MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -3870,12 +3980,12 @@ static void wooden_rc_track_right_vertical_loop( break; } - track_paint_util_right_vertical_loop_segments(session, direction, trackSequence); + TrackPaintUtilRightVerticalLoopSegments(session, direction, trackSequence); } /** rct2: 0x008AC7E8 */ template -static void wooden_rc_track_left_quarter_turn_3( +static void WoodenRCTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -3886,50 +3996,50 @@ static void wooden_rc_track_left_quarter_turn_3( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23828), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23828), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24694), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24694), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23831), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23831), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24697), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24697), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23840), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23840), { 0, 6, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24706), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24706), { 0, 6, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23834), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23834), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24700), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24700), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23825), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23825), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24691), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24691), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23837), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23837), { 0, 6, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24703), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24703), { 0, 6, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -3948,47 +4058,47 @@ static void wooden_rc_track_left_quarter_turn_3( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23827), { 16, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23827), { 16, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24693), { 16, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24693), { 16, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23830), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23830), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24696), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24696), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23839), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23839), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24705), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24705), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23833), { 0, 16, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23833), { 0, 16, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24699), { 0, 16, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24699), { 0, 16, height }, + { { 0, 16, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23824), { 16, 16, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23824), { 16, 16, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24690), { 16, 16, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24690), { 16, 16, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23836), { 16, 16, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23836), { 16, 16, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24702), { 16, 16, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24702), { 16, 16, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4000,50 +4110,50 @@ static void wooden_rc_track_left_quarter_turn_3( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23826), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23826), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24692), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24692), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23829), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23829), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24695), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24695), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23838), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23838), { 6, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24704), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24704), { 6, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23832), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23832), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24698), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24698), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23823), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23823), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24689), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24689), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23835), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23835), { 6, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24701), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24701), { 6, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4064,17 +4174,17 @@ static void wooden_rc_track_left_quarter_turn_3( /** rct2: 0x008AC7F8 */ template -static void wooden_rc_track_right_quarter_turn_3( +static void WoodenRCTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AC808 */ template -static void wooden_rc_track_left_quarter_turn_3_bank( +static void WoodenRCTrackLeftQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4086,55 +4196,55 @@ static void wooden_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_5), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_5), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24712), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24712), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_8), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_8), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24715), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24715), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_17), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_17), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24724), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24724), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_11), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_11), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24718), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24718), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_2), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_2), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24709), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24709), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_14), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_14), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24721), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24721), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4154,52 +4264,52 @@ static void wooden_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_4), - { 0, 0, height }, { 16, 16, 2 }, { 16, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_4), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24711), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24711), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_7), - { 0, 0, height }, { 16, 16, 2 }, { 0, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_7), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24714), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24714), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_16), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_16), + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24723), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24723), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_10), - { 0, 0, height }, { 16, 16, 2 }, { 0, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_10), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24717), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24717), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_1), - { 0, 0, height }, { 16, 16, 2 }, { 16, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_1), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24708), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24708), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_13), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_13), + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24720), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24720), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4212,55 +4322,55 @@ static void wooden_rc_track_left_quarter_turn_3_bank( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_3), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_3), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24710), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24710), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_6), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_6), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24713), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24713), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_15), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_15), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24722), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24722), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_9), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_9), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24716), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24716), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_0), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_0), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24707), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24707), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_12), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_12), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24719), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24719), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4281,18 +4391,17 @@ static void wooden_rc_track_left_quarter_turn_3_bank( /** rct2: 0x008AC818 */ template -static void wooden_rc_track_right_quarter_turn_3_bank( +static void WoodenRCTrackRightQuarterTurn3Bank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_left_quarter_turn_3_bank( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftQuarterTurn3Bank(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AC828 */ template -static void wooden_rc_track_left_quarter_turn_3_25_deg_up( +static void WoodenRCTrackLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4303,50 +4412,50 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23906), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23906), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24772), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24772), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23908), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23908), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24774), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24774), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23919), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23919), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24785), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24785), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23910), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23910), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24776), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24776), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23904), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23904), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24770), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24770), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23917), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23917), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24783), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24783), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4370,56 +4479,56 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23905), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23905), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24771), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24771), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23907), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23907), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24773), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24773), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23918), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23918), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24784), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24784), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23909), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23909), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24775), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24775), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23920), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23920), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24786), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24786), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23903), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23903), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24769), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24769), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23916), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23916), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24782), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24782), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4440,7 +4549,7 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_up( /** rct2: 0x008AC838 */ template -static void wooden_rc_track_right_quarter_turn_3_25_deg_up( +static void WoodenRCTrackRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4451,50 +4560,50 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23895), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23895), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24761), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24761), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23911), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23911), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24777), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24777), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23897), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23897), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24763), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24763), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23899), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23899), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24765), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24765), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23914), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23914), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24780), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24780), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23901), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23901), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24767), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24767), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4518,56 +4627,56 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23896), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23896), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24762), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24762), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23912), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23912), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24778), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24778), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23898), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23898), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24764), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24764), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23913), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23913), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24779), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24779), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23900), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23900), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24766), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24766), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23915), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23915), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24781), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24781), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23902), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23902), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24768), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24768), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4588,29 +4697,27 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_up( /** rct2: 0x008AC848 */ template -static void wooden_rc_track_left_quarter_turn_3_25_deg_down( +static void WoodenRCTrackLeftQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_right_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + WoodenRCTrackRightQuarterTurn325DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008AC858 */ template -static void wooden_rc_track_right_quarter_turn_3_25_deg_down( +static void WoodenRCTrackRightQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_left_quarter_turn_3_25_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftQuarterTurn325DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ACAB8 */ template -static void wooden_rc_track_left_half_banked_helix_up_small( +static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -4622,55 +4729,55 @@ static void wooden_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_41), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_41), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24748), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24748), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_44), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_44), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24751), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24751), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_53), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_53), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24760), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24760), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_47), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_47), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24754), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24754), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_38), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_38), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24745), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24745), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_50), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_50), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24757), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24757), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4709,52 +4816,52 @@ static void wooden_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_40), - { 0, 0, height }, { 16, 16, 2 }, { 16, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_40), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24747), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24747), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_43), - { 0, 0, height }, { 16, 16, 2 }, { 0, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_43), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24750), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24750), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_52), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_52), + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24759), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24759), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_46), - { 0, 0, height }, { 16, 16, 2 }, { 0, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_46), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24753), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24753), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_37), - { 0, 0, height }, { 16, 16, 2 }, { 16, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_37), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24744), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24744), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_49), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_49), + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24756), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24756), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4767,55 +4874,55 @@ static void wooden_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_39), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_39), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24746), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24746), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_42), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_42), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24749), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24749), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_51), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_51), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24758), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24758), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_45), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_45), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24752), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24752), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_36), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height + 8 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_36), + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24743), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24743), { 0, 0, height }, + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_48), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_48), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24755), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24755), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4841,55 +4948,55 @@ static void wooden_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_38), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_38), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24745), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24745), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_50), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_50), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24757), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24757), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_41), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_41), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24748), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24748), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_44), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_44), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24751), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24751), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_53), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_53), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24760), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24760), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_47), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_47), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24754), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24754), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -4933,52 +5040,52 @@ static void wooden_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_37), - { 0, 0, height }, { 16, 16, 2 }, { 16, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_37), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24744), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24744), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_49), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_49), + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24756), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24756), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_40), - { 0, 0, height }, { 16, 16, 2 }, { 0, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_40), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24747), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24747), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_43), - { 0, 0, height }, { 16, 16, 2 }, { 0, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_43), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24750), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24750), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_52), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_52), + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24759), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24759), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_46), - { 0, 0, height }, { 16, 16, 2 }, { 16, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_46), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24753), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24753), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -4991,55 +5098,55 @@ static void wooden_rc_track_left_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_36), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 8 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_36), + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24743), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24743), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_48), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_48), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24755), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24755), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_39), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_39), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24746), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24746), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_42), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_42), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24749), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24749), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_51), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_51), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24758), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24758), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_45), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_45), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24752), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24752), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5059,7 +5166,7 @@ static void wooden_rc_track_left_half_banked_helix_up_small( /** rct2: 0x008ACAC8 */ template -static void wooden_rc_track_right_half_banked_helix_up_small( +static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5071,55 +5178,55 @@ static void wooden_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_18), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_18), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24725), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24725), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_30), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_30), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24737), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24737), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_21), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_21), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24728), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24728), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_24), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_24), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24731), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24731), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_33), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_33), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24740), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24740), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_27), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_27), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24734), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24734), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5158,52 +5265,52 @@ static void wooden_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_19), - { 0, 0, height }, { 16, 16, 2 }, { 16, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_19), + { 0, 0, height }, { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24726), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24726), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_31), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_31), + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24738), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24738), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_22), - { 0, 0, height }, { 16, 16, 2 }, { 0, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_22), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24729), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24729), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_25), - { 0, 0, height }, { 16, 16, 2 }, { 0, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_25), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24732), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24732), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_34), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_34), + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24741), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24741), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_28), - { 0, 0, height }, { 16, 16, 2 }, { 16, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_28), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24735), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24735), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5216,55 +5323,55 @@ static void wooden_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_20), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height + 8 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_20), + { 0, 0, height }, { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24727), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24727), { 0, 0, height }, + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_32), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_32), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24739), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24739), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_23), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_23), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24730), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24730), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_26), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_26), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24733), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24733), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_35), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_35), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24742), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24742), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_29), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_29), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24736), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24736), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5290,55 +5397,55 @@ static void wooden_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_21), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_21), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24728), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24728), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_24), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_24), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24731), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24731), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_33), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_33), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24740), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24740), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_27), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_27), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24734), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24734), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_18), - { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_18), + { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24725), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24725), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_30), - { 0, 0, height }, { 20, 32, 0 }, { 6, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_30), + { 0, 0, height }, { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24737), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24737), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5382,51 +5489,51 @@ static void wooden_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_22), - { 0, 0, height }, { 16, 16, 2 }, { 16, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_22), + { 0, 0, height }, { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24729), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24729), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_25), - { 0, 0, height }, { 16, 16, 2 }, { 0, 0, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_25), + { 0, 0, height }, { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24732), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24732), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_34), - { 0, 0, height }, { 16, 16, 0 }, { 0, 0, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_34), + { 0, 0, height }, { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24741), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24741), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_28), - { 0, 0, height }, { 16, 16, 2 }, { 0, 16, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_28), + { 0, 0, height }, { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24735), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24735), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23860), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23860), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24726), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24726), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_31), - { 0, 0, height }, { 16, 16, 0 }, { 16, 16, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_31), + { 0, 0, height }, { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24738), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24738), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -5439,55 +5546,55 @@ static void wooden_rc_track_right_half_banked_helix_up_small( case 0: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_23), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_23), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24730), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24730), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_26), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_26), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24733), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24733), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_35), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_35), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24742), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24742), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_29), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_29), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24736), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24736), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_20), - { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height + 8 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_20), + { 0, 0, height }, { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24727), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24727), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, - wooden_rc_get_track_colour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_32), - { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 27 }); + WoodenRCGetTrackColour(session).WithIndex(SPR_WOODEN_RC_SMALL_RIGHT_BANKED_TURN_32), + { 0, 0, height }, { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24739), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24739), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5507,7 +5614,7 @@ static void wooden_rc_track_right_half_banked_helix_up_small( /** rct2: 0x008ACAD8 */ template -static void wooden_rc_track_left_half_banked_helix_down_small( +static void WoodenRCTrackLeftHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5517,13 +5624,13 @@ static void wooden_rc_track_left_half_banked_helix_down_small( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_right_half_banked_helix_up_small( + WoodenRCTrackRightHalfBankedHelixUpSmall( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ACAE8 */ template -static void wooden_rc_track_right_half_banked_helix_down_small( +static void WoodenRCTrackRightHalfBankedHelixDownSmall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5533,13 +5640,12 @@ static void wooden_rc_track_right_half_banked_helix_down_small( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_left_half_banked_helix_up_small( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftHalfBankedHelixUpSmall(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ACAF8 */ template -static void wooden_rc_track_left_half_banked_helix_up_large( +static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -5550,50 +5656,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23704), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23704), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24570), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24570), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23709), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23709), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24575), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24575), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23724), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23724), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24590), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24590), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23714), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23714), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24580), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24580), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23699), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23699), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24565), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24565), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23719), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23719), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24585), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24585), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5618,50 +5724,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23703), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23703), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24569), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24569), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23708), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23708), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24574), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24574), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23723), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23723), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24589), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24589), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23713), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23713), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24579), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24579), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23698), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23698), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24564), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24564), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23718), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23718), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24584), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24584), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5676,50 +5782,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23702), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23702), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24568), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24568), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23707), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23707), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24573), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24573), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23722), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23722), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24588), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24588), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23712), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23712), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24578), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24578), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23697), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23697), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24563), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24563), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23717), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23717), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24583), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24583), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5739,50 +5845,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23701), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23701), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24567), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24567), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23706), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23706), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24572), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24572), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23721), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23721), { 0, 0, height }, + { { 0, 0, height + 33 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24587), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24587), { 0, 0, height }, + { { 0, 0, height + 33 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23711), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23711), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24577), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24577), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23696), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23696), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24562), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24562), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23716), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23716), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24582), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24582), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5797,50 +5903,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23700), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23700), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24566), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24566), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23705), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23705), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24571), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24571), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23720), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23720), { 0, 0, height }, + { { 2, 0, height + 33 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24586), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24586), { 0, 0, height }, + { { 2, 0, height + 33 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23710), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23710), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24576), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24576), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23695), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23695), { 0, 0, height }, + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24561), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24561), { 0, 0, height }, + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23715), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23715), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24581), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24581), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5865,50 +5971,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23699), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23699), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24565), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24565), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23719), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23719), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24585), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24585), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23704), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23704), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24570), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24570), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23709), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23709), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24575), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24575), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23724), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23724), { 0, 0, height }, + { { 2, 0, height + 27 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24590), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24590), { 0, 0, height }, + { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23714), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23714), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24580), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24580), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5938,50 +6044,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23698), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23698), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24564), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24564), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23718), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23718), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24584), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24584), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23703), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23703), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24569), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24569), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23708), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23708), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24574), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24574), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23723), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23723), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24589), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24589), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23713), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23713), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24579), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24579), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -5996,50 +6102,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23697), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23697), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24563), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24563), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23717), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23717), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24583), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24583), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23702), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23702), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24568), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24568), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23707), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23707), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24573), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24573), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23722), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23722), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24588), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24588), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23712), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23712), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24578), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24578), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6059,50 +6165,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23696), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23696), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24562), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24562), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23716), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23716), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24582), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24582), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23701), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23701), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24567), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24567), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23706), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23706), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24572), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24572), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23721), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23721), { 0, 0, height }, + { { 0, 0, height + 33 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24587), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24587), { 0, 0, height }, + { { 0, 0, height + 33 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23711), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23711), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24577), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24577), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6117,50 +6223,50 @@ static void wooden_rc_track_left_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23695), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23695), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24561), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24561), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23715), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23715), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24581), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24581), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23700), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23700), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24566), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24566), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23705), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23705), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24571), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24571), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23720), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23720), { 0, 0, height }, + { { 0, 2, height + 33 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24586), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24586), { 0, 0, height }, + { { 0, 2, height + 33 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23710), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23710), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24576), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24576), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6180,7 +6286,7 @@ static void wooden_rc_track_left_half_banked_helix_up_large( /** rct2: 0x008ACB08 */ template -static void wooden_rc_track_right_half_banked_helix_up_large( +static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6191,50 +6297,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23665), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23665), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24531), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24531), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23685), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23685), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24551), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24551), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23670), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23670), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24536), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24536), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23675), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23675), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24541), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24541), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23690), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23690), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24556), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24556), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23680), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23680), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24546), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24546), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6259,50 +6365,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23666), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23666), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24532), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24532), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23686), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23686), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24552), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24552), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23671), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23671), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24537), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24537), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23676), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23676), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24542), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24542), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23691), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23691), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24557), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24557), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23681), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23681), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24547), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24547), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6317,50 +6423,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23667), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23667), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24533), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24533), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23687), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23687), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24553), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24553), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23672), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23672), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24538), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24538), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23677), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23677), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24543), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24543), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23692), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23692), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24558), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24558), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23682), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23682), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24548), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24548), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6380,50 +6486,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23668), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23668), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24534), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24534), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23688), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23688), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24554), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24554), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23673), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23673), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24539), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24539), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23678), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23678), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24544), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24544), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23693), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23693), { 0, 0, height }, + { { 0, 0, height + 33 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24559), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24559), { 0, 0, height }, + { { 0, 0, height + 33 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23683), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23683), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24549), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24549), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6438,50 +6544,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23669), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23669), { 0, 0, height }, + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24535), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24535), { 0, 0, height }, + { { 6, 0, height + 8 }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23689), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23689), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24555), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24555), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23674), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23674), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24540), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24540), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23679), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23679), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24545), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24545), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23694), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23694), { 0, 0, height }, + { { 2, 0, height + 33 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24560), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24560), { 0, 0, height }, + { { 2, 0, height + 33 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23684), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23684), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24550), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24550), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6506,50 +6612,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23670), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23670), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24536), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24536), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23675), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23675), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24541), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24541), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23690), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23690), { 0, 0, height }, + { { 2, 0, height + 27 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24556), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24556), { 0, 0, height }, + { { 2, 0, height + 27 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23680), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23680), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24546), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24546), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23665), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23665), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24531), { 0, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24531), { 0, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23685), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23685), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24551), { 0, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24551), { 0, 0, height }, + { { 6, 0, height + 27 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6579,50 +6685,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23671), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23671), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24537), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24537), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23676), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23676), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24542), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24542), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23691), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23691), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24557), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24557), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23681), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23681), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24547), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24547), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23666), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23666), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24532), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24532), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23686), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23686), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24552), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24552), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6637,50 +6743,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23672), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23672), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24538), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24538), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23677), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23677), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24543), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24543), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23692), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23692), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24558), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 29 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24558), { 0, 0, height }, + { { 16, 16, height + 29 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23682), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23682), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24548), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24548), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23667), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23667), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24533), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24533), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23687), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23687), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24553), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24553), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6700,50 +6806,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23673), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23673), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24539), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24539), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23678), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23678), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24544), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24544), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23693), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23693), { 0, 0, height }, + { { 0, 0, height + 33 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24559), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24559), { 0, 0, height }, + { { 0, 0, height + 33 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23683), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23683), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24549), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24549), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23668), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23668), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24534), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24534), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23688), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23688), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24554), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24554), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6758,50 +6864,50 @@ static void wooden_rc_track_right_half_banked_helix_up_large( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23674), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23674), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24540), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24540), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23679), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23679), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24545), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24545), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23694), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 33 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23694), { 0, 0, height }, + { { 0, 2, height + 33 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24560), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 33 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24560), { 0, 0, height }, + { { 0, 2, height + 33 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23684), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23684), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24550), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24550), { 0, 0, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23669), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23669), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24535), { 0, 0, height }, - { 32, 20, 2 }, { 0, 6, height + 8 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24535), { 0, 0, height }, + { { 0, 6, height + 8 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23689), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23689), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24555), { 0, 0, height }, - { 32, 20, 0 }, { 0, 6, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24555), { 0, 0, height }, + { { 0, 6, height + 27 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -6821,7 +6927,7 @@ static void wooden_rc_track_right_half_banked_helix_up_large( /** rct2: 0x008ACB18 */ template -static void wooden_rc_track_left_half_banked_helix_down_large( +static void WoodenRCTrackLeftHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6831,13 +6937,13 @@ static void wooden_rc_track_left_half_banked_helix_down_large( direction = (direction - 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_right_half_banked_helix_up_large( + WoodenRCTrackRightHalfBankedHelixUpLarge( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ACB28 */ template -static void wooden_rc_track_right_half_banked_helix_down_large( +static void WoodenRCTrackRightHalfBankedHelixDownLarge( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6847,13 +6953,12 @@ static void wooden_rc_track_right_half_banked_helix_down_large( direction = (direction + 1) & 3; } trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_left_half_banked_helix_up_large( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftHalfBankedHelixUpLarge(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ACB98 */ template -static void wooden_rc_track_left_quarter_turn_1_60_deg_up( +static void WoodenRCTrackLeftQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6861,69 +6966,69 @@ static void wooden_rc_track_left_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24209), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24209), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25075), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25075), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24217), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24217), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25083), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25083), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24210), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24210), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25076), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25076), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24218), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24218), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25084), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25084), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24211), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24211), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25077), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25077), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24219), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24219), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25085), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25085), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24212), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24212), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25078), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25078), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24220), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24220), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25086), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25086), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008ACB78 */ template -static void wooden_rc_track_right_quarter_turn_1_60_deg_up( +static void WoodenRCTrackRightQuarterTurn160DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -6931,89 +7036,87 @@ static void wooden_rc_track_right_quarter_turn_1_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24213), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24213), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25079), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25079), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24221), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24221), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25087), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25087), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24214), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24214), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25080), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25080), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24222), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24222), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25088), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25088), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24215), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24215), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25081), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25081), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24223), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24223), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25089), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25089), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24216), { 0, 0, height }, - { 28, 28, 3 }, { 2, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24216), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25082), { 0, 0, height }, { 28, 28, 3 }, - { 2, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25082), { 0, 0, height }, + { { 2, 2, height }, { 28, 28, 3 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24224), { 0, 0, height }, - { 28, 28, 1 }, { 2, 2, height + 99 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24224), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25090), { 0, 0, height }, { 28, 28, 1 }, - { 2, 2, height + 99 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25090), { 0, 0, height }, + { { 2, 2, height + 99 }, { 28, 28, 1 } }); break; } - track_paint_util_right_quarter_turn_1_tile_tunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); + TrackPaintUtilRightQuarterTurn1TileTunnel(session, direction, height, -8, TUNNEL_SQUARE_7, +56, TUNNEL_SQUARE_8); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } /** rct2: 0x008ACB88 */ template -static void wooden_rc_track_left_quarter_turn_1_60_deg_down( +static void WoodenRCTrackLeftQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_right_quarter_turn_1_60_deg_up( - session, ride, trackSequence, (direction + 1) & 3, height, trackElement); + WoodenRCTrackRightQuarterTurn160DegUp(session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ACBA8 */ template -static void wooden_rc_track_right_quarter_turn_1_60_deg_down( +static void WoodenRCTrackRightQuarterTurn160DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_quarter_turn_1_60_deg_up( - session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenRCTrackLeftQuarterTurn160DegUp(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008AC868 */ template -static void wooden_rc_track_brakes( +static void WoodenRCTrackBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7024,8 +7127,9 @@ static void wooden_rc_track_brakes( { SPR_WOODEN_RC_BRAKES_NW_SE, SPR_WOODEN_RC_BRAKES_RAILS_NW_SE }, }; - wooden_rc_track_paint( - session, imageIds[direction][0], imageIds[direction][1], direction, 0, 2, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction][0], imageIds[direction][1], { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7034,7 +7138,7 @@ static void wooden_rc_track_brakes( /** rct2: 0x008ACC78 */ template -static void wooden_rc_track_25_deg_up_left_banked( +static void WoodenRCTrack25DegUpLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7042,50 +7146,50 @@ static void wooden_rc_track_25_deg_up_left_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24249), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24249), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25115), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25115), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24250), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24250), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25116), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25116), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24257), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24257), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25123), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25123), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24251), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24251), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25117), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25117), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24258), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24258), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25124), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25124), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24252), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24252), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25118), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25118), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7103,7 +7207,7 @@ static void wooden_rc_track_25_deg_up_left_banked( /** rct2: 0x008ACC88 */ template -static void wooden_rc_track_25_deg_up_right_banked( +static void WoodenRCTrack25DegUpRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7111,50 +7215,50 @@ static void wooden_rc_track_25_deg_up_right_banked( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24253), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24253), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25119), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25119), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24254), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24254), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25120), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25120), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24259), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24259), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25125), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25125), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24255), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24255), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25121), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25121), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24260), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24260), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25126), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25126), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24256), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24256), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25122), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25122), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7172,7 +7276,7 @@ static void wooden_rc_track_25_deg_up_right_banked( /** rct2: 0x008AC878 */ template -static void wooden_rc_track_on_ride_photo( +static void WoodenRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7180,39 +7284,39 @@ static void wooden_rc_track_on_ride_photo( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23753), { 0, 2, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23753), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24619), { 0, 2, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24619), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23754), { 0, 2, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23754), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24620), { 0, 2, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24620), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23753), { 0, 2, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23753), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24619), { 0, 2, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24619), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23754), { 0, 2, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23754), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24620), { 0, 2, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24620), { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_onride_photo_small_paint(session, direction, height + 16, trackElement); + TrackPaintUtilOnridePhotoSmallPaint(session, direction, height + 16, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); @@ -7220,25 +7324,25 @@ static void wooden_rc_track_on_ride_photo( /** rct2: 0x008ACC98 */ template -static void wooden_rc_track_25_deg_down_left_banked( +static void WoodenRCTrack25DegDownLeftBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_right_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpRightBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACCA8 */ template -static void wooden_rc_track_25_deg_down_right_banked( +static void WoodenRCTrack25DegDownRightBanked( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_left_banked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpLeftBanked(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACE08 */ template -static void wooden_rc_track_water_splash( +static void WoodenRCTrackWaterSplash( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7253,99 +7357,99 @@ static void wooden_rc_track_water_splash( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23989), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23989), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24855), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24855), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23997), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24863), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23993), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23993), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24859), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24859), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23990), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23990), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24856), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24856), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23998), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24864), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23994), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23994), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24860), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24860), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23987), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23987), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24853), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24853), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23995), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24861), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23991), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23991), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24857), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24857), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23988), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23988), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24854), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24854), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23996), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24862), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23992), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23992), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24858), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24858), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7358,99 +7462,99 @@ static void wooden_rc_track_water_splash( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23977), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23977), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24843), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24843), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23985), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24851), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23981), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23981), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24847), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24847), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23978), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23978), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24844), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24844), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23986), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24852), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23982), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23982), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24848), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24848), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23975), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23975), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24841), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24841), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23983), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24849), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23979), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23979), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24845), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24845), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23976), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23976), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24842), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24842), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23984), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24850), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23980), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23980), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24846), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24846), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7463,52 +7567,52 @@ static void wooden_rc_track_water_splash( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23999), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23999), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24865), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24865), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24003), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24869), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24001), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24001), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24867), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24867), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24000), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24000), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24866), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24866), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24004), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24870), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24002), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24002), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24868), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24868), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7520,99 +7624,99 @@ static void wooden_rc_track_water_splash( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23975), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23975), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24841), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24841), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23983), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24849), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23979), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23979), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24845), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24845), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23976), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23976), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24842), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24842), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23984), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24850), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23980), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23980), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24846), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24846), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23977), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23977), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24843), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24843), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23985), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24851), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23981), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23981), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24847), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24847), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23978), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23978), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24844), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24844), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23986), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24852), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23982), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23982), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24848), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24848), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7624,99 +7728,99 @@ static void wooden_rc_track_water_splash( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23987), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23987), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24853), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24853), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23995), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24861), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23991), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23991), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24857), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24857), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23988), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23988), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24854), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24854), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23996), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24862), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23992), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23992), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24858), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24858), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23989), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23989), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24855), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24855), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23997), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24863), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23993), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23993), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24859), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24859), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23990), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23990), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24856), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24856), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterMask, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterMask, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, waterOverlay, { 0, 0, height + 16 }, { 32, 25, 2 }, { 0, 3, height + 16 }); + session, direction, waterOverlay, { 0, 0, height + 16 }, { { 0, 3, height + 16 }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(23998), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(24864), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23994), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23994), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24860), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24860), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); break; } WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -7729,7 +7833,7 @@ static void wooden_rc_track_water_splash( /** rct2: 0x008AC958 */ template -static void wooden_rc_track_left_eighth_to_diag( +static void WoodenRCTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7740,50 +7844,50 @@ static void wooden_rc_track_left_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24137), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24137), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25003), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25003), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24141), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24141), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25007), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25007), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24153), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24153), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25019), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25019), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24145), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24145), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25011), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25011), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24149), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24149), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25015), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25015), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24157), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24157), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25023), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25023), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7799,50 +7903,50 @@ static void wooden_rc_track_left_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24138), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24138), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25004), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25004), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24142), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24142), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25008), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25008), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24154), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24154), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25020), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25020), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24146), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24146), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25012), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25012), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24150), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24150), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25016), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25016), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24158), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24158), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25024), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25024), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7854,50 +7958,50 @@ static void wooden_rc_track_left_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24139), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24139), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25005), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25005), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24143), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24143), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25009), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25009), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24155), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24155), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25021), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25021), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24147), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24147), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25013), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25013), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24151), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24151), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25017), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25017), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24159), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24159), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25025), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25025), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -7928,47 +8032,47 @@ static void wooden_rc_track_left_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24140), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24140), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25006), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25006), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24144), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24144), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25010), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25010), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24156), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24156), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25022), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25022), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24148), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24148), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25014), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25014), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24152), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24152), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25018), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25018), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24160), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24160), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25026), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25026), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -7979,7 +8083,7 @@ static void wooden_rc_track_left_eighth_to_diag( /** rct2: 0x008AC968 */ template -static void wooden_rc_track_right_eighth_to_diag( +static void WoodenRCTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -7990,50 +8094,50 @@ static void wooden_rc_track_right_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24113), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24113), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24979), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24979), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24129), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24129), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24995), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24995), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24117), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24117), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24983), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24983), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24121), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24121), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24987), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24987), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24133), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24133), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24999), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24999), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24125), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24125), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24991), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24991), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8049,50 +8153,50 @@ static void wooden_rc_track_right_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24114), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24114), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24980), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24980), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24130), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24130), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24996), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24996), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24118), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24118), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24984), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24984), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24122), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24122), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24988), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24988), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24134), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24134), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25000), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25000), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24126), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24126), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24992), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24992), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8104,50 +8208,50 @@ static void wooden_rc_track_right_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24115), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24115), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24981), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24981), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24131), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24131), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24997), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24997), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24119), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24119), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24985), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24985), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24123), { 0, 0, height }, - { 28, 28, 2 }, { 4, 4, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24123), { 0, 0, height }, + { { 4, 4, height }, { 28, 28, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24989), { 0, 0, height }, - { 28, 28, 2 }, { 4, 4, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24989), { 0, 0, height }, + { { 4, 4, height }, { 28, 28, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24135), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24135), { 0, 0, height }, + { { 4, 4, height + 27 }, { 28, 28, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25001), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25001), { 0, 0, height }, + { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24127), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24127), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24993), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24993), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8178,47 +8282,47 @@ static void wooden_rc_track_right_eighth_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24116), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24116), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24982), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24982), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24132), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24132), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24998), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24998), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24120), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24120), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24986), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24986), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24124), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24124), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24990), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24990), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24136), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24136), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25002), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25002), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24128), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24128), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24994), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24994), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -8229,27 +8333,27 @@ static void wooden_rc_track_right_eighth_to_diag( /** rct2: 0x008AC978 */ template -static void wooden_rc_track_left_eighth_to_orthogonal( +static void WoodenRCTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - wooden_rc_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC988 */ template -static void wooden_rc_track_right_eighth_to_orthogonal( +static void WoodenRCTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - wooden_rc_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + WoodenRCTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008AC998 */ template -static void wooden_rc_track_left_eighth_bank_to_diag( +static void WoodenRCTrackLeftEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8260,50 +8364,50 @@ static void wooden_rc_track_left_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24185), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24185), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25051), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25051), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24189), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24189), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25055), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25055), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24201), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24201), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25067), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25067), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24193), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24193), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25059), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25059), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24197), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24197), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25063), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25063), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24205), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24205), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25071), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25071), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8319,50 +8423,50 @@ static void wooden_rc_track_left_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24186), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24186), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25052), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25052), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24190), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24190), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25056), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25056), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24202), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24202), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25068), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25068), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24194), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24194), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25060), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25060), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24198), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24198), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25064), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25064), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24206), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24206), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25072), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25072), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8374,50 +8478,50 @@ static void wooden_rc_track_left_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24187), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24187), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25053), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25053), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24191), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24191), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25057), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25057), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24203), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24203), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25069), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25069), { 0, 0, height }, + { { 16, 16, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24195), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24195), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25061), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25061), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24199), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24199), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25065), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25065), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24207), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24207), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25073), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25073), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8448,47 +8552,47 @@ static void wooden_rc_track_left_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24188), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24188), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25054), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25054), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24192), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24192), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25058), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25058), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24204), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24204), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25070), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25070), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24196), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24196), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25062), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25062), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24200), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24200), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25066), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25066), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24208), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24208), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25074), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25074), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -8499,7 +8603,7 @@ static void wooden_rc_track_left_eighth_bank_to_diag( /** rct2: 0x008AC9A8 */ template -static void wooden_rc_track_right_eighth_bank_to_diag( +static void WoodenRCTrackRightEighthBankToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8510,50 +8614,50 @@ static void wooden_rc_track_right_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24161), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24161), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25027), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25027), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24177), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24177), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25043), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25043), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24165), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24165), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25031), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25031), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24169), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24169), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25035), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25035), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24181), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24181), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25047), { 0, 0, height }, - { 32, 32, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25047), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24173), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24173), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25039), { 0, 0, height }, - { 32, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25039), { 0, 0, height }, + { { 0, 0, height }, { 32, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8569,50 +8673,50 @@ static void wooden_rc_track_right_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24162), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24162), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25028), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25028), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24178), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24178), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25044), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25044), { 0, 0, height }, + { { 0, 16, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24166), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24166), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25032), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25032), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24170), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24170), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25036), { 0, 0, height }, - { 34, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25036), { 0, 0, height }, + { { 0, 0, height }, { 34, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24182), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24182), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25048), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25048), { 0, 0, height }, + { { 0, 0, height + 27 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24174), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24174), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25040), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25040), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8624,50 +8728,50 @@ static void wooden_rc_track_right_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24163), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24163), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25029), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25029), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24179), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24179), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25045), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25045), { 0, 0, height }, + { { 0, 0, height + 27 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24167), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24167), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25033), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25033), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24171), { 0, 0, height }, - { 28, 28, 2 }, { 4, 4, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24171), { 0, 0, height }, + { { 4, 4, height }, { 28, 28, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25037), { 0, 0, height }, - { 28, 28, 2 }, { 4, 4, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25037), { 0, 0, height }, + { { 4, 4, height }, { 28, 28, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24183), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24183), { 0, 0, height }, + { { 4, 4, height + 27 }, { 28, 28, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25049), { 0, 0, height }, - { 28, 28, 0 }, { 4, 4, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25049), { 0, 0, height }, + { { 4, 4, height + 27 }, { 28, 28, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24175), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24175), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25041), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25041), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -8698,47 +8802,47 @@ static void wooden_rc_track_right_eighth_bank_to_diag( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24164), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24164), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25030), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25030), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24180), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24180), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25046), { 0, 0, height }, - { 16, 16, 0 }, { 16, 0, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25046), { 0, 0, height }, + { { 16, 0, height + 27 }, { 16, 16, 0 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24168), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24168), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25034), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25034), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24172), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24172), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25038), { 0, 0, height }, - { 16, 18, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25038), { 0, 0, height }, + { { 0, 16, height }, { 16, 18, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24184), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24184), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25050), { 0, 0, height }, - { 16, 16, 0 }, { 0, 16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25050), { 0, 0, height }, + { { 0, 16, height + 27 }, { 16, 16, 0 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24176), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24176), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25042), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25042), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -8749,29 +8853,27 @@ static void wooden_rc_track_right_eighth_bank_to_diag( /** rct2: 0x008AC9B8 */ template -static void wooden_rc_track_left_eighth_bank_to_orthogonal( +static void WoodenRCTrackLeftEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - wooden_rc_track_right_eighth_bank_to_diag( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackRightEighthBankToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008AC9C8 */ template -static void wooden_rc_track_right_eighth_bank_to_orthogonal( +static void WoodenRCTrackRightEighthBankToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - wooden_rc_track_left_eighth_bank_to_diag( - session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + WoodenRCTrackLeftEighthBankToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008AC888 */ template -static void wooden_rc_track_diag_flat( +static void WoodenRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8784,11 +8886,11 @@ static void wooden_rc_track_diag_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24050), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24050), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24916), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24916), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -8798,11 +8900,11 @@ static void wooden_rc_track_diag_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24008), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24008), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24874), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24874), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -8816,17 +8918,17 @@ static void wooden_rc_track_diag_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24047), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24047), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24913), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24913), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24051), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24051), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24917), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24917), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -8846,17 +8948,17 @@ static void wooden_rc_track_diag_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24005), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24005), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24871), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24871), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24009), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24009), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24875), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24875), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -8886,17 +8988,17 @@ static void wooden_rc_track_diag_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24049), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24049), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24915), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24915), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24052), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24052), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24918), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24918), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -8916,17 +9018,17 @@ static void wooden_rc_track_diag_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24007), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24007), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24873), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24873), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24010), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24010), + { -16, -16, height }, { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24876), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24876), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -8944,11 +9046,11 @@ static void wooden_rc_track_diag_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24048), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24048), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24914), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24914), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -8958,11 +9060,11 @@ static void wooden_rc_track_diag_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24006), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24006), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24872), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24872), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -8974,7 +9076,7 @@ static void wooden_rc_track_diag_flat( /** rct2: 0x008AC8B8 */ template -static void wooden_rc_track_diag_25_deg_up( +static void WoodenRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -8987,11 +9089,11 @@ static void wooden_rc_track_diag_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24068), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24068), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24934), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24934), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9001,11 +9103,11 @@ static void wooden_rc_track_diag_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24026), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24026), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24892), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24892), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9019,17 +9121,17 @@ static void wooden_rc_track_diag_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24065), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24065), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24931), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24931), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24069), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24069), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24935), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24935), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9049,17 +9151,17 @@ static void wooden_rc_track_diag_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24023), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24023), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24889), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24889), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24027), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24027), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24893), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24893), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9089,17 +9191,17 @@ static void wooden_rc_track_diag_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24067), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24067), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24933), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24933), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24070), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24070), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24936), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24936), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9119,17 +9221,17 @@ static void wooden_rc_track_diag_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24025), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24025), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24891), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24891), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24028), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24028), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24894), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24894), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9147,11 +9249,11 @@ static void wooden_rc_track_diag_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24066), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24066), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24932), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24932), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9161,11 +9263,11 @@ static void wooden_rc_track_diag_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24024), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24024), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24890), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24890), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9177,7 +9279,7 @@ static void wooden_rc_track_diag_25_deg_up( /** rct2: 0x008AC8E8 */ template -static void wooden_rc_track_diag_60_deg_up( +static void WoodenRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9188,11 +9290,11 @@ static void wooden_rc_track_diag_60_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24044), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24044), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24910), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24910), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -9203,17 +9305,17 @@ static void wooden_rc_track_diag_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24041), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24041), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24907), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24907), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24045), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24045), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24911), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24911), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9240,17 +9342,17 @@ static void wooden_rc_track_diag_60_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24043), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24043), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24909), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24909), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24046), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24046), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24912), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24912), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9265,11 +9367,11 @@ static void wooden_rc_track_diag_60_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24042), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24042), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24908), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24908), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -9280,7 +9382,7 @@ static void wooden_rc_track_diag_60_deg_up( /** rct2: 0x008AC898 */ template -static void wooden_rc_track_diag_flat_to_25_deg_up( +static void WoodenRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9293,11 +9395,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24056), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24056), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24922), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24922), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9307,11 +9409,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24014), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24014), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24880), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24880), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9325,17 +9427,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24053), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24053), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24919), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24919), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24057), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24057), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24923), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24923), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9355,17 +9457,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24011), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24011), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24877), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24877), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24015), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24015), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24881), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24881), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9395,17 +9497,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24055), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24055), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24921), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24921), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24058), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24058), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24924), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24924), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9425,17 +9527,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24013), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24013), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24879), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24879), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24016), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24016), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24882), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24882), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9453,11 +9555,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24054), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24054), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24920), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24920), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9467,11 +9569,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24012), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24012), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24878), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24878), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9483,7 +9585,7 @@ static void wooden_rc_track_diag_flat_to_25_deg_up( /** rct2: 0x008AC8C8 */ template -static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( +static void WoodenRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9494,11 +9596,11 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24032), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24032), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24898), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24898), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -9509,17 +9611,17 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24029), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24029), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24895), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24895), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24033), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24033), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24899), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24899), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9546,17 +9648,17 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24031), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24031), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24897), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24897), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24034), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24034), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24900), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24900), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9571,11 +9673,11 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24030), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24030), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24896), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24896), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -9586,7 +9688,7 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up( /** rct2: 0x008AC8D8 */ template -static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( +static void WoodenRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9597,11 +9699,11 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24038), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24038), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24904), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24904), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -9612,17 +9714,17 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24035), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24035), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24901), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24901), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24039), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24039), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24905), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24905), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9649,17 +9751,17 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24037), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24037), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24903), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24903), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24040), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24040), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24906), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24906), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9674,11 +9776,11 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24036), - { -16, -16, height }, { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24036), { -16, -16, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24902), { -16, -16, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24902), { -16, -16, height }, + { { 0, 0, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -9689,7 +9791,7 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up( /** rct2: 0x008AC8A8 */ template -static void wooden_rc_track_diag_25_deg_up_to_flat( +static void WoodenRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9702,11 +9804,11 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24062), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24062), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24928), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24928), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9716,11 +9818,11 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24020), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24020), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24886), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24886), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9734,17 +9836,17 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24059), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24059), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24925), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24925), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24063), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24063), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24929), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24929), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9764,17 +9866,17 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24017), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24017), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24883), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24883), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24021), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24021), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24887), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24887), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9804,17 +9906,17 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24061), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24061), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24927), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24927), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24064), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24064), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24930), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24930), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9834,17 +9936,17 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24019), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24019), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24885), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24885), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24022), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24022), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24888), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24888), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -9862,11 +9964,11 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24060), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24060), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24926), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24926), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9876,11 +9978,11 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24018), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24018), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24884), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24884), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9892,7 +9994,7 @@ static void wooden_rc_track_diag_25_deg_up_to_flat( /** rct2: 0x008AC918 */ template -static void wooden_rc_track_diag_25_deg_down( +static void WoodenRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -9905,11 +10007,11 @@ static void wooden_rc_track_diag_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24066), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24066), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24932), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24932), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9919,11 +10021,11 @@ static void wooden_rc_track_diag_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24024), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24024), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24890), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24890), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -9937,17 +10039,17 @@ static void wooden_rc_track_diag_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24067), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24067), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24933), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24933), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24070), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24070), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24936), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24936), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -9967,17 +10069,17 @@ static void wooden_rc_track_diag_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24025), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24025), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24891), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24891), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24028), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24028), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24894), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24894), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10007,17 +10109,17 @@ static void wooden_rc_track_diag_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24065), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24065), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24931), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24931), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24069), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24069), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24935), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24935), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10037,17 +10139,17 @@ static void wooden_rc_track_diag_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24023), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24023), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24889), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24889), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24027), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24027), + { -16, -16, height }, { { -16, -16, height + 43 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24893), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 43 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24893), { -16, -16, height }, + { { -16, -16, height + 43 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10065,11 +10167,11 @@ static void wooden_rc_track_diag_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24068), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24068), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24934), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24934), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10079,11 +10181,11 @@ static void wooden_rc_track_diag_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24026), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24026), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24892), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24892), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10095,7 +10197,7 @@ static void wooden_rc_track_diag_25_deg_down( /** rct2: 0x008AC948 */ template -static void wooden_rc_track_diag_60_deg_down( +static void WoodenRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10106,11 +10208,11 @@ static void wooden_rc_track_diag_60_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24042), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24042), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24908), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24908), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10121,17 +10223,17 @@ static void wooden_rc_track_diag_60_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24043), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24043), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24909), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24909), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24046), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24046), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24912), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24912), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10158,17 +10260,17 @@ static void wooden_rc_track_diag_60_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24041), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24041), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24907), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24907), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24045), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24045), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24911), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 91 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24911), { -16, -16, height }, + { { -16, -16, height + 91 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10183,11 +10285,11 @@ static void wooden_rc_track_diag_60_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24044), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24044), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24910), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24910), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10198,7 +10300,7 @@ static void wooden_rc_track_diag_60_deg_down( /** rct2: 0x008AC8F8 */ template -static void wooden_rc_track_diag_flat_to_25_deg_down( +static void WoodenRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10211,11 +10313,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24060), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24060), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24926), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24926), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10225,11 +10327,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24018), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24018), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24884), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24884), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10241,17 +10343,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24061), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24061), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24927), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24927), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24064), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24064), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24930), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24930), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10271,17 +10373,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24019), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24019), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24885), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24885), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24022), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24022), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24888), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24888), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10309,17 +10411,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24059), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24059), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24925), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24925), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24063), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24063), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24929), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24929), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10339,17 +10441,17 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24017), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24017), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24883), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24883), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24021), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24021), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24887), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24887), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10365,11 +10467,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24062), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24062), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24928), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24928), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10379,11 +10481,11 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24020), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24020), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24886), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24886), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10396,7 +10498,7 @@ static void wooden_rc_track_diag_flat_to_25_deg_down( /** rct2: 0x008AC928 */ template -static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( +static void WoodenRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10407,11 +10509,11 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24036), - { -16, -16, height }, { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24036), { -16, -16, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24902), { -16, -16, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24902), { -16, -16, height }, + { { 0, 0, height }, { 16, 16, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10422,17 +10524,17 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24037), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24037), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24903), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24903), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24040), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24040), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24906), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24906), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10459,17 +10561,17 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24035), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24035), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24901), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24901), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24039), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24039), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24905), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24905), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10484,11 +10586,11 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24038), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24038), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24904), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24904), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10499,7 +10601,7 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down( /** rct2: 0x008AC938 */ template -static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( +static void WoodenRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10510,11 +10612,11 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24030), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24030), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24896), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24896), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10525,17 +10627,17 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24031), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24031), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24897), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24897), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24034), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24034), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24900), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24900), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10562,17 +10664,17 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24029), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24029), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24895), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24895), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24033), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24033), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24899), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24899), { -16, -16, height }, + { { -16, -16, height + 59 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10587,11 +10689,11 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24032), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24032), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24898), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24898), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10602,7 +10704,7 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down( /** rct2: 0x008AC908 */ template -static void wooden_rc_track_diag_25_deg_down_to_flat( +static void WoodenRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10615,11 +10717,11 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24054), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24054), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24920), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24920), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10629,11 +10731,11 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24012), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24012), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24878), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24878), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10647,17 +10749,17 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24055), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24055), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24921), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24921), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24058), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24058), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24924), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24924), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10677,17 +10779,17 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24013), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24013), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24879), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24879), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24016), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24016), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24882), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24882), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10717,17 +10819,17 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24053), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24053), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24919), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24919), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24057), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24057), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24923), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24923), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10747,17 +10849,17 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24011), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24011), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24877), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24877), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24015), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24015), + { -16, -16, height }, { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24881), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24881), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10775,11 +10877,11 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24056), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24056), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24922), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24922), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10789,11 +10891,11 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24014), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24014), + { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24880), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24880), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } } @@ -10805,7 +10907,7 @@ static void wooden_rc_track_diag_25_deg_down_to_flat( /** rct2: 0x008ACA18 */ template -static void wooden_rc_track_diag_flat_to_left_bank( +static void WoodenRCTrackDiagFlatToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10816,11 +10918,11 @@ static void wooden_rc_track_diag_flat_to_left_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24080), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24080), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24946), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24946), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10831,17 +10933,17 @@ static void wooden_rc_track_diag_flat_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24077), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24077), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24943), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24943), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24081), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24081), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24947), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24947), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10868,17 +10970,17 @@ static void wooden_rc_track_diag_flat_to_left_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24079), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24079), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24945), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24945), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24082), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24082), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24948), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24948), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10893,11 +10995,11 @@ static void wooden_rc_track_diag_flat_to_left_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24078), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24078), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24944), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24944), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10908,7 +11010,7 @@ static void wooden_rc_track_diag_flat_to_left_bank( /** rct2: 0x008AC9F8 */ template -static void wooden_rc_track_diag_flat_to_right_bank( +static void WoodenRCTrackDiagFlatToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -10919,11 +11021,11 @@ static void wooden_rc_track_diag_flat_to_right_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24086), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24086), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24952), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24952), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -10934,17 +11036,17 @@ static void wooden_rc_track_diag_flat_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24083), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24083), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24949), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24949), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24087), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24087), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24953), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24953), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -10971,17 +11073,17 @@ static void wooden_rc_track_diag_flat_to_right_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24085), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24085), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24951), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24951), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24088), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24088), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24954), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24954), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -10996,11 +11098,11 @@ static void wooden_rc_track_diag_flat_to_right_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24084), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24084), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24950), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24950), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11011,7 +11113,7 @@ static void wooden_rc_track_diag_flat_to_right_bank( /** rct2: 0x008ACA08 */ template -static void wooden_rc_track_diag_left_bank_to_flat( +static void WoodenRCTrackDiagLeftBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11022,11 +11124,11 @@ static void wooden_rc_track_diag_left_bank_to_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24084), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24084), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24950), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24950), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11037,17 +11139,17 @@ static void wooden_rc_track_diag_left_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24085), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24085), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24951), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24951), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24088), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24088), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24954), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24954), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11074,17 +11176,17 @@ static void wooden_rc_track_diag_left_bank_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24083), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24083), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24949), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24949), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24087), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24087), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24953), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24953), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11099,11 +11201,11 @@ static void wooden_rc_track_diag_left_bank_to_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24086), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24086), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24952), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24952), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11114,7 +11216,7 @@ static void wooden_rc_track_diag_left_bank_to_flat( /** rct2: 0x008ACA28 */ template -static void wooden_rc_track_diag_right_bank_to_flat( +static void WoodenRCTrackDiagRightBankToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11125,11 +11227,11 @@ static void wooden_rc_track_diag_right_bank_to_flat( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24078), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24078), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24944), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24944), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11140,17 +11242,17 @@ static void wooden_rc_track_diag_right_bank_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24079), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24079), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24945), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24945), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24082), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24082), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24948), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24948), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11177,17 +11279,17 @@ static void wooden_rc_track_diag_right_bank_to_flat( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24077), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24077), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24943), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24943), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24081), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24081), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24947), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24947), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11202,11 +11304,11 @@ static void wooden_rc_track_diag_right_bank_to_flat( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24080), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24080), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24946), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24946), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11217,7 +11319,7 @@ static void wooden_rc_track_diag_right_bank_to_flat( /** rct2: 0x008ACA58 */ template -static void wooden_rc_track_diag_left_bank_to_25_deg_up( +static void WoodenRCTrackDiagLeftBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11228,11 +11330,11 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24104), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24104), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24970), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24970), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11243,17 +11345,17 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24101), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24101), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24967), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24967), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24105), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24105), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24971), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24971), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11280,17 +11382,17 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24103), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24103), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24969), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24969), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24106), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24106), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24972), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24972), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11305,11 +11407,11 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24102), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24102), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24968), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24968), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11320,7 +11422,7 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_up( /** rct2: 0x008ACA68 */ template -static void wooden_rc_track_diag_right_bank_to_25_deg_up( +static void WoodenRCTrackDiagRightBankTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11331,11 +11433,11 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_up( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24110), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24110), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24976), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24976), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11346,17 +11448,17 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24107), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24107), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24973), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24973), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24111), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24111), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24977), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24977), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11383,17 +11485,17 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_up( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24109), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24109), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24975), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24975), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24112), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24112), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24978), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24978), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11408,11 +11510,11 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_up( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24108), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24108), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24974), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24974), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11423,7 +11525,7 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_up( /** rct2: 0x008ACA38 */ template -static void wooden_rc_track_diag_25_deg_up_to_left_bank( +static void WoodenRCTrackDiag25DegUpToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11434,11 +11536,11 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24092), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24092), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24958), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24958), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11449,17 +11551,17 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24089), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24089), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24955), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24955), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24093), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24093), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24959), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24959), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11486,17 +11588,17 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24091), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24091), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24957), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24957), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24094), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24094), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24960), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24960), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11511,11 +11613,11 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24090), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24090), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24956), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24956), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11526,7 +11628,7 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank( /** rct2: 0x008ACA48 */ template -static void wooden_rc_track_diag_25_deg_up_to_right_bank( +static void WoodenRCTrackDiag25DegUpToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11537,11 +11639,11 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24098), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24098), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24964), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24964), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11552,17 +11654,17 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24095), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24095), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24961), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24961), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24099), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24099), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24965), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24965), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11589,17 +11691,17 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24097), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24097), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24963), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24963), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24100), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24100), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24966), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24966), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11614,11 +11716,11 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24096), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24096), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24962), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24962), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11629,7 +11731,7 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank( /** rct2: 0x008ACA78 */ template -static void wooden_rc_track_diag_left_bank_to_25_deg_down( +static void WoodenRCTrackDiagLeftBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11640,11 +11742,11 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24096), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24096), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24962), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24962), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } break; @@ -11653,17 +11755,17 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24097), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24097), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24963), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24963), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24100), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24100), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24966), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24966), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11688,17 +11790,17 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24095), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24095), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24961), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24961), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24099), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24099), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24965), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24965), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11711,11 +11813,11 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24098), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24098), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24964), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24964), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } break; @@ -11727,7 +11829,7 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down( /** rct2: 0x008ACA88 */ template -static void wooden_rc_track_diag_right_bank_to_25_deg_down( +static void WoodenRCTrackDiagRightBankTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11738,11 +11840,11 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24090), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24090), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24956), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24956), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } break; @@ -11751,17 +11853,17 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24091), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24091), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24957), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24957), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24094), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24094), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24960), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24960), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11786,17 +11888,17 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24089), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24089), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24955), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24955), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24093), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24093), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24959), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24959), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenBSupportsPaintSetup(session, 2, 0, height + 16, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11809,11 +11911,11 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24092), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24092), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24958), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24958), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } break; @@ -11825,7 +11927,7 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down( /** rct2: 0x008ACA98 */ template -static void wooden_rc_track_diag_25_deg_down_to_left_bank( +static void WoodenRCTrackDiag25DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11836,11 +11938,11 @@ static void wooden_rc_track_diag_25_deg_down_to_left_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24108), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24108), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24974), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24974), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11851,17 +11953,17 @@ static void wooden_rc_track_diag_25_deg_down_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24109), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24109), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24975), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24975), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24112), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24112), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24978), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24978), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11888,17 +11990,17 @@ static void wooden_rc_track_diag_25_deg_down_to_left_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24107), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24107), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24973), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24973), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24111), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24111), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24977), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24977), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -11913,11 +12015,11 @@ static void wooden_rc_track_diag_25_deg_down_to_left_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24110), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24110), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24976), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24976), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11928,7 +12030,7 @@ static void wooden_rc_track_diag_25_deg_down_to_left_bank( /** rct2: 0x008ACAA8 */ template -static void wooden_rc_track_diag_25_deg_down_to_right_bank( +static void WoodenRCTrackDiag25DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -11939,11 +12041,11 @@ static void wooden_rc_track_diag_25_deg_down_to_right_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24102), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24102), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24968), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24968), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11954,17 +12056,17 @@ static void wooden_rc_track_diag_25_deg_down_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24103), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24103), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24969), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24969), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24106), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24106), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24972), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24972), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -11991,17 +12093,17 @@ static void wooden_rc_track_diag_25_deg_down_to_right_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24101), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24101), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24967), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24967), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24105), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24105), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24971), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 35 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24971), { -16, -16, height }, + { { -16, -16, height + 35 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -12016,11 +12118,11 @@ static void wooden_rc_track_diag_25_deg_down_to_right_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24104), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24104), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24970), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24970), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12031,7 +12133,7 @@ static void wooden_rc_track_diag_25_deg_down_to_right_bank( /** rct2: 0x008AC9D8 */ template -static void wooden_rc_track_diag_left_bank( +static void WoodenRCTrackDiagLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12042,11 +12144,11 @@ static void wooden_rc_track_diag_left_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24074), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24074), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24940), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24940), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12057,17 +12159,17 @@ static void wooden_rc_track_diag_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24071), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24071), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24937), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24937), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24075), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24075), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24941), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24941), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -12094,17 +12196,17 @@ static void wooden_rc_track_diag_left_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24073), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24073), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24939), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24939), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24076), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24076), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24942), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24942), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -12119,11 +12221,11 @@ static void wooden_rc_track_diag_left_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24072), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24072), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24938), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24938), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12134,7 +12236,7 @@ static void wooden_rc_track_diag_left_bank( /** rct2: 0x008AC9E8 */ template -static void wooden_rc_track_diag_right_bank( +static void WoodenRCTrackDiagRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12145,11 +12247,11 @@ static void wooden_rc_track_diag_right_bank( { case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24072), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24072), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24938), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24938), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12160,17 +12262,17 @@ static void wooden_rc_track_diag_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24073), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24073), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24939), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24939), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24076), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24076), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24942), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24942), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: @@ -12197,17 +12299,17 @@ static void wooden_rc_track_diag_right_bank( break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24071), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24071), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24937), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24937), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24075), - { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24075), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24941), { -16, -16, height }, - { 32, 32, 0 }, { -16, -16, height + 27 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24941), { -16, -16, height }, + { { -16, -16, height + 27 }, { 32, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: @@ -12222,11 +12324,11 @@ static void wooden_rc_track_diag_right_bank( { case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24074), - { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24074), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24940), { -16, -16, height }, - { 32, 32, 2 }, { -16, -16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24940), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); break; } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12237,7 +12339,7 @@ static void wooden_rc_track_diag_right_bank( /** rct2: 0x008ACB38 */ template -static void wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( +static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12248,50 +12350,50 @@ static void wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23958), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23958), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24824), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24824), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23960), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23960), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24826), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24826), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23971), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23971), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24837), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24837), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23962), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23962), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24828), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24828), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23956), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23956), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24822), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24822), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23969), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23969), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24835), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24835), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12315,56 +12417,56 @@ static void wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23957), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23957), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24823), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24823), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23959), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23959), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24825), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24825), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23970), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23970), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24836), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24836), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23961), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23961), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24827), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24827), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23972), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23972), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24838), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24838), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23955), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23955), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24821), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24821), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23968), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23968), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24834), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24834), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12385,7 +12487,7 @@ static void wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up( /** rct2: 0x008ACB48 */ template -static void wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( +static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12396,50 +12498,50 @@ static void wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23947), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23947), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24813), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24813), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23963), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23963), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24829), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24829), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23949), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23949), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24815), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24815), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23951), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23951), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24817), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24817), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23966), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23966), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24832), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24832), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23953), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23953), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24819), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24819), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12463,56 +12565,56 @@ static void wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23948), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23948), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24814), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24814), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23964), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23964), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24830), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24830), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23950), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23950), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24816), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24816), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23965), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23965), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24831), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24831), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23952), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23952), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24818), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24818), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23967), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23967), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24833), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24833), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23954), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23954), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24820), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24820), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12533,7 +12635,7 @@ static void wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up( /** rct2: 0x008ACB58 */ template -static void wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( +static void WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12544,56 +12646,56 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23950), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23950), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24816), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24816), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23965), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23965), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24831), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24831), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23952), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23952), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24818), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24818), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23967), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23967), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24833), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24833), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23954), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23954), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24820), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24820), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23948), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23948), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24814), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24814), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23964), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23964), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24830), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24830), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12617,50 +12719,50 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23949), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23949), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24815), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24815), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23951), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23951), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24817), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24817), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23966), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23966), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24832), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24832), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23953), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23953), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24819), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24819), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23947), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23947), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24813), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24813), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23963), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23963), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24829), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24829), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12681,7 +12783,7 @@ static void wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank( /** rct2: 0x008ACB68 */ template -static void wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( +static void WoodenRCTrackRightQuarterTurn325DegDownToRightBank( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12692,56 +12794,56 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23955), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23955), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24821), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24821), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23968), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23968), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24834), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24834), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23957), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23957), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24823), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24823), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23959), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23959), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24825), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24825), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23970), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23970), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24836), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24836), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23961), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23961), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24827), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24827), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23972), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23972), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24838), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24838), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12765,50 +12867,50 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23956), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23956), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24822), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24822), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23969), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23969), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24835), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24835), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23958), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23958), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24824), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24824), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23960), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23960), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24826), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24826), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23971), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23971), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24837), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24837), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23962), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23962), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24828), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24828), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12829,14 +12931,15 @@ static void wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank( /** rct2: 0x008ACDF8 */ template -static void wooden_rc_track_block_brakes( +static void WoodenRCTrackBlockBrakes( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - const auto brakeImg = trackElement.BlockBrakeClosed() ? _wooden_rc_block_brakes_image_ids[direction][1] - : _wooden_rc_block_brakes_image_ids[direction][0]; - wooden_rc_track_paint( - session, brakeImg, _wooden_rc_block_brakes_image_ids[direction][2], direction, 0, 2, 32, 25, 2, height, 0, 3, height); + const auto brakeImg = trackElement.IsBrakeClosed() ? _wooden_rc_block_brakes_image_ids[direction][1] + : _wooden_rc_block_brakes_image_ids[direction][0]; + WoodenRCTrackPaint( + session, direction, brakeImg, _wooden_rc_block_brakes_image_ids[direction][2], { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -12845,7 +12948,7 @@ static void wooden_rc_track_block_brakes( /** rct2: 0x008ACCB8 */ template -static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( +static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -12856,50 +12959,50 @@ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23932), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23932), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24798), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24798), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23934), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23934), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24800), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24800), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23945), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23945), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24811), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24811), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23936), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23936), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24802), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24802), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23930), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23930), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24796), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24796), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23943), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23943), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24809), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24809), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12923,56 +13026,56 @@ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23931), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23931), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24797), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24797), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23933), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23933), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24799), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24799), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23944), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23944), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24810), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24810), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23935), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23935), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24801), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24801), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23946), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23946), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24812), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24812), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23929), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23929), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24795), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24795), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23942), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23942), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24808), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24808), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -12993,7 +13096,7 @@ static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ACCC8 */ template -static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( +static void WoodenRCTrackRightBankedQuarterTurn325DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13004,50 +13107,50 @@ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23921), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23921), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24787), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24787), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23937), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23937), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24803), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24803), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23923), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23923), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24789), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24789), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23925), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23925), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24791), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24791), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23940), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23940), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24806), { 0, 6, height }, - { 32, 20, 0 }, { 0, 6, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24806), { 0, 6, height }, + { { 0, 6, height + 67 }, { 32, 20, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23927), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23927), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24793), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24793), { 0, 6, height }, + { { 0, 6, height }, { 32, 20, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13071,56 +13174,56 @@ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23922), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23922), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24788), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24788), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23938), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23938), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24804), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24804), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23924), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23924), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24790), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24790), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23939), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23939), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24805), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24805), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23926), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23926), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24792), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24792), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23941), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23941), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24807), { 6, 0, height }, - { 20, 32, 0 }, { 6, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24807), { 6, 0, height }, + { { 6, 0, height + 67 }, { 20, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(23928), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(23928), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(24794), { 6, 0, height }, - { 20, 32, 2 }, { 6, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(24794), { 6, 0, height }, + { { 6, 0, height }, { 20, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13141,29 +13244,29 @@ static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( /** rct2: 0x008ACCD8 */ template -static void wooden_rc_track_left_banked_quarter_turn_3_25_deg_down( +static void WoodenRCTrackLeftBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_right_banked_quarter_turn_3_25_deg_up( + WoodenRCTrackRightBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ACCE8 */ template -static void wooden_rc_track_right_banked_quarter_turn_3_25_deg_down( +static void WoodenRCTrackRightBankedQuarterTurn325DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_rc_track_left_banked_quarter_turn_3_25_deg_up( + WoodenRCTrackLeftBankedQuarterTurn325DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ACC38 */ template -static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( +static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13174,44 +13277,44 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24321), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24321), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25187), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25187), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24326), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24326), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25192), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25192), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24352), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24352), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25218), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25218), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24331), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24331), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25197), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25197), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24336), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24336), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25202), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25202), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13232,50 +13335,50 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24322), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24322), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25188), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25188), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24327), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24327), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25193), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25193), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24353), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24353), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25219), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25219), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24332), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24332), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25198), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25198), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24337), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24337), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25203), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25203), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24359), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24359), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25225), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25225), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13290,50 +13393,50 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24323), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24323), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25189), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25189), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24328), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24328), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25194), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25194), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24354), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24354), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25220), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25220), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24333), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24333), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25199), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25199), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24338), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24338), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25204), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25204), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24360), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24360), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25226), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25226), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13355,56 +13458,56 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24324), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24324), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25190), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25190), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24329), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24329), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25195), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25195), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24355), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24355), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25221), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25221), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24334), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24334), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25200), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25200), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24357), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24357), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25223), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25223), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24339), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24339), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25205), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25205), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24361), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24361), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25227), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25227), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13419,56 +13522,56 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24325), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24325), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25191), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25191), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24330), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24330), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25196), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25196), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24356), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24356), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25222), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25222), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24335), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24335), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25201), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25201), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24358), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24358), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25224), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25224), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24340), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24340), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25206), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25206), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24362), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24362), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25228), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25228), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13489,7 +13592,7 @@ static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ACC48 */ template -static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( +static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13500,44 +13603,44 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24301), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24301), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25167), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25167), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24306), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24306), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25172), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25172), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24311), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24311), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25177), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25177), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24347), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24347), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25213), { 0, 0, height }, - { 32, 27, 0 }, { 0, 2, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25213), { 0, 0, height }, + { { 0, 2, height + 67 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24316), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24316), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25182), { 0, 0, height }, - { 32, 27, 2 }, { 0, 2, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25182), { 0, 0, height }, + { { 0, 2, height }, { 32, 27, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13558,50 +13661,50 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24302), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24302), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25168), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25168), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24341), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24341), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25207), { 0, 0, height }, - { 32, 16, 0 }, { 0, 16, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25207), { 0, 0, height }, + { { 0, 16, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24307), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24307), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25173), { 0, 0, height }, - { 32, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25173), { 0, 0, height }, + { { 0, 16, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24312), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24312), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25178), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25178), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24348), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24348), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25214), { 0, 0, height }, - { 32, 16, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25214), { 0, 0, height }, + { { 0, 0, height + 67 }, { 32, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24317), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24317), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25183), { 0, 0, height }, - { 32, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25183), { 0, 0, height }, + { { 0, 0, height }, { 32, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13616,50 +13719,50 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24303), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24303), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25169), { 0, 0, height }, - { 16, 16, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25169), { 0, 0, height }, + { { 0, 0, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24342), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24342), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25208), { 0, 0, height }, - { 16, 16, 0 }, { 0, 0, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25208), { 0, 0, height }, + { { 0, 0, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24308), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24308), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25174), { 0, 0, height }, - { 16, 16, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25174), { 0, 0, height }, + { { 16, 0, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24313), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24313), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25179), { 0, 0, height }, - { 16, 16, 2 }, { 16, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25179), { 0, 0, height }, + { { 16, 16, height }, { 16, 16, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24349), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24349), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25215), { 0, 0, height }, - { 16, 16, 0 }, { 16, 16, height + 59 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25215), { 0, 0, height }, + { { 16, 16, height + 59 }, { 16, 16, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24318), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24318), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25184), { 0, 0, height }, - { 16, 16, 2 }, { 0, 16, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25184), { 0, 0, height }, + { { 0, 16, height }, { 16, 16, 2 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13681,56 +13784,56 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24304), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24304), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25170), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25170), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24343), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24343), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25209), { 0, 0, height }, - { 16, 32, 0 }, { 16, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25209), { 0, 0, height }, + { { 16, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24309), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24309), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25175), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25175), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24345), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24345), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25211), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25211), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24314), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24314), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25180), { 0, 0, height }, - { 16, 32, 2 }, { 0, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25180), { 0, 0, height }, + { { 0, 0, height }, { 16, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24350), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24350), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25216), { 0, 0, height }, - { 16, 32, 0 }, { 0, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25216), { 0, 0, height }, + { { 0, 0, height + 67 }, { 16, 32, 0 } }); WoodenASupportsPaintSetup(session, 2, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24319), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24319), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25185), { 0, 0, height }, - { 16, 32, 2 }, { 16, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25185), { 0, 0, height }, + { { 16, 0, height }, { 16, 32, 2 } }); WoodenASupportsPaintSetup(session, 3, 0, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13745,56 +13848,56 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24305), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24305), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25171), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25171), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24344), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24344), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25210), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25210), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24310), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24310), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25176), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25176), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24346), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24346), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25212), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25212), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24315), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24315), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25181), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25181), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24351), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24351), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25217), { 0, 0, height }, - { 27, 32, 0 }, { 2, 0, height + 67 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25217), { 0, 0, height }, + { { 2, 0, height + 67 }, { 27, 32, 0 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24320), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24320), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25186), { 0, 0, height }, - { 27, 32, 2 }, { 2, 0, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25186), { 0, 0, height }, + { { 2, 0, height }, { 27, 32, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13815,29 +13918,29 @@ static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( /** rct2: 0x008ACC58 */ template -static void wooden_rc_track_left_banked_quarter_turn_5_25_deg_down( +static void WoodenRCTrackLeftBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_right_banked_quarter_turn_5_25_deg_up( + WoodenRCTrackRightBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction + 1) & 3, height, trackElement); } /** rct2: 0x008ACC68 */ template -static void wooden_rc_track_right_banked_quarter_turn_5_25_deg_down( +static void WoodenRCTrackRightBankedQuarterTurn525DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - wooden_rc_track_left_banked_quarter_turn_5_25_deg_up( + WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008ACCF8 */ template -static void wooden_rc_track_25_deg_up_to_left_banked_25_deg_up( +static void WoodenRCTrack25DegUpToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13845,38 +13948,38 @@ static void wooden_rc_track_25_deg_up_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24261), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24261), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25127), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25127), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24262), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24262), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25128), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25128), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24263), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24263), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25129), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25129), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24264), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24264), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25130), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25130), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13894,7 +13997,7 @@ static void wooden_rc_track_25_deg_up_to_left_banked_25_deg_up( /** rct2: 0x008ACD08 */ template -static void wooden_rc_track_25_deg_up_to_right_banked_25_deg_up( +static void WoodenRCTrack25DegUpToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13902,38 +14005,38 @@ static void wooden_rc_track_25_deg_up_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24265), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24265), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25131), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25131), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24266), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24266), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25132), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25132), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24267), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24267), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25133), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25133), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24268), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24268), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25134), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25134), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -13951,7 +14054,7 @@ static void wooden_rc_track_25_deg_up_to_right_banked_25_deg_up( /** rct2: 0x008ACD18 */ template -static void wooden_rc_track_left_banked_25_deg_up_to_25_deg_up( +static void WoodenRCTrackLeftBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -13959,38 +14062,38 @@ static void wooden_rc_track_left_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24269), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24269), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25135), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25135), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24270), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24270), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25136), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25136), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24271), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24271), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25137), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25137), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24272), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24272), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25138), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25138), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14008,7 +14111,7 @@ static void wooden_rc_track_left_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ACD28 */ template -static void wooden_rc_track_right_banked_25_deg_up_to_25_deg_up( +static void WoodenRCTrackRightBanked25DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14016,38 +14119,38 @@ static void wooden_rc_track_right_banked_25_deg_up_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24273), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24273), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25139), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25139), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24274), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24274), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25140), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25140), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24275), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24275), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25141), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25141), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24276), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24276), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25142), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25142), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14065,47 +14168,45 @@ static void wooden_rc_track_right_banked_25_deg_up_to_25_deg_up( /** rct2: 0x008ACD38 */ template -static void wooden_rc_track_25_deg_down_to_left_banked_25_deg_down( +static void WoodenRCTrack25DegDownToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_right_banked_25_deg_up_to_25_deg_up( + WoodenRCTrackRightBanked25DegUpTo25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACD48 */ template -static void wooden_rc_track_25_deg_down_to_right_banked_25_deg_down( +static void WoodenRCTrack25DegDownToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_banked_25_deg_up_to_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackLeftBanked25DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACD58 */ template -static void wooden_rc_track_left_banked_25_deg_down_to_25_deg_down( +static void WoodenRCTrackLeftBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_to_right_banked_25_deg_up( + WoodenRCTrack25DegUpToRightBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACD68 */ template -static void wooden_rc_track_right_banked_25_deg_down_to_25_deg_down( +static void WoodenRCTrackRightBanked25DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_25_deg_up_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrack25DegUpToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACD78 */ template -static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up( +static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14113,50 +14214,50 @@ static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24277), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24277), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25143), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25143), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24278), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24278), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25144), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25144), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24293), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24293), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25159), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25159), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24279), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24279), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25145), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25145), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24294), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24294), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25160), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25160), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24280), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24280), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25146), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25146), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14174,7 +14275,7 @@ static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up( /** rct2: 0x008ACD88 */ template -static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up( +static void WoodenRCTrackRightBankedFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14182,50 +14283,50 @@ static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24281), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24281), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25147), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25147), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24282), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24282), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25148), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25148), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24295), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24295), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25161), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25161), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24283), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24283), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25149), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25149), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24296), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24296), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25162), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25162), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24284), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24284), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25150), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25150), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14243,7 +14344,7 @@ static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up( /** rct2: 0x008ACD98 */ template -static void wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat( +static void WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14251,50 +14352,50 @@ static void wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24285), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24285), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25151), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25151), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24286), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24286), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25152), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25152), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24297), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24297), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25163), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25163), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24287), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24287), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25153), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25153), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24298), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24298), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25164), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25164), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24288), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24288), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25154), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25154), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14312,7 +14413,7 @@ static void wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat( /** rct2: 0x008ACDA8 */ template -static void wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat( +static void WoodenRCTrackRightBanked25DegUpToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14320,50 +14421,50 @@ static void wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24289), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24289), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25155), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25155), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24290), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24290), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25156), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25156), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24299), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24299), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25165), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25165), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24291), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24291), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25157), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25157), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24300), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24300), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25166), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25166), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24292), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24292), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25158), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25158), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14381,47 +14482,47 @@ static void wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat( /** rct2: 0x008ACDB8 */ template -static void wooden_rc_track_left_banked_flat_to_left_banked_25_deg_down( +static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat( + WoodenRCTrackRightBanked25DegUpToRightBankedFlat( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACDC8 */ template -static void wooden_rc_track_right_banked_flat_to_right_banked_25_deg_down( +static void WoodenRCTrackRightBankedFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat( + WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACDD8 */ template -static void wooden_rc_track_left_banked_25_deg_down_to_left_banked_flat( +static void WoodenRCTrackLeftBanked25DegDownToLeftBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up( + WoodenRCTrackRightBankedFlatToRightBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACDE8 */ template -static void wooden_rc_track_right_banked_25_deg_down_to_right_banked_flat( +static void WoodenRCTrackRightBanked25DegDownToRightBankedFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up( + WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACBB8 */ template -static void wooden_rc_track_flat_to_left_banked_25_deg_up( +static void WoodenRCTrackFlatToLeftBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14429,50 +14530,50 @@ static void wooden_rc_track_flat_to_left_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24225), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24225), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25091), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25091), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24226), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24226), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25092), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25092), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24241), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24241), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25107), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25107), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24227), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24227), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25093), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25093), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24242), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24242), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25108), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25108), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24228), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24228), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25094), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25094), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14490,7 +14591,7 @@ static void wooden_rc_track_flat_to_left_banked_25_deg_up( /** rct2: 0x008ACBC8 */ template -static void wooden_rc_track_flat_to_right_banked_25_deg_up( +static void WoodenRCTrackFlatToRightBanked25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14498,50 +14599,50 @@ static void wooden_rc_track_flat_to_right_banked_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24229), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24229), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25095), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25095), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24230), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24230), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25096), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25096), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24243), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24243), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25109), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25109), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24231), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24231), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25097), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25097), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24244), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24244), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25110), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25110), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24232), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24232), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25098), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25098), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14559,7 +14660,7 @@ static void wooden_rc_track_flat_to_right_banked_25_deg_up( /** rct2: 0x008ACBD8 */ template -static void wooden_rc_track_left_banked_25_deg_up_to_flat( +static void WoodenRCTrackLeftBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14567,50 +14668,50 @@ static void wooden_rc_track_left_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24233), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24233), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25099), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25099), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24234), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24234), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25100), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25100), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24245), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24245), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25111), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25111), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24235), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24235), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25101), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25101), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24246), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24246), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25112), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25112), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24236), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24236), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25102), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25102), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14628,7 +14729,7 @@ static void wooden_rc_track_left_banked_25_deg_up_to_flat( /** rct2: 0x008ACBE8 */ template -static void wooden_rc_track_right_banked_25_deg_up_to_flat( +static void WoodenRCTrackRightBanked25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14636,50 +14737,50 @@ static void wooden_rc_track_right_banked_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24237), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24237), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25103), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25103), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 1: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24238), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24238), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25104), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25104), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24247), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24247), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25113), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25113), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 2: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24239), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24239), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25105), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25105), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24248), { 0, 0, height }, - { 32, 1, 9 }, { 0, 26, height + 5 }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24248), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25114), { 0, 0, height }, { 32, 1, 9 }, - { 0, 26, height + 5 }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25114), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); break; case 3: PaintAddImageAsParentRotated( - session, direction, wooden_rc_get_track_colour(session).WithIndex(24240), { 0, 0, height }, - { 32, 25, 2 }, { 0, 3, height }); + session, direction, WoodenRCGetTrackColour(session).WithIndex(24240), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); PaintAddImageAsChildRotated( - session, direction, wooden_rc_get_rails_colour(session).WithIndex(25106), { 0, 0, height }, { 32, 25, 2 }, - { 0, 3, height }); + session, direction, WoodenRCGetRailsColour(session).WithIndex(25106), { 0, 0, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); break; } @@ -14697,46 +14798,42 @@ static void wooden_rc_track_right_banked_25_deg_up_to_flat( /** rct2: 0x008ACBF8 */ template -static void wooden_rc_track_flat_to_left_banked_25_deg_down( +static void WoodenRCTrackFlatToLeftBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_right_banked_25_deg_up_to_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackRightBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACC08 */ template -static void wooden_rc_track_flat_to_right_banked_25_deg_down( +static void WoodenRCTrackFlatToRightBanked25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_left_banked_25_deg_up_to_flat( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackLeftBanked25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACC18 */ template -static void wooden_rc_track_left_banked_25_deg_down_to_flat( +static void WoodenRCTrackLeftBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_flat_to_right_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackFlatToRightBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008ACC28 */ template -static void wooden_rc_track_right_banked_25_deg_down_to_flat( +static void WoodenRCTrackRightBanked25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_rc_track_flat_to_left_banked_25_deg_up( - session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenRCTrackFlatToLeftBanked25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } template -static void wooden_rc_track_booster( +static void WoodenRCTrackBooster( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -14753,310 +14850,311 @@ static void wooden_rc_track_booster( SPR_WOODEN_RC_FLAT_CHAIN_RAILS_SE_NW, }; - wooden_rc_track_paint( - session, imageIds[direction], railsImageIds[direction], direction, 0, 2, 32, 25, 2, height, 0, 3, height); + WoodenRCTrackPaint( + session, direction, imageIds[direction], railsImageIds[direction], { 0, 2, height }, + { { 0, 3, height }, { 32, 25, 2 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -template TRACK_PAINT_FUNCTION get_track_paint_function_wooden_and_classic_wooden_rc(int32_t trackType) +template TRACK_PAINT_FUNCTION GetTrackPaintFunctionWoodenAndClassicWoodenRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return wooden_rc_track_flat; + return WoodenRCTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return wooden_rc_track_station; + return WoodenRCTrackStation; case TrackElemType::Up25: - return wooden_rc_track_25_deg_up; + return WoodenRCTrack25DegUp; case TrackElemType::Up60: - return wooden_rc_track_60_deg_up; + return WoodenRCTrack60DegUp; case TrackElemType::FlatToUp25: - return wooden_rc_track_flat_to_25_deg_up; + return WoodenRCTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return wooden_rc_track_25_deg_up_to_60_deg_up; + return WoodenRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return wooden_rc_track_60_deg_up_to_25_deg_up; + return WoodenRCTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return wooden_rc_track_25_deg_up_to_flat; + return WoodenRCTrack25DegUpToFlat; case TrackElemType::Down25: - return wooden_rc_track_25_deg_down; + return WoodenRCTrack25DegDown; case TrackElemType::Down60: - return wooden_rc_track_60_deg_down; + return WoodenRCTrack60DegDown; case TrackElemType::FlatToDown25: - return wooden_rc_track_flat_to_25_deg_down; + return WoodenRCTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return wooden_rc_track_25_deg_down_to_60_deg_down; + return WoodenRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return wooden_rc_track_60_deg_down_to_25_deg_down; + return WoodenRCTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return wooden_rc_track_25_deg_down_to_flat; + return WoodenRCTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return wooden_rc_track_left_quarter_turn_5; + return WoodenRCTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return wooden_rc_track_right_quarter_turn_5; + return WoodenRCTrackRightQuarterTurn5; case TrackElemType::FlatToLeftBank: - return wooden_rc_track_flat_to_left_bank; + return WoodenRCTrackFlatToLeftBank; case TrackElemType::FlatToRightBank: - return wooden_rc_track_flat_to_right_bank; + return WoodenRCTrackFlatToRightBank; case TrackElemType::LeftBankToFlat: - return wooden_rc_track_left_bank_to_flat; + return WoodenRCTrackLeftBankToFlat; case TrackElemType::RightBankToFlat: - return wooden_rc_track_right_bank_to_flat; + return WoodenRCTrackRightBankToFlat; case TrackElemType::BankedLeftQuarterTurn5Tiles: - return wooden_rc_track_banked_left_quarter_turn_5; + return WoodenRCTrackBankedLeftQuarterTurn5; case TrackElemType::BankedRightQuarterTurn5Tiles: - return wooden_rc_track_banked_right_quarter_turn_5; + return WoodenRCTrackBankedRightQuarterTurn5; case TrackElemType::LeftBankToUp25: - return wooden_rc_track_left_bank_to_25_deg_up; + return WoodenRCTrackLeftBankTo25DegUp; case TrackElemType::RightBankToUp25: - return wooden_rc_track_right_bank_to_25_deg_up; + return WoodenRCTrackRightBankTo25DegUp; case TrackElemType::Up25ToLeftBank: - return wooden_rc_track_25_deg_up_to_left_bank; + return WoodenRCTrack25DegUpToLeftBank; case TrackElemType::Up25ToRightBank: - return wooden_rc_track_25_deg_up_to_right_bank; + return WoodenRCTrack25DegUpToRightBank; case TrackElemType::LeftBankToDown25: - return wooden_rc_track_left_bank_to_25_deg_down; + return WoodenRCTrackLeftBankTo25DegDown; case TrackElemType::RightBankToDown25: - return wooden_rc_track_right_bank_to_25_deg_down; + return WoodenRCTrackRightBankTo25DegDown; case TrackElemType::Down25ToLeftBank: - return wooden_rc_track_25_deg_down_to_left_bank; + return WoodenRCTrack25DegDownToLeftBank; case TrackElemType::Down25ToRightBank: - return wooden_rc_track_25_deg_down_to_right_bank; + return WoodenRCTrack25DegDownToRightBank; case TrackElemType::LeftBank: - return wooden_rc_track_left_bank; + return WoodenRCTrackLeftBank; case TrackElemType::RightBank: - return wooden_rc_track_right_bank; + return WoodenRCTrackRightBank; case TrackElemType::LeftQuarterTurn5TilesUp25: - return wooden_rc_track_left_quarter_turn_5_25_deg_up; + return WoodenRCTrackLeftQuarterTurn525DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return wooden_rc_track_right_quarter_turn_5_25_deg_up; + return WoodenRCTrackRightQuarterTurn525DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return wooden_rc_track_left_quarter_turn_5_25_deg_down; + return WoodenRCTrackLeftQuarterTurn525DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return wooden_rc_track_right_quarter_turn_5_25_deg_down; + return WoodenRCTrackRightQuarterTurn525DegDown; case TrackElemType::SBendLeft: - return wooden_rc_track_s_bend_left; + return WoodenRCTrackSBendLeft; case TrackElemType::SBendRight: - return wooden_rc_track_s_bend_right; + return WoodenRCTrackSBendRight; case TrackElemType::LeftVerticalLoop: - return wooden_rc_track_left_vertical_loop; + return WoodenRCTrackLeftVerticalLoop; case TrackElemType::RightVerticalLoop: - return wooden_rc_track_right_vertical_loop; + return WoodenRCTrackRightVerticalLoop; case TrackElemType::LeftQuarterTurn3Tiles: - return wooden_rc_track_left_quarter_turn_3; + return WoodenRCTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return wooden_rc_track_right_quarter_turn_3; + return WoodenRCTrackRightQuarterTurn3; case TrackElemType::LeftBankedQuarterTurn3Tiles: - return wooden_rc_track_left_quarter_turn_3_bank; + return WoodenRCTrackLeftQuarterTurn3Bank; case TrackElemType::RightBankedQuarterTurn3Tiles: - return wooden_rc_track_right_quarter_turn_3_bank; + return WoodenRCTrackRightQuarterTurn3Bank; case TrackElemType::LeftQuarterTurn3TilesUp25: - return wooden_rc_track_left_quarter_turn_3_25_deg_up; + return WoodenRCTrackLeftQuarterTurn325DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return wooden_rc_track_right_quarter_turn_3_25_deg_up; + return WoodenRCTrackRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return wooden_rc_track_left_quarter_turn_3_25_deg_down; + return WoodenRCTrackLeftQuarterTurn325DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return wooden_rc_track_right_quarter_turn_3_25_deg_down; + return WoodenRCTrackRightQuarterTurn325DegDown; case TrackElemType::LeftHalfBankedHelixUpSmall: - return wooden_rc_track_left_half_banked_helix_up_small; + return WoodenRCTrackLeftHalfBankedHelixUpSmall; case TrackElemType::RightHalfBankedHelixUpSmall: - return wooden_rc_track_right_half_banked_helix_up_small; + return WoodenRCTrackRightHalfBankedHelixUpSmall; case TrackElemType::LeftHalfBankedHelixDownSmall: - return wooden_rc_track_left_half_banked_helix_down_small; + return WoodenRCTrackLeftHalfBankedHelixDownSmall; case TrackElemType::RightHalfBankedHelixDownSmall: - return wooden_rc_track_right_half_banked_helix_down_small; + return WoodenRCTrackRightHalfBankedHelixDownSmall; case TrackElemType::LeftHalfBankedHelixUpLarge: - return wooden_rc_track_left_half_banked_helix_up_large; + return WoodenRCTrackLeftHalfBankedHelixUpLarge; case TrackElemType::RightHalfBankedHelixUpLarge: - return wooden_rc_track_right_half_banked_helix_up_large; + return WoodenRCTrackRightHalfBankedHelixUpLarge; case TrackElemType::LeftHalfBankedHelixDownLarge: - return wooden_rc_track_left_half_banked_helix_down_large; + return WoodenRCTrackLeftHalfBankedHelixDownLarge; case TrackElemType::RightHalfBankedHelixDownLarge: - return wooden_rc_track_right_half_banked_helix_down_large; + return WoodenRCTrackRightHalfBankedHelixDownLarge; case TrackElemType::LeftQuarterTurn1TileUp60: - return wooden_rc_track_left_quarter_turn_1_60_deg_up; + return WoodenRCTrackLeftQuarterTurn160DegUp; case TrackElemType::RightQuarterTurn1TileUp60: - return wooden_rc_track_right_quarter_turn_1_60_deg_up; + return WoodenRCTrackRightQuarterTurn160DegUp; case TrackElemType::LeftQuarterTurn1TileDown60: - return wooden_rc_track_left_quarter_turn_1_60_deg_down; + return WoodenRCTrackLeftQuarterTurn160DegDown; case TrackElemType::RightQuarterTurn1TileDown60: - return wooden_rc_track_right_quarter_turn_1_60_deg_down; + return WoodenRCTrackRightQuarterTurn160DegDown; case TrackElemType::Brakes: - return wooden_rc_track_brakes; + return WoodenRCTrackBrakes; case TrackElemType::Up25LeftBanked: - return wooden_rc_track_25_deg_up_left_banked; + return WoodenRCTrack25DegUpLeftBanked; case TrackElemType::Up25RightBanked: - return wooden_rc_track_25_deg_up_right_banked; + return WoodenRCTrack25DegUpRightBanked; case TrackElemType::OnRidePhoto: - return wooden_rc_track_on_ride_photo; + return WoodenRCTrackOnRidePhoto; case TrackElemType::Down25LeftBanked: - return wooden_rc_track_25_deg_down_left_banked; + return WoodenRCTrack25DegDownLeftBanked; case TrackElemType::Down25RightBanked: - return wooden_rc_track_25_deg_down_right_banked; + return WoodenRCTrack25DegDownRightBanked; case TrackElemType::Watersplash: - return wooden_rc_track_water_splash; + return WoodenRCTrackWaterSplash; case TrackElemType::LeftEighthToDiag: - return wooden_rc_track_left_eighth_to_diag; + return WoodenRCTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return wooden_rc_track_right_eighth_to_diag; + return WoodenRCTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return wooden_rc_track_left_eighth_to_orthogonal; + return WoodenRCTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return wooden_rc_track_right_eighth_to_orthogonal; + return WoodenRCTrackRightEighthToOrthogonal; case TrackElemType::LeftEighthBankToDiag: - return wooden_rc_track_left_eighth_bank_to_diag; + return WoodenRCTrackLeftEighthBankToDiag; case TrackElemType::RightEighthBankToDiag: - return wooden_rc_track_right_eighth_bank_to_diag; + return WoodenRCTrackRightEighthBankToDiag; case TrackElemType::LeftEighthBankToOrthogonal: - return wooden_rc_track_left_eighth_bank_to_orthogonal; + return WoodenRCTrackLeftEighthBankToOrthogonal; case TrackElemType::RightEighthBankToOrthogonal: - return wooden_rc_track_right_eighth_bank_to_orthogonal; + return WoodenRCTrackRightEighthBankToOrthogonal; case TrackElemType::DiagFlat: - return wooden_rc_track_diag_flat; + return WoodenRCTrackDiagFlat; case TrackElemType::DiagUp25: - return wooden_rc_track_diag_25_deg_up; + return WoodenRCTrackDiag25DegUp; case TrackElemType::DiagUp60: - return wooden_rc_track_diag_60_deg_up; + return WoodenRCTrackDiag60DegUp; case TrackElemType::DiagFlatToUp25: - return wooden_rc_track_diag_flat_to_25_deg_up; + return WoodenRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToUp60: - return wooden_rc_track_diag_25_deg_up_to_60_deg_up; + return WoodenRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return wooden_rc_track_diag_60_deg_up_to_25_deg_up; + return WoodenRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return wooden_rc_track_diag_25_deg_up_to_flat; + return WoodenRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return wooden_rc_track_diag_25_deg_down; + return WoodenRCTrackDiag25DegDown; case TrackElemType::DiagDown60: - return wooden_rc_track_diag_60_deg_down; + return WoodenRCTrackDiag60DegDown; case TrackElemType::DiagFlatToDown25: - return wooden_rc_track_diag_flat_to_25_deg_down; + return WoodenRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToDown60: - return wooden_rc_track_diag_25_deg_down_to_60_deg_down; + return WoodenRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return wooden_rc_track_diag_60_deg_down_to_25_deg_down; + return WoodenRCTrackDiag60DegDownTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return wooden_rc_track_diag_25_deg_down_to_flat; + return WoodenRCTrackDiag25DegDownToFlat; case TrackElemType::DiagFlatToLeftBank: - return wooden_rc_track_diag_flat_to_left_bank; + return WoodenRCTrackDiagFlatToLeftBank; case TrackElemType::DiagFlatToRightBank: - return wooden_rc_track_diag_flat_to_right_bank; + return WoodenRCTrackDiagFlatToRightBank; case TrackElemType::DiagLeftBankToFlat: - return wooden_rc_track_diag_left_bank_to_flat; + return WoodenRCTrackDiagLeftBankToFlat; case TrackElemType::DiagRightBankToFlat: - return wooden_rc_track_diag_right_bank_to_flat; + return WoodenRCTrackDiagRightBankToFlat; case TrackElemType::DiagLeftBankToUp25: - return wooden_rc_track_diag_left_bank_to_25_deg_up; + return WoodenRCTrackDiagLeftBankTo25DegUp; case TrackElemType::DiagRightBankToUp25: - return wooden_rc_track_diag_right_bank_to_25_deg_up; + return WoodenRCTrackDiagRightBankTo25DegUp; case TrackElemType::DiagUp25ToLeftBank: - return wooden_rc_track_diag_25_deg_up_to_left_bank; + return WoodenRCTrackDiag25DegUpToLeftBank; case TrackElemType::DiagUp25ToRightBank: - return wooden_rc_track_diag_25_deg_up_to_right_bank; + return WoodenRCTrackDiag25DegUpToRightBank; case TrackElemType::DiagLeftBankToDown25: - return wooden_rc_track_diag_left_bank_to_25_deg_down; + return WoodenRCTrackDiagLeftBankTo25DegDown; case TrackElemType::DiagRightBankToDown25: - return wooden_rc_track_diag_right_bank_to_25_deg_down; + return WoodenRCTrackDiagRightBankTo25DegDown; case TrackElemType::DiagDown25ToLeftBank: - return wooden_rc_track_diag_25_deg_down_to_left_bank; + return WoodenRCTrackDiag25DegDownToLeftBank; case TrackElemType::DiagDown25ToRightBank: - return wooden_rc_track_diag_25_deg_down_to_right_bank; + return WoodenRCTrackDiag25DegDownToRightBank; case TrackElemType::DiagLeftBank: - return wooden_rc_track_diag_left_bank; + return WoodenRCTrackDiagLeftBank; case TrackElemType::DiagRightBank: - return wooden_rc_track_diag_right_bank; + return WoodenRCTrackDiagRightBank; case TrackElemType::LeftBankToLeftQuarterTurn3TilesUp25: - return wooden_rc_track_left_bank_to_left_quarter_turn_3_25_deg_up; + return WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp; case TrackElemType::RightBankToRightQuarterTurn3TilesUp25: - return wooden_rc_track_right_bank_to_right_quarter_turn_3_25_deg_up; + return WoodenRCTrackRightBankToRightQuarterTurn325DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25ToLeftBank: - return wooden_rc_track_left_quarter_turn_3_25_deg_down_to_left_bank; + return WoodenRCTrackLeftQuarterTurn325DegDownToLeftBank; case TrackElemType::RightQuarterTurn3TilesDown25ToRightBank: - return wooden_rc_track_right_quarter_turn_3_25_deg_down_to_right_bank; + return WoodenRCTrackRightQuarterTurn325DegDownToRightBank; case TrackElemType::BlockBrakes: - return wooden_rc_track_block_brakes; + return WoodenRCTrackBlockBrakes; case TrackElemType::LeftBankedQuarterTurn3TileUp25: - return wooden_rc_track_left_banked_quarter_turn_3_25_deg_up; + return WoodenRCTrackLeftBankedQuarterTurn325DegUp; case TrackElemType::RightBankedQuarterTurn3TileUp25: - return wooden_rc_track_right_banked_quarter_turn_3_25_deg_up; + return WoodenRCTrackRightBankedQuarterTurn325DegUp; case TrackElemType::LeftBankedQuarterTurn3TileDown25: - return wooden_rc_track_left_banked_quarter_turn_3_25_deg_down; + return WoodenRCTrackLeftBankedQuarterTurn325DegDown; case TrackElemType::RightBankedQuarterTurn3TileDown25: - return wooden_rc_track_right_banked_quarter_turn_3_25_deg_down; + return WoodenRCTrackRightBankedQuarterTurn325DegDown; case TrackElemType::LeftBankedQuarterTurn5TileUp25: - return wooden_rc_track_left_banked_quarter_turn_5_25_deg_up; + return WoodenRCTrackLeftBankedQuarterTurn525DegUp; case TrackElemType::RightBankedQuarterTurn5TileUp25: - return wooden_rc_track_right_banked_quarter_turn_5_25_deg_up; + return WoodenRCTrackRightBankedQuarterTurn525DegUp; case TrackElemType::LeftBankedQuarterTurn5TileDown25: - return wooden_rc_track_left_banked_quarter_turn_5_25_deg_down; + return WoodenRCTrackLeftBankedQuarterTurn525DegDown; case TrackElemType::RightBankedQuarterTurn5TileDown25: - return wooden_rc_track_right_banked_quarter_turn_5_25_deg_down; + return WoodenRCTrackRightBankedQuarterTurn525DegDown; case TrackElemType::Up25ToLeftBankedUp25: - return wooden_rc_track_25_deg_up_to_left_banked_25_deg_up; + return WoodenRCTrack25DegUpToLeftBanked25DegUp; case TrackElemType::Up25ToRightBankedUp25: - return wooden_rc_track_25_deg_up_to_right_banked_25_deg_up; + return WoodenRCTrack25DegUpToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToUp25: - return wooden_rc_track_left_banked_25_deg_up_to_25_deg_up; + return WoodenRCTrackLeftBanked25DegUpTo25DegUp; case TrackElemType::RightBankedUp25ToUp25: - return wooden_rc_track_right_banked_25_deg_up_to_25_deg_up; + return WoodenRCTrackRightBanked25DegUpTo25DegUp; case TrackElemType::Down25ToLeftBankedDown25: - return wooden_rc_track_25_deg_down_to_left_banked_25_deg_down; + return WoodenRCTrack25DegDownToLeftBanked25DegDown; case TrackElemType::Down25ToRightBankedDown25: - return wooden_rc_track_25_deg_down_to_right_banked_25_deg_down; + return WoodenRCTrack25DegDownToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToDown25: - return wooden_rc_track_left_banked_25_deg_down_to_25_deg_down; + return WoodenRCTrackLeftBanked25DegDownTo25DegDown; case TrackElemType::RightBankedDown25ToDown25: - return wooden_rc_track_right_banked_25_deg_down_to_25_deg_down; + return WoodenRCTrackRightBanked25DegDownTo25DegDown; case TrackElemType::LeftBankedFlatToLeftBankedUp25: - return wooden_rc_track_left_banked_flat_to_left_banked_25_deg_up; + return WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp; case TrackElemType::RightBankedFlatToRightBankedUp25: - return wooden_rc_track_right_banked_flat_to_right_banked_25_deg_up; + return WoodenRCTrackRightBankedFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToLeftBankedFlat: - return wooden_rc_track_left_banked_25_deg_up_to_left_banked_flat; + return WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat; case TrackElemType::RightBankedUp25ToRightBankedFlat: - return wooden_rc_track_right_banked_25_deg_up_to_right_banked_flat; + return WoodenRCTrackRightBanked25DegUpToRightBankedFlat; case TrackElemType::LeftBankedFlatToLeftBankedDown25: - return wooden_rc_track_left_banked_flat_to_left_banked_25_deg_down; + return WoodenRCTrackLeftBankedFlatToLeftBanked25DegDown; case TrackElemType::RightBankedFlatToRightBankedDown25: - return wooden_rc_track_right_banked_flat_to_right_banked_25_deg_down; + return WoodenRCTrackRightBankedFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToLeftBankedFlat: - return wooden_rc_track_left_banked_25_deg_down_to_left_banked_flat; + return WoodenRCTrackLeftBanked25DegDownToLeftBankedFlat; case TrackElemType::RightBankedDown25ToRightBankedFlat: - return wooden_rc_track_right_banked_25_deg_down_to_right_banked_flat; + return WoodenRCTrackRightBanked25DegDownToRightBankedFlat; case TrackElemType::FlatToLeftBankedUp25: - return wooden_rc_track_flat_to_left_banked_25_deg_up; + return WoodenRCTrackFlatToLeftBanked25DegUp; case TrackElemType::FlatToRightBankedUp25: - return wooden_rc_track_flat_to_right_banked_25_deg_up; + return WoodenRCTrackFlatToRightBanked25DegUp; case TrackElemType::LeftBankedUp25ToFlat: - return wooden_rc_track_left_banked_25_deg_up_to_flat; + return WoodenRCTrackLeftBanked25DegUpToFlat; case TrackElemType::RightBankedUp25ToFlat: - return wooden_rc_track_right_banked_25_deg_up_to_flat; + return WoodenRCTrackRightBanked25DegUpToFlat; case TrackElemType::FlatToLeftBankedDown25: - return wooden_rc_track_flat_to_left_banked_25_deg_down; + return WoodenRCTrackFlatToLeftBanked25DegDown; case TrackElemType::FlatToRightBankedDown25: - return wooden_rc_track_flat_to_right_banked_25_deg_down; + return WoodenRCTrackFlatToRightBanked25DegDown; case TrackElemType::LeftBankedDown25ToFlat: - return wooden_rc_track_left_banked_25_deg_down_to_flat; + return WoodenRCTrackLeftBanked25DegDownToFlat; case TrackElemType::RightBankedDown25ToFlat: - return wooden_rc_track_right_banked_25_deg_down_to_flat; + return WoodenRCTrackRightBanked25DegDownToFlat; case TrackElemType::Booster: - return wooden_rc_track_booster; + return WoodenRCTrackBooster; } return nullptr; } -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWoodenRC(int32_t trackType) { - return get_track_paint_function_wooden_and_classic_wooden_rc(trackType); + return GetTrackPaintFunctionWoodenAndClassicWoodenRC(trackType); } -TRACK_PAINT_FUNCTION get_track_paint_function_classic_wooden_rc_fallback(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionClassicWoodenRCFallback(int32_t trackType) { - return get_track_paint_function_wooden_and_classic_wooden_rc(trackType); + return GetTrackPaintFunctionWoodenAndClassicWoodenRC(trackType); } diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.h b/src/openrct2/ride/coaster/WoodenRollerCoaster.h index e9f5eca76e..d5248f9901 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,7 @@ #include -struct sprite_bb_2 +struct SpriteBoundBox2 { uint32_t sprite_id_a; uint32_t sprite_id_b; @@ -24,7 +24,7 @@ struct sprite_bb_2 CoordsXYZ bb_size; }; -template ImageId wooden_rc_get_track_colour(const PaintSession& session) +template ImageId WoodenRCGetTrackColour(const PaintSession& session) { if (isClassic) return session.TrackColours[SCHEME_TRACK]; @@ -34,43 +34,36 @@ template ImageId wooden_rc_get_track_colour(const PaintSession& : session.TrackColours[SCHEME_TRACK].WithPrimary(session.TrackColours[SCHEME_SUPPORTS].GetPrimary()); } -ImageId wooden_rc_get_rails_colour(PaintSession& session); +ImageId WoodenRCGetRailsColour(PaintSession& session); template -PaintStruct* wooden_rc_track_paint( - PaintSession& session, uint32_t imageIdTrack, uint32_t imageIdRails, uint8_t direction, int8_t x_offset, int8_t y_offset, - int16_t bound_box_length_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, - int16_t bound_box_offset_x, int16_t bound_box_offset_y, int16_t bound_box_offset_z) +PaintStruct* WoodenRCTrackPaint( + PaintSession& session, uint8_t direction, ImageIndex imageIdTrack, ImageIndex imageIdRails, const CoordsXYZ& offset, + const BoundBoxXYZ& boundBox) { - ImageId imageId = wooden_rc_get_track_colour(session).WithIndex(imageIdTrack); - ImageId railsImageId = wooden_rc_get_rails_colour(session).WithIndex(imageIdRails); + ImageId imageId = WoodenRCGetTrackColour(session).WithIndex(imageIdTrack); + ImageId railsImageId = WoodenRCGetRailsColour(session).WithIndex(imageIdRails); - PaintAddImageAsParentRotated( - session, direction, imageId, { x_offset, y_offset, z_offset }, - { bound_box_length_x, bound_box_length_y, bound_box_length_z }, - { bound_box_offset_x, bound_box_offset_y, bound_box_offset_z }); - return PaintAddImageAsChildRotated( - session, direction, railsImageId, { x_offset, y_offset, z_offset }, - { bound_box_length_x, bound_box_length_y, bound_box_length_z }, - { bound_box_offset_x, bound_box_offset_y, bound_box_offset_z }); + PaintAddImageAsParentRotated(session, direction, imageId, offset, boundBox); + return PaintAddImageAsChildRotated(session, direction, railsImageId, offset, boundBox); } -template void wooden_rc_track_paint_bb(PaintSession& session, const sprite_bb_2* bb, int16_t height) +template void WoodenRCTrackPaintBb(PaintSession& session, const SpriteBoundBox2* bb, int16_t height) { if (bb->sprite_id_a == 0) return; - ImageId imageId = wooden_rc_get_track_colour(session).WithIndex(bb->sprite_id_a); + ImageId imageId = WoodenRCGetTrackColour(session).WithIndex(bb->sprite_id_a); PaintAddImageAsParent( - session, imageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, bb->bb_size, - { bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z }); + session, imageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, + { { bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z }, bb->bb_size }); if (bb->sprite_id_b != 0) { - ImageId railsImageId = wooden_rc_get_rails_colour(session).WithIndex(bb->sprite_id_b); + ImageId railsImageId = WoodenRCGetRailsColour(session).WithIndex(bb->sprite_id_b); PaintAddImageAsChild( session, railsImageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, { { bb->bb_offset, height + bb->bb_offset.z }, bb->bb_size }); } } -TRACK_PAINT_FUNCTION get_track_paint_function_classic_wooden_rc_fallback(int32_t trackType); +TRACK_PAINT_FUNCTION GetTrackPaintFunctionClassicWoodenRCFallback(int32_t trackType); diff --git a/src/openrct2/ride/coaster/WoodenWildMouse.cpp b/src/openrct2/ride/coaster/WoodenWildMouse.cpp index 5ebffd4e21..c8de6b8db7 100644 --- a/src/openrct2/ride/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/ride/coaster/WoodenWildMouse.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -121,7 +121,7 @@ enum }; /** rct2: 0x008A5464 */ -static void wooden_wild_mouse_track_flat( +static void WoodenWildMouseTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -145,7 +145,7 @@ static void wooden_wild_mouse_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void wooden_wild_mouse_track_station( +static void WoodenWildMouseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -158,19 +158,19 @@ static void wooden_wild_mouse_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height - 2 }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 6, height }, - { 32, 20, 1 }, { 0, 0, height }); + { { 0, 0, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A5474 */ -static void wooden_wild_mouse_track_25_deg_up( +static void WoodenWildMouseTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -191,7 +191,7 @@ static void wooden_wild_mouse_track_25_deg_up( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -209,7 +209,7 @@ static void wooden_wild_mouse_track_25_deg_up( } /** rct2: 0x008A5484 */ -static void wooden_wild_mouse_track_60_deg_up( +static void WoodenWildMouseTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -232,12 +232,12 @@ static void wooden_wild_mouse_track_60_deg_up( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction]); if (direction == 0 || direction == 3) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); } else { session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { 2, 24, 93 }, { 28, 4, height - 16 }); + session, direction, imageId, { 0, 6, height }, { { 28, 4, height - 16 }, { 2, 24, 93 } }); } WoodenASupportsPaintSetup(session, direction & 1, 21 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -256,7 +256,7 @@ static void wooden_wild_mouse_track_60_deg_up( } /** rct2: 0x008A5494 */ -static void wooden_wild_mouse_track_flat_to_25_deg_up( +static void WoodenWildMouseTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -277,7 +277,7 @@ static void wooden_wild_mouse_track_flat_to_25_deg_up( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -295,7 +295,7 @@ static void wooden_wild_mouse_track_flat_to_25_deg_up( } /** rct2: 0x008A54A4 */ -static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( +static void WoodenWildMouseTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -319,15 +319,15 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( if (direction == 0 || direction == 3) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { 2, 24, 43 }, { 28, 4, height + 2 }); + session, direction, imageId, { 0, 6, height }, { { 28, 4, height + 2 }, { 2, 24, 43 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 2, 43 }, { 0, 4, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 4, height }, { 32, 2, 43 } }); } WoodenASupportsPaintSetup(session, direction & 1, 13 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -345,7 +345,7 @@ static void wooden_wild_mouse_track_25_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void wooden_wild_mouse_track_60_deg_to_25_deg_up( +static void WoodenWildMouseTrack60DegTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -369,15 +369,15 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up( if (direction == 0 || direction == 3) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { 2, 24, 43 }, { 28, 4, height + 2 }); + session, direction, imageId, { 0, 6, height }, { { 28, 4, height + 2 }, { 2, 24, 43 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 2, 43 }, { 0, 4, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 4, height }, { 32, 2, 43 } }); } WoodenASupportsPaintSetup(session, direction & 1, 17 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -396,7 +396,7 @@ static void wooden_wild_mouse_track_60_deg_to_25_deg_up( } /** rct2: 0x008A54C4 */ -static void wooden_wild_mouse_track_25_deg_up_to_flat( +static void WoodenWildMouseTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -417,7 +417,7 @@ static void wooden_wild_mouse_track_25_deg_up_to_flat( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); WoodenASupportsPaintSetup(session, direction & 1, 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -435,54 +435,54 @@ static void wooden_wild_mouse_track_25_deg_up_to_flat( } /** rct2: 0x008A54D4 */ -static void wooden_wild_mouse_track_25_deg_down( +static void WoodenWildMouseTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A54E4 */ -static void wooden_wild_mouse_track_60_deg_down( +static void WoodenWildMouseTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A54F4 */ -static void wooden_wild_mouse_track_flat_to_25_deg_down( +static void WoodenWildMouseTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5504 */ -static void wooden_wild_mouse_track_25_deg_down_to_60_deg_down( +static void WoodenWildMouseTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_60_deg_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrack60DegTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5514 */ -static void wooden_wild_mouse_track_60_deg_down_to_25_deg_down( +static void WoodenWildMouseTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5524 */ -static void wooden_wild_mouse_track_25_deg_down_to_flat( +static void WoodenWildMouseTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void wooden_wild_mouse_track_right_quarter_turn_3( +static void WoodenWildMouseTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -510,9 +510,9 @@ static void wooden_wild_mouse_track_right_quarter_turn_3( }; static uint8_t supportType[] = { 4, 5, 2, 3 }; - track_paint_util_right_quarter_turn_3_tiles_paint_4( + TrackPaintUtilRightQuarterTurn3TilesPaint4( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); switch (trackSequence) { @@ -539,15 +539,15 @@ static void wooden_wild_mouse_track_right_quarter_turn_3( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void wooden_wild_mouse_track_left_quarter_turn_3( +static void WoodenWildMouseTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - wooden_wild_mouse_track_right_quarter_turn_3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + WoodenWildMouseTrackRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void wooden_wild_mouse_track_left_quarter_turn_1( +static void WoodenWildMouseTrackLeftQuarterTurn1( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -563,34 +563,34 @@ static void wooden_wild_mouse_track_left_quarter_turn_1( switch (direction) { case 0: - PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 26, 24, 1 }, { 6, 2, height }); + PaintAddImageAsParent(session, imageId, { 6, 0, height }, { { 6, 2, height }, { 26, 24, 1 } }); break; case 1: PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 1 }); break; case 2: - PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 24, 26, 1 }, { 2, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 6, height }, { { 2, 6, height }, { 24, 26, 1 } }); break; case 3: PaintAddImageAsParent(session, imageId, { 6, 6, height }, { 24, 24, 1 }); break; } WoodenASupportsPaintSetup(session, supportType[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008A55D4 */ -static void wooden_wild_mouse_track_right_quarter_turn_1( +static void WoodenWildMouseTrackRightQuarterTurn1( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_left_quarter_turn_1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + WoodenWildMouseTrackLeftQuarterTurn1(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x008A55E4 */ -static void wooden_wild_mouse_track_flat_to_60_deg_up( +static void WoodenWildMouseTrackFlatTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -614,14 +614,14 @@ static void wooden_wild_mouse_track_flat_to_60_deg_up( if (direction == 0 || direction == 3) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 2, 24, 43 }, { 28, 4, height + 2 }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 28, 4, height + 2 }, { 2, 24, 43 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 2, 43 }, { 0, 4, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 4, height }, { 32, 2, 43 } }); } WoodenASupportsPaintSetup(session, direction & 1, 29 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -640,7 +640,7 @@ static void wooden_wild_mouse_track_flat_to_60_deg_up( } /** rct2: 0x008A55F4 */ -static void wooden_wild_mouse_track_60_deg_up_to_flat( +static void WoodenWildMouseTrack60DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -664,14 +664,14 @@ static void wooden_wild_mouse_track_60_deg_up_to_flat( if (direction == 0 || direction == 3) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 1 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 1 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 2, 24, 43 }, { 28, 4, height + 2 }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 28, 4, height + 2 }, { 2, 24, 43 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 2, 43 }, { 0, 4, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 4, height }, { 32, 2, 43 } }); } WoodenASupportsPaintSetup(session, direction & 1, 33 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -690,71 +690,71 @@ static void wooden_wild_mouse_track_60_deg_up_to_flat( } /** rct2: 0x008A5604 */ -static void wooden_wild_mouse_track_flat_to_60_deg_down( +static void WoodenWildMouseTrackFlatTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_60_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrack60DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x008A5614 */ -static void wooden_wild_mouse_track_60_deg_down_to_flat( +static void WoodenWildMouseTrack60DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - wooden_wild_mouse_track_flat_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WoodenWildMouseTrackFlatTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWoodenWildMouse(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return wooden_wild_mouse_track_flat; + return WoodenWildMouseTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return wooden_wild_mouse_track_station; + return WoodenWildMouseTrackStation; case TrackElemType::Up25: - return wooden_wild_mouse_track_25_deg_up; + return WoodenWildMouseTrack25DegUp; case TrackElemType::Up60: - return wooden_wild_mouse_track_60_deg_up; + return WoodenWildMouseTrack60DegUp; case TrackElemType::FlatToUp25: - return wooden_wild_mouse_track_flat_to_25_deg_up; + return WoodenWildMouseTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return wooden_wild_mouse_track_25_deg_up_to_60_deg_up; + return WoodenWildMouseTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return wooden_wild_mouse_track_60_deg_to_25_deg_up; + return WoodenWildMouseTrack60DegTo25DegUp; case TrackElemType::Up25ToFlat: - return wooden_wild_mouse_track_25_deg_up_to_flat; + return WoodenWildMouseTrack25DegUpToFlat; case TrackElemType::Down25: - return wooden_wild_mouse_track_25_deg_down; + return WoodenWildMouseTrack25DegDown; case TrackElemType::Down60: - return wooden_wild_mouse_track_60_deg_down; + return WoodenWildMouseTrack60DegDown; case TrackElemType::FlatToDown25: - return wooden_wild_mouse_track_flat_to_25_deg_down; + return WoodenWildMouseTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return wooden_wild_mouse_track_25_deg_down_to_60_deg_down; + return WoodenWildMouseTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return wooden_wild_mouse_track_60_deg_down_to_25_deg_down; + return WoodenWildMouseTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return wooden_wild_mouse_track_25_deg_down_to_flat; + return WoodenWildMouseTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn3Tiles: - return wooden_wild_mouse_track_left_quarter_turn_3; + return WoodenWildMouseTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return wooden_wild_mouse_track_right_quarter_turn_3; + return WoodenWildMouseTrackRightQuarterTurn3; case TrackElemType::LeftQuarterTurn1Tile: - return wooden_wild_mouse_track_left_quarter_turn_1; + return WoodenWildMouseTrackLeftQuarterTurn1; case TrackElemType::RightQuarterTurn1Tile: - return wooden_wild_mouse_track_right_quarter_turn_1; + return WoodenWildMouseTrackRightQuarterTurn1; case TrackElemType::FlatToUp60: - return wooden_wild_mouse_track_flat_to_60_deg_up; + return WoodenWildMouseTrackFlatTo60DegUp; case TrackElemType::Up60ToFlat: - return wooden_wild_mouse_track_60_deg_up_to_flat; + return WoodenWildMouseTrack60DegUpToFlat; case TrackElemType::FlatToDown60: - return wooden_wild_mouse_track_flat_to_60_deg_down; + return WoodenWildMouseTrackFlatTo60DegDown; case TrackElemType::Down60ToFlat: - return wooden_wild_mouse_track_60_deg_down_to_flat; + return WoodenWildMouseTrack60DegDownToFlat; } return nullptr; } diff --git a/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h b/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h index 1400ff01a8..8dbaae9c62 100644 --- a/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h +++ b/src/openrct2/ride/coaster/meta/AirPoweredVerticalCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor AirPoweredVerticalCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_BOOSTER}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_air_powered_vertical_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionAirPoweredVerticalRC), SET_FIELD(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), SET_FIELD(RideModes, EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch)), SET_FIELD(DefaultMode, RideMode::PoweredLaunchPasstrough), @@ -35,7 +35,7 @@ constexpr const RideTypeDescriptor AirPoweredVerticalCoasterRTD = SET_FIELD(Heights, { 255, 32, 4, 7, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_air_powered_vertical_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateAirPoweredVerticalCoaster), SET_FIELD(RatingsMultipliers, { 44, 66, 10 }), SET_FIELD(UpkeepCosts, { 90, 20, 0, 0, 0, 10 }), SET_FIELD(BuildCosts, { 100.00_GBP, 0.00_GBP, 45, }), diff --git a/src/openrct2/ride/coaster/meta/AlpineCoaster.h b/src/openrct2/ride/coaster/meta/AlpineCoaster.h index cd8a39931f..123b2a45c1 100644 --- a/src/openrct2/ride/coaster/meta/AlpineCoaster.h +++ b/src/openrct2/ride/coaster/meta/AlpineCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor AlpineCoasterRTD = SET_FIELD(Heights, {18, 24, 3, 7}), SET_FIELD(MaxMass, 4), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_alpine_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateAlpineCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 35, 20, 80, 8, 3, 10 }), SET_FIELD(BuildCosts, { 22.50_GBP, 2.50_GBP, 50}), diff --git a/src/openrct2/ride/coaster/meta/BobsleighCoaster.h b/src/openrct2/ride/coaster/meta/BobsleighCoaster.h index 7ed3b815a4..61ba4fab90 100644 --- a/src/openrct2/ride/coaster/meta/BobsleighCoaster.h +++ b/src/openrct2/ride/coaster/meta/BobsleighCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor BobsleighCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_bobsleigh_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionBobsleighRC), SET_FIELD(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_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor BobsleighCoasterRTD = SET_FIELD(Heights, { 19, 24, 5, 7, }), SET_FIELD(MaxMass, 25), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_bobsleigh_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateBobsleighCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 40.00_GBP, 2.50_GBP, 45, }), diff --git a/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h index ad03df06ea..2b55a0cd67 100644 --- a/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicMiniRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor ClassicMiniRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_ON_RIDE_PHOTO}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_junior_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionJuniorRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -36,7 +36,7 @@ constexpr const RideTypeDescriptor ClassicMiniRollerCoasterRTD = SET_FIELD(Heights, { 15, 24, 4, 7, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_classic_mini_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateClassicMiniRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 8, 3, 5 }), SET_FIELD(BuildCosts, { 22.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h b/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h index 12da063942..aad5a887a7 100644 --- a/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ClassicWoodenRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor ClassicWoodenRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, 0), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_classic_wooden_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionClassicWoodenRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -36,8 +36,8 @@ constexpr const RideTypeDescriptor ClassicWoodenRollerCoasterRTD = SET_FIELD(AvailableBreakdowns, (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE)), SET_FIELD(Heights, { 41, 24, 8, 11, }), SET_FIELD(MaxMass, 19), - SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWood, 5, 7 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_classic_wooden_roller_coaster), + SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWood, 3, 5 }), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateClassicWoodenRollerCoaster), SET_FIELD(RatingsMultipliers, { 52, 33, 4 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, {37.50_GBP, 3.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h b/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h index 978ce14093..4095e1feb0 100644 --- a/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h +++ b/src/openrct2/ride/coaster/meta/CompactInvertedCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor CompactInvertedCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_compact_inverted_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionCompactInvertedRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor CompactInvertedCoasterRTD = SET_FIELD(Heights, { 27, 40, 29, 8, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_compact_inverted_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCompactInvertedCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 13, 3, 10 }), SET_FIELD(BuildCosts, { 50.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h b/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h index 72ad1e497b..42ced4cacc 100644 --- a/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor CorkscrewRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_TWIST}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_corkscrew_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionCorkscrewRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor CorkscrewRollerCoasterRTD = SET_FIELD(Heights, { 28, 24, 8, 11, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftArrow, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_corkscrew_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCorkscrewRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 52.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h b/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h index cc935770a6..44329d09eb 100644 --- a/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/FlyingRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor FlyingRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_FLYING_LARGE_HALF_LOOP_UNINVERTED_DOWN, TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_STATION_END, TRACK_VERTICAL_LOOP, TRACK_POWERED_LIFT}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_flying_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionFlyingRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor FlyingRollerCoasterRTD = SET_FIELD(Heights, { 30, 24, 8, 11, }), SET_FIELD(MaxMass, 35), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftBM, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_flying_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateFlyingRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 49, 20, 90, 11, 3, 15 }), SET_FIELD(BuildCosts, { 62.50_GBP, 2.50_GBP, 50, }), @@ -83,7 +83,7 @@ constexpr const RideTypeDescriptor FlyingRollerCoasterAltRTD = SET_FIELD(Heights, { 30, 24, 8, 11, }), SET_FIELD(MaxMass, 35), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftBM, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_flying_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateFlyingRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 49, 20, 90, 11, 3, 15 }), SET_FIELD(BuildCosts, { 62.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/GigaCoaster.h b/src/openrct2/ride/coaster/meta/GigaCoaster.h index 384fef7e7d..b0ab0a4e5d 100644 --- a/src/openrct2/ride/coaster/meta/GigaCoaster.h +++ b/src/openrct2/ride/coaster/meta/GigaCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor GigaCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_giga_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionGigaRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_ALLOW_CABLE_LIFT_HILL), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor GigaCoasterRTD = SET_FIELD(Heights, { 86, 24, 9, 11, }), SET_FIELD(MaxMass, 31), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 5, 8 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_giga_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateGigaCoaster), SET_FIELD(RatingsMultipliers, { 51, 32, 10 }), SET_FIELD(UpkeepCosts, { 10, 20, 80, 12, 3, 40 }), SET_FIELD(BuildCosts, { 60.00_GBP, 2.50_GBP, 55, }), diff --git a/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h b/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h index cb5dbf1b69..591a5893ce 100644 --- a/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h +++ b/src/openrct2/ride/coaster/meta/HeartlineTwisterCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor HeartlineTwisterCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_heartline_twister_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionHeartlineTwisterRC), SET_FIELD(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), SET_FIELD(RideModes, EnumsToFlags(RideMode::ContinuousCircuit)), @@ -36,7 +36,7 @@ constexpr const RideTypeDescriptor HeartlineTwisterCoasterRTD = SET_FIELD(Heights, { 22, 24, 15, 9, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_heartline_twister_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateHeartlineTwisterCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 47, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 72.50_GBP, 3.50_GBP, 30, }), diff --git a/src/openrct2/ride/coaster/meta/HybridCoaster.h b/src/openrct2/ride/coaster/meta/HybridCoaster.h index 122a2a4f32..6b97f8782c 100644 --- a/src/openrct2/ride/coaster/meta/HybridCoaster.h +++ b/src/openrct2/ride/coaster/meta/HybridCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ constexpr const RideTypeDescriptor HybridCoasterRTD = SET_FIELD(Heights, { 43, 24, 13, 13}), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftRMC, 5, 8 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_hybrid_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateHybridCoaster), SET_FIELD(RatingsMultipliers, { 52, 36, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 65.00_GBP, 3.50_GBP, 55}), diff --git a/src/openrct2/ride/coaster/meta/HyperTwister.h b/src/openrct2/ride/coaster/meta/HyperTwister.h index 187a25708c..b6aa2bdb65 100644 --- a/src/openrct2/ride/coaster/meta/HyperTwister.h +++ b/src/openrct2/ride/coaster/meta/HyperTwister.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor HyperTwisterRTD = SET_FIELD(ExtraTrackPieces, { TRACK_LIFT_HILL_STEEP, TRACK_BRAKE_FOR_DROP, TRACK_BOOSTER, TRACK_POWERED_LIFT }), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_bolliger_mabillard), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionBolligerMabillard), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor HyperTwisterRTD = SET_FIELD(Heights, { 54, 24, 8, 9, }), SET_FIELD(MaxMass, 31), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftBM, 5, 8 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_twister_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateTwisterRollerCoaster), SET_FIELD(RatingsMultipliers, { 52, 36, 10 }), SET_FIELD(UpkeepCosts, { 43, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 60.00_GBP, 2.50_GBP, 55, }), diff --git a/src/openrct2/ride/coaster/meta/Hypercoaster.h b/src/openrct2/ride/coaster/meta/Hypercoaster.h index abcd29199f..a8ad30b4a6 100644 --- a/src/openrct2/ride/coaster/meta/Hypercoaster.h +++ b/src/openrct2/ride/coaster/meta/Hypercoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor HypercoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_VERTICAL_LOOP, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BOOSTER}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_corkscrew_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionCorkscrewRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -36,7 +36,7 @@ constexpr const RideTypeDescriptor HypercoasterRTD = SET_FIELD(Heights, { 55, 24, 8, 11, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftArrow, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_corkscrew_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCorkscrewRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 52.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h b/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h index eab8141cbe..a12d81776f 100644 --- a/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedHairpinCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor InvertedHairpinCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_inverted_hairpin_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionInvertedHairpinRC), SET_FIELD(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_FLAG_IS_SUSPENDED), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor InvertedHairpinCoasterRTD = SET_FIELD(Heights, { 16, 24, 24, 7, }), SET_FIELD(MaxMass, 4), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWildMouse, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_inverted_hairpin_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateInvertedHairpinCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 30 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 9, 3, 10 }), SET_FIELD(BuildCosts, { 33.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h b/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h index 314382a55d..98b1e8d985 100644 --- a/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedImpulseCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor InvertedImpulseCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_inverted_impulse_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionInvertedImpulseRC), SET_FIELD(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_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor InvertedImpulseCoasterRTD = SET_FIELD(Heights, { 45, 40, 29, 8, }), SET_FIELD(MaxMass, 23), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 7 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_inverted_impulse_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateInvertedImpulseCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 180, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 62.50_GBP, 2.50_GBP, 25, }), diff --git a/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h b/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h index fe18e40e7f..8246205fa6 100644 --- a/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/InvertedRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor InvertedRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_BOOSTER}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_inverted_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionInvertedRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS | RIDE_TYPE_FLAG_IS_SUSPENDED), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor InvertedRollerCoasterRTD = SET_FIELD(Heights, { 38, 40, 29, 8, }), SET_FIELD(MaxMass, 27), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftBM, 5, 7 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_inverted_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateInvertedRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 13, 3, 10 }), SET_FIELD(BuildCosts, { 65.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h b/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h index 736befce0b..68e175488a 100644 --- a/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/JuniorRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor JuniorRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_ON_RIDE_PHOTO}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_junior_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionJuniorRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor JuniorRollerCoasterRTD = SET_FIELD(Heights, { 12, 24, 4, 7, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_junior_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateJuniorRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 8, 3, 5 }), SET_FIELD(BuildCosts, { 22.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h b/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h index fb7889cf06..52db7af6af 100644 --- a/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LIMLaunchedRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor LIMLaunchedRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_SLOPE_LONG, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_lim_launched_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionLimLaunchedRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor LIMLaunchedRollerCoasterRTD = SET_FIELD(Heights, { 35, 24, 5, 7, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_lim_launched_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLimLaunchedRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 42, 20, 80, 9, 3, 10 }), SET_FIELD(BuildCosts, { 47.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h index 64c6fe64c7..76c711d07e 100644 --- a/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor LayDownRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_BOOSTER}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_lay_down_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionLayDownRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor LayDownRollerCoasterRTD = SET_FIELD(Heights, { 26, 24, 8, 11, }), SET_FIELD(MaxMass, 25), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_lay_down_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLayDownRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 49, 20, 90, 11, 3, 15 }), SET_FIELD(BuildCosts, { 53.50_GBP, 2.50_GBP, 50, }), @@ -76,7 +76,7 @@ constexpr const RideTypeDescriptor LayDownRollerCoasterAltRTD = SET_FIELD(Heights, { 26, 24, 8, 11, }), SET_FIELD(MaxMass, 25), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_lay_down_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLayDownRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 49, 20, 90, 11, 3, 15 }), SET_FIELD(BuildCosts, { 53.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h b/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h index 95d3f6c0a3..a8a4890a86 100644 --- a/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/LoopingRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor LoopingRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_SLOPE_VERTICAL, TRACK_TWIST, TRACK_CORKSCREW, TRACK_CURVE_VERTICAL, TRACK_QUARTER_LOOP, TRACK_SLOPE_LONG, TRACK_BARREL_ROLL, TRACK_HALF_LOOP, TRACK_HALF_LOOP_MEDIUM, TRACK_HALF_LOOP_LARGE,TRACK_CORKSCREW_LARGE, TRACK_ZERO_G_ROLL, TRACK_ZERO_G_ROLL_LARGE}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_looping_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionLoopingRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor LoopingRollerCoasterRTD = SET_FIELD(Heights, { 35, 24, 5, 7, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_looping_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLoopingRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 45.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/MineRide.h b/src/openrct2/ride/coaster/meta/MineRide.h index aea3256547..be75d054fc 100644 --- a/src/openrct2/ride/coaster/meta/MineRide.h +++ b/src/openrct2/ride/coaster/meta/MineRide.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor MineRideRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_mine_ride), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMineRide), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor MineRideRTD = SET_FIELD(Heights, { 13, 24, 9, 11, }), SET_FIELD(MaxMass, 27), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_mine_ride), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMineRide), SET_FIELD(RatingsMultipliers, { 60, 20, 10 }), SET_FIELD(UpkeepCosts, { 50, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 42.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h index 95313d7c26..112a426d38 100644 --- a/src/openrct2/ride/coaster/meta/MineTrainCoaster.h +++ b/src/openrct2/ride/coaster/meta/MineTrainCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor MineTrainCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_mine_train_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMineTrainRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor MineTrainCoasterRTD = SET_FIELD(Heights, { 21, 24, 4, 7, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftArrow, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_mine_train_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMineTrainCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 41.00_GBP, 3.00_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h b/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h index 368556683a..eae0d77504 100644 --- a/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/MiniRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor MiniRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_BOOSTER, TRACK_LIFT_HILL_CURVED}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_mini_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMiniRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor MiniRollerCoasterRTD = SET_FIELD(Heights, { 16, 24, 9, 11, }), SET_FIELD(MaxMass, 10), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_mini_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMiniRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 35, 20, 80, 8, 3, 10 }), SET_FIELD(BuildCosts, { 32.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h b/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h index 10ddb172c8..7d40aa3e76 100644 --- a/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h +++ b/src/openrct2/ride/coaster/meta/MiniSuspendedCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor MiniSuspendedCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_mini_suspended_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMiniSuspendedRC), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_HAS_LARGE_CURVES | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor MiniSuspendedCoasterRTD = SET_FIELD(Heights, { 10, 24, 24, 8, }), SET_FIELD(MaxMass, 3), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_mini_suspended_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMiniSuspendedCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 30.00_GBP, 2.50_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h b/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h index b2b7a1520d..07ac2285f7 100644 --- a/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/MultiDimensionRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor MultiDimensionRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_multi_dimension_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMultiDimensionRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor MultiDimensionRollerCoasterRTD = SET_FIELD(Heights, { 40, 24, 8, 11, }), SET_FIELD(MaxMass, 78), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_multi_dimension_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMultiDimensionRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 75, 20, 90, 11, 3, 15 }), SET_FIELD(BuildCosts, { 90.00_GBP, 2.50_GBP, 50, }), @@ -77,7 +77,7 @@ constexpr const RideTypeDescriptor MultiDimensionRollerCoasterAltRTD = SET_FIELD(Heights, { 40, 24, 8, 11, }), SET_FIELD(MaxMass, 78), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_multi_dimension_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMultiDimensionRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 75, 20, 90, 11, 3, 15 }), SET_FIELD(BuildCosts, { 90.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h b/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h index f90eb6130e..4971990fe4 100644 --- a/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h +++ b/src/openrct2/ride/coaster/meta/ReverseFreefallCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor ReverseFreefallCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_reverse_freefall_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionReverseFreefallRC), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT), SET_FIELD(RideModes, EnumsToFlags(RideMode::LimPoweredLaunch)), SET_FIELD(DefaultMode, RideMode::LimPoweredLaunch), @@ -35,7 +35,7 @@ constexpr const RideTypeDescriptor ReverseFreefallCoasterRTD = SET_FIELD(Heights, { 255, 32, 4, 7, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_reverse_freefall_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateReverseFreefallCoaster), SET_FIELD(RatingsMultipliers, { 44, 66, 10 }), SET_FIELD(UpkeepCosts, { 80, 20, 0, 0, 0, 10 }), SET_FIELD(BuildCosts, { 100.00_GBP, 0.00_GBP, 45, }), diff --git a/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h b/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h index ebae92aadb..b443783232 100644 --- a/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/ReverserRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor ReverserRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_reverser_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionReverserRC), SET_FIELD(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), SET_FIELD(RideModes, EnumsToFlags(RideMode::ContinuousCircuit)), @@ -36,7 +36,7 @@ constexpr const RideTypeDescriptor ReverserRollerCoasterRTD = SET_FIELD(Heights, { 18, 24, 8, 11, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWood, 3, 4 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_reverser_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateReverserRollerCoaster), SET_FIELD(RatingsMultipliers, { 48, 28, 7 }), SET_FIELD(UpkeepCosts, { 39, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 27.50_GBP, 3.00_GBP, 37, }), diff --git a/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h b/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h index f0c6475c49..221116e37d 100644 --- a/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SideFrictionRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SideFrictionRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_side_friction_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSideFrictionRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor SideFrictionRollerCoasterRTD = SET_FIELD(Heights, { 15, 24, 4, 11, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWood, 3, 4 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_side_friction_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSideFrictionRollerCoaster), SET_FIELD(RatingsMultipliers, { 48, 28, 7 }), SET_FIELD(UpkeepCosts, { 39, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 27.50_GBP, 3.00_GBP, 37, }), diff --git a/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h b/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h index 118647ab0f..c63f17ceae 100644 --- a/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ constexpr const RideTypeDescriptor SingleRailRollerCoasterRTD = SET_FIELD(Heights, { 28, 24, 5, 7}), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftRMC, 5, 8 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_single_rail_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSingleRailRollerCoaster), SET_FIELD(RatingsMultipliers, { 52, 36, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 37.50_GBP, 2.50_GBP, 50}), diff --git a/src/openrct2/ride/coaster/meta/SpinningWildMouse.h b/src/openrct2/ride/coaster/meta/SpinningWildMouse.h index 7f95b7915e..9c9cbbf8dc 100644 --- a/src/openrct2/ride/coaster/meta/SpinningWildMouse.h +++ b/src/openrct2/ride/coaster/meta/SpinningWildMouse.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor SpinningWildMouseRTD = SET_FIELD(ExtraTrackPieces, {TRACK_LIFT_HILL_STEEP, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_wild_mouse), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionWildMouse), SET_FIELD(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), SET_FIELD(RideModes, EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned)), @@ -35,7 +35,7 @@ constexpr const RideTypeDescriptor SpinningWildMouseRTD = SET_FIELD(Heights, { 16, 24, 4, 7, }), SET_FIELD(MaxMass, 4), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWildMouse, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_wild_mouse), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateWildMouse), SET_FIELD(RatingsMultipliers, { 50, 30, 30 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 9, 3, 10 }), SET_FIELD(BuildCosts, { 27.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h b/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h index 6ebb27dc44..d94feadc5a 100644 --- a/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/SpiralRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SpiralRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_BOOSTER, TRACK_LIFT_HILL}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_mini_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMiniRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor SpiralRollerCoasterRTD = SET_FIELD(Heights, { 19, 24, 9, 11, }), SET_FIELD(MaxMass, 31), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 7, 7 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_spiral_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSpiralRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 41, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 35.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h b/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h index deafc3d949..13a394b474 100644 --- a/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/StandUpRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor StandUpRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_stand_up_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionStandUpRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor StandUpRollerCoasterRTD = SET_FIELD(Heights, { 25, 24, 9, 11, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_stand_up_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateStandUpRollerCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 50.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/SteelWildMouse.h b/src/openrct2/ride/coaster/meta/SteelWildMouse.h index 1a151e6044..a0dc9c3372 100644 --- a/src/openrct2/ride/coaster/meta/SteelWildMouse.h +++ b/src/openrct2/ride/coaster/meta/SteelWildMouse.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SteelWildMouseRTD = SET_FIELD(ExtraTrackPieces, {TRACK_ROTATION_CONTROL_TOGGLE}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_wild_mouse), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionWildMouse), SET_FIELD(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_ALLOW_DOORS_ON_TRACK | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor SteelWildMouseRTD = SET_FIELD(Heights, { 16, 24, 4, 7, }), SET_FIELD(MaxMass, 4), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWildMouse, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_wild_mouse), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateWildMouse), SET_FIELD(RatingsMultipliers, { 50, 30, 30 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 9, 3, 10 }), SET_FIELD(BuildCosts, { 27.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/Steeplechase.h b/src/openrct2/ride/coaster/meta/Steeplechase.h index 4bb9a8e100..88ad5bfca6 100644 --- a/src/openrct2/ride/coaster/meta/Steeplechase.h +++ b/src/openrct2/ride/coaster/meta/Steeplechase.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SteeplechaseRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_steeplechase), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSteeplechase), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor SteeplechaseRTD = SET_FIELD(Heights, { 14, 24, 7, 7, }), SET_FIELD(MaxMass, 4), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_steeplechase), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSteeplechase), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 28.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h b/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h index 2a59e903f1..e198cc26e0 100644 --- a/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h +++ b/src/openrct2/ride/coaster/meta/SuspendedSwingingCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SuspendedSwingingCoasterRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_suspended_swinging_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSuspendedSwingingRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_IS_SUSPENDED), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor SuspendedSwingingCoasterRTD = SET_FIELD(Heights, { 24, 40, 29, 8, }), SET_FIELD(MaxMass, 26), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_suspended_swinging_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSuspendedSwingingCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 20, 3, 10 }), SET_FIELD(BuildCosts, { 47.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h b/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h index 95c3b72679..92fed608f5 100644 --- a/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/TwisterRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,7 +25,7 @@ constexpr const RideTypeDescriptor TwisterRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_LIFT_HILL_STEEP, TRACK_BRAKE_FOR_DROP}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_bolliger_mabillard), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionBolligerMabillard), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor TwisterRollerCoasterRTD = SET_FIELD(Heights, { 40, 24, 8, 9, }), SET_FIELD(MaxMass, 31), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftBM, 5, 8 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_twister_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateTwisterRollerCoaster), SET_FIELD(RatingsMultipliers, { 52, 36, 10 }), SET_FIELD(UpkeepCosts, { 43, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 60.00_GBP, 2.50_GBP, 55, }), diff --git a/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h b/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h index eb87fafb4d..dc5f99ff49 100644 --- a/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h +++ b/src/openrct2/ride/coaster/meta/VerticalDropCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -25,7 +25,7 @@ constexpr const RideTypeDescriptor VerticalDropCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BARREL_ROLL, TRACK_POWERED_LIFT, TRACK_HALF_LOOP_LARGE, TRACK_QUARTER_LOOP, TRACK_BOOSTER, TRACK_TWIST}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_bolliger_mabillard), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionBolligerMabillard), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES), @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor VerticalDropCoasterRTD = SET_FIELD(Heights, { 53, 24, 8, 11, }), SET_FIELD(MaxMass, 25), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftBM, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_vertical_drop_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateVerticalDropRollerCoaster), SET_FIELD(RatingsMultipliers, { 52, 38, 10 }), SET_FIELD(UpkeepCosts, { 44, 20, 80, 11, 3, 10 }), SET_FIELD(BuildCosts, { 60.00_GBP, 2.50_GBP, 42, }), diff --git a/src/openrct2/ride/coaster/meta/VirginiaReel.h b/src/openrct2/ride/coaster/meta/VirginiaReel.h index cf03922979..b66febfb25 100644 --- a/src/openrct2/ride/coaster/meta/VirginiaReel.h +++ b/src/openrct2/ride/coaster/meta/VirginiaReel.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor VirginiaReelRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_virginia_reel), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionVirginiaReel), SET_FIELD(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), SET_FIELD(RideModes, EnumsToFlags(RideMode::ContinuousCircuit)), @@ -36,7 +36,7 @@ constexpr const RideTypeDescriptor VirginiaReelRTD = SET_FIELD(Heights, { 14, 24, 6, 7, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 3, 4 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_virginia_reel), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateVirginiaReel), SET_FIELD(RatingsMultipliers, { 30, 15, 25 }), SET_FIELD(UpkeepCosts, { 39, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 26.50_GBP, 3.00_GBP, 25, }), diff --git a/src/openrct2/ride/coaster/meta/WaterCoaster.h b/src/openrct2/ride/coaster/meta/WaterCoaster.h index 4bb75f7693..83be6678d2 100644 --- a/src/openrct2/ride/coaster/meta/WaterCoaster.h +++ b/src/openrct2/ride/coaster/meta/WaterCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor WaterCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_SLOPE_LONG}), SET_FIELD(CoveredTrackPieces, {TrackElemType::Flat, TrackElemType::LeftQuarterTurn5Tiles, TrackElemType::RightQuarterTurn5Tiles, TrackElemType::SBendLeft, TrackElemType::SBendRight}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_water_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionWaterRC), SET_FIELD(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_TRACK_ELEMENTS_HAVE_TWO_VARIETIES | RIDE_TYPE_FLAG_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor WaterCoasterRTD = SET_FIELD(Heights, { 18, 24, 4, 7, }), SET_FIELD(MaxMass, 13), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 6 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_water_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateWaterCoaster), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 60, 20, 80, 8, 3, 10 }), SET_FIELD(BuildCosts, { 27.50_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h b/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h index 89834cdc16..e8d956625f 100644 --- a/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/meta/WoodenRollerCoaster.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor WoodenRollerCoasterRTD = SET_FIELD(ExtraTrackPieces, {TRACK_BOOSTER}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_wooden_rc), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionWoodenRC), SET_FIELD(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_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_PEEP_CHECK_GFORCES | RIDE_TYPE_FLAG_ALLOW_MULTIPLE_CIRCUITS), @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor WoodenRollerCoasterRTD = SET_FIELD(Heights, { 41, 24, 8, 11, }), SET_FIELD(MaxMass, 19), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftWood, 5, 7 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_wooden_roller_coaster), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateWoodenRollerCoaster), SET_FIELD(RatingsMultipliers, { 52, 33, 8 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 10, 3, 10 }), SET_FIELD(BuildCosts, { 37.50_GBP, 3.50_GBP, 50, }), diff --git a/src/openrct2/ride/coaster/meta/WoodenWildMouse.h b/src/openrct2/ride/coaster/meta/WoodenWildMouse.h index 078701ffd4..8e854f4f6e 100644 --- a/src/openrct2/ride/coaster/meta/WoodenWildMouse.h +++ b/src/openrct2/ride/coaster/meta/WoodenWildMouse.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor WoodenWildMouseRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_wooden_wild_mouse), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionWoodenWildMouse), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAGS_COMMON_COASTER | RIDE_TYPE_FLAGS_COMMON_COASTER_NON_ALT | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_ALLOW_DOORS_ON_TRACK | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor WoodenWildMouseRTD = SET_FIELD(Heights, { 14, 24, 4, 7, }), SET_FIELD(MaxMass, 4), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftClassic, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_wooden_wild_mouse), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateWoodenWildMouse), SET_FIELD(RatingsMultipliers, { 50, 30, 30 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 9, 3, 10 }), SET_FIELD(BuildCosts, { 25.00_GBP, 3.00_GBP, 40, }), diff --git a/src/openrct2/ride/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index 950c393c07..3ad0bd9a42 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -372,7 +372,7 @@ static void PaintCarRideStation( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -383,10 +383,10 @@ static void PaintCarRideTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], CarRideTrackPiecesQuarterTurn3Tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); switch (trackSequence) { @@ -451,7 +451,7 @@ static void PaintCarRideTrackLeftQuarterTurn1Tile( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -481,7 +481,7 @@ static void PaintCarRideTrackSpinningTunnel( PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 1 }); } - track_paint_util_spinning_tunnel_paint(session, 1, height, direction); + TrackPaintUtilSpinningTunnelPaint(session, 1, height, direction); if (direction == 0 || direction == 2) { @@ -537,7 +537,7 @@ static void PaintCarRideTrack60DegUp( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -593,7 +593,7 @@ static void PaintCarRideTrack25DegUpTo60DegUp( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -649,7 +649,7 @@ static void PaintCarRideTrack60DegUpTo25DegUp( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } diff --git a/src/openrct2/ride/gentle/Circus.cpp b/src/openrct2/ride/gentle/Circus.cpp index cd8ce3d40d..e8c92b4661 100644 --- a/src/openrct2/ride/gentle/Circus.cpp +++ b/src/openrct2/ride/gentle/Circus.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,7 +32,7 @@ static void PaintCircusTent(PaintSession& session, const Ride& ride, uint8_t dir auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -58,9 +58,9 @@ static void PaintCircus( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_SUPPORTS], height, fenceSpritesRope, session.CurrentRotation); diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index 73ce715fc4..95782c451f 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -52,7 +52,7 @@ static void PaintCrookedHouseStructure( if (tileElement == nullptr) return; - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr) return; @@ -92,9 +92,9 @@ static void PaintCrookedHouse( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope, session.CurrentRotation); diff --git a/src/openrct2/ride/gentle/Dodgems.cpp b/src/openrct2/ride/gentle/Dodgems.cpp index 1e76f715b3..a376d1bc1e 100644 --- a/src/openrct2/ride/gentle/Dodgems.cpp +++ b/src/openrct2/ride/gentle/Dodgems.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -60,7 +60,7 @@ static void PaintDodgems( auto imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SprDodgemsFloor); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 1, height }, { 30, 30, 1 } }); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_SUPPORTS], height, DodgemsFenceSprites, session.CurrentRotation); diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index 5e10cc326f..52953d20d7 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,7 +42,7 @@ static constexpr BoundBoxXY FerrisWheelData[] = { }; static void PaintFerrisWheelRiders( - PaintSession& session, const rct_ride_entry& rideEntry, const Vehicle& vehicle, uint8_t direction, const CoordsXYZ offset, + PaintSession& session, const RideObjectEntry& rideEntry, const Vehicle& vehicle, uint8_t direction, const CoordsXYZ offset, const BoundBoxXYZ& bb) { for (int32_t i = 0; i < 32; i += 2) @@ -79,7 +79,7 @@ static void PaintFerrisWheelStructure( auto supportsImageTemplate = session.TrackColours[SCHEME_TRACK]; auto wheelImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto wheelImageFlags = session.TrackColours[SCHEME_MISC]; - if (wheelImageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (wheelImageFlags != TrackGhost) { wheelImageTemplate = wheelImageFlags; } @@ -121,29 +121,29 @@ static void PaintFerrisWheel( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); ImageId imageId; uint8_t rotation = session.CurrentRotation; auto colourFlags = session.TrackColours[SCHEME_MISC]; - if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, rotation)) + if (edges & EDGE_NW && TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, rotation)) { imageId = colourFlags.WithIndex(SPR_FENCE_ROPE_NW); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 2, height + 2 }, { 32, 1, 7 } }); } - if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, rotation)) + if (edges & EDGE_NE && TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, rotation)) { imageId = colourFlags.WithIndex(SPR_FENCE_ROPE_NE); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 0, height + 2 }, { 1, 32, 7 } }); } - if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, rotation)) + if (edges & EDGE_SE && TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, rotation)) { - // Bound box is slightly different from track_paint_util_paint_fences + // Bound box is slightly different from TrackPaintUtilPaintFences imageId = colourFlags.WithIndex(SPR_FENCE_ROPE_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 29, height + 3 }, { 28, 1, 7 } }); } - if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, rotation)) + if (edges & EDGE_SW && TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, rotation)) { imageId = colourFlags.WithIndex(SPR_FENCE_ROPE_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 0, height + 2 }, { 1, 32, 7 } }); diff --git a/src/openrct2/ride/gentle/FlyingSaucers.cpp b/src/openrct2/ride/gentle/FlyingSaucers.cpp index 1220872d6f..75719a9516 100644 --- a/src/openrct2/ride/gentle/FlyingSaucers.cpp +++ b/src/openrct2/ride/gentle/FlyingSaucers.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ static constexpr const uint32_t FlyingSaucersFenceSprites[] = { /** * rct2: 0x008873D8 */ -static void paint_flying_saucers( +static void PaintFlyingSaucers( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -52,7 +52,7 @@ static void paint_flying_saucers( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 1, height }, { 30, 30, 1 } }); } - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, FlyingSaucersFenceSprites, session.CurrentRotation); @@ -70,5 +70,5 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionFlyingSaucers(int32_t trackType) return nullptr; } - return paint_flying_saucers; + return PaintFlyingSaucers; } diff --git a/src/openrct2/ride/gentle/GhostTrain.cpp b/src/openrct2/ride/gentle/GhostTrain.cpp index cdb65c0e0c..690f191d70 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -182,12 +182,12 @@ static void PaintGhostTrainTrackFlat( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPiecesFlat[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); auto tunnelImage = GetTunnelDoorsImageStraightFlat(trackElement, direction); PaintUtilPushTunnelRotated(session, direction, height, tunnelImage); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -203,12 +203,12 @@ static void PaintGhostTrainTrack25DegUp( const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPieces25DegUp[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPieces25DegUp[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 23 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 23 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -251,12 +251,12 @@ static void PaintGhostTrainTrackFlatTo25DegUp( } auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPiecesFlatTo25DegUp[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPiecesFlatTo25DegUp[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 15 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 15 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -287,12 +287,12 @@ static void PaintGhostTrainTrack25DegUpToFlatShared( const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPieces25DegUpToFlat[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPieces25DegUpToFlat[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 15 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 15 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -381,10 +381,10 @@ static void PaintGhostTrainStation( }; imageId = session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { 32, 28, 3 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 3 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPiecesFlat[direction]); - PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 0, height }); + PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 3 } }); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -399,7 +399,7 @@ static void PaintGhostTrainStation( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -410,7 +410,7 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], GhostTrainTrackPiecesQuarterTurn3Tiles, nullptr, defaultRightQuarterTurn3TilesBoundLengths, defaultRightQuarterTurn3TilesBoundOffsets); @@ -418,7 +418,7 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( bool isDoorA = (!isBackwards && trackSequence == 0) || (isBackwards && trackSequence == 3); auto tunnelType = isDoorA ? DoorOpeningInwardsToImage[trackElement.GetDoorAState()] : DoorOpeningOutwardsToImage[trackElement.GetDoorBState()]; - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, tunnelType); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, tunnelType); switch (trackSequence) { @@ -473,9 +473,9 @@ static void PaintGhostTrainTrackLeftQuarterTurn1Tile( tunnelEndImage = DoorOpeningInwardsToImage[trackElement.GetDoorAState()]; } - track_paint_util_left_quarter_turn_1_tile_paint( + TrackPaintUtilLeftQuarterTurn1TilePaint( session, 3, height, 0, direction, session.TrackColours[SCHEME_TRACK], GhostTrainTrackPiecesQuarterTurn1Tile); - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, tunnelStartImage, 0, tunnelEndImage); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, tunnelStartImage, 0, tunnelEndImage); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -497,9 +497,9 @@ static void PaintGhostTrainTrackSpinningTunnel( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(ghost_train_track_pieces_spinning_tunnel_track[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 28, 20, 3 }, { 2, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 2, 6, height }, { 28, 20, 3 } }); - track_paint_util_spinning_tunnel_paint(session, 3, height, direction); + TrackPaintUtilSpinningTunnelPaint(session, 3, height, direction); auto tunnelImage = GetTunnelDoorsImageStraightFlat(trackElement, direction); PaintUtilPushTunnelRotated(session, direction, height, tunnelImage); @@ -517,12 +517,12 @@ static void PaintGhostTrainTrackBrakes( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPiecesBrakes[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); auto tunnelImage = GetTunnelDoorsImageStraightFlat(trackElement, direction); PaintUtilPushTunnelRotated(session, direction, height, tunnelImage); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 6fd45427ed..8c06b3208c 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -72,9 +72,9 @@ static void PaintHauntedHouse( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope, session.CurrentRotation); diff --git a/src/openrct2/ride/gentle/Maze.cpp b/src/openrct2/ride/gentle/Maze.cpp index 96b64fa726..50a4502f53 100644 --- a/src/openrct2/ride/gentle/Maze.cpp +++ b/src/openrct2/ride/gentle/Maze.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -200,7 +200,7 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionMaze(int32_t trackType) return MazePaintSetup; } -money64 MazeCalculateCost(money32 constructionCost, const Ride& ride, const CoordsXYZ& loc) +money64 MazeCalculateCost(money64 constructionCost, const Ride& ride, const CoordsXYZ& loc) { const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); money64 price = (ride.GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.PriceModifier) >> 16; diff --git a/src/openrct2/ride/gentle/Maze.h b/src/openrct2/ride/gentle/Maze.h index d935853142..b5db6bf6f4 100644 --- a/src/openrct2/ride/gentle/Maze.h +++ b/src/openrct2/ride/gentle/Maze.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,4 +11,4 @@ #include "../RideData.h" -money64 MazeCalculateCost(money32 constructionCost, const Ride& ride, const CoordsXYZ& loc); +money64 MazeCalculateCost(money64 constructionCost, const Ride& ride, const CoordsXYZ& loc); diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index ce70de6aff..95f13c3008 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ static constexpr const uint16_t MerryGoRoundBreakdownVibration[] = { }; static void PaintRiders( - PaintSession& session, const Ride& ride, const rct_ride_entry& rideEntry, const Vehicle& vehicle, int32_t rotationOffset, + PaintSession& session, const Ride& ride, const RideObjectEntry& rideEntry, const Vehicle& vehicle, int32_t rotationOffset, const CoordsXYZ& offset, const BoundBoxXYZ& bb) { if (session.DPI.zoom_level > ZoomLevel{ 0 }) @@ -84,7 +84,7 @@ static void PaintCarousel( auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -110,9 +110,9 @@ static void PaintMerryGoRound( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope, session.CurrentRotation); diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index a986463923..253767e988 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -444,23 +444,6 @@ const size_t MiniGolfPeepAnimationLengths[] = { }; // clang-format on -static PaintStruct* MiniGolfPaintUtil7C( - PaintSession& session, uint8_t direction, ImageId imageId, int8_t x_offset, int8_t yOffset, int16_t boundBoxLengthX, - int16_t boundBoxLengthY, int8_t boundBoxLengthZ, int16_t zOffset, int16_t boundBoxOffsetX, int16_t boundBoxOffsetY, - int16_t boundBoxOffsetZ, uint32_t rotation) -{ - if (direction & 1) - { - return PaintAddImageAsParent( - session, imageId, { yOffset, x_offset, zOffset }, - { { boundBoxOffsetY, boundBoxOffsetX, boundBoxOffsetZ }, { boundBoxLengthY, boundBoxLengthX, boundBoxLengthZ } }); - } - - return PaintAddImageAsParent( - session, imageId, { x_offset, yOffset, zOffset }, - { { boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ }, { boundBoxLengthX, boundBoxLengthY, boundBoxLengthZ } }); -} - static bool MiniGolfPaintUtilShouldDrawFence(PaintSession& session, const TrackElement& trackElement) { if (!(session.Flags & PaintSessionFlags::PassedSurface)) @@ -470,7 +453,7 @@ static bool MiniGolfPaintUtilShouldDrawFence(PaintSession& session, const TrackE } const TileElement* surfaceElement = session.SurfaceElement; - if (surfaceElement->base_height != trackElement.base_height) + if (surfaceElement->BaseHeight != trackElement.BaseHeight) { return true; } @@ -520,10 +503,10 @@ static void PaintMiniGolfTrackFlat( else { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceBackSwNe); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 10, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 7 } }); imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceFrontSwNe); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 22, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 7 } }); } } @@ -538,17 +521,17 @@ static void PaintMiniGolfTrack25DegUp( ImageId imageId; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSprites25DegUp[direction][0]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0); imageId = session.TrackColours[SCHEME_MISC].WithIndex(MiniGolfTrackSprites25DegUp[direction][1]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 10, height + 2, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 15 } }); imageId = session.TrackColours[SCHEME_MISC].WithIndex(MiniGolfTrackSprites25DegUp[direction][2]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 1, 15, height, 0, 22, height + 2, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 15 } }); switch (direction) { @@ -577,17 +560,17 @@ static void PaintMiniGolfTrackFlatTo25DegUp( ImageId imageId; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][0]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0); imageId = session.TrackColours[SCHEME_MISC].WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][1]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 10, height + 2, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 11 } }); imageId = session.TrackColours[SCHEME_MISC].WithIndex(MiniGolfTrackSpritesFlatTo25DegUp[direction][2]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 22, height + 2, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 11 } }); switch (direction) { @@ -616,17 +599,17 @@ static void PaintMiniGolfTrack25DegUpToFlat( ImageId imageId; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][0]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0); imageId = session.TrackColours[SCHEME_MISC].WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][1]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 10, height + 2, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 10, height + 2 }, { 32, 1, 11 } }); imageId = session.TrackColours[SCHEME_MISC].WithIndex(MiniGolfTrackSprites25DegUpToFlat[direction][2]); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 1, 11, height, 0, 22, height + 2, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 22, height + 2 }, { 32, 1, 11 } }); switch (direction) { @@ -681,48 +664,48 @@ static void PaintMiniGolfStation( bool hasFence; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMiniGolfStationFloor); - MiniGolfPaintUtil7C(session, direction, imageId, 0, 0, 32, 28, 1, height, 0, 0, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 28, 1 } }); if (direction & 1) { - hasFence = track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceBackNwSe); - PaintAddImageAsParent(session, imageId, { -10, 0, height }, { 1, 32, 7 }, { 0, 0, height + 2 }); + PaintAddImageAsParent(session, imageId, { -10, 0, height }, { { 0, 0, height + 2 }, { 1, 32, 7 } }); } - bool hasSWFence = track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); - if (hasFence) + bool hasSWFence = TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); + if (hasSWFence) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceFrontNwSe); - PaintAddImageAsParent(session, imageId, { 10, 0, height }, { 1, 32, 7 }, { 31, 0, height + 2 }); + PaintAddImageAsParent(session, imageId, { 10, 0, height }, { { 31, 0, height + 2 }, { 1, 32, 7 } }); } - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); - track_paint_util_draw_station_covers(session, EDGE_SW, hasSWFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasSWFence, stationObj, height); // Was leftwards tunnel in game, seems odd PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } else { - hasFence = track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceBackSwNe); - PaintAddImageAsParent(session, imageId, { 0, -10, height }, { 32, 1, 7 }, { 0, 0, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, -10, height }, { { 0, 0, height + 2 }, { 32, 1, 7 } }); } - bool hasSEFence = track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); - if (hasFence) + bool hasSEFence = TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); + if (hasSEFence) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceFrontSwNe); - PaintAddImageAsParent(session, imageId, { 0, 10, height }, { 32, 1, 7 }, { 0, 31, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 10, height }, { { 0, 31, height + 2 }, { 32, 1, 7 } }); } - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); - track_paint_util_draw_station_covers(session, EDGE_SE, hasSEFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasSEFence, stationObj, height); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } @@ -740,7 +723,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( { ImageId imageId; - track_paint_util_left_quarter_turn_1_tile_paint( + TrackPaintUtilLeftQuarterTurn1TilePaint( session, 1, height, 0, direction, session.TrackColours[SCHEME_TRACK], MiniGolfTrackSpritesQuarterTurn1Tile); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -793,7 +776,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( if (shouldDrawFence) { // TODO: The back fence uses the same x/y offsets, but uses another paint function. See if this occurs more often. - track_paint_util_left_quarter_turn_1_tile_paint( + TrackPaintUtilLeftQuarterTurn1TilePaint( session, 0, height, 24, direction, session.TrackColours[SCHEME_MISC], MiniGolfTrackSpritesQuarterTurn1TileFenceFront); @@ -801,11 +784,11 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( { case 0: imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfQuarterTurn1TileFenceInsideSwNw); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 5, 5, 5 }, { 24, 0, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 24, 0, height + 2 }, { 5, 5, 5 } }); break; case 2: imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfQuarterTurn1TileFenceInsideNeSe); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 5, 5, 5 }, { 0, 24, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 24, height + 2 }, { 5, 5, 5 } }); break; } } @@ -931,16 +914,16 @@ static void PaintMiniGolfHoleC( { case 0x01: case 0x20: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 26, 3 }, { 30, 3, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 3, height + 4 }, { 2, 26, 3 } }); break; case 0x10: case 0x31: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 2, 3 }, { 3, 30, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 3, 30, height + 4 }, { 26, 2, 3 } }); break; default: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 }, - { boundBoxOffset.x, boundBoxOffset.y, height + 24 }); + session, imageId, { 0, 0, height }, + { { boundBoxOffset.x, boundBoxOffset.y, height + 24 }, { boundBox.x, boundBox.y, 0 } }); break; } @@ -1007,22 +990,22 @@ static void PaintMiniGolfHoleD( { case 0x01: case 0x32: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 26, 3 }, { 30, 3, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 3, height + 4 }, { 2, 26, 3 } }); break; case 0x02: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 23, 2, 3 }, { 3, 30, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 3, 30, height + 4 }, { 23, 2, 3 } }); break; case 0x10: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 24, 3 }, { 30, 3, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 3, height + 4 }, { 2, 24, 3 } }); break; case 0x20: case 0x31: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 2, 3 }, { 3, 30, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 3, 30, height + 4 }, { 26, 2, 3 } }); break; default: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 }, - { boundBoxOffset.x, boundBoxOffset.y, height + 24 }); + session, imageId, { 0, 0, height }, + { { boundBoxOffset.x, boundBoxOffset.y, height + 24 }, { boundBox.x, boundBox.y, 0 } }); break; } @@ -1099,23 +1082,23 @@ static void PaintMiniGolfHoleE( switch ((direction << 4) | trackSequence) { case 0x01: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 26, 3 }, { 30, 3, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 3, height + 4 }, { 2, 26, 3 } }); break; case 0x02: case 0x20: case 0x31: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 2, 3 }, { 3, 30, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 3, 30, height + 4 }, { 26, 2, 3 } }); break; case 0x10: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 24, 3 }, { 30, 3, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 3, height + 4 }, { 2, 24, 3 } }); break; case 0x32: - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 23, 3 }, { 30, 3, height + 4 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 3, height + 4 }, { 2, 23, 3 } }); break; default: PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 }, - { boundBoxOffset.x, boundBoxOffset.y, height + 24 }); + session, imageId, { 0, 0, height }, + { { boundBoxOffset.x, boundBoxOffset.y, height + 24 }, { boundBox.x, boundBox.y, 0 } }); break; } @@ -1199,7 +1182,7 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniGolf(int32_t trackType) /** * rct2: 0x006D42F0 */ -void vehicle_visual_mini_golf_player( +void VehicleVisualMiniGolfPlayer( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle) { if (vehicle->num_peeps == 0) @@ -1207,7 +1190,7 @@ void vehicle_visual_mini_golf_player( return; } - rct_drawpixelinfo* edi = &session.DPI; + DrawPixelInfo* edi = &session.DPI; if (edi->zoom_level >= ZoomLevel{ 2 }) { return; @@ -1230,7 +1213,7 @@ void vehicle_visual_mini_golf_player( ImageIndex index = rideEntry->Cars[0].base_image_id + 1 + ebx; auto image = ImageId(index, peep->TshirtColour, peep->TrousersColour); - PaintAddImageAsParent(session, image, { 0, 0, z }, { 1, 1, 11 }, { 0, 0, z + 5 }); + PaintAddImageAsParent(session, image, { 0, 0, z }, { { 0, 0, z + 5 }, { 1, 1, 11 } }); } /** @@ -1244,7 +1227,7 @@ void VehicleVisualMiniGolfBall( return; } - rct_drawpixelinfo* edi = &session.DPI; + DrawPixelInfo* edi = &session.DPI; if (edi->zoom_level >= ZoomLevel{ 1 }) { return; @@ -1259,5 +1242,5 @@ void VehicleVisualMiniGolfBall( return; uint32_t image_id = rideEntry->Cars[0].base_image_id; - PaintAddImageAsParent(session, ImageId(image_id), { 0, 0, z }, { 1, 1, 0 }, { 0, 0, z + 3 }); + PaintAddImageAsParent(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z + 3 }, { 1, 1, 0 } }); } diff --git a/src/openrct2/ride/gentle/MiniHelicopters.cpp b/src/openrct2/ride/gentle/MiniHelicopters.cpp index c4948019ab..ed8d8a2dca 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -26,7 +26,7 @@ static void PaintMiniHelicoptersTrackStation( if (direction == 0 || direction == 2) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); @@ -38,7 +38,7 @@ static void PaintMiniHelicoptersTrackStation( else if (direction == 1 || direction == 3) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); @@ -48,7 +48,7 @@ static void PaintMiniHelicoptersTrackStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -64,17 +64,17 @@ static void PaintMiniHelicoptersTrackFlat( if (direction & 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_0); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_0); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 4, -1, height, @@ -98,30 +98,30 @@ static void PaintMiniHelicoptersTrackFlatTo25DegUp( case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_0); break; case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_2); break; case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_2); break; case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_0); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_STICK, 4, -4, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -142,27 +142,27 @@ static void PaintMiniHelicoptersTrack25DegUp( { case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_1); break; case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height + 8, TUNNEL_2); break; case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_2); break; case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height - 8, TUNNEL_1); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_STICK, 4, -9, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -184,30 +184,30 @@ static void PaintMiniHelicoptersTrack25DegUpToFlat( case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_0); break; case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height + 8, TUNNEL_12); break; case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_12); break; case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex( SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height - 8, TUNNEL_0); break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_STICK, 4, -7, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -246,10 +246,10 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_3_tiles_paint( + TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles); - track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height, TUNNEL_0, direction, trackSequence); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TUNNEL_0, direction, trackSequence); switch (trackSequence) { @@ -293,10 +293,10 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_1_tile_paint( + TrackPaintUtilLeftQuarterTurn1TilePaint( session, 1, height, 0, direction, session.TrackColours[SCHEME_TRACK], trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile); - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height, 0, TUNNEL_0, 0, TUNNEL_0); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); @@ -325,9 +325,9 @@ static void PaintMiniHelicoptersTrackSpinningTunnel( ImageId imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); ImageId underlay = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParentRotated(session, direction, underlay, { 0, 6, height - 2 }, { 32, 20, 1 }, { 0, 6, height }); - PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height }); - track_paint_util_spinning_tunnel_paint(session, 1, height, direction); + 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); WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]); diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index d54d3d5937..29260adced 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -159,31 +159,13 @@ static constexpr const uint32_t MonorailCyclesTrackPiecesFlatQuarterTurn3Tiles[4 }, }; -static PaintStruct* PaintMonorailCyclesUtil7C( - PaintSession& session, bool flip, ImageId imageId, int8_t xOffset, int8_t yOffset, int16_t boundBoxLengthX, - int16_t boundBoxLengthY, int8_t boundBoxLengthZ, int16_t zOffset, int16_t boundBoxOffsetX, int16_t boundBoxOffsetY, - int16_t boundBoxOffsetZ, uint32_t rotation) -{ - if (flip) - { - return PaintAddImageAsParent( - session, imageId, { yOffset, xOffset, zOffset }, { boundBoxLengthY, boundBoxLengthX, boundBoxLengthZ }, - { boundBoxOffsetY, boundBoxOffsetX, boundBoxOffsetZ }); - } - - return PaintAddImageAsParent( - session, imageId, { xOffset, yOffset, zOffset }, { boundBoxLengthX, boundBoxLengthY, boundBoxLengthZ }, - { boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ }); -} - /** rct2: 0x0088AD48 */ static void PaintMonorailCyclesTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MonorailCyclesTrackPiecesFlat[(direction & 1)]); - PaintMonorailCyclesUtil7C( - session, static_cast(direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); if (direction & 1) { @@ -213,7 +195,7 @@ static void PaintMonorailCyclesStation( if (direction == 0 || direction == 2) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMonorailCyclesFlatSwNe); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); @@ -225,7 +207,7 @@ static void PaintMonorailCyclesStation( else if (direction == 1 || direction == 3) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMonorailCyclesFlatNwSe); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); @@ -235,7 +217,7 @@ static void PaintMonorailCyclesStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); @@ -246,10 +228,10 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_3_tiles_paint( + TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], MonorailCyclesTrackPiecesFlatQuarterTurn3Tiles); - track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height, TUNNEL_0, direction, trackSequence); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height, TUNNEL_0, direction, trackSequence); switch (trackSequence) { @@ -307,7 +289,7 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 1, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], MonorailCyclesTrackPiecesFlatQuarterTurn5Tiles, nullptr, defaultRightQuarterTurn5TilesBoundLengths, defaultRightQuarterTurn5TilesBoundOffsets); @@ -439,20 +421,16 @@ static void PaintMonorailCyclesTrackSBendLeft( switch (trackSequence) { case 0: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); break; case 1: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 26, 1 } }); break; case 2: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); break; case 3: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); break; } @@ -543,20 +521,16 @@ static void PaintMonorailCyclesTrackSBendRight( switch (trackSequence) { case 0: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); break; case 1: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 26, 1 } }); break; case 2: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 26, 1 } }); break; case 3: - PaintMonorailCyclesUtil7C( - session, direction & 1, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, session.CurrentRotation); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); break; } diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index 25342647a4..e635ea55ea 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -73,8 +73,8 @@ void VehicleVisualObservationTower( imageId1 = ImageId(baseImageId + 1).WithRemap(FilterPaletteID::Palette44); } - PaintAddImageAsParent(session, imageId0, { 0, 0, z }, { 2, 2, 41 }, { -11, -11, z + 1 }); - PaintAddImageAsParent(session, imageId1, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsParent(session, imageId0, { 0, 0, z }, { { -11, -11, z + 1 }, { 2, 2, 41 } }); + PaintAddImageAsParent(session, imageId1, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); assert(carEntry->effect_visual == 1); } @@ -92,23 +92,22 @@ static void PaintObservationTowerBase( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor( - session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, position, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesMetalB, session.CurrentRotation); if (trackSequence == 0) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprObservationTowerSegmentBase); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 8, 8, height + 3 }, { 2, 2, 27 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprObservationTowerSegment); - PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { 2, 2, 30 }, { 8, 8, height + 32 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { { 8, 8, height + 32 }, { 2, 2, 30 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprObservationTowerSegment); - PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { 2, 2, 30 }, { 8, 8, height + 64 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { { 8, 8, height + 64 }, { 2, 2, 30 } }); PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -162,7 +161,7 @@ static void PaintObservationTowerSection( } auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprObservationTowerSegment); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 8, 8, height }, { 2, 2, 30 } }); const TileElement* nextTileElement = reinterpret_cast(&trackElement) + 1; if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ()) diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index 2996a08f4b..d382252680 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,7 @@ static void PaintSpaceRingsStructure( if (ride.num_stations == 0 || vehicleIndex < ride.NumTrains) { - rct_ride_entry* rideEntry = get_ride_entry(ride.subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); int32_t frameNum = direction; @@ -59,13 +59,13 @@ static void PaintSpaceRingsStructure( vehicleIndex = 0; } - if (imageColourFlags.ToUInt32() == IMAGE_TYPE_REMAP) + if (imageColourFlags == TrackGhost) { imageColourFlags = ImageId(0, ride.vehicle_colours[vehicleIndex].Body, ride.vehicle_colours[vehicleIndex].Trim); } auto imageId = imageColourFlags.WithIndex(baseImageId + frameNum); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 20, 23 }, { -10, -10, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { -10, -10, height }, { 20, 20, 23 } }); if (vehicle != nullptr && vehicle->num_peeps > 0) { @@ -98,24 +98,24 @@ static void PaintSpaceRings( WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]); const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); switch (trackSequence) { case 7: - if (track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session.CurrentRotation)) + if (TrackPaintUtilHasFence(EDGE_SW, position, trackElement, ride, session.CurrentRotation)) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprSpaceRingsFenceSw); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 29, 0, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 29, 0, height + 2 }, { 1, 28, 7 } }); } - if (track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session.CurrentRotation)) + if (TrackPaintUtilHasFence(EDGE_SE, position, trackElement, ride, session.CurrentRotation)) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprSpaceRingsFenceSe); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 2 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 29, height + 2 }, { 28, 1, 7 } }); } break; default: - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, position, trackElement, ride, session.TrackColours[SCHEME_MISC], height, SpaceRingsFenceSprites, session.CurrentRotation); break; diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index fdf9916d6f..1bd16f22ec 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -67,7 +67,7 @@ static void SpiralSlidePaintTileRight( else imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideRightR3)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 16, 16, 108 }, { 16, 0, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 16, 0, height + 3 }, { 16, 16, 108 } }); } static void SpiralSlidePaintTileLeft( @@ -89,7 +89,7 @@ static void SpiralSlidePaintTileLeft( else imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideLeftR3)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 16, 16, 108 }, { 0, 16, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 0, 16, height + 3 }, { 16, 16, 108 } }); } static void SpiralSlidePaintTileFront( @@ -105,36 +105,36 @@ static void SpiralSlidePaintTileFront( if (direction == 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideInsideR1)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 2, 16, 108 }, { -12, 0, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { -12, 0, height + 3 }, { 2, 16, 108 } }); } else if (direction == 2) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideInsideR2)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 16, 2, 108 }, { 0, -12, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 0, -12, height + 3 }, { 16, 2, 108 } }); } if (direction == 0) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideCentreR0)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 16, 8, 108 }, { 0, 8, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 0, 8, height + 3 }, { 16, 8, 108 } }); } else if (direction == 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideCentreR1)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 2, 16, 108 }, { 14, 0, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 14, 0, height + 3 }, { 2, 16, 108 } }); } else if (direction == 2) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideCentreR2)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 16, 2, 108 }, { 0, 14, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 0, 14, height + 3 }, { 16, 2, 108 } }); } else if (direction == 3) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((rideEntry->Cars[0].base_image_id + SpiralSlideCentreR3)); - PaintAddImageAsParent(session, imageId, { 16, 16, height }, { 8, 16, 108 }, { 8, 0, height + 3 }); + PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 8, 0, height + 3 }, { 8, 16, 108 } }); } - rct_drawpixelinfo* dpi = &session.DPI; + DrawPixelInfo* dpi = &session.DPI; if (dpi->zoom_level <= ZoomLevel{ 0 } && ride.slide_in_use != 0) { uint8_t slide_progress = ride.spiral_slide_progress; @@ -214,7 +214,7 @@ static void PaintSpiralSlide( { auto imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( rideEntry->Cars[0].base_image_id + ((direction & 1) ? SpiralSlideBaseB : SpiralSlideBaseA)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); } const uint32_t spiral_slide_fence_sprites[] = { @@ -224,7 +224,7 @@ static void PaintSpiralSlide( rideEntry->Cars[0].base_image_id + SpiralSlideFenceTopLeft, }; - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, spiral_slide_fence_sprites, session.CurrentRotation); diff --git a/src/openrct2/ride/gentle/meta/CarRide.h b/src/openrct2/ride/gentle/meta/CarRide.h index 20644cc0b5..c963301e85 100644 --- a/src/openrct2/ride/gentle/meta/CarRide.h +++ b/src/openrct2/ride/gentle/meta/CarRide.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor CarRideRTD = SET_FIELD(Heights, { 6, 24, 4, 7, }), SET_FIELD(MaxMass, 2), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_car_ride), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCarRide), SET_FIELD(RatingsMultipliers, { 70, 10, 10 }), SET_FIELD(UpkeepCosts, { 70, 20, 0, 8, 3, 5 }), SET_FIELD(BuildCosts, { 12.50_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/gentle/meta/Circus.h b/src/openrct2/ride/gentle/meta/Circus.h index 13b5bf6d0b..386406292e 100644 --- a/src/openrct2/ride/gentle/meta/Circus.h +++ b/src/openrct2/ride/gentle/meta/Circus.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor CircusRTD = SET_FIELD(Heights, { 12, 128, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_circus), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCircus), SET_FIELD(RatingsMultipliers, { 20, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 62.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/CrookedHouse.h b/src/openrct2/ride/gentle/meta/CrookedHouse.h index 22e8858ed2..ef962e7f6e 100644 --- a/src/openrct2/ride/gentle/meta/CrookedHouse.h +++ b/src/openrct2/ride/gentle/meta/CrookedHouse.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor CrookedHouseRTD = SET_FIELD(Heights, { 16, 96, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_crooked_house), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCrookedHouse), SET_FIELD(RatingsMultipliers, { 15, 8, 0 }), SET_FIELD(UpkeepCosts, { 30, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 32.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/Dodgems.h b/src/openrct2/ride/gentle/meta/Dodgems.h index 7bfc4f1908..e73765afbc 100644 --- a/src/openrct2/ride/gentle/meta/Dodgems.h +++ b/src/openrct2/ride/gentle/meta/Dodgems.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor DodgemsRTD = SET_FIELD(Heights, { 9, 48, 2, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_dodgems), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateDodgems), SET_FIELD(RatingsMultipliers, { 40, 20, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 5, 0, 0 }), SET_FIELD(BuildCosts, { 27.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/FerrisWheel.h b/src/openrct2/ride/gentle/meta/FerrisWheel.h index d394b9eafd..e22f5d9fc6 100644 --- a/src/openrct2/ride/gentle/meta/FerrisWheel.h +++ b/src/openrct2/ride/gentle/meta/FerrisWheel.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor FerrisWheelRTD = SET_FIELD(Heights, { 16, 176, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_ferris_wheel), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateFerrisWheel), SET_FIELD(RatingsMultipliers, { 60, 20, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 112.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/FlyingSaucers.h b/src/openrct2/ride/gentle/meta/FlyingSaucers.h index 44666d6b53..d7bbfe9b0d 100644 --- a/src/openrct2/ride/gentle/meta/FlyingSaucers.h +++ b/src/openrct2/ride/gentle/meta/FlyingSaucers.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor FlyingSaucersRTD = SET_FIELD(Heights, { 9, 48, 2, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_flying_saucers), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateFlyingSaucers), SET_FIELD(RatingsMultipliers, { 50, 25, 0 }), SET_FIELD(UpkeepCosts, { 90, 1, 0, 5, 0, 0 }), SET_FIELD(BuildCosts, { 35.00_GBP, 2.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/GhostTrain.h b/src/openrct2/ride/gentle/meta/GhostTrain.h index b4bca1ad99..dd8d2ad939 100644 --- a/src/openrct2/ride/gentle/meta/GhostTrain.h +++ b/src/openrct2/ride/gentle/meta/GhostTrain.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,7 +42,7 @@ constexpr const RideTypeDescriptor GhostTrainRTD = SET_FIELD(Heights, { 8, 24, 6, 7, }), SET_FIELD(MaxMass, 2), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_ghost_train), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateGhostTrain), SET_FIELD(RatingsMultipliers, { 70, 10, 10 }), SET_FIELD(UpkeepCosts, { 80, 20, 0, 8, 3, 5 }), SET_FIELD(BuildCosts, { 13.00_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/gentle/meta/HauntedHouse.h b/src/openrct2/ride/gentle/meta/HauntedHouse.h index 69dbf20d97..34f70e7315 100644 --- a/src/openrct2/ride/gentle/meta/HauntedHouse.h +++ b/src/openrct2/ride/gentle/meta/HauntedHouse.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor HauntedHouseRTD = SET_FIELD(Heights, { 16, 160, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_haunted_house), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateHauntedHouse), SET_FIELD(RatingsMultipliers, { 20, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 42.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/Maze.h b/src/openrct2/ride/gentle/meta/Maze.h index 9886cd4c21..2e09d7e172 100644 --- a/src/openrct2/ride/gentle/meta/Maze.h +++ b/src/openrct2/ride/gentle/meta/Maze.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,7 +27,7 @@ constexpr const RideTypeDescriptor MazeRTD = SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMaze), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | - RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA), + RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA | RIDE_TYPE_FLAG_IS_MAZE), SET_FIELD(RideModes, EnumsToFlags(RideMode::Maze)), SET_FIELD(DefaultMode, RideMode::Maze), SET_FIELD(OperatingSettings, { 1, 64, 0, 0, 0, 0 }), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor MazeRTD = SET_FIELD(Heights, { 6, 24, 0, 1, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_maze), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMaze), SET_FIELD(RatingsMultipliers, { 50, 0, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 27.50_GBP, 1.00_GBP, 8, }), diff --git a/src/openrct2/ride/gentle/meta/MerryGoRound.h b/src/openrct2/ride/gentle/meta/MerryGoRound.h index ee033847a3..aed7ea8be3 100644 --- a/src/openrct2/ride/gentle/meta/MerryGoRound.h +++ b/src/openrct2/ride/gentle/meta/MerryGoRound.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor MerryGoRoundRTD = SET_FIELD(Heights, { 12, 64, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_merry_go_round), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMerryGoRound), SET_FIELD(RatingsMultipliers, { 50, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 57.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/MiniGolf.h b/src/openrct2/ride/gentle/meta/MiniGolf.h index 18db9d4b92..95e7b011c4 100644 --- a/src/openrct2/ride/gentle/meta/MiniGolf.h +++ b/src/openrct2/ride/gentle/meta/MiniGolf.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor MiniGolfRTD = SET_FIELD(Heights, { 7, 32, 2, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_mini_golf), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMiniGolf), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 30, 60, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 25.00_GBP, 3.50_GBP, 20, }), diff --git a/src/openrct2/ride/gentle/meta/MiniHelicopters.h b/src/openrct2/ride/gentle/meta/MiniHelicopters.h index 4a678027a7..d34f4d8a47 100644 --- a/src/openrct2/ride/gentle/meta/MiniHelicopters.h +++ b/src/openrct2/ride/gentle/meta/MiniHelicopters.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor MiniHelicoptersRTD = SET_FIELD(Heights, { 7, 24, 4, 7, }), SET_FIELD(MaxMass, 2), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_mini_helicopters), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMiniHelicopters), SET_FIELD(RatingsMultipliers, { 70, 10, 10 }), SET_FIELD(UpkeepCosts, { 70, 20, 0, 8, 3, 5 }), SET_FIELD(BuildCosts, { 12.50_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/gentle/meta/MonorailCycles.h b/src/openrct2/ride/gentle/meta/MonorailCycles.h index 90e62427e6..8ba17eab64 100644 --- a/src/openrct2/ride/gentle/meta/MonorailCycles.h +++ b/src/openrct2/ride/gentle/meta/MonorailCycles.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,7 @@ constexpr const RideTypeDescriptor MonorailCyclesRTD = SET_FIELD(Heights, { 5, 24, 8, 7, }), SET_FIELD(MaxMass, 2), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_monorail_cycles), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMonorailCycles), SET_FIELD(RatingsMultipliers, { 50, 10, 10 }), SET_FIELD(UpkeepCosts, { 47, 20, 0, 8, 3, 5 }), SET_FIELD(BuildCosts, { 10.00_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/gentle/meta/MonsterTrucks.h b/src/openrct2/ride/gentle/meta/MonsterTrucks.h index 0d1e11405b..505345df01 100644 --- a/src/openrct2/ride/gentle/meta/MonsterTrucks.h +++ b/src/openrct2/ride/gentle/meta/MonsterTrucks.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,7 @@ constexpr const RideTypeDescriptor MonsterTrucksRTD = SET_FIELD(Heights, { 18, 24, 4, 7, }), SET_FIELD(MaxMass, 2), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_car_ride), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCarRide), SET_FIELD(RatingsMultipliers, { 70, 10, 10 }), SET_FIELD(UpkeepCosts, { 70, 20, 0, 8, 3, 5 }), SET_FIELD(BuildCosts, { 12.50_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/gentle/meta/ObservationTower.h b/src/openrct2/ride/gentle/meta/ObservationTower.h index 2d4abe6d88..3930110efc 100644 --- a/src/openrct2/ride/gentle/meta/ObservationTower.h +++ b/src/openrct2/ride/gentle/meta/ObservationTower.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor ObservationTowerRTD = SET_FIELD(Heights, { 255, 32, 3, 2, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_observation_tower), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateObservationTower), SET_FIELD(RatingsMultipliers, { 80, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 20, 0, 10, 0, 0 }), SET_FIELD(BuildCosts, { 18.50_GBP, 0.00_GBP, 4, }), diff --git a/src/openrct2/ride/gentle/meta/SpaceRings.h b/src/openrct2/ride/gentle/meta/SpaceRings.h index c82282ff82..74308527e8 100644 --- a/src/openrct2/ride/gentle/meta/SpaceRings.h +++ b/src/openrct2/ride/gentle/meta/SpaceRings.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor SpaceRingsRTD = SET_FIELD(Heights, { 16, 48, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_space_rings), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSpaceRings), SET_FIELD(RatingsMultipliers, { 12, 4, 4 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 36.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/gentle/meta/SpiralSlide.h b/src/openrct2/ride/gentle/meta/SpiralSlide.h index 9443e5e376..c9ba556da2 100644 --- a/src/openrct2/ride/gentle/meta/SpiralSlide.h +++ b/src/openrct2/ride/gentle/meta/SpiralSlide.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,7 +27,7 @@ constexpr const RideTypeDescriptor SpiralSlideRTD = SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_INTERESTING_TO_LOOK_AT | - RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY), + RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | RIDE_TYPE_FLAG_IS_SPIRAL_SLIDE), SET_FIELD(RideModes, EnumsToFlags(RideMode::SingleRidePerAdmission, RideMode::UnlimitedRidesPerAdmission)), SET_FIELD(DefaultMode, RideMode::SingleRidePerAdmission), SET_FIELD(OperatingSettings, { 1, 5, 0, 0, 0, 0 }), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor SpiralSlideRTD = SET_FIELD(Heights, { 15, 128, 0, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_spiral_slide), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSpiralSlide), SET_FIELD(RatingsMultipliers, { 50, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 82.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/Facility.cpp b/src/openrct2/ride/shops/Facility.cpp index 266498fcbd..e7ac8ef285 100644 --- a/src/openrct2/ride/shops/Facility.cpp +++ b/src/openrct2/ride/shops/Facility.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,8 @@ static void PaintFacility( auto lengthX = (direction & 1) == 0 ? 28 : 2; auto lengthY = (direction & 1) == 0 ? 2 : 28; CoordsXYZ offset(0, 0, height); - BoundBoxXYZ bb = { { direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height }, { lengthX, lengthY, 29 } }; + BoundBoxXYZ bb = { { direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height }, + { lengthX, lengthY, trackElement.GetClearanceZ() - trackElement.GetBaseZ() - 3 } }; auto imageTemplate = session.TrackColours[SCHEME_TRACK]; auto imageIndex = firstCarEntry->base_image_id + ((direction + 2) & 3); @@ -71,7 +72,7 @@ static void PaintFacility( } /* 0x00762D44 */ -TRACK_PAINT_FUNCTION get_track_paint_function_facility(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionFacility(int32_t trackType) { switch (trackType) { diff --git a/src/openrct2/ride/shops/Shop.cpp b/src/openrct2/ride/shops/Shop.cpp index 8ef68de9dc..1d5d9b44bf 100644 --- a/src/openrct2/ride/shops/Shop.cpp +++ b/src/openrct2/ride/shops/Shop.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ static void PaintShop( return; CoordsXYZ offset(0, 0, height); - BoundBoxXYZ bb = { { 2, 2, height }, { 28, 28, 45 } }; + BoundBoxXYZ bb = { { 2, 2, height }, { 28, 28, trackElement.GetClearanceZ() - trackElement.GetBaseZ() - 3 } }; auto imageFlags = session.TrackColours[SCHEME_TRACK].WithoutSecondary(); auto imageIndex = firstCarEntry->base_image_id + direction; @@ -57,7 +57,7 @@ static void PaintShop( PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); } -TRACK_PAINT_FUNCTION get_track_paint_function_shop(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionShop(int32_t trackType) { switch (trackType) { diff --git a/src/openrct2/ride/shops/meta/CashMachine.h b/src/openrct2/ride/shops/meta/CashMachine.h index 1103b087e8..8af5f9a1bc 100644 --- a/src/openrct2/ride/shops/meta/CashMachine.h +++ b/src/openrct2/ride/shops/meta/CashMachine.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor CashMachineRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_shop), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionShop), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_IS_CASH_MACHINE | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY), SET_FIELD(RideModes, EnumsToFlags(RideMode::ShopStall)), @@ -32,10 +32,10 @@ constexpr const RideTypeDescriptor CashMachineRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_CASH_MACHINE)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 64, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultCashMachineHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_cash_machine), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateCashMachine), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 40, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 200.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/meta/DrinkStall.h b/src/openrct2/ride/shops/meta/DrinkStall.h index 85f5cab9d7..eeb7ff390d 100644 --- a/src/openrct2/ride/shops/meta/DrinkStall.h +++ b/src/openrct2/ride/shops/meta/DrinkStall.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor DrinkStallRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_shop), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionShop), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_SELLS_DRINKS | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN), @@ -33,10 +33,10 @@ constexpr const RideTypeDescriptor DrinkStallRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_DRINK_STALL)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 64, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultDrinksStallHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_drink_stall), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateDrinkStall), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 250.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/meta/FirstAid.h b/src/openrct2/ride/shops/meta/FirstAid.h index e7eee60619..28fed93893 100644 --- a/src/openrct2/ride/shops/meta/FirstAid.h +++ b/src/openrct2/ride/shops/meta/FirstAid.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor FirstAidRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_facility), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionFacility), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IS_FIRST_AID | RIDE_TYPE_FLAG_PEEP_SHOULD_GO_INSIDE_FACILITY | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY), @@ -33,10 +33,10 @@ constexpr const RideTypeDescriptor FirstAidRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_FIRST_AID)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 48, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultFirstAidHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_first_aid), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateFirstAid), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 45, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 250.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/meta/FoodStall.h b/src/openrct2/ride/shops/meta/FoodStall.h index d5f54609ba..87a2dc0a7d 100644 --- a/src/openrct2/ride/shops/meta/FoodStall.h +++ b/src/openrct2/ride/shops/meta/FoodStall.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor FoodStallRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_shop), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionShop), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_SELLS_FOOD | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN), @@ -33,10 +33,10 @@ constexpr const RideTypeDescriptor FoodStallRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_FOOD_STALL)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 64, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultFoodStallHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_food_stall), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateFoodStall), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 300.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/meta/InformationKiosk.h b/src/openrct2/ride/shops/meta/InformationKiosk.h index e55f4a895e..e896b35d3f 100644 --- a/src/openrct2/ride/shops/meta/InformationKiosk.h +++ b/src/openrct2/ride/shops/meta/InformationKiosk.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor InformationKioskRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1B), - SET_FIELD(TrackPaintFunction, get_track_paint_function_shop), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionShop), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY), @@ -33,10 +33,10 @@ constexpr const RideTypeDescriptor InformationKioskRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_INFORMATION_KIOSK)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 48, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultInformationKioskHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_information_kiosk), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateInformationKiosk), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 250.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/meta/Shop.h b/src/openrct2/ride/shops/meta/Shop.h index 87c3401bb2..bf53ebdfa4 100644 --- a/src/openrct2/ride/shops/meta/Shop.h +++ b/src/openrct2/ride/shops/meta/Shop.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor ShopRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_shop), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionShop), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY), @@ -33,10 +33,10 @@ constexpr const RideTypeDescriptor ShopRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_SHOP)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 64, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultShopHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_shop), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateShop), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 200.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/shops/meta/Toilets.h b/src/openrct2/ride/shops/meta/Toilets.h index c31c826cd9..f97f3a86cb 100644 --- a/src/openrct2/ride/shops/meta/Toilets.h +++ b/src/openrct2/ride/shops/meta/Toilets.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor ToiletsRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x1A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_facility), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionFacility), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_PEEP_SHOULD_GO_INSIDE_FACILITY | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_IS_TOILET | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY), @@ -33,10 +33,10 @@ constexpr const RideTypeDescriptor ToiletsRTD = SET_FIELD(NameConvention, { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }), SET_FIELD(EnumName, nameof(RIDE_TYPE_TOILETS)), SET_FIELD(AvailableBreakdowns, 0), - SET_FIELD(Heights, { 12, 32, 0, 0, }), + SET_FIELD(Heights, { 12, DefaultToiletHeight, 0, 0, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_toilets), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateToilets), SET_FIELD(RatingsMultipliers, { 0, 0, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 225.00_GBP, 0.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/3dCinema.cpp b/src/openrct2/ride/thrill/3dCinema.cpp index 6d0bd895ed..1d6a2ac7fa 100644 --- a/src/openrct2/ride/thrill/3dCinema.cpp +++ b/src/openrct2/ride/thrill/3dCinema.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -32,7 +32,7 @@ static void Paint3dCinemaDome( auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -60,9 +60,9 @@ static void Paint3dCinema( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope, session.CurrentRotation); @@ -114,7 +114,7 @@ static void Paint3dCinema( PaintUtilSetGeneralSupportHeight(session, height + 128, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunction3dCinema(int32_t trackType) { if (trackType != TrackElemType::FlatTrack3x3) { diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index ee1f37454f..962cd18049 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,7 +20,7 @@ #include "../Vehicle.h" static void PaintEnterpriseRiders( - PaintSession& session, const rct_ride_entry& rideEntry, Vehicle& vehicle, uint32_t imageOffset, const CoordsXYZ& offset, + PaintSession& session, const RideObjectEntry& rideEntry, Vehicle& vehicle, uint32_t imageOffset, const CoordsXYZ& offset, const BoundBoxXYZ& bb) { if (session.DPI.zoom_level > ZoomLevel{ 0 }) @@ -35,7 +35,7 @@ static void PaintEnterpriseRiders( break; auto frameOffset1 = ((imageOffset % 4) * 4 + (i * 4) % 15) & 0x0F; - auto frameOffset2 = floor2(imageOffset, 4) * 4; + auto frameOffset2 = Floor2(imageOffset, 4) * 4; auto imageTemplate = ImageId(0, vehicle.peep_tshirt_colours[i]); auto imageId = imageTemplate.WithIndex(baseImageIndex + 196 + frameOffset1 + frameOffset2); PaintAddImageAsChild(session, imageId, offset, bb); @@ -45,7 +45,7 @@ static void PaintEnterpriseRiders( static void PaintEnterpriseStructure( PaintSession& session, const Ride& ride, int8_t xOffset, int8_t yOffset, uint16_t height, const TrackElement& trackElement) { - const auto* rideEntry = get_ride_entry(ride.subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry == nullptr) return; @@ -71,7 +71,7 @@ static void PaintEnterpriseStructure( auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -98,9 +98,9 @@ static void PaintEnterprise( WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_MISC]); const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesRope, session.CurrentRotation); @@ -167,7 +167,7 @@ static void PaintEnterprise( PaintUtilSetGeneralSupportHeight(session, height + 160, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionEnterprise(int32_t trackType) { if (trackType != TrackElemType::FlatTrack4x4) { diff --git a/src/openrct2/ride/thrill/GoKarts.cpp b/src/openrct2/ride/thrill/GoKarts.cpp index 02d5ae5f7d..2b17b0d8dc 100644 --- a/src/openrct2/ride/thrill/GoKarts.cpp +++ b/src/openrct2/ride/thrill/GoKarts.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -125,7 +125,7 @@ static constexpr const uint32_t go_karts_track_pieces_25_deg_up_to_flat[4][2] = }; /** rct2: 0x0074A748 */ -static void paint_go_karts_track_flat( +static void PaintGoKartsTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -158,7 +158,7 @@ static void paint_go_karts_track_flat( } /** rct2: 0x0074A758 */ -static void paint_go_karts_track_25_deg_up( +static void PaintGoKartsTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -212,7 +212,7 @@ static void paint_go_karts_track_25_deg_up( } /** rct2: 0x0074A768 */ -static void paint_go_karts_track_flat_to_25_deg_up( +static void PaintGoKartsTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -266,7 +266,7 @@ static void paint_go_karts_track_flat_to_25_deg_up( } /** rct2: 0x */ -static void paint_go_karts_track_25_deg_up_to_flat( +static void PaintGoKartsTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -320,31 +320,31 @@ static void paint_go_karts_track_25_deg_up_to_flat( } /** rct2: 0x0074A788 */ -static void paint_go_karts_track_25_deg_down( +static void PaintGoKartsTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_go_karts_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintGoKartsTrack25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x0074A798 */ -static void paint_go_karts_track_flat_to_25_deg_down( +static void PaintGoKartsTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_go_karts_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintGoKartsTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x0074A7A8 */ -static void paint_go_karts_track_25_deg_down_to_flat( +static void PaintGoKartsTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_go_karts_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintGoKartsTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x */ -static void paint_go_karts_station( +static void PaintGoKartsStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -371,13 +371,13 @@ static void paint_go_karts_station( if (direction == 0 || direction == 2) { - hasFence = track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height); } else { - hasFence = track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height); } imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); @@ -396,13 +396,13 @@ static void paint_go_karts_station( if (direction == 0 || direction == 2) { - hasFence = track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height); } else { - hasFence = track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); - track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); + hasFence = TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height); } if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -453,7 +453,7 @@ static void paint_go_karts_station( } /** rct2: 0x0074A7E8 */ -static void paint_go_karts_track_left_quarter_turn_1_tile( +static void PaintGoKartsTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -523,46 +523,46 @@ static void paint_go_karts_track_left_quarter_turn_1_tile( } /** rct2: 0x0074A7F8 */ -static void paint_go_karts_track_right_quarter_turn_1_tile( +static void PaintGoKartsTrackRightQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_go_karts_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + PaintGoKartsTrackLeftQuarterTurn1Tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } /** * rct2: 0x0074A668 */ -TRACK_PAINT_FUNCTION get_track_paint_function_go_karts(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionGoKarts(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_go_karts_track_flat; + return PaintGoKartsTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_go_karts_station; + return PaintGoKartsStation; case TrackElemType::Up25: - return paint_go_karts_track_25_deg_up; + return PaintGoKartsTrack25DegUp; case TrackElemType::FlatToUp25: - return paint_go_karts_track_flat_to_25_deg_up; + return PaintGoKartsTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_go_karts_track_25_deg_up_to_flat; + return PaintGoKartsTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_go_karts_track_25_deg_down; + return PaintGoKartsTrack25DegDown; case TrackElemType::FlatToDown25: - return paint_go_karts_track_flat_to_25_deg_down; + return PaintGoKartsTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_go_karts_track_25_deg_down_to_flat; + return PaintGoKartsTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn1Tile: - return paint_go_karts_track_left_quarter_turn_1_tile; + return PaintGoKartsTrackLeftQuarterTurn1Tile; case TrackElemType::RightQuarterTurn1Tile: - return paint_go_karts_track_right_quarter_turn_1_tile; + return PaintGoKartsTrackRightQuarterTurn1Tile; } return nullptr; diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index 8607653278..1e605c4e02 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -29,7 +29,7 @@ enum * * rct2: 0x006D5FAB */ -void vehicle_visual_launched_freefall( +void VehicleVisualLaunchedFreefall( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { @@ -87,7 +87,7 @@ void vehicle_visual_launched_freefall( } /** rct2: 0x006FD1F8 */ -static void paint_launched_freefall_base( +static void PaintLaunchedFreefallBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -99,10 +99,9 @@ static void paint_launched_freefall_base( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor( - session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetal, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetal, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesMetal, session.CurrentRotation); @@ -161,7 +160,7 @@ static void paint_launched_freefall_base( } /** rct2: 0x006FD208 */ -static void paint_launched_freefall_tower_section( +static void PaintLaunchedFreefallTowerSection( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -189,15 +188,15 @@ static void paint_launched_freefall_tower_section( /** * rct2: 0x006FD0E8 */ -TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLaunchedFreefall(int32_t trackType) { switch (trackType) { case TrackElemType::TowerBase: - return paint_launched_freefall_base; + return PaintLaunchedFreefallBase; case TrackElemType::TowerSection: - return paint_launched_freefall_tower_section; + return PaintLaunchedFreefallTowerSection; } return nullptr; diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 4ab68d4930..f2b10255c1 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -97,7 +97,7 @@ static Vehicle* GetFirstVehicle(const Ride& ride) } static void PaintMagicCarpetRiders( - PaintSession& session, const rct_ride_entry& rideEntry, const Vehicle& vehicle, Direction direction, + PaintSession& session, const RideObjectEntry& rideEntry, const Vehicle& vehicle, Direction direction, const CoordsXYZ& offset, const BoundBoxXYZ& bb) { if (session.DPI.zoom_level > ZoomLevel{ 1 }) @@ -166,7 +166,7 @@ static void PaintMagicCarpetVehicle( // Vehicle auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -260,7 +260,7 @@ static void PaintMagicCarpet( PaintUtilSetGeneralSupportHeight(session, height + 176, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMagicCarpet(int32_t trackType) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index e65b3b24f9..f0f32248ad 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -66,7 +66,7 @@ static void PaintMotionSimulatorVehicle( auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -78,21 +78,21 @@ static void PaintMotionSimulatorVehicle( case 0: PaintAddImageAsParent(session, simulatorImageId, offset, { offset, { 20, 20, 44 } }); PaintAddImageAsChild(session, stairsImageId, offset, { offset, { 20, 20, 44 } }); - PaintAddImageAsParent(session, stairsRailImageId, offset, { 20, 2, 44 }, { offset.x, offset.y + 32, offset.z }); + PaintAddImageAsParent(session, stairsRailImageId, offset, { { offset.x, offset.y + 32, offset.z }, { 20, 2, 44 } }); break; case 1: PaintAddImageAsParent(session, simulatorImageId, offset, { offset, { 20, 20, 44 } }); PaintAddImageAsChild(session, stairsImageId, offset, { offset, { 20, 20, 44 } }); - PaintAddImageAsParent(session, stairsRailImageId, offset, { 2, 20, 44 }, { offset.x + 34, offset.y, offset.z }); + PaintAddImageAsParent(session, stairsRailImageId, offset, { { offset.x + 34, offset.y, offset.z }, { 2, 20, 44 } }); break; case 2: - PaintAddImageAsParent(session, stairsRailImageId, offset, { 20, 2, 44 }, { offset.x, offset.y - 10, offset.z }); - PaintAddImageAsParent(session, stairsImageId, offset, { 20, 20, 44 }, { offset.x, offset.y + 5, offset.z }); + PaintAddImageAsParent(session, stairsRailImageId, offset, { { offset.x, offset.y - 10, offset.z }, { 20, 2, 44 } }); + PaintAddImageAsParent(session, stairsImageId, offset, { { offset.x, offset.y + 5, offset.z }, { 20, 20, 44 } }); PaintAddImageAsChild(session, simulatorImageId, offset, { { offset.x, offset.y + 5, offset.z }, { 20, 20, 44 } }); break; case 3: - PaintAddImageAsParent(session, stairsRailImageId, offset, { 2, 20, 44 }, { offset.x - 10, offset.y, offset.z }); - PaintAddImageAsParent(session, stairsImageId, offset, { 20, 20, 44 }, { offset.x + 5, offset.y, offset.z }); + PaintAddImageAsParent(session, stairsRailImageId, offset, { { offset.x - 10, offset.y, offset.z }, { 2, 20, 44 } }); + PaintAddImageAsParent(session, stairsImageId, offset, { { offset.x + 5, offset.y, offset.z }, { 20, 20, 44 } }); PaintAddImageAsChild(session, simulatorImageId, offset, { { offset.x + 5, offset.y, offset.z }, { 20, 20, 44 } }); break; } @@ -113,9 +113,9 @@ static void PaintMotionSimulator( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_SUPPORTS], height, fenceSpritesRope, session.CurrentRotation); @@ -140,7 +140,7 @@ static void PaintMotionSimulator( * * rct2: 0x00763520 */ -TRACK_PAINT_FUNCTION get_track_paint_function_motionsimulator(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMotionsimulator(int32_t trackType) { switch (trackType) { diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index f08e662b79..21a554ab72 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ enum * * rct2: 0x006D5DA9 */ -void vehicle_visual_roto_drop( +void VehicleVisualRotoDrop( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { @@ -55,11 +55,11 @@ void vehicle_visual_roto_drop( // Draw back: image_id = imageFlags.WithIndex(baseImage_id); - PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 2, 2, 41 }, { -11, -11, z + 1 }); + PaintAddImageAsParent(session, image_id, { 0, 0, z }, { { -11, -11, z + 1 }, { 2, 2, 41 } }); // Draw front: image_id = imageFlags.WithIndex(baseImage_id + 4); - PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsParent(session, image_id, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); if (vehicle->num_peeps > 0 && !vehicle->IsGhost()) { @@ -99,7 +99,7 @@ void vehicle_visual_roto_drop( } /** rct2: 0x00886194 */ -static void paint_roto_drop_base( +static void PaintRotoDropBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -111,10 +111,9 @@ static void paint_roto_drop_base( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor( - session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_SUPPORTS], height, floorSpritesMetalB, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesMetalB, session.CurrentRotation); @@ -122,15 +121,15 @@ static void paint_roto_drop_base( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_90_DEG : SPR_ROTO_DROP_TOWER_BASE)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 8, 8, height + 3 }, { 2, 2, 27 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_SEGMENT_90_DEG : SPR_ROTO_DROP_TOWER_BASE_SEGMENT)); - PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { 2, 2, 30 }, { 8, 8, height + 32 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { { 8, 8, height + 32 }, { 2, 2, 30 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_SEGMENT_90_DEG : SPR_ROTO_DROP_TOWER_BASE_SEGMENT)); - PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { 2, 2, 30 }, { 8, 8, height + 64 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { { 8, 8, height + 64 }, { 2, 2, 30 } }); PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -174,7 +173,7 @@ static void paint_roto_drop_base( } /** rct2: 0x008861A4 */ -static void paint_roto_drop_tower_section( +static void PaintRotoDropTowerSection( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -184,7 +183,7 @@ static void paint_roto_drop_tower_section( } auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_ROTO_DROP_TOWER_SEGMENT); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 8, 8, height }, { 2, 2, 30 } }); const TileElement* nextTileElement = reinterpret_cast(&trackElement) + 1; if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ()) @@ -202,15 +201,15 @@ static void paint_roto_drop_tower_section( /** * rct2: 0x00886074 */ -TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionRotoDrop(int32_t trackType) { switch (trackType) { case TrackElemType::TowerBase: - return paint_roto_drop_base; + return PaintRotoDropBase; case TrackElemType::TowerSection: - return paint_roto_drop_tower_section; + return PaintRotoDropTowerSection; } return nullptr; diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 6abe1ecaaa..0fdf280f5a 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -61,7 +61,7 @@ static constexpr const uint32_t SwingingInverterShipFrameSprites[] = { static void PaintSwingingInverterShipStructure( PaintSession& session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height) { - rct_ride_entry* rideEntry = get_ride_entry(ride.subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry == nullptr) return; @@ -101,7 +101,7 @@ static void PaintSwingingInverterShipStructure( auto vehicleImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { vehicleImageTemplate = imageFlags; } @@ -193,7 +193,7 @@ static void PaintSwingingInverterShip( PaintUtilSetGeneralSupportHeight(session, height + 176, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_swinging_inverter_ship(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSwingingInverterShip(int32_t trackType) { if (trackType != TrackElemType::FlatTrack1x4B) { diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index 63f76e174e..50e3fb4eeb 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -86,7 +86,7 @@ static void PaintSwingingShipRiders( static void PaintSwingingShipStructure( PaintSession& session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height) { - rct_ride_entry* rideEntry = get_ride_entry(ride.subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry == nullptr) return; @@ -124,7 +124,7 @@ static void PaintSwingingShipStructure( auto supportsImageTemplate = session.TrackColours[SCHEME_TRACK]; auto vehicleImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); auto imageFlags = session.TrackColours[SCHEME_MISC]; - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { vehicleImageTemplate = imageFlags; } @@ -196,8 +196,7 @@ static void PaintSwingingShip( { if (relativeTrackSequence != 1 && relativeTrackSequence != 4) { - hasFence = track_paint_util_has_fence( - EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); if (relativeTrackSequence == 2) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( @@ -214,8 +213,7 @@ static void PaintSwingingShip( (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE)); PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 }); - hasFence = track_paint_util_has_fence( - EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); if (relativeTrackSequence == 3) { if (hasFence) @@ -243,8 +241,7 @@ static void PaintSwingingShip( { if (relativeTrackSequence != 1 && relativeTrackSequence != 4) { - hasFence = track_paint_util_has_fence( - EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); if (relativeTrackSequence == 2) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( @@ -261,8 +258,7 @@ static void PaintSwingingShip( (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE)); PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 }); - hasFence = track_paint_util_has_fence( - EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); if (relativeTrackSequence == 3) { if (hasFence) @@ -309,7 +305,7 @@ static void PaintSwingingShip( PaintUtilSetGeneralSupportHeight(session, height + 112, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_swinging_ship(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSwingingShip(int32_t trackType) { if (trackType != TrackElemType::FlatTrack1x5) { diff --git a/src/openrct2/ride/thrill/TopSpin.cpp b/src/openrct2/ride/thrill/TopSpin.cpp index f6f123ff42..63f7c99774 100644 --- a/src/openrct2/ride/thrill/TopSpin.cpp +++ b/src/openrct2/ride/thrill/TopSpin.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -59,7 +59,7 @@ static void PaintTopSpinRiders( } static void PaintTopSpinSeat( - PaintSession& session, const Ride& ride, const rct_ride_entry& rideEntry, const Vehicle* vehicle, Direction direction, + PaintSession& session, const Ride& ride, const RideObjectEntry& rideEntry, const Vehicle* vehicle, Direction direction, uint32_t armRotation, uint32_t seatRotation, const CoordsXYZ& offset, const BoundBoxXYZ& bb) { if (armRotation >= std::size(TopSpinSeatHeightOffset)) @@ -103,7 +103,7 @@ static void PaintTopSpinSeat( auto imageFlags = session.TrackColours[SCHEME_MISC]; auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -119,7 +119,7 @@ static void PaintTopSpinVehicle( PaintSession& session, int32_t al, int32_t cl, const Ride& ride, uint8_t direction, int32_t height, const TrackElement& tileElement) { - const auto* rideEntry = get_ride_entry(ride.subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); if (rideEntry == nullptr) return; @@ -152,7 +152,7 @@ static void PaintTopSpinVehicle( auto imageFlags = session.TrackColours[SCHEME_MISC]; auto supportImageTemplate = ImageId(0, ride.track_colour[0].main, ride.track_colour[0].supports); auto armImageTemplate = ImageId(0, ride.track_colour[0].main, ride.track_colour[0].additional); - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { supportImageTemplate = imageFlags; armImageTemplate = supportImageTemplate; @@ -193,9 +193,9 @@ static void PaintTopSpin( const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_TRACK], height, floorSpritesCork, stationObject); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope, session.CurrentRotation); @@ -247,7 +247,7 @@ static void PaintTopSpin( PaintUtilSetGeneralSupportHeight(session, height + 112, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_topspin(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionTopspin(int32_t trackType) { if (trackType != TrackElemType::FlatTrack3x3) { diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index e20d1c1677..68d6a3a368 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,10 +20,10 @@ #include "../Vehicle.h" /** rct2: 0x0076E5C9 */ -static void paint_twist_structure( +static void PaintTwistStructure( PaintSession& session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint16_t height) { - rct_ride_entry* rideEntry = get_ride_entry(ride.subtype); + const auto* rideEntry = GetRideEntryByIndex(ride.subtype); Vehicle* vehicle = nullptr; if (rideEntry == nullptr) @@ -51,7 +51,7 @@ static void paint_twist_structure( auto imageFlags = session.TrackColours[SCHEME_MISC]; auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); - if (imageFlags.ToUInt32() != IMAGE_TYPE_REMAP) + if (imageFlags != TrackGhost) { imageTemplate = imageFlags; } @@ -81,7 +81,7 @@ static void paint_twist_structure( } /** rct2: 0x0076D858 */ -static void paint_twist( +static void PaintTwist( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -94,24 +94,24 @@ static void paint_twist( WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_MISC]); const StationObject* stationObject = ride.GetStationObject(); - track_paint_util_paint_floor(session, edges, session.TrackColours[SCHEME_MISC], height, floorSpritesCork, stationObject); + TrackPaintUtilPaintFloor(session, edges, session.TrackColours[SCHEME_MISC], height, floorSpritesCork, stationObject); switch (trackSequence) { case 7: - if (track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation)) + if (TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation)) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_FENCE_ROPE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 29, 0, height + 3 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 29, 0, height + 3 }, { 1, 28, 7 } }); } - if (track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation)) + if (TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation)) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_FENCE_ROPE_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 3 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 29, height + 3 }, { 28, 1, 7 } }); } break; default: - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_MISC], height, fenceSpritesRope, session.CurrentRotation); break; @@ -120,22 +120,22 @@ static void paint_twist( switch (trackSequence) { case 1: - paint_twist_structure(session, ride, direction, 32, 32, height); + PaintTwistStructure(session, ride, direction, 32, 32, height); break; case 3: - paint_twist_structure(session, ride, direction, 32, -32, height); + PaintTwistStructure(session, ride, direction, 32, -32, height); break; case 5: - paint_twist_structure(session, ride, direction, 0, -32, height); + PaintTwistStructure(session, ride, direction, 0, -32, height); break; case 6: - paint_twist_structure(session, ride, direction, -32, 32, height); + PaintTwistStructure(session, ride, direction, -32, 32, height); break; case 7: - paint_twist_structure(session, ride, direction, -32, -32, height); + PaintTwistStructure(session, ride, direction, -32, -32, height); break; case 8: - paint_twist_structure(session, ride, direction, -32, 0, height); + PaintTwistStructure(session, ride, direction, -32, 0, height); break; } @@ -164,12 +164,12 @@ static void paint_twist( /** * rct2: 0x0076D658 */ -TRACK_PAINT_FUNCTION get_track_paint_function_twist(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionTwist(int32_t trackType) { if (trackType != TrackElemType::FlatTrack3x3) { return nullptr; } - return paint_twist; + return PaintTwist; } diff --git a/src/openrct2/ride/thrill/meta/3DCinema.h b/src/openrct2/ride/thrill/meta/3DCinema.h index 46964c244e..b664a854f3 100644 --- a/src/openrct2/ride/thrill/meta/3DCinema.h +++ b/src/openrct2/ride/thrill/meta/3DCinema.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor CinemaRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack3x3), - SET_FIELD(TrackPaintFunction, get_track_paint_function_3d_cinema), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunction3dCinema), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor CinemaRTD = SET_FIELD(Heights, { 12, 128, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_3d_cinema), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculate3dCinema), SET_FIELD(RatingsMultipliers, { 20, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 70.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/Enterprise.h b/src/openrct2/ride/thrill/meta/Enterprise.h index cba0901c7f..5e1569e851 100644 --- a/src/openrct2/ride/thrill/meta/Enterprise.h +++ b/src/openrct2/ride/thrill/meta/Enterprise.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor EnterpriseRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack4x4), - SET_FIELD(TrackPaintFunction, get_track_paint_function_enterprise), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionEnterprise), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor EnterpriseRTD = SET_FIELD(Heights, { 16, 160, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_enterprise), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateEnterprise), SET_FIELD(RatingsMultipliers, { 50, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 50.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/GoKarts.h b/src/openrct2/ride/thrill/meta/GoKarts.h index 589d5e3a76..85a393ca1f 100644 --- a/src/openrct2/ride/thrill/meta/GoKarts.h +++ b/src/openrct2/ride/thrill/meta/GoKarts.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor GoKartsRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_go_karts), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionGoKarts), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_HAS_ONE_STATION | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | 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), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor GoKartsRTD = SET_FIELD(Heights, { 7, 24, 2, 1, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_go_karts), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateGoKarts), SET_FIELD(RatingsMultipliers, { 120, 20, 0 }), SET_FIELD(UpkeepCosts, { 50, 20, 0, 8, 0, 0 }), SET_FIELD(BuildCosts, { 31.00_GBP, 2.00_GBP, 20, }), diff --git a/src/openrct2/ride/thrill/meta/LaunchedFreefall.h b/src/openrct2/ride/thrill/meta/LaunchedFreefall.h index 388ce94ac5..7e63f0a5d4 100644 --- a/src/openrct2/ride/thrill/meta/LaunchedFreefall.h +++ b/src/openrct2/ride/thrill/meta/LaunchedFreefall.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor LaunchedFreefallRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::TowerBase), - SET_FIELD(TrackPaintFunction, get_track_paint_function_launched_freefall), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionLaunchedFreefall), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor LaunchedFreefallRTD = SET_FIELD(Heights, { 255, 32, 3, 2, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_launched_freefall), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLaunchedFreefall), SET_FIELD(RatingsMultipliers, { 50, 50, 10 }), SET_FIELD(UpkeepCosts, { 50, 20, 0, 10, 0, 0 }), SET_FIELD(BuildCosts, { 25.00_GBP, 0.00_GBP, 4, }), diff --git a/src/openrct2/ride/thrill/meta/MagicCarpet.h b/src/openrct2/ride/thrill/meta/MagicCarpet.h index 45f08ab499..2720774b7c 100644 --- a/src/openrct2/ride/thrill/meta/MagicCarpet.h +++ b/src/openrct2/ride/thrill/meta/MagicCarpet.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor MagicCarpetRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x4A), - SET_FIELD(TrackPaintFunction, get_track_paint_function_magic_carpet), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMagicCarpet), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor MagicCarpetRTD = SET_FIELD(Heights, { 15, 176, 7, 11, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_magic_carpet), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMagicCarpet), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 99.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/MotionSimulator.h b/src/openrct2/ride/thrill/meta/MotionSimulator.h index 91964cbe1d..aaec998408 100644 --- a/src/openrct2/ride/thrill/meta/MotionSimulator.h +++ b/src/openrct2/ride/thrill/meta/MotionSimulator.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor MotionSimulatorRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack2x2), - SET_FIELD(TrackPaintFunction, get_track_paint_function_motionsimulator), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMotionsimulator), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor MotionSimulatorRTD = SET_FIELD(Heights, { 12, 64, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_motion_simulator), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMotionSimulator), SET_FIELD(RatingsMultipliers, { 24, 20, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 110.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/RotoDrop.h b/src/openrct2/ride/thrill/meta/RotoDrop.h index 40e3f7035f..c1fc18255d 100644 --- a/src/openrct2/ride/thrill/meta/RotoDrop.h +++ b/src/openrct2/ride/thrill/meta/RotoDrop.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor RotoDropRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::TowerBase), - SET_FIELD(TrackPaintFunction, get_track_paint_function_roto_drop), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionRotoDrop), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor RotoDropRTD = SET_FIELD(Heights, { 255, 32, 3, 2, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_roto_drop), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateRotoDrop), SET_FIELD(RatingsMultipliers, { 50, 50, 10 }), SET_FIELD(UpkeepCosts, { 50, 20, 0, 10, 0, 0 }), SET_FIELD(BuildCosts, { 22.50_GBP, 0.00_GBP, 4, }), diff --git a/src/openrct2/ride/thrill/meta/SwingingInverterShip.h b/src/openrct2/ride/thrill/meta/SwingingInverterShip.h index afa5337fa6..cd55609c1c 100644 --- a/src/openrct2/ride/thrill/meta/SwingingInverterShip.h +++ b/src/openrct2/ride/thrill/meta/SwingingInverterShip.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SwingingInverterShipRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x4B), - SET_FIELD(TrackPaintFunction, get_track_paint_function_swinging_inverter_ship), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSwingingInverterShip), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor SwingingInverterShipRTD = SET_FIELD(Heights, { 15, 176, 7, 11, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_inverter_ship), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateInverterShip), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 106.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/SwingingShip.h b/src/openrct2/ride/thrill/meta/SwingingShip.h index e1a19c81f7..55fc165d68 100644 --- a/src/openrct2/ride/thrill/meta/SwingingShip.h +++ b/src/openrct2/ride/thrill/meta/SwingingShip.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SwingingShipRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack1x5), - SET_FIELD(TrackPaintFunction, get_track_paint_function_swinging_ship), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSwingingShip), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | @@ -39,7 +39,7 @@ constexpr const RideTypeDescriptor SwingingShipRTD = SET_FIELD(Heights, { 12, 112, 7, 11, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_swinging_ship), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSwingingShip), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 77.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/TopSpin.h b/src/openrct2/ride/thrill/meta/TopSpin.h index ffec06fc89..7fe761b868 100644 --- a/src/openrct2/ride/thrill/meta/TopSpin.h +++ b/src/openrct2/ride/thrill/meta/TopSpin.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor TopSpinRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack3x3), - SET_FIELD(TrackPaintFunction, get_track_paint_function_topspin), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionTopspin), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor TopSpinRTD = SET_FIELD(Heights, { 16, 112, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_top_spin), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateTopSpin), SET_FIELD(RatingsMultipliers, { 24, 20, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 72.50_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/thrill/meta/Twist.h b/src/openrct2/ride/thrill/meta/Twist.h index 4920870625..854d00f2a3 100644 --- a/src/openrct2/ride/thrill/meta/Twist.h +++ b/src/openrct2/ride/thrill/meta/Twist.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,7 +22,7 @@ constexpr const RideTypeDescriptor TwistRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::FlatTrack3x3), - SET_FIELD(TrackPaintFunction, get_track_paint_function_twist), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionTwist), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_NO_TRACK | RIDE_TYPE_FLAG_VEHICLE_IS_INTEGRAL | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_FLAT_RIDE | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | @@ -37,7 +37,7 @@ constexpr const RideTypeDescriptor TwistRTD = SET_FIELD(Heights, { 12, 64, 3, 2, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_twist), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateTwist), SET_FIELD(RatingsMultipliers, { 40, 20, 10 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 0, 0, 0 }), SET_FIELD(BuildCosts, { 45.00_GBP, 1.00_GBP, 1, }), diff --git a/src/openrct2/ride/transport/Chairlift.cpp b/src/openrct2/ride/transport/Chairlift.cpp index a81fc88e86..5ecba6beca 100644 --- a/src/openrct2/ride/transport/Chairlift.cpp +++ b/src/openrct2/ride/transport/Chairlift.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -77,7 +77,7 @@ const uint32_t chairlift_bullwheel_frames[] = { SPR_CHAIRLIFT_BULLWHEEL_FRAME_4, }; -static void chairlift_paint_util_draw_supports(PaintSession& session, int32_t segments, uint16_t height) +static void ChairliftPaintUtilDrawSupports(PaintSession& session, int32_t segments, uint16_t height) { bool success = false; @@ -113,7 +113,7 @@ static void chairlift_paint_util_draw_supports(PaintSession& session, int32_t se } } -static const TrackElement* chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy( +static const TrackElement* ChairliftPaintUtilMapGetTrackElementAtFromRideFuzzy( int32_t x, int32_t y, int32_t z, const Ride& ride) { const TileElement* tileElement = MapGetFirstElementAt(CoordsXY{ x, y }); @@ -128,7 +128,7 @@ static const TrackElement* chairlift_paint_util_map_get_track_element_at_from_ri continue; if (tileElement->GetRideIndex() != ride.id) continue; - if (tileElement->base_height != z && tileElement->base_height != z - 1) + if (tileElement->BaseHeight != z && tileElement->BaseHeight != z - 1) continue; return tileElement->AsTrack(); @@ -137,7 +137,7 @@ static const TrackElement* chairlift_paint_util_map_get_track_element_at_from_ri return nullptr; }; -static bool chairlift_paint_util_is_first_track( +static bool ChairliftPaintUtilIsFirstTrack( const Ride& ride, const TrackElement& trackElement, const CoordsXY& pos, track_type_t trackType) { if (trackElement.GetTrackType() != TrackElemType::BeginStation) @@ -151,13 +151,13 @@ static bool chairlift_paint_util_is_first_track( static_cast(pos.y - delta.y), }; - const TrackElement* nextTrack = chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy( - newPos.x, newPos.y, trackElement.base_height, ride); + const TrackElement* nextTrack = ChairliftPaintUtilMapGetTrackElementAtFromRideFuzzy( + newPos.x, newPos.y, trackElement.BaseHeight, ride); return nextTrack == nullptr; } -static bool chairlift_paint_util_is_last_track( +static bool ChairliftPaintUtilIsLastTrack( const Ride& ride, const TrackElement& trackElement, const CoordsXY& pos, track_type_t trackType) { if (trackElement.GetTrackType() != TrackElemType::EndStation) @@ -171,13 +171,13 @@ static bool chairlift_paint_util_is_last_track( static_cast(pos.y + delta.y), }; - const TrackElement* nextTrack = chairlift_paint_util_map_get_track_element_at_from_ride_fuzzy( - newPos.x, newPos.y, trackElement.base_height, ride); + const TrackElement* nextTrack = ChairliftPaintUtilMapGetTrackElementAtFromRideFuzzy( + newPos.x, newPos.y, trackElement.BaseHeight, ride); return nextTrack == nullptr; } -static void chairlift_paint_station_ne_sw( +static void ChairliftPaintStationNeSw( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -185,8 +185,8 @@ static void chairlift_paint_station_ne_sw( auto trackType = trackElement.GetTrackType(); ImageId imageId; - bool isStart = chairlift_paint_util_is_first_track(ride, trackElement, pos, trackType); - bool isEnd = chairlift_paint_util_is_last_track(ride, trackElement, pos, trackType); + bool isStart = ChairliftPaintUtilIsFirstTrack(ride, trackElement, pos, trackType); + bool isEnd = ChairliftPaintUtilIsLastTrack(ride, trackElement, pos, trackType); const auto* stationObj = ride.GetStationObject(); @@ -201,13 +201,13 @@ static void chairlift_paint_station_ne_sw( imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_FLOOR_METAL); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); - bool hasFence = track_paint_util_has_fence(EDGE_NW, pos, trackElement, ride, session.CurrentRotation); + bool hasFence = TrackPaintUtilHasFence(EDGE_NW, pos, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_NW); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 2, height + 2 }, { 32, 1, 7 } }); } - track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height); if ((direction == 2 && isStart) || (direction == 0 && isEnd)) { @@ -215,13 +215,13 @@ static void chairlift_paint_station_ne_sw( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 2, height + 4 }, { 1, 28, 7 } }); } - hasFence = track_paint_util_has_fence(EDGE_SE, pos, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SE, pos, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 30, height + 2 }, { 32, 1, 27 } }); } - track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height); bool drawFrontColumn = true; bool drawBackColumn = true; @@ -269,7 +269,7 @@ static void chairlift_paint_station_ne_sw( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void chairlift_paint_station_se_nw( +static void ChairliftPaintStationSeNw( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -277,8 +277,8 @@ static void chairlift_paint_station_se_nw( auto trackType = trackElement.GetTrackType(); ImageId imageId; - bool isStart = chairlift_paint_util_is_first_track(ride, trackElement, pos, trackType); - bool isEnd = chairlift_paint_util_is_last_track(ride, trackElement, pos, trackType); + bool isStart = ChairliftPaintUtilIsFirstTrack(ride, trackElement, pos, trackType); + bool isEnd = ChairliftPaintUtilIsLastTrack(ride, trackElement, pos, trackType); const auto* stationObj = ride.GetStationObject(); @@ -293,13 +293,13 @@ static void chairlift_paint_station_se_nw( imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_FLOOR_METAL); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); - bool hasFence = track_paint_util_has_fence(EDGE_NE, pos, trackElement, ride, session.CurrentRotation); + bool hasFence = TrackPaintUtilHasFence(EDGE_NE, pos, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_NE); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 0, height + 2 }, { 1, 32, 7 } }); } - track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height); if ((direction == 1 && isStart) || (direction == 3 && isEnd)) { @@ -307,13 +307,13 @@ static void chairlift_paint_station_se_nw( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 2, height + 4 }, { 28, 1, 7 } }); } - hasFence = track_paint_util_has_fence(EDGE_SW, pos, trackElement, ride, session.CurrentRotation); + hasFence = TrackPaintUtilHasFence(EDGE_SW, pos, trackElement, ride, session.CurrentRotation); if (hasFence) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 0, height + 2 }, { 1, 32, 27 } }); } - track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height); bool drawRightColumn = true; bool drawLeftColumn = true; @@ -365,21 +365,21 @@ static void chairlift_paint_station_se_nw( } /** rct2: 0x00744068 */ -static void chairlift_paint_station( +static void ChairliftPaintStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { if (direction % 2) { - chairlift_paint_station_se_nw(session, ride, trackSequence, direction, height, trackElement); + ChairliftPaintStationSeNw(session, ride, trackSequence, direction, height, trackElement); } else { - chairlift_paint_station_ne_sw(session, ride, trackSequence, direction, height, trackElement); + ChairliftPaintStationNeSw(session, ride, trackSequence, direction, height, trackElement); } } -static void chairlift_paint_flat( +static void ChairliftPaintFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -402,7 +402,7 @@ static void chairlift_paint_flat( } /** rct2: 0x00743FD8 */ -static void chairlift_paint_25_deg_up( +static void ChairliftPaint25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -440,7 +440,7 @@ static void chairlift_paint_25_deg_up( } /** rct2: 0x00743FD8 */ -static void chairlift_paint_flat_to_25_deg_up( +static void ChairliftPaintFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -489,13 +489,13 @@ static void chairlift_paint_flat_to_25_deg_up( break; } - chairlift_paint_util_draw_supports(session, SEGMENT_C4, height); + ChairliftPaintUtilDrawSupports(session, SEGMENT_C4, height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x00743FF8 */ -static void chairlift_paint_25_deg_up_to_flat( +static void ChairliftPaint25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -544,37 +544,37 @@ static void chairlift_paint_25_deg_up_to_flat( break; } - chairlift_paint_util_draw_supports(session, SEGMENT_C4, height); + ChairliftPaintUtilDrawSupports(session, SEGMENT_C4, height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } /** rct2: 0x00744008 */ -static void chairlift_paint_25_deg_down( +static void ChairliftPaint25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - chairlift_paint_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + ChairliftPaint25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x00744018 */ -static void chairlift_paint_flat_to_25_deg_down( +static void ChairliftPaintFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - chairlift_paint_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + ChairliftPaint25DegUpToFlat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x00744028 */ -static void chairlift_paint_25_deg_down_to_flat( +static void ChairliftPaint25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - chairlift_paint_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + ChairliftPaintFlatTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x00744038 */ -static void chairlift_paint_left_quarter_turn_1_tile( +static void ChairliftPaintLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -634,51 +634,51 @@ static void chairlift_paint_left_quarter_turn_1_tile( break; } - chairlift_paint_util_draw_supports(session, PaintUtilRotateSegments(SEGMENT_C8 | SEGMENT_D0, direction), height); + ChairliftPaintUtilDrawSupports(session, PaintUtilRotateSegments(SEGMENT_C8 | SEGMENT_D0, direction), height); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x00744048 */ -static void chairlift_paint_right_quarter_turn_1_tile( +static void ChairliftPaintRightQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - chairlift_paint_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + ChairliftPaintLeftQuarterTurn1Tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } /* 0x008AAA0C */ -TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionChairlift(int32_t trackType) { switch (trackType) { case TrackElemType::BeginStation: case TrackElemType::MiddleStation: case TrackElemType::EndStation: - return chairlift_paint_station; + return ChairliftPaintStation; case TrackElemType::Flat: - return chairlift_paint_flat; + return ChairliftPaintFlat; case TrackElemType::FlatToUp25: - return chairlift_paint_flat_to_25_deg_up; + return ChairliftPaintFlatTo25DegUp; case TrackElemType::Up25: - return chairlift_paint_25_deg_up; + return ChairliftPaint25DegUp; case TrackElemType::Up25ToFlat: - return chairlift_paint_25_deg_up_to_flat; + return ChairliftPaint25DegUpToFlat; case TrackElemType::FlatToDown25: - return chairlift_paint_flat_to_25_deg_down; + return ChairliftPaintFlatTo25DegDown; case TrackElemType::Down25: - return chairlift_paint_25_deg_down; + return ChairliftPaint25DegDown; case TrackElemType::Down25ToFlat: - return chairlift_paint_25_deg_down_to_flat; + return ChairliftPaint25DegDownToFlat; case TrackElemType::LeftQuarterTurn1Tile: - return chairlift_paint_left_quarter_turn_1_tile; + return ChairliftPaintLeftQuarterTurn1Tile; case TrackElemType::RightQuarterTurn1Tile: - return chairlift_paint_right_quarter_turn_1_tile; + return ChairliftPaintRightQuarterTurn1Tile; } return nullptr; diff --git a/src/openrct2/ride/transport/Lift.cpp b/src/openrct2/ride/transport/Lift.cpp index 479c9a99e0..1e19a9c131 100644 --- a/src/openrct2/ride/transport/Lift.cpp +++ b/src/openrct2/ride/transport/Lift.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ static constexpr const uint32_t lift_cage_sprites[][2] = { { SPR_LIFT_CAGE_NW_BACK, SPR_LIFT_CAGE_NW_FRONT }, }; -static void paint_lift_cage(PaintSession& session, int8_t index, ImageId colourFlags, int32_t height, uint8_t rotation) +static void PaintLiftCage(PaintSession& session, int8_t index, ImageId colourFlags, int32_t height, uint8_t rotation) { ImageId imageId; @@ -46,7 +46,7 @@ static void paint_lift_cage(PaintSession& session, int8_t index, ImageId colourF } /** rct2: 0x0076C6CC */ -static void paint_lift_base( +static void PaintLiftBase( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -54,11 +54,11 @@ static void paint_lift_base( if (trackSequence == 0) { - paint_lift_cage(session, direction, session.TrackColours[SCHEME_TRACK], height, session.CurrentRotation); + PaintLiftCage(session, direction, session.TrackColours[SCHEME_TRACK], height, session.CurrentRotation); - paint_lift_cage(session, -1, session.TrackColours[SCHEME_TRACK], height + 32, session.CurrentRotation); + PaintLiftCage(session, -1, session.TrackColours[SCHEME_TRACK], height + 32, session.CurrentRotation); - paint_lift_cage(session, -1, session.TrackColours[SCHEME_TRACK], height + 64, session.CurrentRotation); + PaintLiftCage(session, -1, session.TrackColours[SCHEME_TRACK], height + 64, session.CurrentRotation); PaintUtilSetVerticalTunnel(session, height + 96); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -73,7 +73,7 @@ static void paint_lift_base( auto imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(SPR_FLOOR_METAL_B); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 1 } }); - track_paint_util_paint_fences( + TrackPaintUtilPaintFences( session, edges, session.MapPosition, trackElement, ride, session.TrackColours[SCHEME_TRACK], height, fenceSpritesMetalB, session.CurrentRotation); @@ -111,7 +111,7 @@ static void paint_lift_base( } /** rct2: 0x0076C6DC */ -static void paint_lift_tower_section( +static void PaintLiftTowerSection( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -120,7 +120,7 @@ static void paint_lift_tower_section( return; } - paint_lift_cage(session, -1, session.TrackColours[SCHEME_TRACK], height, session.CurrentRotation); + PaintLiftCage(session, -1, session.TrackColours[SCHEME_TRACK], height, session.CurrentRotation); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -131,15 +131,15 @@ static void paint_lift_tower_section( /** * rct2: 0x0076C5BC */ -TRACK_PAINT_FUNCTION get_track_paint_function_lift(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLift(int32_t trackType) { switch (trackType) { case TrackElemType::TowerBase: - return paint_lift_base; + return PaintLiftBase; case TrackElemType::TowerSection: - return paint_lift_tower_section; + return PaintLiftTowerSection; } return nullptr; diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index 9efe8757cb..3a4e8931c2 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -565,17 +565,17 @@ static constexpr const uint32_t miniature_railway_track_pieces_diag_25_deg_up[4] SPR_MINIATURE_RAILWAY_DIAG_25_DEG_UP_S_N, }; -static ImageId miniature_railway_track_to_gravel(ImageId imageId) +static ImageId MiniatureRailwayTrackToGravel(ImageId imageId) { return ImageId(imageId.GetIndex() - SPR_MINIATURE_RAILWAY_FLAT_SW_NE + SPR_G2_MINIATURE_RAILWAY_GRAVEL_SW_NE); } -static ImageId miniature_railway_track_to_grooved(ImageId imageId) +static ImageId MiniatureRailwayTrackToGrooved(ImageId imageId) { return ImageId(imageId.GetIndex() - SPR_MINIATURE_RAILWAY_FLAT_SW_NE + SPR_G2_MINIATURE_RAILWAY_GROOVED_SW_NE); } -static ImageId miniature_railway_track_to_grooved_indent(const TileElement* path, uint8_t direction, uint8_t rotation) +static ImageId MiniatureRailwayTrackToGroovedIndent(const TileElement* path, uint8_t direction, uint8_t rotation) { if (path == nullptr) { @@ -622,7 +622,7 @@ static ImageId miniature_railway_track_to_grooved_indent(const TileElement* path } /** rct2: 0x008AD0C0 */ -static void paint_miniature_railway_track_flat( +static void PaintMiniatureRailwayTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -643,27 +643,28 @@ static void paint_miniature_railway_track_flat( if (isSupported) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex(miniature_railway_track_floor[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_flat[direction]); if (!paintAsGravel) { - PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); } else { - imageIdAlt = miniature_railway_track_to_gravel(imageId); - PaintAddImageAsChildRotated(session, direction, imageIdAlt, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height }); + imageIdAlt = MiniatureRailwayTrackToGravel(imageId); + PaintAddImageAsChildRotated(session, direction, imageIdAlt, { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); } if (paintGrooved) { - imageIdAlt = miniature_railway_track_to_grooved(imageId); - PaintAddImageAsChildRotated(session, direction, imageIdAlt, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height + 2 }); - imageIdAlt = miniature_railway_track_to_grooved_indent( + imageIdAlt = MiniatureRailwayTrackToGrooved(imageId); + PaintAddImageAsChildRotated( + session, direction, imageIdAlt, { 0, 6, height }, { { 0, 6, height + 2 }, { 32, 20, 2 } }); + imageIdAlt = MiniatureRailwayTrackToGroovedIndent( session.PathElementOnSameHeight, direction, session.CurrentRotation); PaintAddImageAsChildRotated( session, direction, imageIdAlt.WithTransparency(FilterPaletteID::PaletteDarken2), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height + 2 }); + { { 0, 6, height + 2 }, { 32, 20, 2 } }); } } else @@ -671,22 +672,23 @@ static void paint_miniature_railway_track_flat( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_flat[direction]); if (!paintAsGravel) { - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); } else { - imageIdAlt = miniature_railway_track_to_gravel(imageId); - PaintAddImageAsParentRotated(session, direction, imageIdAlt, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height }); + imageIdAlt = MiniatureRailwayTrackToGravel(imageId); + PaintAddImageAsParentRotated(session, direction, imageIdAlt, { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } }); } if (paintGrooved) { - imageIdAlt = miniature_railway_track_to_grooved(imageId); - PaintAddImageAsParentRotated(session, direction, imageIdAlt, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height + 2 }); - imageIdAlt = miniature_railway_track_to_grooved_indent( + imageIdAlt = MiniatureRailwayTrackToGrooved(imageId); + PaintAddImageAsParentRotated( + session, direction, imageIdAlt, { 0, 6, height }, { { 0, 6, height + 2 }, { 32, 20, 2 } }); + imageIdAlt = MiniatureRailwayTrackToGroovedIndent( session.PathElementOnSameHeight, direction, session.CurrentRotation); PaintAddImageAsParentRotated( session, direction, imageIdAlt.WithTransparency(FilterPaletteID::PaletteDarken2), { 0, 6, height }, - { 32, 20, 2 }, { 0, 6, height + 2 }); + { { 0, 6, height + 2 }, { 32, 20, 2 } }); } } @@ -697,7 +699,7 @@ static void paint_miniature_railway_track_flat( } /** rct2: 0x008AD170, 0x008AD180, 0x008AD190 */ -static void paint_miniature_railway_station( +static void PaintMiniatureRailwayStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -706,14 +708,14 @@ static void paint_miniature_railway_station( WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); imageId = session.TrackColours[SCHEME_MISC].WithIndex(miniature_railway_station_floor[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_flat_station[direction]); - PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 2 }, { 0, 0, height }); + PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } }); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - track_paint_util_draw_station_3(session, ride, direction, height + 2, height, trackElement); + TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); // covers shouldn't be offset by +2 PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -721,13 +723,13 @@ static void paint_miniature_railway_station( } /** rct2: 0x008AD0D0 */ -static void paint_miniature_railway_track_25_deg_up( +static void PaintMiniatureRailwayTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_25_deg_up[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 2 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); switch (direction) { @@ -752,13 +754,13 @@ static void paint_miniature_railway_track_25_deg_up( } /** rct2: 0x008AD0E0 */ -static void paint_miniature_railway_track_flat_to_25_deg_up( +static void PaintMiniatureRailwayTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_flat_to_25_deg_up[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 2 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); switch (direction) { @@ -783,13 +785,13 @@ static void paint_miniature_railway_track_flat_to_25_deg_up( } /** rct2: 0x008AD0F0 */ -static void paint_miniature_railway_track_25_deg_up_to_flat( +static void PaintMiniatureRailwayTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_25_deg_up_to_flat[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { 32, 25, 2 }, { 0, 3, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 2, height }, { { 0, 3, height }, { 32, 25, 2 } }); switch (direction) { @@ -814,27 +816,27 @@ static void paint_miniature_railway_track_25_deg_up_to_flat( } /** rct2: 0x008AD100 */ -static void paint_miniature_railway_track_25_deg_down( +static void PaintMiniatureRailwayTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_miniature_railway_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMiniatureRailwayTrack25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AD110 */ -static void paint_miniature_railway_track_flat_to_25_deg_down( +static void PaintMiniatureRailwayTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_miniature_railway_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMiniatureRailwayTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AD120 */ -static void paint_miniature_railway_track_25_deg_down_to_flat( +static void PaintMiniatureRailwayTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_miniature_railway_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMiniatureRailwayTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } static constexpr const CoordsXY miniature_railway_right_quarter_turn_5_tiles_offsets[4][5] = { @@ -973,7 +975,7 @@ static constexpr const int8_t miniature_railway_right_quarter_turn_5_tiles_sprit }; /** rct2: 0x008AD140 */ -static void paint_miniature_railway_track_right_quarter_turn_5_tiles( +static void PaintMiniatureRailwayTrackRightQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -985,14 +987,14 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( if (!isSupported || (trackSequence == 3 && direction == 2)) { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 2, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], miniature_railway_track_pieces_flat_quarter_turn_5_tiles, miniature_railway_right_quarter_turn_5_tiles_offsets, miniature_railway_right_quarter_turn_5_tiles_bound_lengths, nullptr); } else { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 2, height, direction, trackSequence, session.TrackColours[SCHEME_SUPPORTS], miniature_railway_right_quarter_turn_5_tiles_track_floor, nullptr, miniature_railway_right_quarter_turn_5_tiles_bound_lengths, @@ -1062,13 +1064,12 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( } /** rct2: 0x008AD130 */ -static void paint_miniature_railway_track_left_quarter_turn_5_tiles( +static void PaintMiniatureRailwayTrackLeftQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - paint_miniature_railway_track_right_quarter_turn_5_tiles( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + PaintMiniatureRailwayTrackRightQuarterTurn5Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } static constexpr const int8_t s_bend_left_supports_type[4][4] = { @@ -1094,7 +1095,7 @@ static constexpr const uint32_t miniature_railway_s_bend_left_tiles_track_floor[ }; /** rct2: 0x8AD150 */ -static void paint_miniature_railway_track_s_bend_left( +static void PaintMiniatureRailwayTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1128,21 +1129,21 @@ static void paint_miniature_railway_track_s_bend_left( if (!isSupported) { PaintAddImageAsParentRotated( - session, direction, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 }, - { offset.x, offset.y, height }); + session, direction, imageId, { offset.x, offset.y, height }, + { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); } else { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( miniature_railway_s_bend_left_tiles_track_floor[direction & 1][trackSequence]); PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); + session, direction, imageId, { 0, 0, height }, { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence]); PaintAddImageAsChildRotated( - session, direction, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 }, - { offset.x, offset.y, height }); + session, direction, imageId, { offset.x, offset.y, height }, + { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); } if (direction == 0 || direction == 2) { @@ -1203,7 +1204,7 @@ static constexpr const uint32_t miniature_railway_s_bend_right_tiles_track_floor }; /** rct2: 0x008AD160 */ -static void paint_miniature_railway_track_s_bend_right( +static void PaintMiniatureRailwayTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1236,21 +1237,21 @@ static void paint_miniature_railway_track_s_bend_right( if (!isSupported) { PaintAddImageAsParentRotated( - session, direction, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 }, - { offset.x, offset.y, height }); + session, direction, imageId, { offset.x, offset.y, height }, + { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); } else { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( miniature_railway_s_bend_right_tiles_track_floor[direction & 1][trackSequence]); PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); + session, direction, imageId, { 0, 0, height }, { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence]); PaintAddImageAsChildRotated( - session, direction, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 }, - { offset.x, offset.y, height }); + session, direction, imageId, { offset.x, offset.y, height }, + { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); } if (direction == 0 || direction == 2) @@ -1336,7 +1337,7 @@ static constexpr const CoordsXYZ miniature_railway_right_quarter_turn_3_tile_bou }; /** rct2: 0x008AD1B0 */ -static void paint_miniature_railway_track_right_quarter_turn_3_tiles( +static void PaintMiniatureRailwayTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1349,7 +1350,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( } if (!isSupported) { - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], miniature_railway_track_pieces_flat_quarter_turn_3_tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); @@ -1364,7 +1365,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( } else { - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_SUPPORTS], miniature_railway_right_quarter_turn_3_tile_track_floor, nullptr, defaultRightQuarterTurn3TilesBoundLengths, miniature_railway_right_quarter_turn_3_tile_bound_offsets); @@ -1382,7 +1383,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( PaintAddImageAsChild( session, imageId, { offset, height }, { boundsOffset + CoordsXYZ{ 0, 0, height }, { boundsLength, 3 } }); } - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); int32_t blockedSegments = 0; switch (trackSequence) @@ -1403,13 +1404,12 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( } /** rct2: 0x008AD1A0 */ -static void paint_miniature_railway_track_left_quarter_turn_3_tiles( +static void PaintMiniatureRailwayTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - paint_miniature_railway_track_right_quarter_turn_3_tiles( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + PaintMiniatureRailwayTrackRightQuarterTurn3Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } static constexpr const int8_t paint_miniature_railway_eighth_to_diag_index[] = { @@ -1510,7 +1510,7 @@ static constexpr const CoordsXY miniature_railway_track_floor_pieces_left_eight_ }; /** rct2: 0x008AD1C0 */ -static void paint_miniature_railway_track_left_eighth_to_diag( +static void PaintMiniatureRailwayTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1674,7 +1674,7 @@ static constexpr const CoordsXY miniature_railway_track_floor_pieces_right_eight }; /** rct2: 0x008AD1D0 */ -static void paint_miniature_railway_track_right_eighth_to_diag( +static void PaintMiniatureRailwayTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1746,21 +1746,21 @@ static void paint_miniature_railway_track_right_eighth_to_diag( } /** rct2: 0x008AD1E0 */ -static void paint_miniature_railway_track_left_eighth_to_orthogonal( +static void PaintMiniatureRailwayTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - paint_miniature_railway_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMiniatureRailwayTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AD1F0 */ -static void paint_miniature_railway_track_right_eighth_to_orthogonal( +static void PaintMiniatureRailwayTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - paint_miniature_railway_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + PaintMiniatureRailwayTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } static constexpr const bool miniature_railway_diag_image_segment[][4] = { @@ -1787,14 +1787,14 @@ static constexpr const int16_t monorail_diag_support_types[][4] = { { -1, SUPPORT_PLAIN_W, SUPPORT_PLAIN_E, SUPPORT_PLAIN_90_DEG }, }; -struct floor_desc +struct FloorDescriptor { uint32_t image_id; CoordsXY bound_size; CoordsXY bound_offset; }; -static constexpr const floor_desc floors[] = { +static constexpr const FloorDescriptor floors[] = { { SPR_FLOOR_PLANKS, { 32, 32 }, { 0, 0 } }, { SPR_FLOOR_PLANKS_90_DEG, { 32, 32 }, { 0, 0 } }, // -16,-16(1:3) { SPR_FLOOR_PLANKS_N_SEGMENT, { 32, 32 }, { -16, -16 } }, @@ -1804,7 +1804,7 @@ static constexpr const floor_desc floors[] = { }; /** rct2: 0x008AD200 */ -static void miniature_railway_track_diag_flat( +static void MiniatureRailwayTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1860,7 +1860,7 @@ enum WOOD_B = 1, }; -static bool wooden_supports_paint_setup( +static bool WoodenSupportsPaintSetup( PaintSession& session, int32_t woodType, int32_t supportType, int32_t special, int32_t height, ImageId imageColourFlags) { switch (woodType) @@ -1876,7 +1876,7 @@ static bool wooden_supports_paint_setup( } /** rct2: 0x008AD230 */ -static void miniature_railway_track_diag_25_deg_up( +static void MiniatureRailwayTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1907,7 +1907,7 @@ static void miniature_railway_track_diag_25_deg_up( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - hasSupports = wooden_supports_paint_setup( + hasSupports = WoodenSupportsPaintSetup( session, supportFunction, supportType, 0, height + heightDiff, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1956,7 +1956,7 @@ static void miniature_railway_track_diag_25_deg_up( } /** rct2: 0x008AD210 */ -static void miniature_railway_track_diag_flat_to_25_deg_up( +static void MiniatureRailwayTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2007,7 +2007,7 @@ static void miniature_railway_track_diag_flat_to_25_deg_up( } /** rct2: 0x008AD220 */ -static void miniature_railway_track_diag_25_deg_up_to_flat( +static void MiniatureRailwayTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2036,7 +2036,7 @@ static void miniature_railway_track_diag_25_deg_up_to_flat( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - hasSupports = wooden_supports_paint_setup( + hasSupports = WoodenSupportsPaintSetup( session, supportFunction, supportType, 0, height + supportOffsets[direction][trackSequence], session.TrackColours[SCHEME_SUPPORTS]); } @@ -2083,7 +2083,7 @@ static void miniature_railway_track_diag_25_deg_up_to_flat( } /** rct2: 0x008AD260 */ -static void miniature_railway_track_diag_25_deg_down( +static void MiniatureRailwayTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2112,7 +2112,7 @@ static void miniature_railway_track_diag_25_deg_down( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - hasSupports = wooden_supports_paint_setup( + hasSupports = WoodenSupportsPaintSetup( session, supportFunction, supportType, 0, height + supportOffsets[direction][trackSequence], session.TrackColours[SCHEME_SUPPORTS]); } @@ -2158,7 +2158,7 @@ static void miniature_railway_track_diag_25_deg_down( } /** rct2: 0x008AD240 */ -static void miniature_railway_track_diag_flat_to_25_deg_down( +static void MiniatureRailwayTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2186,7 +2186,7 @@ static void miniature_railway_track_diag_flat_to_25_deg_down( floorImage = floors[supportType].image_id; floorBoundSize = floors[supportType].bound_size; floorBoundOffset = floors[supportType].bound_offset; - hasSupports = wooden_supports_paint_setup( + hasSupports = WoodenSupportsPaintSetup( session, supportFunction, supportType, 0, height + supportOffsets[direction][trackSequence], session.TrackColours[SCHEME_SUPPORTS]); } @@ -2231,7 +2231,7 @@ static void miniature_railway_track_diag_flat_to_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void miniature_railway_track_diag_25_deg_down_to_flat( +static void MiniatureRailwayTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -2283,70 +2283,70 @@ static void miniature_railway_track_diag_25_deg_down_to_flat( /** * rct2: 0x008ACE48 */ -TRACK_PAINT_FUNCTION get_track_paint_function_miniature_railway(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMiniatureRailway(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_miniature_railway_track_flat; + return PaintMiniatureRailwayTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_miniature_railway_station; + return PaintMiniatureRailwayStation; case TrackElemType::Up25: - return paint_miniature_railway_track_25_deg_up; + return PaintMiniatureRailwayTrack25DegUp; case TrackElemType::FlatToUp25: - return paint_miniature_railway_track_flat_to_25_deg_up; + return PaintMiniatureRailwayTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_miniature_railway_track_25_deg_up_to_flat; + return PaintMiniatureRailwayTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_miniature_railway_track_25_deg_down; + return PaintMiniatureRailwayTrack25DegDown; case TrackElemType::FlatToDown25: - return paint_miniature_railway_track_flat_to_25_deg_down; + return PaintMiniatureRailwayTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_miniature_railway_track_25_deg_down_to_flat; + return PaintMiniatureRailwayTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return paint_miniature_railway_track_left_quarter_turn_5_tiles; + return PaintMiniatureRailwayTrackLeftQuarterTurn5Tiles; case TrackElemType::RightQuarterTurn5Tiles: - return paint_miniature_railway_track_right_quarter_turn_5_tiles; + return PaintMiniatureRailwayTrackRightQuarterTurn5Tiles; case TrackElemType::SBendLeft: - return paint_miniature_railway_track_s_bend_left; + return PaintMiniatureRailwayTrackSBendLeft; case TrackElemType::SBendRight: - return paint_miniature_railway_track_s_bend_right; + return PaintMiniatureRailwayTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return paint_miniature_railway_track_left_quarter_turn_3_tiles; + return PaintMiniatureRailwayTrackLeftQuarterTurn3Tiles; case TrackElemType::RightQuarterTurn3Tiles: - return paint_miniature_railway_track_right_quarter_turn_3_tiles; + return PaintMiniatureRailwayTrackRightQuarterTurn3Tiles; case TrackElemType::LeftEighthToDiag: - return paint_miniature_railway_track_left_eighth_to_diag; + return PaintMiniatureRailwayTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return paint_miniature_railway_track_right_eighth_to_diag; + return PaintMiniatureRailwayTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return paint_miniature_railway_track_left_eighth_to_orthogonal; + return PaintMiniatureRailwayTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return paint_miniature_railway_track_right_eighth_to_orthogonal; + return PaintMiniatureRailwayTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return miniature_railway_track_diag_flat; + return MiniatureRailwayTrackDiagFlat; case TrackElemType::DiagUp25: - return miniature_railway_track_diag_25_deg_up; + return MiniatureRailwayTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return miniature_railway_track_diag_flat_to_25_deg_up; + return MiniatureRailwayTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return miniature_railway_track_diag_25_deg_up_to_flat; + return MiniatureRailwayTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return miniature_railway_track_diag_25_deg_down; + return MiniatureRailwayTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return miniature_railway_track_diag_flat_to_25_deg_down; + return MiniatureRailwayTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return miniature_railway_track_diag_25_deg_down_to_flat; + return MiniatureRailwayTrackDiag25DegDownToFlat; } return nullptr; diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 2f7c52af63..6b9bf22102 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -384,7 +384,7 @@ static constexpr const uint32_t monorail_track_pieces_diag_25_deg_up[4] = { }; /** rct2: 0x008AE1AC */ -static void paint_monorail_track_flat( +static void PaintMonorailTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -408,7 +408,7 @@ static void paint_monorail_track_flat( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -419,7 +419,7 @@ static void paint_monorail_track_flat( } /** rct2: 0x008AE25C, 0x008AE26C, 0x008AE27C */ -static void paint_monorail_station( +static void PaintMonorailStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -433,12 +433,12 @@ static void paint_monorail_station( if (direction == 0 || direction == 2) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); } else if (direction == 1 || direction == 3) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 2 }, { 2, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 2 } }); } } @@ -472,14 +472,14 @@ static void paint_monorail_station( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } /** rct2: 0x008AE1BC */ -static void paint_monorail_track_25_deg_up( +static void PaintMonorailTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -510,7 +510,7 @@ static void paint_monorail_track_25_deg_up( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -521,7 +521,7 @@ static void paint_monorail_track_25_deg_up( } /** rct2: 0x008AE1CC */ -static void paint_monorail_track_flat_to_25_deg_up( +static void PaintMonorailTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -552,7 +552,7 @@ static void paint_monorail_track_flat_to_25_deg_up( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -563,7 +563,7 @@ static void paint_monorail_track_flat_to_25_deg_up( } /** rct2: 0x008AE1DC */ -static void paint_monorail_track_25_deg_up_to_flat( +static void PaintMonorailTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -594,7 +594,7 @@ static void paint_monorail_track_25_deg_up_to_flat( break; } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -605,35 +605,35 @@ static void paint_monorail_track_25_deg_up_to_flat( } /** rct2: 0x008AE1EC */ -static void paint_monorail_track_25_deg_down( +static void PaintMonorailTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_monorail_track_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMonorailTrack25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AE1FC */ -static void paint_monorail_track_flat_to_25_deg_down( +static void PaintMonorailTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_monorail_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMonorailTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AE20C */ -static void paint_monorail_track_25_deg_down_to_flat( +static void PaintMonorailTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_monorail_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMonorailTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AE22C */ -static void paint_monorail_track_right_quarter_turn_5_tiles( +static void PaintMonorailTrackRightQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_5_tiles_paint( + TrackPaintUtilRightQuarterTurn5TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], monorail_track_pieces_flat_quarter_turn_5_tiles, defaultRightQuarterTurn5TilesOffsets, defaultRightQuarterTurn5TilesBoundLengths, nullptr); @@ -692,16 +692,16 @@ static void paint_monorail_track_right_quarter_turn_5_tiles( } /** rct2: 0x008AE21C */ -static void paint_monorail_track_left_quarter_turn_5_tiles( +static void PaintMonorailTrackLeftQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - paint_monorail_track_right_quarter_turn_5_tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + PaintMonorailTrackRightQuarterTurn5Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } /** rct2: 0x */ -static void paint_monorail_track_s_bend_left( +static void PaintMonorailTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -793,7 +793,7 @@ static void paint_monorail_track_s_bend_left( } /** rct2: 0x008AE24C */ -static void paint_monorail_track_s_bend_right( +static void PaintMonorailTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -882,15 +882,15 @@ static void paint_monorail_track_s_bend_right( } /** rct2: 0x008AE29C */ -static void paint_monorail_track_right_quarter_turn_3_tiles( +static void PaintMonorailTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_3_tiles_paint( + TrackPaintUtilRightQuarterTurn3TilesPaint( session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], monorail_track_pieces_flat_quarter_turn_3_tiles, defaultRightQuarterTurn3TilesOffsets, defaultRightQuarterTurn3TilesBoundLengths, nullptr); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); switch (trackSequence) { @@ -919,12 +919,12 @@ static void paint_monorail_track_right_quarter_turn_3_tiles( } /** rct2: 0x008AE28C */ -static void paint_monorail_track_left_quarter_turn_3_tiles( +static void PaintMonorailTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - paint_monorail_track_right_quarter_turn_3_tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + PaintMonorailTrackRightQuarterTurn3Tiles(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } static constexpr const int8_t paint_monorail_eighth_to_diag_index[] = { @@ -932,7 +932,7 @@ static constexpr const int8_t paint_monorail_eighth_to_diag_index[] = { }; /** rct2: 0x008AE31C */ -static void paint_monorail_track_left_eighth_to_diag( +static void PaintMonorailTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -943,7 +943,8 @@ static void paint_monorail_track_left_eighth_to_diag( ghost_train_track_pieces_left_eight_to_diag[direction][index]); const CoordsXY& offset = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].offset; const CoordsXY& bounds = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].length; - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); + PaintAddImageAsParent( + session, imageId, { 0, 0, height }, { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); } switch (trackSequence) @@ -997,7 +998,7 @@ static void paint_monorail_track_left_eighth_to_diag( } /** rct2: 0x008AE32C */ -static void paint_monorail_track_right_eighth_to_diag( +static void PaintMonorailTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1008,7 +1009,8 @@ static void paint_monorail_track_right_eighth_to_diag( ghost_train_track_pieces_right_eight_to_diag[direction][index]); const CoordsXY offset = GhostTrainTrackPiecesRightEightToDiagBoxes[direction][index].offset; const CoordsXY bounds = GhostTrainTrackPiecesRightEightToDiagBoxes[direction][index].length; - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); + PaintAddImageAsParent( + session, imageId, { 0, 0, height }, { { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } }); } switch (trackSequence) @@ -1062,23 +1064,23 @@ static void paint_monorail_track_right_eighth_to_diag( } /** rct2: 0x008AE33C */ -static void paint_monorail_track_left_eighth_to_orthogonal( +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]; - paint_monorail_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + PaintMonorailTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } /** rct2: 0x008AE34C */ -static void paint_monorail_track_right_eighth_to_orthogonal( +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]; - paint_monorail_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + PaintMonorailTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } static constexpr const bool monorail_diag_image_segment[][4] = { @@ -1103,14 +1105,14 @@ static constexpr const int32_t monorail_diag_blocked_segments[] = { }; /** rct2: 0x008AE2AC */ -static void paint_monorail_track_diag_flat( +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[SCHEME_TRACK].WithIndex(monorail_track_pieces_diag_flat[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1126,14 +1128,14 @@ static void paint_monorail_track_diag_flat( } /** rct2: 0x008AE2DC */ -static void paint_monorail_track_diag_25_deg_up( +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[SCHEME_TRACK].WithIndex(monorail_track_pieces_diag_25_deg_up[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1149,14 +1151,14 @@ static void paint_monorail_track_diag_25_deg_up( } /** rct2: 0x008AE2BC */ -static void paint_monorail_track_diag_flat_to_25_deg_up( +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[SCHEME_TRACK].WithIndex(monorail_track_pieces_diag_flat_to_25_deg_up[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1172,14 +1174,14 @@ static void paint_monorail_track_diag_flat_to_25_deg_up( } /** rct2: 0x008AE2CC */ -static void paint_monorail_track_diag_25_deg_up_to_flat( +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[SCHEME_TRACK].WithIndex(monorail_track_pieces_diag_25_deg_up_to_flat[direction]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1195,14 +1197,14 @@ static void paint_monorail_track_diag_25_deg_up_to_flat( } /** rct2: 0x008AE30C */ -static void paint_monorail_track_diag_25_deg_down( +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[SCHEME_TRACK].WithIndex(monorail_track_pieces_diag_25_deg_up[(direction + 2) % 4]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1218,7 +1220,7 @@ static void paint_monorail_track_diag_25_deg_down( } /** rct2: 0x008AE2EC */ -static void paint_monorail_track_diag_flat_to_25_deg_down( +static void PaintMonorailTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1226,7 +1228,7 @@ static void paint_monorail_track_diag_flat_to_25_deg_down( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( monorail_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1242,7 +1244,7 @@ static void paint_monorail_track_diag_flat_to_25_deg_down( } /** rct2: 0x008AE2FC */ -static void paint_monorail_track_diag_25_deg_down_to_flat( +static void PaintMonorailTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1250,7 +1252,7 @@ static void paint_monorail_track_diag_25_deg_down_to_flat( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( monorail_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4]); - PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height }); + PaintAddImageAsParent(session, imageId, { -16, -16, height }, { { -16, -16, height }, { 32, 32, 2 } }); } if (trackSequence == 3) @@ -1268,72 +1270,72 @@ static void paint_monorail_track_diag_25_deg_down_to_flat( /** * rct2: 0x008ADF34 */ -TRACK_PAINT_FUNCTION get_track_paint_function_monorail(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionMonorail(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_monorail_track_flat; + return PaintMonorailTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_monorail_station; + return PaintMonorailStation; case TrackElemType::Up25: - return paint_monorail_track_25_deg_up; + return PaintMonorailTrack25DegUp; case TrackElemType::FlatToUp25: - return paint_monorail_track_flat_to_25_deg_up; + return PaintMonorailTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_monorail_track_25_deg_up_to_flat; + return PaintMonorailTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_monorail_track_25_deg_down; + return PaintMonorailTrack25DegDown; case TrackElemType::FlatToDown25: - return paint_monorail_track_flat_to_25_deg_down; + return PaintMonorailTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_monorail_track_25_deg_down_to_flat; + return PaintMonorailTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return paint_monorail_track_left_quarter_turn_5_tiles; + return PaintMonorailTrackLeftQuarterTurn5Tiles; case TrackElemType::RightQuarterTurn5Tiles: - return paint_monorail_track_right_quarter_turn_5_tiles; + return PaintMonorailTrackRightQuarterTurn5Tiles; case TrackElemType::SBendLeft: - return paint_monorail_track_s_bend_left; + return PaintMonorailTrackSBendLeft; case TrackElemType::SBendRight: - return paint_monorail_track_s_bend_right; + return PaintMonorailTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return paint_monorail_track_left_quarter_turn_3_tiles; + return PaintMonorailTrackLeftQuarterTurn3Tiles; case TrackElemType::RightQuarterTurn3Tiles: - return paint_monorail_track_right_quarter_turn_3_tiles; + return PaintMonorailTrackRightQuarterTurn3Tiles; case TrackElemType::LeftEighthToDiag: - return paint_monorail_track_left_eighth_to_diag; + return PaintMonorailTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return paint_monorail_track_right_eighth_to_diag; + return PaintMonorailTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return paint_monorail_track_left_eighth_to_orthogonal; + return PaintMonorailTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return paint_monorail_track_right_eighth_to_orthogonal; + return PaintMonorailTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return paint_monorail_track_diag_flat; + return PaintMonorailTrackDiagFlat; case TrackElemType::DiagUp25: - return paint_monorail_track_diag_25_deg_up; + return PaintMonorailTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return paint_monorail_track_diag_flat_to_25_deg_up; + return PaintMonorailTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return paint_monorail_track_diag_25_deg_up_to_flat; + return PaintMonorailTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return paint_monorail_track_diag_25_deg_down; + return PaintMonorailTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return paint_monorail_track_diag_flat_to_25_deg_down; + return PaintMonorailTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return paint_monorail_track_diag_25_deg_down_to_flat; + return PaintMonorailTrackDiag25DegDownToFlat; } return nullptr; diff --git a/src/openrct2/ride/transport/SuspendedMonorail.cpp b/src/openrct2/ride/transport/SuspendedMonorail.cpp index f13f4bc9a6..a39074714d 100644 --- a/src/openrct2/ride/transport/SuspendedMonorail.cpp +++ b/src/openrct2/ride/transport/SuspendedMonorail.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,7 +20,7 @@ #include "../TrackPaint.h" /** rct2: 0x008636F4 */ -static void suspended_monorail_track_flat( +static void SuspendedMonorailTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -29,20 +29,20 @@ static void suspended_monorail_track_flat( case 0: case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25853), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 32 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25853), { 0, 0, height + 32 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25854), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 32 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25854), { 0, 0, height + 32 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height + 42, session.TrackColours[SCHEME_SUPPORTS]); } @@ -52,7 +52,7 @@ static void suspended_monorail_track_flat( } /** rct2: 0x008637A4, 0x008637B4, 0x008637C4 */ -static void suspended_monorail_track_station( +static void SuspendedMonorailTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -65,22 +65,22 @@ static void suspended_monorail_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 28, 1 }, { 0, 2, height }); + { { 0, 2, height }, { 32, 28, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); - track_paint_util_draw_station_metal_supports_2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); - track_paint_util_draw_station_inverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3); + TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x00863704 */ -static void suspended_monorail_track_25_deg_up( +static void SuspendedMonorailTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -88,29 +88,29 @@ static void suspended_monorail_track_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25945), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 48 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25945), { 0, 0, height + 32 }, + { { 0, 6, height + 48 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25946), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 48 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25946), { 0, 0, height + 32 }, + { { 0, 6, height + 48 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25947), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 48 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25947), { 0, 0, height + 32 }, + { { 0, 6, height + 48 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25948), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 48 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25948), { 0, 0, height + 32 }, + { { 0, 6, height + 48 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -145,7 +145,7 @@ static void suspended_monorail_track_25_deg_up( } /** rct2: 0x00863714 */ -static void suspended_monorail_track_flat_to_25_deg_up( +static void SuspendedMonorailTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -153,29 +153,29 @@ static void suspended_monorail_track_flat_to_25_deg_up( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25937), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25937), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25938), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25938), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25939), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25939), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25940), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25940), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -210,7 +210,7 @@ static void suspended_monorail_track_flat_to_25_deg_up( } /** rct2: 0x00863724 */ -static void suspended_monorail_track_25_deg_up_to_flat( +static void SuspendedMonorailTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -218,29 +218,29 @@ static void suspended_monorail_track_25_deg_up_to_flat( { case 0: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25941), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25941), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25942), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25942), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25943), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25943), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25944), { 0, 0, height + 32 }, { 32, 20, 3 }, - { 0, 6, height + 40 }); + session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25944), { 0, 0, height + 32 }, + { { 0, 6, height + 40 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { switch (direction) { @@ -275,31 +275,31 @@ static void suspended_monorail_track_25_deg_up_to_flat( } /** rct2: 0x00863734 */ -static void suspended_monorail_track_25_deg_down( +static void SuspendedMonorailTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_monorail_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedMonorailTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00863744 */ -static void suspended_monorail_track_flat_to_25_deg_down( +static void SuspendedMonorailTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_monorail_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedMonorailTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00863754 */ -static void suspended_monorail_track_25_deg_down_to_flat( +static void SuspendedMonorailTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - suspended_monorail_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedMonorailTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00863764 */ -static void suspended_monorail_track_left_quarter_turn_5( +static void SuspendedMonorailTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -311,22 +311,22 @@ static void suspended_monorail_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25876), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25881), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25886), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25871), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -360,12 +360,12 @@ static void suspended_monorail_track_left_quarter_turn_5( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25885), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25870), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -380,17 +380,17 @@ static void suspended_monorail_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25874), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25879), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 16, height + 32 }); + { { 16, 16, height + 32 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25884), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( @@ -411,7 +411,7 @@ static void suspended_monorail_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25873), { 0, 0, height + 32 }, - { 16, 32, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -426,7 +426,7 @@ static void suspended_monorail_track_left_quarter_turn_5( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25868), { 0, 0, height + 32 }, - { 16, 32, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -441,22 +441,22 @@ static void suspended_monorail_track_left_quarter_turn_5( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25872), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25877), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25882), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25867), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; } @@ -480,16 +480,16 @@ static void suspended_monorail_track_left_quarter_turn_5( } /** rct2: 0x00863774 */ -static void suspended_monorail_track_right_quarter_turn_5( +static void SuspendedMonorailTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - suspended_monorail_track_left_quarter_turn_5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SuspendedMonorailTrackLeftQuarterTurn5(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00863784 */ -static void suspended_monorail_track_s_bend_left( +static void SuspendedMonorailTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -501,22 +501,22 @@ static void suspended_monorail_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25919), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25923), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25922), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25926), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -546,12 +546,12 @@ static void suspended_monorail_track_s_bend_left( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25921), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25925), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; } @@ -579,12 +579,12 @@ static void suspended_monorail_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25921), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25925), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -622,22 +622,22 @@ static void suspended_monorail_track_s_bend_left( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25922), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25926), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25919), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25923), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -660,7 +660,7 @@ static void suspended_monorail_track_s_bend_left( } /** rct2: 0x00863794 */ -static void suspended_monorail_track_s_bend_right( +static void SuspendedMonorailTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -672,22 +672,22 @@ static void suspended_monorail_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25927), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25931), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25930), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25934), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -707,12 +707,12 @@ static void suspended_monorail_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25928), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25932), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( @@ -760,12 +760,12 @@ static void suspended_monorail_track_s_bend_right( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25928), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25932), { 0, 0, height + 32 }, - { 32, 26, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 26, 3 } }); break; } @@ -793,22 +793,22 @@ static void suspended_monorail_track_s_bend_right( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25930), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25934), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25927), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25931), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -831,7 +831,7 @@ static void suspended_monorail_track_s_bend_right( } /** rct2: 0x008637D4 */ -static void suspended_monorail_track_left_quarter_turn_3( +static void SuspendedMonorailTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -843,22 +843,22 @@ static void suspended_monorail_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25860), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25863), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25866), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25857), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -882,7 +882,7 @@ static void suspended_monorail_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25859), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -892,12 +892,12 @@ static void suspended_monorail_track_left_quarter_turn_3( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25865), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25856), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 16, height + 32 }); + { { 16, 16, height + 32 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -910,22 +910,22 @@ static void suspended_monorail_track_left_quarter_turn_3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25858), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25861), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25864), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25855), { 0, 0, height + 32 }, - { 20, 32, 3 }, { 6, 0, height + 32 }); + { { 6, 0, height + 32 }, { 20, 32, 3 } }); break; } @@ -949,16 +949,16 @@ static void suspended_monorail_track_left_quarter_turn_3( } /** rct2: 0x008637E4 */ -static void suspended_monorail_track_right_quarter_turn_3( +static void SuspendedMonorailTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - suspended_monorail_track_left_quarter_turn_3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); + SuspendedMonorailTrackLeftQuarterTurn3(session, ride, trackSequence, (direction - 1) & 3, height, trackElement); } /** rct2: 0x00863864 */ -static void suspended_monorail_track_left_eighth_to_diag( +static void SuspendedMonorailTrackLeftEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -970,22 +970,22 @@ static void suspended_monorail_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25903), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25907), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25911), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25915), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -1005,22 +1005,22 @@ static void suspended_monorail_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25904), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25908), { 0, 0, height + 32 }, - { 34, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 34, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25912), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25916), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1035,22 +1035,22 @@ static void suspended_monorail_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25905), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25909), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 16, height + 32 }); + { { 16, 16, height + 32 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25913), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25917), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1069,22 +1069,22 @@ static void suspended_monorail_track_left_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25906), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 16, height + 32 }); + { { 16, 16, height + 32 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25910), { 0, 0, height + 32 }, - { 16, 18, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 16, 18, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25914), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25918), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 16, 3 } }); break; } @@ -1118,7 +1118,7 @@ static void suspended_monorail_track_left_eighth_to_diag( } /** rct2: 0x00863874 */ -static void suspended_monorail_track_right_eighth_to_diag( +static void SuspendedMonorailTrackRightEighthToDiag( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1130,22 +1130,22 @@ static void suspended_monorail_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25887), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25891), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25895), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25899), { 0, 0, height + 32 }, - { 32, 20, 3 }, { 0, 6, height + 32 }); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } @@ -1165,22 +1165,22 @@ static void suspended_monorail_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25888), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25892), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 32, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25896), { 0, 0, height + 32 }, - { 34, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 34, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25900), { 0, 0, height + 32 }, - { 32, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 32, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1195,22 +1195,22 @@ static void suspended_monorail_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25889), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25893), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25897), { 0, 0, height + 32 }, - { 28, 28, 3 }, { 4, 4, height + 32 }); + { { 4, 4, height + 32 }, { 28, 28, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25901), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1229,22 +1229,22 @@ static void suspended_monorail_track_right_eighth_to_diag( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25890), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 0, height + 32 }); + { { 16, 0, height + 32 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25894), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 0, 0, height + 32 }); + { { 0, 0, height + 32 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25898), { 0, 0, height + 32 }, - { 16, 18, 3 }, { 0, 16, height + 32 }); + { { 0, 16, height + 32 }, { 16, 18, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25902), { 0, 0, height + 32 }, - { 16, 16, 3 }, { 16, 16, height + 32 }); + { { 16, 16, height + 32 }, { 16, 16, 3 } }); break; } @@ -1278,25 +1278,25 @@ static void suspended_monorail_track_right_eighth_to_diag( } /** rct2: 0x00863884 */ -static void suspended_monorail_track_left_eighth_to_orthogonal( +static void SuspendedMonorailTrackLeftEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - suspended_monorail_track_right_eighth_to_diag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + SuspendedMonorailTrackRightEighthToDiag(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } /** rct2: 0x00863894 */ -static void suspended_monorail_track_right_eighth_to_orthogonal( +static void SuspendedMonorailTrackRightEighthToOrthogonal( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; - suspended_monorail_track_left_eighth_to_diag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); + SuspendedMonorailTrackLeftEighthToDiag(session, ride, trackSequence, (direction + 3) & 3, height, trackElement); } /** rct2: 0x008637F4 */ -static void suspended_monorail_track_diag_flat( +static void SuspendedMonorailTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1308,7 +1308,7 @@ static void suspended_monorail_track_diag_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25936), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1321,7 +1321,7 @@ static void suspended_monorail_track_diag_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25935), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1334,7 +1334,7 @@ static void suspended_monorail_track_diag_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25935), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1347,7 +1347,7 @@ static void suspended_monorail_track_diag_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25936), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 32 }); + { { -16, -16, height + 32 }, { 32, 32, 3 } }); break; } @@ -1379,7 +1379,7 @@ static void suspended_monorail_track_diag_flat( } /** rct2: 0x00863824 */ -static void suspended_monorail_track_diag_25_deg_up( +static void SuspendedMonorailTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1391,7 +1391,7 @@ static void suspended_monorail_track_diag_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25960), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1404,7 +1404,7 @@ static void suspended_monorail_track_diag_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25957), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1417,7 +1417,7 @@ static void suspended_monorail_track_diag_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25959), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1430,7 +1430,7 @@ static void suspended_monorail_track_diag_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25958), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } @@ -1462,7 +1462,7 @@ static void suspended_monorail_track_diag_25_deg_up( } /** rct2: 0x00863804 */ -static void suspended_monorail_track_diag_flat_to_25_deg_up( +static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1474,7 +1474,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25952), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1487,7 +1487,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25949), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1500,7 +1500,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25951), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1513,7 +1513,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25950), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -1545,7 +1545,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up( } /** rct2: 0x00863814 */ -static void suspended_monorail_track_diag_25_deg_up_to_flat( +static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1557,7 +1557,7 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25956), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1570,7 +1570,7 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25953), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1583,7 +1583,7 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25955), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1596,7 +1596,7 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25954), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -1628,7 +1628,7 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat( } /** rct2: 0x00863854 */ -static void suspended_monorail_track_diag_25_deg_down( +static void SuspendedMonorailTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1640,7 +1640,7 @@ static void suspended_monorail_track_diag_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25958), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1653,7 +1653,7 @@ static void suspended_monorail_track_diag_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25959), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1666,7 +1666,7 @@ static void suspended_monorail_track_diag_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25957), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1679,7 +1679,7 @@ static void suspended_monorail_track_diag_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25960), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 48 }); + { { -16, -16, height + 48 }, { 32, 32, 3 } }); break; } @@ -1711,7 +1711,7 @@ static void suspended_monorail_track_diag_25_deg_down( } /** rct2: 0x00863834 */ -static void suspended_monorail_track_diag_flat_to_25_deg_down( +static void SuspendedMonorailTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1723,7 +1723,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25954), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1735,7 +1735,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25955), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1747,7 +1747,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25953), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1759,7 +1759,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25956), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -1791,7 +1791,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down( } /** rct2: 0x00863844 */ -static void suspended_monorail_track_diag_25_deg_down_to_flat( +static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1803,7 +1803,7 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25950), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1816,7 +1816,7 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25951), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1829,7 +1829,7 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat( case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25949), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -1842,7 +1842,7 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat( case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25952), { -16, -16, height + 32 }, - { 32, 32, 3 }, { -16, -16, height + 40 }); + { { -16, -16, height + 40 }, { 32, 32, 3 } }); break; } @@ -1873,62 +1873,62 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat( } } -TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSuspendedMonorail(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return suspended_monorail_track_flat; + return SuspendedMonorailTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return suspended_monorail_track_station; + return SuspendedMonorailTrackStation; case TrackElemType::Up25: - return suspended_monorail_track_25_deg_up; + return SuspendedMonorailTrack25DegUp; case TrackElemType::FlatToUp25: - return suspended_monorail_track_flat_to_25_deg_up; + return SuspendedMonorailTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return suspended_monorail_track_25_deg_up_to_flat; + return SuspendedMonorailTrack25DegUpToFlat; case TrackElemType::Down25: - return suspended_monorail_track_25_deg_down; + return SuspendedMonorailTrack25DegDown; case TrackElemType::FlatToDown25: - return suspended_monorail_track_flat_to_25_deg_down; + return SuspendedMonorailTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return suspended_monorail_track_25_deg_down_to_flat; + return SuspendedMonorailTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return suspended_monorail_track_left_quarter_turn_5; + return SuspendedMonorailTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return suspended_monorail_track_right_quarter_turn_5; + return SuspendedMonorailTrackRightQuarterTurn5; case TrackElemType::SBendLeft: - return suspended_monorail_track_s_bend_left; + return SuspendedMonorailTrackSBendLeft; case TrackElemType::SBendRight: - return suspended_monorail_track_s_bend_right; + return SuspendedMonorailTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return suspended_monorail_track_left_quarter_turn_3; + return SuspendedMonorailTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return suspended_monorail_track_right_quarter_turn_3; + return SuspendedMonorailTrackRightQuarterTurn3; case TrackElemType::LeftEighthToDiag: - return suspended_monorail_track_left_eighth_to_diag; + return SuspendedMonorailTrackLeftEighthToDiag; case TrackElemType::RightEighthToDiag: - return suspended_monorail_track_right_eighth_to_diag; + return SuspendedMonorailTrackRightEighthToDiag; case TrackElemType::LeftEighthToOrthogonal: - return suspended_monorail_track_left_eighth_to_orthogonal; + return SuspendedMonorailTrackLeftEighthToOrthogonal; case TrackElemType::RightEighthToOrthogonal: - return suspended_monorail_track_right_eighth_to_orthogonal; + return SuspendedMonorailTrackRightEighthToOrthogonal; case TrackElemType::DiagFlat: - return suspended_monorail_track_diag_flat; + return SuspendedMonorailTrackDiagFlat; case TrackElemType::DiagUp25: - return suspended_monorail_track_diag_25_deg_up; + return SuspendedMonorailTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return suspended_monorail_track_diag_flat_to_25_deg_up; + return SuspendedMonorailTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return suspended_monorail_track_diag_25_deg_up_to_flat; + return SuspendedMonorailTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return suspended_monorail_track_diag_25_deg_down; + return SuspendedMonorailTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return suspended_monorail_track_diag_flat_to_25_deg_down; + return SuspendedMonorailTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return suspended_monorail_track_diag_25_deg_down_to_flat; + return SuspendedMonorailTrackDiag25DegDownToFlat; } return nullptr; } diff --git a/src/openrct2/ride/transport/meta/Chairlift.h b/src/openrct2/ride/transport/meta/Chairlift.h index 38ba62374f..275863e609 100644 --- a/src/openrct2/ride/transport/meta/Chairlift.h +++ b/src/openrct2/ride/transport/meta/Chairlift.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor ChairliftRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_chairlift), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionChairlift), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | @@ -40,7 +40,7 @@ constexpr const RideTypeDescriptor ChairliftRTD = SET_FIELD(Heights, { 40, 32, 28, 2, }), SET_FIELD(MaxMass, 18), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_chairlift), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateChairlift), SET_FIELD(RatingsMultipliers, { 70, 10, 0 }), SET_FIELD(UpkeepCosts, { 60, 20, 0, 4, 3, 10 }), SET_FIELD(BuildCosts, { 32.50_GBP, 0.50_GBP, 30, }), diff --git a/src/openrct2/ride/transport/meta/Lift.h b/src/openrct2/ride/transport/meta/Lift.h index 886b0de1f2..823f32ac0e 100644 --- a/src/openrct2/ride/transport/meta/Lift.h +++ b/src/openrct2/ride/transport/meta/Lift.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor LiftRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::TowerBase), - SET_FIELD(TrackPaintFunction, get_track_paint_function_lift), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionLift), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_CANNOT_HAVE_GAPS | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_ALLOW_EXTRA_TOWER_BASES | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor LiftRTD = SET_FIELD(Heights, { 255, 32, 3, 2, }), SET_FIELD(MaxMass, 15), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_lift), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLift), SET_FIELD(RatingsMultipliers, { 80, 10, 0 }), SET_FIELD(UpkeepCosts, { 50, 20, 0, 10, 0, 0 }), SET_FIELD(BuildCosts, { 19.50_GBP, 0.00_GBP, 4, }), diff --git a/src/openrct2/ride/transport/meta/MiniatureRailway.h b/src/openrct2/ride/transport/meta/MiniatureRailway.h index 3aea33fa56..c11aaa42a6 100644 --- a/src/openrct2/ride/transport/meta/MiniatureRailway.h +++ b/src/openrct2/ride/transport/meta/MiniatureRailway.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor MiniatureRailwayRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_miniature_railway), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMiniatureRailway), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_HAS_LARGE_CURVES | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor MiniatureRailwayRTD = SET_FIELD(Heights, { 7, 32, 5, 9, }), SET_FIELD(MaxMass, 39), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_miniature_railway), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMiniatureRailway), SET_FIELD(RatingsMultipliers, { 70, 6, -10 }), SET_FIELD(UpkeepCosts, { 60, 20, 0, 10, 3, 5 }), SET_FIELD(BuildCosts, { 17.50_GBP, 3.00_GBP, 50, }), diff --git a/src/openrct2/ride/transport/meta/Monorail.h b/src/openrct2/ride/transport/meta/Monorail.h index 082f3bf242..501e7a9217 100644 --- a/src/openrct2/ride/transport/meta/Monorail.h +++ b/src/openrct2/ride/transport/meta/Monorail.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor MonorailRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_monorail), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionMonorail), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_ADDITIONAL | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor MonorailRTD = SET_FIELD(Heights, { 8, 32, 8, 9, }), SET_FIELD(MaxMass, 78), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_monorail), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateMonorail), SET_FIELD(RatingsMultipliers, { 70, 6, -10 }), SET_FIELD(UpkeepCosts, { 65, 20, 0, 10, 3, 10 }), SET_FIELD(BuildCosts, { 21.00_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/transport/meta/SuspendedMonorail.h b/src/openrct2/ride/transport/meta/SuspendedMonorail.h index 64d4dbed0c..c64e96586d 100644 --- a/src/openrct2/ride/transport/meta/SuspendedMonorail.h +++ b/src/openrct2/ride/transport/meta/SuspendedMonorail.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor SuspendedMonorailRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_suspended_monorail), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSuspendedMonorail), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor SuspendedMonorailRTD = SET_FIELD(Heights, { 12, 40, 32, 8, }), SET_FIELD(MaxMass, 78), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_suspended_monorail), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSuspendedMonorail), SET_FIELD(RatingsMultipliers, { 70, 6, -10 }), SET_FIELD(UpkeepCosts, { 70, 20, 0, 10, 3, 10 }), SET_FIELD(BuildCosts, { 32.50_GBP, 2.50_GBP, 50, }), diff --git a/src/openrct2/ride/water/BoatHire.cpp b/src/openrct2/ride/water/BoatHire.cpp index f5ade9c22a..9e36eec516 100644 --- a/src/openrct2/ride/water/BoatHire.cpp +++ b/src/openrct2/ride/water/BoatHire.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ enum }; /** rct2: 0x008B0E40 */ -static void paint_boat_hire_track_flat( +static void PaintBoatHireTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -61,7 +61,7 @@ static void paint_boat_hire_track_flat( } /** rct2: 0x008B0E50 */ -static void paint_boat_hire_station( +static void PaintBoatHireStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -70,13 +70,13 @@ static void paint_boat_hire_station( if (direction & 1) { PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); - track_paint_util_draw_pier( + TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } else { PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - track_paint_util_draw_pier( + TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } @@ -85,7 +85,7 @@ static void paint_boat_hire_station( } /** rct2: 0x008B0E80 */ -static void paint_boat_hire_track_left_quarter_turn_1_tile( +static void PaintBoatHireTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -129,32 +129,32 @@ static void paint_boat_hire_track_left_quarter_turn_1_tile( } /** rct2: 0x008B0E90 */ -static void paint_boat_hire_track_right_quarter_turn_1_tile( +static void PaintBoatHireTrackRightQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_boat_hire_track_left_quarter_turn_1_tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + PaintBoatHireTrackLeftQuarterTurn1Tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } /** * rct2: 0x008B0D60 */ -TRACK_PAINT_FUNCTION get_track_paint_function_boat_hire(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionBoatHire(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_boat_hire_track_flat; + return PaintBoatHireTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_boat_hire_station; + return PaintBoatHireStation; case TrackElemType::LeftQuarterTurn1Tile: - return paint_boat_hire_track_left_quarter_turn_1_tile; + return PaintBoatHireTrackLeftQuarterTurn1Tile; case TrackElemType::RightQuarterTurn1Tile: - return paint_boat_hire_track_right_quarter_turn_1_tile; + return PaintBoatHireTrackRightQuarterTurn1Tile; } return nullptr; diff --git a/src/openrct2/ride/water/DingySlide.cpp b/src/openrct2/ride/water/DingySlide.cpp index 62b8170c70..029de212bd 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -348,7 +348,7 @@ enum SPR_DINGHY_SLIDE_S_BEND_COVERED_FRONT_SE_SW_SE_SEQ_3 = 20051, }; -static void dinghy_slide_track_flat( +static void DinghySlideTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -369,12 +369,12 @@ static void dinghy_slide_track_flat( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -386,7 +386,7 @@ static void dinghy_slide_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_station( +static void DinghySlideTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -399,7 +399,7 @@ static void dinghy_slide_track_station( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, - { 32, 20, 1 }, { 0, 6, height + 3 }); + { { 0, 6, height + 3 }, { 32, 20, 1 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); @@ -409,7 +409,7 @@ static void dinghy_slide_track_station( MetalASupportsPaintSetup( session, METAL_SUPPORTS_TUBES, 8 - (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_station(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -417,7 +417,7 @@ static void dinghy_slide_track_station( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_25_deg_up( +static void DinghySlideTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -438,12 +438,12 @@ static void dinghy_slide_track_25_deg_up( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 50 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 50 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -462,7 +462,7 @@ static void dinghy_slide_track_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void dinghy_slide_track_60_deg_up( +static void DinghySlideTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -474,12 +474,12 @@ static void dinghy_slide_track_60_deg_up( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -498,7 +498,7 @@ static void dinghy_slide_track_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -static void dinghy_slide_track_flat_to_25_deg_up( +static void DinghySlideTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -519,12 +519,12 @@ static void dinghy_slide_track_flat_to_25_deg_up( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 42 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -543,7 +543,7 @@ static void dinghy_slide_track_flat_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void dinghy_slide_track_25_deg_up_to_60_deg_up( +static void DinghySlideTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -555,12 +555,12 @@ static void dinghy_slide_track_25_deg_up_to_60_deg_up( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -579,7 +579,7 @@ static void dinghy_slide_track_25_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void dinghy_slide_track_60_deg_up_to_25_deg_up( +static void DinghySlideTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -591,12 +591,12 @@ static void dinghy_slide_track_60_deg_up_to_25_deg_up( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -615,7 +615,7 @@ static void dinghy_slide_track_60_deg_up_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void dinghy_slide_track_25_deg_up_to_flat( +static void DinghySlideTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -636,12 +636,12 @@ static void dinghy_slide_track_25_deg_up_to_flat( uint8_t isChained = trackElement.HasChain() ? 1 : 0; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[isChained][direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -660,42 +660,42 @@ static void dinghy_slide_track_25_deg_up_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void dinghy_slide_track_25_deg_down( +static void DinghySlideTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_60_deg_down( +static void DinghySlideTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_flat_to_25_deg_down( +static void DinghySlideTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_25_deg_down_to_60_deg_down( +static void DinghySlideTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_25_deg_down_to_flat( +static void DinghySlideTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_right_quarter_turn_5( +static void DinghySlideTrackRightQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -760,9 +760,9 @@ static void dinghy_slide_track_right_quarter_turn_5( }, }; - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], frontImageIds); switch (trackSequence) @@ -821,22 +821,22 @@ static void dinghy_slide_track_right_quarter_turn_5( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_left_quarter_turn_5( +static void DinghySlideTrackLeftQuarterTurn5( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - dinghy_slide_track_right_quarter_turn_5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + DinghySlideTrackRightQuarterTurn5(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void dinghy_slide_track_60_deg_down_to_25_deg_down( +static void DinghySlideTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_s_bend_left( +static void DinghySlideTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -874,18 +874,18 @@ static void dinghy_slide_track_s_bend_left( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break; case 1: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 0 || direction == 1) { MetalASupportsPaintSetup( @@ -899,9 +899,9 @@ static void dinghy_slide_track_s_bend_left( break; case 2: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 2 || direction == 3) { MetalASupportsPaintSetup( @@ -914,9 +914,9 @@ static void dinghy_slide_track_s_bend_left( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); @@ -941,7 +941,7 @@ static void dinghy_slide_track_s_bend_left( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_s_bend_right( +static void DinghySlideTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -979,18 +979,18 @@ static void dinghy_slide_track_s_bend_right( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break; case 1: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 0 || direction == 1) { MetalASupportsPaintSetup( @@ -1003,9 +1003,9 @@ static void dinghy_slide_track_s_bend_right( break; case 2: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 2 || direction == 3) { MetalASupportsPaintSetup( @@ -1017,9 +1017,9 @@ static void dinghy_slide_track_s_bend_right( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); @@ -1044,7 +1044,7 @@ static void dinghy_slide_track_s_bend_right( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_right_quarter_turn_3( +static void DinghySlideTrackRightQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1093,11 +1093,11 @@ static void dinghy_slide_track_right_quarter_turn_3( }, }; - track_paint_util_right_quarter_turn_3_tiles_paint_3( + TrackPaintUtilRightQuarterTurn3TilesPaint3( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_3_tiles_paint_3( + TrackPaintUtilRightQuarterTurn3TilesPaint3( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], frontImageIds); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); switch (trackSequence) { @@ -1125,15 +1125,15 @@ static void dinghy_slide_track_right_quarter_turn_3( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_left_quarter_turn_3( +static void DinghySlideTrackLeftQuarterTurn3( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - dinghy_slide_track_right_quarter_turn_3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + DinghySlideTrackRightQuarterTurn3(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void dinghy_slide_track_flat_covered( +static void DinghySlideTrackFlatCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1145,12 +1145,12 @@ static void dinghy_slide_track_flat_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1162,7 +1162,7 @@ static void dinghy_slide_track_flat_covered( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_25_deg_up_covered( +static void DinghySlideTrack25DegUpCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1174,12 +1174,12 @@ static void dinghy_slide_track_25_deg_up_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 50 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 50 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1198,7 +1198,7 @@ static void dinghy_slide_track_25_deg_up_covered( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void dinghy_slide_track_60_deg_up_covered( +static void DinghySlideTrack60DegUpCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1210,12 +1210,12 @@ static void dinghy_slide_track_60_deg_up_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 32, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1234,7 +1234,7 @@ static void dinghy_slide_track_60_deg_up_covered( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -static void dinghy_slide_track_flat_to_25_deg_up_covered( +static void DinghySlideTrackFlatTo25DegUpCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1246,12 +1246,12 @@ static void dinghy_slide_track_flat_to_25_deg_up_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 42 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1270,7 +1270,7 @@ static void dinghy_slide_track_flat_to_25_deg_up_covered( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void dinghy_slide_track_25_deg_up_to_60_deg_up_covered( +static void DinghySlideTrack25DegUpTo60DegUpCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1282,12 +1282,12 @@ static void dinghy_slide_track_25_deg_up_to_60_deg_up_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 12, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1306,7 +1306,7 @@ static void dinghy_slide_track_25_deg_up_to_60_deg_up_covered( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void dinghy_slide_track_60_deg_up_to_25_deg_up_covered( +static void DinghySlideTrack60DegUpTo25DegUpCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1318,12 +1318,12 @@ static void dinghy_slide_track_60_deg_up_to_25_deg_up_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 20, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1342,7 +1342,7 @@ static void dinghy_slide_track_60_deg_up_to_25_deg_up_covered( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void dinghy_slide_track_25_deg_up_to_flat_covered( +static void DinghySlideTrack25DegUpToFlatCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1354,12 +1354,12 @@ static void dinghy_slide_track_25_deg_up_to_flat_covered( }; auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 34 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -1378,42 +1378,42 @@ static void dinghy_slide_track_25_deg_up_to_flat_covered( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void dinghy_slide_track_25_deg_down_covered( +static void DinghySlideTrack25DegDownCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_25_deg_up_covered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack25DegUpCovered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_60_deg_down_covered( +static void DinghySlideTrack60DegDownCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_60_deg_up_covered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack60DegUpCovered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_flat_to_25_deg_down_covered( +static void DinghySlideTrackFlatTo25DegDownCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_25_deg_up_to_flat_covered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack25DegUpToFlatCovered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_25_deg_down_to_60_deg_down_covered( +static void DinghySlideTrack25DegDownTo60DegDownCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_60_deg_up_to_25_deg_up_covered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack60DegUpTo25DegUpCovered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_25_deg_down_to_flat_covered( +static void DinghySlideTrack25DegDownToFlatCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_flat_to_25_deg_up_covered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrackFlatTo25DegUpCovered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void dinghy_slide_track_right_quarter_turn_5_covered( +static void DinghySlideTrackRightQuarterTurn5Covered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1478,9 +1478,9 @@ static void dinghy_slide_track_right_quarter_turn_5_covered( }, }; - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], frontImageIds); switch (trackSequence) @@ -1539,15 +1539,15 @@ static void dinghy_slide_track_right_quarter_turn_5_covered( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_left_quarter_turn_5_covered( +static void DinghySlideTrackLeftQuarterTurn5Covered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; - dinghy_slide_track_right_quarter_turn_5_covered(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + DinghySlideTrackRightQuarterTurn5Covered(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void dinghy_slide_track_s_bend_left_covered( +static void DinghySlideTrackSBendLeftCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1585,18 +1585,18 @@ static void dinghy_slide_track_s_bend_left_covered( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break; case 1: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 0 || direction == 1) { MetalASupportsPaintSetup( @@ -1610,9 +1610,9 @@ static void dinghy_slide_track_s_bend_left_covered( break; case 2: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 2 || direction == 3) { MetalASupportsPaintSetup( @@ -1625,9 +1625,9 @@ static void dinghy_slide_track_s_bend_left_covered( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); @@ -1652,7 +1652,7 @@ static void dinghy_slide_track_s_bend_left_covered( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_s_bend_right_covered( +static void DinghySlideTrackSBendRightCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1690,18 +1690,18 @@ static void dinghy_slide_track_s_bend_right_covered( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break; case 1: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 0 || direction == 1) { MetalASupportsPaintSetup( @@ -1714,9 +1714,9 @@ static void dinghy_slide_track_s_bend_right_covered( break; case 2: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 2 || direction == 3) { MetalASupportsPaintSetup( @@ -1728,9 +1728,9 @@ static void dinghy_slide_track_s_bend_right_covered( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_TUBES, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); @@ -1755,7 +1755,7 @@ static void dinghy_slide_track_s_bend_right_covered( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_right_quarter_turn_3_covered( +static void DinghySlideTrackRightQuarterTurn3Covered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1804,11 +1804,11 @@ static void dinghy_slide_track_right_quarter_turn_3_covered( }, }; - track_paint_util_right_quarter_turn_3_tiles_paint_3( + TrackPaintUtilRightQuarterTurn3TilesPaint3( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_3_tiles_paint_3( + TrackPaintUtilRightQuarterTurn3TilesPaint3( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], frontImageIds); - track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_0); + TrackPaintUtilRightQuarterTurn3TilesTunnel(session, height, direction, trackSequence, TUNNEL_0); switch (trackSequence) { @@ -1836,105 +1836,105 @@ static void dinghy_slide_track_right_quarter_turn_3_covered( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void dinghy_slide_track_left_quarter_turn_3_covered( +static void DinghySlideTrackLeftQuarterTurn3Covered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; - dinghy_slide_track_right_quarter_turn_3_covered(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + DinghySlideTrackRightQuarterTurn3Covered(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void dinghy_slide_track_60_deg_down_to_25_deg_down_covered( +static void DinghySlideTrack60DegDownTo25DegDownCovered( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - dinghy_slide_track_25_deg_up_to_60_deg_up_covered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + DinghySlideTrack25DegUpTo60DegUpCovered(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionDinghySlide(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return dinghy_slide_track_flat; + return DinghySlideTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return dinghy_slide_track_station; + return DinghySlideTrackStation; case TrackElemType::Up25: - return dinghy_slide_track_25_deg_up; + return DinghySlideTrack25DegUp; case TrackElemType::Up60: - return dinghy_slide_track_60_deg_up; + return DinghySlideTrack60DegUp; case TrackElemType::FlatToUp25: - return dinghy_slide_track_flat_to_25_deg_up; + return DinghySlideTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return dinghy_slide_track_25_deg_up_to_60_deg_up; + return DinghySlideTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return dinghy_slide_track_60_deg_up_to_25_deg_up; + return DinghySlideTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return dinghy_slide_track_25_deg_up_to_flat; + return DinghySlideTrack25DegUpToFlat; case TrackElemType::Down25: - return dinghy_slide_track_25_deg_down; + return DinghySlideTrack25DegDown; case TrackElemType::Down60: - return dinghy_slide_track_60_deg_down; + return DinghySlideTrack60DegDown; case TrackElemType::FlatToDown25: - return dinghy_slide_track_flat_to_25_deg_down; + return DinghySlideTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return dinghy_slide_track_25_deg_down_to_60_deg_down; + return DinghySlideTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return dinghy_slide_track_60_deg_down_to_25_deg_down; + return DinghySlideTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return dinghy_slide_track_25_deg_down_to_flat; + return DinghySlideTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn5Tiles: - return dinghy_slide_track_left_quarter_turn_5; + return DinghySlideTrackLeftQuarterTurn5; case TrackElemType::RightQuarterTurn5Tiles: - return dinghy_slide_track_right_quarter_turn_5; + return DinghySlideTrackRightQuarterTurn5; case TrackElemType::SBendLeft: - return dinghy_slide_track_s_bend_left; + return DinghySlideTrackSBendLeft; case TrackElemType::SBendRight: - return dinghy_slide_track_s_bend_right; + return DinghySlideTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return dinghy_slide_track_left_quarter_turn_3; + return DinghySlideTrackLeftQuarterTurn3; case TrackElemType::RightQuarterTurn3Tiles: - return dinghy_slide_track_right_quarter_turn_3; + return DinghySlideTrackRightQuarterTurn3; case TrackElemType::FlatCovered: - return dinghy_slide_track_flat_covered; + return DinghySlideTrackFlatCovered; case TrackElemType::Up25Covered: - return dinghy_slide_track_25_deg_up_covered; + return DinghySlideTrack25DegUpCovered; case TrackElemType::Up60Covered: - return dinghy_slide_track_60_deg_up_covered; + return DinghySlideTrack60DegUpCovered; case TrackElemType::FlatToUp25Covered: - return dinghy_slide_track_flat_to_25_deg_up_covered; + return DinghySlideTrackFlatTo25DegUpCovered; case TrackElemType::Up25ToUp60Covered: - return dinghy_slide_track_25_deg_up_to_60_deg_up_covered; + return DinghySlideTrack25DegUpTo60DegUpCovered; case TrackElemType::Up60ToUp25Covered: - return dinghy_slide_track_60_deg_up_to_25_deg_up_covered; + return DinghySlideTrack60DegUpTo25DegUpCovered; case TrackElemType::Up25ToFlatCovered: - return dinghy_slide_track_25_deg_up_to_flat_covered; + return DinghySlideTrack25DegUpToFlatCovered; case TrackElemType::Down25Covered: - return dinghy_slide_track_25_deg_down_covered; + return DinghySlideTrack25DegDownCovered; case TrackElemType::Down60Covered: - return dinghy_slide_track_60_deg_down_covered; + return DinghySlideTrack60DegDownCovered; case TrackElemType::FlatToDown25Covered: - return dinghy_slide_track_flat_to_25_deg_down_covered; + return DinghySlideTrackFlatTo25DegDownCovered; case TrackElemType::Down25ToDown60Covered: - return dinghy_slide_track_25_deg_down_to_60_deg_down_covered; + return DinghySlideTrack25DegDownTo60DegDownCovered; case TrackElemType::Down60ToDown25Covered: - return dinghy_slide_track_60_deg_down_to_25_deg_down_covered; + return DinghySlideTrack60DegDownTo25DegDownCovered; case TrackElemType::Down25ToFlatCovered: - return dinghy_slide_track_25_deg_down_to_flat_covered; + return DinghySlideTrack25DegDownToFlatCovered; case TrackElemType::LeftQuarterTurn5TilesCovered: - return dinghy_slide_track_left_quarter_turn_5_covered; + return DinghySlideTrackLeftQuarterTurn5Covered; case TrackElemType::RightQuarterTurn5TilesCovered: - return dinghy_slide_track_right_quarter_turn_5_covered; + return DinghySlideTrackRightQuarterTurn5Covered; case TrackElemType::SBendLeftCovered: - return dinghy_slide_track_s_bend_left_covered; + return DinghySlideTrackSBendLeftCovered; case TrackElemType::SBendRightCovered: - return dinghy_slide_track_s_bend_right_covered; + return DinghySlideTrackSBendRightCovered; case TrackElemType::LeftQuarterTurn3TilesCovered: - return dinghy_slide_track_left_quarter_turn_3_covered; + return DinghySlideTrackLeftQuarterTurn3Covered; case TrackElemType::RightQuarterTurn3TilesCovered: - return dinghy_slide_track_right_quarter_turn_3_covered; + return DinghySlideTrackRightQuarterTurn3Covered; } return nullptr; diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index 5e9a31814b..2c172c72e2 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -161,17 +161,17 @@ static constexpr const uint32_t LogFlumeTrackFlatImageIds[4][2] = { { SPR_LOG_FLUME_FLAT_SE_NW, SPR_LOG_FLUME_FLAT_FRONT_SE_NW }, }; -static void paint_log_flume_track_flat( +static void PaintLogFlumeTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + 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 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -182,12 +182,12 @@ static void paint_log_flume_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_log_flume_track_station( +static void PaintLogFlumeTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); if (direction & 1) { @@ -210,7 +210,7 @@ static void paint_log_flume_track_station( MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); } - track_paint_util_draw_station_3(session, ride, direction, height + 2, height, trackElement); + TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); // Covers shouldn't be offset by +2 PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -219,7 +219,7 @@ static void paint_log_flume_track_station( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_log_flume_track_25_deg_up( +static void PaintLogFlumeTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -233,10 +233,10 @@ static void paint_log_flume_track_25_deg_up( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 50 }, { 0, 27, height }); + 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, 50 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -254,7 +254,7 @@ static void paint_log_flume_track_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void paint_log_flume_track_flat_to_25_deg_up( +static void PaintLogFlumeTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -268,10 +268,10 @@ static void paint_log_flume_track_flat_to_25_deg_up( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height }); + 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, 42 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -289,7 +289,7 @@ static void paint_log_flume_track_flat_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void paint_log_flume_track_25_deg_up_to_flat( +static void PaintLogFlumeTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -303,10 +303,10 @@ static void paint_log_flume_track_25_deg_up_to_flat( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + 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, 34 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -324,7 +324,7 @@ static void paint_log_flume_track_25_deg_up_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void paint_log_flume_track_25_deg_down( +static void PaintLogFlumeTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -338,10 +338,10 @@ static void paint_log_flume_track_25_deg_down( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 50 }, { 0, 27, height }); + 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, 50 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -359,7 +359,7 @@ static void paint_log_flume_track_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void paint_log_flume_track_flat_to_25_deg_down( +static void PaintLogFlumeTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -373,10 +373,10 @@ static void paint_log_flume_track_flat_to_25_deg_down( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + 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, 34 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 6, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -394,7 +394,7 @@ static void paint_log_flume_track_flat_to_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void paint_log_flume_track_25_deg_down_to_flat( +static void PaintLogFlumeTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -408,10 +408,10 @@ static void paint_log_flume_track_25_deg_down_to_flat( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height }); + 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, 42 } }); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 3, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -429,7 +429,7 @@ static void paint_log_flume_track_25_deg_down_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void paint_log_flume_track_s_bend_left( +static void PaintLogFlumeTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -467,18 +467,18 @@ static void paint_log_flume_track_s_bend_left( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break; case 1: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 0 || direction == 1) { MetalASupportsPaintSetup( @@ -492,9 +492,9 @@ static void paint_log_flume_track_s_bend_left( break; case 2: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 2 || direction == 3) { MetalASupportsPaintSetup( @@ -507,9 +507,9 @@ static void paint_log_flume_track_s_bend_left( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); @@ -534,7 +534,7 @@ static void paint_log_flume_track_s_bend_left( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_log_flume_track_s_bend_right( +static void PaintLogFlumeTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -572,18 +572,18 @@ static void paint_log_flume_track_s_bend_right( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break; case 1: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 0 || direction == 1) { MetalASupportsPaintSetup( @@ -596,9 +596,9 @@ static void paint_log_flume_track_s_bend_right( break; case 2: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); if (direction == 2 || direction == 3) { MetalASupportsPaintSetup( @@ -610,9 +610,9 @@ static void paint_log_flume_track_s_bend_right( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); @@ -637,7 +637,7 @@ static void paint_log_flume_track_s_bend_right( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_log_flume_track_left_quarter_turn_3_tiles( +static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -671,9 +671,9 @@ static void paint_log_flume_track_left_quarter_turn_3_tiles( }, }; - track_paint_util_left_quarter_turn_3_tiles_paint( + TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 2, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset( + TrackPaintUtilLeftQuarterTurn3TilesPaintWithHeightOffset( session, 0, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIdsFront, 27); if (trackSequence != 1 && trackSequence != 2) @@ -716,7 +716,7 @@ static void paint_log_flume_track_left_quarter_turn_3_tiles( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_log_flume_track_right_quarter_turn_3_tiles( +static void PaintLogFlumeTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -750,9 +750,9 @@ static void paint_log_flume_track_right_quarter_turn_3_tiles( }, }; - track_paint_util_right_quarter_turn_3_tiles_paint_2( + TrackPaintUtilRightQuarterTurn3TilesPaint2( session, 2, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIds); - track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset( + TrackPaintUtilRightQuarterTurn3TilesPaint2WithHeightOffset( session, 0, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], imageIdsFront, 27); if (trackSequence != 1 && trackSequence != 2) @@ -795,7 +795,7 @@ static void paint_log_flume_track_right_quarter_turn_3_tiles( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_log_flume_track_on_ride_photo( +static void PaintLogFlumeTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -813,19 +813,19 @@ static void paint_log_flume_track_on_ride_photo( } auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][0]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height + 3 }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 21 }, { 0, 27, height + 5 }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height + 5 }, { 32, 1, 21 } }); - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void paint_log_flume_track_reverser( +static void PaintLogFlumeTrackReverser( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -839,8 +839,8 @@ static void paint_log_flume_track_reverser( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + 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, METAL_SUPPORTS_BOXED, 4, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -852,7 +852,7 @@ static void paint_log_flume_track_reverser( // Steep Additions added by OpenRCT2 -static void log_flume_track_25_down_60( +static void LogFlumeTrack25Down60( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -866,12 +866,12 @@ static void log_flume_track_25_down_60( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height + 4 }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height + 4 }, { 32, 1, 42 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 0 } }); if (direction == 1 || direction == 2) { - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -880,7 +880,7 @@ static void log_flume_track_25_down_60( } else { - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height + 12, session.TrackColours[SCHEME_SUPPORTS]); } @@ -892,7 +892,7 @@ static void log_flume_track_25_down_60( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void log_flume_track_60_down( +static void LogFlumeTrack60Down( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -906,12 +906,12 @@ static void log_flume_track_60_down( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height + 4 }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height + 4 }, { 32, 1, 98 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); if (direction == 1 || direction == 2) { - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -920,7 +920,7 @@ static void log_flume_track_60_down( } else { - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height + 12, session.TrackColours[SCHEME_SUPPORTS]); } @@ -932,7 +932,7 @@ static void log_flume_track_60_down( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void log_flume_track_60_down_25( +static void LogFlumeTrack60Down25( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -946,14 +946,14 @@ static void log_flume_track_60_down_25( auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][1]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height + 4 }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 20, 0 }, { 0, 6, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 27, height + 4 }, { 32, 1, 42 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 0 } }); if (direction == 1 || direction == 2) { PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_1); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height, session.TrackColours[SCHEME_SUPPORTS]); } @@ -962,7 +962,7 @@ static void log_flume_track_60_down_25( { PaintUtilPushTunnelRotated(session, direction, height + 24, TUNNEL_SQUARE_FLAT); - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 4, 8, height + 8, session.TrackColours[SCHEME_SUPPORTS]); } @@ -972,49 +972,49 @@ static void log_flume_track_60_down_25( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionLogFlume(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_log_flume_track_flat; + return PaintLogFlumeTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_log_flume_track_station; + return PaintLogFlumeTrackStation; case TrackElemType::Up25: - return paint_log_flume_track_25_deg_up; + return PaintLogFlumeTrack25DegUp; case TrackElemType::FlatToUp25: - return paint_log_flume_track_flat_to_25_deg_up; + return PaintLogFlumeTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_log_flume_track_25_deg_up_to_flat; + return PaintLogFlumeTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_log_flume_track_25_deg_down; + return PaintLogFlumeTrack25DegDown; case TrackElemType::FlatToDown25: - return paint_log_flume_track_flat_to_25_deg_down; + return PaintLogFlumeTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_log_flume_track_25_deg_down_to_flat; + return PaintLogFlumeTrack25DegDownToFlat; case TrackElemType::SBendLeft: - return paint_log_flume_track_s_bend_left; + return PaintLogFlumeTrackSBendLeft; case TrackElemType::SBendRight: - return paint_log_flume_track_s_bend_right; + return PaintLogFlumeTrackSBendRight; case TrackElemType::LeftQuarterTurn3Tiles: - return paint_log_flume_track_left_quarter_turn_3_tiles; + return PaintLogFlumeTrackLeftQuarterTurn3Tiles; case TrackElemType::RightQuarterTurn3Tiles: - return paint_log_flume_track_right_quarter_turn_3_tiles; + return PaintLogFlumeTrackRightQuarterTurn3Tiles; case TrackElemType::OnRidePhoto: - return paint_log_flume_track_on_ride_photo; + return PaintLogFlumeTrackOnRidePhoto; case TrackElemType::LogFlumeReverser: - return paint_log_flume_track_reverser; + return PaintLogFlumeTrackReverser; // Added by OpenRCT2 case TrackElemType::Down25ToDown60: - return log_flume_track_25_down_60; + return LogFlumeTrack25Down60; case TrackElemType::Down60: - return log_flume_track_60_down; + return LogFlumeTrack60Down; case TrackElemType::Down60ToDown25: - return log_flume_track_60_down_25; + return LogFlumeTrack60Down25; } return nullptr; diff --git a/src/openrct2/ride/water/RiverRapids.cpp b/src/openrct2/ride/water/RiverRapids.cpp index 96ca7f43d3..481f0852a8 100644 --- a/src/openrct2/ride/water/RiverRapids.cpp +++ b/src/openrct2/ride/water/RiverRapids.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,7 +21,7 @@ #ifndef NO_VEHICLES // 0x0099279E: -static constexpr const vehicle_boundbox _riverRapidsBoundbox[] = { +static constexpr const VehicleBoundBox _riverRapidsBoundbox[] = { { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, { -13, -13, 1, 26, 26, 13 }, @@ -177,7 +177,7 @@ static constexpr const uint32_t river_rapids_track_pieces_25_deg_down_to_flat[][ * * rct2: 0x006D5889 */ -void vehicle_visual_river_rapids( +void VehicleVisualRiverRapids( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { @@ -263,12 +263,12 @@ void vehicle_visual_river_rapids( } } - vehicle_visual_splash_effect(session, z, vehicle, carEntry); + VehicleVisualSplashEffect(session, z, vehicle, carEntry); } #endif /** rct2: 0x00757650 */ -static void paint_river_rapids_track_flat( +static void PaintRiverRapidsTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -278,21 +278,21 @@ static void paint_river_rapids_track_flat( { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 2, 5 }, { 10, 10, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 10, 10, height }, { 1, 2, 5 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 2, 5 }, { 10, 10, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 10, 10, height }, { 1, 2, 5 } }); } WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -311,17 +311,16 @@ static void paint_river_rapids_track_flat( } /** rct2: 0x007576C0 */ -static void paint_river_rapids_station( +static void PaintRiverRapidsStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_flat(session, ride, trackSequence, direction, height, trackElement); - track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 12, trackElement); + PaintRiverRapidsTrackFlat(session, ride, trackSequence, direction, height, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 12, trackElement); PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_river_rapids_track_25_deg( - PaintSession& session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) +static void PaintRiverRapidsTrack25Deg(PaintSession& session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) { ImageId imageId; PaintStruct* ps; @@ -330,10 +329,10 @@ static void paint_river_rapids_track_25_deg( { case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 4 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 0, 9, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_7); @@ -341,11 +340,11 @@ static void paint_river_rapids_track_25_deg( case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 4 } }); session.WoodenSupportsPrependTo = ps; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 1, 10, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height + 8, TUNNEL_SQUARE_8); @@ -353,11 +352,11 @@ static void paint_river_rapids_track_25_deg( case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 4 } }); session.WoodenSupportsPrependTo = ps; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 34 } }); WoodenASupportsPaintSetup(session, 0, 11, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_SQUARE_8); @@ -365,10 +364,10 @@ static void paint_river_rapids_track_25_deg( case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 4 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 34 } }); WoodenASupportsPaintSetup(session, 1, 12, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_7); @@ -379,7 +378,7 @@ static void paint_river_rapids_track_25_deg( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void paint_river_rapids_track_25_deg_to_flat_a( +static void PaintRiverRapidsTrack25DegToFlatA( PaintSession& session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) { ImageId imageId; @@ -389,10 +388,10 @@ static void paint_river_rapids_track_25_deg_to_flat_a( { case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 4 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 18 }, { 0, 27, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 18 } }); WoodenASupportsPaintSetup(session, 0, 5, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height - 8, TUNNEL_SQUARE_FLAT); @@ -400,11 +399,11 @@ static void paint_river_rapids_track_25_deg_to_flat_a( case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 4 } }); session.WoodenSupportsPrependTo = ps; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 18 }, { 27, 0, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 18 } }); WoodenASupportsPaintSetup(session, 1, 6, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height + 8, TUNNEL_14); @@ -412,12 +411,12 @@ static void paint_river_rapids_track_25_deg_to_flat_a( case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 4 } }); session.WoodenSupportsPrependTo = ps; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 18 }, { 0, 27, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 18 } }); WoodenASupportsPaintSetup(session, 0, 7, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height + 8, TUNNEL_14); @@ -425,10 +424,10 @@ static void paint_river_rapids_track_25_deg_to_flat_a( case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 4 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 18 }, { 27, 0, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 18 } }); WoodenASupportsPaintSetup(session, 1, 8, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height - 8, TUNNEL_SQUARE_FLAT); @@ -439,7 +438,7 @@ static void paint_river_rapids_track_25_deg_to_flat_a( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void paint_river_rapids_track_25_deg_to_flat_b( +static void PaintRiverRapidsTrack25DegToFlatB( PaintSession& session, uint8_t direction, int32_t height, const uint32_t sprites[4][2]) { ImageId imageId; @@ -449,10 +448,10 @@ static void paint_river_rapids_track_25_deg_to_flat_b( { case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 1, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); @@ -460,11 +459,11 @@ static void paint_river_rapids_track_25_deg_to_flat_b( case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); session.WoodenSupportsPrependTo = ps; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 2, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_8); @@ -472,11 +471,11 @@ static void paint_river_rapids_track_25_deg_to_flat_b( case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 11 } }); session.WoodenSupportsPrependTo = ps; imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 16 }, { 32, 1, 26 } }); WoodenASupportsPaintSetup(session, 0, 3, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_8); @@ -484,10 +483,10 @@ static void paint_river_rapids_track_25_deg_to_flat_b( case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][0]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height + 16 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 16 }, { 1, 32, 26 } }); WoodenASupportsPaintSetup(session, 1, 4, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); @@ -499,57 +498,55 @@ static void paint_river_rapids_track_25_deg_to_flat_b( } /** rct2: 0x00757660 */ -static void paint_river_rapids_track_25_deg_up( +static void PaintRiverRapidsTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_25_deg(session, direction, height, river_rapids_track_pieces_25_deg_up); + PaintRiverRapidsTrack25Deg(session, direction, height, river_rapids_track_pieces_25_deg_up); } /** rct2: 0x00757670 */ -static void paint_river_rapids_track_flat_to_25_deg_up( +static void PaintRiverRapidsTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_25_deg_to_flat_b(session, direction, height, river_rapids_track_pieces_flat_to_25_deg_up); + PaintRiverRapidsTrack25DegToFlatB(session, direction, height, river_rapids_track_pieces_flat_to_25_deg_up); } /** rct2: 0x00757680 */ -static void paint_river_rapids_track_25_deg_up_to_flat( +static void PaintRiverRapidsTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_25_deg_to_flat_a(session, direction, height, river_rapids_track_pieces_25_deg_up_to_flat); + PaintRiverRapidsTrack25DegToFlatA(session, direction, height, river_rapids_track_pieces_25_deg_up_to_flat); } /** rct2: 0x00757690 */ -static void paint_river_rapids_track_25_deg_down( +static void PaintRiverRapidsTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_25_deg(session, (direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down); + PaintRiverRapidsTrack25Deg(session, (direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down); } /** rct2: 0x007576A0 */ -static void paint_river_rapids_track_flat_to_25_deg_down( +static void PaintRiverRapidsTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_25_deg_to_flat_a( - session, (direction + 2) % 4, height, river_rapids_track_pieces_flat_to_25_deg_down); + PaintRiverRapidsTrack25DegToFlatA(session, (direction + 2) % 4, height, river_rapids_track_pieces_flat_to_25_deg_down); } /** rct2: 0x007576B0 */ -static void paint_river_rapids_track_25_deg_down_to_flat( +static void PaintRiverRapidsTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_25_deg_to_flat_b( - session, (direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down_to_flat); + PaintRiverRapidsTrack25DegToFlatB(session, (direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down_to_flat); } /** rct2: 0x007576F0 */ -static void paint_river_rapids_track_left_quarter_turn_1_tile( +static void PaintRiverRapidsTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -558,41 +555,41 @@ static void paint_river_rapids_track_left_quarter_turn_1_tile( { case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SW_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 26, 11 }, { 4, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 2, height }, { 28, 26, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 1, 7 }, { 28, 27, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 27, height }, { 2, 1, 7 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); break; case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 25, 25, 5 }, { 0, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 25, 25, 5 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 30, 7 }, { 27, 1, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 1, height }, { 1, 30, 7 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 1, 7 }, { 1, 27, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 27, height }, { 30, 1, 7 } }); break; case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NE_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 28, 11 }, { 2, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 4, height }, { 26, 28, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 2, 5 }, { 10, 10, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 10, 10, height }, { 1, 2, 5 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); break; case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 4, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 4, height }, { 28, 28, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 7 }, { 28, 28, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 28, height }, { 1, 1, 7 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); @@ -605,7 +602,7 @@ static void paint_river_rapids_track_left_quarter_turn_1_tile( } /** rct2: 0x00757700 */ -static void paint_river_rapids_track_right_quarter_turn_1_tile( +static void PaintRiverRapidsTrackRightQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -615,10 +612,10 @@ static void paint_river_rapids_track_right_quarter_turn_1_tile( { case 0: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 4, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 4, height }, { 28, 28, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 7 }, { 28, 28, height + 2 }); + 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); @@ -626,31 +623,31 @@ static void paint_river_rapids_track_right_quarter_turn_1_tile( case 1: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 26, 11 }, { 4, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 2, height }, { 28, 26, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 1, 7 }, { 28, 27, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 28, 27, height }, { 2, 1, 7 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); break; case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 0, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 28, 28, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 22, 7 }, { 27, 1, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 1, height }, { 1, 22, 7 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 22, 1, 7 }, { 1, 27, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 27, height }, { 22, 1, 7 } }); break; case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 28, 11 }, { 2, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 4, height }, { 26, 28, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 27, 2, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 2, height }, { 1, 28, 7 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); break; @@ -662,7 +659,7 @@ static void paint_river_rapids_track_right_quarter_turn_1_tile( } /** rct2: 0x00757710 */ -static void paint_river_rapids_track_waterfall( +static void PaintRiverRapidsTrackWaterfall( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -674,17 +671,17 @@ static void paint_river_rapids_track_waterfall( { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_BASE_NE_FRAME_0 + frameNum)); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_TOP_NE_FRAME_0 + frameNum)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 4, 0, height + 17 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height + 17 }, { 1, 32, 27 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 27, 0, height + 17 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 17 }, { 1, 32, 27 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_SIDE_SW_FRAME_0 + frameNum)); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 27, 0, height + 17 }, { 1, 32, 27 } }); @@ -732,7 +729,7 @@ static void paint_river_rapids_track_waterfall( } /** rct2: 0x00757720 */ -static void paint_river_rapids_track_rapids( +static void PaintRiverRapidsTrackRapids( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -743,18 +740,18 @@ static void paint_river_rapids_track_rapids( if (direction & 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_RAPIDS_NW_SE_FRAME_0 + frameNum)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RAPIDS_FRONT_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 27, 0, height + 17 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height + 17 }, { 1, 32, 11 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_RAPIDS_SW_NE_FRAME_0 + frameNum)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 4, height }, { 32, 24, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_RIVER_RAPIDS_RAPIDS_FRONT_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 27, height + 17 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height + 17 }, { 32, 1, 11 } }); } WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -773,17 +770,17 @@ static void paint_river_rapids_track_rapids( } /** rct2: 0x00757740 */ -static void paint_river_rapids_track_on_ride_photo( +static void PaintRiverRapidsTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_river_rapids_track_flat(session, ride, trackSequence, direction, height, trackElement); - track_paint_util_onride_photo_paint(session, direction, height + 13, trackElement); + PaintRiverRapidsTrackFlat(session, ride, trackSequence, direction, height, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 13, trackElement); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } /** rct2: 0x */ -static void paint_river_rapids_track_whirlpool( +static void PaintRiverRapidsTrackWhirlpool( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -846,48 +843,48 @@ static void paint_river_rapids_track_whirlpool( /** * rct2: 0x0075745C **/ -TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionRiverRapids(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return paint_river_rapids_track_flat; + return PaintRiverRapidsTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_river_rapids_station; + return PaintRiverRapidsStation; case TrackElemType::Up25: - return paint_river_rapids_track_25_deg_up; + return PaintRiverRapidsTrack25DegUp; case TrackElemType::FlatToUp25: - return paint_river_rapids_track_flat_to_25_deg_up; + return PaintRiverRapidsTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_river_rapids_track_25_deg_up_to_flat; + return PaintRiverRapidsTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_river_rapids_track_25_deg_down; + return PaintRiverRapidsTrack25DegDown; case TrackElemType::FlatToDown25: - return paint_river_rapids_track_flat_to_25_deg_down; + return PaintRiverRapidsTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_river_rapids_track_25_deg_down_to_flat; + return PaintRiverRapidsTrack25DegDownToFlat; case TrackElemType::LeftQuarterTurn1Tile: - return paint_river_rapids_track_left_quarter_turn_1_tile; + return PaintRiverRapidsTrackLeftQuarterTurn1Tile; case TrackElemType::RightQuarterTurn1Tile: - return paint_river_rapids_track_right_quarter_turn_1_tile; + return PaintRiverRapidsTrackRightQuarterTurn1Tile; case TrackElemType::Waterfall: - return paint_river_rapids_track_waterfall; + return PaintRiverRapidsTrackWaterfall; case TrackElemType::Rapids: - return paint_river_rapids_track_rapids; + return PaintRiverRapidsTrackRapids; case TrackElemType::OnRidePhoto: - return paint_river_rapids_track_on_ride_photo; + return PaintRiverRapidsTrackOnRidePhoto; case TrackElemType::Whirlpool: - return paint_river_rapids_track_whirlpool; + return PaintRiverRapidsTrackWhirlpool; } return nullptr; diff --git a/src/openrct2/ride/water/SplashBoats.cpp b/src/openrct2/ride/water/SplashBoats.cpp index cd288d0dab..b0f96474c7 100644 --- a/src/openrct2/ride/water/SplashBoats.cpp +++ b/src/openrct2/ride/water/SplashBoats.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -474,15 +474,15 @@ static constexpr const SpriteBb RiverRaftsRightQuarterTurn5_Side[4][5] = { }, }; -static void paint_splash_boats_track_25_deg_up( +static void PaintSplashBoatsTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegUpImageId[direction]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegUpFrontImageId[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 50 }, { 0, 27, height }); + 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, 50 } }); WoodenASupportsPaintSetup(session, (direction & 1), 9 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -498,7 +498,7 @@ static void paint_splash_boats_track_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void paint_splash_boats_track_60_deg_up( +static void PaintSplashBoatsTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -506,8 +506,8 @@ static void paint_splash_boats_track_60_deg_up( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats60DegUpFrontImageId[direction]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height }); + session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 98 } }); WoodenASupportsPaintSetup(session, (direction & 1), 21 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -523,15 +523,15 @@ static void paint_splash_boats_track_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 104, 0x20); } -static void paint_splash_boats_track_flat_to_25_deg_up( +static void PaintSplashBoatsTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoatsFlatTo25DegUpImageId[direction]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoatsFlatTo25DegUpFrontImageId[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height }); + 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, 42 } }); WoodenASupportsPaintSetup(session, (direction & 1), 1 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -547,15 +547,15 @@ static void paint_splash_boats_track_flat_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -static void paint_splash_boats_track_25_deg_up_to_flat( +static void PaintSplashBoatsTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegUpToFlatImageId[direction]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegUpToFlatFrontImageId[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + 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, 34 } }); WoodenASupportsPaintSetup(session, (direction & 1), 5 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -571,7 +571,7 @@ static void paint_splash_boats_track_25_deg_up_to_flat( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void paint_splash_boats_track_25_deg_up_to_60_deg_up( +static void PaintSplashBoatsTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -579,8 +579,8 @@ static void paint_splash_boats_track_25_deg_up_to_60_deg_up( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegUpTo60DegUpFrontImageId[direction]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, (direction & 1), 13 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -596,7 +596,7 @@ static void paint_splash_boats_track_25_deg_up_to_60_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void paint_splash_boats_track_60_deg_up_to_25_deg_up( +static void PaintSplashBoatsTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -604,8 +604,8 @@ static void paint_splash_boats_track_60_deg_up_to_25_deg_up( auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats60DegUpTo25DegUpFrontImageId[direction]); session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height }); + session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 66 } }); WoodenASupportsPaintSetup(session, (direction & 1), 17 + direction, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -621,15 +621,15 @@ static void paint_splash_boats_track_60_deg_up_to_25_deg_up( PaintUtilSetGeneralSupportHeight(session, height + 72, 0x20); } -static void paint_splash_boats_track_25_deg_down( +static void PaintSplashBoatsTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegDownImageId[direction]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegDownFrontImageId[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 50 }, { 0, 27, height }); + 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, 50 } }); static constexpr const uint8_t specialSupport[] = { 11, 12, 9, 10 }; WoodenASupportsPaintSetup( @@ -647,22 +647,22 @@ static void paint_splash_boats_track_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 56, 0x20); } -static void paint_splash_boats_track_60_deg_down( +static void PaintSplashBoatsTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_splash_boats_track_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + PaintSplashBoatsTrack60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void paint_splash_boats_track_flat_to_25_deg_down( +static void PaintSplashBoatsTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoatsFlatTo25DegDownImageId[direction]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoatsFlatTo25DegDownFrontImageId[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height }); + 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, 34 } }); static constexpr const uint8_t specialSupport[] = { 7, 8, 5, 6 }; WoodenASupportsPaintSetup( @@ -680,29 +680,29 @@ static void paint_splash_boats_track_flat_to_25_deg_down( PaintUtilSetGeneralSupportHeight(session, height + 40, 0x20); } -static void paint_splash_boats_track_25_deg_down_to_60_deg_down( +static void PaintSplashBoatsTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_splash_boats_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + PaintSplashBoatsTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void paint_splash_boats_track_60_deg_down_to_25_deg_down( +static void PaintSplashBoatsTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - paint_splash_boats_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + PaintSplashBoatsTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void paint_splash_boats_track_25_deg_down_to_flat( +static void PaintSplashBoatsTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegDownToFlatImageId[direction]); auto frontImageId = session.TrackColours[SCHEME_TRACK].WithIndex(SplashBoats25DegDownToFlatFrontImageId[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); - PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { 32, 1, 42 }, { 0, 27, height }); + 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, 42 } }); static constexpr const uint8_t specialSupport[] = { 3, 4, 1, 2 }; WoodenASupportsPaintSetup( @@ -722,7 +722,7 @@ static void paint_splash_boats_track_25_deg_down_to_flat( /** Start of elements originally from River Rafts */ /** rct2: 0x0089B170 */ -static void paint_splash_boats_track_flat( +static void PaintSplashBoatsTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -732,21 +732,21 @@ static void paint_splash_boats_track_flat( { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_SPLASH_BOATS_FLAT_SIDE_NW_SE : SPR_SPLASH_BOATS_FLAT_SIDE_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_SPLASH_BOATS_FLAT_SIDE_SW_NE : SPR_SPLASH_BOATS_FLAT_SIDE_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); } WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -765,7 +765,7 @@ static void paint_splash_boats_track_flat( } /** rct2: 0x0089B1A0 */ -static void paint_splash_boats_station( +static void PaintSplashBoatsStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -773,7 +773,7 @@ static void paint_splash_boats_station( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height + 3 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height + 3 }, { 20, 32, 1 } }); imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_NW_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); @@ -782,7 +782,7 @@ static void paint_splash_boats_station( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); imageId = session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_B_SW_NE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); @@ -790,7 +790,7 @@ static void paint_splash_boats_station( WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); - track_paint_util_draw_narrow_station_platform(session, ride, direction, height, 7, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 7, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -799,13 +799,13 @@ static void paint_splash_boats_station( } /** rct2: 0x0089B1D0 */ -static void paint_splash_boats_track_left_quarter_turn_5_tiles( +static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], RiverRaftsLeftQuarterTurn5_Top); - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], RiverRaftsLeftQuarterTurn5_Side); if (trackSequence != 1 && trackSequence != 4) @@ -878,13 +878,13 @@ static void paint_splash_boats_track_left_quarter_turn_5_tiles( } /** rct2: 0x0089B1D0 */ -static void paint_splash_boats_track_right_quarter_turn_5_tiles( +static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], RiverRaftsRightQuarterTurn5_Top); - track_paint_util_right_quarter_turn_5_tiles_paint_2( + TrackPaintUtilRightQuarterTurn5TilesPaint2( session, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], RiverRaftsRightQuarterTurn5_Side); if (trackSequence != 1 && trackSequence != 4) @@ -957,7 +957,7 @@ static void paint_splash_boats_track_right_quarter_turn_5_tiles( } /** rct2: 0x0089B180 */ -static void paint_splash_boats_track_s_bend_left( +static void PaintSplashBoatsTrackSBendLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -997,17 +997,17 @@ static void paint_splash_boats_track_s_bend_left( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); break; case 1: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, supportTypes1[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1018,9 +1018,9 @@ static void paint_splash_boats_track_s_bend_left( break; case 2: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, supportTypes2[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1030,9 +1030,9 @@ static void paint_splash_boats_track_s_bend_left( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); break; @@ -1057,7 +1057,7 @@ static void paint_splash_boats_track_s_bend_left( } /** rct2: 0x0089B190 */ -static void paint_splash_boats_track_s_bend_right( +static void PaintSplashBoatsTrackSBendRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1097,17 +1097,17 @@ static void paint_splash_boats_track_s_bend_right( switch (trackSequence) { case 0: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); break; case 1: bboy = (direction == 2 || direction == 3) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, supportTypes1[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1118,9 +1118,9 @@ static void paint_splash_boats_track_s_bend_right( break; case 2: bboy = (direction == 0 || direction == 1) ? 0 : 6; - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 26, 2 }, { 0, bboy, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, bboy, height }, { 32, 26, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 26, 0 }, { 0, bboy, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, bboy, height + 27 }, { 32, 26, 0 } }); WoodenASupportsPaintSetup(session, supportTypes2[direction], 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1130,9 +1130,9 @@ static void paint_splash_boats_track_s_bend_right( 0xFFFF, 0); break; case 3: - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height }); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); PaintAddImageAsParentRotated( - session, direction, frontImageId, { 0, 0, height }, { 32, 27, 0 }, { 0, 2, height + 27 }); + session, direction, frontImageId, { 0, 0, height }, { { 0, 2, height + 27 }, { 32, 27, 0 } }); WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); break; @@ -1156,7 +1156,7 @@ static void paint_splash_boats_track_s_bend_right( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void paint_splash_boats_track_on_ride_photo( +static void PaintSplashBoatsTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -1180,62 +1180,62 @@ static void paint_splash_boats_track_on_ride_photo( break; } - paint_splash_boats_track_flat(session, ride, trackSequence, direction, height, trackElement); + PaintSplashBoatsTrackFlat(session, ride, trackSequence, direction, height, trackElement); - track_paint_util_onride_photo_paint(session, direction, height + 3, trackElement); + TrackPaintUtilOnridePhotoPaint(session, direction, height + 3, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48, 0x20); } -TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSplashBoats(int32_t trackType) { switch (trackType) { case TrackElemType::Up25: - return paint_splash_boats_track_25_deg_up; + return PaintSplashBoatsTrack25DegUp; case TrackElemType::Up60: - return paint_splash_boats_track_60_deg_up; + return PaintSplashBoatsTrack60DegUp; case TrackElemType::FlatToUp25: - return paint_splash_boats_track_flat_to_25_deg_up; + return PaintSplashBoatsTrackFlatTo25DegUp; case TrackElemType::Up25ToUp60: - return paint_splash_boats_track_25_deg_up_to_60_deg_up; + return PaintSplashBoatsTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return paint_splash_boats_track_60_deg_up_to_25_deg_up; + return PaintSplashBoatsTrack60DegUpTo25DegUp; case TrackElemType::Up25ToFlat: - return paint_splash_boats_track_25_deg_up_to_flat; + return PaintSplashBoatsTrack25DegUpToFlat; case TrackElemType::Down25: - return paint_splash_boats_track_25_deg_down; + return PaintSplashBoatsTrack25DegDown; case TrackElemType::Down60: - return paint_splash_boats_track_60_deg_down; + return PaintSplashBoatsTrack60DegDown; case TrackElemType::FlatToDown25: - return paint_splash_boats_track_flat_to_25_deg_down; + return PaintSplashBoatsTrackFlatTo25DegDown; case TrackElemType::Down25ToDown60: - return paint_splash_boats_track_25_deg_down_to_60_deg_down; + return PaintSplashBoatsTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return paint_splash_boats_track_60_deg_down_to_25_deg_down; + return PaintSplashBoatsTrack60DegDownTo25DegDown; case TrackElemType::Down25ToFlat: - return paint_splash_boats_track_25_deg_down_to_flat; + return PaintSplashBoatsTrack25DegDownToFlat; // Originally taken from River Rafts case TrackElemType::Flat: - return paint_splash_boats_track_flat; + return PaintSplashBoatsTrackFlat; case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return paint_splash_boats_station; + return PaintSplashBoatsStation; case TrackElemType::LeftQuarterTurn5Tiles: - return paint_splash_boats_track_left_quarter_turn_5_tiles; + return PaintSplashBoatsTrackLeftQuarterTurn5Tiles; case TrackElemType::RightQuarterTurn5Tiles: - return paint_splash_boats_track_right_quarter_turn_5_tiles; + return PaintSplashBoatsTrackRightQuarterTurn5Tiles; case TrackElemType::SBendLeft: - return paint_splash_boats_track_s_bend_left; + return PaintSplashBoatsTrackSBendLeft; case TrackElemType::SBendRight: - return paint_splash_boats_track_s_bend_right; + return PaintSplashBoatsTrackSBendRight; // Added by OpenRCT2 case TrackElemType::OnRidePhoto: - return paint_splash_boats_track_on_ride_photo; + return PaintSplashBoatsTrackOnRidePhoto; } return nullptr; @@ -1246,7 +1246,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(int32_t trackType) * * rct2: 0x006D4295 */ -void vehicle_visual_splash_boats_or_water_coaster( +void VehicleVisualSplashBoatsOrWaterCoaster( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { diff --git a/src/openrct2/ride/water/SubmarineRide.cpp b/src/openrct2/ride/water/SubmarineRide.cpp index 5de1e66312..53c07b6727 100644 --- a/src/openrct2/ride/water/SubmarineRide.cpp +++ b/src/openrct2/ride/water/SubmarineRide.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -41,7 +41,7 @@ static uint32_t SubmarineVehicleGetBaseImageId(const Vehicle* vehicle, const Car * * rct2: 0x006D44D5 */ -void vehicle_visual_submarine( +void VehicleVisualSubmarine( PaintSession& session, int32_t x, int32_t imageDirection, int32_t y, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) { @@ -56,14 +56,15 @@ void vehicle_visual_submarine( const auto& bb = VehicleBoundboxes[carEntry->draw_order][OpenRCT2::Entity::Yaw::YawTo16(imageDirection)]; PaintAddImageAsParent( - session, imageId0, { 0, 0, z }, { bb.length_x, bb.length_y, bb.length_z }, - { bb.offset_x, bb.offset_y, bb.offset_z + z }); + session, imageId0, { 0, 0, z }, + { { bb.offset_x, bb.offset_y, bb.offset_z + z }, { bb.length_x, bb.length_y, bb.length_z } }); PaintAddImageAsParent( - session, imageId1, { 0, 0, z }, { bb.length_x, bb.length_y, 2 }, { bb.offset_x, bb.offset_y, bb.offset_z + z - 10 }); + session, imageId1, { 0, 0, z }, + { { bb.offset_x, bb.offset_y, bb.offset_z + z - 10 }, { bb.length_x, bb.length_y, 2 } }); assert(carEntry->effect_visual == 1); } -static void submarine_ride_paint_track_station( +static void SubmarineRidePaintTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -74,19 +75,19 @@ static void submarine_ride_paint_track_station( if (direction & 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 20, 32, 3 }, { 6, 0, heightLower }); + PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 6, 0, heightLower }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); - track_paint_util_draw_pier( + TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 32, 20, 3 }, { 0, 6, heightLower }); + PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 0, 6, heightLower }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); - track_paint_util_draw_pier( + TrackPaintUtilDrawPier( session, ride, stationObj, session.MapPosition, direction, height, trackElement, session.CurrentRotation); } @@ -94,7 +95,7 @@ static void submarine_ride_paint_track_station( PaintUtilSetGeneralSupportHeight(session, height + 32, 0x20); } -static void submarine_ride_paint_track_flat( +static void SubmarineRidePaintTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { @@ -104,17 +105,17 @@ static void submarine_ride_paint_track_flat( if (direction & 1) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); - PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 20, 32, 3 }, { 6, 0, heightLower }); + PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 6, 0, heightLower }, { 20, 32, 3 } }); PaintUtilPushTunnelRight(session, heightLower, TUNNEL_0); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); - PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 32, 20, 3 }, { 0, 6, heightLower }); + PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { { 0, 6, heightLower }, { 32, 20, 3 } }); PaintUtilPushTunnelLeft(session, heightLower, TUNNEL_0); } - if (track_paint_util_should_paint_supports(session.MapPosition)) + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { MetalASupportsPaintSetup( session, (direction & 1) ? METAL_SUPPORTS_STICK_ALT : METAL_SUPPORTS_STICK, 4, -1, heightLower, @@ -126,14 +127,14 @@ static void submarine_ride_paint_track_flat( PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); } -static void submarine_ride_paint_track_left_quarter_turn_3_tiles( +static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_3_tiles_paint( + TrackPaintUtilLeftQuarterTurn3TilesPaint( session, 3, height - 16, direction, trackSequence, session.TrackColours[SCHEME_TRACK], trackSpritesSubmarineRideMiniHelicoptersQuarterTurn3Tiles); - track_paint_util_left_quarter_turn_3_tiles_tunnel(session, height - 16, TUNNEL_0, direction, trackSequence); + TrackPaintUtilLeftQuarterTurn3TilesTunnel(session, height - 16, TUNNEL_0, direction, trackSequence); switch (trackSequence) { @@ -162,61 +163,59 @@ static constexpr const uint8_t submarine_ride_right_quarter_turn_3_tiles_to_left 2, 0, }; -static void submarine_ride_paint_track_right_quarter_turn_3_tiles( +static void SubmarineRidePaintTrackRightQuarterTurn3Tiles( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = submarine_ride_right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; - submarine_ride_paint_track_left_quarter_turn_3_tiles( - session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + SubmarineRidePaintTrackLeftQuarterTurn3Tiles(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } -static void submarine_ride_paint_track_left_quarter_turn_1_tile( +static void SubmarineRidePaintTrackLeftQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - track_paint_util_left_quarter_turn_1_tile_paint( + TrackPaintUtilLeftQuarterTurn1TilePaint( session, 1, height - 16, 0, direction, session.TrackColours[SCHEME_TRACK], trackSpritesSubmarineRideMiniHelicoptersQuarterTurn1Tile); - track_paint_util_left_quarter_turn_1_tile_tunnel(session, direction, height - 16, 0, TUNNEL_0, 0, TUNNEL_0); + TrackPaintUtilLeftQuarterTurn1TileTunnel(session, direction, height - 16, 0, TUNNEL_0, 0, TUNNEL_0); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments(SEGMENT_B8 | SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0, direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 16, 0x20); } -static void submarine_ride_paint_track_right_quarter_turn_1_tile( +static void SubmarineRidePaintTrackRightQuarterTurn1Tile( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - submarine_ride_paint_track_left_quarter_turn_1_tile( - session, ride, trackSequence, (direction + 3) % 4, height, trackElement); + SubmarineRidePaintTrackLeftQuarterTurn1Tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement); } /** * rct2: 0x008995D4 */ -TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionSubmarineRide(int32_t trackType) { switch (trackType) { case TrackElemType::BeginStation: case TrackElemType::MiddleStation: case TrackElemType::EndStation: - return submarine_ride_paint_track_station; + return SubmarineRidePaintTrackStation; case TrackElemType::Flat: - return submarine_ride_paint_track_flat; + return SubmarineRidePaintTrackFlat; case TrackElemType::LeftQuarterTurn3Tiles: - return submarine_ride_paint_track_left_quarter_turn_3_tiles; + return SubmarineRidePaintTrackLeftQuarterTurn3Tiles; case TrackElemType::RightQuarterTurn3Tiles: - return submarine_ride_paint_track_right_quarter_turn_3_tiles; + return SubmarineRidePaintTrackRightQuarterTurn3Tiles; case TrackElemType::LeftQuarterTurn1Tile: - return submarine_ride_paint_track_left_quarter_turn_1_tile; + return SubmarineRidePaintTrackLeftQuarterTurn1Tile; case TrackElemType::RightQuarterTurn1Tile: - return submarine_ride_paint_track_right_quarter_turn_1_tile; + return SubmarineRidePaintTrackRightQuarterTurn1Tile; } return nullptr; diff --git a/src/openrct2/ride/water/WaterCoaster.cpp b/src/openrct2/ride/water/WaterCoaster.cpp index bd21ba2980..2579be8808 100644 --- a/src/openrct2/ride/water/WaterCoaster.cpp +++ b/src/openrct2/ride/water/WaterCoaster.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,244 +13,242 @@ #include "../TrackPaint.h" #include "../coaster/JuniorRollerCoaster.h" -static void water_rc_track_flat( +static void WaterRCTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_flat( + JuniorRCPaintTrackFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_25_deg_up( +static void WaterRCTrack25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_25_deg_up( + JuniorRCPaintTrack25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_flat_to_25_deg_up( +static void WaterRCTrackFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_flat_to_25_deg_up( + JuniorRCPaintTrackFlatTo25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_25_deg_up_to_flat( +static void WaterRCTrack25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_25_deg_up_to_flat( + JuniorRCPaintTrack25DegUpToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_25_deg_down( +static void WaterRCTrack25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WaterRCTrack25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void water_rc_track_flat_to_25_deg_down( +static void WaterRCTrackFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_25_deg_up_to_flat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WaterRCTrack25DegUpToFlat(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void water_rc_track_25_deg_down_to_flat( +static void WaterRCTrack25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_flat_to_25_deg_up(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); + WaterRCTrackFlatTo25DegUp(session, ride, trackSequence, (direction + 2) & 3, height, trackElement); } -static void water_rc_track_diag_flat( +static void WaterRCTrackDiagFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat( + JuniorRCPaintTrackDiagFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_diag_25_deg_up( +static void WaterRCTrackDiag25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_up( + JuniorRCPaintTrackDiag25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_diag_flat_to_25_deg_up( +static void WaterRCTrackDiagFlatTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat_to_25_deg_up( + JuniorRCPaintTrackDiagFlatTo25DegUp( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_diag_25_deg_up_to_flat( +static void WaterRCTrackDiag25DegUpToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_up_to_flat( + JuniorRCPaintTrackDiag25DegUpToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_diag_25_deg_down( +static void WaterRCTrackDiag25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_down( + JuniorRCPaintTrackDiag25DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_diag_flat_to_25_deg_down( +static void WaterRCTrackDiagFlatTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_flat_to_25_deg_down( + JuniorRCPaintTrackDiagFlatTo25DegDown( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_diag_25_deg_down_to_flat( +static void WaterRCTrackDiag25DegDownToFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { bool isChained = trackElement.HasChain(); - junior_rc_paint_track_diag_25_deg_down_to_flat( + JuniorRCPaintTrackDiag25DegDownToFlat( session, ride, trackSequence, direction, height, trackElement, - isChained ? JuniorRcChainType::ChainLift : JuniorRcChainType::None); + isChained ? JuniorRCChainType::ChainLift : JuniorRCChainType::None); } -static void water_rc_track_station( +static void WaterRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_station(session, ride, trackSequence, direction, height, trackElement, false); + JuniorRCPaintStation(session, ride, trackSequence, direction, height, trackElement, false); } -static void water_rc_track_60_deg_up( +static void WaterRCTrack60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_60_deg_up(session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrack60DegUp(session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_25_deg_up_to_60_deg_up( +static void WaterRCTrack25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_25_deg_up_to_60_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrack25DegUpTo60DegUp(session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_60_deg_up_to_25_deg_up( +static void WaterRCTrack60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_60_deg_up_to_25_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrack60DegUpTo25DegUp(session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_60_deg_down( +static void WaterRCTrack60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_60_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + WaterRCTrack60DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -static void water_rc_track_25_deg_down_to_60_deg_down( +static void WaterRCTrack25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_60_deg_up_to_25_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + WaterRCTrack60DegUpTo25DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } -static void water_rc_track_60_deg_down_to_25_deg_down( +static void WaterRCTrack60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_25_deg_up_to_60_deg_up(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); + WaterRCTrack25DegUpTo60DegUp(session, ride, trackSequence, (direction + 2) % 4, height, trackElement); } // 5 tile turns -static void water_rc_track_left_quarter_turn_5_tiles_25_deg_up( +static void WaterRCTrackLeftQuarterTurn5Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_left_quarter_turn_5_tiles_25_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_right_quarter_turn_5_tiles_25_deg_up( +static void WaterRCTrackRightQuarterTurn5Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_right_quarter_turn_5_tiles_25_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } static constexpr const uint8_t water_rc_left_quarter_turn_5_tiles_to_right_turn_map[] = { 6, 4, 5, 3, 1, 2, 0, }; -static void water_rc_track_left_quarter_turn_5_tiles_25_deg_down( +static void WaterRCTrackLeftQuarterTurn5Tiles25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_right_quarter_turn_5_tiles_25_deg_up( + WaterRCTrackRightQuarterTurn5Tiles25DegUp( session, ride, water_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence], (direction + 1) % 4, height, trackElement); } -static void water_rc_track_right_quarter_turn_5_tiles_25_deg_down( +static void WaterRCTrackRightQuarterTurn5Tiles25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - water_rc_track_left_quarter_turn_5_tiles_25_deg_up( + WaterRCTrackLeftQuarterTurn5Tiles25DegUp( session, ride, water_rc_left_quarter_turn_5_tiles_to_right_turn_map[trackSequence], (direction + 3) % 4, height, trackElement); } // 3 tile turns -static void water_rc_track_right_quarter_turn_3_tiles_25_deg_up( +static void WaterRCTrackRightQuarterTurn3Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_right_quarter_turn_3_tiles_25_deg_down( +static void WaterRCTrackRightQuarterTurn3Tiles25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } static constexpr const uint8_t water_rc_left_quarter_turn_3_tiles_to_right_turn_map[] = { @@ -260,150 +258,146 @@ static constexpr const uint8_t water_rc_left_quarter_turn_3_tiles_to_right_turn_ 0, }; -static void water_rc_track_left_quarter_turn_3_tiles_25_deg_up( +static void WaterRCTrackLeftQuarterTurn3Tiles25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = water_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; - water_rc_track_right_quarter_turn_3_tiles_25_deg_down( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + WaterRCTrackRightQuarterTurn3Tiles25DegDown(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void water_rc_track_left_quarter_turn_3_tiles_25_deg_down( +static void WaterRCTrackLeftQuarterTurn3Tiles25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { trackSequence = water_rc_left_quarter_turn_3_tiles_to_right_turn_map[trackSequence]; - water_rc_track_right_quarter_turn_3_tiles_25_deg_up( - session, ride, trackSequence, (direction + 1) % 4, height, trackElement); + WaterRCTrackRightQuarterTurn3Tiles25DegUp(session, ride, trackSequence, (direction + 1) % 4, height, trackElement); } -static void water_rc_track_diag_60_deg_up( +static void WaterRCTrackDiag60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_diag_60_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackDiag60DegUp(session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_diag_25_deg_up_to_60_deg_up( +static void WaterRCTrackDiag25DegUpTo60DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_diag_25_deg_up_to_60_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackDiag25DegUpTo60DegUp( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_diag_60_deg_up_to_25_deg_up( +static void WaterRCTrackDiag60DegUpTo25DegUp( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_diag_60_deg_up_to_25_deg_up( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackDiag60DegUpTo25DegUp( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_diag_60_deg_down( +static void WaterRCTrackDiag60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_diag_60_deg_down( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackDiag60DegDown(session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_diag_25_deg_down_to_60_deg_down( +static void WaterRCTrackDiag25DegDownTo60DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_diag_25_deg_down_to_60_deg_down( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackDiag25DegDownTo60DegDown( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -static void water_rc_track_diag_60_deg_down_to_25_deg_down( +static void WaterRCTrackDiag60DegDownTo25DegDown( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - junior_rc_paint_track_diag_60_deg_down_to_25_deg_down( - session, ride, trackSequence, direction, height, trackElement, JuniorRcChainType::None); + JuniorRCPaintTrackDiag60DegDownTo25DegDown( + session, ride, trackSequence, direction, height, trackElement, JuniorRCChainType::None); } -TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(int32_t trackType) +TRACK_PAINT_FUNCTION GetTrackPaintFunctionWaterRC(int32_t trackType) { switch (trackType) { case TrackElemType::Flat: - return water_rc_track_flat; + return WaterRCTrackFlat; case TrackElemType::Up25: - return water_rc_track_25_deg_up; + return WaterRCTrack25DegUp; case TrackElemType::FlatToUp25: - return water_rc_track_flat_to_25_deg_up; + return WaterRCTrackFlatTo25DegUp; case TrackElemType::Up25ToFlat: - return water_rc_track_25_deg_up_to_flat; + return WaterRCTrack25DegUpToFlat; case TrackElemType::Down25: - return water_rc_track_25_deg_down; + return WaterRCTrack25DegDown; case TrackElemType::FlatToDown25: - return water_rc_track_flat_to_25_deg_down; + return WaterRCTrackFlatTo25DegDown; case TrackElemType::Down25ToFlat: - return water_rc_track_25_deg_down_to_flat; + return WaterRCTrack25DegDownToFlat; case TrackElemType::DiagFlat: - return water_rc_track_diag_flat; + return WaterRCTrackDiagFlat; case TrackElemType::DiagUp25: - return water_rc_track_diag_25_deg_up; + return WaterRCTrackDiag25DegUp; case TrackElemType::DiagFlatToUp25: - return water_rc_track_diag_flat_to_25_deg_up; + return WaterRCTrackDiagFlatTo25DegUp; case TrackElemType::DiagUp25ToFlat: - return water_rc_track_diag_25_deg_up_to_flat; + return WaterRCTrackDiag25DegUpToFlat; case TrackElemType::DiagDown25: - return water_rc_track_diag_25_deg_down; + return WaterRCTrackDiag25DegDown; case TrackElemType::DiagFlatToDown25: - return water_rc_track_diag_flat_to_25_deg_down; + return WaterRCTrackDiagFlatTo25DegDown; case TrackElemType::DiagDown25ToFlat: - return water_rc_track_diag_25_deg_down_to_flat; + return WaterRCTrackDiag25DegDownToFlat; // Use Junior RC without lift hill case TrackElemType::EndStation: case TrackElemType::BeginStation: case TrackElemType::MiddleStation: - return water_rc_track_station; + return WaterRCTrackStation; case TrackElemType::Up60: - return water_rc_track_60_deg_up; + return WaterRCTrack60DegUp; case TrackElemType::Up25ToUp60: - return water_rc_track_25_deg_up_to_60_deg_up; + return WaterRCTrack25DegUpTo60DegUp; case TrackElemType::Up60ToUp25: - return water_rc_track_60_deg_up_to_25_deg_up; + return WaterRCTrack60DegUpTo25DegUp; case TrackElemType::Down60: - return water_rc_track_60_deg_down; + return WaterRCTrack60DegDown; case TrackElemType::Down25ToDown60: - return water_rc_track_25_deg_down_to_60_deg_down; + return WaterRCTrack25DegDownTo60DegDown; case TrackElemType::Down60ToDown25: - return water_rc_track_60_deg_down_to_25_deg_down; + return WaterRCTrack60DegDownTo25DegDown; case TrackElemType::LeftQuarterTurn5TilesUp25: - return water_rc_track_left_quarter_turn_5_tiles_25_deg_up; + return WaterRCTrackLeftQuarterTurn5Tiles25DegUp; case TrackElemType::RightQuarterTurn5TilesUp25: - return water_rc_track_right_quarter_turn_5_tiles_25_deg_up; + return WaterRCTrackRightQuarterTurn5Tiles25DegUp; case TrackElemType::LeftQuarterTurn5TilesDown25: - return water_rc_track_left_quarter_turn_5_tiles_25_deg_down; + return WaterRCTrackLeftQuarterTurn5Tiles25DegDown; case TrackElemType::RightQuarterTurn5TilesDown25: - return water_rc_track_right_quarter_turn_5_tiles_25_deg_down; + return WaterRCTrackRightQuarterTurn5Tiles25DegDown; case TrackElemType::LeftQuarterTurn3TilesUp25: - return water_rc_track_left_quarter_turn_3_tiles_25_deg_up; + return WaterRCTrackLeftQuarterTurn3Tiles25DegUp; case TrackElemType::RightQuarterTurn3TilesUp25: - return water_rc_track_right_quarter_turn_3_tiles_25_deg_up; + return WaterRCTrackRightQuarterTurn3Tiles25DegUp; case TrackElemType::LeftQuarterTurn3TilesDown25: - return water_rc_track_left_quarter_turn_3_tiles_25_deg_down; + return WaterRCTrackLeftQuarterTurn3Tiles25DegDown; case TrackElemType::RightQuarterTurn3TilesDown25: - return water_rc_track_right_quarter_turn_3_tiles_25_deg_down; + return WaterRCTrackRightQuarterTurn3Tiles25DegDown; case TrackElemType::DiagUp60: - return water_rc_track_diag_60_deg_up; + return WaterRCTrackDiag60DegUp; case TrackElemType::DiagUp25ToUp60: - return water_rc_track_diag_25_deg_up_to_60_deg_up; + return WaterRCTrackDiag25DegUpTo60DegUp; case TrackElemType::DiagUp60ToUp25: - return water_rc_track_diag_60_deg_up_to_25_deg_up; + return WaterRCTrackDiag60DegUpTo25DegUp; case TrackElemType::DiagDown60: - return water_rc_track_diag_60_deg_down; + return WaterRCTrackDiag60DegDown; case TrackElemType::DiagDown25ToDown60: - return water_rc_track_diag_25_deg_down_to_60_deg_down; + return WaterRCTrackDiag25DegDownTo60DegDown; case TrackElemType::DiagDown60ToDown25: - return water_rc_track_diag_60_deg_down_to_25_deg_down; + return WaterRCTrackDiag60DegDownTo25DegDown; ////////////////////////////////////////////////////// // Use Junior RC @@ -469,36 +463,36 @@ TRACK_PAINT_FUNCTION get_track_paint_function_water_rc(int32_t trackType) case TrackElemType::DiagRightBank: case TrackElemType::BlockBrakes: case TrackElemType::Booster: - return get_track_paint_function_junior_rc(trackType); + return GetTrackPaintFunctionJuniorRC(trackType); ////////////////////////////////////////////////////// // Use River Rafts ////////////////////////////////////////////////////// case TrackElemType::FlatCovered: - return get_track_paint_function_splash_boats(TrackElemType::Flat); + return GetTrackPaintFunctionSplashBoats(TrackElemType::Flat); case TrackElemType::LeftQuarterTurn5TilesCovered: - return get_track_paint_function_splash_boats(TrackElemType::LeftQuarterTurn5Tiles); + return GetTrackPaintFunctionSplashBoats(TrackElemType::LeftQuarterTurn5Tiles); case TrackElemType::RightQuarterTurn5TilesCovered: - return get_track_paint_function_splash_boats(TrackElemType::RightQuarterTurn5Tiles); + return GetTrackPaintFunctionSplashBoats(TrackElemType::RightQuarterTurn5Tiles); case TrackElemType::SBendLeftCovered: - return get_track_paint_function_splash_boats(TrackElemType::SBendLeft); + return GetTrackPaintFunctionSplashBoats(TrackElemType::SBendLeft); case TrackElemType::SBendRightCovered: - return get_track_paint_function_splash_boats(TrackElemType::SBendRight); + return GetTrackPaintFunctionSplashBoats(TrackElemType::SBendRight); case TrackElemType::FlatToDown25Covered: - return get_track_paint_function_splash_boats(TrackElemType::FlatToDown25); + return GetTrackPaintFunctionSplashBoats(TrackElemType::FlatToDown25); case TrackElemType::Down25Covered: - return get_track_paint_function_splash_boats(TrackElemType::Down25); + return GetTrackPaintFunctionSplashBoats(TrackElemType::Down25); case TrackElemType::Down25ToDown60Covered: - return get_track_paint_function_splash_boats(TrackElemType::Down25ToDown60); + return GetTrackPaintFunctionSplashBoats(TrackElemType::Down25ToDown60); case TrackElemType::Down60Covered: - return get_track_paint_function_splash_boats(TrackElemType::Down60); + return GetTrackPaintFunctionSplashBoats(TrackElemType::Down60); case TrackElemType::Down60ToDown25Covered: - return get_track_paint_function_splash_boats(TrackElemType::Down60ToDown25); + return GetTrackPaintFunctionSplashBoats(TrackElemType::Down60ToDown25); case TrackElemType::Down25ToFlatCovered: - return get_track_paint_function_splash_boats(TrackElemType::Down25ToFlat); + return GetTrackPaintFunctionSplashBoats(TrackElemType::Down25ToFlat); case TrackElemType::OnRidePhoto: - return get_track_paint_function_junior_rc(trackType); + return GetTrackPaintFunctionJuniorRC(trackType); } return nullptr; } diff --git a/src/openrct2/ride/water/meta/BoatHire.h b/src/openrct2/ride/water/meta/BoatHire.h index 871bf73a5d..65f2ea10df 100644 --- a/src/openrct2/ride/water/meta/BoatHire.h +++ b/src/openrct2/ride/water/meta/BoatHire.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor BoatHireRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_boat_hire), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionBoatHire), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_CHECK_FOR_STALLING | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | RIDE_TYPE_FLAG_ALLOW_MUSIC | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT), @@ -38,7 +38,7 @@ constexpr const RideTypeDescriptor BoatHireRTD = SET_FIELD(Heights, { 255, 16, 0, 3, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_boat_hire), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateBoatHire), SET_FIELD(RatingsMultipliers, { 70, 6, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 4, 0, 0 }), SET_FIELD(BuildCosts, { 27.50_GBP, 0.00_GBP, 5, }), diff --git a/src/openrct2/ride/water/meta/DinghySlide.h b/src/openrct2/ride/water/meta/DinghySlide.h index 57b9023617..7fe5100a9b 100644 --- a/src/openrct2/ride/water/meta/DinghySlide.h +++ b/src/openrct2/ride/water/meta/DinghySlide.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor DinghySlideRTD = SET_FIELD(ExtraTrackPieces,{}), SET_FIELD(CoveredTrackPieces, {TrackElemType::Flat, TrackElemType::Up25, TrackElemType::Up60, TrackElemType::FlatToUp25, TrackElemType::Up25ToUp60, TrackElemType::Up60ToUp25, TrackElemType::Up25ToFlat, TrackElemType::Down25, TrackElemType::Down60, TrackElemType::FlatToDown25, TrackElemType::Down25ToDown60, TrackElemType::Down60ToDown25, TrackElemType::Down25ToFlat, TrackElemType::LeftQuarterTurn5Tiles, TrackElemType::RightQuarterTurn5Tiles, TrackElemType::SBendLeft, TrackElemType::SBendRight, TrackElemType::LeftQuarterTurn3Tiles,TrackElemType::RightQuarterTurn3Tiles}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_dinghy_slide), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionDinghySlide), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_G_FORCES | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | RIDE_TYPE_FLAG_TRACK_ELEMENTS_HAVE_TWO_VARIETIES | @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor DinghySlideRTD = SET_FIELD(Heights, { 15, 24, 5, 7, }), SET_FIELD(MaxMass, 5), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::LiftFrictionWheels, 4, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_dinghy_slide), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateDinghySlide), SET_FIELD(RatingsMultipliers, { 50, 30, 10 }), SET_FIELD(UpkeepCosts, { 40, 20, 80, 4, 3, 10 }), SET_FIELD(BuildCosts, { 20.00_GBP, 2.00_GBP, 40, }), diff --git a/src/openrct2/ride/water/meta/LogFlume.h b/src/openrct2/ride/water/meta/LogFlume.h index 3f75328362..fa735ee7f2 100644 --- a/src/openrct2/ride/water/meta/LogFlume.h +++ b/src/openrct2/ride/water/meta/LogFlume.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor LogFlumeRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_log_flume), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionLogFlume), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | 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_HAS_TRACK | @@ -40,7 +40,7 @@ constexpr const RideTypeDescriptor LogFlumeRTD = SET_FIELD(Heights, { 10, 24, 7, 9, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_log_flume), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateLogFlume), SET_FIELD(RatingsMultipliers, { 80, 34, 6 }), SET_FIELD(UpkeepCosts, { 80, 20, 0, 9, 0, 10 }), SET_FIELD(BuildCosts, { 22.50_GBP, 2.50_GBP, 40, }), diff --git a/src/openrct2/ride/water/meta/RiverRafts.h b/src/openrct2/ride/water/meta/RiverRafts.h index c3e45c50ca..deb43198e5 100644 --- a/src/openrct2/ride/water/meta/RiverRafts.h +++ b/src/openrct2/ride/water/meta/RiverRafts.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor RiverRaftsRTD = SET_FIELD(ExtraTrackPieces, {TRACK_SLOPE, TRACK_SLOPE_STEEP_DOWN, TRACK_ON_RIDE_PHOTO}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_splash_boats), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSplashBoats), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | @@ -40,7 +40,7 @@ constexpr const RideTypeDescriptor RiverRaftsRTD = SET_FIELD(Heights, { 12, 24, 7, 11, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_river_rafts), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateRiverRafts), SET_FIELD(RatingsMultipliers, { 80, 34, 6 }), SET_FIELD(UpkeepCosts, { 50, 20, 0, 9, 0, 10 }), SET_FIELD(BuildCosts, { 20.00_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/water/meta/RiverRapids.h b/src/openrct2/ride/water/meta/RiverRapids.h index 5a510d7958..a0121a0ddb 100644 --- a/src/openrct2/ride/water/meta/RiverRapids.h +++ b/src/openrct2/ride/water/meta/RiverRapids.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ constexpr const RideTypeDescriptor RiverRapidsRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_river_rapids), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionRiverRapids), SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_MAIN | RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | RIDE_TYPE_FLAG_HAS_DATA_LOGGING | RIDE_TYPE_FLAG_HAS_DROPS | @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor RiverRapidsRTD = SET_FIELD(Heights, { 9, 32, 14, 15, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_river_rapids), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateRiverRapids), SET_FIELD(RatingsMultipliers, { 72, 26, 6 }), SET_FIELD(UpkeepCosts, { 82, 20, 0, 10, 0, 10 }), SET_FIELD(BuildCosts, { 31.00_GBP, 3.00_GBP, 40, }), diff --git a/src/openrct2/ride/water/meta/SplashBoats.h b/src/openrct2/ride/water/meta/SplashBoats.h index 61416e1886..890ba4d39d 100644 --- a/src/openrct2/ride/water/meta/SplashBoats.h +++ b/src/openrct2/ride/water/meta/SplashBoats.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor SplashBoatsRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_splash_boats), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSplashBoats), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_CAN_SYNCHRONISE_ADJACENT_STATIONS | 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 | @@ -41,7 +41,7 @@ constexpr const RideTypeDescriptor SplashBoatsRTD = SET_FIELD(Heights, { 16, 24, 7, 11, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_splash_boats), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSplashBoats), SET_FIELD(RatingsMultipliers, { 80, 34, 6 }), SET_FIELD(UpkeepCosts, { 70, 20, 0, 9, 0, 10 }), SET_FIELD(BuildCosts, { 28.50_GBP, 2.50_GBP, 30, }), diff --git a/src/openrct2/ride/water/meta/SubmarineRide.h b/src/openrct2/ride/water/meta/SubmarineRide.h index ed8ec16553..6f497abbd7 100644 --- a/src/openrct2/ride/water/meta/SubmarineRide.h +++ b/src/openrct2/ride/water/meta/SubmarineRide.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ constexpr const RideTypeDescriptor SubmarineRideRTD = SET_FIELD(ExtraTrackPieces, {}), SET_FIELD(CoveredTrackPieces, {}), SET_FIELD(StartTrackPiece, TrackElemType::EndStation), - SET_FIELD(TrackPaintFunction, get_track_paint_function_submarine_ride), + SET_FIELD(TrackPaintFunction, GetTrackPaintFunctionSubmarineRide), SET_FIELD(Flags, RIDE_TYPE_FLAGS_TRACK_HAS_3_COLOURS | RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION | RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER | RIDE_TYPE_FLAG_HAS_LOAD_OPTIONS | RIDE_TYPE_FLAG_PEEP_WILL_RIDE_AGAIN | RIDE_TYPE_FLAG_HAS_VEHICLE_COLOURS | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_SUPPORTS_MULTIPLE_TRACK_COLOUR | @@ -40,7 +40,7 @@ constexpr const RideTypeDescriptor SubmarineRideRTD = SET_FIELD(Heights, { 255, 16, 0, 3, }), SET_FIELD(MaxMass, 255), SET_FIELD(LiftData, { OpenRCT2::Audio::SoundId::Null, 5, 5 }), - SET_FIELD(RatingsCalculationFunction, ride_ratings_calculate_submarine_ride), + SET_FIELD(RatingsCalculationFunction, RideRatingsCalculateSubmarineRide), SET_FIELD(RatingsMultipliers, { 70, 6, 0 }), SET_FIELD(UpkeepCosts, { 50, 1, 0, 4, 0, 0 }), SET_FIELD(BuildCosts, { 35.00_GBP, 2.50_GBP, 5, }), diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 986ddace72..c12712f6a6 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,8 +36,10 @@ #include "../management/Research.h" #include "../network/network.h" #include "../object/Object.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" +#include "../object/WaterEntry.h" #include "../platform/Platform.h" #include "../profiling/Profiling.h" #include "../rct1/RCT1.h" @@ -52,7 +54,6 @@ #include "../world/Map.h" #include "../world/Park.h" #include "../world/Scenery.h" -#include "../world/Water.h" #include "ScenarioRepository.h" #include "ScenarioSources.h" @@ -83,14 +84,14 @@ money64 gScenarioCompanyValueRecord; std::string gScenarioFileName; -static void scenario_objective_check(); +static void ScenarioCheckObjective(); using namespace OpenRCT2; -void scenario_begin() +void ScenarioBegin() { - game_load_init(); - scenario_reset(); + GameLoadInit(); + ScenarioReset(); if (gScenarioObjective.Type != OBJECTIVE_NONE && !gLoadKeepWindowsOpen) ContextOpenWindowView(WV_PARK_OBJECTIVE); @@ -98,13 +99,13 @@ void scenario_begin() gScreenAge = 0; } -void scenario_reset() +void ScenarioReset() { // Set the scenario pseudo-random seeds - Random::Rct2::Seed s{ 0x1234567F ^ Platform::GetTicks(), 0x789FABCD ^ Platform::GetTicks() }; + Random::RCT2::Seed s{ 0x1234567F ^ Platform::GetTicks(), 0x789FABCD ^ Platform::GetTicks() }; gScenarioRand.seed(s); - research_reset_current_item(); + ResearchResetCurrentItem(); ScenerySetDefaultPlacementConfiguration(); News::InitQueue(); @@ -120,19 +121,19 @@ void scenario_reset() ScenarioSources::NormaliseName(normalisedName, sizeof(normalisedName), gScenarioName.c_str()); StringId localisedStringIds[3]; - if (language_get_localised_scenario_strings(normalisedName, localisedStringIds)) + if (LanguageGetLocalisedScenarioStrings(normalisedName, localisedStringIds)) { if (localisedStringIds[0] != STR_NONE) { - gScenarioName = language_get_string(localisedStringIds[0]); + gScenarioName = LanguageGetString(localisedStringIds[0]); } if (localisedStringIds[1] != STR_NONE) { - park.Name = language_get_string(localisedStringIds[1]); + park.Name = LanguageGetString(localisedStringIds[1]); } if (localisedStringIds[2] != STR_NONE) { - gScenarioDetails = language_get_string(localisedStringIds[2]); + gScenarioDetails = LanguageGetString(localisedStringIds[2]); } } } @@ -154,10 +155,10 @@ void scenario_reset() gScenarioCompletedBy = "?"; park.ResetHistories(); - finance_reset_history(); - award_reset(); - reset_all_ride_build_dates(); - date_reset(); + FinanceResetHistory(); + AwardReset(); + ResetAllRideBuildDates(); + DateReset(); Duck::RemoveAll(); ParkCalculateSize(); MapCountRemainingLandRights(); @@ -185,11 +186,11 @@ void scenario_reset() gGamePaused = false; } -static void scenario_end() +static void ScenarioEnd() { - game_reset_speed(); - window_close_by_class(WindowClass::Dropdown); - window_close_all_except_flags(WF_STICK_TO_BACK | WF_STICK_TO_FRONT); + GameResetSpeed(); + WindowCloseByClass(WindowClass::Dropdown); + WindowCloseAllExceptFlags(WF_STICK_TO_BACK | WF_STICK_TO_FRONT); ContextOpenWindowView(WV_PARK_OBJECTIVE); } @@ -197,39 +198,39 @@ static void scenario_end() * * rct2: 0x0066A752 */ -void scenario_failure() +void ScenarioFailure() { gScenarioCompletedCompanyValue = COMPANY_VALUE_ON_FAILED_OBJECTIVE; - scenario_end(); + ScenarioEnd(); } /** * * rct2: 0x0066A75E */ -void scenario_success() +void ScenarioSuccess() { auto companyValue = gCompanyValue; gScenarioCompletedCompanyValue = companyValue; - peep_applause(); + PeepApplause(); - if (scenario_repository_try_record_highscore(gScenarioFileName.c_str(), companyValue, nullptr)) + if (ScenarioRepositoryTryRecordHighscore(gScenarioFileName.c_str(), companyValue, nullptr)) { // Allow name entry gParkFlags |= PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; gScenarioCompanyValueRecord = companyValue; } - scenario_end(); + ScenarioEnd(); } /** * * rct2: 0x006695E8 */ -void scenario_success_submit_name(const char* name) +void ScenarioSuccessSubmitName(const char* name) { - if (scenario_repository_try_record_highscore(gScenarioFileName.c_str(), gScenarioCompanyValueRecord, name)) + if (ScenarioRepositoryTryRecordHighscore(gScenarioFileName.c_str(), gScenarioCompanyValueRecord, name)) { gScenarioCompletedBy = name; } @@ -240,9 +241,9 @@ void scenario_success_submit_name(const char* name) * Send a warning when entrance price is too high. * rct2: 0x0066A80E */ -static void scenario_entrance_fee_too_high_check() +static void ScenarioCheckEntranceFeeTooHigh() { - const auto max_fee = add_clamp_money16(gTotalRideValueForMoney, gTotalRideValueForMoney / 2); + const auto max_fee = AddClamp_money64(gTotalRideValueForMoney, gTotalRideValueForMoney / 2); if ((gParkFlags & PARK_FLAGS_PARK_OPEN) && ParkGetEntranceFee() > max_fee) { @@ -261,7 +262,7 @@ static void scenario_entrance_fee_too_high_check() } } -void scenario_autosave_check() +void ScenarioAutosaveCheck() { if (gLastAutoSaveUpdate == AUTOSAVE_PAUSE) return; @@ -292,14 +293,14 @@ void scenario_autosave_check() if (shouldSave) { gLastAutoSaveUpdate = AUTOSAVE_PAUSE; - game_autosave(); + GameAutosave(); } } -static void scenario_day_update() +static void ScenarioDayUpdate() { - finance_update_daily_profit(); - peep_update_days_in_queue(); + FinanceUpdateDailyProfit(); + PeepUpdateDaysInQueue(); switch (gScenarioObjective.Type) { case OBJECTIVE_10_ROLLERCOASTERS: @@ -307,11 +308,11 @@ static void scenario_day_update() case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: case OBJECTIVE_FINISH_5_ROLLERCOASTERS: case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: - scenario_objective_check(); + ScenarioCheckObjective(); break; default: if (AllowEarlyCompletion()) - scenario_objective_check(); + ScenarioCheckObjective(); break; } @@ -323,45 +324,45 @@ static void scenario_day_update() ContextBroadcastIntent(&intent); } -static void scenario_week_update() +static void ScenarioWeekUpdate() { - int32_t month = date_get_month(gDateMonthsElapsed); + int32_t month = DateGetMonth(gDateMonthsElapsed); - finance_pay_wages(); - finance_pay_research(); - finance_pay_interest(); - marketing_update(); - peep_problem_warnings_update(); - ride_check_all_reachable(); - ride_update_favourited_stat(); + FinancePayWages(); + FinancePayResearch(); + FinancePayInterest(); + MarketingUpdate(); + PeepProblemWarningsUpdate(); + RideCheckAllReachable(); + RideUpdateFavouritedStat(); - auto water_type = static_cast(object_entry_get_chunk(ObjectType::Water, 0)); + auto water_type = OpenRCT2::ObjectManager::GetObjectEntry(0); if (month <= MONTH_APRIL && water_type != nullptr && water_type->flags & WATER_FLAGS_ALLOW_DUCKS) { // 100 attempts at finding some water to create a few ducks at for (int32_t i = 0; i < 100; i++) { - if (scenario_create_ducks()) + if (ScenarioCreateDucks()) break; } } } -static void scenario_fortnight_update() +static void ScenarioFortnightUpdate() { - finance_pay_ride_upkeep(); + FinancePayRideUpkeep(); } -static void scenario_month_update() +static void ScenarioMonthUpdate() { - finance_shift_expenditure_table(); - scenario_objective_check(); - scenario_entrance_fee_too_high_check(); - award_update_all(); + FinanceShiftExpenditureTable(); + ScenarioCheckObjective(); + ScenarioCheckEntranceFeeTooHigh(); + AwardUpdateAll(); } -static void scenario_update_daynight_cycle() +static void ScenarioUpdateDayNightCycle() { float currentDayNightCycle = gDayNightCycle; gDayNightCycle = 0; @@ -402,36 +403,36 @@ static void scenario_update_daynight_cycle() * Scenario and finance related update iteration. * rct2: 0x006C44B1 */ -void scenario_update() +void ScenarioUpdate() { PROFILED_FUNCTION(); if (gScreenFlags == SCREEN_FLAGS_PLAYING) { - if (date_is_day_start(gDateMonthTicks)) + if (DateIsDayStart(gDateMonthTicks)) { - scenario_day_update(); + ScenarioDayUpdate(); } - if (date_is_week_start(gDateMonthTicks)) + if (DateIsWeekStart(gDateMonthTicks)) { - scenario_week_update(); + ScenarioWeekUpdate(); } - if (date_is_fortnight_start(gDateMonthTicks)) + if (DateIsFortnightStart(gDateMonthTicks)) { - scenario_fortnight_update(); + ScenarioFortnightUpdate(); } - if (date_is_month_start(gDateMonthTicks)) + if (DateIsMonthStart(gDateMonthTicks)) { - scenario_month_update(); + ScenarioMonthUpdate(); } } - scenario_update_daynight_cycle(); + ScenarioUpdateDayNightCycle(); } /** * * rct2: 0x006744A9 */ -bool scenario_create_ducks() +bool ScenarioCreateDucks() { // Check NxN area around centre tile defined by SquareSize constexpr int32_t SquareSize = 7; @@ -439,8 +440,8 @@ bool scenario_create_ducks() constexpr int32_t SquareRadiusSize = SquareCentre * 32; CoordsXY centrePos; - centrePos.x = SquareRadiusSize + (scenario_rand_max(gMapSize.x - SquareCentre) * 32); - centrePos.y = SquareRadiusSize + (scenario_rand_max(gMapSize.y - SquareCentre) * 32); + centrePos.x = SquareRadiusSize + (ScenarioRandMax(gMapSize.x - SquareCentre) * 32); + centrePos.y = SquareRadiusSize + (ScenarioRandMax(gMapSize.y - SquareCentre) * 32); Guard::Assert(MapIsLocationValid(centrePos)); @@ -481,10 +482,10 @@ bool scenario_create_ducks() centrePos.x += 16; centrePos.y += 16; - uint32_t duckCount = (scenario_rand() % 4) + 2; + uint32_t duckCount = (ScenarioRand() % 4) + 2; for (uint32_t i = 0; i < duckCount; i++) { - uint32_t r = scenario_rand(); + uint32_t r = ScenarioRand(); innerPos.x = (r >> 16) % SquareRadiusSize; innerPos.y = (r & 0xFFFF) % SquareRadiusSize; @@ -497,14 +498,14 @@ bool scenario_create_ducks() return true; } -const random_engine_t::state_type& scenario_rand_state() +const random_engine_t::state_type& ScenarioRandState() { return gScenarioRand.state(); }; -void scenario_rand_seed(random_engine_t::result_type s0, random_engine_t::result_type s1) +void ScenarioRandSeed(random_engine_t::result_type s0, random_engine_t::result_type s1) { - Random::Rct2::Seed s{ s0, s1 }; + Random::RCT2::Seed s{ s0, s1 }; gScenarioRand.seed(s); } @@ -514,21 +515,21 @@ void scenario_rand_seed(random_engine_t::result_type s0, random_engine_t::result * * @return eax */ -random_engine_t::result_type scenario_rand() +random_engine_t::result_type ScenarioRand() { return gScenarioRand(); } -uint32_t scenario_rand_max(uint32_t max) +uint32_t ScenarioRandMax(uint32_t max) { if (max < 2) return 0; if ((max & (max - 1)) == 0) - return scenario_rand() & (max - 1); + return ScenarioRand() & (max - 1); uint32_t rand, cap = ~(static_cast(0)) - (~(static_cast(0)) % max) - 1; do { - rand = scenario_rand(); + rand = ScenarioRand(); } while (rand > cap); return rand % max; } @@ -537,7 +538,7 @@ uint32_t scenario_rand_max(uint32_t max) * Prepare rides, for the finish five rollercoasters objective. * rct2: 0x006788F7 */ -static ResultWithMessage scenario_prepare_rides_for_save() +static ResultWithMessage ScenarioPrepareRidesForSave() { int32_t isFiveCoasterObjective = gScenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS; uint8_t rcs = 0; @@ -548,7 +549,7 @@ static ResultWithMessage scenario_prepare_rides_for_save() if (rideEntry != nullptr) { // If there are more than 5 roller coasters, only mark the first five. - if (isFiveCoasterObjective && (ride_entry_has_category(rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && rcs < 5)) + if (isFiveCoasterObjective && (RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && rcs < 5)) { ride.lifecycle_flags |= RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; rcs++; @@ -566,7 +567,7 @@ static ResultWithMessage scenario_prepare_rides_for_save() } bool markTrackAsIndestructible; - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do { @@ -576,7 +577,7 @@ static ResultWithMessage scenario_prepare_rides_for_save() if (isFiveCoasterObjective) { - auto ride = get_ride(it.element->AsTrack()->GetRideIndex()); + auto ride = GetRide(it.element->AsTrack()->GetRideIndex()); // In the previous step, this flag was set on the first five roller coasters. if (ride != nullptr && ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) @@ -596,10 +597,10 @@ static ResultWithMessage scenario_prepare_rides_for_save() * * rct2: 0x006726C7 */ -ResultWithMessage scenario_prepare_for_save() +ResultWithMessage ScenarioPrepareForSave() { // This can return false if the goal is 'Finish 5 roller coaster' and there are too few. - const auto prepareRidesResult = scenario_prepare_rides_for_save(); + const auto prepareRidesResult = ScenarioPrepareRidesForSave(); if (!prepareRidesResult.Successful) { return { false, prepareRidesResult.Message }; @@ -608,7 +609,7 @@ ResultWithMessage scenario_prepare_for_save() if (gScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) gParkFlags |= PARK_FLAGS_PARK_OPEN; - scenario_reset(); + ScenarioReset(); return { true }; } @@ -637,8 +638,8 @@ ObjectiveStatus Objective::CheckGuestsBy() const ObjectiveStatus Objective::CheckParkValueBy() const { int32_t currentMonthYear = gDateMonthsElapsed; - money32 objectiveParkValue = Currency; - money32 parkValue = gParkValue; + money64 objectiveParkValue = Currency; + money64 parkValue = gParkValue; if (currentMonthYear == MONTH_COUNT * Year || AllowEarlyCompletion()) { @@ -672,7 +673,7 @@ ObjectiveStatus Objective::Check10RollerCoasters() const auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) { - if (ride_entry_has_category(rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && !type_already_counted[ride.subtype]) + if (RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && !type_already_counted[ride.subtype]) { type_already_counted[ride.subtype] = true; rcs++; @@ -747,7 +748,7 @@ ObjectiveStatus Objective::CheckGuestsAndRating() const ObjectiveStatus Objective::CheckMonthlyRideIncome() const { - money32 lastMonthRideIncome = gExpenditureTable[1][static_cast(ExpenditureType::ParkRideTickets)]; + money64 lastMonthRideIncome = gExpenditureTable[1][static_cast(ExpenditureType::ParkRideTickets)]; if (lastMonthRideIncome >= Currency) { return ObjectiveStatus::Success; @@ -772,7 +773,7 @@ ObjectiveStatus Objective::Check10RollerCoastersLength() const auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) { - if (ride_entry_has_category(rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && !type_already_counted[ride.subtype]) + if (RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && !type_already_counted[ride.subtype]) { if ((ride.GetTotalLength() >> 16) >= MinimumLength) { @@ -804,7 +805,7 @@ ObjectiveStatus Objective::CheckFinish5RollerCoasters() const if (rideEntry != nullptr) { if ((ride.lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) - && ride_entry_has_category(rideEntry, RIDE_CATEGORY_ROLLERCOASTER)) + && RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER)) { rcs++; } @@ -821,8 +822,8 @@ ObjectiveStatus Objective::CheckFinish5RollerCoasters() const ObjectiveStatus Objective::CheckRepayLoanAndParkValue() const { - money32 parkValue = gParkValue; - money32 currentLoan = gBankLoan; + money64 parkValue = gParkValue; + money64 currentLoan = gBankLoan; if (currentLoan <= 0 && parkValue >= Currency) { @@ -854,7 +855,7 @@ ObjectiveStatus Objective::CheckMonthlyFoodIncome() const */ bool AllowEarlyCompletion() { - switch (network_get_mode()) + switch (NetworkGetMode()) { case NETWORK_MODE_CLIENT: return gAllowEarlyCompletionInNetworkPlay; @@ -865,16 +866,16 @@ bool AllowEarlyCompletion() } } -static void scenario_objective_check() +static void ScenarioCheckObjective() { auto status = gScenarioObjective.Check(); if (status == ObjectiveStatus::Success) { - scenario_success(); + ScenarioSuccess(); } else if (status == ObjectiveStatus::Failure) { - scenario_failure(); + ScenarioFailure(); } } diff --git a/src/openrct2/scenario/Scenario.h b/src/openrct2/scenario/Scenario.h index de06b3d147..6b4f7d7a58 100644 --- a/src/openrct2/scenario/Scenario.h +++ b/src/openrct2/scenario/Scenario.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,7 +23,7 @@ struct ResultWithMessage; -using random_engine_t = Random::Rct2::Engine; +using random_engine_t = Random::RCT2::Engine; enum { @@ -172,20 +172,20 @@ extern uint32_t gLastAutoSaveUpdate; extern std::string gScenarioFileName; -void scenario_begin(); -void scenario_reset(); -void scenario_update(); -bool scenario_create_ducks(); +void ScenarioBegin(); +void ScenarioReset(); +void ScenarioUpdate(); +bool ScenarioCreateDucks(); bool AllowEarlyCompletion(); -const random_engine_t::state_type& scenario_rand_state(); -void scenario_rand_seed(random_engine_t::result_type s0, random_engine_t::result_type s1); -random_engine_t::result_type scenario_rand(); -uint32_t scenario_rand_max(uint32_t max); +const random_engine_t::state_type& ScenarioRandState(); +void ScenarioRandSeed(random_engine_t::result_type s0, random_engine_t::result_type s1); +random_engine_t::result_type ScenarioRand(); +uint32_t ScenarioRandMax(uint32_t max); -ResultWithMessage scenario_prepare_for_save(); -int32_t scenario_save(u8string_view path, int32_t flags); -void scenario_failure(); -void scenario_success(); -void scenario_success_submit_name(const char* name); -void scenario_autosave_check(); +ResultWithMessage ScenarioPrepareForSave(); +int32_t ScenarioSave(u8string_view path, int32_t flags); +void ScenarioFailure(); +void ScenarioSuccess(); +void ScenarioSuccessSubmitName(const char* name); +void ScenarioAutosaveCheck(); diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index e053502aa4..6b7a4c78aa 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -55,74 +55,72 @@ static int32_t ScenarioCategoryCompare(int32_t categoryA, int32_t categoryB) return 1; } -static int32_t scenario_index_entry_CompareByCategory(const scenario_index_entry& entryA, const scenario_index_entry& entryB) +static int32_t ScenarioIndexEntryCompareByCategory(const ScenarioIndexEntry& entryA, const ScenarioIndexEntry& entryB) { // Order by category - if (entryA.category != entryB.category) + if (entryA.Category != entryB.Category) { - return ScenarioCategoryCompare(entryA.category, entryB.category); + return ScenarioCategoryCompare(entryA.Category, entryB.Category); } // Then by source game / name - switch (entryA.category) + switch (entryA.Category) { default: - if (entryA.source_game != entryB.source_game) + if (entryA.SourceGame != entryB.SourceGame) { - return static_cast(entryA.source_game) - static_cast(entryB.source_game); + return static_cast(entryA.SourceGame) - static_cast(entryB.SourceGame); } - return strcmp(entryA.name, entryB.name); + return strcmp(entryA.Name, entryB.Name); case SCENARIO_CATEGORY_REAL: case SCENARIO_CATEGORY_OTHER: - return strcmp(entryA.name, entryB.name); + return strcmp(entryA.Name, entryB.Name); } } -static int32_t scenario_index_entry_CompareByIndex(const scenario_index_entry& entryA, const scenario_index_entry& entryB) +static int32_t ScenarioIndexEntryCompareByIndex(const ScenarioIndexEntry& entryA, const ScenarioIndexEntry& entryB) { // Order by source game - if (entryA.source_game != entryB.source_game) + if (entryA.SourceGame != entryB.SourceGame) { - return static_cast(entryA.source_game) - static_cast(entryB.source_game); + return static_cast(entryA.SourceGame) - static_cast(entryB.SourceGame); } // Then by index / category / name - ScenarioSource sourceGame = ScenarioSource{ entryA.source_game }; + ScenarioSource sourceGame = ScenarioSource{ entryA.SourceGame }; switch (sourceGame) { default: - if (entryA.source_index == -1 && entryB.source_index == -1) + if (entryA.SourceIndex == -1 && entryB.SourceIndex == -1) { - if (entryA.category == entryB.category) + if (entryA.Category == entryB.Category) { - return scenario_index_entry_CompareByCategory(entryA, entryB); + return ScenarioIndexEntryCompareByCategory(entryA, entryB); } - return ScenarioCategoryCompare(entryA.category, entryB.category); + return ScenarioCategoryCompare(entryA.Category, entryB.Category); } - if (entryA.source_index == -1) + if (entryA.SourceIndex == -1) { return 1; } - if (entryB.source_index == -1) + if (entryB.SourceIndex == -1) { return -1; } - return entryA.source_index - entryB.source_index; + return entryA.SourceIndex - entryB.SourceIndex; case ScenarioSource::Real: - return scenario_index_entry_CompareByCategory(entryA, entryB); + return ScenarioIndexEntryCompareByCategory(entryA, entryB); } } -static void scenario_highscore_free(scenario_highscore_entry* highscore) +static void ScenarioHighscoreFree(ScenarioHighscoreEntry* highscore) { - SafeFree(highscore->fileName); - SafeFree(highscore->name); SafeDelete(highscore); } -class ScenarioFileIndex final : public FileIndex +class ScenarioFileIndex final : public FileIndex { private: static constexpr uint32_t MAGIC_NUMBER = 0x58444953; // SIDX @@ -142,9 +140,9 @@ public: } protected: - std::optional Create(int32_t, const std::string& path) const override + std::optional Create(int32_t, const std::string& path) const override { - scenario_index_entry entry; + ScenarioIndexEntry entry; auto timestamp = File::GetLastModified(path); if (GetScenarioInfo(path, timestamp, &entry)) { @@ -154,22 +152,22 @@ protected: return std::nullopt; } - void Serialise(DataSerialiser& ds, const scenario_index_entry& item) const override + void Serialise(DataSerialiser& ds, const ScenarioIndexEntry& item) const override { - ds << item.path; - ds << item.timestamp; - ds << item.category; - ds << item.source_game; - ds << item.source_index; - ds << item.sc_id; - ds << item.objective_type; - ds << item.objective_arg_1; - ds << item.objective_arg_2; - ds << item.objective_arg_3; + ds << item.Path; + ds << item.Timestamp; + ds << item.Category; + ds << item.SourceGame; + ds << item.SourceIndex; + ds << item.ScenarioId; + ds << item.ObjectiveType; + ds << item.ObjectiveArg1; + ds << item.ObjectiveArg2; + ds << item.ObjectiveArg3; - ds << item.internal_name; - ds << item.name; - ds << item.details; + ds << item.InternalName; + ds << item.Name; + ds << item.Details; } private: @@ -192,9 +190,9 @@ private: /** * Reads basic information from a scenario file. */ - static bool GetScenarioInfo(const std::string& path, uint64_t timestamp, scenario_index_entry* entry) + static bool GetScenarioInfo(const std::string& path, uint64_t timestamp, ScenarioIndexEntry* entry) { - log_verbose("GetScenarioInfo(%s, %d, ...)", path.c_str(), timestamp); + LOG_VERBOSE("GetScenarioInfo(%s, %d, ...)", path.c_str(), timestamp); try { std::string extension = Path::GetExtension(path); @@ -209,8 +207,8 @@ private: importer->LoadScenario(path.c_str(), true); if (importer->GetDetails(entry)) { - String::Set(entry->path, sizeof(entry->path), path.c_str()); - entry->timestamp = timestamp; + String::Set(entry->Path, sizeof(entry->Path), path.c_str()); + entry->Timestamp = timestamp; result = true; } } @@ -230,8 +228,8 @@ private: s4Importer->LoadScenario(path.c_str(), true); if (s4Importer->GetDetails(entry)) { - String::Set(entry->path, sizeof(entry->path), path.c_str()); - entry->timestamp = timestamp; + String::Set(entry->Path, sizeof(entry->Path), path.c_str()); + entry->Timestamp = timestamp; result = true; } } @@ -246,22 +244,22 @@ private: auto chunkReader = SawyerChunkReader(stream.get()); const auto header = chunkReader.ReadChunkAs(); - if (header.type == S6_TYPE_SCENARIO) + if (header.Type == S6_TYPE_SCENARIO) { auto info = chunkReader.ReadChunkAs(); // If the name or the details contain a colour code, they might be in UTF-8 already. // This is caused by a bug that was in OpenRCT2 for 3 years. - if (!IsLikelyUTF8(info.name) && !IsLikelyUTF8(info.details)) + if (!IsLikelyUTF8(info.Name) && !IsLikelyUTF8(info.Details)) { - rct2_to_utf8_self(info.name, sizeof(info.name)); - rct2_to_utf8_self(info.details, sizeof(info.details)); + RCT2StringToUTF8Self(info.Name, sizeof(info.Name)); + RCT2StringToUTF8Self(info.Details, sizeof(info.Details)); } *entry = CreateNewScenarioEntry(path, timestamp, &info); return true; } - log_verbose("%s is not a scenario", path.c_str()); + LOG_VERBOSE("%s is not a scenario", path.c_str()); } catch (const std::exception&) { @@ -270,60 +268,60 @@ private: return false; } - static scenario_index_entry CreateNewScenarioEntry(const std::string& path, uint64_t timestamp, RCT2::S6Info* s6Info) + static ScenarioIndexEntry CreateNewScenarioEntry(const std::string& path, uint64_t timestamp, RCT2::S6Info* s6Info) { - scenario_index_entry entry = {}; + ScenarioIndexEntry entry = {}; // Set new entry - String::Set(entry.path, sizeof(entry.path), path.c_str()); - entry.timestamp = timestamp; - entry.category = s6Info->category; - entry.objective_type = s6Info->objective_type; - entry.objective_arg_1 = s6Info->objective_arg_1; - entry.objective_arg_2 = s6Info->objective_arg_2; - entry.objective_arg_3 = s6Info->objective_arg_3; - entry.highscore = nullptr; - if (String::IsNullOrEmpty(s6Info->name)) + String::Set(entry.Path, sizeof(entry.Path), path.c_str()); + entry.Timestamp = timestamp; + entry.Category = s6Info->Category; + entry.ObjectiveType = s6Info->ObjectiveType; + entry.ObjectiveArg1 = s6Info->ObjectiveArg1; + entry.ObjectiveArg2 = s6Info->ObjectiveArg2; + entry.ObjectiveArg3 = s6Info->ObjectiveArg3; + entry.Highscore = nullptr; + if (String::IsNullOrEmpty(s6Info->Name)) { // If the scenario doesn't have a name, set it to the filename - String::Set(entry.name, sizeof(entry.name), Path::GetFileNameWithoutExtension(entry.path).c_str()); + String::Set(entry.Name, sizeof(entry.Name), Path::GetFileNameWithoutExtension(entry.Path).c_str()); } else { - String::Set(entry.name, sizeof(entry.name), s6Info->name); + String::Set(entry.Name, sizeof(entry.Name), s6Info->Name); // Normalise the name to make the scenario as recognisable as possible. - ScenarioSources::NormaliseName(entry.name, sizeof(entry.name), entry.name); + ScenarioSources::NormaliseName(entry.Name, sizeof(entry.Name), entry.Name); } // entry.name will be translated later so keep the untranslated name here - String::Set(entry.internal_name, sizeof(entry.internal_name), entry.name); + String::Set(entry.InternalName, sizeof(entry.InternalName), entry.Name); - String::Set(entry.details, sizeof(entry.details), s6Info->details); + String::Set(entry.Details, sizeof(entry.Details), s6Info->Details); // Look up and store information regarding the origins of this scenario. - source_desc desc; - if (ScenarioSources::TryGetByName(entry.name, &desc)) + SourceDescriptor desc; + if (ScenarioSources::TryGetByName(entry.Name, &desc)) { - entry.sc_id = desc.id; - entry.source_index = desc.index; - entry.source_game = ScenarioSource{ desc.source }; - entry.category = desc.category; + entry.ScenarioId = desc.id; + entry.SourceIndex = desc.index; + entry.SourceGame = ScenarioSource{ desc.source }; + entry.Category = desc.category; } else { - entry.sc_id = SC_UNIDENTIFIED; - entry.source_index = -1; - if (entry.category == SCENARIO_CATEGORY_REAL) + entry.ScenarioId = SC_UNIDENTIFIED; + entry.SourceIndex = -1; + if (entry.Category == SCENARIO_CATEGORY_REAL) { - entry.source_game = ScenarioSource::Real; + entry.SourceGame = ScenarioSource::Real; } else { - entry.source_game = ScenarioSource::Other; + entry.SourceGame = ScenarioSource::Other; } } - scenario_translate(&entry); + ScenarioTranslate(&entry); return entry; } }; @@ -335,8 +333,8 @@ private: std::shared_ptr const _env; ScenarioFileIndex const _fileIndex; - std::vector _scenarios; - std::vector _highscores; + std::vector _scenarios; + std::vector _highscores; public: explicit ScenarioRepository(const std::shared_ptr& env) @@ -374,9 +372,9 @@ public: return _scenarios.size(); } - const scenario_index_entry* GetByIndex(size_t index) const override + const ScenarioIndexEntry* GetByIndex(size_t index) const override { - const scenario_index_entry* result = nullptr; + const ScenarioIndexEntry* result = nullptr; if (index < _scenarios.size()) { result = &_scenarios[index]; @@ -384,11 +382,11 @@ public: return result; } - const scenario_index_entry* GetByFilename(u8string_view filename) const override + const ScenarioIndexEntry* GetByFilename(u8string_view filename) const override { for (const auto& scenario : _scenarios) { - const auto scenarioFilename = Path::GetFileName(scenario.path); + const auto scenarioFilename = Path::GetFileName(scenario.Path); // Note: this is always case insensitive search for cross platform consistency if (String::Equals(filename, scenarioFilename, true)) @@ -399,17 +397,17 @@ public: return nullptr; } - const scenario_index_entry* GetByInternalName(const utf8* name) const override + const ScenarioIndexEntry* GetByInternalName(const utf8* name) const override { for (size_t i = 0; i < _scenarios.size(); i++) { - const scenario_index_entry* scenario = &_scenarios[i]; + const ScenarioIndexEntry* scenario = &_scenarios[i]; - if (scenario->source_game == ScenarioSource::Other && scenario->sc_id == SC_UNIDENTIFIED) + if (scenario->SourceGame == ScenarioSource::Other && scenario->ScenarioId == SC_UNIDENTIFIED) continue; // Note: this is always case insensitive search for cross platform consistency - if (String::Equals(name, scenario->internal_name, true)) + if (String::Equals(name, scenario->InternalName, true)) { return &_scenarios[i]; } @@ -417,11 +415,11 @@ public: return nullptr; } - const scenario_index_entry* GetByPath(const utf8* path) const override + const ScenarioIndexEntry* GetByPath(const utf8* path) const override { for (const auto& scenario : _scenarios) { - if (Path::Equals(path, scenario.path)) + if (Path::Equals(path, scenario.Path)) { return &scenario; } @@ -435,14 +433,14 @@ public: // not getting recorded, see #4951. Scan(language); - scenario_index_entry* scenario = GetByFilename(scenarioFileName); + ScenarioIndexEntry* scenario = GetByFilename(scenarioFileName); - // Check if this is an RCTC scenario that corresponds to a known RCT1/2 scenario or vice versa, see #12626 if (scenario == nullptr) { const std::string scenarioBaseName = Path::GetFileNameWithoutExtension(scenarioFileName); const std::string scenarioExtension = Path::GetExtension(scenarioFileName); + // Check if this is an RCTC scenario that corresponds to a known RCT1/2 scenario or vice versa, see #12626 if (String::Equals(scenarioExtension, ".sea", true)) { // Get scenario using RCT2 style name of RCTC scenario @@ -453,32 +451,35 @@ public: // Get scenario using RCTC style name of RCT2 scenario scenario = GetByFilename((scenarioBaseName + ".sea").c_str()); } + // gScenarioFileName .Park scenarios is the full file path instead of just , so need to convert + else if (String::Equals(scenarioExtension, ".park", true)) + { + scenario = GetByFilename((scenarioBaseName + ".park").c_str()); + } } if (scenario != nullptr) { // Check if record company value has been broken or the highscore is the same but no name is registered - scenario_highscore_entry* highscore = scenario->highscore; + ScenarioHighscoreEntry* highscore = scenario->Highscore; if (highscore == nullptr || companyValue > highscore->company_value - || (String::IsNullOrEmpty(highscore->name) && companyValue == highscore->company_value)) + || (highscore->name.empty() && companyValue == highscore->company_value)) { if (highscore == nullptr) { highscore = InsertHighscore(); highscore->timestamp = Platform::GetDatetimeNowUTC(); - scenario->highscore = highscore; + scenario->Highscore = highscore; } else { - if (!String::IsNullOrEmpty(highscore->name)) + if (!highscore->name.empty()) { highscore->timestamp = Platform::GetDatetimeNowUTC(); } - SafeFree(highscore->fileName); - SafeFree(highscore->name); } - highscore->fileName = String::Duplicate(Path::GetFileName(scenario->path)); - highscore->name = String::Duplicate(name); + highscore->fileName = Path::GetFileName(scenario->Path); + highscore->name = name != nullptr ? name : ""; highscore->company_value = companyValue; SaveHighscores(); return true; @@ -488,16 +489,25 @@ public: } private: - scenario_index_entry* GetByFilename(const utf8* filename) + ScenarioIndexEntry* GetByFilename(u8string_view filename) { - const ScenarioRepository* repo = this; - return const_cast(repo->GetByFilename(filename)); + for (auto& scenario : _scenarios) + { + const auto scenarioFilename = Path::GetFileName(scenario.Path); + + // Note: this is always case insensitive search for cross platform consistency + if (String::Equals(filename, scenarioFilename, true)) + { + return &scenario; + } + } + return nullptr; } - scenario_index_entry* GetByPath(const utf8* path) + ScenarioIndexEntry* GetByPath(const utf8* path) { const ScenarioRepository* repo = this; - return const_cast(repo->GetByPath(path)); + return const_cast(repo->GetByPath(path)); } /** @@ -540,9 +550,9 @@ private: File::WriteAllBytes(dstPath, mpdat.data(), mpdat.size()); } - void AddScenario(const scenario_index_entry& entry) + void AddScenario(const ScenarioIndexEntry& entry) { - auto filename = Path::GetFileName(entry.path); + auto filename = Path::GetFileName(entry.Path); if (!String::Equals(filename, "")) { @@ -550,10 +560,10 @@ private: if (existingEntry != nullptr) { std::string conflictPath; - if (existingEntry->timestamp > entry.timestamp) + if (existingEntry->Timestamp > entry.Timestamp) { // Existing entry is more recent - conflictPath = String::ToStd(existingEntry->path); + conflictPath = String::ToStd(existingEntry->Path); // Overwrite existing entry with this one *existingEntry = entry; @@ -561,7 +571,7 @@ private: else { // This entry is more recent - conflictPath = entry.path; + conflictPath = entry.Path; } Console::WriteLine("Scenario conflict: '%s' ignored because it is newer.", conflictPath.c_str()); } @@ -572,7 +582,7 @@ private: } else { - log_error("Tried to add scenario with an empty filename!"); + LOG_ERROR("Tried to add scenario with an empty filename!"); } } @@ -581,15 +591,15 @@ private: if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) { std::sort( - _scenarios.begin(), _scenarios.end(), [](const scenario_index_entry& a, const scenario_index_entry& b) -> bool { - return scenario_index_entry_CompareByIndex(a, b) < 0; + _scenarios.begin(), _scenarios.end(), [](const ScenarioIndexEntry& a, const ScenarioIndexEntry& b) -> bool { + return ScenarioIndexEntryCompareByIndex(a, b) < 0; }); } else { std::sort( - _scenarios.begin(), _scenarios.end(), [](const scenario_index_entry& a, const scenario_index_entry& b) -> bool { - return scenario_index_entry_CompareByCategory(a, b) < 0; + _scenarios.begin(), _scenarios.end(), [](const ScenarioIndexEntry& a, const ScenarioIndexEntry& b) -> bool { + return ScenarioIndexEntryCompareByCategory(a, b) < 0; }); } } @@ -617,9 +627,9 @@ private: uint32_t numHighscores = fs.ReadValue(); for (uint32_t i = 0; i < numHighscores; i++) { - scenario_highscore_entry* highscore = InsertHighscore(); - highscore->fileName = fs.ReadString(); - highscore->name = fs.ReadString(); + ScenarioHighscoreEntry* highscore = InsertHighscore(); + highscore->fileName = fs.ReadStdString(); + highscore->name = fs.ReadStdString(); highscore->company_value = fileVersion == 1 ? fs.ReadValue() : fs.ReadValue(); highscore->timestamp = fs.ReadValue(); } @@ -679,9 +689,8 @@ private: // Check if legacy highscore is better if (scBasic.CompanyValue > highscore->company_value) { - SafeFree(highscore->name); - std::string name = rct2_to_utf8(scBasic.CompletedBy, RCT2LanguageId::EnglishUK); - highscore->name = String::Duplicate(name.c_str()); + std::string name = RCT2StringToUTF8(scBasic.CompletedBy, RCT2LanguageId::EnglishUK); + highscore->name = name; highscore->company_value = scBasic.CompanyValue; highscore->timestamp = DATETIME64_MIN; break; @@ -690,10 +699,10 @@ private: } if (notFound) { - scenario_highscore_entry* highscore = InsertHighscore(); - highscore->fileName = String::Duplicate(scBasic.Path); - std::string name = rct2_to_utf8(scBasic.CompletedBy, RCT2LanguageId::EnglishUK); - highscore->name = String::Duplicate(name.c_str()); + ScenarioHighscoreEntry* highscore = InsertHighscore(); + highscore->fileName = scBasic.Path; + std::string name = RCT2StringToUTF8(scBasic.CompletedBy, RCT2LanguageId::EnglishUK); + highscore->name = name; highscore->company_value = scBasic.CompanyValue; highscore->timestamp = DATETIME64_MIN; } @@ -715,15 +724,14 @@ private: { for (auto highscore : _highscores) { - scenario_highscore_free(highscore); + ScenarioHighscoreFree(highscore); } _highscores.clear(); } - scenario_highscore_entry* InsertHighscore() + ScenarioHighscoreEntry* InsertHighscore() { - auto highscore = new scenario_highscore_entry(); - std::memset(highscore, 0, sizeof(scenario_highscore_entry)); + auto highscore = new ScenarioHighscoreEntry(); _highscores.push_back(highscore); return highscore; } @@ -732,10 +740,10 @@ private: { for (auto& highscore : _highscores) { - scenario_index_entry* scenario = GetByFilename(highscore->fileName); + ScenarioIndexEntry* scenario = GetByFilename(highscore->fileName); if (scenario != nullptr) { - scenario->highscore = highscore; + scenario->Highscore = highscore; } } } @@ -750,7 +758,7 @@ private: fs.WriteValue(static_cast(_highscores.size())); for (size_t i = 0; i < _highscores.size(); i++) { - const scenario_highscore_entry* highscore = _highscores[i]; + const ScenarioHighscoreEntry* highscore = _highscores[i]; fs.WriteString(highscore->fileName); fs.WriteString(highscore->name); fs.WriteValue(highscore->company_value); @@ -774,25 +782,25 @@ IScenarioRepository* GetScenarioRepository() return GetContext()->GetScenarioRepository(); } -void scenario_repository_scan() +void ScenarioRepositoryScan() { IScenarioRepository* repo = GetScenarioRepository(); repo->Scan(LocalisationService_GetCurrentLanguage()); } -size_t scenario_repository_get_count() +size_t ScenarioRepositoryGetCount() { IScenarioRepository* repo = GetScenarioRepository(); return repo->GetCount(); } -const scenario_index_entry* scenario_repository_get_by_index(size_t index) +const ScenarioIndexEntry* ScenarioRepositoryGetByIndex(size_t index) { IScenarioRepository* repo = GetScenarioRepository(); return repo->GetByIndex(index); } -bool scenario_repository_try_record_highscore(const utf8* scenarioFileName, money64 companyValue, const utf8* name) +bool ScenarioRepositoryTryRecordHighscore(const utf8* scenarioFileName, money64 companyValue, const utf8* name) { IScenarioRepository* repo = GetScenarioRepository(); return repo->TryRecordHighscore(LocalisationService_GetCurrentLanguage(), scenarioFileName, companyValue, name); diff --git a/src/openrct2/scenario/ScenarioRepository.h b/src/openrct2/scenario/ScenarioRepository.h index 41620ead6f..f887147ee0 100644 --- a/src/openrct2/scenario/ScenarioRepository.h +++ b/src/openrct2/scenario/ScenarioRepository.h @@ -1,5 +1,6 @@ + /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,18 +11,19 @@ #pragma once #include "../common.h" +#include "../core/String.hpp" #include "../scenario/Scenario.h" #include -struct rct_object_entry; +struct RCTObjectEntry; -struct scenario_highscore_entry +struct ScenarioHighscoreEntry { - utf8* fileName; - utf8* name; - money64 company_value; - datetime64 timestamp; + u8string fileName; + u8string name; + money64 company_value{}; + datetime64 timestamp{}; }; enum class ScenarioSource : uint8_t @@ -38,27 +40,27 @@ enum class ScenarioSource : uint8_t Other }; -struct scenario_index_entry +struct ScenarioIndexEntry { - utf8 path[MAX_PATH]; - uint64_t timestamp; + utf8 Path[MAX_PATH]; + uint64_t Timestamp; // Category / sequence - uint8_t category; - ScenarioSource source_game; - int16_t source_index = -1; - uint16_t sc_id; + uint8_t Category; + ScenarioSource SourceGame; + int16_t SourceIndex = -1; + uint16_t ScenarioId; // Objective - uint8_t objective_type; - uint8_t objective_arg_1; - int64_t objective_arg_2; - int16_t objective_arg_3; - scenario_highscore_entry* highscore = nullptr; + uint8_t ObjectiveType; + uint8_t ObjectiveArg1; + int64_t ObjectiveArg2; + int16_t ObjectiveArg3; + ScenarioHighscoreEntry* Highscore = nullptr; - utf8 internal_name[64]; // Untranslated name - utf8 name[64]; // Translated name - utf8 details[256]; + utf8 InternalName[64]; // Untranslated name + utf8 Name[64]; // Translated name + utf8 Details[256]; }; namespace OpenRCT2 @@ -76,13 +78,13 @@ struct IScenarioRepository virtual void Scan(int32_t language) abstract; virtual size_t GetCount() const abstract; - virtual const scenario_index_entry* GetByIndex(size_t index) const abstract; - virtual const scenario_index_entry* GetByFilename(u8string_view filename) const abstract; + virtual const ScenarioIndexEntry* GetByIndex(size_t index) const abstract; + virtual const ScenarioIndexEntry* GetByFilename(u8string_view filename) const abstract; /** * Does not return custom scenarios due to the fact that they may have the same name. */ - virtual const scenario_index_entry* GetByInternalName(const utf8* name) const abstract; - virtual const scenario_index_entry* GetByPath(const utf8* path) const abstract; + virtual const ScenarioIndexEntry* GetByInternalName(const utf8* name) const abstract; + virtual const ScenarioIndexEntry* GetByPath(const utf8* path) const abstract; virtual bool TryRecordHighscore( int32_t language, const utf8* scenarioFileName, money64 companyValue, const utf8* name) abstract; @@ -92,9 +94,8 @@ struct IScenarioRepository const std::shared_ptr& env); [[nodiscard]] IScenarioRepository* GetScenarioRepository(); -void scenario_repository_scan(); -[[nodiscard]] size_t scenario_repository_get_count(); -[[nodiscard]] const scenario_index_entry* scenario_repository_get_by_index(size_t index); -[[nodiscard]] bool scenario_repository_try_record_highscore( - const utf8* scenarioFileName, money64 companyValue, const utf8* name); -void scenario_translate(scenario_index_entry* scenarioEntry); +void ScenarioRepositoryScan(); +[[nodiscard]] size_t ScenarioRepositoryGetCount(); +[[nodiscard]] const ScenarioIndexEntry* ScenarioRepositoryGetByIndex(size_t index); +[[nodiscard]] bool ScenarioRepositoryTryRecordHighscore(const utf8* scenarioFileName, money64 companyValue, const utf8* name); +void ScenarioTranslate(ScenarioIndexEntry* scenarioEntry); diff --git a/src/openrct2/scenario/ScenarioSources.cpp b/src/openrct2/scenario/ScenarioSources.cpp index d02eec5a74..bc0f3e7c78 100644 --- a/src/openrct2/scenario/ScenarioSources.cpp +++ b/src/openrct2/scenario/ScenarioSources.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -358,7 +358,7 @@ namespace ScenarioSources #pragma endregion - bool TryGetByName(const utf8* name, source_desc* outDesc) + bool TryGetByName(const utf8* name, SourceDescriptor* outDesc) { Guard::ArgumentNotNull(outDesc, GUARD_LINE); @@ -389,7 +389,7 @@ namespace ScenarioSources return false; } - bool TryGetById(uint8_t id, source_desc* outDesc) + bool TryGetById(uint8_t id, SourceDescriptor* outDesc) { Guard::ArgumentNotNull(outDesc, GUARD_LINE); @@ -429,7 +429,7 @@ namespace ScenarioSources { if (nameLength >= 4 && (name[3] == '1' || name[3] == '2')) { - log_verbose("Stripping RCT/1/2 from name: %s", name); + LOG_VERBOSE("Stripping RCT/1/2 from name: %s", name); String::Set(buffer, bufferSize, name + 4); } else @@ -447,7 +447,7 @@ namespace ScenarioSources { if (String::Equals(alias.Alternative, name)) { - log_verbose("Found alias: %s; will treat as: %s", name, alias.Original); + LOG_VERBOSE("Found alias: %s; will treat as: %s", name, alias.Original); String::Set(buffer, bufferSize, alias.Original); } } diff --git a/src/openrct2/scenario/ScenarioSources.h b/src/openrct2/scenario/ScenarioSources.h index 5297fbbb10..9370ea987c 100644 --- a/src/openrct2/scenario/ScenarioSources.h +++ b/src/openrct2/scenario/ScenarioSources.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,7 +12,7 @@ #include "../common.h" #include "../core/String.hpp" -struct source_desc +struct SourceDescriptor { const utf8* title; uint8_t id; @@ -23,8 +23,8 @@ struct source_desc namespace ScenarioSources { - bool TryGetByName(const utf8* name, source_desc* outDesc); - bool TryGetById(uint8_t id, source_desc* outDesc); + bool TryGetByName(const utf8* name, SourceDescriptor* outDesc); + bool TryGetById(uint8_t id, SourceDescriptor* outDesc); void NormaliseName(utf8* buffer, size_t bufferSize, const utf8* name); } // namespace ScenarioSources diff --git a/src/openrct2/scripting/Duktape.hpp b/src/openrct2/scripting/Duktape.hpp index d9b01fb4de..ec79942c59 100644 --- a/src/openrct2/scripting/Duktape.hpp +++ b/src/openrct2/scripting/Duktape.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/HookEngine.cpp b/src/openrct2/scripting/HookEngine.cpp index a6ea12d0d8..dd4e0398b8 100644 --- a/src/openrct2/scripting/HookEngine.cpp +++ b/src/openrct2/scripting/HookEngine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/HookEngine.h b/src/openrct2/scripting/HookEngine.h index 5df1bce299..cacc12edfa 100644 --- a/src/openrct2/scripting/HookEngine.h +++ b/src/openrct2/scripting/HookEngine.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/IconNames.hpp b/src/openrct2/scripting/IconNames.hpp index 6a2ec42f5c..d26040e5d3 100644 --- a/src/openrct2/scripting/IconNames.hpp +++ b/src/openrct2/scripting/IconNames.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -84,6 +84,7 @@ namespace OpenRCT2::Scripting { "rct1_simulate_off_pressed", SPR_G2_RCT1_SIMULATE_BUTTON_1 }, { "rct1_simulate_on", SPR_G2_RCT1_SIMULATE_BUTTON_2 }, { "rct1_simulate_on_pressed", SPR_G2_RCT1_SIMULATE_BUTTON_3 }, + { "infinity", SPR_G2_INFINITY }, { "normal_selection_6x6", SPR_G2_LAND_TOOL_SIZE_6 }, { "mountain_tool_even", SPR_G2_MOUNTAIN_TOOL_EVEN }, { "mountain_tool_odd", SPR_G2_MOUNTAIN_TOOL_ODD }, diff --git a/src/openrct2/scripting/Plugin.cpp b/src/openrct2/scripting/Plugin.cpp index 699ccf5a7c..6ff1fd6f70 100644 --- a/src/openrct2/scripting/Plugin.cpp +++ b/src/openrct2/scripting/Plugin.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -161,6 +161,12 @@ PluginMetadata Plugin::GetMetadata(const DukValue& dukMetadata) { metadata.TargetApiVersion = dukTargetApiVersion.as_int(); } + else + { + LOG_ERROR( + u8"Plug-in “%s” does not specify a target API version or specifies it incorrectly. Emulating deprecated APIs.", + metadata.Name.c_str()); + } auto dukAuthors = dukMetadata["authors"]; dukAuthors.push(); @@ -194,7 +200,7 @@ PluginType Plugin::ParsePluginType(std::string_view type) void Plugin::CheckForLicence(const DukValue& dukLicence, std::string_view pluginName) { if (dukLicence.type() != DukValue::Type::STRING || dukLicence.as_string().empty()) - log_error("Plugin %s does not specify a licence", std::string(pluginName).c_str()); + LOG_ERROR("Plugin %s does not specify a licence", std::string(pluginName).c_str()); } int32_t Plugin::GetTargetAPIVersion() const diff --git a/src/openrct2/scripting/Plugin.h b/src/openrct2/scripting/Plugin.h index 3e02775e10..238e79e3ac 100644 --- a/src/openrct2/scripting/Plugin.h +++ b/src/openrct2/scripting/Plugin.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index 76eee91c90..02eae57bc3 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -422,6 +422,7 @@ void ScriptEngine::Initialise() ScVehicle::Register(ctx); ScPeep::Register(ctx); ScGuest::Register(ctx); + ScThought::Register(ctx); # ifndef DISABLE_NETWORK ScSocket::Register(ctx); ScListener::Register(ctx); @@ -555,7 +556,7 @@ void ScriptEngine::RefreshPlugins() } // Turn on hot reload if not already enabled - if (!_hotReloadingInitialised && gConfigPlugin.EnableHotReloading && network_get_mode() == NETWORK_MODE_NONE) + if (!_hotReloadingInitialised && gConfigPlugin.EnableHotReloading && NetworkGetMode() == NETWORK_MODE_NONE) { SetupHotReloading(); } @@ -875,7 +876,7 @@ void ScriptEngine::StartTransientPlugins() bool ScriptEngine::ShouldStartPlugin(const std::shared_ptr& plugin) { - auto networkMode = network_get_mode(); + auto networkMode = NetworkGetMode(); if (networkMode == NETWORK_MODE_CLIENT) { // Only client plugins and plugins downloaded from server should be started @@ -1018,8 +1019,13 @@ void ScriptEngine::RemoveNetworkPlugins() auto it = _plugins.begin(); while (it != _plugins.end()) { - if (!(*it)->HasPath()) + auto plugin = (*it); + if (!plugin->HasPath()) { + StopPlugin(plugin); + UnloadPlugin(plugin); + LogPluginInfo(plugin, "Unregistered network plugin"); + it = _plugins.erase(it); } else @@ -1029,16 +1035,16 @@ void ScriptEngine::RemoveNetworkPlugins() } } -GameActions::Result ScriptEngine::QueryOrExecuteCustomGameAction(std::string_view id, std::string_view args, bool isExecute) +GameActions::Result ScriptEngine::QueryOrExecuteCustomGameAction(const CustomAction& customAction, bool isExecute) { - std::string actionz = std::string(id); + std::string actionz = customAction.GetId(); auto kvp = _customActions.find(actionz); if (kvp != _customActions.end()) { - const auto& customAction = kvp->second; + const auto& customActionInfo = kvp->second; // Deserialise the JSON args - std::string argsz(args); + std::string argsz = customAction.GetJson(); auto dukArgs = DuktapeTryParseJson(_context, argsz); if (!dukArgs) @@ -1049,15 +1055,33 @@ GameActions::Result ScriptEngine::QueryOrExecuteCustomGameAction(std::string_vie return action; } + std::vector pluginCallArgs; + if (GetTargetAPIVersion() <= API_VERSION_68_CUSTOM_ACTION_ARGS) + { + pluginCallArgs = { *dukArgs }; + } + else + { + DukObject obj(_context); + obj.Set("action", actionz); + obj.Set("args", *dukArgs); + obj.Set("player", customAction.GetPlayer()); + obj.Set("type", EnumValue(customAction.GetType())); + + auto flags = customAction.GetActionFlags(); + obj.Set("isClientOnly", (flags & GameActions::Flags::ClientOnly) != 0); + pluginCallArgs = { obj.Take() }; + } + // Ready to call plugin handler DukValue dukResult; if (!isExecute) { - dukResult = ExecutePluginCall(customAction.Owner, customAction.Query, { *dukArgs }, false); + dukResult = ExecutePluginCall(customActionInfo.Owner, customActionInfo.Query, pluginCallArgs, false); } else { - dukResult = ExecutePluginCall(customAction.Owner, customAction.Execute, { *dukArgs }, true); + dukResult = ExecutePluginCall(customActionInfo.Owner, customActionInfo.Execute, pluginCallArgs, true); } return DukToGameActionResult(dukResult); } @@ -1130,12 +1154,14 @@ DukValue ScriptEngine::GameActionResultToDuk(const GameAction& action, const Gam DukStackFrame frame(_context); DukObject obj(_context); - auto player = action.GetPlayer(); - if (player != -1) + obj.Set("error", static_cast(result.Error)); + if (result.Error != GameActions::Status::Ok) { - obj.Set("player", action.GetPlayer()); + obj.Set("errorTitle", result.GetErrorTitle()); + obj.Set("errorMessage", result.GetErrorMessage()); } - if (result.Cost != MONEY32_UNDEFINED) + + if (result.Cost != MONEY64_UNDEFINED) { obj.Set("cost", result.Cost); } @@ -1143,12 +1169,12 @@ DukValue ScriptEngine::GameActionResultToDuk(const GameAction& action, const Gam { obj.Set("position", ToDuk(_context, result.Position)); } - if (result.Expenditure != ExpenditureType::Count) { obj.Set("expenditureType", ExpenditureTypeToString(result.Expenditure)); } + // RideCreateAction only if (action.GetType() == GameCommand::CreateRide) { if (result.Error == GameActions::Status::Ok) @@ -1157,6 +1183,7 @@ DukValue ScriptEngine::GameActionResultToDuk(const GameAction& action, const Gam obj.Set("ride", rideIndex.ToUnderlying()); } } + // StaffHireNewAction only else if (action.GetType() == GameCommand::HireNewStaffMember) { if (result.Error == GameActions::Status::Ok) @@ -1270,11 +1297,10 @@ const static EnumMap ActionNameToType = { { "bannersetcolour", GameCommand::SetBannerColour }, { "bannersetname", GameCommand::SetBannerName }, { "bannersetstyle", GameCommand::SetBannerStyle }, - { "changemapsize", GameCommand::ChangeMapSize }, { "clearscenery", GameCommand::ClearScenery }, { "climateset", GameCommand::SetClimate }, { "footpathplace", GameCommand::PlacePath }, - { "footpathplacefromtrack", GameCommand::PlacePathFromTrack }, + { "footpathlayoutplace", GameCommand::PlacePathLayout }, { "footpathremove", GameCommand::RemovePath }, { "footpathadditionplace", GameCommand::PlaceFootpathAddition }, { "footpathadditionremove", GameCommand::RemoveFootpathAddition }, @@ -1285,25 +1311,27 @@ const static EnumMap ActionNameToType = { { "landraise", GameCommand::RaiseLand }, { "landsetheight", GameCommand::SetLandHeight }, { "landsetrights", GameCommand::SetLandOwnership }, - { "landsmoothaction", GameCommand::EditLandSmooth }, + { "landsmooth", GameCommand::EditLandSmooth }, { "largesceneryplace", GameCommand::PlaceLargeScenery }, { "largesceneryremove", GameCommand::RemoveLargeScenery }, - { "largescenerysetcolour", GameCommand::SetSceneryColour }, + { "largescenerysetcolour", GameCommand::SetLargeSceneryColour }, { "loadorquit", GameCommand::LoadOrQuit }, + { "mapchangesize", GameCommand::ChangeMapSize }, { "mazeplacetrack", GameCommand::PlaceMazeDesign }, { "mazesettrack", GameCommand::SetMazeTrack }, { "networkmodifygroup", GameCommand::ModifyGroups }, + { "parkentranceplace", GameCommand::PlaceParkEntrance }, { "parkentranceremove", GameCommand::RemoveParkEntrance }, { "parkmarketing", GameCommand::StartMarketingCampaign }, { "parksetdate", GameCommand::SetDate }, + { "parksetentrancefee", GameCommand::SetParkEntranceFee }, { "parksetloan", GameCommand::SetCurrentLoan }, { "parksetname", GameCommand::SetParkName }, { "parksetparameter", GameCommand::SetParkOpen }, { "parksetresearchfunding", GameCommand::SetResearchFunding }, { "pausetoggle", GameCommand::TogglePause }, { "peeppickup", GameCommand::PickupGuest }, - { "placeparkentrance", GameCommand::PlaceParkEntrance }, - { "placepeepspawn", GameCommand::PlacePeepSpawn }, + { "peepspawnplace", GameCommand::PlacePeepSpawn }, { "playerkick", GameCommand::KickPlayer }, { "playersetgroup", GameCommand::SetPlayerGroup }, { "ridecreate", GameCommand::CreateRide }, @@ -1317,14 +1345,14 @@ const static EnumMap ActionNameToType = { { "ridesetprice", GameCommand::SetRidePrice }, { "ridesetsetting", GameCommand::SetRideSetting }, { "ridesetstatus", GameCommand::SetRideStatus }, - { "ridesetvehicles", GameCommand::SetRideVehicles }, + { "ridesetvehicle", GameCommand::SetRideVehicles }, { "scenariosetsetting", GameCommand::EditScenarioOptions }, - { "setcheataction", GameCommand::Cheat }, - { "setparkentrancefee", GameCommand::SetParkEntranceFee }, + { "setcheat", GameCommand::Cheat }, { "signsetname", GameCommand::SetSignName }, { "signsetstyle", GameCommand::SetSignStyle }, { "smallsceneryplace", GameCommand::PlaceScenery }, { "smallsceneryremove", GameCommand::RemoveScenery }, + { "smallscenerysetcolour", GameCommand::SetSceneryColour}, { "stafffire", GameCommand::FireStaffMember }, { "staffhire", GameCommand::HireNewStaffMember }, { "staffsetcolour", GameCommand::SetStaffColour }, @@ -1464,7 +1492,13 @@ std::unique_ptr ScriptEngine::CreateGameAction(const std::string& ac auto jsonz = duk_json_encode(ctx, -1); auto json = std::string(jsonz); duk_pop(ctx); - return std::make_unique(actionid, json); + auto customAction = std::make_unique(actionid, json); + + if (customAction->GetPlayer() == -1 && NetworkGetMode() != NETWORK_MODE_NONE) + { + customAction->SetPlayer(NetworkGetCurrentPlayerId()); + } + return customAction; } void ScriptEngine::InitSharedStorage() @@ -1689,7 +1723,7 @@ std::string OpenRCT2::Scripting::ProcessString(const DukValue& value) bool OpenRCT2::Scripting::IsGameStateMutable() { // Allow single player to alter game state anywhere - if (network_get_mode() == NETWORK_MODE_NONE) + if (NetworkGetMode() == NETWORK_MODE_NONE) { return true; } @@ -1702,7 +1736,7 @@ bool OpenRCT2::Scripting::IsGameStateMutable() void OpenRCT2::Scripting::ThrowIfGameStateNotMutable() { // Allow single player to alter game state anywhere - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { auto& scriptEngine = GetContext()->GetScriptEngine(); auto& execInfo = scriptEngine.GetExecInfo(); diff --git a/src/openrct2/scripting/ScriptEngine.h b/src/openrct2/scripting/ScriptEngine.h index f2a0db4c1d..89717959ff 100644 --- a/src/openrct2/scripting/ScriptEngine.h +++ b/src/openrct2/scripting/ScriptEngine.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,6 +11,7 @@ #ifdef ENABLE_SCRIPTING +# include "../actions/CustomAction.h" # include "../common.h" # include "../core/FileWatcher.h" # include "../management/Finance.h" @@ -46,11 +47,12 @@ namespace OpenRCT2 namespace OpenRCT2::Scripting { - static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 65; + static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 70; // Versions marking breaking changes. static constexpr int32_t API_VERSION_33_PEEP_DEPRECATION = 33; static constexpr int32_t API_VERSION_63_G2_REORDER = 63; + static constexpr int32_t API_VERSION_68_CUSTOM_ACTION_ARGS = 68; # ifndef DISABLE_NETWORK class ScSocketBase; @@ -208,6 +210,20 @@ namespace OpenRCT2::Scripting return _plugins; } + std::vector> GetRemotePlugins() + { + std::vector> res; + for (const auto& plugin : _plugins) + { + const auto& metadata = plugin->GetMetadata(); + if (metadata.Type == OpenRCT2::Scripting::PluginType::Remote) + { + res.push_back(plugin); + } + } + return res; + } + void ClearParkStorage(); std::string GetParkStorageAsJSON(); void SetParkStorageFromJSON(std::string_view value); @@ -236,12 +252,12 @@ namespace OpenRCT2::Scripting void AddNetworkPlugin(std::string_view code); void RemoveNetworkPlugins(); - [[nodiscard]] GameActions::Result QueryOrExecuteCustomGameAction( - std::string_view id, std::string_view args, bool isExecute); + [[nodiscard]] GameActions::Result QueryOrExecuteCustomGameAction(const CustomAction& action, bool isExecute); bool RegisterCustomAction( const std::shared_ptr& plugin, std::string_view action, const DukValue& query, const DukValue& execute); void RunGameActionHooks(const GameAction& action, GameActions::Result& result, bool isExecute); [[nodiscard]] std::unique_ptr CreateGameAction(const std::string& actionid, const DukValue& args); + [[nodiscard]] DukValue GameActionResultToDuk(const GameAction& action, const GameActions::Result& result); void SaveSharedStorage(); @@ -275,7 +291,6 @@ namespace OpenRCT2::Scripting void ProcessREPL(); void RemoveCustomGameActions(const std::shared_ptr& plugin); [[nodiscard]] GameActions::Result DukToGameActionResult(const DukValue& d); - [[nodiscard]] DukValue GameActionResultToDuk(const GameAction& action, const GameActions::Result& result); static std::string_view ExpenditureTypeToString(ExpenditureType expenditureType); static ExpenditureType StringToExpenditureType(std::string_view expenditureType); diff --git a/src/openrct2/scripting/bindings/entity/ScEntity.hpp b/src/openrct2/scripting/bindings/entity/ScEntity.hpp index d070ba2e3a..a2fcfe829d 100644 --- a/src/openrct2/scripting/bindings/entity/ScEntity.hpp +++ b/src/openrct2/scripting/bindings/entity/ScEntity.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -46,7 +46,7 @@ namespace OpenRCT2::Scripting if (entity == nullptr) return ToDuk(ctx, nullptr); - return ToDuk(ctx, entity->sprite_index.ToUnderlying()); + return ToDuk(ctx, entity->Id.ToUnderlying()); } std::string type_get() const diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index 71c08b49eb..92417d5b59 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,9 +12,138 @@ # include "ScGuest.hpp" # include "../../../entity/Guest.h" +# include "../../../localisation/Localisation.h" namespace OpenRCT2::Scripting { + static const DukEnumMap ThoughtTypeMap({ + { "cant_afford_ride", PeepThoughtType::CantAffordRide }, + { "spent_money", PeepThoughtType::SpentMoney }, + { "sick", PeepThoughtType::Sick }, + { "very_sick", PeepThoughtType::VerySick }, + { "more_thrilling", PeepThoughtType::MoreThrilling }, + { "intense", PeepThoughtType::Intense }, + { "havent_finished", PeepThoughtType::HaventFinished }, + { "sickening", PeepThoughtType::Sickening }, + { "bad_value", PeepThoughtType::BadValue }, + { "go_home", PeepThoughtType::GoHome }, + { "good_value", PeepThoughtType::GoodValue }, + { "already_got", PeepThoughtType::AlreadyGot }, + { "cant_afford_item", PeepThoughtType::CantAffordItem }, + { "not_hungry", PeepThoughtType::NotHungry }, + { "not_thirsty", PeepThoughtType::NotThirsty }, + { "drowning", PeepThoughtType::Drowning }, + { "lost", PeepThoughtType::Lost }, + { "was_great", PeepThoughtType::WasGreat }, + { "queuing_ages", PeepThoughtType::QueuingAges }, + { "tired", PeepThoughtType::Tired }, + { "hungry", PeepThoughtType::Hungry }, + { "thirsty", PeepThoughtType::Thirsty }, + { "toilet", PeepThoughtType::Toilet }, + { "cant_find", PeepThoughtType::CantFind }, + { "not_paying", PeepThoughtType::NotPaying }, + { "not_while_raining", PeepThoughtType::NotWhileRaining }, + { "bad_litter", PeepThoughtType::BadLitter }, + { "cant_find_exit", PeepThoughtType::CantFindExit }, + { "get_off", PeepThoughtType::GetOff }, + { "get_out", PeepThoughtType::GetOut }, + { "not_safe", PeepThoughtType::NotSafe }, + { "path_disgusting", PeepThoughtType::PathDisgusting }, + { "crowded", PeepThoughtType::Crowded }, + { "vandalism", PeepThoughtType::Vandalism }, + { "scenery", PeepThoughtType::Scenery }, + { "very_clean", PeepThoughtType::VeryClean }, + { "fountains", PeepThoughtType::Fountains }, + { "music", PeepThoughtType::Music }, + { "balloon", PeepThoughtType::Balloon }, + { "toy", PeepThoughtType::Toy }, + { "map", PeepThoughtType::Map }, + { "photo", PeepThoughtType::Photo }, + { "umbrella", PeepThoughtType::Umbrella }, + { "drink", PeepThoughtType::Drink }, + { "burger", PeepThoughtType::Burger }, + { "chips", PeepThoughtType::Chips }, + { "ice_cream", PeepThoughtType::IceCream }, + { "candyfloss", PeepThoughtType::Candyfloss }, + { "pizza", PeepThoughtType::Pizza }, + { "popcorn", PeepThoughtType::Popcorn }, + { "hot_dog", PeepThoughtType::HotDog }, + { "tentacle", PeepThoughtType::Tentacle }, + { "hat", PeepThoughtType::Hat }, + { "toffee_apple", PeepThoughtType::ToffeeApple }, + { "tshirt", PeepThoughtType::Tshirt }, + { "doughnut", PeepThoughtType::Doughnut }, + { "coffee", PeepThoughtType::Coffee }, + { "chicken", PeepThoughtType::Chicken }, + { "lemonade", PeepThoughtType::Lemonade }, + { "wow", PeepThoughtType::Wow }, + { "wow2", PeepThoughtType::Wow2 }, + { "watched", PeepThoughtType::Watched }, + { "balloon_much", PeepThoughtType::BalloonMuch }, + { "toy_much", PeepThoughtType::ToyMuch }, + { "map_much", PeepThoughtType::MapMuch }, + { "photo_much", PeepThoughtType::PhotoMuch }, + { "umbrella_much", PeepThoughtType::UmbrellaMuch }, + { "drink_much", PeepThoughtType::DrinkMuch }, + { "burger_much", PeepThoughtType::BurgerMuch }, + { "chips_much", PeepThoughtType::ChipsMuch }, + { "ice_cream_much", PeepThoughtType::IceCreamMuch }, + { "candyfloss_much", PeepThoughtType::CandyflossMuch }, + { "pizza_much", PeepThoughtType::PizzaMuch }, + { "popcorn_much", PeepThoughtType::PopcornMuch }, + { "hot_dog_much", PeepThoughtType::HotDogMuch }, + { "tentacle_much", PeepThoughtType::TentacleMuch }, + { "hat_much", PeepThoughtType::HatMuch }, + { "toffee_apple_much", PeepThoughtType::ToffeeAppleMuch }, + { "tshirt_much", PeepThoughtType::TshirtMuch }, + { "doughnut_much", PeepThoughtType::DoughnutMuch }, + { "coffee_much", PeepThoughtType::CoffeeMuch }, + { "chicken_much", PeepThoughtType::ChickenMuch }, + { "lemonade_much", PeepThoughtType::LemonadeMuch }, + { "photo2", PeepThoughtType::Photo2 }, + { "photo3", PeepThoughtType::Photo3 }, + { "photo4", PeepThoughtType::Photo4 }, + { "pretzel", PeepThoughtType::Pretzel }, + { "hot_chocolate", PeepThoughtType::HotChocolate }, + { "iced_tea", PeepThoughtType::IcedTea }, + { "funnel_cake", PeepThoughtType::FunnelCake }, + { "sunglasses", PeepThoughtType::Sunglasses }, + { "beef_noodles", PeepThoughtType::BeefNoodles }, + { "fried_rice_noodles", PeepThoughtType::FriedRiceNoodles }, + { "wonton_soup", PeepThoughtType::WontonSoup }, + { "meatball_soup", PeepThoughtType::MeatballSoup }, + { "fruit_juice", PeepThoughtType::FruitJuice }, + { "soybean_milk", PeepThoughtType::SoybeanMilk }, + { "sujongkwa", PeepThoughtType::Sujongkwa }, + { "sub_sandwich", PeepThoughtType::SubSandwich }, + { "cookie", PeepThoughtType::Cookie }, + { "roast_sausage", PeepThoughtType::RoastSausage }, + { "photo2_much", PeepThoughtType::Photo2Much }, + { "photo3_much", PeepThoughtType::Photo3Much }, + { "photo4_much", PeepThoughtType::Photo4Much }, + { "pretzel_much", PeepThoughtType::PretzelMuch }, + { "hot_chocolate_much", PeepThoughtType::HotChocolateMuch }, + { "iced_tea_much", PeepThoughtType::IcedTeaMuch }, + { "funnel_cake_much", PeepThoughtType::FunnelCakeMuch }, + { "sunglasses_much", PeepThoughtType::SunglassesMuch }, + { "beef_noodles_much", PeepThoughtType::BeefNoodlesMuch }, + { "fried_rice_noodles_much", PeepThoughtType::FriedRiceNoodlesMuch }, + { "wonton_soup_much", PeepThoughtType::WontonSoupMuch }, + { "meatball_soup_much", PeepThoughtType::MeatballSoupMuch }, + { "fruit_juice_much", PeepThoughtType::FruitJuiceMuch }, + { "soybean_milk_much", PeepThoughtType::SoybeanMilkMuch }, + { "sujongkwa_much", PeepThoughtType::SujongkwaMuch }, + { "sub_sandwich_much", PeepThoughtType::SubSandwichMuch }, + { "cookie_much", PeepThoughtType::CookieMuch }, + { "roast_sausage_much", PeepThoughtType::RoastSausageMuch }, + { "help", PeepThoughtType::Help }, + { "running_out", PeepThoughtType::RunningOut }, + { "new_ride", PeepThoughtType::NewRide }, + { "nice_ride_deprecated", PeepThoughtType::NiceRideDeprecated }, + { "excited_deprecated", PeepThoughtType::ExcitedDeprecated }, + { "here_we_are", PeepThoughtType::HereWeAre }, + }); + ScGuest::ScGuest(EntityId id) : ScPeep(id) { @@ -43,6 +172,7 @@ 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::thoughts_get, nullptr, "thoughts"); } Guest* ScGuest::GetGuest() const @@ -337,6 +467,75 @@ namespace OpenRCT2::Scripting } } + DukValue ScGuest::thoughts_get() const + { + auto ctx = GetContext()->GetScriptEngine().GetContext(); + + duk_push_array(ctx); + + auto peep = GetGuest(); + if (peep != nullptr) + { + duk_uarridx_t index = 0; + for (const auto& thought : peep->Thoughts) + { + if (thought.type == PeepThoughtType::None) + break; + if (thought.freshness == 0) + continue; + auto scThoughtPtr = std::make_shared(thought); + auto dukThought = GetObjectAsDukValue(ctx, scThoughtPtr); + dukThought.push(); + duk_put_prop_index(ctx, -2, index); + index++; + } + } + + return DukValue::take_from_stack(ctx, -1); + } + + ScThought::ScThought(PeepThought backing) + : _backing(backing) + { + } + + void ScThought::Register(duk_context* ctx) + { + dukglue_register_property(ctx, &ScThought::type_get, nullptr, "type"); + dukglue_register_property(ctx, &ScThought::item_get, nullptr, "item"); + dukglue_register_property(ctx, &ScThought::freshness_get, nullptr, "freshness"); + dukglue_register_property(ctx, &ScThought::freshTimeout_get, nullptr, "freshTimeout"); + dukglue_register_method(ctx, &ScThought::toString, "toString"); + } + + std::string ScThought::type_get() const + { + return std::string(ThoughtTypeMap[_backing.type]); + } + + uint16_t ScThought::item_get() const + { + return _backing.item; + } + + uint8_t ScThought::freshness_get() const + { + return _backing.freshness; + } + + uint8_t ScThought::freshTimeout_get() const + { + return _backing.fresh_timeout; + } + + std::string ScThought::toString() const + { + // format string with arguments + auto ft = Formatter(); + PeepThoughtSetFormatArgs(&_backing, ft); + return FormatStringID(STR_STRINGID, ft.Data()); + } + } // namespace OpenRCT2::Scripting #endif diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.hpp b/src/openrct2/scripting/bindings/entity/ScGuest.hpp index 06dfcbbc1d..f56272cacf 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.hpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,10 +11,29 @@ #ifdef ENABLE_SCRIPTING +# include "../../../entity/Guest.h" # include "ScPeep.hpp" namespace OpenRCT2::Scripting { + class ScThought + { + private: + PeepThought _backing; + + public: + ScThought(PeepThought backing); + + static void Register(duk_context* ctx); + + private: + std::string type_get() const; + uint16_t item_get() const; + uint8_t freshness_get() const; + uint8_t freshTimeout_get() const; + std::string toString() const; + }; + class ScGuest : public ScPeep { public: @@ -82,6 +101,8 @@ namespace OpenRCT2::Scripting uint8_t lostCountdown_get() const; void lostCountdown_set(uint8_t value); + + DukValue thoughts_get() const; }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/entity/ScLitter.cpp b/src/openrct2/scripting/bindings/entity/ScLitter.cpp index 61ab2837cd..1ccbe1cd8a 100644 --- a/src/openrct2/scripting/bindings/entity/ScLitter.cpp +++ b/src/openrct2/scripting/bindings/entity/ScLitter.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScLitter.hpp b/src/openrct2/scripting/bindings/entity/ScLitter.hpp index 61583a14f8..22b070e896 100644 --- a/src/openrct2/scripting/bindings/entity/ScLitter.hpp +++ b/src/openrct2/scripting/bindings/entity/ScLitter.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScPeep.hpp b/src/openrct2/scripting/bindings/entity/ScPeep.hpp index 2a34a187b9..fd51430a2c 100644 --- a/src/openrct2/scripting/bindings/entity/ScPeep.hpp +++ b/src/openrct2/scripting/bindings/entity/ScPeep.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.cpp b/src/openrct2/scripting/bindings/entity/ScStaff.cpp index c738074bcc..8d825b65e0 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.cpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScStaff.hpp b/src/openrct2/scripting/bindings/entity/ScStaff.hpp index 10c591b734..a232c733d4 100644 --- a/src/openrct2/scripting/bindings/entity/ScStaff.hpp +++ b/src/openrct2/scripting/bindings/entity/ScStaff.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp index d0ad5328d4..721ae95aaf 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.hpp b/src/openrct2/scripting/bindings/entity/ScVehicle.hpp index e6574b39f8..a223cf9b27 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.hpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/game/ScCheats.hpp b/src/openrct2/scripting/bindings/game/ScCheats.hpp index 429afdd71c..f578e0b8bc 100644 --- a/src/openrct2/scripting/bindings/game/ScCheats.hpp +++ b/src/openrct2/scripting/bindings/game/ScCheats.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,6 +40,8 @@ namespace OpenRCT2::Scripting ctx, &ScCheats::disableLittering_get, &ScCheats::disableLittering_set, "disableLittering"); dukglue_register_property( ctx, &ScCheats::disablePlantAging_get, &ScCheats::disablePlantAging_set, "disablePlantAging"); + dukglue_register_property( + ctx, &ScCheats::allowRegularPathAsQueue_get, &ScCheats::allowRegularPathAsQueue_set, "allowRegularPathAsQueue"); dukglue_register_property( ctx, &ScCheats::disableRideValueAging_get, &ScCheats::disableRideValueAging_set, "disableRideValueAging"); dukglue_register_property( @@ -159,6 +161,17 @@ namespace OpenRCT2::Scripting gCheatsDisablePlantAging = value; } + bool allowRegularPathAsQueue_get() + { + return gCheatsAllowRegularPathAsQueue; + } + + void allowRegularPathAsQueue_set(bool value) + { + ThrowIfGameStateNotMutable(); + gCheatsAllowRegularPathAsQueue = value; + } + bool disableRideValueAging_get() { return gCheatsDisableRideValueAging; diff --git a/src/openrct2/scripting/bindings/game/ScConfiguration.hpp b/src/openrct2/scripting/bindings/game/ScConfiguration.hpp index 07a0db5466..b076c635d9 100644 --- a/src/openrct2/scripting/bindings/game/ScConfiguration.hpp +++ b/src/openrct2/scripting/bindings/game/ScConfiguration.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/game/ScConsole.hpp b/src/openrct2/scripting/bindings/game/ScConsole.hpp index b7f9de30c9..b2310008ce 100644 --- a/src/openrct2/scripting/bindings/game/ScConsole.hpp +++ b/src/openrct2/scripting/bindings/game/ScConsole.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/game/ScContext.hpp b/src/openrct2/scripting/bindings/game/ScContext.hpp index 14eb4c22a4..73a2009e5f 100644 --- a/src/openrct2/scripting/bindings/game/ScContext.hpp +++ b/src/openrct2/scripting/bindings/game/ScContext.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -233,13 +233,29 @@ namespace OpenRCT2::Scripting } } + std::vector getAllTrackSegments() + { + auto ctx = GetContext()->GetScriptEngine().GetContext(); + + std::vector result; + for (track_type_t type = 0; type < TrackElemType::Count; type++) + { + auto obj = std::make_shared(type); + if (obj != nullptr) + { + result.push_back(GetObjectAsDukValue(ctx, obj)); + } + } + return result; + } + int32_t getRandom(int32_t min, int32_t max) { ThrowIfGameStateNotMutable(); if (min >= max) return min; int32_t range = max - min; - return min + scenario_rand_max(range); + return min + ScenarioRandMax(range); } duk_ret_t formatString(duk_context* ctx) @@ -339,15 +355,15 @@ namespace OpenRCT2::Scripting if (isExecute) { action->SetCallback( - [this, plugin, callback](const GameAction*, const GameActions::Result* res) -> void { - HandleGameActionResult(plugin, *res, callback); + [this, plugin, callback](const GameAction* act, const GameActions::Result* res) -> void { + HandleGameActionResult(plugin, *act, *res, callback); }); GameActions::Execute(action.get()); } else { auto res = GameActions::Query(action.get()); - HandleGameActionResult(plugin, res, callback); + HandleGameActionResult(plugin, *action, res, callback); } } else @@ -362,38 +378,15 @@ namespace OpenRCT2::Scripting } void HandleGameActionResult( - const std::shared_ptr& plugin, const GameActions::Result& res, const DukValue& callback) + const std::shared_ptr& plugin, const GameAction& action, const GameActions::Result& res, + const DukValue& callback) { - // Construct result object - auto& scriptEngine = GetContext()->GetScriptEngine(); - auto ctx = scriptEngine.GetContext(); - auto objIdx = duk_push_object(ctx); - duk_push_int(ctx, static_cast(res.Error)); - duk_put_prop_string(ctx, objIdx, "error"); - - if (res.Error != GameActions::Status::Ok) - { - auto title = res.GetErrorTitle(); - duk_push_string(ctx, title.c_str()); - duk_put_prop_string(ctx, objIdx, "errorTitle"); - - auto message = res.GetErrorMessage(); - duk_push_string(ctx, message.c_str()); - duk_put_prop_string(ctx, objIdx, "errorMessage"); - } - - duk_push_int(ctx, static_cast(res.Cost)); - duk_put_prop_string(ctx, objIdx, "cost"); - - duk_push_int(ctx, static_cast(res.Expenditure)); - duk_put_prop_string(ctx, objIdx, "expenditureType"); - - auto args = DukValue::take_from_stack(ctx); - if (callback.is_function()) { + auto& scriptEngine = GetContext()->GetScriptEngine(); + auto dukResult = scriptEngine.GameActionResultToDuk(action, res); // Call the plugin callback and pass the result object - scriptEngine.ExecutePluginCall(plugin, callback, { args }, false); + scriptEngine.ExecutePluginCall(plugin, callback, { dukResult }, false); } } @@ -478,6 +471,7 @@ namespace OpenRCT2::Scripting dukglue_register_method(ctx, &ScContext::getObject, "getObject"); dukglue_register_method(ctx, &ScContext::getAllObjects, "getAllObjects"); dukglue_register_method(ctx, &ScContext::getTrackSegment, "getTrackSegment"); + dukglue_register_method(ctx, &ScContext::getAllTrackSegments, "getAllTrackSegments"); dukglue_register_method(ctx, &ScContext::getRandom, "getRandom"); dukglue_register_method_varargs(ctx, &ScContext::formatString, "formatString"); dukglue_register_method(ctx, &ScContext::subscribe, "subscribe"); diff --git a/src/openrct2/scripting/bindings/game/ScDisposable.hpp b/src/openrct2/scripting/bindings/game/ScDisposable.hpp index 0595b6eec4..0917c05d18 100644 --- a/src/openrct2/scripting/bindings/game/ScDisposable.hpp +++ b/src/openrct2/scripting/bindings/game/ScDisposable.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/game/ScProfiler.hpp b/src/openrct2/scripting/bindings/game/ScProfiler.hpp index ae97634251..81db860fac 100644 --- a/src/openrct2/scripting/bindings/game/ScProfiler.hpp +++ b/src/openrct2/scripting/bindings/game/ScProfiler.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/network/ScNetwork.cpp b/src/openrct2/scripting/bindings/network/ScNetwork.cpp index 24ac8dc23b..9a2ce39ff7 100644 --- a/src/openrct2/scripting/bindings/network/ScNetwork.cpp +++ b/src/openrct2/scripting/bindings/network/ScNetwork.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,7 +27,7 @@ namespace OpenRCT2::Scripting std::string ScNetwork::mode_get() const { # ifndef DISABLE_NETWORK - switch (network_get_mode()) + switch (NetworkGetMode()) { case NETWORK_MODE_SERVER: return "server"; @@ -41,7 +41,7 @@ namespace OpenRCT2::Scripting int32_t ScNetwork::numPlayers_get() const { # ifndef DISABLE_NETWORK - return network_get_num_players(); + return NetworkGetNumPlayers(); # else return 0; # endif @@ -50,7 +50,7 @@ namespace OpenRCT2::Scripting int32_t ScNetwork::numGroups_get() const { # ifndef DISABLE_NETWORK - return network_get_num_groups(); + return NetworkGetNumGroups(); # else return 0; # endif @@ -59,7 +59,7 @@ namespace OpenRCT2::Scripting int32_t ScNetwork::defaultGroup_get() const { # ifndef DISABLE_NETWORK - return network_get_default_group(); + return NetworkGetDefaultGroup(); # else return 0; # endif @@ -77,10 +77,10 @@ namespace OpenRCT2::Scripting { std::vector> groups; # ifndef DISABLE_NETWORK - auto numGroups = network_get_num_groups(); + auto numGroups = NetworkGetNumGroups(); for (int32_t i = 0; i < numGroups; i++) { - auto groupId = network_get_group_id(i); + auto groupId = NetworkGetGroupID(i); groups.push_back(std::make_shared(groupId)); } # endif @@ -91,10 +91,10 @@ namespace OpenRCT2::Scripting { std::vector> players; # ifndef DISABLE_NETWORK - auto numPlayers = network_get_num_players(); + auto numPlayers = NetworkGetNumPlayers(); for (int32_t i = 0; i < numPlayers; i++) { - auto playerId = network_get_player_id(i); + auto playerId = NetworkGetPlayerID(i); players.push_back(std::make_shared(playerId)); } # endif @@ -105,7 +105,7 @@ namespace OpenRCT2::Scripting { std::shared_ptr player; # ifndef DISABLE_NETWORK - auto playerId = network_get_current_player_id(); + auto playerId = NetworkGetCurrentPlayerId(); player = std::make_shared(playerId); # endif return player; @@ -114,10 +114,10 @@ namespace OpenRCT2::Scripting std::shared_ptr ScNetwork::getPlayer(int32_t index) const { # ifndef DISABLE_NETWORK - auto numPlayers = network_get_num_players(); + auto numPlayers = NetworkGetNumPlayers(); if (index < numPlayers) { - auto playerId = network_get_player_id(index); + auto playerId = NetworkGetPlayerID(index); return std::make_shared(playerId); } # endif @@ -128,7 +128,7 @@ namespace OpenRCT2::Scripting { # ifndef DISABLE_NETWORK auto obj = OpenRCT2::Scripting::DukObject(_context); - auto networkStats = network_get_stats(); + auto networkStats = NetworkGetStats(); { duk_push_array(_context); duk_uarridx_t index = 0; @@ -160,10 +160,10 @@ namespace OpenRCT2::Scripting std::shared_ptr ScNetwork::getGroup(int32_t index) const { # ifndef DISABLE_NETWORK - auto numGroups = network_get_num_groups(); + auto numGroups = NetworkGetNumGroups(); if (index < numGroups) { - auto groupId = network_get_group_id(index); + auto groupId = NetworkGetGroupID(index); return std::make_shared(groupId); } # endif @@ -181,10 +181,10 @@ namespace OpenRCT2::Scripting void ScNetwork::removeGroup(int32_t index) { # ifndef DISABLE_NETWORK - auto numGroups = network_get_num_groups(); + auto numGroups = NetworkGetNumGroups(); if (index < numGroups) { - auto groupId = network_get_group_id(index); + auto groupId = NetworkGetGroupID(index); auto networkAction = NetworkModifyGroupAction(ModifyGroupType::RemoveGroup, groupId); GameActions::Execute(&networkAction); } @@ -194,10 +194,10 @@ namespace OpenRCT2::Scripting void ScNetwork::kickPlayer(int32_t index) { # ifndef DISABLE_NETWORK - auto numPlayers = network_get_num_players(); + auto numPlayers = NetworkGetNumPlayers(); if (index < numPlayers) { - auto playerId = network_get_player_id(index); + auto playerId = NetworkGetPlayerID(index); auto kickPlayerAction = PlayerKickAction(playerId); GameActions::Execute(&kickPlayerAction); } @@ -209,7 +209,7 @@ namespace OpenRCT2::Scripting # ifndef DISABLE_NETWORK if (players.is_array()) { - if (network_get_mode() == NETWORK_MODE_SERVER) + if (NetworkGetMode() == NETWORK_MODE_SERVER) { std::vector playerIds; auto playerArray = players.as_array(); @@ -222,7 +222,7 @@ namespace OpenRCT2::Scripting } if (!playerArray.empty()) { - network_send_chat(message.c_str(), playerIds); + NetworkSendChat(message.c_str(), playerIds); } } else @@ -232,7 +232,7 @@ namespace OpenRCT2::Scripting } else { - network_send_chat(message.c_str()); + NetworkSendChat(message.c_str()); } # endif } diff --git a/src/openrct2/scripting/bindings/network/ScNetwork.hpp b/src/openrct2/scripting/bindings/network/ScNetwork.hpp index 6c0874f7fa..b0a6e00dba 100644 --- a/src/openrct2/scripting/bindings/network/ScNetwork.hpp +++ b/src/openrct2/scripting/bindings/network/ScNetwork.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/network/ScPlayer.cpp b/src/openrct2/scripting/bindings/network/ScPlayer.cpp index 9976587223..8c6e6db131 100644 --- a/src/openrct2/scripting/bindings/network/ScPlayer.cpp +++ b/src/openrct2/scripting/bindings/network/ScPlayer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,10 +31,10 @@ namespace OpenRCT2::Scripting std::string ScPlayer::name_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_player_index(_id); + auto index = NetworkGetPlayerIndex(_id); if (index == -1) return {}; - return network_get_player_name(index); + return NetworkGetPlayerName(index); # else return {}; # endif @@ -43,10 +43,10 @@ namespace OpenRCT2::Scripting int32_t ScPlayer::group_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_player_index(_id); + auto index = NetworkGetPlayerIndex(_id); if (index == -1) return {}; - return network_get_player_group(index); + return NetworkGetPlayerGroup(index); # else return 0; # endif @@ -62,10 +62,10 @@ namespace OpenRCT2::Scripting int32_t ScPlayer::ping_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_player_index(_id); + auto index = NetworkGetPlayerIndex(_id); if (index == -1) return {}; - return network_get_player_ping(index); + return NetworkGetPlayerPing(index); # else return 0; # endif @@ -74,10 +74,10 @@ namespace OpenRCT2::Scripting int32_t ScPlayer::commandsRan_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_player_index(_id); + auto index = NetworkGetPlayerIndex(_id); if (index == -1) return {}; - return network_get_player_commands_ran(index); + return NetworkGetPlayerCommandsRan(index); # else return 0; # endif @@ -86,10 +86,10 @@ namespace OpenRCT2::Scripting int32_t ScPlayer::moneySpent_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_player_index(_id); + auto index = NetworkGetPlayerIndex(_id); if (index == -1) return {}; - return network_get_player_money_spent(index); + return NetworkGetPlayerMoneySpent(index); # else return 0; # endif @@ -97,12 +97,12 @@ namespace OpenRCT2::Scripting std::string ScPlayer::ipAddress_get() const { - return network_get_player_ip_address(_id); + return NetworkGetPlayerIPAddress(_id); } std::string ScPlayer::publicKeyHash_get() const { - return network_get_player_public_key_hash(_id); + return NetworkGetPlayerPublicKeyHash(_id); } void ScPlayer::Register(duk_context* ctx) diff --git a/src/openrct2/scripting/bindings/network/ScPlayer.hpp b/src/openrct2/scripting/bindings/network/ScPlayer.hpp index a0c161422c..c511d1732f 100644 --- a/src/openrct2/scripting/bindings/network/ScPlayer.hpp +++ b/src/openrct2/scripting/bindings/network/ScPlayer.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/network/ScPlayerGroup.cpp b/src/openrct2/scripting/bindings/network/ScPlayerGroup.cpp index db5c16b033..64db500a65 100644 --- a/src/openrct2/scripting/bindings/network/ScPlayerGroup.cpp +++ b/src/openrct2/scripting/bindings/network/ScPlayerGroup.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,10 +34,10 @@ namespace OpenRCT2::Scripting std::string ScPlayerGroup::name_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_group_index(_id); + auto index = NetworkGetGroupIndex(_id); if (index == -1) return {}; - return network_get_group_name(index); + return NetworkGetGroupName(index); # else return {}; # endif @@ -71,7 +71,7 @@ namespace OpenRCT2::Scripting std::vector ScPlayerGroup::permissions_get() const { # ifndef DISABLE_NETWORK - auto index = network_get_group_index(_id); + auto index = NetworkGetGroupIndex(_id); if (index == -1) return {}; @@ -80,7 +80,7 @@ namespace OpenRCT2::Scripting auto permissionIndex = 0; for (const auto& action : NetworkActions::Actions) { - if (network_can_perform_action(index, static_cast(permissionIndex))) + if (NetworkCanPerformAction(index, static_cast(permissionIndex))) { result.push_back(TransformPermissionKeyToJS(action.PermissionName)); } @@ -95,7 +95,7 @@ namespace OpenRCT2::Scripting void ScPlayerGroup::permissions_set(std::vector value) { # ifndef DISABLE_NETWORK - auto groupIndex = network_get_group_index(_id); + auto groupIndex = NetworkGetGroupIndex(_id); if (groupIndex == -1) return; @@ -123,7 +123,7 @@ namespace OpenRCT2::Scripting for (size_t i = 0; i < enabledPermissions.size(); i++) { auto toggle - = (enabledPermissions[i] != (network_can_perform_action(groupIndex, static_cast(i)) != 0)); + = (enabledPermissions[i] != (NetworkCanPerformAction(groupIndex, static_cast(i)) != 0)); if (toggle) { auto networkAction2 = NetworkModifyGroupAction( diff --git a/src/openrct2/scripting/bindings/network/ScPlayerGroup.hpp b/src/openrct2/scripting/bindings/network/ScPlayerGroup.hpp index 6da0e415b2..cd9c135600 100644 --- a/src/openrct2/scripting/bindings/network/ScPlayerGroup.hpp +++ b/src/openrct2/scripting/bindings/network/ScPlayerGroup.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/network/ScSocket.hpp b/src/openrct2/scripting/bindings/network/ScSocket.hpp index 15febcd85a..65dbe66b26 100644 --- a/src/openrct2/scripting/bindings/network/ScSocket.hpp +++ b/src/openrct2/scripting/bindings/network/ScSocket.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/object/ScObject.hpp b/src/openrct2/scripting/bindings/object/ScObject.hpp index 719e628c58..fdfbb991de 100644 --- a/src/openrct2/scripting/bindings/object/ScObject.hpp +++ b/src/openrct2/scripting/bindings/object/ScObject.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -274,7 +274,7 @@ namespace OpenRCT2::Scripting auto entry = GetEntry(); if (entry != nullptr) { - return entry->animation; + return EnumValue(entry->animation); } return 0; } @@ -478,7 +478,7 @@ namespace OpenRCT2::Scripting auto obj = GetObject(); if (obj != nullptr) { - auto rideEntry = static_cast(obj->GetLegacyData()); + auto rideEntry = static_cast(obj->GetLegacyData()); if (rideEntry != nullptr && _vehicleIndex < std::size(rideEntry->Cars)) { return rideEntry->GetCar(_vehicleIndex); @@ -758,12 +758,12 @@ namespace OpenRCT2::Scripting return static_cast(ScObject::GetObject()); } - const rct_ride_entry* GetLegacyData() const + const RideObjectEntry* GetLegacyData() const { auto obj = GetObject(); if (obj != nullptr) { - return static_cast(obj->GetLegacyData()); + return static_cast(obj->GetLegacyData()); } return nullptr; } diff --git a/src/openrct2/scripting/bindings/ride/ScRide.cpp b/src/openrct2/scripting/bindings/ride/ScRide.cpp index b00a239ca5..acfc3a2b21 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] = static_cast(value[i]); } } } @@ -411,12 +411,12 @@ namespace OpenRCT2::Scripting return ride != nullptr ? ride->GetAge() : 0; } - int16_t ScRide::runningCost_get() const + money64 ScRide::runningCost_get() const { auto ride = GetRide(); return ride != nullptr ? ride->upkeep_cost : 0; } - void ScRide::runningCost_set(int16_t value) + void ScRide::runningCost_set(money64 value) { ThrowIfGameStateNotMutable(); auto ride = GetRide(); @@ -486,7 +486,7 @@ namespace OpenRCT2::Scripting Ride* ScRide::GetRide() const { - return get_ride(_rideId); + return ::GetRide(_rideId); } uint8_t ScRide::downtime_get() const diff --git a/src/openrct2/scripting/bindings/ride/ScRide.hpp b/src/openrct2/scripting/bindings/ride/ScRide.hpp index 92a41adf51..396087b2d9 100644 --- a/src/openrct2/scripting/bindings/ride/ScRide.hpp +++ b/src/openrct2/scripting/bindings/ride/ScRide.hpp @@ -142,8 +142,8 @@ namespace OpenRCT2::Scripting int32_t age_get() const; - int16_t runningCost_get() const; - void runningCost_set(int16_t value); + money64 runningCost_get() const; + void runningCost_set(money64 value); int32_t totalProfit_get() const; void totalProfit_set(int32_t value); diff --git a/src/openrct2/scripting/bindings/ride/ScRideStation.cpp b/src/openrct2/scripting/bindings/ride/ScRideStation.cpp index 5ca6001e6d..529a5ff447 100644 --- a/src/openrct2/scripting/bindings/ride/ScRideStation.cpp +++ b/src/openrct2/scripting/bindings/ride/ScRideStation.cpp @@ -118,7 +118,7 @@ namespace OpenRCT2::Scripting RideStation* ScRideStation::GetRideStation() const { - auto ride = get_ride(_rideId); + auto ride = GetRide(_rideId); if (ride != nullptr) { if (_stationIndex.ToUnderlying() < std::size(ride->GetStations())) diff --git a/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp b/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp index ec7585d479..c797ac7639 100644 --- a/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp +++ b/src/openrct2/scripting/bindings/ride/ScTrackIterator.cpp @@ -80,8 +80,8 @@ DukValue ScTrackIterator::previousPosition_get() const return ToDuk(ctx, nullptr); auto posEl = CoordsXYE(pos.x, pos.y, reinterpret_cast(el)); - track_begin_end tbe{}; - track_block_get_previous(posEl, &tbe); + TrackBeginEnd tbe{}; + TrackBlockGetPrevious(posEl, &tbe); CoordsXYZD result(tbe.end_x, tbe.end_y, tbe.begin_z, tbe.begin_direction); return ToDuk(ctx, result); } @@ -103,7 +103,7 @@ DukValue ScTrackIterator::nextPosition_get() const CoordsXYE next; int32_t z{}; int32_t direction{}; - track_block_get_next(&posEl, &next, &z, &direction); + TrackBlockGetNext(&posEl, &next, &z, &direction); CoordsXYZD result(next.x, next.y, z, direction); return ToDuk(ctx, result); } @@ -119,8 +119,8 @@ bool ScTrackIterator::previous() return false; auto posEl = CoordsXYE(pos.x, pos.y, reinterpret_cast(el)); - track_begin_end tbe{}; - if (track_block_get_previous(posEl, &tbe)) + TrackBeginEnd tbe{}; + if (TrackBlockGetPrevious(posEl, &tbe)) { auto prev = CoordsXYE(tbe.end_x, tbe.end_y, tbe.begin_element); auto origin = GetTrackSegmentOrigin(prev); @@ -148,7 +148,7 @@ bool ScTrackIterator::next() CoordsXYE next; int32_t z{}; int32_t direction{}; - if (track_block_get_next(&posEl, &next, &z, &direction)) + if (TrackBlockGetNext(&posEl, &next, &z, &direction)) { auto origin = GetTrackSegmentOrigin(next); if (origin) diff --git a/src/openrct2/scripting/bindings/ride/ScTrackSegment.cpp b/src/openrct2/scripting/bindings/ride/ScTrackSegment.cpp index f2a706b121..916e2c87b4 100644 --- a/src/openrct2/scripting/bindings/ride/ScTrackSegment.cpp +++ b/src/openrct2/scripting/bindings/ride/ScTrackSegment.cpp @@ -29,13 +29,43 @@ void ScTrackSegment::Register(duk_context* ctx) dukglue_register_property(ctx, &ScTrackSegment::type_get, nullptr, "type"); dukglue_register_property(ctx, &ScTrackSegment::description_get, nullptr, "description"); dukglue_register_property(ctx, &ScTrackSegment::elements_get, nullptr, "elements"); - dukglue_register_property(ctx, &ScTrackSegment::beginZ_get, nullptr, "beginZ"); dukglue_register_property(ctx, &ScTrackSegment::beginDirection_get, nullptr, "beginDirection"); + dukglue_register_property(ctx, &ScTrackSegment::endDirection_get, nullptr, "endDirection"); + dukglue_register_property(ctx, &ScTrackSegment::beginSlope_get, nullptr, "beginSlope"); + dukglue_register_property(ctx, &ScTrackSegment::endSlope_get, nullptr, "endSlope"); + dukglue_register_property(ctx, &ScTrackSegment::beginBank_get, nullptr, "beginBank"); + dukglue_register_property(ctx, &ScTrackSegment::endBank_get, nullptr, "endBank"); + dukglue_register_property(ctx, &ScTrackSegment::beginZ_get, nullptr, "beginZ"); + dukglue_register_property(ctx, &ScTrackSegment::endZ_get, nullptr, "endZ"); dukglue_register_property(ctx, &ScTrackSegment::endX_get, nullptr, "endX"); dukglue_register_property(ctx, &ScTrackSegment::endY_get, nullptr, "endY"); - dukglue_register_property(ctx, &ScTrackSegment::endZ_get, nullptr, "endZ"); - dukglue_register_property(ctx, &ScTrackSegment::endDirection_get, nullptr, "endDirection"); dukglue_register_property(ctx, &ScTrackSegment::length_get, nullptr, "length"); + dukglue_register_property(ctx, &ScTrackSegment::nextCurveElement_get, nullptr, "nextSuggestedSegment"); + dukglue_register_property(ctx, &ScTrackSegment::previousCurveElement_get, nullptr, "previousSuggestedSegment"); + dukglue_register_property(ctx, &ScTrackSegment::getMirrorElement, nullptr, "mirrorSegment"); + dukglue_register_property(ctx, &ScTrackSegment::getAlternativeElement, nullptr, "alternateTypeSegment"); + dukglue_register_property(ctx, &ScTrackSegment::getPriceModifier, nullptr, "priceModifier"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackGroup, nullptr, "trackGroup"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackCurvature, nullptr, "turnDirection"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackSlopeDirection, nullptr, "slopeDirection"); + + dukglue_register_property( + ctx, &ScTrackSegment::getTrackFlag, nullptr, "onlyAllowedUnderwater"); + dukglue_register_property( + ctx, &ScTrackSegment::getTrackFlag, nullptr, "onlyAllowedAboveGround"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "allowsChainLift"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "isBanked"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "isInversion"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "isSteepUp"); + dukglue_register_property( + ctx, &ScTrackSegment::getTrackFlag, nullptr, "startsHalfHeightUp"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "countsAsInversion"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "isBankedTurn"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "isSlopedTurn"); + dukglue_register_property(ctx, &ScTrackSegment::getTrackFlag, nullptr, "isHelix"); + dukglue_register_property( + ctx, &ScTrackSegment::getTrackFlag, nullptr, "countsAsInversion"); + dukglue_register_method(ctx, &ScTrackSegment::getSubpositionLength, "getSubpositionLength"); dukglue_register_method(ctx, &ScTrackSegment::getSubpositions, "getSubpositions"); } @@ -48,7 +78,7 @@ int32_t ScTrackSegment::type_get() const std::string ScTrackSegment::description_get() const { const auto& ted = GetTrackElementDescriptor(_type); - return language_get_string(ted.Description); + return LanguageGetString(ted.Description); } int32_t ScTrackSegment::beginZ_get() const @@ -63,7 +93,7 @@ int32_t ScTrackSegment::beginDirection_get() const return ted.Coordinates.rotation_begin; } -int32_t ScTrackSegment::beginAngle_get() const +int32_t ScTrackSegment::beginSlope_get() const { const auto& ted = GetTrackElementDescriptor(_type); return ted.Definition.vangle_start; @@ -99,7 +129,7 @@ int32_t ScTrackSegment::endDirection_get() const return ted.Coordinates.rotation_end; } -int32_t ScTrackSegment::endAngle_get() const +int32_t ScTrackSegment::endSlope_get() const { const auto& ted = GetTrackElementDescriptor(_type); return ted.Definition.vangle_end; @@ -146,7 +176,7 @@ DukValue ScTrackSegment::elements_get() const uint16_t ScTrackSegment::getSubpositionLength(uint8_t trackSubposition, uint8_t direction) const { - return vehicle_get_move_info_size(static_cast(trackSubposition), _type, direction); + return VehicleGetMoveInfoSize(static_cast(trackSubposition), _type, direction); } std::vector ScTrackSegment::getSubpositions(uint8_t trackSubposition, uint8_t direction) const @@ -159,10 +189,107 @@ std::vector ScTrackSegment::getSubpositions(uint8_t trackSubposition, for (auto idx = 0; idx < size; idx++) { - result.push_back(ToDuk( - ctx, gTrackVehicleInfo[static_cast(trackSubposition)][typeAndDirection]->info[idx])); + result.push_back( + ToDuk(ctx, gTrackVehicleInfo[static_cast(trackSubposition)][typeAndDirection]->info[idx])); } return result; } +DukValue ScTrackSegment::nextCurveElement_get() const +{ + const auto ctx = GetContext()->GetScriptEngine().GetContext(); + const auto& ted = GetTrackElementDescriptor(_type); + + int32_t curve = ted.CurveChain.next; + if (curve & RideConstructionSpecialPieceSelected) + return ToDuk(ctx, curve & (~RideConstructionSpecialPieceSelected)); + switch (curve) + { + case 1: + return ToDuk(ctx, "left"); + case 2: + return ToDuk(ctx, "right"); + default: + return ToDuk(ctx, "straight"); + } +} + +DukValue ScTrackSegment::previousCurveElement_get() const +{ + const auto ctx = GetContext()->GetScriptEngine().GetContext(); + const auto& ted = GetTrackElementDescriptor(_type); + + int32_t curve = ted.CurveChain.previous; + if (curve & RideConstructionSpecialPieceSelected) + return ToDuk(ctx, curve & (~RideConstructionSpecialPieceSelected)); + switch (curve) + { + case 1: + return ToDuk(ctx, "left"); + case 2: + return ToDuk(ctx, "right"); + default: + return ToDuk(ctx, "straight"); + } +} + +DukValue ScTrackSegment::getMirrorElement() const +{ + const auto ctx = GetContext()->GetScriptEngine().GetContext(); + const auto& ted = GetTrackElementDescriptor(_type); + if (ted.MirrorElement == TrackElemType::None) + return ToDuk(ctx, nullptr); + return ToDuk(ctx, ted.MirrorElement); +} + +DukValue ScTrackSegment::getAlternativeElement() const +{ + const auto ctx = GetContext()->GetScriptEngine().GetContext(); + const auto& ted = GetTrackElementDescriptor(_type); + if (ted.AlternativeType == TrackElemType::None) + return ToDuk(ctx, nullptr); + return ToDuk(ctx, ted.AlternativeType); +} + +int32_t ScTrackSegment::getPriceModifier() const +{ + const auto& ted = GetTrackElementDescriptor(_type); + + return ted.PriceModifier; +} + +template bool ScTrackSegment::getTrackFlag() const +{ + const auto& ted = GetTrackElementDescriptor(_type); + + return ted.Flags & flag; +} + +int32_t ScTrackSegment::getTrackGroup() const +{ + const auto& ted = GetTrackElementDescriptor(_type); + + return ted.Definition.type; +} + +std::string ScTrackSegment::getTrackCurvature() const +{ + const auto& ted = GetTrackElementDescriptor(_type); + if (ted.Flags & TRACK_ELEM_FLAG_TURN_LEFT) + return "left"; + if (ted.Flags & TRACK_ELEM_FLAG_TURN_RIGHT) + return "right"; + return "straight"; +} + +std::string ScTrackSegment::getTrackSlopeDirection() const +{ + const auto& ted = GetTrackElementDescriptor(_type); + if (ted.Flags & TRACK_ELEM_FLAG_UP) + return "up"; + if (ted.Flags & TRACK_ELEM_FLAG_DOWN) + return "down"; + return "flat"; +} + #endif diff --git a/src/openrct2/scripting/bindings/ride/ScTrackSegment.h b/src/openrct2/scripting/bindings/ride/ScTrackSegment.h index d5791ecce6..7ab34f7936 100644 --- a/src/openrct2/scripting/bindings/ride/ScTrackSegment.h +++ b/src/openrct2/scripting/bindings/ride/ScTrackSegment.h @@ -19,7 +19,7 @@ namespace OpenRCT2::Scripting { - template<> inline DukValue ToDuk(duk_context* ctx, const rct_vehicle_info& value) + template<> inline DukValue ToDuk(duk_context* ctx, const VehicleInfo& value) { DukObject dukSubposition(ctx); dukSubposition.Set("x", value.x); @@ -46,18 +46,28 @@ namespace OpenRCT2::Scripting std::string description_get() const; int32_t beginZ_get() const; int32_t beginDirection_get() const; - int32_t beginAngle_get() const; + int32_t beginSlope_get() const; int32_t beginBank_get() const; int32_t endX_get() const; int32_t endY_get() const; int32_t endZ_get() const; int32_t endDirection_get() const; - int32_t endAngle_get() const; + int32_t endSlope_get() const; int32_t endBank_get() const; int32_t length_get() const; DukValue elements_get() const; uint16_t getSubpositionLength(uint8_t trackSubposition, uint8_t direction) const; std::vector getSubpositions(uint8_t trackSubposition, uint8_t direction) const; + DukValue nextCurveElement_get() const; + DukValue previousCurveElement_get() const; + DukValue getMirrorElement() const; + DukValue getAlternativeElement() const; + int32_t getPriceModifier() const; + int32_t getPreviewZOffset() const; + int32_t getTrackGroup() const; + template bool getTrackFlag() const; + std::string getTrackCurvature() const; + std::string getTrackSlopeDirection() const; }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/world/ScClimate.hpp b/src/openrct2/scripting/bindings/world/ScClimate.hpp index 86871ec005..125411611b 100644 --- a/src/openrct2/scripting/bindings/world/ScClimate.hpp +++ b/src/openrct2/scripting/bindings/world/ScClimate.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScDate.hpp b/src/openrct2/scripting/bindings/world/ScDate.hpp index a1437d4336..f1f38f34fb 100644 --- a/src/openrct2/scripting/bindings/world/ScDate.hpp +++ b/src/openrct2/scripting/bindings/world/ScDate.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScMap.cpp b/src/openrct2/scripting/bindings/world/ScMap.cpp index 0c3c0d5d56..ee3aea3c1c 100644 --- a/src/openrct2/scripting/bindings/world/ScMap.cpp +++ b/src/openrct2/scripting/bindings/world/ScMap.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -106,14 +106,14 @@ namespace OpenRCT2::Scripting { for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "car") { for (auto trainHead : TrainManager::View()) { - for (auto carId = trainHead->sprite_index; !carId.IsNull();) + for (auto carId = trainHead->Id; !carId.IsNull();) { auto car = GetEntity(carId); result.push_back(GetObjectAsDukValue(_context, std::make_shared(carId))); @@ -125,39 +125,39 @@ namespace OpenRCT2::Scripting { for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "duck") { for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "peep") { for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "guest") { for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "staff") { for (auto sprite : EntityList()) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else @@ -182,42 +182,42 @@ namespace OpenRCT2::Scripting { for (auto sprite : EntityTileList(pos)) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "car") { for (auto sprite : EntityTileList(pos)) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "litter") { for (auto sprite : EntityTileList(pos)) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "duck") { for (auto sprite : EntityTileList(pos)) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "guest") { for (auto sprite : EntityTileList(pos)) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else if (type == "staff") { for (auto sprite : EntityTileList(pos)) { - result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->sprite_index))); + result.push_back(GetObjectAsDukValue(_context, std::make_shared(sprite->Id))); } } else @@ -238,7 +238,7 @@ namespace OpenRCT2::Scripting AsOrDefault(initializer["z"], 0) }; entity->MoveTo(entityPos); - return GetObjectAsDukValue(ctx, std::make_shared(entity->sprite_index)); + return GetObjectAsDukValue(ctx, std::make_shared(entity->Id)); } DukValue ScMap::createEntity(const std::string& type, const DukValue& initializer) @@ -331,7 +331,7 @@ namespace OpenRCT2::Scripting DukValue ScMap::GetEntityAsDukValue(const EntityBase* sprite) const { - auto spriteId = sprite->sprite_index; + auto spriteId = sprite->Id; switch (sprite->Type) { case EntityType::Vehicle: diff --git a/src/openrct2/scripting/bindings/world/ScMap.hpp b/src/openrct2/scripting/bindings/world/ScMap.hpp index d695cc3817..247cf0a5a0 100644 --- a/src/openrct2/scripting/bindings/world/ScMap.hpp +++ b/src/openrct2/scripting/bindings/world/ScMap.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScPark.cpp b/src/openrct2/scripting/bindings/world/ScPark.cpp index 629e187c61..aba155c0fe 100644 --- a/src/openrct2/scripting/bindings/world/ScPark.cpp +++ b/src/openrct2/scripting/bindings/world/ScPark.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -109,18 +109,18 @@ namespace OpenRCT2::Scripting } } - money16 ScPark::entranceFee_get() const + money64 ScPark::entranceFee_get() const { return gParkEntranceFee; } - void ScPark::entranceFee_set(money16 value) + void ScPark::entranceFee_set(money64 value) { ThrowIfGameStateNotMutable(); if (gParkEntranceFee != value) { gParkEntranceFee = value; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } } @@ -139,7 +139,7 @@ namespace OpenRCT2::Scripting return _guestGenerationProbability; } - money16 ScPark::guestInitialCash_get() const + money64 ScPark::guestInitialCash_get() const { return gGuestInitialCash; } @@ -191,7 +191,7 @@ namespace OpenRCT2::Scripting } } - money16 ScPark::totalRideValueForMoney_get() const + money64 ScPark::totalRideValueForMoney_get() const { return gTotalRideValueForMoney; } @@ -207,7 +207,7 @@ namespace OpenRCT2::Scripting if (gTotalAdmissions != value) { gTotalAdmissions = value; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } } @@ -222,25 +222,25 @@ namespace OpenRCT2::Scripting if (gTotalIncomeFromAdmissions != value) { gTotalIncomeFromAdmissions = value; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } } - money32 ScPark::landPrice_get() const + money64 ScPark::landPrice_get() const { return gLandPrice; } - void ScPark::landPrice_set(money32 value) + void ScPark::landPrice_set(money64 value) { ThrowIfGameStateNotMutable(); gLandPrice = value; } - money32 ScPark::constructionRightsPrice_get() const + money64 ScPark::constructionRightsPrice_get() const { return gConstructionRightsPrice; } - void ScPark::constructionRightsPrice_set(money32 value) + void ScPark::constructionRightsPrice_set(money64 value) { ThrowIfGameStateNotMutable(); gConstructionRightsPrice = value; @@ -273,7 +273,7 @@ namespace OpenRCT2::Scripting if (park.Name != value) { park.Name = std::move(value); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } @@ -291,7 +291,7 @@ namespace OpenRCT2::Scripting gParkFlags |= mask; else gParkFlags &= ~mask; - gfx_invalidate_screen(); + GfxInvalidateScreen(); } std::vector> ScPark::messages_get() const diff --git a/src/openrct2/scripting/bindings/world/ScPark.hpp b/src/openrct2/scripting/bindings/world/ScPark.hpp index 10ceaa6a82..439a2539ea 100644 --- a/src/openrct2/scripting/bindings/world/ScPark.hpp +++ b/src/openrct2/scripting/bindings/world/ScPark.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -36,8 +36,8 @@ namespace OpenRCT2::Scripting money64 maxBankLoan_get() const; void maxBankLoan_set(money64 value); - money16 entranceFee_get() const; - void entranceFee_set(money16 value); + money64 entranceFee_get() const; + void entranceFee_set(money64 value); uint32_t guests_get() const; @@ -45,7 +45,7 @@ namespace OpenRCT2::Scripting int32_t guestGenerationProbability_get() const; - money16 guestInitialCash_get() const; + money64 guestInitialCash_get() const; uint8_t guestInitialHappiness_get() const; @@ -59,7 +59,7 @@ namespace OpenRCT2::Scripting money64 companyValue_get() const; void companyValue_set(money64 value); - money16 totalRideValueForMoney_get() const; + money64 totalRideValueForMoney_get() const; uint32_t totalAdmissions_get() const; void totalAdmissions_set(uint32_t value); @@ -67,11 +67,11 @@ namespace OpenRCT2::Scripting money64 totalIncomeFromAdmissions_get() const; void totalIncomeFromAdmissions_set(money64 value); - money32 landPrice_get() const; - void landPrice_set(money32 value); + money64 landPrice_get() const; + void landPrice_set(money64 value); - money32 constructionRightsPrice_get() const; - void constructionRightsPrice_set(money32 value); + money64 constructionRightsPrice_get() const; + void constructionRightsPrice_set(money64 value); int16_t casualtyPenalty_get() const; void casualtyPenalty_set(int16_t value); diff --git a/src/openrct2/scripting/bindings/world/ScParkMessage.cpp b/src/openrct2/scripting/bindings/world/ScParkMessage.cpp index 18ea04bba5..68804195e8 100644 --- a/src/openrct2/scripting/bindings/world/ScParkMessage.cpp +++ b/src/openrct2/scripting/bindings/world/ScParkMessage.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScParkMessage.hpp b/src/openrct2/scripting/bindings/world/ScParkMessage.hpp index 8a607e5294..8295d33cbd 100644 --- a/src/openrct2/scripting/bindings/world/ScParkMessage.hpp +++ b/src/openrct2/scripting/bindings/world/ScParkMessage.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScScenario.hpp b/src/openrct2/scripting/bindings/world/ScScenario.hpp index 01875dd893..63513d204a 100644 --- a/src/openrct2/scripting/bindings/world/ScScenario.hpp +++ b/src/openrct2/scripting/bindings/world/ScScenario.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScTile.cpp b/src/openrct2/scripting/bindings/world/ScTile.cpp index 902e0234aa..a3c9f6e968 100644 --- a/src/openrct2/scripting/bindings/world/ScTile.cpp +++ b/src/openrct2/scripting/bindings/world/ScTile.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScTile.hpp b/src/openrct2/scripting/bindings/world/ScTile.hpp index 3d554f1a2e..925fdf33e6 100644 --- a/src/openrct2/scripting/bindings/world/ScTile.hpp +++ b/src/openrct2/scripting/bindings/world/ScTile.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index 82f76ed6c1..44fea35ab7 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,6 +16,7 @@ # include "../../../core/Guard.hpp" # include "../../../entity/EntityRegistry.h" # include "../../../ride/Ride.h" +# include "../../../ride/RideData.h" # include "../../../ride/Track.h" # include "../../../world/Footpath.h" # include "../../../world/Scenery.h" @@ -90,12 +91,12 @@ namespace OpenRCT2::Scripting uint8_t ScTileElement::baseHeight_get() const { - return _element->base_height; + return _element->BaseHeight; } void ScTileElement::baseHeight_set(uint8_t newBaseHeight) { ThrowIfGameStateNotMutable(); - _element->base_height = newBaseHeight; + _element->BaseHeight = newBaseHeight; Invalidate(); } @@ -112,12 +113,12 @@ namespace OpenRCT2::Scripting uint8_t ScTileElement::clearanceHeight_get() const { - return _element->clearance_height; + return _element->ClearanceHeight; } void ScTileElement::clearanceHeight_set(uint8_t newClearanceHeight) { ThrowIfGameStateNotMutable(); - _element->clearance_height = newClearanceHeight; + _element->ClearanceHeight = newClearanceHeight; Invalidate(); } @@ -493,9 +494,14 @@ namespace OpenRCT2::Scripting case TileElementType::Track: { auto* el = _element->AsTrack(); - auto* ride = get_ride(el->GetRideIndex()); - if (ride != nullptr && ride->type == RIDE_TYPE_MAZE) - throw DukException() << "Cannot read 'sequence' property, TrackElement belongs to a maze."; + auto* ride = GetRide(el->GetRideIndex()); + + if (ride != nullptr) + { + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + throw DukException() << "Cannot read 'sequence' property, TrackElement belongs to a maze."; + } duk_push_int(ctx, el->GetSequenceIndex()); break; @@ -539,9 +545,14 @@ namespace OpenRCT2::Scripting case TileElementType::Track: { auto* el = _element->AsTrack(); - auto ride = get_ride(el->GetRideIndex()); - if (ride != nullptr && ride->type == RIDE_TYPE_MAZE) - throw DukException() << "Cannot set 'sequence' property, TrackElement belongs to a maze."; + auto ride = GetRide(el->GetRideIndex()); + + if (ride != nullptr) + { + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) + throw DukException() << "Cannot set 'sequence' property, TrackElement belongs to a maze."; + } el->SetSequenceIndex(value.as_uint()); Invalidate(); @@ -807,11 +818,12 @@ namespace OpenRCT2::Scripting if (el == nullptr) throw DukException() << "Cannot read 'mazeEntry' property, element is not a TrackElement."; - Ride* ride = get_ride(el->GetRideIndex()); + Ride* ride = GetRide(el->GetRideIndex()); if (ride == nullptr) throw DukException() << "Cannot read 'mazeEntry' property, ride is invalid."; - if (ride->type != RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot read 'mazeEntry' property, ride is not a maze."; duk_push_int(ctx, el->GetMazeEntry()); @@ -836,11 +848,12 @@ namespace OpenRCT2::Scripting if (el == nullptr) throw DukException() << "Cannot set 'mazeEntry' property, tile element is not a TrackElement."; - auto* ride = get_ride(el->GetRideIndex()); + auto* ride = GetRide(el->GetRideIndex()); if (ride == nullptr) throw DukException() << "Cannot set 'mazeEntry' property, ride is invalid."; - if (ride->type != RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot set 'mazeEntry' property, ride is not a maze."; el->SetMazeEntry(value.as_uint()); @@ -863,11 +876,12 @@ namespace OpenRCT2::Scripting if (el == nullptr) throw DukException() << "Cannot read 'colourScheme' property, tile element is not a TrackElement."; - auto* ride = get_ride(el->GetRideIndex()); + auto* ride = GetRide(el->GetRideIndex()); if (ride == nullptr) throw DukException() << "Cannot read 'colourScheme' property, ride is invalid."; - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot read 'colourScheme' property, TrackElement belongs to a maze."; duk_push_int(ctx, el->GetColourScheme()); @@ -892,11 +906,12 @@ namespace OpenRCT2::Scripting if (el == nullptr) throw DukException() << "Cannot set 'colourScheme' property, tile element is not a TrackElement."; - auto* ride = get_ride(el->GetRideIndex()); + auto* ride = GetRide(el->GetRideIndex()); if (ride == nullptr) throw DukException() << "Cannot set 'colourScheme', ride is invalid."; - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot set 'colourScheme' property, TrackElement belongs to a maze."; el->SetColourScheme(value.as_uint()); @@ -919,11 +934,12 @@ namespace OpenRCT2::Scripting if (el == nullptr) throw DukException() << "Cannot read 'seatRotation' property, tile element is not a TrackElement."; - auto* ride = get_ride(el->GetRideIndex()); + auto* ride = GetRide(el->GetRideIndex()); if (ride == nullptr) throw DukException() << "Cannot read 'seatRotation' property, ride is invalid."; - if (ride->type == RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot read 'seatRotation' property, TrackElement belongs to a maze."; duk_push_int(ctx, el->GetSeatRotation()); @@ -948,11 +964,12 @@ namespace OpenRCT2::Scripting if (el == nullptr) throw DukException() << "Cannot set 'seatRotation' property, tile element is not a TrackElement."; - auto* ride = get_ride(el->GetRideIndex()); + auto* ride = GetRide(el->GetRideIndex()); if (ride == nullptr) throw DukException() << "Cannot set 'seatRotation' property, ride is invalid."; - if (ride->type != RIDE_TYPE_MAZE) + const auto& rtd = ride->GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) throw DukException() << "Cannot set 'seatRotation' property, TrackElement belongs to a maze."; el->SetSeatRotation(value.as_uint()); diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.hpp b/src/openrct2/scripting/bindings/world/ScTileElement.hpp index 849f9bfe87..f7bba6416a 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.hpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 11daeece9e..8ca7857616 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -945,6 +945,7 @@ enum SPR_G2_RCT1_SIMULATE_BUTTON_1, SPR_G2_RCT1_SIMULATE_BUTTON_2, SPR_G2_RCT1_SIMULATE_BUTTON_3, + SPR_G2_INFINITY, SPR_G2_LAND_TOOL_SIZE_6, SPR_G2_MOUNTAIN_TOOL_EVEN, SPR_G2_MOUNTAIN_TOOL_ODD, @@ -1081,6 +1082,10 @@ enum SPR_G2_T_CARON_LOWER, SPR_G2_U_RING_UPPER, SPR_G2_U_RING_LOWER, + SPR_G2_W_CIRCUMFLEX_UPPER, + SPR_G2_W_CIRCUMFLEX_LOWER, + SPR_G2_Y_CIRCUMFLEX_UPPER, + SPR_G2_Y_CIRCUMFLEX_LOWER, SPR_G2_Z_CARON_UPPER, SPR_G2_Z_CARON_LOWER, @@ -1175,6 +1180,19 @@ enum SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_SUPPORTS, + SPR_G2_WOODEN_RC_25_60_SWNE_CHAINED, + SPR_G2_WOODEN_RC_25_60_SENW_CHAINED, + SPR_G2_WOODEN_RC_25_60_SWNE_CHAINED_BACK, + SPR_G2_WOODEN_RC_25_60_SENW_CHAINED_BACK, + SPR_G2_WOODEN_RC_60_SWNE_CHAINED, + SPR_G2_WOODEN_RC_60_SENW_CHAINED, + SPR_G2_WOODEN_RC_60_SWNE_CHAINED_BACK, + SPR_G2_WOODEN_RC_60_SENW_CHAINED_BACK, + SPR_G2_WOODEN_RC_60_25_SWNE_CHAINED, + SPR_G2_WOODEN_RC_60_25_SENW_CHAINED, + SPR_G2_WOODEN_RC_60_25_SWNE_CHAINED_BACK, + SPR_G2_WOODEN_RC_60_25_SENW_CHAINED_BACK, + SPR_G2_BM_INVERT_BOOSTER_1, SPR_G2_BM_INVERT_BOOSTER_2, diff --git a/src/openrct2/title/Command/End.cpp b/src/openrct2/title/Command/End.cpp index 467cc28bd5..1b1ba6ed93 100644 --- a/src/openrct2/title/Command/End.cpp +++ b/src/openrct2/title/Command/End.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/End.h b/src/openrct2/title/Command/End.h index 9f40acefe3..4bca2f2e89 100644 --- a/src/openrct2/title/Command/End.h +++ b/src/openrct2/title/Command/End.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/FollowEntity.cpp b/src/openrct2/title/Command/FollowEntity.cpp index 28bd530a3f..239dec7fd6 100644 --- a/src/openrct2/title/Command/FollowEntity.cpp +++ b/src/openrct2/title/Command/FollowEntity.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,10 +15,10 @@ namespace OpenRCT2::Title { int16_t FollowEntityCommand::operator()(int16_t timer) { - auto* w = window_get_main(); + auto* w = WindowGetMain(); if (w != nullptr) { - window_follow_sprite(*w, Follow.SpriteIndex); + WindowFollowSprite(*w, Follow.SpriteIndex); } return 0; diff --git a/src/openrct2/title/Command/FollowEntity.h b/src/openrct2/title/Command/FollowEntity.h index 0fbb7a5908..267b0a233a 100644 --- a/src/openrct2/title/Command/FollowEntity.h +++ b/src/openrct2/title/Command/FollowEntity.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/LoadPark.cpp b/src/openrct2/title/Command/LoadPark.cpp index ff83e2aa65..f19f4886d9 100644 --- a/src/openrct2/title/Command/LoadPark.cpp +++ b/src/openrct2/title/Command/LoadPark.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/LoadPark.h b/src/openrct2/title/Command/LoadPark.h index 8198f8a184..740519bdce 100644 --- a/src/openrct2/title/Command/LoadPark.h +++ b/src/openrct2/title/Command/LoadPark.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/LoadScenario.cpp b/src/openrct2/title/Command/LoadScenario.cpp index fb9789d541..910a2a029e 100644 --- a/src/openrct2/title/Command/LoadScenario.cpp +++ b/src/openrct2/title/Command/LoadScenario.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/LoadScenario.h b/src/openrct2/title/Command/LoadScenario.h index 62b96e90e7..0691e20d5b 100644 --- a/src/openrct2/title/Command/LoadScenario.h +++ b/src/openrct2/title/Command/LoadScenario.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/Restart.cpp b/src/openrct2/title/Command/Restart.cpp index 4473ae48f6..df49c38b38 100644 --- a/src/openrct2/title/Command/Restart.cpp +++ b/src/openrct2/title/Command/Restart.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/Restart.h b/src/openrct2/title/Command/Restart.h index 45c76af956..ccdb3ea987 100644 --- a/src/openrct2/title/Command/Restart.h +++ b/src/openrct2/title/Command/Restart.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/RotateView.cpp b/src/openrct2/title/Command/RotateView.cpp index 028d529119..463cadc1c0 100644 --- a/src/openrct2/title/Command/RotateView.cpp +++ b/src/openrct2/title/Command/RotateView.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,12 +15,12 @@ namespace OpenRCT2::Title { int16_t RotateViewCommand::operator()(int16_t timer) { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr) { for (uint_fast8_t i = 0; i < Rotations; i++) { - window_rotate_camera(*w, 1); + WindowRotateCamera(*w, 1); } } diff --git a/src/openrct2/title/Command/RotateView.h b/src/openrct2/title/Command/RotateView.h index c3bf0bb423..12af547543 100644 --- a/src/openrct2/title/Command/RotateView.h +++ b/src/openrct2/title/Command/RotateView.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/SetLocation.cpp b/src/openrct2/title/Command/SetLocation.cpp index 67c52b56a8..517d17d1a9 100644 --- a/src/openrct2/title/Command/SetLocation.cpp +++ b/src/openrct2/title/Command/SetLocation.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,7 +18,7 @@ namespace OpenRCT2::Title { int16_t SetLocationCommand::operator()(int16_t timer) { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr) { auto loc = TileCoordsXY(Location.X, Location.Y).ToCoordsXY().ToTileCentre(); @@ -30,7 +30,7 @@ namespace OpenRCT2::Title w->SetLocation({ loc, z }); gScreenFlags = oldScreenFlags; - viewport_update_position(w); + ViewportUpdatePosition(w); } return 0; diff --git a/src/openrct2/title/Command/SetLocation.h b/src/openrct2/title/Command/SetLocation.h index 639e47e043..1dbc14a33d 100644 --- a/src/openrct2/title/Command/SetLocation.h +++ b/src/openrct2/title/Command/SetLocation.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/SetSpeed.cpp b/src/openrct2/title/Command/SetSpeed.cpp index 40189530d0..46d858c399 100644 --- a/src/openrct2/title/Command/SetSpeed.cpp +++ b/src/openrct2/title/Command/SetSpeed.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/SetSpeed.h b/src/openrct2/title/Command/SetSpeed.h index 36d5e7daf0..fa7b212a91 100644 --- a/src/openrct2/title/Command/SetSpeed.h +++ b/src/openrct2/title/Command/SetSpeed.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/SetZoom.cpp b/src/openrct2/title/Command/SetZoom.cpp index 8f254edd9c..7c28ee2b69 100644 --- a/src/openrct2/title/Command/SetZoom.cpp +++ b/src/openrct2/title/Command/SetZoom.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,10 +16,10 @@ namespace OpenRCT2::Title { int16_t SetZoomCommand::operator()(int16_t timer) { - rct_window* w = window_get_main(); + WindowBase* w = WindowGetMain(); if (w != nullptr) { - window_zoom_set(*w, ZoomLevel{ static_cast(Zoom) }, false); + WindowZoomSet(*w, ZoomLevel{ static_cast(Zoom) }, false); } return 0; diff --git a/src/openrct2/title/Command/SetZoom.h b/src/openrct2/title/Command/SetZoom.h index 70374fac86..09dc3ffba9 100644 --- a/src/openrct2/title/Command/SetZoom.h +++ b/src/openrct2/title/Command/SetZoom.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/Wait.cpp b/src/openrct2/title/Command/Wait.cpp index ef06225a5f..618693a638 100644 --- a/src/openrct2/title/Command/Wait.cpp +++ b/src/openrct2/title/Command/Wait.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/Command/Wait.h b/src/openrct2/title/Command/Wait.h index 9bc216955c..c56748a065 100644 --- a/src/openrct2/title/Command/Wait.h +++ b/src/openrct2/title/Command/Wait.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/TitleScreen.cpp b/src/openrct2/title/TitleScreen.cpp index 5a95c3c095..e8188b0943 100644 --- a/src/openrct2/title/TitleScreen.cpp +++ b/src/openrct2/title/TitleScreen.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -73,7 +73,7 @@ bool TitleScreen::PreviewSequence(size_t value) } else { - _currentSequence = title_get_config_sequence(); + _currentSequence = TitleGetConfigSequence(); if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) { TryLoadSequence(); @@ -86,13 +86,13 @@ void TitleScreen::StopPreviewingSequence() { if (_previewingSequence) { - rct_window* mainWindow = window_get_main(); + WindowBase* mainWindow = WindowGetMain(); if (mainWindow != nullptr) { - window_unfollow_sprite(*mainWindow); + WindowUnfollowSprite(*mainWindow); } _previewingSequence = false; - _currentSequence = title_get_config_sequence(); + _currentSequence = TitleGetConfigSequence(); gPreviewingTitleSequenceInGame = false; } } @@ -114,11 +114,11 @@ void TitleScreen::SetHideVersionInfo(bool value) void TitleScreen::Load() { - log_verbose("TitleScreen::Load()"); + LOG_VERBOSE("TitleScreen::Load()"); - if (game_is_paused()) + if (GameIsPaused()) { - pause_toggle(); + PauseToggle(); } gScreenFlags = SCREEN_FLAGS_TITLE_DEMO; @@ -130,7 +130,7 @@ void TitleScreen::Load() #endif OpenRCT2::Audio::StopAll(); GetContext()->GetGameState()->InitAll(DEFAULT_MAP_SIZE); - viewport_init_all(); + ViewportInitAll(); ContextOpenWindow(WindowClass::MainWindow); CreateWindows(); TitleInitialise(); @@ -152,17 +152,17 @@ void TitleScreen::Load() _sequencePlayer->Update(); } - log_verbose("TitleScreen::Load() finished"); + LOG_VERBOSE("TitleScreen::Load() finished"); } void TitleScreen::Tick() { gInUpdateCode = true; - screenshot_check(); - title_handle_keyboard_input(); + ScreenshotCheck(); + TitleHandleKeyboardInput(); - if (game_is_not_paused()) + if (GameIsNotPaused()) { TryLoadSequence(); _sequencePlayer->Update(); @@ -176,14 +176,14 @@ void TitleScreen::Tick() { _gameState.UpdateLogic(); } - update_palette_effects(); + UpdatePaletteEffects(); // update_weather_animation(); } - input_set_flag(INPUT_FLAG_VIEWPORT_SCROLLING, false); + InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false); ContextUpdateMapTooltip(); - window_dispatch_update_all(); + WindowDispatchUpdateAll(); gSavedAge++; @@ -200,13 +200,12 @@ void TitleScreen::ChangePresetSequence(size_t preset) return; } - const utf8* configId = title_sequence_manager_get_config_id(preset); - SafeFree(gConfigInterface.CurrentTitleSequencePreset); - gConfigInterface.CurrentTitleSequencePreset = _strdup(configId); + const utf8* configId = TitleSequenceManagerGetConfigID(preset); + gConfigInterface.CurrentTitleSequencePreset = configId; if (!_previewingSequence) _currentSequence = preset; - window_invalidate_all(); + WindowInvalidateAll(); } /** @@ -219,7 +218,7 @@ void TitleScreen::CreateWindows() ContextOpenWindow(WindowClass::TitleExit); ContextOpenWindow(WindowClass::TitleOptions); ContextOpenWindow(WindowClass::TitleLogo); - window_resize_gui(ContextGetWidth(), ContextGetHeight()); + WindowResizeGui(ContextGetWidth(), ContextGetHeight()); _hideVersionInfo = false; } @@ -231,64 +230,70 @@ void TitleScreen::TitleInitialise() } if (gConfigInterface.RandomTitleSequence) { - bool RCT1Installed = false, RCT1AAInstalled = false, RCT1LLInstalled = false; - int RCT1Count = 0; - size_t scenarioCount = scenario_repository_get_count(); - - for (size_t s = 0; s < scenarioCount; s++) + const size_t total = TitleSequenceManager::GetCount(); + if (total > 0) { - if (scenario_repository_get_by_index(s)->source_game == ScenarioSource::RCT1) - { - RCT1Count++; - } - if (scenario_repository_get_by_index(s)->source_game == ScenarioSource::RCT1_AA) - { - RCT1AAInstalled = true; - } - if (scenario_repository_get_by_index(s)->source_game == ScenarioSource::RCT1_LL) - { - RCT1LLInstalled = true; - } - } + bool RCT1Installed = false, RCT1AAInstalled = false, RCT1LLInstalled = false; + uint32_t RCT1Count = 0; + const size_t scenarioCount = ScenarioRepositoryGetCount(); - // Mega Park can show up in the scenario list even if RCT1 has been uninstalled, so it must be greater than 1 - if (RCT1Count > 1) - { - RCT1Installed = true; - } + for (size_t s = 0; s < scenarioCount; s++) + { + const ScenarioSource sourceGame = ScenarioRepositoryGetByIndex(s)->SourceGame; + switch (sourceGame) + { + case ScenarioSource::RCT1: + RCT1Count++; + break; + case ScenarioSource::RCT1_AA: + RCT1AAInstalled = true; + break; + case ScenarioSource::RCT1_LL: + RCT1LLInstalled = true; + break; + default: + break; + } + } - int32_t random = 0; - bool safeSequence = false; - std::string RCT1String = format_string(STR_TITLE_SEQUENCE_RCT1, nullptr); - std::string RCT1AAString = format_string(STR_TITLE_SEQUENCE_RCT1_AA, nullptr); - std::string RCT1LLString = format_string(STR_TITLE_SEQUENCE_RCT1_AA_LL, nullptr); + // Mega Park can show up in the scenario list even if RCT1 has been uninstalled, so it must be greater than 1 + RCT1Installed = RCT1Count > 1; - // Ensure the random sequence chosen isn't from RCT1 or expansion if the player doesn't have it installed - while (!safeSequence) - { - size_t total = TitleSequenceManager::GetCount(); - random = util_rand() % static_cast(total); - const utf8* scName = title_sequence_manager_get_name(random); - safeSequence = true; - if (scName == RCT1String) + int32_t random = 0; + bool safeSequence = false; + const std::string RCT1String = FormatStringID(STR_TITLE_SEQUENCE_RCT1, nullptr); + const std::string RCT1AAString = FormatStringID(STR_TITLE_SEQUENCE_RCT1_AA, nullptr); + const std::string RCT1LLString = FormatStringID(STR_TITLE_SEQUENCE_RCT1_AA_LL, nullptr); + + // Ensure the random sequence chosen isn't from RCT1 or expansion if the player doesn't have it installed + while (!safeSequence) { - safeSequence = RCT1Installed; - } - if (scName == RCT1AAString) - { - safeSequence = RCT1AAInstalled; - } - if (scName == RCT1LLString) - { - safeSequence = RCT1LLInstalled; + random = UtilRand() % static_cast(total); + const utf8* scName = TitleSequenceManagerGetName(random); + if (scName == RCT1String) + { + safeSequence = RCT1Installed; + } + else if (scName == RCT1AAString) + { + safeSequence = RCT1AAInstalled; + } + else if (scName == RCT1LLString) + { + safeSequence = RCT1LLInstalled; + } + else + { + safeSequence = true; + } } + ChangePresetSequence(random); } - ChangePresetSequence(random); } - size_t seqId = title_get_config_sequence(); + size_t seqId = TitleGetConfigSequence(); if (seqId == SIZE_MAX) { - seqId = title_sequence_manager_get_index_for_config_id("*OPENRCT2"); + seqId = TitleSequenceManagerGetIndexForConfigID("*OPENRCT2"); if (seqId == SIZE_MAX) { seqId = 0; @@ -318,12 +323,11 @@ bool TitleScreen::TryLoadSequence(bool loadPreview) if (targetSequence != _currentSequence && !loadPreview) { // Forcefully change the preset to a preset that works. - const utf8* configId = title_sequence_manager_get_config_id(targetSequence); - SafeFree(gConfigInterface.CurrentTitleSequencePreset); - gConfigInterface.CurrentTitleSequencePreset = _strdup(configId); + const utf8* configId = TitleSequenceManagerGetConfigID(targetSequence); + gConfigInterface.CurrentTitleSequencePreset = configId; } _currentSequence = targetSequence; - gfx_invalidate_screen(); + GfxInvalidateScreen(); return true; } targetSequence = (targetSequence + 1) % numSequences; @@ -336,14 +340,14 @@ bool TitleScreen::TryLoadSequence(bool loadPreview) if (!loadPreview) { GetContext()->GetGameState()->InitAll(DEFAULT_MAP_SIZE); - game_notify_map_changed(); + GameNotifyMapChanged(); } return false; } return true; } -void title_load() +void TitleLoad() { if (_singleton != nullptr) { @@ -351,7 +355,7 @@ void title_load() } } -void title_create_windows() +void TitleCreateWindows() { if (_singleton != nullptr) { @@ -359,7 +363,7 @@ void title_create_windows() } } -void* title_get_sequence_player() +void* TitleGetSequencePlayer() { void* result = nullptr; if (_singleton != nullptr) @@ -369,7 +373,7 @@ void* title_get_sequence_player() return result; } -void title_sequence_change_preset(size_t preset) +void TitleSequenceChangePreset(size_t preset) { if (_singleton != nullptr) { @@ -377,7 +381,7 @@ void title_sequence_change_preset(size_t preset) } } -bool title_should_hide_version_info() +bool TitleShouldHideVersionInfo() { bool result = false; if (_singleton != nullptr) @@ -387,7 +391,7 @@ bool title_should_hide_version_info() return result; } -void title_set_hide_version_info(bool value) +void TitleSetHideVersionInfo(bool value) { if (_singleton != nullptr) { @@ -395,12 +399,12 @@ void title_set_hide_version_info(bool value) } } -size_t title_get_config_sequence() +size_t TitleGetConfigSequence() { - return title_sequence_manager_get_index_for_config_id(gConfigInterface.CurrentTitleSequencePreset); + return TitleSequenceManagerGetIndexForConfigID(gConfigInterface.CurrentTitleSequencePreset.c_str()); } -size_t title_get_current_sequence() +size_t TitleGetCurrentSequence() { size_t result = 0; if (_singleton != nullptr) @@ -410,7 +414,7 @@ size_t title_get_current_sequence() return result; } -bool title_preview_sequence(size_t value) +bool TitlePreviewSequence(size_t value) { if (_singleton != nullptr) { @@ -419,7 +423,7 @@ bool title_preview_sequence(size_t value) return false; } -void title_stop_previewing_sequence() +void TitleStopPreviewingSequence() { if (_singleton != nullptr) { @@ -427,7 +431,7 @@ void title_stop_previewing_sequence() } } -bool title_is_previewing_sequence() +bool TitleIsPreviewingSequence() { if (_singleton != nullptr) { @@ -436,7 +440,7 @@ bool title_is_previewing_sequence() return false; } -void DrawOpenRCT2(rct_drawpixelinfo* dpi, const ScreenCoordsXY& screenCoords) +void DrawOpenRCT2(DrawPixelInfo* dpi, const ScreenCoordsXY& screenCoords) { thread_local std::string buffer; buffer.clear(); @@ -444,11 +448,11 @@ void DrawOpenRCT2(rct_drawpixelinfo* dpi, const ScreenCoordsXY& screenCoords) // Write name and version information buffer += gVersionInfoFull; - gfx_draw_string(dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), buffer.c_str(), { COLOUR_BLACK }); + GfxDrawString(*dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), buffer.c_str(), { COLOUR_BLACK }); // Invalidate screen area - int16_t width = static_cast(gfx_get_string_width(buffer, FontStyle::Medium)); - gfx_set_dirty_blocks( + int16_t width = static_cast(GfxGetStringWidth(buffer, FontStyle::Medium)); + GfxSetDirtyBlocks( { screenCoords, screenCoords + ScreenCoordsXY{ width, 30 } }); // 30 is an arbitrary height to catch both strings // Write platform information @@ -457,5 +461,5 @@ void DrawOpenRCT2(rct_drawpixelinfo* dpi, const ScreenCoordsXY& screenCoords) buffer.append(" ("); buffer.append(OPENRCT2_ARCHITECTURE); buffer.append(")"); - gfx_draw_string(dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK }); + GfxDrawString(*dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK }); } diff --git a/src/openrct2/title/TitleScreen.h b/src/openrct2/title/TitleScreen.h index 3ba9117099..28e7cfe751 100644 --- a/src/openrct2/title/TitleScreen.h +++ b/src/openrct2/title/TitleScreen.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -54,15 +54,15 @@ namespace OpenRCT2 // When testing title sequences within a normal game extern bool gPreviewingTitleSequenceInGame; -void title_load(); -void title_create_windows(); -void* title_get_sequence_player(); -void title_sequence_change_preset(size_t preset); -bool title_should_hide_version_info(); -void title_set_hide_version_info(bool value); -size_t title_get_config_sequence(); -size_t title_get_current_sequence(); -bool title_preview_sequence(size_t value); -void title_stop_previewing_sequence(); -bool title_is_previewing_sequence(); -void DrawOpenRCT2(rct_drawpixelinfo* dpi, const ScreenCoordsXY& screenCoords); +void TitleLoad(); +void TitleCreateWindows(); +void* TitleGetSequencePlayer(); +void TitleSequenceChangePreset(size_t preset); +bool TitleShouldHideVersionInfo(); +void TitleSetHideVersionInfo(bool value); +size_t TitleGetConfigSequence(); +size_t TitleGetCurrentSequence(); +bool TitlePreviewSequence(size_t value); +void TitleStopPreviewingSequence(); +bool TitleIsPreviewingSequence(); +void DrawOpenRCT2(DrawPixelInfo* dpi, const ScreenCoordsXY& screenCoords); diff --git a/src/openrct2/title/TitleSequence.cpp b/src/openrct2/title/TitleSequence.cpp index b2c1f7d3aa..864f0bba44 100644 --- a/src/openrct2/title/TitleSequence.cpp +++ b/src/openrct2/title/TitleSequence.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -55,7 +55,7 @@ namespace OpenRCT2::Title std::vector saves; bool isZip; - log_verbose("Loading title sequence: %s", path.c_str()); + LOG_VERBOSE("Loading title sequence: %s", path.c_str()); auto ext = Path::GetExtension(path); if (String::Equals(ext, TITLE_SEQUENCE_EXTENSION)) @@ -382,7 +382,7 @@ namespace OpenRCT2::Title { auto entityID = EntityId::FromUnderlying(atoi(parts[1].data()) & 0xFFFF); auto followCommand = FollowEntityCommand{ entityID }; - safe_strcpy(followCommand.Follow.SpriteName, parts[2].data(), USER_STRING_MAX_LENGTH); + SafeStrCpy(followCommand.Follow.SpriteName, parts[2].data(), USER_STRING_MAX_LENGTH); command = followCommand; } else if (_stricmp(token, "WAIT") == 0) @@ -401,7 +401,7 @@ namespace OpenRCT2::Title else if (_stricmp(token, "LOADSC") == 0) { auto loadScenarioCommand = LoadScenarioCommand{}; - safe_strcpy(loadScenarioCommand.Scenario, parts[1].data(), sizeof(loadScenarioCommand.Scenario)); + SafeStrCpy(loadScenarioCommand.Scenario, parts[1].data(), sizeof(loadScenarioCommand.Scenario)); command = loadScenarioCommand; } } diff --git a/src/openrct2/title/TitleSequence.h b/src/openrct2/title/TitleSequence.h index a175ee0647..0473ae2c3a 100644 --- a/src/openrct2/title/TitleSequence.h +++ b/src/openrct2/title/TitleSequence.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/title/TitleSequenceManager.cpp b/src/openrct2/title/TitleSequenceManager.cpp index 7347a6c4b1..5a4d157d37 100644 --- a/src/openrct2/title/TitleSequenceManager.cpp +++ b/src/openrct2/title/TitleSequenceManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -236,7 +236,7 @@ namespace TitleSequenceManager if (item.PredefinedIndex != PREDEFINED_INDEX_CUSTOM) { StringId stringId = PredefinedSequences[item.PredefinedIndex].StringId; - item.Name = language_get_string(stringId); + item.Name = LanguageGetString(stringId); } else if (IsNameReserved(item.Name)) { @@ -279,12 +279,12 @@ namespace TitleSequenceManager } } // namespace TitleSequenceManager -size_t title_sequence_manager_get_count() +size_t TitleSequenceManagerGetCount() { return TitleSequenceManager::GetCount(); } -const utf8* title_sequence_manager_get_name(size_t index) +const utf8* TitleSequenceManagerGetName(size_t index) { auto item = TitleSequenceManager::GetItem(index); if (item == nullptr) @@ -294,7 +294,7 @@ const utf8* title_sequence_manager_get_name(size_t index) return item->Name.c_str(); } -const utf8* title_sequence_manager_get_path(size_t index) +const utf8* TitleSequenceManagerGetPath(size_t index) { auto item = TitleSequenceManager::GetItem(index); if (item == nullptr) @@ -304,7 +304,7 @@ const utf8* title_sequence_manager_get_path(size_t index) return item->Path.c_str(); } -const utf8* title_sequence_manager_get_config_id(size_t index) +const utf8* TitleSequenceManagerGetConfigID(size_t index) { auto item = TitleSequenceManager::GetItem(index); if (item == nullptr) @@ -323,7 +323,7 @@ const utf8* title_sequence_manager_get_config_id(size_t index) return name.c_str(); } -size_t title_sequence_manager_get_predefined_index(size_t index) +size_t TitleSequenceManagerGetPredefinedIndex(size_t index) { auto item = TitleSequenceManager::GetItem(index); if (item == nullptr) @@ -334,12 +334,12 @@ size_t title_sequence_manager_get_predefined_index(size_t index) return predefinedIndex; } -size_t title_sequence_manager_get_index_for_config_id(const utf8* configId) +size_t TitleSequenceManagerGetIndexForConfigID(const utf8* configId) { size_t count = TitleSequenceManager::GetCount(); for (size_t i = 0; i < count; i++) { - const utf8* cid = title_sequence_manager_get_config_id(i); + const utf8* cid = TitleSequenceManagerGetConfigID(i); if (String::Equals(cid, configId)) { return i; @@ -348,12 +348,12 @@ size_t title_sequence_manager_get_index_for_config_id(const utf8* configId) return SIZE_MAX; } -size_t title_sequence_manager_get_index_for_name(const utf8* name) +size_t TitleSequenceManagerGetIndexForName(const utf8* name) { size_t count = TitleSequenceManager::GetCount(); for (size_t i = 0; i < count; i++) { - const utf8* tn = title_sequence_manager_get_name(i); + const utf8* tn = TitleSequenceManagerGetName(i); if (String::Equals(tn, name)) { return i; @@ -362,27 +362,27 @@ size_t title_sequence_manager_get_index_for_name(const utf8* name) return SIZE_MAX; } -void title_sequence_manager_scan() +void TitleSequenceManagerScan() { TitleSequenceManager::Scan(); } -void title_sequence_manager_delete(size_t i) +void TitleSequenceManagerDelete(size_t i) { TitleSequenceManager::DeleteItem(i); } -size_t title_sequence_manager_rename(size_t i, const utf8* name) +size_t TitleSequenceManagerRename(size_t i, const utf8* name) { return TitleSequenceManager::RenameItem(i, name); } -size_t title_sequence_manager_duplicate(size_t i, const utf8* name) +size_t TitleSequenceManagerDuplicate(size_t i, const utf8* name) { return TitleSequenceManager::DuplicateItem(i, name); } -size_t title_sequence_manager_create(const utf8* name) +size_t TitleSequenceManagerCreate(const utf8* name) { return TitleSequenceManager::CreateItem(name); } diff --git a/src/openrct2/title/TitleSequenceManager.h b/src/openrct2/title/TitleSequenceManager.h index 03290ddf96..adb76ce8ed 100644 --- a/src/openrct2/title/TitleSequenceManager.h +++ b/src/openrct2/title/TitleSequenceManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,15 +35,15 @@ namespace TitleSequenceManager constexpr const size_t PREDEFINED_INDEX_CUSTOM = std::numeric_limits::max(); -size_t title_sequence_manager_get_count(); -const utf8* title_sequence_manager_get_name(size_t index); -const utf8* title_sequence_manager_get_path(size_t index); -const utf8* title_sequence_manager_get_config_id(size_t index); -size_t title_sequence_manager_get_predefined_index(size_t index); -size_t title_sequence_manager_get_index_for_config_id(const utf8* configId); -size_t title_sequence_manager_get_index_for_name(const utf8* name); -void title_sequence_manager_scan(); -void title_sequence_manager_delete(size_t i); -size_t title_sequence_manager_rename(size_t i, const utf8* name); -size_t title_sequence_manager_duplicate(size_t i, const utf8* name); -size_t title_sequence_manager_create(const utf8* name); +size_t TitleSequenceManagerGetCount(); +const utf8* TitleSequenceManagerGetName(size_t index); +const utf8* TitleSequenceManagerGetPath(size_t index); +const utf8* TitleSequenceManagerGetConfigID(size_t index); +size_t TitleSequenceManagerGetPredefinedIndex(size_t index); +size_t TitleSequenceManagerGetIndexForConfigID(const utf8* configId); +size_t TitleSequenceManagerGetIndexForName(const utf8* name); +void TitleSequenceManagerScan(); +void TitleSequenceManagerDelete(size_t i); +size_t TitleSequenceManagerRename(size_t i, const utf8* name); +size_t TitleSequenceManagerDuplicate(size_t i, const utf8* name); +size_t TitleSequenceManagerCreate(const utf8* name); diff --git a/src/openrct2/title/TitleSequencePlayer.h b/src/openrct2/title/TitleSequencePlayer.h index 5fd3dcd994..e6b2dc2a53 100644 --- a/src/openrct2/title/TitleSequencePlayer.h +++ b/src/openrct2/title/TitleSequencePlayer.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/ui/DummyUiContext.cpp b/src/openrct2/ui/DummyUiContext.cpp index b94f84ace9..17323a7378 100644 --- a/src/openrct2/ui/DummyUiContext.cpp +++ b/src/openrct2/ui/DummyUiContext.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ namespace OpenRCT2::Ui void Tick() override { } - void Draw(rct_drawpixelinfo* /*dpi*/) override + void Draw(DrawPixelInfo* /*dpi*/) override { } @@ -173,7 +173,7 @@ namespace OpenRCT2::Ui { return std::make_shared(); } - void DrawWeatherAnimation(IWeatherDrawer* weatherDrawer, rct_drawpixelinfo* dpi, DrawWeatherFunc drawFunc) override + void DrawWeatherAnimation(IWeatherDrawer* weatherDrawer, DrawPixelInfo* dpi, DrawWeatherFunc drawFunc) override { } @@ -182,7 +182,7 @@ namespace OpenRCT2::Ui { return false; } - TextInputSession* StartTextInput([[maybe_unused]] utf8* buffer, [[maybe_unused]] size_t bufferSize) override + TextInputSession* StartTextInput([[maybe_unused]] u8string& buffer, [[maybe_unused]] size_t maxLength) override { return nullptr; } diff --git a/src/openrct2/ui/DummyWindowManager.cpp b/src/openrct2/ui/DummyWindowManager.cpp index c9b9699bc7..952b3f9b1f 100644 --- a/src/openrct2/ui/DummyWindowManager.cpp +++ b/src/openrct2/ui/DummyWindowManager.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,27 +15,27 @@ namespace OpenRCT2::Ui class DummyWindowManager final : public IWindowManager { void Init() override{}; - rct_window* OpenWindow(WindowClass /*wc*/) override + WindowBase* OpenWindow(WindowClass /*wc*/) override { return nullptr; } - rct_window* OpenView(uint8_t /*view*/) override + WindowBase* OpenView(uint8_t /*view*/) override { return nullptr; } - rct_window* OpenDetails(uint8_t /*type*/, int32_t /*id*/) override + WindowBase* OpenDetails(uint8_t /*type*/, int32_t /*id*/) override { return nullptr; } - rct_window* ShowError(StringId /*title*/, StringId /*message*/, const Formatter& /*formatter*/) override + WindowBase* ShowError(StringId /*title*/, StringId /*message*/, const Formatter& /*formatter*/) override { return nullptr; } - rct_window* ShowError(std::string_view /*title*/, std::string_view /*message*/) override + WindowBase* ShowError(std::string_view /*title*/, std::string_view /*message*/) override { return nullptr; } - rct_window* OpenIntent(Intent* /*intent*/) override + WindowBase* OpenIntent(Intent* /*intent*/) override { return nullptr; }; @@ -64,7 +64,7 @@ namespace OpenRCT2::Ui void UpdateMouseWheel() override { } - rct_window* GetOwner(const rct_viewport* viewport) override + WindowBase* GetOwner(const Viewport* viewport) override { return nullptr; } diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 01159c321a..52f4c13cde 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -19,7 +19,7 @@ #include struct ScreenCoordsXY; -struct rct_drawpixelinfo; +struct DrawPixelInfo; struct ITitleSequencePlayer; namespace OpenRCT2 @@ -29,7 +29,7 @@ namespace OpenRCT2 struct IDrawingEngineFactory; struct IWeatherDrawer; using DrawWeatherFunc = void (*)( - rct_drawpixelinfo* dpi, OpenRCT2::Drawing::IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, + DrawPixelInfo* dpi, OpenRCT2::Drawing::IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height); } // namespace Drawing @@ -101,7 +101,7 @@ namespace OpenRCT2 virtual void Initialise() abstract; virtual void Tick() abstract; - virtual void Draw(rct_drawpixelinfo* dpi) abstract; + virtual void Draw(DrawPixelInfo* dpi) abstract; // Window virtual void CreateWindow() abstract; @@ -149,12 +149,12 @@ namespace OpenRCT2 // Drawing [[nodiscard]] virtual std::shared_ptr GetDrawingEngineFactory() abstract; virtual void DrawWeatherAnimation( - OpenRCT2::Drawing::IWeatherDrawer* weatherDrawer, rct_drawpixelinfo* dpi, + OpenRCT2::Drawing::IWeatherDrawer* weatherDrawer, DrawPixelInfo* dpi, OpenRCT2::Drawing::DrawWeatherFunc drawFunc) abstract; // Text input virtual bool IsTextInputActive() abstract; - virtual TextInputSession* StartTextInput(utf8* buffer, size_t bufferSize) abstract; + virtual TextInputSession* StartTextInput(u8string& buffer, size_t maxLength) abstract; virtual void StopTextInput() abstract; // In-game UI diff --git a/src/openrct2/ui/WindowManager.h b/src/openrct2/ui/WindowManager.h index 4644dd88a0..1801a29454 100644 --- a/src/openrct2/ui/WindowManager.h +++ b/src/openrct2/ui/WindowManager.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -28,13 +28,13 @@ namespace OpenRCT2::Ui { virtual ~IWindowManager() = default; virtual void Init() abstract; - virtual rct_window* OpenWindow(WindowClass wc) abstract; - virtual rct_window* OpenView(uint8_t view) abstract; - virtual rct_window* OpenDetails(uint8_t type, int32_t id) abstract; - virtual rct_window* OpenIntent(Intent* intent) abstract; + virtual WindowBase* OpenWindow(WindowClass wc) abstract; + virtual WindowBase* OpenView(uint8_t view) abstract; + virtual WindowBase* OpenDetails(uint8_t type, int32_t id) abstract; + virtual WindowBase* OpenIntent(Intent* intent) abstract; virtual void BroadcastIntent(const Intent& intent) abstract; - virtual rct_window* ShowError(StringId title, StringId message, const Formatter& formatter) abstract; - virtual rct_window* ShowError(std::string_view title, std::string_view message) 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 void ForceClose(WindowClass windowClass) abstract; virtual void UpdateMapTooltip() abstract; virtual void HandleInput() abstract; @@ -42,7 +42,7 @@ namespace OpenRCT2::Ui virtual std::string GetKeyboardShortcutString(std::string_view shortcutId) abstract; virtual void SetMainView(const ScreenCoordsXY& viewPos, ZoomLevel zoom, int32_t rotation) abstract; virtual void UpdateMouseWheel() abstract; - virtual rct_window* GetOwner(const rct_viewport* viewport) abstract; + virtual WindowBase* GetOwner(const Viewport* viewport) abstract; }; std::unique_ptr CreateDummyWindowManager(); diff --git a/src/openrct2/util/Math.hpp b/src/openrct2/util/Math.hpp index d92c278908..c507ca2c40 100644 --- a/src/openrct2/util/Math.hpp +++ b/src/openrct2/util/Math.hpp @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,24 +14,24 @@ namespace { - [[maybe_unused]] constexpr bool is_power_of_2(int v) + [[maybe_unused]] constexpr bool IsPowerOf2(int v) { return v && ((v & (v - 1)) == 0); } // Rounds an integer down to the given power of 2. y must be a power of 2. - [[maybe_unused]] constexpr int floor2(const int x, const int y) + [[maybe_unused]] constexpr int Floor2(const int x, const int y) { - if (!is_power_of_2(y)) - throw std::logic_error("floor2 should only operate on power of 2"); + if (!IsPowerOf2(y)) + throw std::logic_error("Floor2 should only operate on power of 2"); return x & ~(y - 1); } // Rounds an integer up to the given power of 2. y must be a power of 2. - [[maybe_unused]] constexpr int ceil2(const int x, const int y) + [[maybe_unused]] constexpr int Ceil2(const int x, const int y) { - if (!is_power_of_2(y)) - throw std::logic_error("ceil2 should only operate on power of 2"); + if (!IsPowerOf2(y)) + throw std::logic_error("Ceil2 should only operate on power of 2"); return (x + y - 1) & ~(y - 1); } } // namespace diff --git a/src/openrct2/util/SawyerCoding.cpp b/src/openrct2/util/SawyerCoding.cpp index 14c197f204..409cf34e17 100644 --- a/src/openrct2/util/SawyerCoding.cpp +++ b/src/openrct2/util/SawyerCoding.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,14 +18,14 @@ #include #include -static size_t decode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); -static size_t decode_chunk_rle_with_size(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length, size_t dstSize); +static size_t DecodeChunkRLE(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); +static size_t DecodeChunkRLEWithSize(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length, size_t dstSize); -static size_t encode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); -static size_t encode_chunk_repeat(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); -static void encode_chunk_rotate(uint8_t* buffer, size_t length); +static size_t EncodeChunkRLE(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); +static size_t EncodeChunkRepeat(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length); +static void EncodeChunkRotate(uint8_t* buffer, size_t length); -uint32_t sawyercoding_calculate_checksum(const uint8_t* buffer, size_t length) +uint32_t SawyerCodingCalculateChecksum(const uint8_t* buffer, size_t length) { uint32_t checksum = 0; for (size_t i = 0; i < length; i++) @@ -39,24 +39,24 @@ uint32_t sawyercoding_calculate_checksum(const uint8_t* buffer, size_t length) * rct2: 0x006762E1 * */ -size_t sawyercoding_write_chunk_buffer(uint8_t* dst_file, const uint8_t* buffer, sawyercoding_chunk_header chunkHeader) +size_t SawyerCodingWriteChunkBuffer(uint8_t* dst_file, const uint8_t* buffer, SawyerCodingChunkHeader chunkHeader) { uint8_t *encode_buffer, *encode_buffer2; switch (chunkHeader.encoding) { case CHUNK_ENCODING_NONE: - std::memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); - dst_file += sizeof(sawyercoding_chunk_header); + std::memcpy(dst_file, &chunkHeader, sizeof(SawyerCodingChunkHeader)); + dst_file += sizeof(SawyerCodingChunkHeader); std::memcpy(dst_file, buffer, chunkHeader.length); - // fwrite(&chunkHeader, sizeof(sawyercoding_chunk_header), 1, file); + // fwrite(&chunkHeader, sizeof(SawyerCodingChunkHeader), 1, file); // fwrite(buffer, 1, chunkHeader.length, file); break; case CHUNK_ENCODING_RLE: encode_buffer = static_cast(malloc(0x600000)); - chunkHeader.length = static_cast(encode_chunk_rle(buffer, encode_buffer, chunkHeader.length)); - std::memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); - dst_file += sizeof(sawyercoding_chunk_header); + chunkHeader.length = static_cast(EncodeChunkRLE(buffer, encode_buffer, chunkHeader.length)); + std::memcpy(dst_file, &chunkHeader, sizeof(SawyerCodingChunkHeader)); + dst_file += sizeof(SawyerCodingChunkHeader); std::memcpy(dst_file, encode_buffer, chunkHeader.length); free(encode_buffer); @@ -64,10 +64,10 @@ size_t sawyercoding_write_chunk_buffer(uint8_t* dst_file, const uint8_t* buffer, case CHUNK_ENCODING_RLECOMPRESSED: encode_buffer = static_cast(malloc(chunkHeader.length * 2)); encode_buffer2 = static_cast(malloc(0x600000)); - chunkHeader.length = static_cast(encode_chunk_repeat(buffer, encode_buffer, chunkHeader.length)); - chunkHeader.length = static_cast(encode_chunk_rle(encode_buffer, encode_buffer2, chunkHeader.length)); - std::memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); - dst_file += sizeof(sawyercoding_chunk_header); + chunkHeader.length = static_cast(EncodeChunkRepeat(buffer, encode_buffer, chunkHeader.length)); + chunkHeader.length = static_cast(EncodeChunkRLE(encode_buffer, encode_buffer2, chunkHeader.length)); + std::memcpy(dst_file, &chunkHeader, sizeof(SawyerCodingChunkHeader)); + dst_file += sizeof(SawyerCodingChunkHeader); std::memcpy(dst_file, encode_buffer2, chunkHeader.length); free(encode_buffer2); @@ -76,29 +76,29 @@ size_t sawyercoding_write_chunk_buffer(uint8_t* dst_file, const uint8_t* buffer, case CHUNK_ENCODING_ROTATE: encode_buffer = static_cast(malloc(chunkHeader.length)); std::memcpy(encode_buffer, buffer, chunkHeader.length); - encode_chunk_rotate(encode_buffer, chunkHeader.length); - std::memcpy(dst_file, &chunkHeader, sizeof(sawyercoding_chunk_header)); - dst_file += sizeof(sawyercoding_chunk_header); + EncodeChunkRotate(encode_buffer, chunkHeader.length); + std::memcpy(dst_file, &chunkHeader, sizeof(SawyerCodingChunkHeader)); + dst_file += sizeof(SawyerCodingChunkHeader); std::memcpy(dst_file, encode_buffer, chunkHeader.length); free(encode_buffer); break; } - return chunkHeader.length + sizeof(sawyercoding_chunk_header); + return chunkHeader.length + sizeof(SawyerCodingChunkHeader); } -size_t sawyercoding_decode_sv4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength) +size_t SawyerCodingDecodeSV4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength) { // (0 to length - 4): RLE chunk // (length - 4 to length): checksum - return decode_chunk_rle_with_size(src, dst, length - 4, bufferLength); + return DecodeChunkRLEWithSize(src, dst, length - 4, bufferLength); } -size_t sawyercoding_decode_sc4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength) +size_t SawyerCodingDecodeSC4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength) { // Uncompress - size_t decodedLength = decode_chunk_rle_with_size(src, dst, length - 4, bufferLength); + size_t decodedLength = DecodeChunkRLEWithSize(src, dst, length - 4, bufferLength); // Decode for (size_t i = 0x60018; i <= std::min(decodedLength - 1, static_cast(0x1F8353)); i++) @@ -115,26 +115,26 @@ size_t sawyercoding_decode_sc4(const uint8_t* src, uint8_t* dst, size_t length, return decodedLength; } -size_t sawyercoding_encode_sv4(const uint8_t* src, uint8_t* dst, size_t length) +size_t SawyerCodingEencodeSV4(const uint8_t* src, uint8_t* dst, size_t length) { // Encode - size_t encodedLength = encode_chunk_rle(src, dst, length); + size_t encodedLength = EncodeChunkRLE(src, dst, length); // Append checksum - uint32_t checksum = sawyercoding_calculate_checksum(dst, encodedLength); + uint32_t checksum = SawyerCodingCalculateChecksum(dst, encodedLength); *(reinterpret_cast(&dst[encodedLength])) = checksum; return encodedLength + 4; } -size_t sawyercoding_decode_td6(const uint8_t* src, uint8_t* dst, size_t length) +size_t SawyerCodingDecodeTD6(const uint8_t* src, uint8_t* dst, size_t length) { - return decode_chunk_rle(src, dst, length - 4); + return DecodeChunkRLE(src, dst, length - 4); } -size_t sawyercoding_encode_td6(const uint8_t* src, uint8_t* dst, size_t length) +size_t SawyerCodingEncodeTD6(const uint8_t* src, uint8_t* dst, size_t length) { - size_t output_length = encode_chunk_rle(src, dst, length); + size_t output_length = EncodeChunkRLE(src, dst, length); uint32_t checksum = 0; for (size_t i = 0; i < output_length; i++) @@ -151,7 +151,7 @@ size_t sawyercoding_encode_td6(const uint8_t* src, uint8_t* dst, size_t length) } /* Based off of rct2: 0x006770C1 */ -int32_t sawyercoding_validate_track_checksum(const uint8_t* src, size_t length) +int32_t SawyerCodingValidateTrackChecksum(const uint8_t* src, size_t length) { if (length < 4) return 0; @@ -182,7 +182,7 @@ int32_t sawyercoding_validate_track_checksum(const uint8_t* src, size_t length) * * rct2: 0x0067693A */ -static size_t decode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) +static size_t DecodeChunkRLE(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) { size_t count; uint8_t *dst, rleCodeByte; @@ -215,7 +215,7 @@ static size_t decode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, s * * rct2: 0x0067693A */ -static size_t decode_chunk_rle_with_size(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length, size_t dstSize) +static size_t DecodeChunkRLEWithSize(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length, size_t dstSize) { size_t count; uint8_t *dst, rleCodeByte; @@ -258,7 +258,7 @@ static size_t decode_chunk_rle_with_size(const uint8_t* src_buffer, uint8_t* dst * Ensure dst_buffer is bigger than src_buffer then resize afterwards * returns length of dst_buffer */ -static size_t encode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) +static size_t EncodeChunkRLE(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) { const uint8_t* src = src_buffer; uint8_t* dst = dst_buffer; @@ -306,7 +306,7 @@ static size_t encode_chunk_rle(const uint8_t* src_buffer, uint8_t* dst_buffer, s return dst - dst_buffer; } -static size_t encode_chunk_repeat(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) +static size_t EncodeChunkRepeat(const uint8_t* src_buffer, uint8_t* dst_buffer, size_t length) { if (length == 0) return 0; @@ -373,7 +373,7 @@ static size_t encode_chunk_repeat(const uint8_t* src_buffer, uint8_t* dst_buffer return outLength; } -static void encode_chunk_rotate(uint8_t* buffer, size_t length) +static void EncodeChunkRotate(uint8_t* buffer, size_t length) { size_t i; uint8_t code = 1; @@ -386,7 +386,7 @@ static void encode_chunk_rotate(uint8_t* buffer, size_t length) #pragma endregion -int32_t sawyercoding_detect_file_type(const uint8_t* src, size_t length) +int32_t SawyerCodingDetectFileType(const uint8_t* src, size_t length) { if (length < 4) { @@ -405,10 +405,10 @@ int32_t sawyercoding_detect_file_type(const uint8_t* src, size_t length) actualChecksum = Numerics::rol32(actualChecksum, 3); } - return sawyercoding_detect_rct1_version(checksum - actualChecksum); + return SawyerCodingDetectRCT1Version(checksum - actualChecksum); } -int32_t sawyercoding_detect_rct1_version(int32_t gameVersion) +int32_t SawyerCodingDetectRCT1Version(int32_t gameVersion) { int32_t fileType = (gameVersion) > 0 ? FILE_TYPE_SV4 : FILE_TYPE_SC4; gameVersion = abs(gameVersion); diff --git a/src/openrct2/util/SawyerCoding.h b/src/openrct2/util/SawyerCoding.h index d266d26342..3723e39617 100644 --- a/src/openrct2/util/SawyerCoding.h +++ b/src/openrct2/util/SawyerCoding.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,12 +12,12 @@ #include "../common.h" #pragma pack(push, 1) -struct sawyercoding_chunk_header +struct SawyerCodingChunkHeader { uint8_t encoding; uint32_t length; }; -assert_struct_size(sawyercoding_chunk_header, 5); +assert_struct_size(SawyerCodingChunkHeader, 5); #pragma pack(pop) enum @@ -41,14 +41,14 @@ enum FILE_TYPE_SC4 = (2 << 2) }; -uint32_t sawyercoding_calculate_checksum(const uint8_t* buffer, size_t length); -size_t sawyercoding_write_chunk_buffer(uint8_t* dst_file, const uint8_t* src_buffer, sawyercoding_chunk_header chunkHeader); -size_t sawyercoding_decode_sv4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength); -size_t sawyercoding_decode_sc4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength); -size_t sawyercoding_encode_sv4(const uint8_t* src, uint8_t* dst, size_t length); -size_t sawyercoding_decode_td6(const uint8_t* src, uint8_t* dst, size_t length); -size_t sawyercoding_encode_td6(const uint8_t* src, uint8_t* dst, size_t length); -int32_t sawyercoding_validate_track_checksum(const uint8_t* src, size_t length); +uint32_t SawyerCodingCalculateChecksum(const uint8_t* buffer, size_t length); +size_t SawyerCodingWriteChunkBuffer(uint8_t* dst_file, const uint8_t* src_buffer, SawyerCodingChunkHeader chunkHeader); +size_t SawyerCodingDecodeSV4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength); +size_t SawyerCodingDecodeSC4(const uint8_t* src, uint8_t* dst, size_t length, size_t bufferLength); +size_t SawyerCodingEencodeSV4(const uint8_t* src, uint8_t* dst, size_t length); +size_t SawyerCodingDecodeTD6(const uint8_t* src, uint8_t* dst, size_t length); +size_t SawyerCodingEncodeTD6(const uint8_t* src, uint8_t* dst, size_t length); +int32_t SawyerCodingValidateTrackChecksum(const uint8_t* src, size_t length); -int32_t sawyercoding_detect_file_type(const uint8_t* src, size_t length); -int32_t sawyercoding_detect_rct1_version(int32_t gameVersion); +int32_t SawyerCodingDetectFileType(const uint8_t* src, size_t length); +int32_t SawyerCodingDetectRCT1Version(int32_t gameVersion); diff --git a/src/openrct2/util/Util.cpp b/src/openrct2/util/Util.cpp index 96746c14af..72828aa2e2 100644 --- a/src/openrct2/util/Util.cpp +++ b/src/openrct2/util/Util.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,34 +24,34 @@ #include #include -int32_t squaredmetres_to_squaredfeet(int32_t squaredMetres) +int32_t SquaredMetresToSquaredFeet(int32_t squaredMetres) { // 1 metre squared = 10.7639104 feet squared // RCT2 approximates as 11 return squaredMetres * 11; } -int32_t metres_to_feet(int32_t metres) +int32_t MetresToFeet(int32_t metres) { // 1 metre = 3.2808399 feet // RCT2 approximates as 3.28125 return (metres * 840) / 256; } -int32_t mph_to_kmph(int32_t mph) +int32_t MphToKmph(int32_t mph) { // 1 mph = 1.60934 kmph // RCT2 approximates as 1.609375 return (mph * 1648) >> 10; } -int32_t mph_to_dmps(int32_t mph) +int32_t MphToDmps(int32_t mph) { // 1 mph = 4.4704 decimeters/s return (mph * 73243) >> 14; } -int32_t bitscanforward(int32_t source) +int32_t UtilBitScanForward(int32_t source) { #if defined(_MSC_VER) && (_MSC_VER >= 1400) // Visual Studio 2005 DWORD i; @@ -73,7 +73,7 @@ int32_t bitscanforward(int32_t source) #endif } -int32_t bitscanforward(int64_t source) +int32_t UtilBitScanForward(int64_t source) { #if defined(_MSC_VER) && (_MSC_VER >= 1400) && defined(_M_X64) // Visual Studio 2005 DWORD i; @@ -105,7 +105,7 @@ int32_t bitscanforward(int64_t source) #endif #ifdef OPENRCT2_X86 -static bool cpuid_x86(uint32_t* cpuid_outdata, int32_t eax) +static bool CPUIDX86(uint32_t* cpuid_outdata, int32_t eax) { # if defined(OpenRCT2_CPUID_GNUC_X86) int ret = __get_cpuid(eax, &cpuid_outdata[0], &cpuid_outdata[1], &cpuid_outdata[2], &cpuid_outdata[3]); @@ -119,12 +119,12 @@ static bool cpuid_x86(uint32_t* cpuid_outdata, int32_t eax) } #endif // OPENRCT2_X86 -bool sse41_available() +bool SSE41Available() { #ifdef OPENRCT2_X86 // SSE4.1 support is declared as the 19th bit of ECX with CPUID(EAX = 1). uint32_t regs[4] = { 0 }; - if (cpuid_x86(regs, 1)) + if (CPUIDX86(regs, 1)) { return (regs[2] & (1 << 19)); } @@ -132,7 +132,7 @@ bool sse41_available() return false; } -bool avx2_available() +bool AVX2Available() { #ifdef OPENRCT2_X86 // For GCC and similar use the builtin function, as cpuid changed its semantics in @@ -144,7 +144,7 @@ bool avx2_available() # else // AVX2 support is declared as the 5th bit of EBX with CPUID(EAX = 7, ECX = 0). uint32_t regs[4] = { 0 }; - if (cpuid_x86(regs, 7)) + if (CPUIDX86(regs, 7)) { bool avxCPUSupport = (regs[1] & (1 << 5)) != 0; if (avxCPUSupport) @@ -161,12 +161,12 @@ bool avx2_available() return false; } -static bool bitcount_popcnt_available() +static bool BitCountPopcntAvailable() { #ifdef OPENRCT2_X86 // POPCNT support is declared as the 23rd bit of ECX with CPUID(EAX = 1). uint32_t regs[4] = { 0 }; - if (cpuid_x86(regs, 1)) + if (CPUIDX86(regs, 1)) { return (regs[2] & (1 << 23)); } @@ -174,7 +174,7 @@ static bool bitcount_popcnt_available() return false; } -static int32_t bitcount_popcnt(uint32_t source) +static int32_t BitCountPopcnt(uint32_t source) { // Use CPUID defines to figure out calling style #if defined(OpenRCT2_CPUID_GNUC_X86) @@ -191,7 +191,7 @@ static int32_t bitcount_popcnt(uint32_t source) #endif } -static int32_t bitcount_lut(uint32_t source) +static int32_t BitCountLut(uint32_t source) { // https://graphics.stanford.edu/~seander/bithacks.html static constexpr const uint8_t BitsSetTable256[256] = { @@ -204,27 +204,16 @@ static int32_t bitcount_lut(uint32_t source) + BitsSetTable256[source >> 24]; } -static int32_t (*bitcount_fn)(uint32_t); +static int32_t (*BitCountFn)(uint32_t); -void bitcount_init() +void BitCountInit() { - bitcount_fn = bitcount_popcnt_available() ? bitcount_popcnt : bitcount_lut; + BitCountFn = BitCountPopcntAvailable() ? BitCountPopcnt : BitCountLut; } -int32_t bitcount(uint32_t source) +int32_t BitCount(uint32_t source) { - return bitcount_fn(source); -} - -/* case insensitive compare */ -int32_t strcicmp(char const* a, char const* b) -{ - for (;; a++, b++) - { - int32_t d = tolower(static_cast(*a)) - tolower(static_cast(*b)); - if (d != 0 || !*a) - return d; - } + return BitCountFn(source); } /* Case insensitive logical compare */ @@ -234,7 +223,7 @@ int32_t strcicmp(char const* a, char const* b) // - Guest 100 // - John v2.0 // - John v2.1 -int32_t strlogicalcmp(const char* s1, const char* s2) +int32_t StrLogicalCmp(const char* s1, const char* s2) { for (;;) { @@ -266,33 +255,7 @@ int32_t strlogicalcmp(const char* s1, const char* s2) } } -utf8* safe_strtrunc(utf8* text, size_t size) -{ - assert(text != nullptr); - - if (size == 0) - return text; - - const char* sourceLimit = text + size - 1; - char* ch = text; - char* last = text; - while (utf8_get_next(ch, const_cast(&ch)) != 0) - { - if (ch <= sourceLimit) - { - last = ch; - } - else - { - break; - } - } - *last = 0; - - return text; -} - -char* safe_strcpy(char* destination, const char* source, size_t size) +char* SafeStrCpy(char* destination, const char* source, size_t size) { assert(destination != nullptr); assert(source != nullptr); @@ -306,11 +269,11 @@ char* safe_strcpy(char* destination, const char* source, size_t size) const char* sourceLimit = source + size - 1; const char* ch = source; uint32_t codepoint; - while ((codepoint = utf8_get_next(ch, &ch)) != 0) + while ((codepoint = UTF8GetNext(ch, &ch)) != 0) { if (ch <= sourceLimit) { - destination = utf8_write_codepoint(destination, codepoint); + destination = UTF8WriteCodepoint(destination, codepoint); } else { @@ -321,12 +284,12 @@ char* safe_strcpy(char* destination, const char* source, size_t size) if (truncated) { - log_warning("Truncating string \"%s\" to %d bytes.", result, size); + LOG_WARNING("Truncating string \"%s\" to %d bytes.", result, size); } return result; } -char* safe_strcat(char* destination, const char* source, size_t size) +char* SafeStrCat(char* destination, const char* source, size_t size) { assert(destination != nullptr); assert(source != nullptr); @@ -367,57 +330,13 @@ char* safe_strcat(char* destination, const char* source, size_t size) if (!terminated) { result[size - 1] = '\0'; - log_warning("Truncating string \"%s\" to %d bytes.", result, size); + LOG_WARNING("Truncating string \"%s\" to %d bytes.", result, size); } return result; } -#if defined(_WIN32) -char* strcasestr(const char* haystack, const char* needle) -{ - const char* p1 = haystack; - const char* p2 = needle; - const char* r = *p2 == 0 ? haystack : nullptr; - - while (*p1 != 0 && *p2 != 0) - { - if (tolower(static_cast(*p1)) == tolower(static_cast(*p2))) - { - if (r == nullptr) - r = p1; - p2++; - } - else - { - p2 = needle; - if (r != nullptr) - p1 = r + 1; - - if (tolower(static_cast(*p1)) == tolower(static_cast(*p2))) - { - r = p1; - p2++; - } - else - { - r = nullptr; - } - } - - p1++; - } - - return *p2 == 0 ? const_cast(r) : nullptr; -} -#endif - -bool str_is_null_or_empty(const char* str) -{ - return str == nullptr || str[0] == 0; -} - -uint32_t util_rand() +uint32_t UtilRand() { thread_local std::mt19937 _prng(std::random_device{}()); return _prng(); @@ -425,7 +344,7 @@ uint32_t util_rand() // Returns a random floating point number from the Standard Normal Distribution; mean of 0 and standard deviation of 1. // TODO: In C++20 this can be templated, where the standard deviation is passed as a value template argument. -float util_rand_normal_distributed() +float UtilRandNormalDistributed() { thread_local std::mt19937 _prng{ std::random_device{}() }; thread_local std::normal_distribution _distributor{ 0.0f, 1.0f }; @@ -436,7 +355,7 @@ constexpr size_t CHUNK = 128 * 1024; // Compress the source to gzip-compatible stream, write to dest. // Mainly used for compressing the crashdumps -bool util_gzip_compress(FILE* source, FILE* dest) +bool UtilGzipCompress(FILE* source, FILE* dest) { if (source == nullptr || dest == nullptr) { @@ -455,7 +374,7 @@ bool util_gzip_compress(FILE* source, FILE* dest) ret = deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, windowBits | GZIP_ENCODING, 8, Z_DEFAULT_STRATEGY); if (ret != Z_OK) { - log_error("Failed to initialise stream"); + LOG_ERROR("Failed to initialise stream"); return false; } do @@ -464,7 +383,7 @@ bool util_gzip_compress(FILE* source, FILE* dest) if (ferror(source)) { deflateEnd(&strm); - log_error("Failed to read data from source"); + LOG_ERROR("Failed to read data from source"); return false; } flush = feof(source) ? Z_FINISH : Z_NO_FLUSH; @@ -476,14 +395,14 @@ bool util_gzip_compress(FILE* source, FILE* dest) ret = deflate(&strm, flush); if (ret == Z_STREAM_ERROR) { - log_error("Failed to compress data"); + LOG_ERROR("Failed to compress data"); return false; } have = CHUNK - strm.avail_out; if (fwrite(out, 1, have, dest) != have || ferror(dest)) { deflateEnd(&strm); - log_error("Failed to write data to destination"); + LOG_ERROR("Failed to write data to destination"); return false; } } while (strm.avail_out == 0); @@ -589,7 +508,7 @@ std::vector Ungzip(const void* data, const size_t dataLen) } // Type-independent code left as macro to reduce duplicate code. -#define add_clamp_body(value, value_to_add, min_cap, max_cap) \ +#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; \ @@ -603,57 +522,41 @@ std::vector Ungzip(const void* data, const size_t dataLen) value += value_to_add; \ } -int8_t add_clamp_int8_t(int8_t value, int8_t 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); + ADD_CLAMP_BODY(value, value_to_add, INT8_MIN, INT8_MAX); return value; } -int16_t add_clamp_int16_t(int16_t value, int16_t value_to_add) +int16_t AddClamp_int16_t(int16_t value, int16_t value_to_add) { - add_clamp_body(value, value_to_add, INT16_MIN, INT16_MAX); + ADD_CLAMP_BODY(value, value_to_add, INT16_MIN, INT16_MAX); return value; } -int32_t add_clamp_int32_t(int32_t value, int32_t value_to_add) +int32_t AddClamp_int32_t(int32_t value, int32_t value_to_add) { - add_clamp_body(value, value_to_add, INT32_MIN, INT32_MAX); + ADD_CLAMP_BODY(value, value_to_add, INT32_MIN, INT32_MAX); return value; } -int64_t add_clamp_int64_t(int64_t value, int64_t value_to_add) +int64_t AddClamp_int64_t(int64_t value, int64_t value_to_add) { - add_clamp_body(value, value_to_add, INT64_MIN, INT64_MAX); + ADD_CLAMP_BODY(value, value_to_add, INT64_MIN, INT64_MAX); return value; } -money16 add_clamp_money16(money16 value, money16 value_to_add) -{ - // This function is intended only for clarity, as money16 - // is technically the same as int16_t - assert_struct_size(money16, sizeof(int16_t)); - return add_clamp_int16_t(value, value_to_add); -} - -money32 add_clamp_money32(money32 value, money32 value_to_add) -{ - // This function is intended only for clarity, as money32 - // is technically the same as int32_t - assert_struct_size(money32, sizeof(int32_t)); - return add_clamp_int32_t(value, value_to_add); -} - -money64 add_clamp_money64(money64 value, money64 value_to_add) +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 add_clamp_int64_t(value, value_to_add); + return AddClamp_int64_t(value, value_to_add); } #undef add_clamp_body -uint8_t lerp(uint8_t a, uint8_t b, float t) +uint8_t Lerp(uint8_t a, uint8_t b, float t) { if (t <= 0) return a; @@ -665,12 +568,12 @@ uint8_t lerp(uint8_t a, uint8_t b, float t) return static_cast(a + amount); } -float flerp(float a, float b, float f) +float FLerp(float a, float b, float f) { return (a * (1.0f - f)) + (b * f); } -uint8_t soft_light(uint8_t a, uint8_t b) +uint8_t SoftLight(uint8_t a, uint8_t b) { float fa = a / 255.0f; float fb = b / 255.0f; @@ -689,7 +592,7 @@ uint8_t soft_light(uint8_t a, uint8_t b) /** * strftime wrapper which appends to an existing string. */ -size_t strcatftime(char* buffer, size_t bufferSize, const char* format, const struct tm* tp) +size_t StrCatFTime(char* buffer, size_t bufferSize, const char* format, const struct tm* tp) { size_t stringLen = strnlen(buffer, bufferSize); if (stringLen < bufferSize) diff --git a/src/openrct2/util/Util.h b/src/openrct2/util/Util.h index b82b1a08d8..5ec8b7e6fb 100644 --- a/src/openrct2/util/Util.h +++ b/src/openrct2/util/Util.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,49 +18,41 @@ #include #include -int32_t squaredmetres_to_squaredfeet(int32_t squaredMetres); -int32_t metres_to_feet(int32_t metres); -int32_t mph_to_kmph(int32_t mph); -int32_t mph_to_dmps(int32_t mph); +int32_t SquaredMetresToSquaredFeet(int32_t squaredMetres); +int32_t MetresToFeet(int32_t metres); +int32_t MphToKmph(int32_t mph); +int32_t MphToDmps(int32_t mph); -bool sse41_available(); -bool avx2_available(); +bool SSE41Available(); +bool AVX2Available(); -int32_t bitscanforward(int32_t source); -int32_t bitscanforward(int64_t source); -void bitcount_init(); -int32_t bitcount(uint32_t source); -int32_t strcicmp(char const* a, char const* b); -int32_t strlogicalcmp(char const* a, char const* b); -utf8* safe_strtrunc(utf8* text, size_t size); -char* safe_strcpy(char* destination, const char* source, size_t num); -char* safe_strcat(char* destination, const char* source, size_t size); -#if defined(_WIN32) -char* strcasestr(const char* haystack, const char* needle); -#endif +int32_t UtilBitScanForward(int32_t source); +int32_t UtilBitScanForward(int64_t source); +void BitCountInit(); +int32_t BitCount(uint32_t source); +int32_t StrLogicalCmp(char const* a, char const* b); +char* SafeStrCpy(char* destination, const char* source, size_t num); +char* SafeStrCat(char* destination, const char* source, size_t size); -bool str_is_null_or_empty(const char* str); +uint32_t UtilRand(); +float UtilRandNormalDistributed(); -uint32_t util_rand(); -float util_rand_normal_distributed(); - -bool util_gzip_compress(FILE* source, FILE* dest); +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); -int8_t add_clamp_int8_t(int8_t value, int8_t value_to_add); -int16_t add_clamp_int16_t(int16_t value, int16_t value_to_add); -int32_t add_clamp_int32_t(int32_t value, int32_t value_to_add); -int64_t add_clamp_int64_t(int64_t value, int64_t value_to_add); -money16 add_clamp_money16(money16 value, money16 value_to_add); -money32 add_clamp_money32(money32 value, money32 value_to_add); -money64 add_clamp_money64(money64 value, money64 value_to_add); +// 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); -uint8_t lerp(uint8_t a, uint8_t b, float t); -float flerp(float a, float b, float t); -uint8_t soft_light(uint8_t a, uint8_t b); +uint8_t Lerp(uint8_t a, uint8_t b, float t); +float FLerp(float a, float b, float t); +uint8_t SoftLight(uint8_t a, uint8_t b); -size_t strcatftime(char* buffer, size_t bufferSize, const char* format, const struct tm* tp); +size_t StrCatFTime(char* buffer, size_t bufferSize, const char* format, const struct tm* tp); template [[nodiscard]] constexpr uint64_t EnumToFlag(T v) { diff --git a/src/openrct2/windows/Intent.cpp b/src/openrct2/windows/Intent.cpp index 8d6d515f77..614113ba6f 100644 --- a/src/openrct2/windows/Intent.cpp +++ b/src/openrct2/windows/Intent.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -28,7 +28,7 @@ Intent::Intent(IntentAction intentAction) { } -Intent* Intent::putExtra(uint32_t key, uint32_t value) +Intent* Intent::PutExtra(uint32_t key, uint32_t value) { IntentData data = {}; data.intVal.unsignedInt = value; @@ -39,7 +39,7 @@ Intent* Intent::putExtra(uint32_t key, uint32_t value) return this; } -Intent* Intent::putExtra(uint32_t key, void* value) +Intent* Intent::PutExtra(uint32_t key, void* value) { IntentData data = {}; data.pointerVal = value; @@ -50,7 +50,7 @@ Intent* Intent::putExtra(uint32_t key, void* value) return this; } -Intent* Intent::putExtra(uint32_t key, int32_t value) +Intent* Intent::PutExtra(uint32_t key, int32_t value) { IntentData data = {}; data.intVal.signedInt = value; @@ -61,7 +61,7 @@ Intent* Intent::putExtra(uint32_t key, int32_t value) return this; } -Intent* Intent::putExtra(uint32_t key, std::string value) +Intent* Intent::PutExtra(uint32_t key, std::string value) { IntentData data = {}; data.stringVal = std::move(value); @@ -72,7 +72,7 @@ Intent* Intent::putExtra(uint32_t key, std::string value) return this; } -Intent* Intent::putExtra(uint32_t key, close_callback value) +Intent* Intent::PutExtra(uint32_t key, close_callback value) { IntentData data = {}; data.closeCallbackVal = value; diff --git a/src/openrct2/windows/Intent.h b/src/openrct2/windows/Intent.h index 5d98bd2b89..9cf4326cff 100644 --- a/src/openrct2/windows/Intent.h +++ b/src/openrct2/windows/Intent.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -91,16 +91,16 @@ public: uint32_t GetUIntExtra(uint32_t key) const; int32_t GetSIntExtra(uint32_t key) const; close_callback GetCloseCallbackExtra(uint32_t key) const; - Intent* putExtra(uint32_t key, uint32_t value); - Intent* putExtra(uint32_t key, void* value); - Intent* putExtra(uint32_t key, int32_t value); - Intent* putExtra(uint32_t key, std::string value); - Intent* putExtra(uint32_t key, close_callback value); + Intent* PutExtra(uint32_t key, uint32_t value); + Intent* PutExtra(uint32_t key, void* value); + Intent* PutExtra(uint32_t key, int32_t value); + Intent* PutExtra(uint32_t key, std::string value); + Intent* PutExtra(uint32_t key, close_callback value); - template Intent* putExtra(uint32_t key, const TIdentifier& value) + template Intent* PutExtra(uint32_t key, const TIdentifier& value) { const auto val = value.ToUnderlying(); - return putExtra(key, static_cast(val)); + return PutExtra(key, static_cast(val)); } }; diff --git a/src/openrct2/windows/tile_inspector.h b/src/openrct2/windows/TileInspectorGlobals.h similarity index 94% rename from src/openrct2/windows/tile_inspector.h rename to src/openrct2/windows/TileInspectorGlobals.h index 59ef2373eb..bcf621d4e4 100644 --- a/src/openrct2/windows/tile_inspector.h +++ b/src/openrct2/windows/TileInspectorGlobals.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/windows/_legacy.cpp b/src/openrct2/windows/_legacy.cpp index e3d2bb5545..2b977c85b6 100644 --- a/src/openrct2/windows/_legacy.cpp +++ b/src/openrct2/windows/_legacy.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,15 +39,16 @@ RideConstructionState _rideConstructionState2; * * rct2: 0x006CA162 */ -money32 place_provisional_track_piece( +money64 PlaceProvisionalTrackPiece( RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndAlternativeState, const CoordsXYZ& trackPos) { - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; - ride_construction_remove_ghosts(); - if (ride->type == RIDE_TYPE_MAZE) + RideConstructionRemoveGhosts(); + const auto& rtd = ride->GetRideTypeDescriptor(); + if (rtd.HasFlag(RIDE_TYPE_FLAG_IS_MAZE)) { int32_t flags = GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; auto gameAction = MazeSetTrackAction(CoordsXYZD{ trackPos, 0 }, true, rideIndex, GC_SET_MAZE_TRACK_BUILD); @@ -55,18 +56,18 @@ money32 place_provisional_track_piece( auto result = GameActions::Execute(&gameAction); if (result.Error != GameActions::Status::Ok) - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; _unkF440C5 = { trackPos, static_cast(trackDirection) }; _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK; - viewport_set_visibility(3); + ViewportSetVisibility(3); if (_currentTrackSlopeEnd != 0) - viewport_set_visibility(2); + ViewportSetVisibility(2); // Invalidate previous track piece (we may not be changing height!) VirtualFloorInvalidate(); - if (!scenery_tool_is_active()) + if (!SceneryToolIsActive()) { // Set new virtual floor height. VirtualFloorSetHeight(trackPos.z); @@ -82,11 +83,11 @@ money32 place_provisional_track_piece( // This command must not be sent over the network auto res = GameActions::Execute(&trackPlaceAction); if (res.Error != GameActions::Status::Ok) - return MONEY32_UNDEFINED; + return MONEY64_UNDEFINED; int16_t z_begin, z_end; const auto& ted = GetTrackElementDescriptor(trackType); - const rct_track_coordinates& coords = ted.Coordinates; + const TrackCoordinates& coords = ted.Coordinates; if (!ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_NO_TRACK)) { z_begin = coords.z_begin; @@ -101,14 +102,14 @@ money32 place_provisional_track_piece( _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK; const auto resultData = res.GetData(); - viewport_set_visibility((resultData.GroundFlags & ELEMENT_IS_UNDERGROUND) ? 1 : 3); + ViewportSetVisibility((resultData.GroundFlags & ELEMENT_IS_UNDERGROUND) ? 1 : 3); if (_currentTrackSlopeEnd != 0) - viewport_set_visibility(2); + ViewportSetVisibility(2); // Invalidate previous track piece (we may not be changing height!) VirtualFloorInvalidate(); - if (!scenery_tool_is_active()) + if (!SceneryToolIsActive()) { // Set height to where the next track piece would begin VirtualFloorSetHeight(trackPos.z - z_begin + z_end); @@ -154,7 +155,7 @@ static std::tuple window_ride_construction_update_state_get_ { for (uint32_t i = 0; i < std::size(gTrackDescriptors); i++) { - const track_descriptor* trackDescriptor = &gTrackDescriptors[i]; + const TrackDescriptor* trackDescriptor = &gTrackDescriptors[i]; if (trackDescriptor->track_curve != curve) continue; @@ -234,7 +235,7 @@ static std::tuple window_ride_construction_update_state_get_ * @param[out] _properties (edirs16) * @return (CF) */ -bool window_ride_construction_update_state( +bool WindowRideConstructionUpdateState( int32_t* _trackType, int32_t* _trackDirection, RideId* _rideIndex, int32_t* _liftHillAndInvertedState, CoordsXYZ* _trackPos, int32_t* _properties) { @@ -261,7 +262,7 @@ bool window_ride_construction_update_state( liftHillAndInvertedState |= CONSTRUCTION_INVERTED_TRACK_SELECTED; } - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return true; @@ -310,7 +311,7 @@ bool window_ride_construction_update_state( } const auto& ted = GetTrackElementDescriptor(trackType); - const rct_track_coordinates& trackCoordinates = ted.Coordinates; + const TrackCoordinates& trackCoordinates = ted.Coordinates; x = _currentTrackBegin.x; y = _currentTrackBegin.y; @@ -394,7 +395,7 @@ bool window_ride_construction_update_state( * * rct2: 0x006C84CE */ -void window_ride_construction_update_active_elements() +void WindowRideConstructionUpdateActiveElements() { auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS); ContextBroadcastIntent(&intent); @@ -404,11 +405,11 @@ void window_ride_construction_update_active_elements() * * rct2: 0x0066DB3D */ -bool scenery_tool_is_active() +bool SceneryToolIsActive() { auto toolWindowClassification = gCurrentToolWidget.window_classification; WidgetIndex toolWidgetIndex = gCurrentToolWidget.widget_index; - if (input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) + if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) if (toolWindowClassification == WindowClass::TopToolbar && toolWidgetIndex == WC_TOP_TOOLBAR__WIDX_SCENERY) return true; diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index e4ed12b95f..1d0c053247 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,6 +18,9 @@ #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../network/network.h" +#include "../object/BannerSceneryEntry.h" +#include "../object/ObjectEntryManager.h" +#include "../object/WallSceneryEntry.h" #include "../ride/Ride.h" #include "../ride/RideData.h" #include "../ride/Track.h" @@ -39,7 +42,7 @@ std::string Banner::GetText() const { Formatter ft; FormatTextTo(ft); - return format_string(STR_STRINGID, ft.Data()); + return FormatStringID(STR_STRINGID, ft.Data()); } void Banner::FormatTextTo(Formatter& ft, bool addColour) const @@ -63,7 +66,7 @@ void Banner::FormatTextTo(Formatter& ft) const } else if (flags & BANNER_FLAG_LINKED_TO_RIDE) { - auto ride = get_ride(ride_index); + auto ride = GetRide(ride_index); if (ride != nullptr) { ride->FormatNameTo(ft); @@ -99,7 +102,7 @@ static RideId BannerGetRideIndexAt(const CoordsXYZ& bannerCoords) continue; RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr || ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_SHOP_OR_FACILITY)) continue; @@ -237,15 +240,45 @@ RideId BannerGetClosestRideIndex(const CoordsXYZ& mapPos) return rideIndex; } -void BannerResetBrokenIndex() +struct BannerElementWithPos +{ + BannerElement* Element; + TileCoordsXY Pos; +}; + +// Returns a list of BannerElement's with the tile position. +static std::vector GetAllBannerElementsOnMap() +{ + std::vector banners; + for (int y = 0; y < gMapSize.y; y++) + { + for (int x = 0; x < gMapSize.x; x++) + { + const auto tilePos = TileCoordsXY{ x, y }; + for (auto* bannerElement : OpenRCT2::TileElementsView(tilePos.ToCoordsXY())) + { + auto bannerIndex = bannerElement->GetIndex(); + if (bannerIndex == BannerIndex::GetNull()) + continue; + + banners.push_back({ bannerElement, tilePos }); + } + } + } + return banners; +} + +// Iterates all banners and checks if the tile specified by the position actually +// has a tile with the banner index, if no tile is found then the banner element will be released. +static void BannerDeallocateUnlinked() { for (BannerIndex::UnderlyingType index = 0; index < _banners.size(); index++) { const auto bannerId = BannerIndex::FromUnderlying(index); - auto tileElement = BannerGetTileElement(bannerId); + auto* tileElement = BannerGetTileElement(bannerId); if (tileElement == nullptr) { - auto banner = GetBanner(bannerId); + auto* banner = GetBanner(bannerId); if (banner != nullptr) { banner->type = BANNER_NULL; @@ -254,58 +287,81 @@ void BannerResetBrokenIndex() } } -void BannerFixDuplicates() +// BannerElement tiles should not share a banner entry, this iterates +// over all banner elements that shares the index and creates a new entry also +// copying the data from the current assigned banner entry. +static void BannerFixDuplicates(std::vector& bannerElements) { - // For each banner in the map, check if the banner index is in use already, and if so, create a new entry for it - std::vector activeBanners; - activeBanners.resize(MAX_BANNERS); + // Sort the banners by index + std::sort(bannerElements.begin(), bannerElements.end(), [](const BannerElementWithPos& a, const BannerElementWithPos& b) { + return a.Element->GetIndex() < b.Element->GetIndex(); + }); - for (int y = 0; y < gMapSize.y; y++) + // Create a list of all banners with duplicate indices. + std::vector duplicates; + for (size_t i = 1; i < bannerElements.size(); i++) { - for (int x = 0; x < gMapSize.x; x++) + if (bannerElements[i - 1].Element->GetIndex() == bannerElements[i].Element->GetIndex()) { - const auto bannerPos = TileCoordsXY{ x, y }.ToCoordsXY(); - for (auto* bannerElement : OpenRCT2::TileElementsView(bannerPos)) - { - auto bannerIndex = bannerElement->GetIndex(); - if (bannerIndex == BannerIndex::GetNull()) - continue; - - const auto index = bannerIndex.ToUnderlying(); - if (activeBanners[index]) - { - log_info( - "Duplicated banner with index %d found at x = %d, y = %d and z = %d.", index, x, y, - bannerElement->base_height); - - // Banner index is already in use by another banner, so duplicate it - auto newBanner = CreateBanner(); - if (newBanner == nullptr) - { - log_error("Failed to create new banner."); - continue; - } - Guard::Assert(!activeBanners[newBanner->id.ToUnderlying()]); - - // Copy over the original banner, but update the location - const auto* oldBanner = GetBanner(bannerIndex); - if (oldBanner != nullptr) - { - auto newBannerId = newBanner->id; - - *newBanner = *oldBanner; - newBanner->id = newBannerId; - newBanner->position = { x, y }; - } - - bannerElement->SetIndex(newBanner->id); - } - - // Mark banner index as in-use - activeBanners[index] = true; - } + duplicates.push_back(bannerElements[i]); } } + + // For each duplicate, create a new banner and copy the old data + for (const auto& duplicate : duplicates) + { + const auto oldIndex = duplicate.Element->GetIndex(); + const auto* oldBanner = GetBanner(oldIndex); + if (oldBanner == nullptr) + { + LOG_ERROR("Unable to get old banner for index %u.", oldIndex.ToUnderlying()); + continue; + } + + auto* newBanner = CreateBanner(); + if (newBanner == nullptr) + { + LOG_ERROR("Failed to create new banner."); + continue; + } + + const auto newBannerId = newBanner->id; + + // Copy the old data to the new banner. + *newBanner = *oldBanner; + newBanner->id = newBannerId; + + // Assign the new banner index to the tile element. + duplicate.Element->SetIndex(newBannerId); + } +} + +// Ensures that all banner entries have the correct position based on the element +// that references the banner entry. +static void BannerFixPositions(std::vector& bannerElements) +{ + for (const auto& entry : bannerElements) + { + const auto index = entry.Element->GetIndex(); + auto* banner = GetBanner(index); + if (banner == nullptr) + { + LOG_ERROR("Unable to get banner for index %u.", index.ToUnderlying()); + continue; + } + banner->position = entry.Pos; + } +} + +void BannerApplyFixes() +{ + auto bannerElements = GetAllBannerElementsOnMap(); + + BannerFixDuplicates(bannerElements); + + BannerFixPositions(bannerElements); + + BannerDeallocateUnlinked(); } Banner* BannerElement::GetBanner() const @@ -313,12 +369,12 @@ Banner* BannerElement::GetBanner() const return ::GetBanner(GetIndex()); } -BannerSceneryEntry* BannerElement::GetEntry() const +const BannerSceneryEntry* BannerElement::GetEntry() const { auto banner = GetBanner(); if (banner != nullptr) { - return GetBannerEntry(banner->type); + return OpenRCT2::ObjectManager::GetObjectEntry(banner->type); } return nullptr; } diff --git a/src/openrct2/world/Banner.h b/src/openrct2/world/Banner.h index 39650e2912..0c9eeed0fc 100644 --- a/src/openrct2/world/Banner.h +++ b/src/openrct2/world/Banner.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -58,8 +58,7 @@ void BannerInit(); TileElement* BannerGetTileElement(BannerIndex bannerIndex); WallElement* BannerGetScrollingWallTileElement(BannerIndex bannerIndex); RideId BannerGetClosestRideIndex(const CoordsXYZ& mapPos); -void BannerResetBrokenIndex(); -void BannerFixDuplicates(); +void BannerApplyFixes(); void UnlinkAllRideBanners(); void UnlinkAllBannersForRide(RideId rideId); Banner* GetBanner(BannerIndex id); diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index 0adbba936f..12f96a7ebb 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -91,7 +91,7 @@ int32_t ClimateCelsiusToFahrenheit(int32_t celsius) void ClimateReset(ClimateType climate) { auto weather = WeatherType::PartiallyCloudy; - int32_t month = date_get_month(gDateMonthsElapsed); + int32_t month = DateGetMonth(gDateMonthsElapsed); const WeatherTransition* transition = &ClimateTransitions[static_cast(climate)][month]; const WeatherState* weatherState = &ClimateWeatherData[EnumValue(weather)]; @@ -110,7 +110,7 @@ void ClimateReset(ClimateType climate) _weatherVolume = 1; } - ClimateDetermineFutureWeather(scenario_rand()); + ClimateDetermineFutureWeather(ScenarioRand()); } /** @@ -149,7 +149,7 @@ void ClimateUpdate() if (gClimateCurrent.Level == gClimateNext.Level) { gClimateCurrent.Weather = gClimateNext.Weather; - ClimateDetermineFutureWeather(scenario_rand()); + ClimateDetermineFutureWeather(ScenarioRand()); auto intent = Intent(INTENT_ACTION_UPDATE_CLIMATE); ContextBroadcastIntent(&intent); } @@ -163,7 +163,7 @@ void ClimateUpdate() { gClimateCurrent.WeatherGloom = ClimateStepWeatherLevel( gClimateCurrent.WeatherGloom, gClimateNext.WeatherGloom); - gfx_invalidate_screen(); + GfxInvalidateScreen(); } } else @@ -185,7 +185,7 @@ void ClimateUpdate() || gClimateCurrent.WeatherEffect == WeatherEffectType::Blizzard) { // Create new thunder and lightning - uint32_t randomNumber = util_rand(); + uint32_t randomNumber = UtilRand(); if ((randomNumber & 0xFFFF) <= 0x1B4) { randomNumber >>= 16; @@ -197,7 +197,7 @@ void ClimateUpdate() void ClimateForceWeather(WeatherType weather) { - int32_t month = date_get_month(gDateMonthsElapsed); + int32_t month = DateGetMonth(gDateMonthsElapsed); const WeatherTransition* transition = &ClimateTransitions[static_cast(gClimate)][month]; const auto weatherState = &ClimateWeatherData[EnumValue(weather)]; @@ -211,7 +211,7 @@ void ClimateForceWeather(WeatherType weather) ClimateUpdate(); // In case of change in gloom level force a complete redraw - gfx_invalidate_screen(); + GfxInvalidateScreen(); } void ClimateUpdateSound() @@ -295,7 +295,7 @@ static int8_t ClimateStepWeatherLevel(int8_t currentWeatherLevel, int8_t nextWea */ static void ClimateDetermineFutureWeather(int32_t randomDistribution) { - int32_t month = date_get_month(gDateMonthsElapsed); + int32_t month = DateGetMonth(gDateMonthsElapsed); // Generate a random variable with values 0 up to DistributionSize-1 and chose weather from the distribution table // accordingly @@ -399,7 +399,7 @@ static void ClimateUpdateLightning() _lightningTimer--; if (gClimateLightningFlash == 0) { - if ((util_rand() & 0xFFFF) <= 0x2000) + if ((UtilRand() & 0xFFFF) <= 0x2000) { gClimateLightningFlash = 1; } @@ -411,7 +411,7 @@ static void ClimateUpdateThunder() _thunderTimer--; if (_thunderTimer == 0) { - uint32_t randomNumber = util_rand(); + uint32_t randomNumber = UtilRand(); if (randomNumber & 0x10000) { if (_thunderStatus[0] == THUNDER_STATUS::NONE && _thunderStatus[1] == THUNDER_STATUS::NONE) diff --git a/src/openrct2/world/Climate.h b/src/openrct2/world/Climate.h index b3ef355cea..f28ed5675a 100644 --- a/src/openrct2/world/Climate.h +++ b/src/openrct2/world/Climate.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index 2d80b807a4..966477dbdd 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -11,16 +11,18 @@ #include "../Game.h" #include "../localisation/Formatter.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/SmallSceneryEntry.h" +#include "../object/WallSceneryEntry.h" #include "../openrct2/Cheats.h" #include "../ride/Ride.h" #include "../ride/RideData.h" #include "Park.h" #include "Scenery.h" -#include "SmallScenery.h" #include "Surface.h" static int32_t MapPlaceClearFunc( - TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price, bool is_scenery) + TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price, bool is_scenery) { if ((*tile_element)->GetType() != TileElementType::SmallScenery) return 1; @@ -57,7 +59,7 @@ static int32_t MapPlaceClearFunc( * * rct2: 0x006E0D6E, 0x006B8D88 */ -int32_t MapPlaceSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price) +int32_t MapPlaceSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price) { return MapPlaceClearFunc(tile_element, coords, flags, price, /*is_scenery=*/true); } @@ -66,13 +68,13 @@ int32_t MapPlaceSceneryClearFunc(TileElement** tile_element, const CoordsXY& coo * * rct2: 0x006C5A4F, 0x006CDE57, 0x006A6733, 0x0066637E */ -int32_t MapPlaceNonSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price) +int32_t MapPlaceNonSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price) { return MapPlaceClearFunc(tile_element, coords, flags, price, /*is_scenery=*/false); } static bool MapLoc68BABCShouldContinue( - TileElement** tileElementPtr, const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, uint8_t flags, money32& price, + TileElement** tileElementPtr, const CoordsXYRangedZ& pos, CLEAR_FUNC clearFunc, uint8_t flags, money64& price, uint8_t crossingMode, bool canBuildCrossing) { if (clearFunc != nullptr) @@ -95,7 +97,7 @@ static bool MapLoc68BABCShouldContinue( crossingMode == 2 && canBuildCrossing && tileElement->GetType() == TileElementType::Track && tileElement->GetBaseZ() == pos.baseZ && tileElement->AsTrack()->GetTrackType() == TrackElemType::Flat) { - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SUPPORTS_LEVEL_CROSSINGS)) { return true; @@ -206,7 +208,7 @@ GameActions::Result MapCanConstructWithClearAt( { if (tileElement->GetBaseZ() >= pos.clearanceZ) { - // loc_68BA81 + // Loc68BA81 groundFlags |= ELEMENT_IS_UNDERGROUND; groundFlags &= ~ELEMENT_IS_ABOVE_GROUND; } @@ -292,7 +294,7 @@ void MapGetObstructionErrorText(TileElement* tileElement, GameActions::Result& r res.ErrorMessage = STR_FOOTPATH_IN_THE_WAY; break; case TileElementType::Track: - ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride != nullptr) { res.ErrorMessage = STR_X_IN_THE_WAY; diff --git a/src/openrct2/world/ConstructionClearance.h b/src/openrct2/world/ConstructionClearance.h index b88f293a07..3c68a92f09 100644 --- a/src/openrct2/world/ConstructionClearance.h +++ b/src/openrct2/world/ConstructionClearance.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -20,10 +20,10 @@ struct CoordsXY; struct CoordsXYRangedZ; class QuarterTile; -using CLEAR_FUNC = int32_t (*)(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price); +using CLEAR_FUNC = int32_t (*)(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money64* price); -int32_t MapPlaceNonSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price); -int32_t MapPlaceSceneryClearFunc(TileElement** tile_element, const CoordsXY& coords, uint8_t flags, money32* price); +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); struct ConstructClearResult { diff --git a/src/openrct2/world/Entrance.cpp b/src/openrct2/world/Entrance.cpp index fa2b12412a..7d4a621ada 100644 --- a/src/openrct2/world/Entrance.cpp +++ b/src/openrct2/world/Entrance.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -39,7 +39,7 @@ std::vector gParkEntrances; CoordsXYZD gRideEntranceExitGhostPosition; StationIndex gRideEntranceExitGhostStationIndex; -static money32 RideEntranceExitPlaceGhost( +static money64 RideEntranceExitPlaceGhost( RideId rideIndex, const CoordsXY& entranceExitCoords, Direction direction, uint8_t placeType, StationIndex stationNum) { auto rideEntranceExitPlaceAction = RideEntranceExitPlaceAction( @@ -47,7 +47,7 @@ static money32 RideEntranceExitPlaceGhost( rideEntranceExitPlaceAction.SetFlags(GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_GHOST); auto res = GameActions::Execute(&rideEntranceExitPlaceAction); - return res.Error == GameActions::Status::Ok ? res.Cost : MONEY32_UNDEFINED; + return res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; } /** @@ -111,13 +111,13 @@ void RideEntranceExitRemoveGhost() * * rct2: 0x006CA28C */ -money32 RideEntranceExitPlaceGhost( - Ride* ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum) +money64 RideEntranceExitPlaceGhost( + const Ride& ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum) { - ride_construction_remove_ghosts(); - money32 result = RideEntranceExitPlaceGhost(ride->id, entranceExitCoords, direction, placeType, stationNum); + RideConstructionRemoveGhosts(); + money64 result = RideEntranceExitPlaceGhost(ride.id, entranceExitCoords, direction, placeType, stationNum); - if (result != MONEY32_UNDEFINED) + if (result != MONEY64_UNDEFINED) { _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT; gRideEntranceExitGhostPosition.x = entranceExitCoords.x; @@ -221,7 +221,7 @@ void ParkEntranceFixLocations(void) void ParkEntranceUpdateLocations() { gParkEntrances.clear(); - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it)) { @@ -229,7 +229,7 @@ void ParkEntranceUpdateLocations() if (entranceElement != nullptr && entranceElement->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE && entranceElement->GetSequenceIndex() == 0 && !entranceElement->IsGhost()) { - auto entrance = TileCoordsXYZD(it.x, it.y, it.element->base_height, it.element->GetDirection()).ToCoordsXYZD(); + auto entrance = TileCoordsXYZD(it.x, it.y, it.element->BaseHeight, it.element->GetDirection()).ToCoordsXYZD(); gParkEntrances.push_back(entrance); } } diff --git a/src/openrct2/world/Entrance.h b/src/openrct2/world/Entrance.h index 538b78cae3..1c09d4fde0 100644 --- a/src/openrct2/world/Entrance.h +++ b/src/openrct2/world/Entrance.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,17 +16,6 @@ #include -#pragma pack(push, 1) -struct rct_entrance_type -{ - StringId string_idx; // 0x00 - uint32_t image_id; // 0x02 - uint8_t scrolling_mode; // 0x06 - uint8_t text_height; // 0x07 -}; -assert_struct_size(rct_entrance_type, 8); -#pragma pack(pop) - struct TileElement; enum diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index cec3b68fc9..a38966c0d9 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -22,9 +22,11 @@ #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../network/network.h" +#include "../object/FootpathItemEntry.h" #include "../object/FootpathObject.h" #include "../object/FootpathRailingsObject.h" #include "../object/FootpathSurfaceObject.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" #include "../paint/VirtualFloor.h" @@ -59,8 +61,8 @@ static RideId _footpathQueueChain[64]; // This is the coordinates that a user of the bin should move to // rct2: 0x00992A4C -const CoordsXY BinUseOffsets[4] = { - { 11, 16 }, +const std::array BinUseOffsets = { + CoordsXY{ 11, 16 }, { 16, 21 }, { 21, 16 }, { 16, 11 }, @@ -68,13 +70,13 @@ const CoordsXY BinUseOffsets[4] = { // These are the offsets for bench positions on footpaths, 2 for each edge // rct2: 0x00981F2C, 0x00981F2E -const CoordsXY BenchUseOffsets[8] = { - { 7, 12 }, { 12, 25 }, { 25, 20 }, { 20, 7 }, { 7, 20 }, { 20, 25 }, { 25, 12 }, { 12, 7 }, +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 CoordsXY DirectionOffsets[4] = { - { -1, 0 }, +const std::array DirectionOffsets = { + CoordsXY{ -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 }, @@ -135,18 +137,18 @@ TileElement* MapGetFootpathElement(const CoordsXYZ& coords) * * rct2: 0x006A76FF */ -money32 FootpathProvisionalSet( +money64 FootpathProvisionalSet( ObjectEntryIndex type, ObjectEntryIndex railingsType, const CoordsXYZ& footpathLoc, int32_t slope, PathConstructFlags constructFlags) { - money32 cost; + money64 cost; FootpathProvisionalRemove(); auto footpathPlaceAction = FootpathPlaceAction(footpathLoc, slope, type, railingsType, INVALID_DIRECTION, constructFlags); footpathPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); auto res = GameActions::Execute(&footpathPlaceAction); - cost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY32_UNDEFINED; + cost = res.Error == GameActions::Status::Ok ? res.Cost : MONEY64_UNDEFINED; if (res.Error == GameActions::Status::Ok) { gProvisionalFootpath.SurfaceIndex = type; @@ -158,18 +160,18 @@ money32 FootpathProvisionalSet( if (gFootpathGroundFlags & ELEMENT_IS_UNDERGROUND) { - viewport_set_visibility(1); + ViewportSetVisibility(1); } else { - viewport_set_visibility(3); + ViewportSetVisibility(3); } } // Invalidate previous footpath piece. VirtualFloorInvalidate(); - if (!scenery_tool_is_active()) + if (!SceneryToolIsActive()) { if (res.Error != GameActions::Status::Ok) { @@ -241,7 +243,7 @@ void FootpathProvisionalUpdate() */ CoordsXY FootpathGetCoordinatesFromPos(const ScreenCoordsXY& screenCoords, int32_t* direction, TileElement** tileElement) { - rct_window* window = window_find_from_point(screenCoords); + WindowBase* window = WindowFindFromPoint(screenCoords); if (window == nullptr || window->viewport == nullptr) { CoordsXY position{}; @@ -249,11 +251,11 @@ CoordsXY FootpathGetCoordinatesFromPos(const ScreenCoordsXY& screenCoords, int32 return position; } auto viewport = window->viewport; - auto info = get_map_coordinates_from_pos_window(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Footpath)); + auto info = GetMapCoordinatesFromPosWindow(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Footpath)); if (info.SpriteType != ViewportInteractionItem::Footpath || !(viewport->flags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_VERTICAL))) { - info = get_map_coordinates_from_pos_window( + info = GetMapCoordinatesFromPosWindow( window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath)); if (info.SpriteType == ViewportInteractionItem::None) { @@ -285,7 +287,7 @@ CoordsXY FootpathGetCoordinatesFromPos(const ScreenCoordsXY& screenCoords, int32 { z = TileElementHeight(position); } - position = viewport_coord_to_map_coord(start_vp_pos, z); + position = ViewportPosToMapPos(start_vp_pos, z); position.x = std::clamp(position.x, minPosition.x, maxPosition.x); position.y = std::clamp(position.y, minPosition.y, maxPosition.y); } @@ -339,7 +341,7 @@ CoordsXY FootpathGetCoordinatesFromPos(const ScreenCoordsXY& screenCoords, int32 CoordsXY FootpathBridgeGetInfoFromPos(const ScreenCoordsXY& screenCoords, int32_t* direction, TileElement** tileElement) { // First check if we point at an entrance or exit. In that case, we would want the path coming from the entrance/exit. - rct_window* window = window_find_from_point(screenCoords); + WindowBase* window = WindowFindFromPoint(screenCoords); if (window == nullptr || window->viewport == nullptr) { CoordsXY ret{}; @@ -347,7 +349,7 @@ CoordsXY FootpathBridgeGetInfoFromPos(const ScreenCoordsXY& screenCoords, int32_ return ret; } auto viewport = window->viewport; - auto info = get_map_coordinates_from_pos_window(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); + auto info = GetMapCoordinatesFromPosWindow(window, screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); *tileElement = info.Element; if (info.SpriteType == ViewportInteractionItem::Ride && viewport->flags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_VERTICAL) @@ -356,7 +358,7 @@ CoordsXY FootpathBridgeGetInfoFromPos(const ScreenCoordsXY& screenCoords, int32_ int32_t directions = (*tileElement)->AsEntrance()->GetDirections(); if (directions & 0x0F) { - int32_t bx = bitscanforward(directions); + int32_t bx = UtilBitScanForward(directions); bx += (*tileElement)->AsEntrance()->GetDirection(); bx &= 3; if (direction != nullptr) @@ -365,7 +367,7 @@ CoordsXY FootpathBridgeGetInfoFromPos(const ScreenCoordsXY& screenCoords, int32_ } } - info = get_map_coordinates_from_pos_window( + info = GetMapCoordinatesFromPosWindow( window, screenCoords, EnumsToFlags(ViewportInteractionItem::Terrain, ViewportInteractionItem::Footpath, ViewportInteractionItem::Ride)); if (info.SpriteType == ViewportInteractionItem::Ride && (*tileElement)->GetType() == TileElementType::Entrance) @@ -373,7 +375,7 @@ CoordsXY FootpathBridgeGetInfoFromPos(const ScreenCoordsXY& screenCoords, int32_ int32_t directions = (*tileElement)->AsEntrance()->GetDirections(); if (directions & 0x0F) { - int32_t bx = (*tileElement)->GetDirectionWithOffset(bitscanforward(directions)); + int32_t bx = (*tileElement)->GetDirectionWithOffset(UtilBitScanForward(directions)); if (direction != nullptr) *direction = bx; return info.Loc; @@ -560,7 +562,7 @@ static void FootpathConnectCorners(const CoordsXY& footpathPos, PathElement* ini } } -struct rct_neighbour +struct FootpathNeighbour { uint8_t order; uint8_t direction; @@ -568,23 +570,23 @@ struct rct_neighbour StationIndex entrance_index; }; -struct rct_neighbour_list +struct FootpathNeighbourList { - rct_neighbour items[8]; + FootpathNeighbour items[8]; size_t count; }; static int32_t FootpathNeighbourCompare(const void* a, const void* b) { - uint8_t va = (static_cast(a))->order; - uint8_t vb = (static_cast(b))->order; + uint8_t va = (static_cast(a))->order; + uint8_t vb = (static_cast(b))->order; if (va < vb) return 1; if (va > vb) return -1; - uint8_t da = (static_cast(a))->direction; - uint8_t db = (static_cast(b))->direction; + uint8_t da = (static_cast(a))->direction; + uint8_t db = (static_cast(b))->direction; if (da < db) return -1; if (da > db) @@ -592,13 +594,13 @@ static int32_t FootpathNeighbourCompare(const void* a, const void* b) return 0; } -static void FootpathNeighbourListInit(rct_neighbour_list* neighbourList) +static void FootpathNeighbourListInit(FootpathNeighbourList* neighbourList) { neighbourList->count = 0; } static void FootpathNeighbourListPush( - rct_neighbour_list* neighbourList, int32_t order, int32_t direction, RideId rideIndex, ::StationIndex entrance_index) + FootpathNeighbourList* neighbourList, int32_t order, int32_t direction, RideId rideIndex, ::StationIndex entrance_index) { Guard::Assert(neighbourList->count < std::size(neighbourList->items)); neighbourList->items[neighbourList->count].order = order; @@ -608,7 +610,7 @@ static void FootpathNeighbourListPush( neighbourList->count++; } -static bool FootpathNeighbourListPop(rct_neighbour_list* neighbourList, rct_neighbour* outNeighbour) +static bool FootpathNeighbourListPop(FootpathNeighbourList* neighbourList, FootpathNeighbour* outNeighbour) { if (neighbourList->count == 0) return false; @@ -620,20 +622,20 @@ static bool FootpathNeighbourListPop(rct_neighbour_list* neighbourList, rct_neig return true; } -static void FootpathNeighbourListRemove(rct_neighbour_list* neighbourList, size_t index) +static void FootpathNeighbourListRemove(FootpathNeighbourList* neighbourList, size_t index) { Guard::ArgumentInRange(index, 0, neighbourList->count - 1); int32_t itemsRemaining = static_cast(neighbourList->count - index) - 1; if (itemsRemaining > 0) { - memmove(&neighbourList->items[index], &neighbourList->items[index + 1], sizeof(rct_neighbour) * itemsRemaining); + memmove(&neighbourList->items[index], &neighbourList->items[index + 1], sizeof(FootpathNeighbour) * itemsRemaining); } neighbourList->count--; } -static void FoopathNeighbourListSort(rct_neighbour_list* neighbourList) +static void FoopathNeighbourListSort(FootpathNeighbourList* neighbourList) { - qsort(neighbourList->items, neighbourList->count, sizeof(rct_neighbour), FootpathNeighbourCompare); + qsort(neighbourList->items, neighbourList->count, sizeof(FootpathNeighbour), FootpathNeighbourCompare); } static TileElement* FootpathGetElement(const CoordsXYRangedZ& footpathPos, int32_t direction) @@ -752,7 +754,7 @@ static bool FootpathDisconnectQueueFromPath(const CoordsXY& footpathPos, TileEle * rct2: 0x006A6D7E */ -static void loc_6A6FD2(const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* initialTileElement, bool query) +static void Loc6A6FD2(const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* initialTileElement, bool query) { if ((initialTileElement)->GetType() == TileElementType::Path) { @@ -764,9 +766,9 @@ static void loc_6A6FD2(const CoordsXYZ& initialTileElementPos, int32_t direction } } -static void loc_6A6F1F( +static void Loc6A6F1F( const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* tileElement, TileElement* initialTileElement, - const CoordsXY& targetPos, int32_t flags, bool query, rct_neighbour_list* neighbourList) + const CoordsXY& targetPos, int32_t flags, bool query, FootpathNeighbourList* neighbourList) { if (query) { @@ -814,12 +816,12 @@ static void loc_6A6F1F( FootpathInterruptPeeps({ targetPos, tileElement->GetBaseZ() }); } MapInvalidateElement(targetPos, tileElement); - loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query); + Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query); } -static void loc_6A6D7E( +static void Loc6A6D7E( const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* initialTileElement, int32_t flags, bool query, - rct_neighbour_list* neighbourList) + FootpathNeighbourList* neighbourList) { auto targetPos = CoordsXY{ initialTileElementPos } + CoordsDirectionDelta[direction]; if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gCheatsSandboxMode) && MapIsEdge(targetPos)) @@ -828,7 +830,7 @@ static void loc_6A6D7E( { FootpathNeighbourListPush(neighbourList, 7, direction, RideId::GetNull(), StationIndex::GetNull()); } - loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query); + Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query); } else { @@ -844,7 +846,7 @@ static void loc_6A6D7E( { if (!tileElement->AsPath()->IsSloped() || tileElement->AsPath()->GetSlopeDirection() == direction) { - loc_6A6F1F( + Loc6A6F1F( initialTileElementPos, direction, tileElement, initialTileElement, targetPos, flags, query, neighbourList); } @@ -855,7 +857,7 @@ static void loc_6A6D7E( if (tileElement->AsPath()->IsSloped() && tileElement->AsPath()->GetSlopeDirection() == DirectionReverse(direction)) { - loc_6A6F1F( + Loc6A6F1F( initialTileElementPos, direction, tileElement, initialTileElement, targetPos, flags, query, neighbourList); } @@ -865,7 +867,7 @@ static void loc_6A6D7E( case TileElementType::Track: if (initialTileElementPos.z == tileElement->GetBaseZ()) { - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr) { continue; @@ -894,7 +896,7 @@ static void loc_6A6D7E( FootpathNeighbourListPush( neighbourList, 1, direction, tileElement->AsTrack()->GetRideIndex(), StationIndex::GetNull()); } - loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query); + Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query); return; } break; @@ -917,7 +919,7 @@ static void loc_6A6D7E( FootpathQueueChainPush(tileElement->AsEntrance()->GetRideIndex()); } } - loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query); + Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query); return; } } @@ -930,10 +932,10 @@ static void loc_6A6D7E( } } -// TODO: Change this into a simple check that validates if the direction should be fully checked with loc_6A6D7E and move the -// calling of loc_6A6D7E into the parent function. -static void loc_6A6C85( - const CoordsXYE& tileElementPos, int32_t direction, int32_t flags, bool query, rct_neighbour_list* neighbourList) +// TODO: Change this into a simple check that validates if the direction should be fully checked with Loc6A6D7E and move the +// calling of Loc6A6D7E into the parent function. +static void Loc6A6C85( + const CoordsXYE& tileElementPos, int32_t direction, int32_t flags, bool query, FootpathNeighbourList* neighbourList) { if (query && WallInTheWay( @@ -951,7 +953,7 @@ static void loc_6A6C85( if (tileElementPos.element->GetType() == TileElementType::Track) { - auto ride = get_ride(tileElementPos.element->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElementPos.element->AsTrack()->GetRideIndex()); if (ride == nullptr) { return; @@ -992,7 +994,7 @@ static void loc_6A6C85( } } - loc_6A6D7E(pos, direction, tileElementPos.element, flags, query, neighbourList); + Loc6A6D7E(pos, direction, tileElementPos.element, flags, query, neighbourList); } /** @@ -1001,8 +1003,8 @@ static void loc_6A6C85( */ void FootpathConnectEdges(const CoordsXY& footpathPos, TileElement* tileElement, int32_t flags) { - rct_neighbour_list neighbourList; - rct_neighbour neighbour; + FootpathNeighbourList neighbourList; + FootpathNeighbour neighbour; FootpathUpdateQueueChains(); @@ -1011,7 +1013,7 @@ void FootpathConnectEdges(const CoordsXY& footpathPos, TileElement* tileElement, FootpathUpdateQueueEntranceBanner(footpathPos, tileElement); for (Direction direction : ALL_DIRECTIONS) { - loc_6A6C85({ footpathPos, tileElement }, direction, flags, true, &neighbourList); + Loc6A6C85({ footpathPos, tileElement }, direction, flags, true, &neighbourList); } FoopathNeighbourListSort(&neighbourList); @@ -1047,7 +1049,7 @@ void FootpathConnectEdges(const CoordsXY& footpathPos, TileElement* tileElement, while (FootpathNeighbourListPop(&neighbourList, &neighbour)) { - loc_6A6C85({ footpathPos, tileElement }, neighbour.direction, flags, false, nullptr); + Loc6A6C85({ footpathPos, tileElement }, neighbour.direction, flags, false, nullptr); } if (tileElement->GetType() == TileElementType::Path) @@ -1132,7 +1134,7 @@ void FootpathChainRideQueue( // Fix #2051: Stop queue paths that are already connected to two other tiles // from connecting to the tile we are coming from. int32_t edges = tileElement->AsPath()->GetEdges(); - int32_t numEdges = bitcount(edges); + int32_t numEdges = BitCount(edges); if (numEdges >= 2) { int32_t requiredEdgeMask = 1 << DirectionReverse(direction); @@ -1211,7 +1213,7 @@ void FootpathUpdateQueueChains() for (auto* queueChainPtr = _footpathQueueChain; queueChainPtr < _footpathQueueChainNext; queueChainPtr++) { RideId rideIndex = *queueChainPtr; - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) continue; @@ -1254,7 +1256,7 @@ static void FootpathFixOwnership(const CoordsXY& mapPos) if (surfaceElement != nullptr) { // If the tile is not safe to own construction rights of, erase them. - if (CheckMaxAllowableLandRightsForTile({ mapPos, surfaceElement->base_height << 3 }) == OWNERSHIP_UNOWNED) + if (CheckMaxAllowableLandRightsForTile({ mapPos, surfaceElement->BaseHeight << 3 }) == OWNERSHIP_UNOWNED) { ownership = OWNERSHIP_UNOWNED; } @@ -1281,7 +1283,7 @@ static void FootpathFixOwnership(const CoordsXY& mapPos) static bool GetNextDirection(int32_t edges, int32_t* direction) { - int32_t index = bitscanforward(edges); + int32_t index = UtilBitScanForward(edges); if (index == -1) return false; @@ -1512,6 +1514,18 @@ void PathElement::SetSloped(bool isSloped) Flags2 |= FOOTPATH_ELEMENT_FLAGS2_IS_SLOPED; } +bool PathElement::HasJunctionRailings() const +{ + return Flags2 & FOOTPATH_ELEMENT_FLAGS2_HAS_JUNCTION_RAILINGS; +} + +void PathElement::SetJunctionRailings(bool hasJunctionRailings) +{ + Flags2 &= ~FOOTPATH_ELEMENT_FLAGS2_HAS_JUNCTION_RAILINGS; + if (hasJunctionRailings) + Flags2 |= FOOTPATH_ELEMENT_FLAGS2_HAS_JUNCTION_RAILINGS; +} + Direction PathElement::GetSlopeDirection() const { return SlopeDirection; @@ -1524,14 +1538,14 @@ void PathElement::SetSlopeDirection(Direction newSlope) bool PathElement::IsQueue() const { - return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0; + return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0; } void PathElement::SetIsQueue(bool isQueue) { - type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE; + Type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE; if (isQueue) - type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE; + Type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE; } bool PathElement::HasQueueBanner() const @@ -1592,14 +1606,14 @@ void PathElement::SetStationIndex(::StationIndex newStationIndex) bool PathElement::IsWide() const { - return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0; + return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0; } void PathElement::SetWide(bool isWide) { - type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE; + Type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE; if (isWide) - type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE; + Type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE; } bool PathElement::HasAddition() const @@ -1617,11 +1631,11 @@ ObjectEntryIndex PathElement::GetAdditionEntryIndex() const return GetAddition() - 1; } -PathBitEntry* PathElement::GetAdditionEntry() const +const PathBitEntry* PathElement::GetAdditionEntry() const { if (!HasAddition()) return nullptr; - return GetFootpathItemEntry(GetAdditionEntryIndex()); + return OpenRCT2::ObjectManager::GetObjectEntry(GetAdditionEntryIndex()); } void PathElement::SetAddition(uint8_t newAddition) @@ -1747,13 +1761,13 @@ void PathElement::SetRailingsEntryIndex(ObjectEntryIndex newEntryIndex) uint8_t PathElement::GetQueueBannerDirection() const { - return ((type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6); + return ((Type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6); } void PathElement::SetQueueBannerDirection(uint8_t direction) { - type &= ~FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK; - type |= (direction << 6); + Type &= ~FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK; + Type |= (direction << 6); } bool PathElement::ShouldDrawPathOverSupports() const @@ -1764,7 +1778,7 @@ bool PathElement::ShouldDrawPathOverSupports() const void PathElement::SetShouldDrawPathOverSupports(bool on) { - log_verbose("Setting 'draw path over supports' to %d", static_cast(on)); + LOG_VERBOSE("Setting 'draw path over supports' to %d", static_cast(on)); } /** @@ -1860,7 +1874,7 @@ void FootpathUpdatePathWideFlags(const CoordsXY& footpathPos) auto height = tileElement->GetBaseZ(); - // pathList is a list of elements, set by sub_6A8ACF adjacent to x,y + // pathList is a list of elements, set by Sub6A8ACF adjacent to x,y // Spanned from 0x00F3EFA8 to 0x00F3EFC7 (8 elements) in the original std::array pathList; for (std::size_t direction = 0; direction < pathList.size(); ++direction) @@ -2161,7 +2175,7 @@ bool TileElementWantsPathConnectionTowards(const TileCoordsXYZD& coords, const T switch (tileElement->GetType()) { case TileElementType::Path: - if (tileElement->base_height == coords.z) + if (tileElement->BaseHeight == coords.z) { if (!tileElement->AsPath()->IsSloped()) // The footpath is flat, it can be connected to from any direction @@ -2170,7 +2184,7 @@ bool TileElementWantsPathConnectionTowards(const TileCoordsXYZD& coords, const T // The footpath is sloped and its lowest point matches the edge connection return true; } - else if (tileElement->base_height + 2 == coords.z) + else if (tileElement->BaseHeight + 2 == coords.z) { if (tileElement->AsPath()->IsSloped() && tileElement->AsPath()->GetSlopeDirection() == coords.direction) // The footpath is sloped and its higher point matches the edge connection @@ -2178,9 +2192,9 @@ bool TileElementWantsPathConnectionTowards(const TileCoordsXYZD& coords, const T } break; case TileElementType::Track: - if (tileElement->base_height == coords.z) + if (tileElement->BaseHeight == coords.z) { - auto ride = get_ride(tileElement->AsTrack()->GetRideIndex()); + auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); if (ride == nullptr) continue; @@ -2202,7 +2216,7 @@ bool TileElementWantsPathConnectionTowards(const TileCoordsXYZD& coords, const T } break; case TileElementType::Entrance: - if (tileElement->base_height == coords.z) + if (tileElement->BaseHeight == coords.z) { if (entrance_has_direction(*(tileElement->AsEntrance()), coords.direction - tileElement->GetDirection())) { @@ -2251,7 +2265,7 @@ static void FootpathFixCornersAround(const TileCoordsXY& footpathPos, TileElemen continue; if (tileElement->AsPath()->IsSloped()) continue; - if (tileElement->base_height != pathElement->base_height) + if (tileElement->BaseHeight != pathElement->BaseHeight) continue; const int32_t ix = xOffset + 1; @@ -2273,7 +2287,7 @@ void FootpathRemoveEdgesAt(const CoordsXY& footpathPos, TileElement* tileElement if (tileElement->GetType() == TileElementType::Track) { auto rideIndex = tileElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return; @@ -2286,7 +2300,7 @@ void FootpathRemoveEdgesAt(const CoordsXY& footpathPos, TileElement* tileElement bool fixCorners = false; for (uint8_t direction = 0; direction < NumOrthogonalDirections; direction++) { - int32_t z1 = tileElement->base_height; + int32_t z1 = tileElement->BaseHeight; if (tileElement->GetType() == TileElementType::Path) { if (tileElement->AsPath()->IsSloped()) @@ -2388,7 +2402,7 @@ static bool FootpathIsLegacyPathEntryOkay(ObjectEntryIndex index) auto footpathObj = static_cast(objManager.GetLoadedObject(ObjectType::Paths, index)); if (footpathObj != nullptr) { - auto pathEntry = reinterpret_cast(footpathObj->GetLegacyData()); + auto pathEntry = reinterpret_cast(footpathObj->GetLegacyData()); return showEditorPaths || !(pathEntry->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR); } return false; @@ -2560,7 +2574,7 @@ bool PathElement::IsLevelCrossing(const CoordsXY& coords) const return false; } - auto ride = get_ride(trackElement->GetRideIndex()); + auto ride = GetRide(trackElement->GetRideIndex()); if (ride == nullptr) { return false; diff --git a/src/openrct2/world/Footpath.h b/src/openrct2/world/Footpath.h index 5c6cc1a083..03d935d364 100644 --- a/src/openrct2/world/Footpath.h +++ b/src/openrct2/world/Footpath.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -37,60 +37,12 @@ enum class RailingEntrySupportType : uint8_t Count }; -enum -{ - FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2), - FOOTPATH_ENTRY_FLAG_IS_QUEUE = (1 << 3), - FOOTPATH_ENTRY_FLAG_NO_SLOPE_RAILINGS = (1 << 4), -}; - -#pragma pack(push, 1) -struct rct_footpath_entry -{ - StringId string_idx; // 0x00 - uint32_t image; // 0x02 - uint32_t bridge_image; // 0x06 - RailingEntrySupportType support_type; // 0x0A - uint8_t flags; // 0x0B - uint8_t scrolling_mode; // 0x0C - - constexpr uint32_t GetQueueImage() const - { - return image + 51; - } - constexpr uint32_t GetPreviewImage() const - { - return image + 71; - } - constexpr uint32_t GetQueuePreviewImage() const - { - // Editor-only paths usually lack queue images. In this case, use the main path image. - if (flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) - { - return GetPreviewImage(); - } - - return image + 72; - } - constexpr uint32_t GetRailingsImage() const - { - return image + 73; - } -}; -assert_struct_size(rct_footpath_entry, 13); -#pragma pack(pop) - struct PathSurfaceDescriptor { StringId Name; uint32_t Image; uint32_t PreviewImage; uint8_t Flags; - - inline constexpr bool IsEditorOnly() const - { - return Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR; - } }; struct PathRailingsDescriptor @@ -169,6 +121,7 @@ enum FOOTPATH_ELEMENT_FLAGS2_BLOCKED_BY_VEHICLE = (1 << 3), FOOTPATH_ELEMENT_FLAGS2_ADDITION_IS_BROKEN = (1 << 4), FOOTPATH_ELEMENT_FLAGS2_LEGACY_PATH_ENTRY = (1 << 5), + FOOTPATH_ELEMENT_FLAGS2_HAS_JUNCTION_RAILINGS = (1 << 6), }; enum @@ -227,13 +180,13 @@ 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 CoordsXY DirectionOffsets[NumOrthogonalDirections]; -extern const CoordsXY BinUseOffsets[NumOrthogonalDirections]; -extern const CoordsXY BenchUseOffsets[NumOrthogonalDirections * 2]; +extern const std::array DirectionOffsets; +extern const std::array BinUseOffsets; +extern const std::array BenchUseOffsets; TileElement* MapGetFootpathElement(const CoordsXYZ& coords); void FootpathInterruptPeeps(const CoordsXYZ& footpathPos); -money32 FootpathProvisionalSet( +money64 FootpathProvisionalSet( ObjectEntryIndex type, ObjectEntryIndex railingsType, const CoordsXYZ& footpathLoc, int32_t slope, PathConstructFlags constructFlags); void FootpathProvisionalRemove(); diff --git a/src/openrct2/world/LargeScenery.cpp b/src/openrct2/world/LargeScenery.cpp index 559172ed47..63634ae76f 100644 --- a/src/openrct2/world/LargeScenery.cpp +++ b/src/openrct2/world/LargeScenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,6 +12,7 @@ #include "../Context.h" #include "../common.h" #include "../object/LargeSceneryObject.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectManager.h" #include "../world/Banner.h" #include "TileElement.h" @@ -86,14 +87,14 @@ ObjectEntryIndex LargeSceneryElement::GetEntryIndex() const return EntryIndex; } -LargeSceneryEntry* LargeSceneryElement::GetEntry() const +const LargeSceneryEntry* LargeSceneryElement::GetEntry() const { - return GetLargeSceneryEntry(GetEntryIndex()); + return OpenRCT2::ObjectManager::GetObjectEntry(GetEntryIndex()); } const LargeSceneryObject* LargeSceneryElement::GetObject() const { - return static_cast(object_entry_get_object(ObjectType::LargeScenery, GetEntryIndex())); + return static_cast(ObjectEntryGetObject(ObjectType::LargeScenery, GetEntryIndex())); } uint8_t LargeSceneryElement::GetSequenceIndex() const @@ -110,15 +111,3 @@ void LargeSceneryElement::SetSequenceIndex(uint8_t sequence) { SequenceIndex = sequence; } - -LargeSceneryEntry* GetLargeSceneryEntry(ObjectEntryIndex entryIndex) -{ - LargeSceneryEntry* result = nullptr; - auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::LargeScenery, entryIndex); - if (obj != nullptr) - { - result = static_cast(obj->GetLegacyData()); - } - return result; -} diff --git a/src/openrct2/world/LargeScenery.h b/src/openrct2/world/LargeScenery.h index a46449b039..de20838615 100644 --- a/src/openrct2/world/LargeScenery.h +++ b/src/openrct2/world/LargeScenery.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,12 +9,6 @@ #pragma once -#include "../common.h" -#include "Map.h" -#include "TileElement.h" - -LargeSceneryEntry* GetLargeSceneryEntry(ObjectEntryIndex entryIndex); - enum { LARGE_SCENERY_ELEMENT_FLAGS2_ACCOUNTED = 1 << 0, diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 7a7ec141e2..2ec90a7311 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -228,7 +228,7 @@ struct CoordsXY constexpr CoordsXY ToTileStart() const { - return { floor2(x, COORDS_XY_STEP), floor2(y, COORDS_XY_STEP) }; + return { Floor2(x, COORDS_XY_STEP), Floor2(y, COORDS_XY_STEP) }; } constexpr bool IsNull() const @@ -277,7 +277,7 @@ struct CoordsXYZ : public CoordsXY constexpr CoordsXYZ ToTileStart() const { - return { floor2(x, COORDS_XY_STEP), floor2(y, COORDS_XY_STEP), z }; + return { Floor2(x, COORDS_XY_STEP), Floor2(y, COORDS_XY_STEP), z }; } constexpr CoordsXYZ ToTileCentre() const @@ -662,7 +662,7 @@ struct CoordsXYZD : public CoordsXYZ constexpr CoordsXYZD ToTileStart() const { - return { floor2(x, COORDS_XY_STEP), floor2(y, COORDS_XY_STEP), z, direction }; + return { Floor2(x, COORDS_XY_STEP), Floor2(y, COORDS_XY_STEP), z, direction }; } constexpr CoordsXYZD ToTileCentre() const diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index f84f7beadb..1aef290df1 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -27,7 +27,9 @@ #include "../localisation/Localisation.h" #include "../management/Finance.h" #include "../network/network.h" +#include "../object/LargeSceneryEntry.h" #include "../object/ObjectManager.h" +#include "../object/SmallSceneryEntry.h" #include "../object/TerrainSurfaceObject.h" #include "../profiling/Profiling.h" #include "../ride/RideConstruction.h" @@ -42,11 +44,9 @@ #include "Banner.h" #include "Climate.h" #include "Footpath.h" -#include "LargeScenery.h" #include "MapAnimation.h" #include "Park.h" #include "Scenery.h" -#include "SmallScenery.h" #include "Surface.h" #include "TileElementsView.h" #include "TileInspector.h" @@ -151,8 +151,8 @@ static TileElement GetDefaultSurfaceElement() TileElement el; el.ClearAs(TileElementType::Surface); el.SetLastForTile(true); - el.base_height = 14; - el.clearance_height = 14; + el.BaseHeight = 14; + el.ClearanceHeight = 14; el.AsSurface()->SetWaterHeight(0); el.AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); el.AsSurface()->SetGrassLength(GRASS_LENGTH_CLEAR_0); @@ -278,14 +278,14 @@ bool MapCheckCapacityAndReorganise(const CoordsXY& loc, size_t numElements) static void ClearElementsAt(const CoordsXY& loc); static ScreenCoordsXY Translate3DTo2D(int32_t rotation, const CoordsXY& pos); -void TileElementIteratorBegin(tile_element_iterator* it) +void TileElementIteratorBegin(TileElementIterator* it) { it->x = 0; it->y = 0; it->element = MapGetFirstElementAt(TileCoordsXY{ 0, 0 }); } -int32_t TileElementIteratorNext(tile_element_iterator* it) +int32_t TileElementIteratorNext(TileElementIterator* it) { if (it->element == nullptr) { @@ -317,7 +317,7 @@ int32_t TileElementIteratorNext(tile_element_iterator* it) return 0; } -void TileElementIteratorRestartForTile(tile_element_iterator* it) +void TileElementIteratorRestartForTile(TileElementIterator* it) { it->element = nullptr; } @@ -333,7 +333,7 @@ TileElement* MapGetFirstElementAt(const TileCoordsXY& tilePos) { if (!IsTileLocationValid(tilePos)) { - log_verbose("Trying to access element outside of range"); + LOG_VERBOSE("Trying to access element outside of range"); return nullptr; } return _tileIndex.GetFirstElementAt(tilePos); @@ -380,7 +380,7 @@ TileElement* MapGetFirstTileElementWithBaseHeightBetween(const TileCoordsXYRange { if (tileElement->GetType() != type) continue; - if (tileElement->base_height >= loc.baseZ && tileElement->base_height <= loc.clearanceZ) + if (tileElement->BaseHeight >= loc.baseZ && tileElement->BaseHeight <= loc.clearanceZ) return tileElement; } while (!(tileElement++)->IsLastForTile()); @@ -391,7 +391,7 @@ void MapSetTileElement(const TileCoordsXY& tilePos, TileElement* elements) { if (!MapIsLocationValid(tilePos.ToCoordsXY())) { - log_error("Trying to access element outside of range"); + LOG_ERROR("Trying to access element outside of range"); return; } _tileIndex.SetTile(tilePos, elements); @@ -410,7 +410,7 @@ PathElement* MapGetPathElementAt(const TileCoordsXYZ& loc) { if (element->IsGhost()) continue; - if (element->base_height != loc.z) + if (element->BaseHeight != loc.z) continue; return element; } @@ -422,7 +422,7 @@ BannerElement* MapGetBannerElementAt(const CoordsXYZ& bannerPos, uint8_t positio const auto bannerTilePos = TileCoordsXYZ{ bannerPos }; for (auto* element : TileElementsView(bannerPos)) { - if (element->base_height != bannerTilePos.z) + if (element->BaseHeight != bannerTilePos.z) continue; if (element->GetPosition() != position) continue; @@ -693,17 +693,17 @@ bool MapCoordIsConnected(const TileCoordsXYZ& loc, uint8_t faceDirection) { if (slopeDirection == faceDirection) { - if (loc.z == tileElement->base_height + 2) + if (loc.z == tileElement->BaseHeight + 2) return true; } - else if (DirectionReverse(slopeDirection) == faceDirection && loc.z == tileElement->base_height) + else if (DirectionReverse(slopeDirection) == faceDirection && loc.z == tileElement->BaseHeight) { return true; } } else { - if (loc.z == tileElement->base_height) + if (loc.z == tileElement->BaseHeight) return true; } } while (!(tileElement++)->IsLastForTile()); @@ -992,7 +992,7 @@ int32_t MapGetCornerHeight(int32_t z, int32_t slope, int32_t direction) int32_t TileElementGetCornerHeight(const SurfaceElement* surfaceElement, int32_t direction) { - int32_t z = surfaceElement->base_height; + int32_t z = surfaceElement->BaseHeight; int32_t slope = surfaceElement->GetSlope(); return MapGetCornerHeight(z, slope, direction); } @@ -1010,7 +1010,7 @@ uint8_t MapGetLowestLandHeight(const MapRange& range) { auto* surfaceElement = MapGetSurfaceElementAt(CoordsXY{ xi, yi }); - if (surfaceElement != nullptr && min_height > surfaceElement->base_height) + if (surfaceElement != nullptr && min_height > surfaceElement->BaseHeight) { if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) { @@ -1020,7 +1020,7 @@ uint8_t MapGetLowestLandHeight(const MapRange& range) } } - min_height = surfaceElement->base_height; + min_height = surfaceElement->BaseHeight; } } } @@ -1049,13 +1049,13 @@ uint8_t MapGetHighestLandHeight(const MapRange& range) } } - uint8_t base_height = surfaceElement->base_height; + uint8_t BaseHeight = surfaceElement->BaseHeight; if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) - base_height += 2; + BaseHeight += 2; if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) - base_height += 2; - if (max_height < base_height) - max_height = base_height; + BaseHeight += 2; + if (max_height < BaseHeight) + max_height = BaseHeight; } } } @@ -1086,7 +1086,7 @@ void TileElementRemove(TileElement* tileElement) // Mark the latest element with the last element flag. (tileElement - 1)->SetLastForTile(true); - tileElement->base_height = MAX_ELEMENT_HEIGHT; + tileElement->BaseHeight = MAX_ELEMENT_HEIGHT; _tileElementsInUse--; if (tileElement == &_tileElements.back()) { @@ -1100,7 +1100,7 @@ void TileElementRemove(TileElement* tileElement) */ void MapRemoveAllRides() { - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do @@ -1145,7 +1145,7 @@ void MapInvalidateMapSelectionTiles() static void MapGetBoundingBox(const MapRange& _range, int32_t* left, int32_t* top, int32_t* right, int32_t* bottom) { - uint32_t rotation = get_current_rotation(); + uint32_t rotation = GetCurrentRotation(); const std::array corners{ CoordsXY{ _range.GetLeft(), _range.GetTop() }, CoordsXY{ _range.GetRight(), _range.GetTop() }, @@ -1193,7 +1193,7 @@ void MapInvalidateSelectionRect() bottom += 32; top -= 32 + 2080; - viewports_invalidate({ { left, top }, { right, bottom } }); + ViewportsInvalidate({ { left, top }, { right, bottom } }); } static size_t CountElementsOnTile(const CoordsXY& loc) @@ -1211,7 +1211,7 @@ static TileElement* AllocateTileElements(size_t numElementsOnTile, size_t numNew { if (!MapCheckFreeElementsAndReorganise(numElementsOnTile, numNewElements)) { - log_error("Cannot insert new element"); + LOG_ERROR("Cannot insert new element"); return nullptr; } @@ -1252,7 +1252,7 @@ TileElement* TileElementInsert(const CoordsXYZ& loc, int32_t occupiedQuadrants, { // Copy over map element *newTileElement = *originalTileElement; - originalTileElement->base_height = MAX_ELEMENT_HEIGHT; + originalTileElement->BaseHeight = MAX_ELEMENT_HEIGHT; originalTileElement++; newTileElement++; @@ -1268,16 +1268,16 @@ TileElement* TileElementInsert(const CoordsXYZ& loc, int32_t occupiedQuadrants, // Insert new map element auto* insertedElement = newTileElement; - newTileElement->type = 0; + newTileElement->Type = 0; newTileElement->SetType(type); newTileElement->SetBaseZ(loc.z); newTileElement->Flags = 0; newTileElement->SetLastForTile(isLastForTile); newTileElement->SetOccupiedQuadrants(occupiedQuadrants); newTileElement->SetClearanceZ(loc.z); - newTileElement->owner = 0; - std::memset(&newTileElement->pad_05, 0, sizeof(newTileElement->pad_05)); - std::memset(&newTileElement->pad_08, 0, sizeof(newTileElement->pad_08)); + newTileElement->Owner = 0; + std::memset(&newTileElement->Pad05, 0, sizeof(newTileElement->Pad05)); + std::memset(&newTileElement->Pad08, 0, sizeof(newTileElement->Pad08)); newTileElement++; // Insert rest of map elements above insert height @@ -1287,7 +1287,7 @@ TileElement* TileElementInsert(const CoordsXYZ& loc, int32_t occupiedQuadrants, { // Copy over map element *newTileElement = *originalTileElement; - originalTileElement->base_height = MAX_ELEMENT_HEIGHT; + originalTileElement->BaseHeight = MAX_ELEMENT_HEIGHT; originalTileElement++; newTileElement++; } while (!((newTileElement - 1)->IsLastForTile())); @@ -1353,14 +1353,14 @@ void MapRemoveProvisionalElements() FootpathProvisionalRemove(); gProvisionalFootpath.Flags |= PROVISIONAL_PATH_FLAG_1; } - if (window_find_by_class(WindowClass::RideConstruction) != nullptr) + if (WindowFindByClass(WindowClass::RideConstruction) != nullptr) { - ride_remove_provisional_track_piece(); + RideRemoveProvisionalTrackPiece(); RideEntranceExitRemoveGhost(); } // This is in non performant so only make network games suffer for it // non networked games do not need this as its to prevent desyncs. - if ((network_get_mode() != NETWORK_MODE_NONE) && window_find_by_class(WindowClass::TrackDesignPlace) != nullptr) + if ((NetworkGetMode() != NETWORK_MODE_NONE) && WindowFindByClass(WindowClass::TrackDesignPlace) != nullptr) { auto intent = Intent(INTENT_ACTION_TRACK_DESIGN_REMOVE_PROVISIONAL); ContextBroadcastIntent(&intent); @@ -1378,14 +1378,14 @@ void MapRestoreProvisionalElements() gProvisionalFootpath.SurfaceIndex, gProvisionalFootpath.RailingsIndex, gProvisionalFootpath.Position, gProvisionalFootpath.Slope, gProvisionalFootpath.ConstructFlags); } - if (window_find_by_class(WindowClass::RideConstruction) != nullptr) + if (WindowFindByClass(WindowClass::RideConstruction) != nullptr) { - ride_restore_provisional_track_piece(); + RideRestoreProvisionalTrackPiece(); RideEntranceExitPlaceProvisionalGhost(); } // This is in non performant so only make network games suffer for it // non networked games do not need this as its to prevent desyncs. - if ((network_get_mode() != NETWORK_MODE_NONE) && window_find_by_class(WindowClass::TrackDesignPlace) != nullptr) + if ((NetworkGetMode() != NETWORK_MODE_NONE) && WindowFindByClass(WindowClass::TrackDesignPlace) != nullptr) { auto intent = Intent(INTENT_ACTION_TRACK_DESIGN_RESTORE_PROVISIONAL); ContextBroadcastIntent(&intent); @@ -1438,7 +1438,7 @@ static void MapExtendBoundarySurfaceExtendTile(const SurfaceElement& sourceTile, destTile.SetOwnership(OWNERSHIP_UNOWNED); destTile.SetWaterHeight(sourceTile.GetWaterHeight()); - auto z = sourceTile.base_height; + auto z = sourceTile.BaseHeight; auto slope = sourceTile.GetSlope() & TILE_ELEMENT_SLOPE_NW_SIDE_UP; if (slope == TILE_ELEMENT_SLOPE_NW_SIDE_UP) { @@ -1463,8 +1463,8 @@ static void MapExtendBoundarySurfaceExtendTile(const SurfaceElement& sourceTile, slope |= TILE_ELEMENT_SLOPE_S_CORNER_UP; destTile.SetSlope(slope); - destTile.base_height = z; - destTile.clearance_height = z; + destTile.BaseHeight = z; + destTile.ClearanceHeight = z; } /** @@ -1515,9 +1515,9 @@ static void ClearElementAt(const CoordsXY& loc, TileElement** elementPtr) switch (element->GetType()) { case TileElementType::Surface: - element->base_height = MINIMUM_LAND_HEIGHT; - element->clearance_height = MINIMUM_LAND_HEIGHT; - element->owner = 0; + element->BaseHeight = MINIMUM_LAND_HEIGHT; + element->ClearanceHeight = MINIMUM_LAND_HEIGHT; + element->Owner = 0; element->AsSurface()->SetSlope(TILE_ELEMENT_SLOPE_FLAT); element->AsSurface()->SetSurfaceStyle(0); element->AsSurface()->SetEdgeStyle(0); @@ -1648,7 +1648,7 @@ LargeSceneryElement* MapGetLargeScenerySegment(const CoordsXYZD& sceneryPos, int { if (tileElement->GetType() != TileElementType::LargeScenery) continue; - if (tileElement->base_height != sceneryTilePos.z) + if (tileElement->BaseHeight != sceneryTilePos.z) continue; if (tileElement->AsLargeScenery()->GetSequenceIndex() != sequence) continue; @@ -1671,7 +1671,7 @@ EntranceElement* MapGetParkEntranceElementAt(const CoordsXYZ& entranceCoords, bo if (tileElement->GetType() != TileElementType::Entrance) continue; - if (tileElement->base_height != entranceTileCoords.z) + if (tileElement->BaseHeight != entranceTileCoords.z) continue; if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_PARK_ENTRANCE) @@ -1697,7 +1697,7 @@ EntranceElement* MapGetRideEntranceElementAt(const CoordsXYZ& entranceCoords, bo if (tileElement->GetType() != TileElementType::Entrance) continue; - if (tileElement->base_height != entranceTileCoords.z) + if (tileElement->BaseHeight != entranceTileCoords.z) continue; if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_ENTRANCE) @@ -1723,7 +1723,7 @@ EntranceElement* MapGetRideExitElementAt(const CoordsXYZ& exitCoords, bool ghost if (tileElement->GetType() != TileElementType::Entrance) continue; - if (tileElement->base_height != exitTileCoords.z) + if (tileElement->BaseHeight != exitTileCoords.z) continue; if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_EXIT) @@ -1750,7 +1750,7 @@ SmallSceneryElement* MapGetSmallSceneryElementAt(const CoordsXYZ& sceneryCoords, continue; if (tileElement->AsSmallScenery()->GetSceneryQuadrant() != quadrant) continue; - if (tileElement->base_height != sceneryTileCoords.z) + if (tileElement->BaseHeight != sceneryTileCoords.z) continue; if (tileElement->AsSmallScenery()->GetEntryIndex() != type) continue; @@ -1764,7 +1764,7 @@ SmallSceneryElement* MapGetSmallSceneryElementAt(const CoordsXYZ& sceneryCoords, std::optional MapLargeSceneryGetOrigin( const CoordsXYZD& sceneryPos, int32_t sequence, LargeSceneryElement** outElement) { - rct_large_scenery_tile* tile; + LargeSceneryTile* tile; auto tileElement = MapGetLargeScenerySegment(sceneryPos, sequence); if (tileElement == nullptr) @@ -1790,7 +1790,7 @@ std::optional MapLargeSceneryGetOrigin( bool MapLargeScenerySignSetColour(const CoordsXYZD& signPos, int32_t sequence, uint8_t mainColour, uint8_t textColour) { LargeSceneryElement* tileElement; - rct_large_scenery_tile *sceneryTiles, *tile; + LargeSceneryTile *sceneryTiles, *tile; auto sceneryOrigin = MapLargeSceneryGetOrigin(signPos, sequence, &tileElement); if (!sceneryOrigin) @@ -1844,14 +1844,14 @@ static void MapInvalidateTileUnderZoom(int32_t x, int32_t y, int32_t z0, int32_t x += 16; y += 16; - auto screenCoord = Translate3DTo2D(get_current_rotation(), { x, y }); + auto screenCoord = Translate3DTo2D(GetCurrentRotation(), { x, y }); x1 = screenCoord.x - 32; y1 = screenCoord.y - 32 - z1; x2 = screenCoord.x + 32; y2 = screenCoord.y + 32 - z0; - viewports_invalidate({ { x1, y1 }, { x2, y2 } }, maxZoom); + ViewportsInvalidate({ { x1, y1 }, { x2, y2 } }, maxZoom); } /** @@ -1912,7 +1912,7 @@ void MapInvalidateRegion(const CoordsXY& mins, const CoordsXY& maxs) bottom += 32; top -= 32 + 2080; - viewports_invalidate({ { left, top }, { right, bottom } }); + ViewportsInvalidate({ { left, top }, { right, bottom } }); } int32_t MapGetTileSide(const CoordsXY& mapPos) @@ -1948,18 +1948,18 @@ bool MapSurfaceIsBlocked(const CoordsXY& mapCoords) if (surfaceElement->GetWaterHeight() > surfaceElement->GetBaseZ()) return true; - int16_t base_z = surfaceElement->base_height; - int16_t clear_z = surfaceElement->base_height + 2; + int16_t base_z = surfaceElement->BaseHeight; + int16_t clear_z = surfaceElement->BaseHeight + 2; if (surfaceElement->GetSlope() & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) clear_z += 2; auto tileElement = reinterpret_cast(surfaceElement); while (!(tileElement++)->IsLastForTile()) { - if (clear_z >= tileElement->clearance_height) + if (clear_z >= tileElement->ClearanceHeight) continue; - if (base_z < tileElement->base_height) + if (base_z < tileElement->BaseHeight) continue; if (tileElement->GetType() == TileElementType::Path || tileElement->GetType() == TileElementType::Wall) @@ -2031,7 +2031,7 @@ TileElement* MapGetTrackElementAtOfType(const CoordsXYZ& trackPos, track_type_t { if (tileElement->GetType() != TileElementType::Track) continue; - if (tileElement->base_height != trackTilePos.z) + if (tileElement->BaseHeight != trackTilePos.z) continue; if (tileElement->AsTrack()->GetTrackType() != trackType) continue; @@ -2058,7 +2058,7 @@ TileElement* MapGetTrackElementAtOfTypeSeq(const CoordsXYZ& trackPos, track_type break; if (tileElement->GetType() != TileElementType::Track) continue; - if (tileElement->base_height != trackTilePos.z) + if (tileElement->BaseHeight != trackTilePos.z) continue; if (tileElement->AsTrack()->GetTrackType() != trackType) continue; @@ -2135,7 +2135,7 @@ TileElement* MapGetTrackElementAtOfTypeFromRide(const CoordsXYZ& trackPos, track { if (tileElement->GetType() != TileElementType::Track) continue; - if (tileElement->base_height != trackTilePos.z) + if (tileElement->BaseHeight != trackTilePos.z) continue; if (tileElement->AsTrack()->GetRideIndex() != rideIndex) continue; @@ -2164,7 +2164,7 @@ TileElement* MapGetTrackElementAtFromRide(const CoordsXYZ& trackPos, RideId ride { if (tileElement->GetType() != TileElementType::Track) continue; - if (tileElement->base_height != trackTilePos.z) + if (tileElement->BaseHeight != trackTilePos.z) continue; if (tileElement->AsTrack()->GetRideIndex() != rideIndex) continue; @@ -2192,7 +2192,7 @@ TileElement* MapGetTrackElementAtWithDirectionFromRide(const CoordsXYZD& trackPo { if (tileElement->GetType() != TileElementType::Track) continue; - if (tileElement->base_height != trackTilePos.z) + if (tileElement->BaseHeight != trackTilePos.z) continue; if (tileElement->AsTrack()->GetRideIndex() != rideIndex) continue; @@ -2234,7 +2234,7 @@ WallElement* MapGetWallElementAt(const CoordsXYZD& wallCoords) { if (tileElement->GetType() != TileElementType::Wall) continue; - if (tileElement->base_height != tileWallCoords.z) + if (tileElement->BaseHeight != tileWallCoords.z) continue; if (tileElement->GetDirection() != wallCoords.direction) continue; @@ -2265,7 +2265,7 @@ uint16_t CheckMaxAllowableLandRightsForTile(const CoordsXYZ& tileMapPos) { destOwnership = OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED; // Do not own construction rights if too high/below surface - if (tileElement->base_height - ConstructionRightsClearanceSmall > tilePos.z || tileElement->base_height < tilePos.z) + if (tileElement->BaseHeight - ConstructionRightsClearanceSmall > tilePos.z || tileElement->BaseHeight < tilePos.z) { destOwnership = OWNERSHIP_UNOWNED; break; diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index 58ac7022b0..2663816076 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -21,7 +21,7 @@ #define MINIMUM_WATER_HEIGHT 2 #define MAXIMUM_WATER_HEIGHT 142 -#define MINIMUM_MAP_SIZE_TECHNICAL 15 +#define MINIMUM_MAP_SIZE_TECHNICAL 5 #define MAXIMUM_MAP_SIZE_TECHNICAL 1001 #define MINIMUM_MAP_SIZE_PRACTICAL (MINIMUM_MAP_SIZE_TECHNICAL - 2) #define MAXIMUM_MAP_SIZE_PRACTICAL (MAXIMUM_MAP_SIZE_TECHNICAL - 2) @@ -210,19 +210,19 @@ template T* TileElementInsert(const CoordsXYZ& loc, int32_t occupied return (element != nullptr) ? element->template as() : nullptr; } -struct tile_element_iterator +struct TileElementIterator { int32_t x; int32_t y; TileElement* element; }; #ifdef PLATFORM_32BIT -assert_struct_size(tile_element_iterator, 12); +assert_struct_size(TileElementIterator, 12); #endif -void TileElementIteratorBegin(tile_element_iterator* it); -int32_t TileElementIteratorNext(tile_element_iterator* it); -void TileElementIteratorRestartForTile(tile_element_iterator* it); +void TileElementIteratorBegin(TileElementIterator* it); +int32_t TileElementIteratorNext(TileElementIterator* it); +void TileElementIteratorRestartForTile(TileElementIterator* it); void MapUpdateTiles(); int32_t MapGetHighestZ(const CoordsXY& loc); diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 56917fddda..c467fb10e7 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -14,7 +14,10 @@ #include "../entity/EntityList.h" #include "../entity/Peep.h" #include "../interface/Viewport.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/SmallSceneryEntry.h" #include "../object/StationObject.h" +#include "../object/WallSceneryEntry.h" #include "../profiling/Profiling.h" #include "../ride/Ride.h" #include "../ride/RideData.h" @@ -22,10 +25,8 @@ #include "../world/Wall.h" #include "Banner.h" #include "Footpath.h" -#include "LargeScenery.h" #include "Map.h" #include "Scenery.h" -#include "SmallScenery.h" using map_animation_invalidate_event_handler = bool (*)(const CoordsXYZ& loc); @@ -59,7 +60,7 @@ void MapAnimationCreate(int32_t type, const CoordsXYZ& loc) } else { - log_error("Exceeded the maximum number of animations"); + LOG_ERROR("Exceeded the maximum number of animations"); } } } @@ -99,14 +100,14 @@ static bool MapAnimationInvalidateRideEntrance(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Entrance) continue; if (tileElement->AsEntrance()->GetEntranceType() != ENTRANCE_TYPE_RIDE_ENTRANCE) continue; - auto ride = get_ride(tileElement->AsEntrance()->GetRideIndex()); + auto ride = GetRide(tileElement->AsEntrance()->GetRideIndex()); if (ride != nullptr) { auto stationObj = ride->GetStationObject(); @@ -136,7 +137,7 @@ static bool MapAnimationInvalidateQueueBanner(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Path) continue; @@ -145,7 +146,7 @@ static bool MapAnimationInvalidateQueueBanner(const CoordsXYZ& loc) if (!tileElement->AsPath()->HasQueueBanner()) continue; - int32_t direction = (tileElement->AsPath()->GetQueueBannerDirection() + get_current_rotation()) & 3; + int32_t direction = (tileElement->AsPath()->GetQueueBannerDirection() + GetCurrentRotation()) & 3; if (direction == TILE_ELEMENT_DIRECTION_NORTH || direction == TILE_ELEMENT_DIRECTION_EAST) { MapInvalidateTileZoom1({ loc, loc.z + 16, loc.z + 30 }); @@ -169,7 +170,7 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::SmallScenery) continue; @@ -191,7 +192,7 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_IS_CLOCK)) { // Peep, looking at scenery - if (!(gCurrentTicks & 0x3FF) && game_is_not_paused()) + if (!(gCurrentTicks & 0x3FF) && GameIsNotPaused()) { int32_t direction = tileElement->GetDirection(); auto quad = EntityTileList(CoordsXY{ loc } - CoordsDirectionDelta[direction]); @@ -234,7 +235,7 @@ static bool MapAnimationInvalidateParkEntrance(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Entrance) continue; @@ -264,7 +265,7 @@ static bool MapAnimationInvalidateTrackWaterfall(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Track) continue; @@ -293,7 +294,7 @@ static bool MapAnimationInvalidateTrackRapids(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Track) continue; @@ -322,7 +323,7 @@ static bool MapAnimationInvalidateTrackOnRidePhoto(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Track) continue; @@ -330,7 +331,7 @@ static bool MapAnimationInvalidateTrackOnRidePhoto(const CoordsXYZ& loc) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::OnRidePhoto) { MapInvalidateTileZoom1({ loc, loc.z, tileElement->GetClearanceZ() }); - if (game_is_paused()) + if (GameIsPaused()) { return false; } @@ -361,7 +362,7 @@ static bool MapAnimationInvalidateTrackWhirlpool(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Track) continue; @@ -390,7 +391,7 @@ static bool MapAnimationInvalidateTrackSpinningTunnel(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Track) continue; @@ -428,7 +429,7 @@ static bool MapAnimationInvalidateBanner(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Banner) continue; @@ -454,7 +455,7 @@ static bool MapAnimationInvalidateLargeScenery(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::LargeScenery) continue; @@ -488,7 +489,7 @@ static bool MapAnimationInvalidateWallDoor(const CoordsXYZ& loc) return removeAnimation; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Wall) continue; @@ -497,7 +498,7 @@ static bool MapAnimationInvalidateWallDoor(const CoordsXYZ& loc) if (wallEntry == nullptr || !(wallEntry->flags & WALL_SCENERY_IS_DOOR)) continue; - if (game_is_paused()) + if (GameIsPaused()) { return false; } @@ -549,7 +550,7 @@ static bool MapAnimationInvalidateWall(const CoordsXYZ& loc) return true; do { - if (tileElement->base_height != tileLoc.z) + if (tileElement->BaseHeight != tileLoc.z) continue; if (tileElement->GetType() != TileElementType::Wall) continue; @@ -605,7 +606,7 @@ void MapAnimationAutoCreate() { ClearMapAnimations(); - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it)) { diff --git a/src/openrct2/world/MapAnimation.h b/src/openrct2/world/MapAnimation.h index bb8ff9e8df..ada1270d68 100644 --- a/src/openrct2/world/MapAnimation.h +++ b/src/openrct2/world/MapAnimation.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/MapGen.cpp b/src/openrct2/world/MapGen.cpp index 645e4ab23d..06ad2e9be9 100644 --- a/src/openrct2/world/MapGen.cpp +++ b/src/openrct2/world/MapGen.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,7 +18,9 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../object/Object.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectManager.h" +#include "../object/SmallSceneryEntry.h" #include "../object/TerrainEdgeObject.h" #include "../object/TerrainSurfaceObject.h" #include "../platform/Platform.h" @@ -26,7 +28,6 @@ #include "Map.h" #include "MapHelpers.h" #include "Scenery.h" -#include "SmallScenery.h" #include "Surface.h" #include @@ -93,10 +94,10 @@ static constexpr const std::string_view BaseTerrain[] = { static void MapGenPlaceTrees(); static void MapGenSetWaterLevel(int32_t waterLevel); static void MapGenSmoothHeight(int32_t iterations); -static void MapGenSetHeight(mapgen_settings* settings); +static void MapGenSetHeight(MapGenSettings* settings); static float FractalNoise(int32_t x, int32_t y, float frequency, int32_t octaves, float lacunarity, float persistence); -static void MapGenSimplex(mapgen_settings* settings); +static void MapGenSimplex(MapGenSettings* settings); static TileCoordsXY _heightSize; static uint8_t* _height; @@ -115,7 +116,7 @@ static void SetHeight(int32_t x, int32_t y, int32_t height) _height[x + y * _heightSize.x] = height; } -void MapGenGenerateBlank(mapgen_settings* settings) +void MapGenGenerateBlank(MapGenSettings* settings) { int32_t x, y; MapClearAllElements(); @@ -130,8 +131,8 @@ void MapGenGenerateBlank(mapgen_settings* settings) { surfaceElement->SetSurfaceStyle(settings->floor); surfaceElement->SetEdgeStyle(settings->wall); - surfaceElement->base_height = settings->height; - surfaceElement->clearance_height = settings->height; + surfaceElement->BaseHeight = settings->height; + surfaceElement->ClearanceHeight = settings->height; } } } @@ -139,7 +140,7 @@ void MapGenGenerateBlank(mapgen_settings* settings) MapGenSetWaterLevel(settings->water_level); } -void MapGenGenerate(mapgen_settings* settings) +void MapGenGenerate(MapGenSettings* settings) { const auto& mapSize = settings->mapSize; auto waterLevel = settings->water_level; @@ -160,7 +161,7 @@ void MapGenGenerate(mapgen_settings* settings) // Fall back to the first available surface texture that is available in the park floorTexture = TerrainSurfaceObject::GetById(0)->GetIdentifier(); else - floorTexture = availableTerrains[util_rand() % availableTerrains.size()]; + floorTexture = availableTerrains[UtilRand() % availableTerrains.size()]; } if (edgeTexture.empty()) @@ -194,8 +195,8 @@ void MapGenGenerate(mapgen_settings* settings) { surfaceElement->SetSurfaceStyle(floorTextureId); surfaceElement->SetEdgeStyle(edgeTextureId); - surfaceElement->base_height = settings->height; - surfaceElement->clearance_height = settings->height; + surfaceElement->BaseHeight = settings->height; + surfaceElement->ClearanceHeight = settings->height; } } } @@ -206,7 +207,7 @@ void MapGenGenerate(mapgen_settings* settings) std::fill_n(_height, _heightSize.y * _heightSize.x, 0x00); MapGenSimplex(settings); - MapGenSmoothHeight(2 + (util_rand() % 6)); + MapGenSmoothHeight(2 + (UtilRand() % 6)); // Set the game map to the height map MapGenSetHeight(settings); @@ -222,7 +223,7 @@ void MapGenGenerate(mapgen_settings* settings) // Add sandy beaches std::string_view beachTexture = floorTexture; - if (settings->floor == -1 && floorTexture == "rct2.terrain_surface.grass" && (util_rand() & 1)) + if (settings->floor == -1 && floorTexture == "rct2.terrain_surface.grass" && (UtilRand() & 1)) { std::vector availableBeachTextures; if (objectManager.GetLoadedObject(ObjectEntryDescriptor("rct2.terrain_surface.sand")) != nullptr) @@ -231,7 +232,7 @@ void MapGenGenerate(mapgen_settings* settings) availableBeachTextures.push_back("rct2.terrain_surface.sand_brown"); if (!availableBeachTextures.empty()) - beachTexture = availableBeachTextures[util_rand() % availableBeachTextures.size()]; + beachTexture = availableBeachTextures[UtilRand() % availableBeachTextures.size()]; } auto beachTextureId = objectManager.GetLoadedObjectEntryIndex(ObjectEntryDescriptor(beachTexture)); @@ -241,7 +242,7 @@ void MapGenGenerate(mapgen_settings* settings) { auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }.ToCoordsXY()); - if (surfaceElement != nullptr && surfaceElement->base_height < waterLevel + 6) + if (surfaceElement != nullptr && surfaceElement->BaseHeight < waterLevel + 6) surfaceElement->SetSurfaceStyle(beachTextureId); } } @@ -253,7 +254,7 @@ void MapGenGenerate(mapgen_settings* settings) static void MapGenPlaceTree(ObjectEntryIndex type, const CoordsXY& loc) { - auto* sceneryEntry = GetSmallSceneryEntry(type); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(type); if (sceneryEntry == nullptr) { return; @@ -265,7 +266,7 @@ static void MapGenPlaceTree(ObjectEntryIndex type, const CoordsXY& loc) Guard::Assert(sceneryElement != nullptr); sceneryElement->SetClearanceZ(surfaceZ + sceneryEntry->height); - sceneryElement->SetDirection(util_rand() & 3); + sceneryElement->SetDirection(UtilRand() & 3); sceneryElement->SetEntryIndex(type); sceneryElement->SetAge(0); sceneryElement->SetPrimaryColour(COLOUR_YELLOW); @@ -311,8 +312,8 @@ static void MapGenPlaceTrees() for (int32_t i = 0; i < object_entry_group_counts[EnumValue(ObjectType::SmallScenery)]; i++) { - auto* sceneryEntry = GetSmallSceneryEntry(i); - auto entry = object_entry_get_object(ObjectType::SmallScenery, i); + auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(i); + auto entry = ObjectEntryGetObject(ObjectType::SmallScenery, i); if (sceneryEntry == nullptr) continue; @@ -333,7 +334,7 @@ static void MapGenPlaceTrees() // Place trees CoordsXY pos; - float treeToLandRatio = (10 + (util_rand() % 30)) / 100.0f; + float treeToLandRatio = (10 + (UtilRand() % 30)) / 100.0f; for (int32_t y = 1; y < gMapSize.y - 1; y++) { for (int32_t x = 1; x < gMapSize.x - 1; x++) @@ -380,27 +381,27 @@ static void MapGenPlaceTrees() // Use tree:land ratio except when near an oasis constexpr static auto randModulo = 0xFFFF; - if (static_cast(util_rand() & randModulo) / randModulo > std::max(treeToLandRatio, oasisScore)) + if (static_cast(UtilRand() & randModulo) / randModulo > std::max(treeToLandRatio, oasisScore)) continue; // Use fractal noise to group tiles that are likely to spawn trees together float noiseValue = FractalNoise(x, y, 0.025f, 2, 2.0f, 0.65f); // Reduces the range to rarely stray further than 0.5 from the mean. - float noiseOffset = util_rand_normal_distributed() * 0.25f; + float noiseOffset = UtilRandNormalDistributed() * 0.25f; if (noiseValue + oasisScore < noiseOffset) continue; if (!grassTreeIds.empty() && MapGenSurfaceTakesGrassTrees(surfaceStyleObject)) { - treeObjectEntryIndex = grassTreeIds[util_rand() % grassTreeIds.size()]; + treeObjectEntryIndex = grassTreeIds[UtilRand() % grassTreeIds.size()]; } else if (!desertTreeIds.empty() && MapGenSurfaceTakesSandTrees(surfaceStyleObject)) { - treeObjectEntryIndex = desertTreeIds[util_rand() % desertTreeIds.size()]; + treeObjectEntryIndex = desertTreeIds[UtilRand() % desertTreeIds.size()]; } else if (!snowTreeIds.empty() && MapGenSurfaceTakesSnowTrees(surfaceStyleObject)) { - treeObjectEntryIndex = snowTreeIds[util_rand() % snowTreeIds.size()]; + treeObjectEntryIndex = snowTreeIds[UtilRand() % snowTreeIds.size()]; } if (treeObjectEntryIndex != OBJECT_ENTRY_INDEX_NULL) @@ -419,7 +420,7 @@ static void MapGenSetWaterLevel(int32_t waterLevel) for (int32_t x = 1; x < gMapSize.x - 1; x++) { auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }.ToCoordsXY()); - if (surfaceElement != nullptr && surfaceElement->base_height < waterLevel) + if (surfaceElement != nullptr && surfaceElement->BaseHeight < waterLevel) surfaceElement->SetWaterHeight(waterLevel * COORDS_Z_STEP); } } @@ -461,7 +462,7 @@ static void MapGenSmoothHeight(int32_t iterations) /** * Sets the height of the actual game map tiles to the height map. */ -static void MapGenSetHeight(mapgen_settings* settings) +static void MapGenSetHeight(MapGenSettings* settings) { int32_t x, y, heightX, heightY; @@ -482,13 +483,13 @@ static void MapGenSetHeight(mapgen_settings* settings) auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }.ToCoordsXY()); if (surfaceElement == nullptr) continue; - surfaceElement->base_height = std::max(2, baseHeight * 2); + surfaceElement->BaseHeight = std::max(2, baseHeight * 2); // If base height is below water level, lower it to create more natural shorelines - if (surfaceElement->base_height >= 4 && surfaceElement->base_height <= settings->water_level) - surfaceElement->base_height -= 2; + if (surfaceElement->BaseHeight >= 4 && surfaceElement->BaseHeight <= settings->water_level) + surfaceElement->BaseHeight -= 2; - surfaceElement->clearance_height = surfaceElement->base_height; + surfaceElement->ClearanceHeight = surfaceElement->BaseHeight; uint8_t currentSlope = surfaceElement->GetSlope(); @@ -525,7 +526,7 @@ static void NoiseRand() { for (auto& i : perm) { - i = util_rand() & 0xFF; + i = UtilRand() & 0xFF; } } @@ -641,7 +642,7 @@ static float Grad(int32_t hash, float x, float y) return ((h & 1) != 0 ? -u : u) + ((h & 2) != 0 ? -2.0f * v : 2.0f * v); } -static void MapGenSimplex(mapgen_settings* settings) +static void MapGenSimplex(MapGenSettings* settings) { int32_t x, y; @@ -728,7 +729,7 @@ bool MapGenLoadHeightmap(const utf8* path) ContextShowError(STR_HEIGHT_MAP_ERROR, STR_ERROR_READING_PNG, {}); break; default: - log_error("Unable to load height map image: %s", e.what()); + LOG_ERROR("Unable to load height map image: %s", e.what()); break; } return false; @@ -791,7 +792,7 @@ static void MapGenSmoothHeightmap(std::vector& src, int32_t strength) } } -void MapGenGenerateFromHeightmap(mapgen_settings* settings) +void MapGenGenerateFromHeightmap(MapGenSettings* settings) { openrct2_assert(!_heightMapData.mono_bitmap.empty(), "No height map loaded"); openrct2_assert(settings->simplex_high != settings->simplex_low, "Low and high setting cannot be the same"); @@ -853,15 +854,15 @@ void MapGenGenerateFromHeightmap(mapgen_settings* settings) // Read value from bitmap, and convert its range uint8_t value = dest[x + y * _heightMapData.width]; value = static_cast(static_cast(value - minValue) / rangeIn * rangeOut) + settings->simplex_low; - surfaceElement->base_height = value; + surfaceElement->BaseHeight = value; // Floor to even number - surfaceElement->base_height /= 2; - surfaceElement->base_height *= 2; - surfaceElement->clearance_height = surfaceElement->base_height; + surfaceElement->BaseHeight /= 2; + surfaceElement->BaseHeight *= 2; + surfaceElement->ClearanceHeight = surfaceElement->BaseHeight; // Set water level - if (surfaceElement->base_height < settings->water_level) + if (surfaceElement->BaseHeight < settings->water_level) { surfaceElement->SetWaterHeight(settings->water_level * COORDS_Z_STEP); } diff --git a/src/openrct2/world/MapGen.h b/src/openrct2/world/MapGen.h index 63854df50d..68ed2be09e 100644 --- a/src/openrct2/world/MapGen.h +++ b/src/openrct2/world/MapGen.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -13,7 +13,7 @@ #include "../core/String.hpp" #include "Location.hpp" -struct mapgen_settings +struct MapGenSettings { // Base TileCoordsXY mapSize; @@ -38,8 +38,8 @@ struct mapgen_settings bool normalize_height; }; -void MapGenGenerateBlank(mapgen_settings* settings); -void MapGenGenerate(mapgen_settings* settings); +void MapGenGenerateBlank(MapGenSettings* settings); +void MapGenGenerate(MapGenSettings* settings); bool MapGenLoadHeightmap(const utf8* path); void MapGenUnloadHeightmap(); -void MapGenGenerateFromHeightmap(mapgen_settings* settings); +void MapGenGenerateFromHeightmap(MapGenSettings* settings); diff --git a/src/openrct2/world/MapHelpers.cpp b/src/openrct2/world/MapHelpers.cpp index b35d308f2f..7c69eb7e73 100644 --- a/src/openrct2/world/MapHelpers.cpp +++ b/src/openrct2/world/MapHelpers.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,7 +17,7 @@ static uint8_t GetBaseHeightOrZero(int32_t x, int32_t y) { auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }.ToCoordsXY()); - return surfaceElement != nullptr ? surfaceElement->base_height : 0; + return surfaceElement != nullptr ? surfaceElement->BaseHeight : 0; } /** @@ -37,15 +37,15 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) surfaceElement->SetSlope(TILE_ELEMENT_SLOPE_FLAT); // Raise to edge height - 2 - highest = surfaceElement->base_height; + highest = surfaceElement->BaseHeight; highest = std::max(highest, GetBaseHeightOrZero(x - 1, y + 0)); highest = std::max(highest, GetBaseHeightOrZero(x + 1, y + 0)); highest = std::max(highest, GetBaseHeightOrZero(x + 0, y - 1)); highest = std::max(highest, GetBaseHeightOrZero(x + 0, y + 1)); - if (surfaceElement->base_height < highest - 2) + if (surfaceElement->BaseHeight < highest - 2) { raisedLand = 1; - surfaceElement->base_height = surfaceElement->clearance_height = highest - 2; + surfaceElement->BaseHeight = surfaceElement->ClearanceHeight = highest - 2; } // Check corners @@ -54,11 +54,11 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) cornerHeights[1] = GetBaseHeightOrZero(x + 1, y - 1); cornerHeights[2] = GetBaseHeightOrZero(x + 1, y + 1); cornerHeights[3] = GetBaseHeightOrZero(x - 1, y + 1); - highest = surfaceElement->base_height; + highest = surfaceElement->BaseHeight; for (std::size_t i = 0; i < std::size(cornerHeights); i++) highest = std::max(highest, cornerHeights[i]); - if (highest >= surfaceElement->base_height + 4) + if (highest >= surfaceElement->BaseHeight + 4) { count = 0; int32_t canCompensate = 1; @@ -88,9 +88,9 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) break; } - if (highestOnLowestSide > surfaceElement->base_height) + if (highestOnLowestSide > surfaceElement->BaseHeight) { - surfaceElement->base_height = surfaceElement->clearance_height = highestOnLowestSide; + surfaceElement->BaseHeight = surfaceElement->ClearanceHeight = highestOnLowestSide; raisedLand = 1; canCompensate = 0; } @@ -98,9 +98,9 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) if (count == 1 && canCompensate) { - if (surfaceElement->base_height < highest - 4) + if (surfaceElement->BaseHeight < highest - 4) { - surfaceElement->base_height = surfaceElement->clearance_height = highest - 4; + surfaceElement->BaseHeight = surfaceElement->ClearanceHeight = highest - 4; raisedLand = 1; } if (cornerHeights[0] == highest && cornerHeights[2] <= cornerHeights[0] - 4) @@ -114,9 +114,9 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) } else { - if (surfaceElement->base_height < highest - 2) + if (surfaceElement->BaseHeight < highest - 2) { - surfaceElement->base_height = surfaceElement->clearance_height = highest - 2; + surfaceElement->BaseHeight = surfaceElement->ClearanceHeight = highest - 2; raisedLand = 1; } } @@ -147,43 +147,43 @@ int32_t MapSmooth(int32_t l, int32_t t, int32_t r, int32_t b) uint8_t slope = surfaceElement->GetSlope(); // Corners auto surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y + 1 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_N_CORNER_UP; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y + 1 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_W_CORNER_UP; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y - 1 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_E_CORNER_UP; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y - 1 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_S_CORNER_UP; // Sides surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 1, y + 0 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_NE_SIDE_UP; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y + 0 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_SW_SIDE_UP; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 0, y - 1 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_SE_SIDE_UP; surfaceElement2 = MapGetSurfaceElementAt(TileCoordsXY{ x + 0, y + 1 }.ToCoordsXY()); - if (surfaceElement2 != nullptr && surfaceElement2->base_height > surfaceElement->base_height) + if (surfaceElement2 != nullptr && surfaceElement2->BaseHeight > surfaceElement->BaseHeight) slope |= TILE_ELEMENT_SLOPE_NW_SIDE_UP; // Raise if (slope == TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) { slope = TILE_ELEMENT_SLOPE_FLAT; - surfaceElement->base_height = surfaceElement->clearance_height += 2; + surfaceElement->BaseHeight = surfaceElement->ClearanceHeight += 2; } surfaceElement->SetSlope(slope); } @@ -243,11 +243,11 @@ int32_t TileSmooth(const TileCoordsXY& tileCoords) // Get neighbour height. If the element is not valid (outside of map) assume the same height auto* neighbourSurfaceElement = MapGetSurfaceElementAt( (tileCoords + TileCoordsXY{ x_offset, y_offset }).ToCoordsXY()); - neighbourHeightOffset.baseheight[index] = neighbourSurfaceElement != nullptr ? neighbourSurfaceElement->base_height - : surfaceElement->base_height; + neighbourHeightOffset.baseheight[index] = neighbourSurfaceElement != nullptr ? neighbourSurfaceElement->BaseHeight + : surfaceElement->BaseHeight; // Make the height relative to the current surface element - neighbourHeightOffset.baseheight[index] -= surfaceElement->base_height; + neighbourHeightOffset.baseheight[index] -= surfaceElement->BaseHeight; index++; } @@ -289,7 +289,7 @@ int32_t TileSmooth(const TileCoordsXY& tileCoords) { // All corners are raised, raise the entire tile instead. surfaceElement->SetSlope(TILE_ELEMENT_SLOPE_FLAT); - surfaceElement->base_height = (surfaceElement->clearance_height += 2); + surfaceElement->BaseHeight = (surfaceElement->ClearanceHeight += 2); if (surfaceElement->GetWaterHeight() <= surfaceElement->GetBaseZ()) { surfaceElement->SetWaterHeight(0); @@ -302,9 +302,9 @@ int32_t TileSmooth(const TileCoordsXY& tileCoords) // Set correct clearance height if (slope & TILE_ELEMENT_SLOPE_DOUBLE_HEIGHT) - surfaceElement->clearance_height = surfaceElement->base_height + 4; + surfaceElement->ClearanceHeight = surfaceElement->BaseHeight + 4; else if (slope & TILE_ELEMENT_SLOPE_ALL_CORNERS_UP) - surfaceElement->clearance_height = surfaceElement->base_height + 2; + surfaceElement->ClearanceHeight = surfaceElement->BaseHeight + 2; } return 1; diff --git a/src/openrct2/world/MapHelpers.h b/src/openrct2/world/MapHelpers.h index dc0fd53a14..566898bdd7 100644 --- a/src/openrct2/world/MapHelpers.h +++ b/src/openrct2/world/MapHelpers.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/Park.cpp b/src/openrct2/world/Park.cpp index d497728742..6ab312379b 100644 --- a/src/openrct2/world/Park.cpp +++ b/src/openrct2/world/Park.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -48,10 +48,10 @@ using namespace OpenRCT2; uint64_t gParkFlags; uint16_t gParkRating; -money16 gParkEntranceFee; +money64 gParkEntranceFee; uint32_t gParkSize; -money16 gLandPrice; -money16 gConstructionRightsPrice; +money64 gLandPrice; +money64 gConstructionRightsPrice; uint64_t gTotalAdmissions; money64 gTotalIncomeFromAdmissions; @@ -86,7 +86,7 @@ static PeepSpawn* GetRandomPeepSpawn() { if (!gPeepSpawns.empty()) { - return &gPeepSpawns[scenario_rand() % gPeepSpawns.size()]; + return &gPeepSpawns[ScenarioRand() % gPeepSpawns.size()]; } return nullptr; @@ -191,7 +191,7 @@ int32_t ParkGetForcedRating() return _forcedParkRating; } -money16 ParkGetEntranceFee() +money64 ParkGetEntranceFee() { if (gParkFlags & PARK_FLAGS_NO_MONEY) { @@ -252,7 +252,7 @@ money64 Park::GetCompanyValue() const void Park::Initialise() { - Name = format_string(STR_UNNAMED_PARK, nullptr); + Name = FormatStringID(STR_UNNAMED_PARK, nullptr); PluginStorage = {}; gStaffHandymanColour = COLOUR_BRIGHT_RED; gStaffMechanicColour = COLOUR_LIGHT_BLUE; @@ -268,12 +268,12 @@ void Park::Initialise() gResearchLastItem = std::nullopt; gMarketingCampaigns.clear(); - research_reset_items(); - finance_init(); + ResearchResetItems(); + FinanceInit(); - set_every_ride_type_not_invented(); + SetEveryRideTypeNotInvented(); - set_all_scenery_items_invented(); + SetAllSceneryItemsInvented(); gParkEntranceFee = 10.00_GBP; @@ -296,11 +296,11 @@ void Park::Initialise() gConstructionRightsPrice = 40.00_GBP; gParkFlags = PARK_FLAGS_NO_MONEY | PARK_FLAGS_SHOW_REAL_GUEST_NAMES; ResetHistories(); - finance_reset_history(); - award_reset(); + FinanceResetHistory(); + AwardReset(); gScenarioName.clear(); - gScenarioDetails = String::ToStd(language_get_string(STR_NO_DETAILS_YET)); + gScenarioDetails = String::ToStd(LanguageGetString(STR_NO_DETAILS_YET)); } void Park::Update(const Date& date) @@ -323,7 +323,7 @@ void Park::Update(const Date& date) _suggestedGuestMaximum = CalculateSuggestedMaxGuests(); _guestGenerationProbability = CalculateGuestGenerationProbability(); - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::Finances); auto intent = Intent(INTENT_ACTION_UPDATE_PARK_RATING); ContextBroadcastIntent(&intent); } @@ -332,7 +332,7 @@ void Park::Update(const Date& date) if (gCurrentTicks % 4096 == 0) { gParkSize = CalculateParkSize(); - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } GenerateGuests(); @@ -341,7 +341,7 @@ void Park::Update(const Date& date) uint32_t Park::CalculateParkSize() const { uint32_t tiles = 0; - tile_element_iterator it; + TileElementIterator it; TileElementIteratorBegin(&it); do { @@ -357,7 +357,7 @@ uint32_t Park::CalculateParkSize() const if (tiles != gParkSize) { gParkSize = tiles; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } return tiles; @@ -423,7 +423,7 @@ int32_t Park::CalculateParkRating() const for (auto& ride : GetRideManager()) { totalRideUptime += 100 - ride.downtime; - if (ride_has_ratings(&ride)) + if (RideHasRatings(ride)) { totalRideExcitement += ride.excitement / 8; totalRideIntensity += ride.intensity / 8; @@ -485,7 +485,7 @@ money64 Park::CalculateParkValue() const money64 result = 0; for (const auto& ride : GetRideManager()) { - result += CalculateRideValue(&ride); + result += CalculateRideValue(ride); } // +7.00 per guest @@ -494,14 +494,13 @@ money64 Park::CalculateParkValue() const return result; } -money64 Park::CalculateRideValue(const Ride* ride) const +money64 Park::CalculateRideValue(const Ride& ride) const { money64 result = 0; - if (ride != nullptr && ride->value != RIDE_VALUE_UNDEFINED) + if (ride.value != RIDE_VALUE_UNDEFINED) { - const auto& rtd = ride->GetRideTypeDescriptor(); - result = ToMoney32FromGBP(static_cast(ride->value)) - * (static_cast(ride_customers_in_last_5_minutes(ride)) + rtd.BonusValue * 4LL); + const auto& rtd = ride.GetRideTypeDescriptor(); + result = (ride.value * 10) * (static_cast(RideCustomersInLast5Minutes(ride)) + rtd.BonusValue * 4LL); } return result; } @@ -511,14 +510,14 @@ money64 Park::CalculateCompanyValue() const auto result = gParkValue - gBankLoan; // Clamp addition to prevent overflow - result = add_clamp_money64(result, finance_get_current_cash()); + result = AddClamp_money64(result, FinanceGetCurrentCash()); return result; } -money16 Park::CalculateTotalRideValueForMoney() const +money64 Park::CalculateTotalRideValueForMoney() const { - money16 totalRideValue = 0; + money64 totalRideValue = 0; bool ridePricesUnlocked = ParkRidePricesUnlocked() && !(gParkFlags & PARK_FLAGS_NO_MONEY); for (auto& ride : GetRideManager()) { @@ -532,7 +531,7 @@ money16 Park::CalculateTotalRideValueForMoney() const // Add ride value if (ride.value != RIDE_VALUE_UNDEFINED) { - money16 rideValue = static_cast(ride.value); + money64 rideValue = ride.value; if (ridePricesUnlocked) { rideValue -= ride.price[0]; @@ -616,7 +615,7 @@ uint32_t Park::CalculateGuestGenerationProbability() const } // Penalty for overpriced entrance fee relative to total ride value - money16 entranceFee = ParkGetEntranceFee(); + auto entranceFee = ParkGetEntranceFee(); if (entranceFee > gTotalRideValueForMoney) { probability /= 4; @@ -631,7 +630,7 @@ uint32_t Park::CalculateGuestGenerationProbability() const for (const auto& award : GetAwards()) { // +/- 0.25% of the probability - if (award_is_positive(award.Type)) + if (AwardIsPositive(award.Type)) { probability += probability / 4; } @@ -669,7 +668,7 @@ uint8_t Park::CalculateGuestInitialHappiness(uint8_t percentage) void Park::GenerateGuests() { // Generate a new guest for some probability - if (static_cast(scenario_rand() & 0xFFFF) < _guestGenerationProbability) + if (static_cast(ScenarioRand() & 0xFFFF) < _guestGenerationProbability) { bool difficultGeneration = (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0; if (!difficultGeneration || _suggestedGuestMaximum + 150 >= gNumGuestsInPark) @@ -682,8 +681,8 @@ void Park::GenerateGuests() for (const auto& campaign : gMarketingCampaigns) { // Random chance of guest generation - auto probability = marketing_get_campaign_guest_generation_probability(campaign.Type); - auto random = scenario_rand_max(std::numeric_limits::max()); + auto probability = MarketingGetCampaignGuestGenerationProbability(campaign.Type); + auto random = ScenarioRandMax(std::numeric_limits::max()); if (random < probability) { GenerateGuestFromCampaign(campaign.Type); @@ -696,7 +695,7 @@ Guest* Park::GenerateGuestFromCampaign(int32_t campaign) auto peep = GenerateGuest(); if (peep != nullptr) { - marketing_set_guest_campaign(peep, campaign); + MarketingSetGuestCampaign(peep, campaign); } return peep; } @@ -756,7 +755,7 @@ void Park::UpdateHistories() // Update park rating, guests in park and current cash history HistoryPushRecord(gParkRatingHistory, gParkRating / 4); HistoryPushRecord(gGuestsInParkHistory, gNumGuestsInPark); - HistoryPushRecord(gCashHistory, finance_get_current_cash() - gBankLoan); + HistoryPushRecord(gCashHistory, FinanceGetCurrentCash() - gBankLoan); // Update weekly profit history auto currentWeeklyProfit = gWeeklyProfitAverageDividend; @@ -774,8 +773,8 @@ void Park::UpdateHistories() // Invalidate relevant windows auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); ContextBroadcastIntent(&intent); - window_invalidate_by_class(WindowClass::ParkInformation); - window_invalidate_by_class(WindowClass::Finances); + WindowInvalidateByClass(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::Finances); } int32_t ParkIsOpen() @@ -789,7 +788,7 @@ uint32_t ParkCalculateSize() if (tiles != gParkSize) { gParkSize = tiles; - window_invalidate_by_class(WindowClass::ParkInformation); + WindowInvalidateByClass(WindowClass::ParkInformation); } return tiles; } diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index b1cf23dd24..10b9b2686c 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -40,7 +40,9 @@ enum : uint32_t PARK_FLAGS_NO_MONEY_SCENARIO = (1 << 17), // Deprecated, originally used in scenario editor PARK_FLAGS_SPRITES_INITIALISED = (1 << 18), // After a scenario is loaded this prevents edits in the scenario editor PARK_FLAGS_SIX_FLAGS_DEPRECATED = (1 << 19), // Not used anymore - PARK_FLAGS_UNLOCK_ALL_PRICES = (1u << 31), // OpenRCT2 only! + + PARK_FLAGS_RCT1_INTEREST = (1u << 30), // OpenRCT2 only + PARK_FLAGS_UNLOCK_ALL_PRICES = (1u << 31), // OpenRCT2 only }; struct Guest; @@ -80,8 +82,8 @@ namespace OpenRCT2 void UpdateHistories(); private: - money64 CalculateRideValue(const Ride* ride) const; - money16 CalculateTotalRideValueForMoney() const; + money64 CalculateRideValue(const Ride& ride) const; + money64 CalculateTotalRideValueForMoney() const; uint32_t CalculateSuggestedMaxGuests() const; uint32_t CalculateGuestGenerationProbability() const; @@ -92,10 +94,10 @@ namespace OpenRCT2 extern uint64_t gParkFlags; extern uint16_t gParkRating; -extern money16 gParkEntranceFee; +extern money64 gParkEntranceFee; extern uint32_t gParkSize; -extern money16 gLandPrice; -extern money16 gConstructionRightsPrice; +extern money64 gLandPrice; +extern money64 gConstructionRightsPrice; extern uint64_t gTotalAdmissions; extern money64 gTotalIncomeFromAdmissions; @@ -122,7 +124,7 @@ uint8_t CalculateGuestInitialHappiness(uint8_t percentage); void ParkSetOpen(bool open); int32_t ParkEntranceGetIndex(const CoordsXYZ& entrancePos); -money16 ParkGetEntranceFee(); +money64 ParkGetEntranceFee(); bool ParkRidePricesUnlocked(); bool ParkEntranceFeeUnlocked(); diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index 6af904f3b7..3c42d31931 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -23,20 +23,25 @@ #include "../entity/Fountain.h" #include "../localisation/Localisation.h" #include "../network/network.h" +#include "../object/BannerSceneryEntry.h" +#include "../object/FootpathItemEntry.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" +#include "../object/SceneryGroupEntry.h" +#include "../object/SmallSceneryEntry.h" +#include "../object/WallSceneryEntry.h" #include "../scenario/Scenario.h" #include "Climate.h" #include "Footpath.h" -#include "LargeScenery.h" #include "Map.h" #include "Park.h" -#include "SmallScenery.h" #include "Wall.h" uint8_t gSceneryQuadrant; -money32 gSceneryPlaceCost; +money64 gSceneryPlaceCost; ScenerySelection gSceneryPlaceObject; int16_t gSceneryPlaceZ; uint8_t gSceneryPlaceRotation; @@ -65,7 +70,7 @@ const CoordsXY SceneryQuadrantOffsets[] = { { 24, 8 }, }; -LargeSceneryText::LargeSceneryText(const rct_large_scenery_text& original) +LargeSceneryText::LargeSceneryText(const RCTLargeSceneryText& original) { for (size_t i = 0; i < std::size(original.offset); i++) { @@ -81,7 +86,7 @@ LargeSceneryText::LargeSceneryText(const rct_large_scenery_text& original) } } -const rct_large_scenery_text_glyph* LargeSceneryText::GetGlyph(char32_t codepoint) const +const LargeSceneryTextGlyph* LargeSceneryText::GetGlyph(char32_t codepoint) const { if (codepoint >= std::size(glyphs)) { @@ -90,7 +95,7 @@ const rct_large_scenery_text_glyph* LargeSceneryText::GetGlyph(char32_t codepoin return &glyphs[codepoint]; } -const rct_large_scenery_text_glyph& LargeSceneryText::GetGlyph(char32_t codepoint, char32_t defaultCodepoint) const +const LargeSceneryTextGlyph& LargeSceneryText::GetGlyph(char32_t codepoint, char32_t defaultCodepoint) const { auto glyph = GetGlyph(codepoint); if (glyph == nullptr) @@ -131,7 +136,7 @@ void SceneryUpdateTile(const CoordsXY& sceneryPos) { // Ghosts are purely this-client-side and should not cause any interaction, // as that may lead to a desync. - if (network_get_mode() != NETWORK_MODE_NONE) + if (NetworkGetMode() != NETWORK_MODE_NONE) { if (tileElement->IsGhost()) continue; @@ -295,54 +300,6 @@ void SceneryRemoveGhostToolPlacement() } } -WallSceneryEntry* GetWallEntry(ObjectEntryIndex entryIndex) -{ - WallSceneryEntry* result = nullptr; - auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::Walls, entryIndex); - if (obj != nullptr) - { - result = static_cast(obj->GetLegacyData()); - } - return result; -} - -BannerSceneryEntry* GetBannerEntry(ObjectEntryIndex entryIndex) -{ - BannerSceneryEntry* result = nullptr; - auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::Banners, entryIndex); - if (obj != nullptr) - { - result = static_cast(obj->GetLegacyData()); - } - return result; -} - -PathBitEntry* GetFootpathItemEntry(ObjectEntryIndex entryIndex) -{ - PathBitEntry* result = nullptr; - auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::PathBits, entryIndex); - if (obj != nullptr) - { - result = static_cast(obj->GetLegacyData()); - } - return result; -} - -rct_scenery_group_entry* GetSceneryGroupEntry(ObjectEntryIndex entryIndex) -{ - rct_scenery_group_entry* result = nullptr; - auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::SceneryGroup, entryIndex); - if (obj != nullptr) - { - result = static_cast(obj->GetLegacyData()); - } - return result; -} - int32_t WallEntryGetDoorSound(const WallSceneryEntry* wallEntry) { return (wallEntry->flags2 & WALL_SCENERY_2_DOOR_SOUND_MASK) >> WALL_SCENERY_2_DOOR_SOUND_SHIFT; @@ -358,7 +315,7 @@ bool IsSceneryAvailableToBuild(const ScenerySelection& item) if (!gCheatsIgnoreResearchStatus) { - if (!scenery_is_invented(item)) + if (!SceneryIsInvented(item)) { return false; } @@ -394,22 +351,22 @@ static size_t GetMaxObjectsForSceneryType(const uint8_t sceneryType) } } -static SceneryEntryBase* GetSceneryEntry(const ScenerySelection& item) +static bool IsSceneryEntryValid(const ScenerySelection& item) { switch (item.SceneryType) { case SCENERY_TYPE_SMALL: - return GetSmallSceneryEntry(item.EntryIndex); + return OpenRCT2::ObjectManager::GetObjectEntry(item.EntryIndex) != nullptr; case SCENERY_TYPE_PATH_ITEM: - return GetFootpathItemEntry(item.EntryIndex); + return OpenRCT2::ObjectManager::GetObjectEntry(item.EntryIndex) != nullptr; case SCENERY_TYPE_WALL: - return GetWallEntry(item.EntryIndex); + return OpenRCT2::ObjectManager::GetObjectEntry(item.EntryIndex) != nullptr; case SCENERY_TYPE_LARGE: - return GetLargeSceneryEntry(item.EntryIndex); + return OpenRCT2::ObjectManager::GetObjectEntry(item.EntryIndex) != nullptr; case SCENERY_TYPE_BANNER: - return GetBannerEntry(item.EntryIndex); + return OpenRCT2::ObjectManager::GetObjectEntry(item.EntryIndex) != nullptr; default: - return nullptr; + return false; } } @@ -434,7 +391,7 @@ static std::vector GetAllMiscScenery() std::vector nonMiscScenery; for (ObjectEntryIndex i = 0; i < MAX_SCENERY_GROUP_OBJECTS; i++) { - const auto* sgEntry = GetSceneryGroupEntry(i); + const auto* sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(i); if (sgEntry != nullptr) { nonMiscScenery.insert(nonMiscScenery.end(), sgEntry->SceneryEntries.begin(), sgEntry->SceneryEntries.end()); @@ -446,8 +403,7 @@ static std::vector GetAllMiscScenery() for (ObjectEntryIndex i = 0; i < maxObjects; i++) { const ScenerySelection sceneryItem = { sceneryType, i }; - const auto* sceneryEntry = GetSceneryEntry(sceneryItem); - if (sceneryEntry != nullptr) + if (IsSceneryEntryValid(sceneryItem)) { if (std::find(std::begin(nonMiscScenery), std::end(nonMiscScenery), sceneryItem) == std::end(nonMiscScenery)) { @@ -472,7 +428,7 @@ void MarkAllUnrestrictedSceneryAsInvented() { if (std::find(_restrictedScenery.begin(), _restrictedScenery.end(), sceneryItem) == _restrictedScenery.end()) { - scenery_set_invented(sceneryItem); + ScenerySetInvented(sceneryItem); } } } diff --git a/src/openrct2/world/Scenery.h b/src/openrct2/world/Scenery.h index 93e4072e21..793c817671 100644 --- a/src/openrct2/world/Scenery.h +++ b/src/openrct2/world/Scenery.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -10,213 +10,14 @@ #pragma once #include "../common.h" -#include "../world/Location.hpp" -#include "../world/ScenerySelection.h" -#include "TileElement.h" +#include "Location.hpp" +#include "ScenerySelection.h" -#include -#include +#include #define SCENERY_WITHER_AGE_THRESHOLD_1 0x28 #define SCENERY_WITHER_AGE_THRESHOLD_2 0x37 -struct LargeSceneryText; - -#pragma pack(push, 1) - -struct SceneryEntryBase -{ - StringId name; - uint32_t image; -}; - -struct rct_large_scenery_tile -{ - int16_t x_offset; - int16_t y_offset; - int16_t z_offset; - uint8_t z_clearance; - // CCCC WWWW 0SS0 0000 - uint16_t flags; -}; -assert_struct_size(rct_large_scenery_tile, 9); - -enum -{ - LARGE_SCENERY_TILE_FLAG_NO_SUPPORTS = 0x20, - LARGE_SCENERY_TILE_FLAG_ALLOW_SUPPORTS_ABOVE = 0x40, -}; - -struct rct_large_scenery_text_glyph -{ - uint8_t image_offset; - uint8_t width; - uint8_t height; - uint8_t pad_3; -}; -assert_struct_size(rct_large_scenery_text_glyph, 4); - -struct rct_large_scenery_text -{ - struct - { - int16_t x, y; - } offset[2]; // 0x0 - uint16_t max_width; // 0x8 - uint16_t pad_A; // 0xA - uint8_t flags; // 0xC - uint8_t num_images; // 0xD - rct_large_scenery_text_glyph glyphs[256]; // 0xE -}; -assert_struct_size(rct_large_scenery_text, 14 + 4 * 256); - -enum LARGE_SCENERY_TEXT_FLAGS -{ - LARGE_SCENERY_TEXT_FLAG_VERTICAL = (1 << 0), // 0x1 - LARGE_SCENERY_TEXT_FLAG_TWO_LINE = (1 << 1), // 0x2 -}; - -struct LargeSceneryEntry : SceneryEntryBase -{ - CursorID tool_id; - uint8_t flags; - money32 price; - money32 removal_price; - rct_large_scenery_tile* tiles; - ObjectEntryIndex scenery_tab_id; - uint8_t scrolling_mode; - LargeSceneryText* text; - uint32_t text_image; -}; - -enum LARGE_SCENERY_FLAGS -{ - LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1 - LARGE_SCENERY_FLAG_HAS_SECONDARY_COLOUR = (1 << 1), // 0x2 - LARGE_SCENERY_FLAG_3D_TEXT = (1 << 2), // 0x4 - LARGE_SCENERY_FLAG_ANIMATED = (1 << 3), // 0x8 - LARGE_SCENERY_FLAG_PHOTOGENIC = (1 << 4), // 0x10 - LARGE_SCENERY_FLAG_IS_TREE = (1 << 5), // 0x20 - LARGE_SCENERY_FLAG_HAS_TERTIARY_COLOUR = (1 << 6), // 0x40 -}; - -enum WALL_SCENERY_FLAGS -{ - WALL_SCENERY_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1 - WALL_SCENERY_HAS_GLASS = (1 << 1), // 0x2 - WALL_SCENERY_CANT_BUILD_ON_SLOPE = (1 << 2), // 0x4 - WALL_SCENERY_IS_DOUBLE_SIDED = (1 << 3), // 0x8 - WALL_SCENERY_IS_DOOR = (1 << 4), // 0x10 - WALL_SCENERY_LONG_DOOR_ANIMATION = (1 << 5), // 0x20 - WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40 - WALL_SCENERY_HAS_TERTIARY_COLOUR = (1 << 7), // 0x80 -}; - -enum WALL_SCENERY_2_FLAGS -{ - WALL_SCENERY_2_NO_SELECT_PRIMARY_COLOUR = (1 << 0), // 0x1 - WALL_SCENERY_2_DOOR_SOUND_MASK = 0x6, - WALL_SCENERY_2_DOOR_SOUND_SHIFT = 1, - WALL_SCENERY_2_IS_OPAQUE = (1 << 3), // 0x8 - WALL_SCENERY_2_ANIMATED = (1 << 4), // 0x10 -}; - -struct SmallSceneryEntry : SceneryEntryBase -{ - uint32_t flags; - uint8_t height; - CursorID tool_id; - money32 price; - money32 removal_price; - uint8_t* frame_offsets; - uint16_t animation_delay; - uint16_t animation_mask; - uint16_t num_frames; - ObjectEntryIndex scenery_tab_id; - - constexpr bool HasFlag(const uint32_t _flags) const - { - return (flags & _flags) != 0; - } -}; - -struct WallSceneryEntry : SceneryEntryBase -{ - CursorID tool_id; - uint8_t flags; - uint8_t height; - uint8_t flags2; - money16 price; - ObjectEntryIndex scenery_tab_id; - uint8_t scrolling_mode; -}; -enum class PathBitDrawType : uint8_t; - -struct PathBitEntry : SceneryEntryBase -{ - uint16_t flags; - PathBitDrawType draw_type; - CursorID tool_id; - money16 price; - ObjectEntryIndex scenery_tab_id; -}; - -struct BannerSceneryEntry : SceneryEntryBase -{ - uint8_t scrolling_mode; - uint8_t flags; - int16_t price; - ObjectEntryIndex scenery_tab_id; -}; - -#pragma pack(pop) - -struct LargeSceneryText -{ - CoordsXY offset[2]; - uint16_t max_width; - uint8_t flags; - uint16_t num_images; - rct_large_scenery_text_glyph glyphs[256]; - - LargeSceneryText() = default; - explicit LargeSceneryText(const rct_large_scenery_text& original); - const rct_large_scenery_text_glyph* GetGlyph(char32_t codepoint) const; - const rct_large_scenery_text_glyph& GetGlyph(char32_t codepoint, char32_t defaultCodepoint) const; - int32_t MeasureWidth(std::string_view text) const; - int32_t MeasureHeight(std::string_view text) const; -}; - -struct rct_scenery_group_entry -{ - StringId name; - uint32_t image; - std::vector SceneryEntries; - uint8_t priority; - uint32_t entertainer_costumes; -}; - -enum -{ - PATH_BIT_FLAG_IS_BIN = 1 << 0, - PATH_BIT_FLAG_IS_BENCH = 1 << 1, - PATH_BIT_FLAG_BREAKABLE = 1 << 2, - PATH_BIT_FLAG_LAMP = 1 << 3, - PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER = 1 << 4, - PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW = 1 << 5, - PATH_BIT_FLAG_DONT_ALLOW_ON_QUEUE = 1 << 6, - PATH_BIT_FLAG_DONT_ALLOW_ON_SLOPE = 1 << 7, - PATH_BIT_FLAG_IS_QUEUE_SCREEN = 1 << 8 -}; - -enum class PathBitDrawType : uint8_t -{ - Light, - Bin, - Bench, - JumpingFountain, -}; - enum { SCENERY_TYPE_SMALL, @@ -237,11 +38,6 @@ enum SCENERY_GHOST_FLAG_4 = (1 << SCENERY_TYPE_BANNER) }; -enum -{ - BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR = (1 << 0), -}; - enum class ScatterToolDensity : uint8_t { LowDensity, @@ -251,9 +47,8 @@ enum class ScatterToolDensity : uint8_t extern uint8_t gSceneryQuadrant; -extern money32 gSceneryPlaceCost; +extern money64 gSceneryPlaceCost; extern ScenerySelection gSceneryPlaceObject; -extern uint16_t gSceneryPlaceObjectEntryIndex; extern int16_t gSceneryPlaceZ; extern uint8_t gSceneryPlaceRotation; @@ -278,10 +73,7 @@ void SceneryUpdateTile(const CoordsXY& sceneryPos); void ScenerySetDefaultPlacementConfiguration(); void SceneryRemoveGhostToolPlacement(); -WallSceneryEntry* GetWallEntry(ObjectEntryIndex entryIndex); -BannerSceneryEntry* GetBannerEntry(ObjectEntryIndex entryIndex); -PathBitEntry* GetFootpathItemEntry(ObjectEntryIndex entryIndex); -rct_scenery_group_entry* GetSceneryGroupEntry(ObjectEntryIndex entryIndex); +struct WallSceneryEntry; int32_t WallEntryGetDoorSound(const WallSceneryEntry* wallEntry); diff --git a/src/openrct2/world/ScenerySelection.h b/src/openrct2/world/ScenerySelection.h index 0052781ec9..93270b4bef 100644 --- a/src/openrct2/world/ScenerySelection.h +++ b/src/openrct2/world/ScenerySelection.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,7 +9,7 @@ #pragma once -#include "../object/Object.h" +#include "../object/ObjectTypes.h" #include #include @@ -26,6 +26,11 @@ struct ScenerySelection return SceneryType == rhs.SceneryType && EntryIndex == rhs.EntryIndex; } + inline bool operator!=(const ScenerySelection& rhs) const + { + return !(*this == rhs); + } + bool IsUndefined() const { return EntryIndex == OBJECT_ENTRY_INDEX_NULL; diff --git a/src/openrct2/world/SmallScenery.cpp b/src/openrct2/world/SmallScenery.cpp index 123bfe91e0..2b730f04aa 100644 --- a/src/openrct2/world/SmallScenery.cpp +++ b/src/openrct2/world/SmallScenery.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -15,7 +15,9 @@ #include "../OpenRCT2.h" #include "../management/Finance.h" #include "../network/network.h" +#include "../object/ObjectEntryManager.h" #include "../object/ObjectManager.h" +#include "../object/SmallSceneryEntry.h" #include "../ride/TrackDesign.h" #include "Footpath.h" #include "Map.h" @@ -26,13 +28,13 @@ uint8_t SmallSceneryElement::GetSceneryQuadrant() const { - return (this->type & TILE_ELEMENT_QUADRANT_MASK) >> 6; + return (this->Type & TILE_ELEMENT_QUADRANT_MASK) >> 6; } void SmallSceneryElement::SetSceneryQuadrant(uint8_t newQuadrant) { - type &= ~TILE_ELEMENT_QUADRANT_MASK; - type |= (newQuadrant << 6); + Type &= ~TILE_ELEMENT_QUADRANT_MASK; + Type |= (newQuadrant << 6); } uint16_t SmallSceneryElement::GetEntryIndex() const @@ -123,19 +125,7 @@ void SmallSceneryElement::SetNeedsSupports() Colour[0] |= MAP_ELEM_SMALL_SCENERY_COLOUR_FLAG_NEEDS_SUPPORTS; } -SmallSceneryEntry* SmallSceneryElement::GetEntry() const +const SmallSceneryEntry* SmallSceneryElement::GetEntry() const { - return GetSmallSceneryEntry(entryIndex); -} - -SmallSceneryEntry* GetSmallSceneryEntry(ObjectEntryIndex entryIndex) -{ - SmallSceneryEntry* result = nullptr; - auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::SmallScenery, entryIndex); - if (obj != nullptr) - { - result = static_cast(obj->GetLegacyData()); - } - return result; + return OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); } diff --git a/src/openrct2/world/SmallScenery.h b/src/openrct2/world/SmallScenery.h index 938f53d8d2..9c4c621bb3 100644 --- a/src/openrct2/world/SmallScenery.h +++ b/src/openrct2/world/SmallScenery.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -9,50 +9,7 @@ #pragma once -#include "../common.h" -#include "Map.h" -#include "Scenery.h" - -enum SMALL_SCENERY_FLAGS : uint32_t -{ - SMALL_SCENERY_FLAG_FULL_TILE = (1 << 0), // 0x1 - SMALL_SCENERY_FLAG_VOFFSET_CENTRE = (1 << 1), // 0x2 - SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE = (1 << 2), // 0x4 - SMALL_SCENERY_FLAG_ROTATABLE = (1 << 3), // 0x8; when set, user can set rotation, otherwise rotation is automatic - SMALL_SCENERY_FLAG_ANIMATED = (1 << 4), // 0x10 - SMALL_SCENERY_FLAG_CAN_WITHER = (1 << 5), // 0x20 - SMALL_SCENERY_FLAG_CAN_BE_WATERED = (1 << 6), // 0x40 - SMALL_SCENERY_FLAG_ANIMATED_FG = (1 << 7), // 0x80 - SMALL_SCENERY_FLAG_DIAGONAL = (1 << 8), // 0x100 - SMALL_SCENERY_FLAG_HAS_GLASS = (1 << 9), // 0x200 - SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR = (1 << 10), // 0x400 - SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1 = (1 << 11), // 0x800 - SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_4 = (1 << 12), // 0x1000 - SMALL_SCENERY_FLAG_IS_CLOCK = (1 << 13), // 0x2000 - SMALL_SCENERY_FLAG_SWAMP_GOO = (1 << 14), // 0x4000 - SMALL_SCENERY_FLAG_HAS_FRAME_OFFSETS = (1 << 15), // 0x8000 - SMALL_SCENERY_FLAG17 = (1 << 16), // 0x10000 - SMALL_SCENERY_FLAG_STACKABLE = (1 << 17), // 0x20000; means scenery item can be placed in the air and over water - SMALL_SCENERY_FLAG_NO_WALLS = (1 << 18), // 0x40000 - SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR = (1 << 19), // 0x80000 - SMALL_SCENERY_FLAG_NO_SUPPORTS = (1 << 20), // 0x100000 - SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED = (1 << 21), // 0x200000 - SMALL_SCENERY_FLAG_COG = (1 << 22), // 0x400000 - SMALL_SCENERY_FLAG_BUILD_DIRECTLY_ONTOP = (1 << 23), // 0x800000; means supports can be built on this object. Used for base - // blocks. - SMALL_SCENERY_FLAG_HALF_SPACE = (1 << 24), // 0x1000000 - SMALL_SCENERY_FLAG_THREE_QUARTERS = (1 << 25), // 0x2000000 - SMALL_SCENERY_FLAG_PAINT_SUPPORTS = (1 << 26), // 0x4000000; used for scenery items which are support structures - SMALL_SCENERY_FLAG27 = (1 << 27), // 0x8000000 - - // Added by OpenRCT2: - SMALL_SCENERY_FLAG_IS_TREE = (1 << 28), - SMALL_SCENERY_FLAG_HAS_TERTIARY_COLOUR = (1 << 29), -}; - enum { MAP_ELEM_SMALL_SCENERY_COLOUR_FLAG_NEEDS_SUPPORTS = (1 << 5), }; - -SmallSceneryEntry* GetSmallSceneryEntry(ObjectEntryIndex entryIndex); diff --git a/src/openrct2/world/Surface.cpp b/src/openrct2/world/Surface.cpp index 90fd261bfb..127adba5e0 100644 --- a/src/openrct2/world/Surface.cpp +++ b/src/openrct2/world/Surface.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -160,7 +160,7 @@ void SurfaceElement::UpdateGrassLength(const CoordsXY& coords) if (GrassLength & 8) { // Random growth rate (length nibble) - GrassLength |= scenario_rand() & 0x70; + GrassLength |= ScenarioRand() & 0x70; } else { @@ -224,12 +224,12 @@ void SurfaceElement::SetSlope(uint8_t newSlope) bool SurfaceElement::HasTrackThatNeedsWater() const { - return (type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0; + return (Type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0; } void SurfaceElement::SetHasTrackThatNeedsWater(bool on) { - type &= ~SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER; + Type &= ~SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER; if (on) - type |= SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER; + Type |= SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER; } diff --git a/src/openrct2/world/Surface.h b/src/openrct2/world/Surface.h index ead1fb00de..67bc0e92c0 100644 --- a/src/openrct2/world/Surface.h +++ b/src/openrct2/world/Surface.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/TileElement.cpp b/src/openrct2/world/TileElement.cpp index b18f61748b..71754e6f33 100644 --- a/src/openrct2/world/TileElement.cpp +++ b/src/openrct2/world/TileElement.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,9 +12,10 @@ #include "../core/Guard.hpp" #include "../interface/Window.h" #include "../localisation/Localisation.h" +#include "../object/LargeSceneryEntry.h" +#include "../object/WallSceneryEntry.h" #include "../ride/Track.h" #include "Banner.h" -#include "LargeScenery.h" #include "Location.hpp" #include "Scenery.h" @@ -70,7 +71,7 @@ void TileElement::SetBannerIndex(BannerIndex bannerIndex) AsBanner()->SetIndex(bannerIndex); break; default: - log_error("Tried to set banner index on unsuitable tile element!"); + LOG_ERROR("Tried to set banner index on unsuitable tile element!"); Guard::Assert(false); } } @@ -81,7 +82,7 @@ void TileElement::RemoveBannerEntry() auto banner = GetBanner(bannerIndex); if (banner != nullptr) { - window_close_by_number(WindowClass::Banner, bannerIndex.ToUnderlying()); + WindowCloseByNumber(WindowClass::Banner, bannerIndex.ToUnderlying()); DeleteBanner(banner->id); } } @@ -103,14 +104,14 @@ RideId TileElement::GetRideIndex() const void TileElement::ClearAs(TileElementType newType) { - type = 0; + Type = 0; SetType(newType); Flags = 0; - base_height = MINIMUM_LAND_HEIGHT; - clearance_height = MINIMUM_LAND_HEIGHT; - owner = 0; - std::fill_n(pad_05, sizeof(pad_05), 0x00); - std::fill_n(pad_08, sizeof(pad_08), 0x00); + BaseHeight = MINIMUM_LAND_HEIGHT; + ClearanceHeight = MINIMUM_LAND_HEIGHT; + Owner = 0; + std::fill_n(Pad05, sizeof(Pad05), 0x00); + std::fill_n(Pad08, sizeof(Pad08), 0x00); } // Rotate both of the values amount @@ -151,7 +152,7 @@ const QuarterTile QuarterTile::Rotate(uint8_t amount) const return QuarterTile{ static_cast(rotVal1 | rotVal2) }; } default: - log_error("Tried to rotate QuarterTile invalid amount."); + LOG_ERROR("Tried to rotate QuarterTile invalid amount."); return QuarterTile{ 0 }; } } diff --git a/src/openrct2/world/TileElement.h b/src/openrct2/world/TileElement.h index b4e73e66ef..f0524b04b7 100644 --- a/src/openrct2/world/TileElement.h +++ b/src/openrct2/world/TileElement.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -24,7 +24,7 @@ struct SmallSceneryEntry; struct WallSceneryEntry; struct PathBitEntry; struct BannerSceneryEntry; -struct rct_footpath_entry; +struct FootpathEntry; class LargeSceneryObject; class TerrainSurfaceObject; class TerrainEdgeObject; @@ -50,11 +50,11 @@ struct BannerElement; struct TileElementBase { - uint8_t type; // 0 - uint8_t Flags; // 1. Upper nibble: flags. Lower nibble: occupied quadrants (one bit per quadrant). - uint8_t base_height; // 2 - uint8_t clearance_height; // 3 - uint8_t owner; // 4 + uint8_t Type; // 0 + uint8_t Flags; // 1. Upper nibble: flags. Lower nibble: occupied quadrants (one bit per quadrant). + uint8_t BaseHeight; // 2 + uint8_t ClearanceHeight; // 3 + uint8_t Owner; // 4 void Remove(); @@ -172,8 +172,8 @@ struct TileElementBase */ struct TileElement : public TileElementBase { - uint8_t pad_05[3]; - uint8_t pad_08[8]; + uint8_t Pad05[3]; + uint8_t Pad08[8]; void ClearAs(TileElementType newType); @@ -198,7 +198,7 @@ private: uint8_t EdgeStyle; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" - uint8_t pad_0B[5]; + uint8_t Pad0B[5]; #pragma clang diagnostic pop public: @@ -273,6 +273,9 @@ public: bool IsSloped() const; void SetSloped(bool isSloped); + bool HasJunctionRailings() const; + void SetJunctionRailings(bool hasJunctionRailings); + Direction GetSlopeDirection() const; void SetSlopeDirection(Direction newSlope); @@ -306,7 +309,7 @@ public: bool HasAddition() const; uint8_t GetAddition() const; ObjectEntryIndex GetAdditionEntryIndex() const; - PathBitEntry* GetAdditionEntry() const; + const PathBitEntry* GetAdditionEntry() const; void SetAddition(uint8_t newAddition); bool AdditionIsGhost() const; @@ -382,8 +385,8 @@ public: bool IsInverted() const; void SetInverted(bool inverted); - bool BlockBrakeClosed() const; - void SetBlockBrakeClosed(bool isClosed); + bool IsBrakeClosed() const; + void SetBrakeClosed(bool isClosed); bool IsIndestructible() const; void SetIsIndestructible(bool isIndestructible); @@ -433,13 +436,13 @@ private: uint8_t Colour[3]; // 8 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" - uint8_t pad_0B[5]; + uint8_t Pad0B[5]; #pragma clang diagnostic pop public: ObjectEntryIndex GetEntryIndex() const; void SetEntryIndex(ObjectEntryIndex newIndex); - SmallSceneryEntry* GetEntry() const; + const SmallSceneryEntry* GetEntry() const; uint8_t GetAge() const; void SetAge(uint8_t newAge); void IncreaseAge(const CoordsXY& sceneryPos); @@ -475,7 +478,7 @@ private: public: ObjectEntryIndex GetEntryIndex() const; void SetEntryIndex(ObjectEntryIndex newIndex); - LargeSceneryEntry* GetEntry() const; + const LargeSceneryEntry* GetEntry() const; const LargeSceneryObject* GetObject() const; uint8_t GetSequenceIndex() const; @@ -510,13 +513,13 @@ private: uint8_t animation; // 0C 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" - uint8_t pad_0D[3]; + uint8_t Pad0D[3]; #pragma clang diagnostic pop public: uint16_t GetEntryIndex() const; void SetEntryIndex(uint16_t newIndex); - WallSceneryEntry* GetEntry() const; + const WallSceneryEntry* GetEntry() const; uint8_t GetSlope() const; void SetSlope(uint8_t newslope); @@ -555,7 +558,7 @@ private: uint8_t flags2; // C #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" - uint8_t pad_0D[3]; + uint8_t Pad0D[3]; #pragma clang diagnostic pop public: @@ -597,11 +600,11 @@ private: uint8_t AllowedEdges; // 8 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" - uint8_t pad_09[7]; + uint8_t Pad09[7]; #pragma clang diagnostic pop public: Banner* GetBanner() const; - BannerSceneryEntry* GetEntry() const; + const BannerSceneryEntry* GetEntry() const; BannerIndex GetIndex() const; void SetIndex(BannerIndex newIndex); diff --git a/src/openrct2/world/TileElementBase.cpp b/src/openrct2/world/TileElementBase.cpp index d5ea3f84ed..ee17eb3ef9 100644 --- a/src/openrct2/world/TileElementBase.cpp +++ b/src/openrct2/world/TileElementBase.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -12,29 +12,29 @@ TileElementType TileElementBase::GetType() const { - return static_cast((this->type & TILE_ELEMENT_TYPE_MASK) >> 2); + return static_cast((this->Type & TILE_ELEMENT_TYPE_MASK) >> 2); } void TileElementBase::SetType(TileElementType newType) { - this->type &= ~TILE_ELEMENT_TYPE_MASK; - this->type |= ((EnumValue(newType) << 2) & TILE_ELEMENT_TYPE_MASK); + this->Type &= ~TILE_ELEMENT_TYPE_MASK; + this->Type |= ((EnumValue(newType) << 2) & TILE_ELEMENT_TYPE_MASK); } Direction TileElementBase::GetDirection() const { - return this->type & TILE_ELEMENT_DIRECTION_MASK; + return this->Type & TILE_ELEMENT_DIRECTION_MASK; } void TileElementBase::SetDirection(Direction direction) { - this->type &= ~TILE_ELEMENT_DIRECTION_MASK; - this->type |= (direction & TILE_ELEMENT_DIRECTION_MASK); + this->Type &= ~TILE_ELEMENT_DIRECTION_MASK; + this->Type |= (direction & TILE_ELEMENT_DIRECTION_MASK); } Direction TileElementBase::GetDirectionWithOffset(uint8_t offset) const { - return ((this->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK; + return ((this->Type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK; } bool TileElementBase::IsLastForTile() const @@ -98,31 +98,31 @@ void TileElementBase::SetOccupiedQuadrants(uint8_t quadrants) int32_t TileElementBase::GetBaseZ() const { - return base_height * COORDS_Z_STEP; + return BaseHeight * COORDS_Z_STEP; } void TileElementBase::SetBaseZ(int32_t newZ) { - base_height = (newZ / COORDS_Z_STEP); + BaseHeight = (newZ / COORDS_Z_STEP); } int32_t TileElementBase::GetClearanceZ() const { - return clearance_height * COORDS_Z_STEP; + return ClearanceHeight * COORDS_Z_STEP; } void TileElementBase::SetClearanceZ(int32_t newZ) { - clearance_height = (newZ / COORDS_Z_STEP); + ClearanceHeight = (newZ / COORDS_Z_STEP); } uint8_t TileElementBase::GetOwner() const { - return owner & OWNER_MASK; + return Owner & OWNER_MASK; } void TileElementBase::SetOwner(uint8_t newOwner) { - owner &= ~OWNER_MASK; - owner |= (newOwner & OWNER_MASK); + Owner &= ~OWNER_MASK; + Owner |= (newOwner & OWNER_MASK); } diff --git a/src/openrct2/world/TileElementsView.h b/src/openrct2/world/TileElementsView.h index 7fa0c49f74..4347e686a1 100644 --- a/src/openrct2/world/TileElementsView.h +++ b/src/openrct2/world/TileElementsView.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index 7184a78308..bfff423660 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -17,14 +17,14 @@ #include "../interface/Window.h" #include "../interface/Window_internal.h" #include "../localisation/Localisation.h" +#include "../object/LargeSceneryEntry.h" #include "../ride/Station.h" #include "../ride/Track.h" #include "../ride/TrackData.h" #include "../windows/Intent.h" -#include "../windows/tile_inspector.h" +#include "../windows/TileInspectorGlobals.h" #include "Banner.h" #include "Footpath.h" -#include "LargeScenery.h" #include "Location.hpp" #include "Map.h" #include "Park.h" @@ -48,17 +48,17 @@ namespace OpenRCT2::TileInspector if (firstElement == nullptr) { - log_error("First element is out of range for the tile"); + LOG_ERROR("First element is out of range for the tile"); return false; } if (secondElement == nullptr) { - log_error("Second element is out of range for the tile"); + LOG_ERROR("Second element is out of range for the tile"); return false; } if (firstElement == secondElement) { - log_error("Can't swap the element with itself"); + LOG_ERROR("Can't swap the element with itself"); return false; } @@ -75,10 +75,10 @@ namespace OpenRCT2::TileInspector return true; } - static rct_window* GetTileInspectorWithPos(const CoordsXY& loc) + static WindowBase* GetTileInspectorWithPos(const CoordsXY& loc) { // Return the tile inspector window for everyone who has the tile selected - auto* window = window_find_by_class(WindowClass::TileInspector); + auto* window = WindowFindByClass(WindowClass::TileInspector); if (window != nullptr && loc == windowTileInspectorTile.ToCoordsXY()) { return window; @@ -241,7 +241,7 @@ namespace OpenRCT2::TileInspector tileElement->SetDirection(newRotation); // Update ride's known entrance/exit rotation - auto ride = get_ride(tileElement->AsEntrance()->GetRideIndex()); + auto ride = GetRide(tileElement->AsEntrance()->GetRideIndex()); if (ride != nullptr) { auto stationIndex = tileElement->AsEntrance()->GetStationIndex(); @@ -249,7 +249,7 @@ namespace OpenRCT2::TileInspector auto entrance = station.Entrance; auto exit = station.Exit; uint8_t entranceType = tileElement->AsEntrance()->GetEntranceType(); - uint8_t z = tileElement->base_height; + uint8_t z = tileElement->BaseHeight; // Make sure this is the correct entrance or exit if (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE && entrance.x == loc.x / COORDS_XY_STEP @@ -313,7 +313,7 @@ namespace OpenRCT2::TileInspector MapInvalidateTileFull(loc); if (loc == windowTileInspectorTile.ToCoordsXY()) { - window_invalidate_by_class(WindowClass::TileInspector); + WindowInvalidateByClass(WindowClass::TileInspector); } return GameActions::Result(); @@ -339,7 +339,7 @@ namespace OpenRCT2::TileInspector auto newBanner = CreateBanner(); if (newBanner == nullptr) { - log_error("No free banners available"); + LOG_ERROR("No free banners available"); return GameActions::Result(GameActions::Status::Unknown, STR_TOO_MANY_BANNERS_IN_GAME, STR_NONE); } // Copy the banners style @@ -405,9 +405,9 @@ namespace OpenRCT2::TileInspector // While current element's base height is lower, or (when their baseheight is the same) the other map element's // clearance height is lower... while (currentId > 0 - && (otherElement->base_height > currentElement->base_height - || (otherElement->base_height == currentElement->base_height - && otherElement->clearance_height > currentElement->clearance_height))) + && (otherElement->BaseHeight > currentElement->BaseHeight + || (otherElement->BaseHeight == currentElement->BaseHeight + && otherElement->ClearanceHeight > currentElement->ClearanceHeight))) { if (!SwapTileElements(loc, currentId - 1, currentId)) { @@ -439,8 +439,8 @@ namespace OpenRCT2::TileInspector static GameActions::Result ValidateTileHeight(TileElement* const tileElement, int8_t heightOffset) { - int16_t newBaseHeight = static_cast(tileElement->base_height + heightOffset); - int16_t newClearanceHeight = static_cast(tileElement->clearance_height + heightOffset); + int16_t newBaseHeight = static_cast(tileElement->BaseHeight + heightOffset); + int16_t newClearanceHeight = static_cast(tileElement->ClearanceHeight + heightOffset); if (newBaseHeight < 0) { return GameActions::Result(GameActions::Status::TooLow, STR_CANT_LOWER_ELEMENT_HERE, STR_TOO_LOW); @@ -478,14 +478,14 @@ namespace OpenRCT2::TileInspector if (entranceType != ENTRANCE_TYPE_PARK_ENTRANCE) { // Update the ride's known entrance or exit height - auto ride = get_ride(tileElement->AsEntrance()->GetRideIndex()); + auto ride = GetRide(tileElement->AsEntrance()->GetRideIndex()); if (ride != nullptr) { auto entranceIndex = tileElement->AsEntrance()->GetStationIndex(); auto& station = ride->GetStation(entranceIndex); const auto& entranceLoc = station.Entrance; const auto& exitLoc = station.Exit; - uint8_t z = tileElement->base_height; + uint8_t z = tileElement->BaseHeight; // Make sure this is the correct entrance or exit if (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE && entranceLoc == TileCoordsXYZ{ loc, z }) @@ -496,8 +496,8 @@ namespace OpenRCT2::TileInspector } } - tileElement->base_height += heightOffset; - tileElement->clearance_height += heightOffset; + tileElement->BaseHeight += heightOffset; + tileElement->ClearanceHeight += heightOffset; MapInvalidateTileFull(loc); @@ -572,8 +572,8 @@ namespace OpenRCT2::TileInspector } } - surfaceElement->base_height += 2; - surfaceElement->clearance_height = surfaceElement->base_height; + surfaceElement->BaseHeight += 2; + surfaceElement->ClearanceHeight = surfaceElement->BaseHeight; } surfaceElement->SetSlope(newSlope); @@ -634,6 +634,28 @@ namespace OpenRCT2::TileInspector return GameActions::Result(); } + GameActions::Result PathSetJunctionRailings( + const CoordsXY& loc, int32_t elementIndex, bool hasJunctionRailings, bool isExecuting) + { + TileElement* const pathElement = MapGetNthElementAt(loc, elementIndex); + if (pathElement == nullptr || pathElement->GetType() != TileElementType::Path) + return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); + + if (isExecuting) + { + pathElement->AsPath()->SetJunctionRailings(hasJunctionRailings); + + MapInvalidateTileFull(loc); + + if (auto* inspector = GetTileInspectorWithPos(loc); inspector != nullptr) + { + inspector->Invalidate(); + } + } + + return GameActions::Result(); + } + GameActions::Result PathSetBroken(const CoordsXY& loc, int32_t elementIndex, bool broken, bool isExecuting) { TileElement* const pathElement = MapGetNthElementAt(loc, elementIndex); @@ -683,7 +705,7 @@ namespace OpenRCT2::TileInspector if (entranceElement == nullptr || entranceElement->GetType() != TileElementType::Entrance) return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); - auto ride = get_ride(entranceElement->AsEntrance()->GetRideIndex()); + auto ride = GetRide(entranceElement->AsEntrance()->GetRideIndex()); if (ride == nullptr) return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); @@ -695,10 +717,10 @@ namespace OpenRCT2::TileInspector switch (entranceElement->AsEntrance()->GetEntranceType()) { case ENTRANCE_TYPE_RIDE_ENTRANCE: - station.Entrance = { loc, entranceElement->base_height, entranceElement->GetDirection() }; + station.Entrance = { loc, entranceElement->BaseHeight, entranceElement->GetDirection() }; break; case ENTRANCE_TYPE_RIDE_EXIT: - station.Exit = { loc, entranceElement->base_height, entranceElement->GetDirection() }; + station.Exit = { loc, entranceElement->BaseHeight, entranceElement->GetDirection() }; break; } @@ -775,7 +797,7 @@ namespace OpenRCT2::TileInspector int16_t originZ = trackElement->GetBaseZ(); uint8_t rotation = trackElement->GetDirection(); auto rideIndex = trackElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); @@ -804,7 +826,7 @@ namespace OpenRCT2::TileInspector TrackElement* tileElement = MapGetTrackElementAtOfTypeSeq(elem, type, trackBlock->index); if (tileElement == nullptr) { - log_error("Track map element part not found!"); + LOG_ERROR("Track map element part not found!"); return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); } @@ -817,8 +839,8 @@ namespace OpenRCT2::TileInspector // Keep? // invalidate_test_results(ride); - tileElement->base_height += offset; - tileElement->clearance_height += offset; + tileElement->BaseHeight += offset; + tileElement->ClearanceHeight += offset; } if (auto* inspector = GetTileInspectorWithPos(loc); inspector != nullptr) @@ -859,7 +881,7 @@ namespace OpenRCT2::TileInspector int16_t originZ = trackElement->GetBaseZ(); uint8_t rotation = trackElement->GetDirection(); auto rideIndex = trackElement->AsTrack()->GetRideIndex(); - auto ride = get_ride(rideIndex); + auto ride = GetRide(rideIndex); if (ride == nullptr) return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); @@ -888,7 +910,7 @@ namespace OpenRCT2::TileInspector TrackElement* tileElement = MapGetTrackElementAtOfTypeSeq(elem, type, trackBlock->index); if (tileElement == nullptr) { - log_error("Track map element part not found!"); + LOG_ERROR("Track map element part not found!"); return GameActions::Result(GameActions::Status::Unknown, STR_NONE, STR_NONE); } @@ -916,7 +938,7 @@ namespace OpenRCT2::TileInspector return GameActions::Result(); } - GameActions::Result TrackSetBlockBrake(const CoordsXY& loc, int32_t elementIndex, bool blockBrake, bool isExecuting) + GameActions::Result TrackSetBrakeClosed(const CoordsXY& loc, int32_t elementIndex, bool isClosed, bool isExecuting) { TileElement* const trackElement = MapGetNthElementAt(loc, elementIndex); if (trackElement == nullptr || trackElement->GetType() != TileElementType::Track) @@ -924,7 +946,7 @@ namespace OpenRCT2::TileInspector if (isExecuting) { - trackElement->AsTrack()->SetBlockBrakeClosed(blockBrake); + trackElement->AsTrack()->SetBrakeClosed(isClosed); MapInvalidateTileFull(loc); diff --git a/src/openrct2/world/TileInspector.h b/src/openrct2/world/TileInspector.h index 5a0d0cba34..5e9d210616 100644 --- a/src/openrct2/world/TileInspector.h +++ b/src/openrct2/world/TileInspector.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,6 +34,8 @@ namespace OpenRCT2::TileInspector GameActions::Result SurfaceToggleCorner(const CoordsXY& loc, int32_t cornerIndex, bool isExecuting); GameActions::Result SurfaceToggleDiagonal(const CoordsXY& loc, bool isExecuting); GameActions::Result PathSetSloped(const CoordsXY& loc, int32_t elementIndex, bool sloped, bool isExecuting); + GameActions::Result PathSetJunctionRailings( + const CoordsXY& loc, int32_t elementIndex, bool hasJunctionRailings, bool isExecuting); GameActions::Result PathSetBroken(const CoordsXY& loc, int32_t elementIndex, bool broken, bool isExecuting); GameActions::Result PathToggleEdge(const CoordsXY& loc, int32_t elementIndex, int32_t cornerIndex, bool isExecuting); GameActions::Result EntranceMakeUsable(const CoordsXY& loc, int32_t elementIndex, bool isExecuting); @@ -41,7 +43,7 @@ namespace OpenRCT2::TileInspector GameActions::Result WallAnimationFrameOffset( const CoordsXY& loc, int16_t elementIndex, int8_t animationFrameOffset, bool isExecuting); GameActions::Result TrackBaseHeightOffset(const CoordsXY& loc, int32_t elementIndex, int8_t offset, bool isExecuting); - GameActions::Result TrackSetBlockBrake(const CoordsXY& loc, int32_t elementIndex, bool blockBrake, bool isExecuting); + GameActions::Result TrackSetBrakeClosed(const CoordsXY& loc, int32_t elementIndex, bool isClosed, bool isExecuting); GameActions::Result TrackSetIndestructible( const CoordsXY& loc, int32_t elementIndex, bool isIndestructible, bool isExecuting); GameActions::Result TrackSetChain( diff --git a/src/openrct2/world/TilePointerIndex.hpp b/src/openrct2/world/TilePointerIndex.hpp index dbd1d235cf..03f186a4e4 100644 --- a/src/openrct2/world/TilePointerIndex.hpp +++ b/src/openrct2/world/TilePointerIndex.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/Wall.cpp b/src/openrct2/world/Wall.cpp index 6ed5ef83d3..42b9f70fb3 100644 --- a/src/openrct2/world/Wall.cpp +++ b/src/openrct2/world/Wall.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,15 +16,15 @@ #include "../localisation/StringIds.h" #include "../management/Finance.h" #include "../network/network.h" +#include "../object/ObjectEntryManager.h" +#include "../object/WallSceneryEntry.h" #include "../ride/Track.h" #include "../ride/TrackData.h" #include "Banner.h" -#include "LargeScenery.h" #include "Map.h" #include "MapAnimation.h" #include "Park.h" #include "Scenery.h" -#include "SmallScenery.h" #include "Surface.h" #include "Wall.h" @@ -82,13 +82,13 @@ void WallRemoveIntersectingWalls(const CoordsXYRangedZ& wallPos, Direction direc uint8_t WallElement::GetSlope() const { - return (type & TILE_ELEMENT_QUADRANT_MASK) >> 6; + return (Type & TILE_ELEMENT_QUADRANT_MASK) >> 6; } void WallElement::SetSlope(uint8_t newSlope) { - type &= ~TILE_ELEMENT_QUADRANT_MASK; - type |= (newSlope << 6); + Type &= ~TILE_ELEMENT_QUADRANT_MASK; + Type |= (newSlope << 6); } colour_t WallElement::GetPrimaryColour() const @@ -137,9 +137,9 @@ uint16_t WallElement::GetEntryIndex() const return entryIndex; } -WallSceneryEntry* WallElement::GetEntry() const +const WallSceneryEntry* WallElement::GetEntry() const { - return GetWallEntry(entryIndex); + return OpenRCT2::ObjectManager::GetObjectEntry(entryIndex); } void WallElement::SetEntryIndex(uint16_t newIndex) diff --git a/src/openrct2/world/Wall.h b/src/openrct2/world/Wall.h index 2cd82dd28c..be893f3517 100644 --- a/src/openrct2/world/Wall.h +++ b/src/openrct2/world/Wall.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/src/openrct2/world/tile_element/TileElementType.h b/src/openrct2/world/tile_element/TileElementType.h index 14464c7d4e..6e5b27cd6a 100644 --- a/src/openrct2/world/tile_element/TileElementType.h +++ b/src/openrct2/world/tile_element/TileElementType.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/AssertHelpers.hpp b/test/tests/AssertHelpers.hpp index 1919b7a36e..e2ebf4d2d5 100644 --- a/test/tests/AssertHelpers.hpp +++ b/test/tests/AssertHelpers.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/BitSetTests.cpp b/test/tests/BitSetTests.cpp index 2610bc2027..d195b0e95f 100644 --- a/test/tests/BitSetTests.cpp +++ b/test/tests/BitSetTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/CLITests.cpp b/test/tests/CLITests.cpp index fe075b9431..4081718466 100644 --- a/test/tests/CLITests.cpp +++ b/test/tests/CLITests.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include class CommandLineTests : public testing::Test @@ -54,43 +54,43 @@ public: } }; -TEST_F(CommandLineTests, cmdline_cmdline_for_sprite_details) +TEST_F(CommandLineTests, command_line_for_sprite_details) { std::string exampleFilePath = ExampleSpriteFilePath(); const char* detailsCmd[3] = { "details", exampleFilePath.c_str() }; - int32_t result = cmdline_for_sprite(detailsCmd, 2); + int32_t result = CommandLineForSprite(detailsCmd, 2); // need to come up with some way to extract stdout/stderr stream if we want to // fully test this module ASSERT_EQ(result, 1); } -TEST_F(CommandLineTests, cmdline_cmdline_for_sprite_build) +TEST_F(CommandLineTests, command_line_for_sprite_build) { std::string manifestFilePath = ManifestFilePath(); std::string outputfilePath = BuildOutputfilePath(); const char* detailsCmd[3] = { "build", outputfilePath.c_str(), manifestFilePath.c_str() }; - int32_t result = cmdline_for_sprite(detailsCmd, 3); + int32_t result = CommandLineForSprite(detailsCmd, 3); ASSERT_EQ(result, 1); // compare the resulting output file and assert its identical to expected ASSERT_TRUE(CompareSpriteFiles(ExampleSpriteFilePath(), outputfilePath)); } -TEST_F(CommandLineTests, cmdline_cmdline_for_sprite_failed_build) +TEST_F(CommandLineTests, command_line_for_sprite_failed_build) { // run on correct manifest file std::string manifestFilePath = ManifestFilePath(); std::string outputfilePath = BuildOutputfilePath(); const char* detailsCmd[3] = { "build", outputfilePath.c_str(), manifestFilePath.c_str() }; - int32_t result = cmdline_for_sprite(detailsCmd, 3); + int32_t result = CommandLineForSprite(detailsCmd, 3); ASSERT_EQ(result, 1); ASSERT_TRUE(CompareSpriteFiles(ExampleSpriteFilePath(), outputfilePath)); // now use bad manifest and make sure output file is not edited std::string badManifestFilePath = BadManifestFilePath(); detailsCmd[2] = badManifestFilePath.c_str(); - result = cmdline_for_sprite(detailsCmd, 3); + result = CommandLineForSprite(detailsCmd, 3); // check the command failed ASSERT_EQ(result, -1); // validate the target file was unchanged diff --git a/test/tests/CMakeLists.txt b/test/tests/CMakeLists.txt index b4beeae52f..16a48c0363 100644 --- a/test/tests/CMakeLists.txt +++ b/test/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.9) find_package(GTest REQUIRED) @@ -43,7 +43,7 @@ endif () # sawyercoding test set(SAWYERCODING_TEST_SOURCES - "${CMAKE_CURRENT_LIST_DIR}/sawyercoding_test.cpp" + "${CMAKE_CURRENT_LIST_DIR}/SawyerCodingTest.cpp" ) add_executable(test_sawyercoding ${SAWYERCODING_TEST_SOURCES}) target_link_libraries(test_sawyercoding ${GTEST_LIBRARIES} libopenrct2 ${LDL} z) diff --git a/test/tests/CircularBuffer.cpp b/test/tests/CircularBuffer.cpp index a0ee46d019..ea3423b9da 100644 --- a/test/tests/CircularBuffer.cpp +++ b/test/tests/CircularBuffer.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/CryptTests.cpp b/test/tests/CryptTests.cpp index c43a5a66ad..a156d8fce8 100644 --- a/test/tests/CryptTests.cpp +++ b/test/tests/CryptTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/EnumMapTest.cpp b/test/tests/EnumMapTest.cpp index d3df104127..d1a3b68302 100644 --- a/test/tests/EnumMapTest.cpp +++ b/test/tests/EnumMapTest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/FormattingTests.cpp b/test/tests/FormattingTests.cpp index 3af0c7fce2..3a66558afa 100644 --- a/test/tests/FormattingTests.cpp +++ b/test/tests/FormattingTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -78,7 +78,7 @@ protected: _context = CreateContext(); ASSERT_TRUE(_context->Initialise()); - language_open(LANGUAGE_ENGLISH_UK); + LanguageOpen(LANGUAGE_ENGLISH_UK); } static void TearDownTestCase() @@ -317,7 +317,7 @@ TEST_F(FormattingTests, to_fixed_buffer) { char buffer[16]; std::memset(buffer, '\xFF', sizeof(buffer)); - auto len = FormatStringId(buffer, 8, STR_GUEST_X, 123); + auto len = FormatStringID(buffer, 8, STR_GUEST_X, 123); ASSERT_EQ(len, 9u); ASSERT_STREQ("Guest 1", buffer); diff --git a/test/tests/ImageImporterTests.cpp b/test/tests/ImageImporterTests.cpp index 2053ecb012..54b7eb7835 100644 --- a/test/tests/ImageImporterTests.cpp +++ b/test/tests/ImageImporterTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/IniReaderTest.cpp b/test/tests/IniReaderTest.cpp index bc351f68e8..633370ebea 100644 --- a/test/tests/IniReaderTest.cpp +++ b/test/tests/IniReaderTest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -35,7 +35,7 @@ TEST_F(IniReaderTest, create_empty) auto ir = CreateIniReader(&ms); ASSERT_NE(ir, nullptr); ASSERT_EQ(ir->GetBoolean("nobody", true), true); - ASSERT_EQ(ir->GetCString("expects", nullptr), nullptr); + ASSERT_EQ(ir->GetString("expects", ""), ""); ASSERT_EQ(ir->GetEnum("spanish", 12345, Enum_Currency), 12345); ASSERT_EQ(ir->GetFloat("inquisition", 1.234f), 1.234f); ASSERT_EQ(ir->GetInt32("universal_answer", 42), 42); @@ -64,9 +64,8 @@ TEST_F(IniReaderTest, read_prepared) // values from different sections ASSERT_EQ(ir->GetInt32("one", 42), 42); ASSERT_EQ(ir->GetBoolean("boolval", false), true); - const utf8* str = ir->GetCString("path", nullptr); - ASSERT_STREQ(str, u8"C:'\\some/dir\\here/神鷹暢遊"); - Memory::Free(str); + const auto& str = ir->GetString("path", ""); + ASSERT_STREQ(str.c_str(), u8"C:'\\some/dir\\here/神鷹暢遊"); // go back a section ASSERT_EQ(ir->ReadSection("int"), true); ASSERT_EQ(ir->GetInt32("one", 42), 1); @@ -107,9 +106,8 @@ TEST_F(IniReaderTest, read_untrimmed) // there should only be data from the last section ASSERT_EQ(ir->ReadSection("section"), true); ASSERT_EQ(ir->GetBoolean("one", false), true); - const utf8* str = ir->GetCString("str", nullptr); - ASSERT_STREQ(str, " xxx "); - Memory::Free(str); + const auto& str = ir->GetString("str", ""); + ASSERT_STREQ(str.c_str(), " xxx "); ASSERT_EQ(ir->GetString("str", "yyy"), " xxx "); ASSERT_EQ(ir->GetString("nosuchthing", " yyy "), " yyy "); } diff --git a/test/tests/IniWriterTest.cpp b/test/tests/IniWriterTest.cpp index eb71202f74..8d924b627f 100644 --- a/test/tests/IniWriterTest.cpp +++ b/test/tests/IniWriterTest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/LanguagePackTest.cpp b/test/tests/LanguagePackTest.cpp index 0a05a14047..5cc668eafd 100644 --- a/test/tests/LanguagePackTest.cpp +++ b/test/tests/LanguagePackTest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/Localisation.cpp b/test/tests/Localisation.cpp index b079005f5d..3bb4f8ff85 100644 --- a/test/tests/Localisation.cpp +++ b/test/tests/Localisation.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -18,14 +18,14 @@ class Localisation : public testing::Test }; /////////////////////////////////////////////////////////////////////////////// -// Tests for rct2_to_utf8 +// Tests for RCT2StringToUTF8 /////////////////////////////////////////////////////////////////////////////// TEST_F(Localisation, RCT2_to_UTF8_UK) { auto input = "The quick brown fox"; auto expected = u8"The quick brown fox"; - auto actual = rct2_to_utf8(input, RCT2LanguageId::EnglishUK); + auto actual = RCT2StringToUTF8(input, RCT2LanguageId::EnglishUK); ASSERT_EQ(expected, actual); } @@ -33,7 +33,7 @@ TEST_F(Localisation, RCT2_to_UTF8_JP) { auto input = StringFromHex("ff8374ff8340ff8358ff8367ff8375ff8389ff8345ff8393ff8374ff8348ff8362ff834eff8358"); auto expected = u8"ファストブラウンフォックス"; - auto actual = rct2_to_utf8(input, RCT2LanguageId::Japanese); + auto actual = RCT2StringToUTF8(input, RCT2LanguageId::Japanese); ASSERT_EQ(expected, actual); } @@ -41,7 +41,7 @@ TEST_F(Localisation, RCT2_to_UTF8_ZH_TW) { auto input = StringFromHex("ffa7d6ffb374ffaabaffb4c4ffa6e2ffaab0ffaf57"); auto expected = u8"快速的棕色狐狸"; - auto actual = rct2_to_utf8(input, RCT2LanguageId::ChineseTraditional); + auto actual = RCT2StringToUTF8(input, RCT2LanguageId::ChineseTraditional); ASSERT_EQ(expected, actual); } @@ -49,7 +49,7 @@ TEST_F(Localisation, RCT2_to_UTF8_PL) { auto input = StringFromHex("47F372736b6120446ff76b692054e6637a6f7779"); auto expected = u8"Górska Dołki Tęczowy"; - auto actual = rct2_to_utf8(input, RCT2LanguageId::EnglishUK); + auto actual = RCT2StringToUTF8(input, RCT2LanguageId::EnglishUK); ASSERT_EQ(expected, actual); } @@ -58,6 +58,6 @@ TEST_F(Localisation, RCT2_to_UTF8_ZH_TW_PREMATURE_END) // This string can be found in BATFL.DAT, the last double byte character is missing its second byte. auto input = StringFromHex("ffa470ffabacffa8aeffbdf8ffa662ffc54bffb944ffa457ffaeb6ffb0caffb76effc2"); auto expected = u8"小型車輛在鐵道上振動搖"; - auto actual = rct2_to_utf8(input, RCT2LanguageId::ChineseTraditional); + auto actual = RCT2StringToUTF8(input, RCT2LanguageId::ChineseTraditional); ASSERT_EQ(expected, actual); } diff --git a/test/tests/MultiLaunch.cpp b/test/tests/MultiLaunch.cpp index 2773733137..70bbab819b 100644 --- a/test/tests/MultiLaunch.cpp +++ b/test/tests/MultiLaunch.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -42,10 +42,10 @@ TEST(MultiLaunchTest, all) ASSERT_TRUE(initialised); GetContext()->LoadParkFromFile(path); - game_load_init(); + GameLoadInit(); // Check ride count to check load was successful - ASSERT_EQ(ride_get_count(), 134); + ASSERT_EQ(RideGetCount(), 134); auto gs = context->GetGameState(); ASSERT_NE(gs, nullptr); auto& date = gs->GetDate(); @@ -59,7 +59,7 @@ TEST(MultiLaunchTest, all) ASSERT_EQ(date.GetMonthTicks(), 7862 + updatesToTest); // Check ride count again - ASSERT_EQ(ride_get_count(), 134); + ASSERT_EQ(RideGetCount(), 134); } SUCCEED(); } diff --git a/test/tests/Pathfinding.cpp b/test/tests/Pathfinding.cpp index 814589626f..32aa2c93f5 100644 --- a/test/tests/Pathfinding.cpp +++ b/test/tests/Pathfinding.cpp @@ -39,13 +39,13 @@ public: std::string parkPath = TestData::GetParkPath("pathfinding-tests.sv6"); GetContext()->LoadParkFromFile(parkPath); - game_load_init(); + GameLoadInit(); } void SetUp() override { // Use a consistent random seed in every test - scenario_rand_seed(0x12345678, 0x87654321); + ScenarioRandSeed(0x12345678, 0x87654321); } static void TearDownTestCase() @@ -122,7 +122,7 @@ protected: } // Clean up the peep, because we're reusing this loaded context for all tests. - peep_sprite_remove(peep); + PeepEntityRemove(peep); // Require that the number of steps taken is exactly what we expected. The pathfinder is supposed to be // deterministic, and we reset the RNG seed for each test, everything should be entirely repeatable; as diff --git a/test/tests/Platform.cpp b/test/tests/Platform.cpp index 1452e3eefe..890ee4e413 100644 --- a/test/tests/Platform.cpp +++ b/test/tests/Platform.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/PlayTests.cpp b/test/tests/PlayTests.cpp index 01db3b5295..43c147d540 100644 --- a/test/tests/PlayTests.cpp +++ b/test/tests/PlayTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -16,10 +16,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -54,12 +54,12 @@ static std::unique_ptr localStartGame(const std::string& parkPath) ResetEntitySpatialIndices(); - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); ScenerySetDefaultPlacementConfiguration(); - load_palette(); + LoadPalette(); EntityTweener::Get().Reset(); MapAnimationAutoCreate(); - fix_invalid_vehicle_sprite_sizes(); + FixInvalidVehicleSpriteSizes(); gGameSpeed = 1; @@ -99,7 +99,7 @@ TEST_F(PlayTests, SecondGuestInQueueShouldNotRideIfNoFunds) // Open park for free but charging for rides execute(ParkParameter::Open); - execute(0); + execute(0); gParkFlags |= PARK_FLAGS_UNLOCK_ALL_PRICES; // Find ferris wheel @@ -160,7 +160,7 @@ TEST_F(PlayTests, CarRideWithOneCarOnlyAcceptsTwoGuests) // Open park for free but charging for rides execute(ParkParameter::Open); - execute(0); + execute(0); gParkFlags |= PARK_FLAGS_UNLOCK_ALL_PRICES; // Find car ride diff --git a/test/tests/ReplayTests.cpp b/test/tests/ReplayTests.cpp index 8368d2d99b..72b7737205 100644 --- a/test/tests/ReplayTests.cpp +++ b/test/tests/ReplayTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/RideRatings.cpp b/test/tests/RideRatings.cpp index 3c18cb306f..a74fc7dce4 100644 --- a/test/tests/RideRatings.cpp +++ b/test/tests/RideRatings.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,7 +31,7 @@ protected: { for (const auto& ride : GetRideManager()) { - ride_ratings_update_ride(ride); + RideRatingsUpdateRide(ride); } } @@ -69,7 +69,7 @@ TEST_F(RideRatings, all) GetContext()->LoadParkFromFile(path); // Check ride count to check load was successful - ASSERT_EQ(ride_get_count(), 134); + ASSERT_EQ(RideGetCount(), 134); CalculateRatingsForAllRides(); diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index e5c07c89cc..58436b15fd 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -63,12 +63,12 @@ static void GameInit(bool retainSpatialIndices) if (!retainSpatialIndices) ResetEntitySpatialIndices(); - reset_all_sprite_quadrant_placements(); + ResetAllSpriteQuadrantPlacements(); ScenerySetDefaultPlacementConfiguration(); - load_palette(); + LoadPalette(); EntityTweener::Get().Reset(); MapAnimationAutoCreate(); - fix_invalid_vehicle_sprite_sizes(); + FixInvalidVehicleSpriteSizes(); gGameSpeed = 1; } @@ -122,7 +122,7 @@ static void RecordGameStateSnapshot(std::unique_ptr& context, MemorySt auto& snapshot = snapshots->CreateSnapshot(); snapshots->Capture(snapshot); - snapshots->LinkSnapshot(snapshot, gCurrentTicks, scenario_rand_state().s0); + snapshots->LinkSnapshot(snapshot, gCurrentTicks, ScenarioRandState().s0); DataSerialiser snapShotDs(true, snapshotStream); snapshots->SerialiseSnapshot(snapshot, snapShotDs); } @@ -140,7 +140,7 @@ static void CompareStates(MemoryStream& importBuffer, MemoryStream& exportBuffer { if (importBuffer.GetLength() != exportBuffer.GetLength()) { - log_warning( + LOG_WARNING( "Inconsistent export size! Import Size: %llu bytes, Export Size: %llu bytes", static_cast(importBuffer.GetLength()), static_cast(exportBuffer.GetLength())); @@ -162,22 +162,22 @@ static void CompareStates(MemoryStream& importBuffer, MemoryStream& exportBuffer try { - GameStateCompareData_t cmpData = snapshots->Compare(importSnapshot, exportSnapshot); + GameStateCompareData cmpData = snapshots->Compare(importSnapshot, exportSnapshot); // Find out if there are any differences between the two states auto res = std::find_if( cmpData.spriteChanges.begin(), cmpData.spriteChanges.end(), - [](const GameStateSpriteChange_t& diff) { return diff.changeType != GameStateSpriteChange_t::EQUAL; }); + [](const GameStateSpriteChange& diff) { return diff.changeType != GameStateSpriteChange::EQUAL; }); if (res != cmpData.spriteChanges.end()) { - log_warning("Snapshot data differences. %s", snapshots->GetCompareDataText(cmpData).c_str()); + LOG_WARNING("Snapshot data differences. %s", snapshots->GetCompareDataText(cmpData).c_str()); FAIL(); } } catch (const std::runtime_error& err) { - log_warning("Snapshot data failed to be read. Snapshot not compared. %s", err.what()); + LOG_WARNING("Snapshot data failed to be read. Snapshot not compared. %s", err.what()); FAIL(); } } diff --git a/test/tests/sawyercoding_test.cpp b/test/tests/SawyerCodingTest.cpp similarity index 97% rename from test/tests/sawyercoding_test.cpp rename to test/tests/SawyerCodingTest.cpp index fa6d1c22e6..83fd71cc18 100644 --- a/test/tests/sawyercoding_test.cpp +++ b/test/tests/SawyerCodingTest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -31,16 +31,16 @@ protected: static const uint8_t invalid7[6]; static const uint8_t empty[1]; - void test_encode_decode(uint8_t encoding_type) + void TestEncodeDecode(uint8_t encoding_type) { // Encode - sawyercoding_chunk_header chdr_in; + SawyerCodingChunkHeader chdr_in; chdr_in.encoding = encoding_type; chdr_in.length = sizeof(randomdata); uint8_t* encodedDataBuffer = new uint8_t[BUFFER_SIZE]; - size_t encodedDataSize = sawyercoding_write_chunk_buffer( + size_t encodedDataSize = SawyerCodingWriteChunkBuffer( encodedDataBuffer, reinterpret_cast(randomdata), chdr_in); - ASSERT_GT(encodedDataSize, sizeof(sawyercoding_chunk_header)); + ASSERT_GT(encodedDataSize, sizeof(SawyerCodingChunkHeader)); // Decode OpenRCT2::MemoryStream ms(encodedDataBuffer, encodedDataSize); @@ -54,10 +54,10 @@ protected: delete[] encodedDataBuffer; } - void test_decode(const uint8_t* data, size_t size) + void TestDecode(const uint8_t* data, size_t size) { - auto expectedLength = size - sizeof(sawyercoding_chunk_header); - auto chdr_in = reinterpret_cast(data); + auto expectedLength = size - sizeof(SawyerCodingChunkHeader); + auto chdr_in = reinterpret_cast(data); ASSERT_EQ(chdr_in->length, expectedLength); OpenRCT2::MemoryStream ms(data, size); @@ -72,22 +72,22 @@ protected: TEST_F(SawyerCodingTest, write_read_chunk_none) { - test_encode_decode(CHUNK_ENCODING_NONE); + TestEncodeDecode(CHUNK_ENCODING_NONE); } TEST_F(SawyerCodingTest, write_read_chunk_rle) { - test_encode_decode(CHUNK_ENCODING_RLE); + TestEncodeDecode(CHUNK_ENCODING_RLE); } TEST_F(SawyerCodingTest, write_read_chunk_rle_compressed) { - test_encode_decode(CHUNK_ENCODING_RLECOMPRESSED); + TestEncodeDecode(CHUNK_ENCODING_RLECOMPRESSED); } TEST_F(SawyerCodingTest, write_read_chunk_rotate) { - test_encode_decode(CHUNK_ENCODING_ROTATE); + TestEncodeDecode(CHUNK_ENCODING_ROTATE); } // Note we only check if provided data decompresses to the same data, not if it compresses the same. @@ -96,23 +96,23 @@ TEST_F(SawyerCodingTest, write_read_chunk_rotate) TEST_F(SawyerCodingTest, decode_chunk_none) { - test_decode(nonedata, sizeof(nonedata)); + TestDecode(nonedata, sizeof(nonedata)); } -TEST_F(SawyerCodingTest, decode_chunk_rle) +TEST_F(SawyerCodingTest, DecodeChunkRLE) { - test_decode(rledata, sizeof(rledata)); + TestDecode(rledata, sizeof(rledata)); } TEST_F(SawyerCodingTest, decode_chunk_rlecompressed) { - test_decode(rlecompresseddata, sizeof(rlecompresseddata)); + TestDecode(rlecompresseddata, sizeof(rlecompresseddata)); } TEST_F(SawyerCodingTest, decode_chunk_rotate) { // Rotate - test_decode(rotatedata, sizeof(rotatedata)); + TestDecode(rotatedata, sizeof(rotatedata)); } TEST_F(SawyerCodingTest, invalid1) diff --git a/test/tests/StringTest.cpp b/test/tests/StringTest.cpp index 07598359e1..fd14d93052 100644 --- a/test/tests/StringTest.cpp +++ b/test/tests/StringTest.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -141,10 +141,10 @@ TEST_F(StringTest, ToUpper_Japanese) ASSERT_STREQ(actual.c_str(), u8"日本語で大文字がなし"); } -TEST_F(StringTest, strlogicalcmp) +TEST_F(StringTest, StrLogicalCmp) { - auto res_logical_1 = strlogicalcmp("foo1", "foo1_2"); - auto res_logical_2 = strlogicalcmp("foo1_2", "foo1"); + auto res_logical_1 = StrLogicalCmp("foo1", "foo1_2"); + auto res_logical_2 = StrLogicalCmp("foo1_2", "foo1"); auto res_1 = strcmp("foo1", "foo1_2"); auto res_2 = strcmp("foo1_2", "foo1"); // We only care if sign is correct, actual values might not be. @@ -152,22 +152,22 @@ TEST_F(StringTest, strlogicalcmp) EXPECT_GE(res_2 * res_logical_2, 1); EXPECT_NE(res_logical_1, res_logical_2); - EXPECT_GT(strlogicalcmp("foo12", "foo1"), 0); - EXPECT_LT(strlogicalcmp("foo12", "foo13"), 0); - EXPECT_EQ(strlogicalcmp("foo13", "foo13"), 0); + EXPECT_GT(StrLogicalCmp("foo12", "foo1"), 0); + EXPECT_LT(StrLogicalCmp("foo12", "foo13"), 0); + EXPECT_EQ(StrLogicalCmp("foo13", "foo13"), 0); - EXPECT_EQ(strlogicalcmp("foo13", "FOO13"), 0); + EXPECT_EQ(StrLogicalCmp("foo13", "FOO13"), 0); - EXPECT_LT(strlogicalcmp("A", "b"), 0); - EXPECT_LT(strlogicalcmp("a", "B"), 0); - EXPECT_GT(strlogicalcmp("B", "a"), 0); - EXPECT_GT(strlogicalcmp("b", "A"), 0); + EXPECT_LT(StrLogicalCmp("A", "b"), 0); + EXPECT_LT(StrLogicalCmp("a", "B"), 0); + EXPECT_GT(StrLogicalCmp("B", "a"), 0); + EXPECT_GT(StrLogicalCmp("b", "A"), 0); // ^ is used at the start of a ride name to move it to the end of the list - EXPECT_LT(strlogicalcmp("A", "^"), 0); - EXPECT_LT(strlogicalcmp("a", "^"), 0); - EXPECT_LT(strlogicalcmp("!", "A"), 0); - EXPECT_LT(strlogicalcmp("!", "a"), 0); + EXPECT_LT(StrLogicalCmp("A", "^"), 0); + EXPECT_LT(StrLogicalCmp("a", "^"), 0); + EXPECT_LT(StrLogicalCmp("!", "A"), 0); + EXPECT_LT(StrLogicalCmp("!", "a"), 0); } class CodepointViewTest : public testing::Test diff --git a/test/tests/TestData.cpp b/test/tests/TestData.cpp index 9a93274628..22569e8240 100644 --- a/test/tests/TestData.cpp +++ b/test/tests/TestData.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/TestData.h b/test/tests/TestData.h index 95bc3495b2..9e769fa954 100644 --- a/test/tests/TestData.h +++ b/test/tests/TestData.h @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/TileElements.cpp b/test/tests/TileElements.cpp index 253b9eb1c9..a88f2e0062 100644 --- a/test/tests/TileElements.cpp +++ b/test/tests/TileElements.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -33,7 +33,7 @@ protected: ASSERT_TRUE(initialised); GetContext()->LoadParkFromFile(parkPath); - game_load_init(); + GameLoadInit(); // Changed in some tests. Store to restore its value _gScreenFlags = gScreenFlags; diff --git a/test/tests/TileElementsView.cpp b/test/tests/TileElementsView.cpp index 32bedf194d..6e41affc55 100644 --- a/test/tests/TileElementsView.cpp +++ b/test/tests/TileElementsView.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 @@ -34,7 +34,7 @@ protected: ASSERT_TRUE(initialised); GetContext()->LoadParkFromFile(parkPath); - game_load_init(); + GameLoadInit(); // Changed in some tests. Store to restore its value _gScreenFlags = gScreenFlags; @@ -59,7 +59,7 @@ uint8_t TileElementsViewTests::_gScreenFlags; template std::vector BuildListManual(const CoordsXY& pos) { - std::vector res; + std::vector res; TileElement* element = MapGetFirstElementAt(pos); if (element == nullptr) @@ -69,9 +69,9 @@ template std::vector BuildListManual(const CoordsXY& pos) { if constexpr (!std::is_same_v) { - auto* res = element->as(); - if (res) - res.push_back(res); + auto* el = element->as(); + if (el) + res.push_back(el); } else { @@ -85,7 +85,7 @@ template std::vector BuildListManual(const CoordsXY& pos) template std::vector BuildListByView(const CoordsXY& pos) { - std::vector res; + std::vector res; for (auto* element : TileElementsView(pos)) { @@ -97,8 +97,8 @@ template std::vector BuildListByView(const CoordsXY& pos) template bool CompareLists(const CoordsXY& pos) { - auto listManual = BuildListManual(pos); - auto listView = BuildListByView(pos); + auto listManual = BuildListManual(pos); + auto listView = BuildListByView(pos); EXPECT_EQ(listManual.size(), listView.size()); if (listManual.size() != listView.size()) diff --git a/test/tests/helpers/StringHelpers.hpp b/test/tests/helpers/StringHelpers.hpp index 503b83dfa0..a2202b81e7 100644 --- a/test/tests/helpers/StringHelpers.hpp +++ b/test/tests/helpers/StringHelpers.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/tests.cpp b/test/tests/tests.cpp index 118c3dfcd8..7d3f468c49 100644 --- a/test/tests/tests.cpp +++ b/test/tests/tests.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014-2022 OpenRCT2 developers + * Copyright (c) 2014-2023 OpenRCT2 developers * * For a complete list of all authors, please refer to contributors.md * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 diff --git a/test/tests/tests.vcxproj b/test/tests/tests.vcxproj index 199bb4a234..95d7c4c808 100644 --- a/test/tests/tests.vcxproj +++ b/test/tests/tests.vcxproj @@ -8,6 +8,18 @@ Debug Win32 + + ReleaseLTCG + arm64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + Release Win32 @@ -84,7 +96,7 @@ - + @@ -97,4 +109,4 @@ - + \ No newline at end of file